mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-21 12:25:27 +00:00
arm: Discard unwanted sections in linker script
There are a handful of sections that are not useful in the U-Boot output binary. At present, the linker script moves these to the end of the binary, after the _image_binary_end marker symbol, so that they don't get loaded. The linker script syntax supports discarding sections that shouldn't be included in the output. Switch to this instead, to make the intention clearer and reduce the ELF sections that have to be handled later in the build. This is also consistent with the other architectures' linker scripts. Signed-off-by: Sam Edwards <CFSworks@gmail.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
This commit is contained in:
parent
deba40dd0b
commit
16448c443c
1 changed files with 10 additions and 10 deletions
|
@ -181,14 +181,14 @@ SECTIONS
|
||||||
__bss_end = .;
|
__bss_end = .;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dynsym _image_binary_end : { *(.dynsym) }
|
/DISCARD/ : { *(.dynsym) }
|
||||||
.dynbss : { *(.dynbss) }
|
/DISCARD/ : { *(.dynbss) }
|
||||||
.dynstr : { *(.dynstr*) }
|
/DISCARD/ : { *(.dynstr*) }
|
||||||
.dynamic : { *(.dynamic*) }
|
/DISCARD/ : { *(.dynamic*) }
|
||||||
.plt : { *(.plt*) }
|
/DISCARD/ : { *(.plt*) }
|
||||||
.interp : { *(.interp*) }
|
/DISCARD/ : { *(.interp*) }
|
||||||
.gnu.hash : { *(.gnu.hash) }
|
/DISCARD/ : { *(.gnu.hash) }
|
||||||
.gnu : { *(.gnu*) }
|
/DISCARD/ : { *(.gnu*) }
|
||||||
.ARM.exidx : { *(.ARM.exidx*) }
|
/DISCARD/ : { *(.ARM.exidx*) }
|
||||||
.gnu.linkonce.armexidx : { *(.gnu.linkonce.armexidx.*) }
|
/DISCARD/ : { *(.gnu.linkonce.armexidx.*) }
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue