]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[build] Fix building with newer binutils
authorMichael Brown <mcb30@ipxe.org>
Sun, 14 Jan 2024 12:12:18 +0000 (12:12 +0000)
committerMichael Brown <mcb30@ipxe.org>
Sun, 14 Jan 2024 12:16:02 +0000 (12:16 +0000)
commit6ca597eee9f95b846a3c2dc1231e63cfc02272c1
treed837b645a1a808daf92c2577bcff45b8bc198d7c
parente66552eeede19a91b1a52468a550b58fd031777b
[build] Fix building with newer binutils

Newer versions of the GNU assembler (observed with binutils 2.41) will
complain about the ".arch i386" in files assembled with "as --64",
with the message "Error: 64bit mode not supported on 'i386'".

In files such as stack.S that contain no instructions to be assembled,
the ".arch i386" is redundant and may be removed entirely.

In the remaining files, fix by moving ".arch i386" below the relevant
".code16" or ".code32" directive, so that the assembler is no longer
expecting 64-bit instructions to be used by the time that the ".arch
i386" directive is encountered.

Reported-by: Ali Mustakim <alim@forwardcomputers.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
24 files changed:
src/arch/i386/core/setjmp.S
src/arch/i386/tests/gdbstub_test.S
src/arch/x86/core/patch_cf.S
src/arch/x86/core/stack.S
src/arch/x86/core/stack16.S
src/arch/x86/drivers/net/undiisr.S
src/arch/x86/interface/pcbios/e820mangler.S
src/arch/x86/interface/pxe/pxe_entry.S
src/arch/x86/prefix/bootpart.S
src/arch/x86/prefix/dskprefix.S
src/arch/x86/prefix/exeprefix.S
src/arch/x86/prefix/hdprefix.S
src/arch/x86/prefix/libprefix.S
src/arch/x86/prefix/lkrnprefix.S
src/arch/x86/prefix/mbr.S
src/arch/x86/prefix/mromprefix.S
src/arch/x86/prefix/nbiprefix.S
src/arch/x86/prefix/nullprefix.S
src/arch/x86/prefix/pxeprefix.S
src/arch/x86/prefix/rawprefix.S
src/arch/x86/prefix/unlzma.S
src/arch/x86/prefix/usbdisk.S
src/arch/x86/transitions/liba20.S
src/arch/x86/transitions/libkir.S