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 SECTIONS
{ {
. = 0x102000 + SIZEOF_HEADERS; . = 0x202000 + SIZEOF_HEADERS;
__text_begin = .; __text_begin = .;
/* text/read-only data */ /* text/read-only data */
.text : { *(.text .text.* .gnu.linkonce.t.*) } .text : { *(.text .text.* .gnu.linkonce.t.*)
*(.rodata .rodata.* .gnu.linkonce.r.*)
.rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) } *(.sdata2) }
.sdata2 : { *(.sdata2) }
/* writable data */ /* writable data */
/* align to the same offset in the next page (for performance reasons /* align to the same offset in the next page (for performance reasons
(not that it really matters in the boot loader)) */ (not that it really matters in the boot loader)) */
. = ALIGN(0x1000) + 0x1000 + (. & (0x1000 - 1)); . = ALIGN(0x1000) + 0x1000 + (. & (0x1000 - 1));
.data : {
__ctor_list = .; __ctor_list = .;
.ctors : { *(.ctors) } *(.ctors)
__ctor_end = .; __ctor_end = .;
__data_start = .; __data_start = .;
.data : { *(.data .gnu.linkonce.d.*) } *(.data .gnu.linkonce.d.*)
.data.rel.ro : { *(.data.rel.ro.local .data.rel.ro*) } *(.data.rel.ro.local .data.rel.ro*)
.got : { *(.got .got2) } *(.got .got2)
.sdata : { *(.sdata .sdata.* .gnu.linkonce.s.*) } *(.sdata .sdata.* .gnu.linkonce.s.* .fixup) }
/* uninitialized data (in same segment as writable data) */ /* uninitialized data (in same segment as writable data) */
__bss_start = .; __bss_start = .;
.sbss : { *(.sbss .sbss.* .gnu.linkonce.sb.*) } .bss : { *(.sbss .sbss.* .gnu.linkonce.sb.*)
.bss : {
*(.bss .bss.* .gnu.linkonce.b.*) *(.bss .bss.* .gnu.linkonce.b.*)
. = ALIGN(0x1000); . = ALIGN(0x1000);
} }
@@ -41,5 +41,5 @@ SECTIONS
_end = . ; _end = . ;
/* Strip unnecessary stuff */ /* Strip unnecessary stuff */
/DISCARD/ : { *(.comment .note .eh_frame .dtors .debug_*) } /DISCARD/ : { *(.comment .note .eh_frame .dtors .debug_* .gnu.attributes) }
} }