source:
mainline/uspace/lib/c/arch/ia32/_link.ld.in@
671b546
| Last change on this file since 671b546 was 0783634, checked in by , 13 years ago | |
|---|---|
|
|
| File size: 2.0 KB | |
| Rev | Line | |
|---|---|---|
| [729f774f] | 1 | #ifndef SHLIB |
| [1b1164e8] | 2 | STARTUP(LIBC_PATH/arch/UARCH/src/entry.o) |
| [3eddaff] | 3 | ENTRY(__entry) |
| [729f774f] | 4 | #endif |
| [3eddaff] | 5 | |
| [d03e156] | 6 | PHDRS { |
| [54146a0] | 7 | #if defined(LOADER) || defined(DLEXE) |
| [c53d906] | 8 | interp PT_INTERP; |
| 9 | text PT_LOAD FILEHDR PHDRS FLAGS(5); | |
| 10 | #else | |
| [f563126] | 11 | text PT_LOAD FLAGS(5); |
| [c53d906] | 12 | #endif |
| [a3aa1e1] | 13 | data PT_LOAD FLAGS(6); |
| [729f774f] | 14 | #if defined(SHLIB) || defined(DLEXE) |
| 15 | dynamic PT_DYNAMIC; | |
| 16 | #endif | |
| [1e00216] | 17 | debug PT_NOTE; |
| [d03e156] | 18 | } |
| 19 | ||
| [3eddaff] | 20 | SECTIONS { |
| [729f774f] | 21 | #ifdef LOADER |
| [c53d906] | 22 | . = 0x70001000 + SIZEOF_HEADERS; |
| 23 | #else | |
| [1cc2974] | 24 | . = 0x1000 + SIZEOF_HEADERS; |
| [c53d906] | 25 | #endif |
| [e1c0260] | 26 | |
| [1cc2974] | 27 | .init : { |
| [a3aa1e1] | 28 | *(.init); |
| 29 | } :text | |
| [f563126] | 30 | |
| [a3aa1e1] | 31 | .text : { |
| [c81e5e0] | 32 | *(.text .text.*); |
| 33 | *(.rodata .rodata.*); | |
| [a3aa1e1] | 34 | } :text |
| [9bcdbc5] | 35 | |
| [729f774f] | 36 | #if defined(SHLIB) || defined(DLEXE) |
| 37 | .rel.plt : { | |
| 38 | *(.rel.plt); | |
| 39 | } | |
| 40 | /* | |
| 41 | *.rel.dyn MUST FOLLOW IMMEDIATELY after .rel.plt | |
| 42 | * without alignment gap or DT_REL will be broken | |
| 43 | */ | |
| 44 | .rel.dyn : { | |
| 45 | *(.rel.*); | |
| 46 | } :text | |
| 47 | ||
| 48 | .plt : { | |
| 49 | *(.plt); | |
| 50 | } :text | |
| 51 | ||
| 52 | .dynsym : { | |
| 53 | *(.dynsym); | |
| 54 | } :text | |
| [f563126] | 55 | |
| [729f774f] | 56 | .dynstr : { |
| 57 | *(.dynstr); | |
| 58 | } :text | |
| [54146a0] | 59 | |
| 60 | .hash : { | |
| 61 | *(.hash); | |
| 62 | } :text | |
| [729f774f] | 63 | #endif |
| [0783634] | 64 | |
| 65 | #if defined(LOADER) || defined(DLEXE) | |
| 66 | .interp : { | |
| 67 | *(.interp); | |
| 68 | } :interp :text | |
| 69 | #endif | |
| 70 | ||
| [1cc2974] | 71 | . = . + 0x1000; |
| [f563126] | 72 | |
| [729f774f] | 73 | #if defined(SHLIB) || defined(DLEXE) |
| 74 | .dynamic : { | |
| 75 | *(.dynamic); | |
| 76 | } :data :dynamic | |
| 77 | #endif | |
| 78 | ||
| [1cc2974] | 79 | .data : { |
| [a3aa1e1] | 80 | *(.data); |
| 81 | } :data | |
| [f563126] | 82 | |
| [729f774f] | 83 | #if defined(SHLIB) || defined(DLEXE) |
| 84 | .data.rel : { | |
| [9bcdbc5] | 85 | *(.data.rel .data.rel.*); |
| [729f774f] | 86 | } :data |
| [9bcdbc5] | 87 | |
| [729f774f] | 88 | .got : { |
| [9bcdbc5] | 89 | *(.got); |
| [729f774f] | 90 | } :data |
| [9bcdbc5] | 91 | |
| [729f774f] | 92 | .got.plt : { |
| [9bcdbc5] | 93 | *(.got.plt); |
| [729f774f] | 94 | } :data |
| 95 | #endif | |
| 96 | ||
| 97 | #ifndef DLEXE | |
| [c4c5de5] | 98 | .tdata : { |
| 99 | _tdata_start = .; | |
| 100 | *(.tdata); | |
| [f563126] | 101 | *(.gnu.linkonce.tb.*); |
| [c4c5de5] | 102 | _tdata_end = .; |
| 103 | _tbss_start = .; | |
| 104 | *(.tbss); | |
| 105 | _tbss_end = .; | |
| 106 | } :data | |
| [f563126] | 107 | |
| [e622f0a8] | 108 | _tls_alignment = ALIGNOF(.tdata); |
| [729f774f] | 109 | #endif |
| [f563126] | 110 | |
| [a3aa1e1] | 111 | .bss : { |
| [54146a0] | 112 | *(.dynbss); |
| [f563126] | 113 | *(COMMON); |
| 114 | *(.bss); | |
| [a3aa1e1] | 115 | } :data |
| [d03e156] | 116 | |
| [1e00216] | 117 | #ifdef CONFIG_LINE_DEBUG |
| 118 | .comment 0 : { *(.comment); } :debug | |
| 119 | .debug_abbrev 0 : { *(.debug_abbrev); } :debug | |
| 120 | .debug_aranges 0 : { *(.debug_aranges); } :debug | |
| 121 | .debug_info 0 : { *(.debug_info); } :debug | |
| 122 | .debug_line 0 : { *(.debug_line); } :debug | |
| 123 | .debug_loc 0 : { *(.debug_loc); } :debug | |
| 124 | .debug_pubnames 0 : { *(.debug_pubnames); } :debug | |
| 125 | .debug_pubtypes 0 : { *(.debug_pubtypes); } :debug | |
| 126 | .debug_ranges 0 : { *(.debug_ranges); } :debug | |
| 127 | .debug_str 0 : { *(.debug_str); } :debug | |
| 128 | #endif | |
| 129 | ||
| [d03e156] | 130 | /DISCARD/ : { |
| [a3aa1e1] | 131 | *(*); |
| [d03e156] | 132 | } |
| [3eddaff] | 133 | } |
Note:
See TracBrowser
for help on using the repository browser.
