PPC: simplify the bootloader linker script

the OF 2.0 COFF loader skips sections other than
.text .data and .bss, so merge others into those three.
This commit is contained in:
François Revol
2015-04-22 02:43:34 +02:00
parent 853598431c
commit ade89bf38e
@@ -5,35 +5,35 @@ ENTRY(_start)
SECTIONS
{
. = 0x102000 + SIZEOF_HEADERS;
. = 0x202000 + SIZEOF_HEADERS;
__text_begin = .;
/* text/read-only data */
.text : { *(.text .text.* .gnu.linkonce.t.*) }
.rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
.sdata2 : { *(.sdata2) }
.text : { *(.text .text.* .gnu.linkonce.t.*)
*(.rodata .rodata.* .gnu.linkonce.r.*)
*(.sdata2) }
/* writable data */
/* align to the same offset in the next page (for performance reasons
(not that it really matters in the boot loader)) */
. = ALIGN(0x1000) + 0x1000 + (. & (0x1000 - 1));
__ctor_list = .;
.ctors : { *(.ctors) }
__ctor_end = .;
.data : {
__ctor_list = .;
*(.ctors)
__ctor_end = .;
__data_start = .;
.data : { *(.data .gnu.linkonce.d.*) }
.data.rel.ro : { *(.data.rel.ro.local .data.rel.ro*) }
.got : { *(.got .got2) }
.sdata : { *(.sdata .sdata.* .gnu.linkonce.s.*) }
__data_start = .;
*(.data .gnu.linkonce.d.*)
*(.data.rel.ro.local .data.rel.ro*)
*(.got .got2)
*(.sdata .sdata.* .gnu.linkonce.s.* .fixup) }
/* uninitialized data (in same segment as writable data) */
__bss_start = .;
.sbss : { *(.sbss .sbss.* .gnu.linkonce.sb.*) }
.bss : {
.bss : { *(.sbss .sbss.* .gnu.linkonce.sb.*)
*(.bss .bss.* .gnu.linkonce.b.*)
. = ALIGN(0x1000);
}
@@ -41,5 +41,5 @@ SECTIONS
_end = . ;
/* Strip unnecessary stuff */
/DISCARD/ : { *(.comment .note .eh_frame .dtors .debug_*) }
/DISCARD/ : { *(.comment .note .eh_frame .dtors .debug_* .gnu.attributes) }
}