summaryrefslogtreecommitdiffstats
path: root/src/arch
diff options
context:
space:
mode:
authorMichael Brown2011-02-23 21:20:55 +0100
committerMichael Brown2011-02-23 21:23:03 +0100
commit295c2fd671ebd8c149e5e9fc4fe745ab8ea87b9e (patch)
treea8bf11ac9275e26483389e60c6828bbf83c9b6df /src/arch
parent[iscsi] Disambiguate the expected target errors in the login response (diff)
downloadipxe-295c2fd671ebd8c149e5e9fc4fe745ab8ea87b9e.tar.gz
ipxe-295c2fd671ebd8c149e5e9fc4fe745ab8ea87b9e.tar.xz
ipxe-295c2fd671ebd8c149e5e9fc4fe745ab8ea87b9e.zip
[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>
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/i386/prefix/dskprefix.S2
-rw-r--r--src/arch/i386/prefix/hdprefix.S2
-rw-r--r--src/arch/i386/prefix/lkrnprefix.S2
-rw-r--r--src/arch/i386/prefix/nbiprefix.S7
-rw-r--r--src/arch/i386/prefix/pxeprefix.S2
-rw-r--r--src/arch/i386/prefix/romprefix.S2
-rw-r--r--src/arch/i386/scripts/i386.lds2
7 files changed, 16 insertions, 3 deletions
diff --git a/src/arch/i386/prefix/dskprefix.S b/src/arch/i386/prefix/dskprefix.S
index 0f4b3ba03..78a108b55 100644
--- a/src/arch/i386/prefix/dskprefix.S
+++ b/src/arch/i386/prefix/dskprefix.S
@@ -27,6 +27,8 @@ FILE_LICENCE ( GPL2_ONLY )
.text
.section ".prefix", "ax", @progbits
.code16
+ .globl start
+start:
jmp $BOOTSEG, $go /* reload cs:ip to match relocation addr */
go:
diff --git a/src/arch/i386/prefix/hdprefix.S b/src/arch/i386/prefix/hdprefix.S
index 820bad354..a471aa0df 100644
--- a/src/arch/i386/prefix/hdprefix.S
+++ b/src/arch/i386/prefix/hdprefix.S
@@ -5,6 +5,8 @@ FILE_LICENCE ( GPL2_OR_LATER )
.section ".prefix", "awx", @progbits
.code16
.org 0
+ .globl start
+start:
movw $load_image, %bp
jmp find_active_partition
diff --git a/src/arch/i386/prefix/lkrnprefix.S b/src/arch/i386/prefix/lkrnprefix.S
index 3be43ae57..7577a8a16 100644
--- a/src/arch/i386/prefix/lkrnprefix.S
+++ b/src/arch/i386/prefix/lkrnprefix.S
@@ -49,6 +49,8 @@ FILE_LICENCE ( GPL_ANY )
.arch i386
.org 0
.section ".prefix", "ax", @progbits
+ .globl start
+start:
/*
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.
diff --git a/src/arch/i386/prefix/nbiprefix.S b/src/arch/i386/prefix/nbiprefix.S
index 16d22de87..b93170e50 100644
--- a/src/arch/i386/prefix/nbiprefix.S
+++ b/src/arch/i386/prefix/nbiprefix.S
@@ -17,7 +17,7 @@ file_header:
.byte 0
.byte 0 /* No flags */
.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
/*****************************************************************************
@@ -49,7 +49,8 @@ memlen: .long -512
* NBI entry point
*****************************************************************************
*/
-entry:
+ .globl start
+start:
/* Install iPXE */
call install
@@ -71,7 +72,7 @@ entry:
int $0x19
.previous
- .size entry, . - entry
+ .size start, . - start
nbi_header_end:
.org 512
diff --git a/src/arch/i386/prefix/pxeprefix.S b/src/arch/i386/prefix/pxeprefix.S
index 1f5930af3..0bfd0ae3a 100644
--- a/src/arch/i386/prefix/pxeprefix.S
+++ b/src/arch/i386/prefix/pxeprefix.S
@@ -24,6 +24,8 @@ FILE_LICENCE ( GPL2_OR_LATER )
*****************************************************************************
*/
.section ".prefix", "ax", @progbits
+ .globl start
+start:
jmp $0x7c0, $1f
1:
/* Preserve registers for possible return to PXE */
diff --git a/src/arch/i386/prefix/romprefix.S b/src/arch/i386/prefix/romprefix.S
index b2bff14e7..53af422a4 100644
--- a/src/arch/i386/prefix/romprefix.S
+++ b/src/arch/i386/prefix/romprefix.S
@@ -45,6 +45,8 @@ FILE_LICENCE ( GPL2_OR_LATER )
.code16
.arch i386
.section ".prefix", "ax", @progbits
+ .globl start
+start:
.org 0x00
romheader:
diff --git a/src/arch/i386/scripts/i386.lds b/src/arch/i386/scripts/i386.lds
index c5bc631fa..dd07194cb 100644
--- a/src/arch/i386/scripts/i386.lds
+++ b/src/arch/i386/scripts/i386.lds
@@ -5,6 +5,8 @@
*
*/
+ENTRY ( start )
+
SECTIONS {
/* Each section starts at a virtual address of zero.