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