Browse Source

[prefix] Use garbage-collectable section names

Allow unused sections of libprefix.o to be removed via --gc-sections.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 9 years ago
parent
commit
02a88b7489
1 changed files with 20 additions and 20 deletions
  1. 20
    20
      src/arch/x86/prefix/libprefix.S

+ 20
- 20
src/arch/x86/prefix/libprefix.S View File

69
  *   %ds:di : next character in output buffer (if applicable)
69
  *   %ds:di : next character in output buffer (if applicable)
70
  *****************************************************************************
70
  *****************************************************************************
71
  */
71
  */
72
-	.section ".prefix.lib", "awx", @progbits
72
+	.section ".prefix.print_character", "awx", @progbits
73
 	.code16
73
 	.code16
74
 	.globl	print_character
74
 	.globl	print_character
75
 print_character:
75
 print_character:
107
  *   %ds:di : next character in output buffer (if applicable)
107
  *   %ds:di : next character in output buffer (if applicable)
108
  *****************************************************************************
108
  *****************************************************************************
109
  */
109
  */
110
-	.section ".prefix.lib", "awx", @progbits
110
+	.section ".prefix.print_space", "awx", @progbits
111
 	.code16
111
 	.code16
112
 	.globl	print_space
112
 	.globl	print_space
113
 print_space:
113
 print_space:
132
  *   %ds:di : next character in output buffer (if applicable)
132
  *   %ds:di : next character in output buffer (if applicable)
133
  *****************************************************************************
133
  *****************************************************************************
134
  */
134
  */
135
-	.section ".prefix.lib", "awx", @progbits
135
+	.section ".prefix.print_message", "awx", @progbits
136
 	.code16
136
 	.code16
137
 	.globl	print_message
137
 	.globl	print_message
138
 print_message:
138
 print_message:
162
  *   %ds:di : next character in output buffer (if applicable)
162
  *   %ds:di : next character in output buffer (if applicable)
163
  *****************************************************************************
163
  *****************************************************************************
164
  */
164
  */
165
-	.section ".prefix.lib", "awx", @progbits
165
+	.section ".prefix.print_hex", "awx", @progbits
166
 	.code16
166
 	.code16
167
 	.globl	print_hex_dword
167
 	.globl	print_hex_dword
168
 print_hex_dword:
168
 print_hex_dword:
210
  *   %ds:di : next character in output buffer (if applicable)
210
  *   %ds:di : next character in output buffer (if applicable)
211
  *****************************************************************************
211
  *****************************************************************************
212
  */
212
  */
213
-	.section ".prefix.lib", "awx", @progbits
213
+	.section ".prefix.print_pci_busdevfn", "awx", @progbits
214
 	.code16
214
 	.code16
215
 	.globl	print_pci_busdevfn
215
 	.globl	print_pci_busdevfn
216
 print_pci_busdevfn:
216
 print_pci_busdevfn:
247
  *   %ds:di : next character in output buffer (if applicable)
247
  *   %ds:di : next character in output buffer (if applicable)
248
  *****************************************************************************
248
  *****************************************************************************
249
  */
249
  */
250
-	.section ".prefix.lib", "awx", @progbits
250
+	.section ".prefix.print_kill_line", "awx", @progbits
251
 	.code16
251
 	.code16
252
 	.globl	print_kill_line
252
 	.globl	print_kill_line
253
 print_kill_line:
253
 print_kill_line:
285
  *   None
285
  *   None
286
  ****************************************************************************
286
  ****************************************************************************
287
  */
287
  */
288
-	.section ".prefix.lib", "awx", @progbits
288
+	.section ".prefix.copy_bytes", "awx", @progbits
289
 	.code16
289
 	.code16
290
 copy_bytes:
290
 copy_bytes:
291
 	pushl	%ecx
291
 	pushl	%ecx
308
  *   None
308
  *   None
309
  ****************************************************************************
309
  ****************************************************************************
310
  */
310
  */
311
-	.section ".prefix.lib", "awx", @progbits
311
+	.section ".prefix.zero_bytes", "awx", @progbits
312
 	.code16
312
 	.code16
313
 zero_bytes:
313
 zero_bytes:
314
 	pushl	%ecx
314
 	pushl	%ecx
343
  *   None
343
  *   None
344
  ****************************************************************************
344
  ****************************************************************************
345
  */
345
  */
346
-	.section ".prefix.lib", "awx", @progbits
346
+	.section ".prefix.process_bytes", "awx", @progbits
347
 	.code16
347
 	.code16
348
 process_bytes:
348
 process_bytes:
349
 
349
 
495
  *   none
495
  *   none
496
  ****************************************************************************
496
  ****************************************************************************
497
  */
497
  */
498
-	.section ".prefix.lib", "awx", @progbits
498
+	.section ".prefix.install_block", "awx", @progbits
499
 	.code16
499
 	.code16
500
 install_block:
500
 install_block:
501
 	/* Preserve registers */
501
 	/* Preserve registers */
