Ver código fonte

[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>
tags/v1.20.1
Michael Brown 13 anos atrás
pai
commit
295c2fd671

+ 2
- 0
src/arch/i386/prefix/dskprefix.S Ver arquivo

@@ -27,6 +27,8 @@ FILE_LICENCE ( GPL2_ONLY )
27 27
 	.text
28 28
 	.section ".prefix", "ax", @progbits
29 29
 	.code16
30
+	.globl	start
31
+start:
30 32
 
31 33
 	jmp	$BOOTSEG, $go		/* reload cs:ip to match relocation addr */
32 34
 go: 

+ 2
- 0
src/arch/i386/prefix/hdprefix.S Ver arquivo

@@ -5,6 +5,8 @@ FILE_LICENCE ( GPL2_OR_LATER )
5 5
 	.section ".prefix", "awx", @progbits
6 6
 	.code16
7 7
 	.org 0
8
+	.globl	start
9
+start:
8 10
 
9 11
 	movw	$load_image, %bp
10 12
 	jmp	find_active_partition

+ 2
- 0
src/arch/i386/prefix/lkrnprefix.S Ver arquivo

@@ -49,6 +49,8 @@ FILE_LICENCE ( GPL_ANY )
49 49
 	.arch i386
50 50
 	.org	0
51 51
 	.section ".prefix", "ax", @progbits
52
+	.globl	start
53
+start:
52 54
 /* 
53 55
 	This is a minimal boot sector.	If anyone tries to execute it (e.g., if
54 56
 	a .lilo file is dd'ed to a floppy), print an error message. 

+ 4
- 3
src/arch/i386/prefix/nbiprefix.S Ver arquivo

@@ -17,7 +17,7 @@ file_header:
17 17
 	.byte	0
18 18
 	.byte	0		/* No flags */
19 19
 	.word	0x0000, 0x07c0	/* Load header to 0x07c0:0x0000 */
20
-	.word	entry, 0x07c0	/* Start execution at 0x07c0:entry */
20
+	.word	start, 0x07c0	/* Start execution at 0x07c0:entry */
21 21
 	.size	file_header, . - file_header
22 22
 
23 23
 /*****************************************************************************
@@ -49,7 +49,8 @@ memlen:	.long	-512
49 49
  * NBI entry point
50 50
  *****************************************************************************
51 51
  */
52
-entry:
52
+	.globl	start
53
+start:
53 54
 	/* Install iPXE */
54 55
 	call	install
55 56
 
@@ -71,7 +72,7 @@ entry:
71 72
 	int $0x19
72 73
 
73 74
 	.previous
74
-	.size	entry, . - entry
75
+	.size	start, . - start
75 76
 
76 77
 nbi_header_end:
77 78
 	.org 512

+ 2
- 0
src/arch/i386/prefix/pxeprefix.S Ver arquivo

@@ -24,6 +24,8 @@ FILE_LICENCE ( GPL2_OR_LATER )
24 24
  *****************************************************************************
25 25
  */
26 26
 	.section ".prefix", "ax", @progbits
27
+	.globl	start
28
+start:
27 29
 	jmp	$0x7c0, $1f
28 30
 1:
29 31
 	/* Preserve registers for possible return to PXE */

+ 2
- 0
src/arch/i386/prefix/romprefix.S Ver arquivo

@@ -45,6 +45,8 @@ FILE_LICENCE ( GPL2_OR_LATER )
45 45
 	.code16
46 46
 	.arch i386
47 47
 	.section ".prefix", "ax", @progbits
48
+	.globl	start
49
+start:
48 50
 	
49 51
 	.org	0x00
50 52
 romheader:

+ 2
- 0
src/arch/i386/scripts/i386.lds Ver arquivo

@@ -5,6 +5,8 @@
5 5
  *
6 6
  */
7 7
 
8
+ENTRY ( start )
9
+
8 10
 SECTIONS {
9 11
 
10 12
     /* Each section starts at a virtual address of zero.

Carregando…
Cancelar
Salvar