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

lfn serial ticket/834-toolchain-update topic/msim-upgrade topic/simplify-dev-export
Last change on this file since 3fafe5e0 was a69d42e, checked in by Jiří Zárevúcky <jiri.zarevucky@…>, 7 years ago

Define _end, and use it instead of the address of __entry in C code.

  • Property mode set to 100644
File size: 2.0 KB
Line 
1#ifndef SHLIB
2STARTUP(LIBC_PATH/arch/UARCH/src/entry.o)
3ENTRY(__entry)
4#endif
5
6PHDRS {
7#if defined(DLEXE)
8 interp PT_INTERP;
9#endif
10 text PT_LOAD FILEHDR PHDRS FLAGS(5);
11 data PT_LOAD FLAGS(6);
12 tls PT_TLS;
13#if defined(SHLIB) || defined(DLEXE)
14 dynamic PT_DYNAMIC;
15#endif
16 debug PT_NOTE;
17}
18
19SECTIONS {
20 . = SEGMENT_START("text-segment", 0x400000);
21#ifndef SHLIB
22 PROVIDE (__executable_start = .);
23#endif
24 . = . + SIZEOF_HEADERS;
25
26 .init : {
27 *(.init);
28 } :text
29
30 .text : {
31 *(.text .text.*);
32 *(.rodata .rodata.*);
33 } :text
34
35#if defined(SHLIB) || defined(DLEXE)
36 .rel.plt : {
37 *(.rel.plt);
38 }
39 /*
40 *.rel.dyn MUST FOLLOW IMMEDIATELY after .rel.plt
41 * without alignment gap or DT_REL will be broken
42 */
43 .rel.dyn : {
44 *(.rel.*);
45 } :text
46
47 .plt : {
48 *(.plt);
49 } :text
50
51 .dynsym : {
52 *(.dynsym);
53 } :text
54
55 .dynstr : {
56 *(.dynstr);
57 } :text
58
59 .hash : {
60 *(.hash .gnu.hash);
61 } :text
62#endif
63
64#if defined(DLEXE)
65 .interp : {
66 *(.interp);
67 } :interp :text
68#endif
69
70 . = . + 0x1000;
71
72#if defined(SHLIB) || defined(DLEXE)
73 .dynamic : {
74 *(.dynamic);
75 } :data :dynamic
76#endif
77
78 .data : {
79 *(.data);
80 } :data
81
82#if defined(SHLIB) || defined(DLEXE)
83 .data.rel : {
84 *(.data.rel .data.rel.*);
85 } :data
86
87 .got : {
88 *(.got);
89 } :data
90#endif
91
92 .got.plt : {
93 *(.got.plt);
94 } :data
95
96 .tdata : {
97 *(.tdata);
98 *(.tdata.*);
99 *(.gnu.linkonce.td.*);
100 } :data :tls
101
102 .tbss : {
103 *(.tbss);
104 *(.tbss.*);
105 *(.gnu.linkonce.tb.*);
106 } :data :tls
107
108 .bss : {
109 *(.dynbss);
110 *(COMMON);
111 *(.bss);
112 } :data
113
114 _end = .;
115
116#ifdef CONFIG_LINE_DEBUG
117 .comment 0 : { *(.comment); } :debug
118 .debug_abbrev 0 : { *(.debug_abbrev); } :debug
119 .debug_aranges 0 : { *(.debug_aranges); } :debug
120 .debug_info 0 : { *(.debug_info); } :debug
121 .debug_line 0 : { *(.debug_line); } :debug
122 .debug_loc 0 : { *(.debug_loc); } :debug
123 .debug_pubnames 0 : { *(.debug_pubnames); } :debug
124 .debug_pubtypes 0 : { *(.debug_pubtypes); } :debug
125 .debug_ranges 0 : { *(.debug_ranges); } :debug
126 .debug_str 0 : { *(.debug_str); } :debug
127#endif
128
129 /DISCARD/ : {
130 *(*);
131 }
132}
Note: See TracBrowser for help on using the repository browser.