Преглед изворни кода

[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 година
родитељ
комит
295c2fd671

+ 2
- 0
src/arch/i386/prefix/dskprefix.S Прегледај датотеку

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

+ 2
- 0
src/arch/i386/prefix/hdprefix.S Прегледај датотеку

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

+ 2
- 0
src/arch/i386/prefix/lkrnprefix.S Прегледај датотеку

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

+ 4
- 3
src/arch/i386/prefix/nbiprefix.S Прегледај датотеку

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

+ 2
- 0
src/arch/i386/prefix/pxeprefix.S Прегледај датотеку

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

+ 2
- 0
src/arch/i386/prefix/romprefix.S Прегледај датотеку

45
 	.code16
45
 	.code16
46
 	.arch i386
46
 	.arch i386
47
 	.section ".prefix", "ax", @progbits
47
 	.section ".prefix", "ax", @progbits
48
+	.globl	start
49
+start:
48
 	
50
 	
49
 	.org	0x00
51
 	.org	0x00
50
 romheader:
52
 romheader:

+ 2
- 0
src/arch/i386/scripts/i386.lds Прегледај датотеку

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

Loading…
Откажи
Сачувај