544
  *   none
544
  *   none
545
  ****************************************************************************
545
  ****************************************************************************
546
  */
546
  */
547
-	.section ".prefix.lib", "awx", @progbits
547
+	.section ".prefix.alloc_basemem", "awx", @progbits
548
 	.code16
548
 	.code16
549
 	.globl	alloc_basemem
549
 	.globl	alloc_basemem
550
 alloc_basemem:
550
 alloc_basemem:
591
  *   none
591
  *   none
592
  ****************************************************************************
592
  ****************************************************************************
593
  */
593
  */
594
-	.section ".text16", "ax", @progbits
594
+	.section ".text16.free_basemem", "ax", @progbits
595
 	.code16
595
 	.code16
596
 	.globl	free_basemem
596
 	.globl	free_basemem
597
 free_basemem:
597
 free_basemem:
625
 	ret
625
 	ret
626
 	.size free_basemem, . - free_basemem
626
 	.size free_basemem, . - free_basemem
627
 
627
 
628
-	.section ".text16.data", "aw", @progbits
628
+	.section ".text16.data.hooked_bios_interrupts", "aw", @progbits
629
 	.globl	hooked_bios_interrupts
629
 	.globl	hooked_bios_interrupts
630
 hooked_bios_interrupts:
630
 hooked_bios_interrupts:
631
 	.word	0
631
 	.word	0
645
  *   none
645
  *   none
646
  ****************************************************************************
646
  ****************************************************************************
647
  */
647
  */
648
-	.section ".prefix.lib", "awx", @progbits
648
+	.section ".prefix.install", "awx", @progbits
649
 	.code16
649
 	.code16
650
 	.globl install
650
 	.globl install
651
 install:
651
 install:
688
  *   none
688
  *   none
689
  ****************************************************************************
689
  ****************************************************************************
690
  */
690
  */
691
-	.section ".prefix.lib", "awx", @progbits
691
+	.section ".prefix.install_prealloc", "awx", @progbits
692
 	.code16
692
 	.code16
693
 	.globl install_prealloc
693
 	.globl install_prealloc
694
 install_prealloc:
694
 install_prealloc:
751
 	xorw	%di, %di
751
 	xorw	%di, %di
752
 	call	print_message
752
 	call	print_message
753
 2:	jmp	2b
753
 2:	jmp	2b
754
-	.section ".prefix.data", "aw", @progbits
754
+	.section ".prefix.data.a20_death_message", "aw", @progbits
755
 a20_death_message:
755
 a20_death_message:
756
 	.asciz	"\nHigh memory inaccessible - cannot continue\n"
756
 	.asciz	"\nHigh memory inaccessible - cannot continue\n"
757
 	.size	a20_death_message, . - a20_death_message
757
 	.size	a20_death_message, . - a20_death_message
780
 	cli
780
 	cli
781
 	hlt
781
 	hlt
782
 	jmp	2b
782
 	jmp	2b
783
-	.section ".prefix.data", "aw", @progbits
783
+	.section ".prefix.data.payload_death_message", "aw", @progbits
784
 payload_death_message:
784
 payload_death_message:
785
 	.asciz	"\nPayload inaccessible - cannot continue\n"
785
 	.asciz	"\nPayload inaccessible - cannot continue\n"
786
 	.size	payload_death_message, . - payload_death_message
786
 	.size	payload_death_message, . - payload_death_message
918
 	/* Vectors for far calls to .text16 functions.  Must be in
918
 	/* Vectors for far calls to .text16 functions.  Must be in
919
 	 * .data16, since .prefix may not be writable.
919
 	 * .data16, since .prefix may not be writable.
920
 	 */
920
 	 */
921
-	.section ".data16", "aw", @progbits
921
+	.section ".data16.install_prealloc", "aw", @progbits
922
 #ifdef KEEP_IT_REAL
922
 #ifdef KEEP_IT_REAL
923
 init_libkir_vector:
923
 init_libkir_vector:
924
 	.word init_libkir
924
 	.word init_libkir
940
 	.size close_payload_vector, . - close_payload_vector
940
 	.size close_payload_vector, . - close_payload_vector
941
 
941
 
942
 	/* Dummy routines to open and close payload */
942
 	/* Dummy routines to open and close payload */
943
-	.section ".text16.early.data", "aw", @progbits
943
+	.section ".text16.early.data.open_payload", "aw", @progbits
944
 	.weak	open_payload
944
 	.weak	open_payload
945
 	.weak	close_payload
945
 	.weak	close_payload
946
 open_payload:
946
 open_payload:
963
  *   none
963
  *   none
964
  ****************************************************************************
964
  ****************************************************************************
965
  */
965
  */
966
-	.section ".text16", "ax", @progbits
966
+	.section ".text16.uninstall", "ax", @progbits
967
 	.code16
967
 	.code16
968
 	.globl uninstall
968
 	.globl uninstall
969
 uninstall:
969
 uninstall:

Loading…
Cancel
Save