mirror of https://github.com/ipxe/ipxe.git
[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>pull/118/head
parent
e66552eeed
commit
6ca597eee9
|
@ -2,8 +2,8 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL )
|
||||||
|
|
||||||
.section ".note.GNU-stack", "", @progbits
|
.section ".note.GNU-stack", "", @progbits
|
||||||
.text
|
.text
|
||||||
.arch i386
|
|
||||||
.code32
|
.code32
|
||||||
|
.arch i386
|
||||||
|
|
||||||
/* Must match jmp_buf structure layout */
|
/* Must match jmp_buf structure layout */
|
||||||
.struct 0
|
.struct 0
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
.section ".note.GNU-stack", "", @progbits
|
.section ".note.GNU-stack", "", @progbits
|
||||||
|
.code32
|
||||||
.arch i386
|
.arch i386
|
||||||
|
|
||||||
.section ".data", "aw", @progbits
|
.section ".data", "aw", @progbits
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL )
|
FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL )
|
||||||
|
|
||||||
.section ".note.GNU-stack", "", @progbits
|
.section ".note.GNU-stack", "", @progbits
|
||||||
.arch i386
|
|
||||||
.code16
|
.code16
|
||||||
|
.arch i386
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Set/clear CF on the stack as appropriate, assumes stack is as it should
|
* Set/clear CF on the stack as appropriate, assumes stack is as it should
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL )
|
FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL )
|
||||||
|
|
||||||
.section ".note.GNU-stack", "", @progbits
|
.section ".note.GNU-stack", "", @progbits
|
||||||
.arch i386
|
|
||||||
|
|
||||||
#ifdef __x86_64__
|
#ifdef __x86_64__
|
||||||
#define STACK_SIZE 8192
|
#define STACK_SIZE 8192
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL )
|
FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL )
|
||||||
|
|
||||||
.section ".note.GNU-stack", "", @progbits
|
.section ".note.GNU-stack", "", @progbits
|
||||||
.arch i386
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Internal stack
|
* Internal stack
|
||||||
|
|
|
@ -11,8 +11,8 @@ FILE_LICENCE ( GPL2_OR_LATER )
|
||||||
#define PIC2_ICR 0xa0
|
#define PIC2_ICR 0xa0
|
||||||
|
|
||||||
.section ".note.GNU-stack", "", @progbits
|
.section ".note.GNU-stack", "", @progbits
|
||||||
.arch i386
|
|
||||||
.code16
|
.code16
|
||||||
|
.arch i386
|
||||||
|
|
||||||
.section ".text16", "ax", @progbits
|
.section ".text16", "ax", @progbits
|
||||||
.globl undiisr
|
.globl undiisr
|
||||||
|
|
|
@ -24,8 +24,8 @@
|
||||||
FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL )
|
FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL )
|
||||||
|
|
||||||
.section ".note.GNU-stack", "", @progbits
|
.section ".note.GNU-stack", "", @progbits
|
||||||
.arch i386
|
|
||||||
.code16
|
.code16
|
||||||
|
.arch i386
|
||||||
|
|
||||||
#define SMAP 0x534d4150
|
#define SMAP 0x534d4150
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL )
|
||||||
#include <librm.h>
|
#include <librm.h>
|
||||||
|
|
||||||
.section ".note.GNU-stack", "", @progbits
|
.section ".note.GNU-stack", "", @progbits
|
||||||
|
.code16
|
||||||
.arch i386
|
.arch i386
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
|
|
@ -6,9 +6,9 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL )
|
||||||
#define STACK_SIZE 0x2000
|
#define STACK_SIZE 0x2000
|
||||||
|
|
||||||
.section ".note.GNU-stack", "", @progbits
|
.section ".note.GNU-stack", "", @progbits
|
||||||
|
.code16
|
||||||
.arch i386
|
.arch i386
|
||||||
.section ".prefix", "awx", @progbits
|
.section ".prefix", "awx", @progbits
|
||||||
.code16
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Find active partition
|
* Find active partition
|
||||||
|
|
|
@ -26,9 +26,9 @@ FILE_LICENCE ( GPL2_ONLY )
|
||||||
|
|
||||||
.section ".note.GNU-stack", "", @progbits
|
.section ".note.GNU-stack", "", @progbits
|
||||||
.org 0
|
.org 0
|
||||||
|
.code16
|
||||||
.arch i386
|
.arch i386
|
||||||
.section ".prefix", "ax", @progbits
|
.section ".prefix", "ax", @progbits
|
||||||
.code16
|
|
||||||
.globl _dsk_start
|
.globl _dsk_start
|
||||||
_dsk_start:
|
_dsk_start:
|
||||||
|
|
||||||
|
|
|
@ -37,9 +37,9 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL )
|
||||||
#define PSP_CMDLINE_START 0x81
|
#define PSP_CMDLINE_START 0x81
|
||||||
|
|
||||||
.section ".note.GNU-stack", "", @progbits
|
.section ".note.GNU-stack", "", @progbits
|
||||||
|
.code16
|
||||||
.arch i386
|
.arch i386
|
||||||
.org 0
|
.org 0
|
||||||
.code16
|
|
||||||
.section ".prefix", "awx", @progbits
|
.section ".prefix", "awx", @progbits
|
||||||
|
|
||||||
signature:
|
signature:
|
||||||
|
|
|
@ -3,9 +3,9 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL )
|
||||||
#include <librm.h>
|
#include <librm.h>
|
||||||
|
|
||||||
.section ".note.GNU-stack", "", @progbits
|
.section ".note.GNU-stack", "", @progbits
|
||||||
|
.code16
|
||||||
.arch i386
|
.arch i386
|
||||||
.section ".prefix", "awx", @progbits
|
.section ".prefix", "awx", @progbits
|
||||||
.code16
|
|
||||||
.org 0
|
.org 0
|
||||||
.globl _hd_start
|
.globl _hd_start
|
||||||
_hd_start:
|
_hd_start:
|
||||||
|
|
|
@ -27,6 +27,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL )
|
||||||
#include <librm.h>
|
#include <librm.h>
|
||||||
|
|
||||||
.section ".note.GNU-stack", "", @progbits
|
.section ".note.GNU-stack", "", @progbits
|
||||||
|
.code16
|
||||||
.arch i386
|
.arch i386
|
||||||
|
|
||||||
/* Image compression enabled */
|
/* Image compression enabled */
|
||||||
|
|
|
@ -5,8 +5,8 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL )
|
||||||
#define BZI_LOAD_HIGH_ADDR 0x100000
|
#define BZI_LOAD_HIGH_ADDR 0x100000
|
||||||
|
|
||||||
.section ".note.GNU-stack", "", @progbits
|
.section ".note.GNU-stack", "", @progbits
|
||||||
.arch i386
|
|
||||||
.code16
|
.code16
|
||||||
|
.arch i386
|
||||||
.section ".prefix", "ax", @progbits
|
.section ".prefix", "ax", @progbits
|
||||||
.globl _lkrn_start
|
.globl _lkrn_start
|
||||||
_lkrn_start:
|
_lkrn_start:
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL )
|
FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL )
|
||||||
|
|
||||||
.section ".note.GNU-stack", "", @progbits
|
.section ".note.GNU-stack", "", @progbits
|
||||||
|
.code16
|
||||||
.arch i386
|
.arch i386
|
||||||
.section ".prefix", "awx", @progbits
|
.section ".prefix", "awx", @progbits
|
||||||
.code16
|
|
||||||
.org 0
|
.org 0
|
||||||
|
|
||||||
.globl mbr
|
.globl mbr
|
||||||
|
|
|
@ -42,8 +42,8 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL )
|
||||||
#include "pciromprefix.S"
|
#include "pciromprefix.S"
|
||||||
|
|
||||||
.section ".note.GNU-stack", "", @progbits
|
.section ".note.GNU-stack", "", @progbits
|
||||||
.arch i386
|
|
||||||
.code16
|
.code16
|
||||||
|
.arch i386
|
||||||
|
|
||||||
/* Obtain access to payload by exposing the expansion ROM BAR at the
|
/* Obtain access to payload by exposing the expansion ROM BAR at the
|
||||||
* address currently used by a suitably large memory BAR on the same
|
* address currently used by a suitably large memory BAR on the same
|
||||||
|
|
|
@ -3,8 +3,8 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL )
|
||||||
#include <librm.h>
|
#include <librm.h>
|
||||||
|
|
||||||
.section ".note.GNU-stack", "", @progbits
|
.section ".note.GNU-stack", "", @progbits
|
||||||
.arch i386
|
|
||||||
.code16
|
.code16
|
||||||
|
.arch i386
|
||||||
.section ".prefix", "ax", @progbits
|
.section ".prefix", "ax", @progbits
|
||||||
.org 0
|
.org 0
|
||||||
|
|
||||||
|
|
|
@ -2,10 +2,10 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL )
|
||||||
|
|
||||||
.section ".note.GNU-stack", "", @progbits
|
.section ".note.GNU-stack", "", @progbits
|
||||||
.org 0
|
.org 0
|
||||||
|
.code16
|
||||||
.arch i386
|
.arch i386
|
||||||
|
|
||||||
.section ".prefix", "ax", @progbits
|
.section ".prefix", "ax", @progbits
|
||||||
.code16
|
|
||||||
_prefix:
|
_prefix:
|
||||||
|
|
||||||
.section ".text16", "ax", @progbits
|
.section ".text16", "ax", @progbits
|
||||||
|
|
|
@ -12,9 +12,9 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL )
|
||||||
#define PXE_HACK_EB54 0x0001
|
#define PXE_HACK_EB54 0x0001
|
||||||
|
|
||||||
.section ".note.GNU-stack", "", @progbits
|
.section ".note.GNU-stack", "", @progbits
|
||||||
|
.code16
|
||||||
.arch i386
|
.arch i386
|
||||||
.org 0
|
.org 0
|
||||||
.code16
|
|
||||||
|
|
||||||
#include <librm.h>
|
#include <librm.h>
|
||||||
#include <undi.h>
|
#include <undi.h>
|
||||||
|
|
|
@ -9,9 +9,9 @@
|
||||||
FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL )
|
FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL )
|
||||||
|
|
||||||
.section ".note.GNU-stack", "", @progbits
|
.section ".note.GNU-stack", "", @progbits
|
||||||
|
.code16
|
||||||
.arch i386
|
.arch i386
|
||||||
.org 0
|
.org 0
|
||||||
.code16
|
|
||||||
|
|
||||||
#include <librm.h>
|
#include <librm.h>
|
||||||
|
|
||||||
|
|
|
@ -44,6 +44,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
|
||||||
*/
|
*/
|
||||||
|
|
||||||
.section ".note.GNU-stack", "", @progbits
|
.section ".note.GNU-stack", "", @progbits
|
||||||
|
.code32
|
||||||
.arch i486
|
.arch i486
|
||||||
.section ".prefix.lib", "ax", @progbits
|
.section ".prefix.lib", "ax", @progbits
|
||||||
|
|
||||||
|
|
|
@ -3,9 +3,9 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL )
|
||||||
#include <config/console.h>
|
#include <config/console.h>
|
||||||
|
|
||||||
.section ".note.GNU-stack", "", @progbits
|
.section ".note.GNU-stack", "", @progbits
|
||||||
|
.code16
|
||||||
.arch i386
|
.arch i386
|
||||||
.section ".prefix", "awx", @progbits
|
.section ".prefix", "awx", @progbits
|
||||||
.code16
|
|
||||||
.org 0
|
.org 0
|
||||||
|
|
||||||
#include "mbr.S"
|
#include "mbr.S"
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL )
|
FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL )
|
||||||
|
|
||||||
.section ".note.GNU-stack", "", @progbits
|
.section ".note.GNU-stack", "", @progbits
|
||||||
|
.code16
|
||||||
.arch i386
|
.arch i386
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
|
|
@ -32,9 +32,9 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL )
|
||||||
#define BOCHSBP xchgw %bx, %bx
|
#define BOCHSBP xchgw %bx, %bx
|
||||||
|
|
||||||
.section ".note.GNU-stack", "", @progbits
|
.section ".note.GNU-stack", "", @progbits
|
||||||
|
.code16
|
||||||
.arch i386
|
.arch i386
|
||||||
.section ".text16", "awx", @progbits
|
.section ".text16", "awx", @progbits
|
||||||
.code16
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* init_libkir (real-mode or 16:xx protected-mode far call)
|
* init_libkir (real-mode or 16:xx protected-mode far call)
|
||||||
|
|
Loading…
Reference in New Issue