diff options
author | Michael Brown <mcb30@ipxe.org> | 2024-01-14 12:12:18 +0000 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2024-01-14 12:16:02 +0000 |
commit | 6ca597eee9f95b846a3c2dc1231e63cfc02272c1 (patch) | |
tree | d837b645a1a808daf92c2577bcff45b8bc198d7c /src/arch/i386 | |
parent | e66552eeede19a91b1a52468a550b58fd031777b (diff) | |
download | ipxe-6ca597eee9f95b846a3c2dc1231e63cfc02272c1.tar.gz |
[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>
Diffstat (limited to 'src/arch/i386')
-rw-r--r-- | src/arch/i386/core/setjmp.S | 2 | ||||
-rw-r--r-- | src/arch/i386/tests/gdbstub_test.S | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/arch/i386/core/setjmp.S b/src/arch/i386/core/setjmp.S index e0bbb7ef8..cbb5e7138 100644 --- a/src/arch/i386/core/setjmp.S +++ b/src/arch/i386/core/setjmp.S @@ -2,8 +2,8 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ) .section ".note.GNU-stack", "", @progbits .text - .arch i386 .code32 + .arch i386 /* Must match jmp_buf structure layout */ .struct 0 diff --git a/src/arch/i386/tests/gdbstub_test.S b/src/arch/i386/tests/gdbstub_test.S index e0c9e6c9a..e44c13c2d 100644 --- a/src/arch/i386/tests/gdbstub_test.S +++ b/src/arch/i386/tests/gdbstub_test.S @@ -1,4 +1,5 @@ .section ".note.GNU-stack", "", @progbits + .code32 .arch i386 .section ".data", "aw", @progbits |