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>
54 lines
840 B
ArmAsm
54 lines
840 B
ArmAsm
/*
|
|
* Raw binary prefix
|
|
*
|
|
* Assumes that entire image is already loaded as a contiguous block
|
|
* on a paragraph boundary and entered in real mode.
|
|
*
|
|
*/
|
|
|
|
FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL )
|
|
|
|
.section ".note.GNU-stack", "", @progbits
|
|
.code16
|
|
.arch i386
|
|
.org 0
|
|
|
|
#include <librm.h>
|
|
|
|
.section ".prefix", "ax", @progbits
|
|
.globl _raw_start
|
|
_raw_start:
|
|
|
|
/* Adjust %cs so that %cs:0000 is the start of the image */
|
|
movw %cs, %ax
|
|
call 1f
|
|
1: popw %bx
|
|
subw $1b, %bx
|
|
shrw $4, %bx
|
|
addw %bx, %ax
|
|
pushw %ax
|
|
pushw $2f
|
|
lret
|
|
2:
|
|
/* Install iPXE */
|
|
call install
|
|
|
|
/* Set up real-mode stack */
|
|
movw %bx, %ss
|
|
movw $_estack16, %sp
|
|
|
|
/* Jump to .text16 segment */
|
|
pushw %ax
|
|
pushw $1f
|
|
lret
|
|
.section ".text16", "awx", @progbits
|
|
1:
|
|
/* Run iPXE */
|
|
virtcall main
|
|
|
|
/* Uninstall iPXE */
|
|
call uninstall
|
|
|
|
/* Boot next device */
|
|
int $0x18
|