mirror of https://github.com/ipxe/ipxe.git
[build] Ensure an entry point symbol exists in all builds
Commit 623469d
("[build] Eliminate unused sections at link-time")
introduced a regression in several build formats, in which the prefix
would end up being garbage-collected out of existence. Fix by
ensuring that an entry symbol exists in each possible prefix, and is
required by the linker script.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
pull/1/head
parent
7ef314514c
commit
295c2fd671
|
@ -27,6 +27,8 @@ FILE_LICENCE ( GPL2_ONLY )
|
||||||
.text
|
.text
|
||||||
.section ".prefix", "ax", @progbits
|
.section ".prefix", "ax", @progbits
|
||||||
.code16
|
.code16
|
||||||
|
.globl start
|
||||||
|
start:
|
||||||
|
|
||||||
jmp $BOOTSEG, $go /* reload cs:ip to match relocation addr */
|
jmp $BOOTSEG, $go /* reload cs:ip to match relocation addr */
|
||||||
go:
|
go:
|
||||||
|
|
|
@ -5,6 +5,8 @@ FILE_LICENCE ( GPL2_OR_LATER )
|
||||||
.section ".prefix", "awx", @progbits
|
.section ".prefix", "awx", @progbits
|
||||||
.code16
|
.code16
|
||||||
.org 0
|
.org 0
|
||||||
|
.globl start
|
||||||
|
start:
|
||||||
|
|
||||||
movw $load_image, %bp
|
movw $load_image, %bp
|
||||||
jmp find_active_partition
|
jmp find_active_partition
|
||||||
|
|
|
@ -49,6 +49,8 @@ FILE_LICENCE ( GPL_ANY )
|
||||||
.arch i386
|
.arch i386
|
||||||
.org 0
|
.org 0
|
||||||
.section ".prefix", "ax", @progbits
|
.section ".prefix", "ax", @progbits
|
||||||
|
.globl start
|
||||||
|
start:
|
||||||
/*
|
/*
|
||||||
This is a minimal boot sector. If anyone tries to execute it (e.g., if
|
This is a minimal boot sector. If anyone tries to execute it (e.g., if
|
||||||
a .lilo file is dd'ed to a floppy), print an error message.
|
a .lilo file is dd'ed to a floppy), print an error message.
|
||||||
|
|
|
@ -17,7 +17,7 @@ file_header:
|
||||||
.byte 0
|
.byte 0
|
||||||
.byte 0 /* No flags */
|
.byte 0 /* No flags */
|
||||||
.word 0x0000, 0x07c0 /* Load header to 0x07c0:0x0000 */
|
.word 0x0000, 0x07c0 /* Load header to 0x07c0:0x0000 */
|
||||||
.word entry, 0x07c0 /* Start execution at 0x07c0:entry */
|
.word start, 0x07c0 /* Start execution at 0x07c0:entry */
|
||||||
.size file_header, . - file_header
|
.size file_header, . - file_header
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
@ -49,7 +49,8 @@ memlen: .long -512
|
||||||
* NBI entry point
|
* NBI entry point
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
*/
|
*/
|
||||||
entry:
|
.globl start
|
||||||
|
start:
|
||||||
/* Install iPXE */
|
/* Install iPXE */
|
||||||
call install
|
call install
|
||||||
|
|
||||||
|
@ -71,7 +72,7 @@ entry:
|
||||||
int $0x19
|
int $0x19
|
||||||
|
|
||||||
.previous
|
.previous
|
||||||
.size entry, . - entry
|
.size start, . - start
|
||||||
|
|
||||||
nbi_header_end:
|
nbi_header_end:
|
||||||
.org 512
|
.org 512
|
||||||
|
|
|
@ -24,6 +24,8 @@ FILE_LICENCE ( GPL2_OR_LATER )
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
*/
|
*/
|
||||||
.section ".prefix", "ax", @progbits
|
.section ".prefix", "ax", @progbits
|
||||||
|
.globl start
|
||||||
|
start:
|
||||||
jmp $0x7c0, $1f
|
jmp $0x7c0, $1f
|
||||||
1:
|
1:
|
||||||
/* Preserve registers for possible return to PXE */
|
/* Preserve registers for possible return to PXE */
|
||||||
|
|
|
@ -45,6 +45,8 @@ FILE_LICENCE ( GPL2_OR_LATER )
|
||||||
.code16
|
.code16
|
||||||
.arch i386
|
.arch i386
|
||||||
.section ".prefix", "ax", @progbits
|
.section ".prefix", "ax", @progbits
|
||||||
|
.globl start
|
||||||
|
start:
|
||||||
|
|
||||||
.org 0x00
|
.org 0x00
|
||||||
romheader:
|
romheader:
|
||||||
|
|
|
@ -5,6 +5,8 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
ENTRY ( start )
|
||||||
|
|
||||||
SECTIONS {
|
SECTIONS {
|
||||||
|
|
||||||
/* Each section starts at a virtual address of zero.
|
/* Each section starts at a virtual address of zero.
|
||||||
|
|
Loading…
Reference in New Issue