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

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

Revert "Don't use custom ldscripts in uspace. (#38)"

This reverts commit a05ec6671002c451fceb01aa0ab3f71f004efb6d.

Needs more work.

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