]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[build] Work around stray sections introduced by some binutils versions 259/head
authorMichael Brown <mcb30@ipxe.org>
Mon, 15 Feb 2021 09:54:03 +0000 (09:54 +0000)
committerMichael Brown <mcb30@ipxe.org>
Mon, 15 Feb 2021 10:02:32 +0000 (10:02 +0000)
commit1b99ba2a93df92df63a7cddfb1b2cfb7b96be772
tree4dd2e876f75b02c740913b4b0c6adc182f51463c
parent83516ba7f0e816a7e1f17a711c8cdef2e633738c
[build] Work around stray sections introduced by some binutils versions

Some versions of GNU ld (observed with binutils 2.36 on Arch Linux)
introduce a .note.gnu.property section marked as loadable at a high
address and with non-empty contents.  This adds approximately 128MB of
garbage to the BIOS .usb disk images.

Fix by using a custom linker script for the prefix-only binaries such
as the USB disk partition table and MBR, in order to allow unwanted
sections to be explicitly discarded.

Reported-by: Christian Hesse <mail@eworm.de>
Tested-by: Christian Hesse <mail@eworm.de>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/arch/x86/Makefile.pcbios
src/arch/x86/scripts/prefixonly.lds [new file with mode: 0644]