diff --git a/src/system/ldscripts/ppc/boot_loader_openfirmware.ld b/src/system/ldscripts/ppc/boot_loader_openfirmware.ld index 327e7c49f3..8bb5aa2e64 100644 --- a/src/system/ldscripts/ppc/boot_loader_openfirmware.ld +++ b/src/system/ldscripts/ppc/boot_loader_openfirmware.ld @@ -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) } }