From a0a3428c2f18803feb240a27179e26cfda41681b Mon Sep 17 00:00:00 2001 From: Calascibetta Romain Date: Wed, 28 Feb 2024 13:08:03 +0100 Subject: [PATCH] Do not discard .gnu.note, GNU ld complains when we link object files --- bindings/solo5_hvt.lds | 7 ------- bindings/solo5_muen.lds | 7 ------- bindings/solo5_spt.lds | 7 ------- bindings/solo5_stub.lds | 7 ------- bindings/solo5_virtio.lds | 7 ------- bindings/solo5_xen.lds | 7 ------- 6 files changed, 42 deletions(-) diff --git a/bindings/solo5_hvt.lds b/bindings/solo5_hvt.lds index d5d0cb95..46f6e7a6 100644 --- a/bindings/solo5_hvt.lds +++ b/bindings/solo5_hvt.lds @@ -149,13 +149,6 @@ SECTIONS { . = ALIGN(CONSTANT(MAXPAGESIZE)); _ebss = .; _end = .; - - /* We are not building a GNU executable, so discard any default NOTEs the - toolchain might generate to prevent any surprises in the final layout. */ - /DISCARD/ : { - *(.note.gnu.*) - } - _ltdata = _edata - _stdata; _ltbss = SIZEOF(.tbss); } diff --git a/bindings/solo5_muen.lds b/bindings/solo5_muen.lds index 0b7fc40e..7a947ee8 100644 --- a/bindings/solo5_muen.lds +++ b/bindings/solo5_muen.lds @@ -148,13 +148,6 @@ SECTIONS { . = ALIGN(CONSTANT(MAXPAGESIZE)); _ebss = .; _end = .; - - /* We are not building a GNU executable, so discard any default NOTEs the - toolchain might generate to prevent any surprises in the final layout. */ - /DISCARD/ : { - *(.note.gnu.*) - } - _ltdata = SIZEOF(.tdata); _ltbss = SIZEOF(.tbss); } diff --git a/bindings/solo5_spt.lds b/bindings/solo5_spt.lds index 4b4172b8..69e87393 100644 --- a/bindings/solo5_spt.lds +++ b/bindings/solo5_spt.lds @@ -147,13 +147,6 @@ SECTIONS { . = ALIGN(CONSTANT(MAXPAGESIZE)); _ebss = .; _end = .; - - /* We are not building a GNU executable, so discard any default NOTEs the - toolchain might generate to prevent any surprises in the final layout. */ - /DISCARD/ : { - *(.note.gnu.*) - } - _ltdata = _edata - _stdata; _ltbss = SIZEOF(.tbss); } diff --git a/bindings/solo5_stub.lds b/bindings/solo5_stub.lds index 2b3d90a3..3da57124 100644 --- a/bindings/solo5_stub.lds +++ b/bindings/solo5_stub.lds @@ -147,13 +147,6 @@ SECTIONS { . = ALIGN(CONSTANT(MAXPAGESIZE)); _ebss = .; _end = .; - - /* We are not building a GNU executable, so discard any default NOTEs the - toolchain might generate to prevent any surprises in the final layout. */ - /DISCARD/ : { - *(.note.gnu.*) - } - _ltdata = SIZEOF(.tdata); _ltbss = SIZEOF(.tbss); } diff --git a/bindings/solo5_virtio.lds b/bindings/solo5_virtio.lds index e1eb4b84..449a0802 100644 --- a/bindings/solo5_virtio.lds +++ b/bindings/solo5_virtio.lds @@ -148,13 +148,6 @@ SECTIONS { . = ALIGN(CONSTANT(MAXPAGESIZE)); _ebss = .; _end = .; - - /* We are not building a GNU executable, so discard any default NOTEs the - toolchain might generate to prevent any surprises in the final layout. */ - /DISCARD/ : { - *(.note.gnu.*) - } - _ltdata = _edata - _stdata; _ltbss = SIZEOF(.tbss); } diff --git a/bindings/solo5_xen.lds b/bindings/solo5_xen.lds index 079c74fe..2cdf23f5 100644 --- a/bindings/solo5_xen.lds +++ b/bindings/solo5_xen.lds @@ -153,13 +153,6 @@ SECTIONS { . = ALIGN(CONSTANT(MAXPAGESIZE)); _ebss = .; _end = .; - - /* We are not building a GNU executable, so discard any default NOTEs the - toolchain might generate to prevent any surprises in the final layout. */ - /DISCARD/ : { - *(.note.gnu.*) - } - _ltdata = _edata - _stdata; _ltbss = SIZEOF(.tbss); }