Mercurial > hg > xemacs-beta
diff src/ppc.ldscript @ 276:6330739388db r21-0b36
Import from CVS: tag r21-0b36
| author | cvs |
|---|---|
| date | Mon, 13 Aug 2007 10:30:37 +0200 |
| parents | e70b3a057e12 |
| children |
line wrap: on
line diff
--- a/src/ppc.ldscript Mon Aug 13 10:29:43 2007 +0200 +++ b/src/ppc.ldscript Mon Aug 13 10:30:37 2007 +0200 @@ -2,21 +2,27 @@ "elf32-powerpc") OUTPUT_ARCH(powerpc) ENTRY(_start) -SEARCH_DIR(/lib); SEARCH_DIR(/usr/lib); SEARCH_DIR(/usr/local/lib); SEARCH_DIR(/usr/ppc-linux-elf/lib); +SEARCH_DIR(/lib); SEARCH_DIR(/usr/lib); SEARCH_DIR(/usr/local/lib); SEARCH_DIR(/usr/powerpc-unknown-linux-gnulibc1/lib); /* Do we need any of these for elf? __DYNAMIC = 0; */ PROVIDE (__stack = 0); SECTIONS { /* Read-only sections, merged into text segment: */ - . = 0x200000 + SIZEOF_HEADERS; + . = 0x01800000 + SIZEOF_HEADERS; .interp : { *(.interp) } .hash : { *(.hash) } .dynsym : { *(.dynsym) } .dynstr : { *(.dynstr) } - .rela.text : { *(.rela.text) } - .rela.data : { *(.rela.data) } - .rela.rodata : { *(.rela.rodata) } + .gnu.version : { *(.gnu.version) } + .gnu.version_d : { *(.gnu.version_d) } + .gnu.version_r : { *(.gnu.version_r) } + .rela.text : + { *(.rela.text) *(.rela.gnu.linkonce.t*) } + .rela.data : + { *(.rela.data) *(.rela.gnu.linkonce.d*) } + .rela.rodata : + { *(.rela.rodata) *(.rela.gnu.linkonce.r*) } .rela.got : { *(.rela.got) } .rela.got1 : { *(.rela.got1) } .rela.got2 : { *(.rela.got2) } @@ -26,8 +32,8 @@ .rela.fini : { *(.rela.fini) } .rela.bss : { *(.rela.bss) } .rela.plt : { *(.rela.plt) } - .rela.sdata : { *(.rela.sdata2) } - .rela.sbss : { *(.rela.sbss2) } + .rela.sdata : { *(.rela.sdata) } + .rela.sbss : { *(.rela.sbss) } .rela.sdata2 : { *(.rela.sdata2) } .rela.sbss2 : { *(.rela.sbss2) } .text : @@ -35,10 +41,11 @@ *(.text) /* .gnu.warning sections are handled specially by elf32.em. */ *(.gnu.warning) + *(.gnu.linkonce.t*) } =0 .init : { *(.init) } =0 .fini : { *(.fini) } =0 - .rodata : { *(.rodata) } + .rodata : { *(.rodata) *(.gnu.linkonce.r*) } .rodata1 : { *(.rodata1) } _etext = .; PROVIDE (etext = .); @@ -47,7 +54,7 @@ /* Adjust the address for the data segment. We want to adjust up to the same address within the page on the next page up. It would be more correct to do this: - . = ALIGN(0x40000) + (ALIGN(8) & (0x40000 - 1)); + . = .; The current expression does not correctly handle the case of a text segment ending precisely at the end of a page; it causes the data segment to skip a page. The above expression does not have @@ -58,15 +65,15 @@ important than losing a page of the virtual address space (note that no actual memory is lost; the page which is skipped can not be referenced). */ - . = ALIGN(8) + 0x40000; + . = .; .data : { *(.data) + *(.gnu.linkonce.d*) CONSTRUCTORS } .data1 : { *(.data1) } .got1 : { *(.got1) } - .plt : { *(.plt) } .dynamic : { *(.dynamic) } /* Put .ctors and .dtors next to the .got2 section, so that the pointers get relocated with -mrelocatable. Also put in the .fixup pointers. @@ -98,11 +105,11 @@ } .bss : { - PROVIDE (__sbss_start = .); + PROVIDE (__sbss_start = .); *(.sbss) *(.scommon) PROVIDE (__sbss_end = .); - PROVIDE (__bss_start = .); + PROVIDE (__bss_start = .); *(.dynbss) *(.bss) *(COMMON) @@ -114,14 +121,29 @@ .stab 0 : { *(.stab) } .stabstr 0 : { *(.stabstr) } /* DWARF debug sections. - Symbols in the .debug DWARF section are relative to the beginning of the - section so we begin .debug at 0. It's not clear yet what needs to happen - for the others. */ + Symbols in the DWARF debugging sections are relative to the beginning + of the section so we begin them at 0. */ + /* DWARF 1 */ .debug 0 : { *(.debug) } + .line 0 : { *(.line) } + /* GNU DWARF 1 extensions */ .debug_srcinfo 0 : { *(.debug_srcinfo) } + .debug_sfnames 0 : { *(.debug_sfnames) } + /* DWARF 1.1 and DWARF 2 */ .debug_aranges 0 : { *(.debug_aranges) } .debug_pubnames 0 : { *(.debug_pubnames) } - .debug_sfnames 0 : { *(.debug_sfnames) } - .line 0 : { *(.line) } + /* DWARF 2 */ + .debug_info 0 : { *(.debug_info) } + .debug_abbrev 0 : { *(.debug_abbrev) } + .debug_line 0 : { *(.debug_line) } + .debug_frame 0 : { *(.debug_frame) } + .debug_str 0 : { *(.debug_str) } + .debug_loc 0 : { *(.debug_loc) } + .debug_macinfo 0 : { *(.debug_macinfo) } + /* SGI/MIPS DWARF 2 extensions */ + .debug_weaknames 0 : { *(.debug_weaknames) } + .debug_funcnames 0 : { *(.debug_funcnames) } + .debug_typenames 0 : { *(.debug_typenames) } + .debug_varnames 0 : { *(.debug_varnames) } /* These must appear regardless of . */ }
