Files
ipxe/src/arch/x86/prefix/mbr.S
T
Michael Brown 2bb4ec1f54 [build] Avoid use of "ld --oformat binary"
Using "ld --oformat binary" for mbr.bin and usbdisk.bin seems to cause
segmentation faults on some versions of binutils (observed on Fedora
27).  Work around this problem by using ld to create an intermediate
ELF object, followed by objcopy (via the existing %.tmp -> %.bin rule)
to create the final binary.

Note that we cannot simply use a single-stage "objcopy -O binary"
since this will not process the relocation records for x86_64: see
commit 1afcccd ("[build] Do not use "objcopy -O binary" for objects
with relocation records").

Reported-by: Brent S <bts@square-r00t.net>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2018-01-02 21:26:40 +01:00

17 lines
242 B
ArmAsm

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL )
.text
.arch i386
.section ".prefix", "awx", @progbits
.code16
.org 0
.globl mbr
mbr:
movw $exec_sector, %bp
jmp find_active_partition
exec_sector:
ljmp $0x0000, $0x7c00
#include "bootpart.S"