source: mainline/uspace/lib/c/arch/ia32/_link.ld.in@ c1f68b0

lfn serial ticket/834-toolchain-update topic/msim-upgrade topic/simplify-dev-export
Last change on this file since c1f68b0 was 584121d, checked in by jzr <zarevucky.jiri@…>, 8 years ago

Move reference to the startup object file (entry.o) out of the linker script.

The absolute path breaks reproducibility.

  • Property mode set to 100644
File size: 2.0 KB
Line 
1#ifndef SHLIB
2ENTRY(__entry)
3#endif
4
5PHDRS {
6#if defined(LOADER) || defined(DLEXE)
7 interp PT_INTERP;
8 text PT_LOAD FILEHDR PHDRS FLAGS(5);
9#else
10 text PT_LOAD FLAGS(5);
11#endif
12 data PT_LOAD FLAGS(6);
13 tls PT_TLS;
14#if defined(SHLIB) || defined(DLEXE)
15 dynamic PT_DYNAMIC;
16#endif
17 debug PT_NOTE;
18}
19
20SECTIONS {
21#ifdef LOADER
22 . = 0x70001000 + SIZEOF_HEADERS;
23#else
24 . = 0x1000 + SIZEOF_HEADERS;
25#endif
26
27 .init : {
28 *(.init);
29 } :text
30
31 .text : {
32 *(.text .text.*);
33 *(.rodata .rodata.*);
34 } :text
35
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
55
56 .dynstr : {
57 *(.dynstr);
58 } :text
59
60 .hash : {
61 *(.hash);
62 } :text
63#endif
64
65#if defined(LOADER) || defined(DLEXE)
66 .interp : {
67 *(.interp);
68 } :interp :text
69#endif
70
71 . = . + 0x1000;
72
73#if defined(SHLIB) || defined(DLEXE)
74 .dynamic : {
75 *(.dynamic);
76 } :data :dynamic
77#endif
78
79 .data : {
80 *(.data);
81 } :data
82
83#if defined(SHLIB) || defined(DLEXE)
84 .data.rel : {
85 *(.data.rel .data.rel.*);
86 } :data
87
88 .got : {
89 *(.got);
90 } :data
91
92 .got.plt : {
93 *(.got.plt);
94 } :data
95#endif
96
97 .tdata : {
98 _tdata_start = .;
99 *(.tdata);
100 *(.gnu.linkonce.tb.*);
101 _tdata_end = .;
102 } :data :tls
103 .tbss : {
104 _tbss_start = .;
105 *(.tbss);
106 _tbss_end = .;
107 } :data :tls
108
109 _tls_alignment = MAX(ALIGNOF(.tdata), ALIGNOF(.tbss));
110
111 .bss : {
112 *(.dynbss);
113 *(COMMON);
114 *(.bss);
115 } :data
116
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
130 /DISCARD/ : {
131 *(*);
132 }
133}
Note: See TracBrowser for help on using the repository browser.