Mercurial > hg > xemacs-beta
comparison src/ppc.ldscript @ 247:e70b3a057e12 r20-5b22
Import from CVS: tag r20-5b22
| author | cvs |
|---|---|
| date | Mon, 13 Aug 2007 10:18:21 +0200 |
| parents | |
| children | 6330739388db |
comparison
equal
deleted
inserted
replaced
| 246:cf2a77a48c1c | 247:e70b3a057e12 |
|---|---|
| 1 OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc", | |
| 2 "elf32-powerpc") | |
| 3 OUTPUT_ARCH(powerpc) | |
| 4 ENTRY(_start) | |
| 5 SEARCH_DIR(/lib); SEARCH_DIR(/usr/lib); SEARCH_DIR(/usr/local/lib); SEARCH_DIR(/usr/ppc-linux-elf/lib); | |
| 6 /* Do we need any of these for elf? | |
| 7 __DYNAMIC = 0; */ | |
| 8 PROVIDE (__stack = 0); | |
| 9 SECTIONS | |
| 10 { | |
| 11 /* Read-only sections, merged into text segment: */ | |
| 12 . = 0x200000 + SIZEOF_HEADERS; | |
| 13 .interp : { *(.interp) } | |
| 14 .hash : { *(.hash) } | |
| 15 .dynsym : { *(.dynsym) } | |
| 16 .dynstr : { *(.dynstr) } | |
| 17 .rela.text : { *(.rela.text) } | |
| 18 .rela.data : { *(.rela.data) } | |
| 19 .rela.rodata : { *(.rela.rodata) } | |
| 20 .rela.got : { *(.rela.got) } | |
| 21 .rela.got1 : { *(.rela.got1) } | |
| 22 .rela.got2 : { *(.rela.got2) } | |
| 23 .rela.ctors : { *(.rela.ctors) } | |
| 24 .rela.dtors : { *(.rela.dtors) } | |
| 25 .rela.init : { *(.rela.init) } | |
| 26 .rela.fini : { *(.rela.fini) } | |
| 27 .rela.bss : { *(.rela.bss) } | |
| 28 .rela.plt : { *(.rela.plt) } | |
| 29 .rela.sdata : { *(.rela.sdata2) } | |
| 30 .rela.sbss : { *(.rela.sbss2) } | |
| 31 .rela.sdata2 : { *(.rela.sdata2) } | |
| 32 .rela.sbss2 : { *(.rela.sbss2) } | |
| 33 .text : | |
| 34 { | |
| 35 *(.text) | |
| 36 /* .gnu.warning sections are handled specially by elf32.em. */ | |
| 37 *(.gnu.warning) | |
| 38 } =0 | |
| 39 .init : { *(.init) } =0 | |
| 40 .fini : { *(.fini) } =0 | |
| 41 .rodata : { *(.rodata) } | |
| 42 .rodata1 : { *(.rodata1) } | |
| 43 _etext = .; | |
| 44 PROVIDE (etext = .); | |
| 45 .sdata2 : { *(.sdata2) } | |
| 46 .sbss2 : { *(.sbss2) } | |
| 47 /* 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 | |
| 49 be more correct to do this: | |
| 50 . = ALIGN(0x40000) + (ALIGN(8) & (0x40000 - 1)); | |
| 51 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 | |
| 53 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 | |
| 55 a single segment, combining both text and data, for this case. | |
| 56 This will prevent the text segment from being shared among | |
| 57 multiple executions of the program; I think that is more | |
| 58 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 | |
| 60 be referenced). */ | |
| 61 . = ALIGN(8) + 0x40000; | |
| 62 .data : | |
| 63 { | |
| 64 *(.data) | |
| 65 CONSTRUCTORS | |
| 66 } | |
| 67 .data1 : { *(.data1) } | |
| 68 .got1 : { *(.got1) } | |
| 69 .plt : { *(.plt) } | |
| 70 .dynamic : { *(.dynamic) } | |
| 71 /* Put .ctors and .dtors next to the .got2 section, so that the pointers | |
| 72 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 */ | |
| 74 PROVIDE (_GOT2_START_ = .); | |
| 75 .got2 : { *(.got2) } | |
| 76 PROVIDE (__CTOR_LIST__ = .); | |
| 77 .ctors : { *(.ctors) } | |
| 78 PROVIDE (__CTOR_END__ = .); | |
| 79 PROVIDE (__DTOR_LIST__ = .); | |
| 80 .dtors : { *(.dtors) } | |
| 81 PROVIDE (__DTOR_END__ = .); | |
| 82 PROVIDE (_FIXUP_START_ = .); | |
| 83 .fixup : { *(.fixup) } | |
| 84 PROVIDE (_FIXUP_END_ = .); | |
| 85 PROVIDE (_GOT2_END_ = .); | |
| 86 PROVIDE (_GOT_START_ = .); | |
| 87 .got : { *(.got) } | |
| 88 .got.plt : { *(.got.plt) } | |
| 89 PROVIDE (_GOT_END_ = .); | |
| 90 /* We want the small data sections together, so single-instruction offsets | |
| 91 can access them all, and initialized data all before uninitialized, so | |
| 92 we can shorten the on-disk segment size. */ | |
| 93 .sdata : { *(.sdata) } | |
| 94 _edata = .; | |
| 95 PROVIDE (edata = .); | |
| 96 .sbss : | |
| 97 { | |
| 98 } | |
| 99 .bss : | |
| 100 { | |
| 101 PROVIDE (__sbss_start = .); | |
| 102 *(.sbss) | |
| 103 *(.scommon) | |
| 104 PROVIDE (__sbss_end = .); | |
| 105 PROVIDE (__bss_start = .); | |
| 106 *(.dynbss) | |
| 107 *(.bss) | |
| 108 *(COMMON) | |
| 109 } | |
| 110 _end = . ; | |
| 111 PROVIDE (end = .); | |
| 112 /* These are needed for ELF backends which have not yet been | |
| 113 converted to the new style linker. */ | |
| 114 .stab 0 : { *(.stab) } | |
| 115 .stabstr 0 : { *(.stabstr) } | |
| 116 /* DWARF debug sections. | |
| 117 Symbols in the .debug DWARF section are relative to the beginning of the | |
| 118 section so we begin .debug at 0. It's not clear yet what needs to happen | |
| 119 for the others. */ | |
| 120 .debug 0 : { *(.debug) } | |
| 121 .debug_srcinfo 0 : { *(.debug_srcinfo) } | |
| 122 .debug_aranges 0 : { *(.debug_aranges) } | |
| 123 .debug_pubnames 0 : { *(.debug_pubnames) } | |
| 124 .debug_sfnames 0 : { *(.debug_sfnames) } | |
| 125 .line 0 : { *(.line) } | |
| 126 /* These must appear regardless of . */ | |
| 127 } |
