Mercurial > hg > xemacs-beta
comparison 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 |
comparison
equal
deleted
inserted
replaced
| 275:a68ae4439f57 | 276:6330739388db |
|---|---|
| 1 OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc", | 1 OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc", |
| 2 "elf32-powerpc") | 2 "elf32-powerpc") |
| 3 OUTPUT_ARCH(powerpc) | 3 OUTPUT_ARCH(powerpc) |
| 4 ENTRY(_start) | 4 ENTRY(_start) |
| 5 SEARCH_DIR(/lib); SEARCH_DIR(/usr/lib); SEARCH_DIR(/usr/local/lib); SEARCH_DIR(/usr/ppc-linux-elf/lib); | 5 SEARCH_DIR(/lib); SEARCH_DIR(/usr/lib); SEARCH_DIR(/usr/local/lib); SEARCH_DIR(/usr/powerpc-unknown-linux-gnulibc1/lib); |
| 6 /* Do we need any of these for elf? | 6 /* Do we need any of these for elf? |
| 7 __DYNAMIC = 0; */ | 7 __DYNAMIC = 0; */ |
| 8 PROVIDE (__stack = 0); | 8 PROVIDE (__stack = 0); |
| 9 SECTIONS | 9 SECTIONS |
| 10 { | 10 { |
| 11 /* Read-only sections, merged into text segment: */ | 11 /* Read-only sections, merged into text segment: */ |
| 12 . = 0x200000 + SIZEOF_HEADERS; | 12 . = 0x01800000 + SIZEOF_HEADERS; |
| 13 .interp : { *(.interp) } | 13 .interp : { *(.interp) } |
| 14 .hash : { *(.hash) } | 14 .hash : { *(.hash) } |
| 15 .dynsym : { *(.dynsym) } | 15 .dynsym : { *(.dynsym) } |
| 16 .dynstr : { *(.dynstr) } | 16 .dynstr : { *(.dynstr) } |
| 17 .rela.text : { *(.rela.text) } | 17 .gnu.version : { *(.gnu.version) } |
| 18 .rela.data : { *(.rela.data) } | 18 .gnu.version_d : { *(.gnu.version_d) } |
| 19 .rela.rodata : { *(.rela.rodata) } | 19 .gnu.version_r : { *(.gnu.version_r) } |
| 20 .rela.text : | |
| 21 { *(.rela.text) *(.rela.gnu.linkonce.t*) } | |
| 22 .rela.data : | |
| 23 { *(.rela.data) *(.rela.gnu.linkonce.d*) } | |
| 24 .rela.rodata : | |
| 25 { *(.rela.rodata) *(.rela.gnu.linkonce.r*) } | |
| 20 .rela.got : { *(.rela.got) } | 26 .rela.got : { *(.rela.got) } |
| 21 .rela.got1 : { *(.rela.got1) } | 27 .rela.got1 : { *(.rela.got1) } |
| 22 .rela.got2 : { *(.rela.got2) } | 28 .rela.got2 : { *(.rela.got2) } |
| 23 .rela.ctors : { *(.rela.ctors) } | 29 .rela.ctors : { *(.rela.ctors) } |
| 24 .rela.dtors : { *(.rela.dtors) } | 30 .rela.dtors : { *(.rela.dtors) } |
| 25 .rela.init : { *(.rela.init) } | 31 .rela.init : { *(.rela.init) } |
| 26 .rela.fini : { *(.rela.fini) } | 32 .rela.fini : { *(.rela.fini) } |
| 27 .rela.bss : { *(.rela.bss) } | 33 .rela.bss : { *(.rela.bss) } |
| 28 .rela.plt : { *(.rela.plt) } | 34 .rela.plt : { *(.rela.plt) } |
| 29 .rela.sdata : { *(.rela.sdata2) } | 35 .rela.sdata : { *(.rela.sdata) } |
| 30 .rela.sbss : { *(.rela.sbss2) } | 36 .rela.sbss : { *(.rela.sbss) } |
| 31 .rela.sdata2 : { *(.rela.sdata2) } | 37 .rela.sdata2 : { *(.rela.sdata2) } |
| 32 .rela.sbss2 : { *(.rela.sbss2) } | 38 .rela.sbss2 : { *(.rela.sbss2) } |
| 33 .text : | 39 .text : |
| 34 { | 40 { |
| 35 *(.text) | 41 *(.text) |
| 36 /* .gnu.warning sections are handled specially by elf32.em. */ | 42 /* .gnu.warning sections are handled specially by elf32.em. */ |
| 37 *(.gnu.warning) | 43 *(.gnu.warning) |
| 44 *(.gnu.linkonce.t*) | |
| 38 } =0 | 45 } =0 |
| 39 .init : { *(.init) } =0 | 46 .init : { *(.init) } =0 |
| 40 .fini : { *(.fini) } =0 | 47 .fini : { *(.fini) } =0 |
| 41 .rodata : { *(.rodata) } | 48 .rodata : { *(.rodata) *(.gnu.linkonce.r*) } |
| 42 .rodata1 : { *(.rodata1) } | 49 .rodata1 : { *(.rodata1) } |
| 43 _etext = .; | 50 _etext = .; |
| 44 PROVIDE (etext = .); | 51 PROVIDE (etext = .); |
| 45 .sdata2 : { *(.sdata2) } | 52 .sdata2 : { *(.sdata2) } |
| 46 .sbss2 : { *(.sbss2) } | 53 .sbss2 : { *(.sbss2) } |
| 47 /* Adjust the address for the data segment. We want to adjust up to | 54 /* Adjust the address for the data segment. We want to adjust up to |
| 48 the same address within the page on the next page up. It would | 55 the same address within the page on the next page up. It would |
| 49 be more correct to do this: | 56 be more correct to do this: |
| 50 . = ALIGN(0x40000) + (ALIGN(8) & (0x40000 - 1)); | 57 . = .; |
| 51 The current expression does not correctly handle the case of a | 58 The current expression does not correctly handle the case of a |
| 52 text segment ending precisely at the end of a page; it causes the | 59 text segment ending precisely at the end of a page; it causes the |
| 53 data segment to skip a page. The above expression does not have | 60 data segment to skip a page. The above expression does not have |
| 54 this problem, but it will currently (2/95) cause BFD to allocate | 61 this problem, but it will currently (2/95) cause BFD to allocate |
| 55 a single segment, combining both text and data, for this case. | 62 a single segment, combining both text and data, for this case. |
| 56 This will prevent the text segment from being shared among | 63 This will prevent the text segment from being shared among |
| 57 multiple executions of the program; I think that is more | 64 multiple executions of the program; I think that is more |
| 58 important than losing a page of the virtual address space (note | 65 important than losing a page of the virtual address space (note |
| 59 that no actual memory is lost; the page which is skipped can not | 66 that no actual memory is lost; the page which is skipped can not |
| 60 be referenced). */ | 67 be referenced). */ |
| 61 . = ALIGN(8) + 0x40000; | 68 . = .; |
| 62 .data : | 69 .data : |
| 63 { | 70 { |
| 64 *(.data) | 71 *(.data) |
| 72 *(.gnu.linkonce.d*) | |
| 65 CONSTRUCTORS | 73 CONSTRUCTORS |
| 66 } | 74 } |
| 67 .data1 : { *(.data1) } | 75 .data1 : { *(.data1) } |
| 68 .got1 : { *(.got1) } | 76 .got1 : { *(.got1) } |
| 69 .plt : { *(.plt) } | |
| 70 .dynamic : { *(.dynamic) } | 77 .dynamic : { *(.dynamic) } |
| 71 /* Put .ctors and .dtors next to the .got2 section, so that the pointers | 78 /* Put .ctors and .dtors next to the .got2 section, so that the pointers |
| 72 get relocated with -mrelocatable. Also put in the .fixup pointers. | 79 get relocated with -mrelocatable. Also put in the .fixup pointers. |
| 73 The current compiler no longer needs this, but keep it around for 2.7.2 */ | 80 The current compiler no longer needs this, but keep it around for 2.7.2 */ |
| 74 PROVIDE (_GOT2_START_ = .); | 81 PROVIDE (_GOT2_START_ = .); |
| 96 .sbss : | 103 .sbss : |
| 97 { | 104 { |
| 98 } | 105 } |
| 99 .bss : | 106 .bss : |
| 100 { | 107 { |
| 101 PROVIDE (__sbss_start = .); | 108 PROVIDE (__sbss_start = .); |
| 102 *(.sbss) | 109 *(.sbss) |
| 103 *(.scommon) | 110 *(.scommon) |
| 104 PROVIDE (__sbss_end = .); | 111 PROVIDE (__sbss_end = .); |
| 105 PROVIDE (__bss_start = .); | 112 PROVIDE (__bss_start = .); |
| 106 *(.dynbss) | 113 *(.dynbss) |
| 107 *(.bss) | 114 *(.bss) |
| 108 *(COMMON) | 115 *(COMMON) |
| 109 } | 116 } |
| 110 _end = . ; | 117 _end = . ; |
| 112 /* These are needed for ELF backends which have not yet been | 119 /* These are needed for ELF backends which have not yet been |
| 113 converted to the new style linker. */ | 120 converted to the new style linker. */ |
| 114 .stab 0 : { *(.stab) } | 121 .stab 0 : { *(.stab) } |
| 115 .stabstr 0 : { *(.stabstr) } | 122 .stabstr 0 : { *(.stabstr) } |
| 116 /* DWARF debug sections. | 123 /* DWARF debug sections. |
| 117 Symbols in the .debug DWARF section are relative to the beginning of the | 124 Symbols in the DWARF debugging sections are relative to the beginning |
| 118 section so we begin .debug at 0. It's not clear yet what needs to happen | 125 of the section so we begin them at 0. */ |
| 119 for the others. */ | 126 /* DWARF 1 */ |
| 120 .debug 0 : { *(.debug) } | 127 .debug 0 : { *(.debug) } |
| 128 .line 0 : { *(.line) } | |
| 129 /* GNU DWARF 1 extensions */ | |
| 121 .debug_srcinfo 0 : { *(.debug_srcinfo) } | 130 .debug_srcinfo 0 : { *(.debug_srcinfo) } |
| 131 .debug_sfnames 0 : { *(.debug_sfnames) } | |
| 132 /* DWARF 1.1 and DWARF 2 */ | |
| 122 .debug_aranges 0 : { *(.debug_aranges) } | 133 .debug_aranges 0 : { *(.debug_aranges) } |
| 123 .debug_pubnames 0 : { *(.debug_pubnames) } | 134 .debug_pubnames 0 : { *(.debug_pubnames) } |
| 124 .debug_sfnames 0 : { *(.debug_sfnames) } | 135 /* DWARF 2 */ |
| 125 .line 0 : { *(.line) } | 136 .debug_info 0 : { *(.debug_info) } |
| 137 .debug_abbrev 0 : { *(.debug_abbrev) } | |
| 138 .debug_line 0 : { *(.debug_line) } | |
| 139 .debug_frame 0 : { *(.debug_frame) } | |
| 140 .debug_str 0 : { *(.debug_str) } | |
| 141 .debug_loc 0 : { *(.debug_loc) } | |
| 142 .debug_macinfo 0 : { *(.debug_macinfo) } | |
| 143 /* SGI/MIPS DWARF 2 extensions */ | |
| 144 .debug_weaknames 0 : { *(.debug_weaknames) } | |
| 145 .debug_funcnames 0 : { *(.debug_funcnames) } | |
| 146 .debug_typenames 0 : { *(.debug_typenames) } | |
| 147 .debug_varnames 0 : { *(.debug_varnames) } | |
| 126 /* These must appear regardless of . */ | 148 /* These must appear regardless of . */ |
| 127 } | 149 } |
