]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[build] Ensure an entry point symbol exists in all builds
authorMichael Brown <mcb30@ipxe.org>
Wed, 23 Feb 2011 20:20:55 +0000 (20:20 +0000)
committerMichael Brown <mcb30@ipxe.org>
Wed, 23 Feb 2011 20:23:03 +0000 (20:23 +0000)
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>
src/arch/i386/prefix/dskprefix.S
src/arch/i386/prefix/hdprefix.S
src/arch/i386/prefix/lkrnprefix.S
src/arch/i386/prefix/nbiprefix.S
src/arch/i386/prefix/pxeprefix.S
src/arch/i386/prefix/romprefix.S
src/arch/i386/scripts/i386.lds

index 0f4b3ba0337bc9fdf7a1e10ea98d0b6591e20d4e..78a108b55ad21770b99ca3043b0b6144f54d84d4 100644 (file)
@@ -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: 
index 820bad354d2ba79a924a0d9dc9d9f9af65f8b2d9..a471aa0df90cf54b73d74eb0d34eb93a2af26997 100644 (file)
@@ -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
index 3be43ae57e7f22920c61f6f3fc28f2f513eea741..7577a8a16330edd37bafffb3562ab663bf85b964 100644 (file)
@@ -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. 
index 16d22de87bf91c3cbee114263f2f5221a7b0febb..b93170e50cb8e6a4ba4791ed48fafc14a7f11d51 100644 (file)
@@ -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
index 1f5930af33aaf4195befb95ac13bc175fbbd8b11..0bfd0ae3a912c2a0af8fba48f0b56b80ad6287ae 100644 (file)
@@ -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 */
index b2bff14e77564328d7032a23d6a114f618cf47fb..53af422a41f07b82b7810f86818a77638df62d93 100644 (file)
@@ -45,6 +45,8 @@ FILE_LICENCE ( GPL2_OR_LATER )
        .code16
        .arch i386
        .section ".prefix", "ax", @progbits
+       .globl  start
+start:
        
        .org    0x00
 romheader:
index c5bc631fa92473063d2191ad2e825c07620f8e54..dd07194cb748326952253dba98fbe67384563212 100644 (file)
@@ -5,6 +5,8 @@
  *
  */
 
+ENTRY ( start )
+
 SECTIONS {
 
     /* Each section starts at a virtual address of zero.