lfn
serial
ticket/834-toolchain-update
topic/msim-upgrade
topic/simplify-dev-export
Last change
on this file since 7cfe5c0 was 9bcdbc5, checked in by Martin Decky <martin@…>, 13 years ago |
make sure the code in .init is always aligned reasonably
(despite .interp section being also present in the text segment)
|
-
Property mode
set to
100644
|
File size:
2.1 KB
|
Line | |
---|
1 | #ifndef SHLIB
|
---|
2 | STARTUP(LIBC_PATH/arch/UARCH/src/entry.o)
|
---|
3 | ENTRY(__entry)
|
---|
4 | #endif
|
---|
5 |
|
---|
6 | PHDRS {
|
---|
7 | #if defined(LOADER) || defined(DLEXE)
|
---|
8 | interp PT_INTERP;
|
---|
9 | text PT_LOAD FILEHDR PHDRS FLAGS(5);
|
---|
10 | #else
|
---|
11 | text PT_LOAD FLAGS(5);
|
---|
12 | #endif
|
---|
13 | data PT_LOAD FLAGS(6);
|
---|
14 | #if defined(SHLIB) || defined(DLEXE)
|
---|
15 | dynamic PT_DYNAMIC;
|
---|
16 | #endif
|
---|
17 | debug PT_NOTE;
|
---|
18 | }
|
---|
19 |
|
---|
20 | SECTIONS {
|
---|
21 | #ifdef LOADER
|
---|
22 | . = 0x70001000 + SIZEOF_HEADERS;
|
---|
23 | #else
|
---|
24 | . = 0x1000 + SIZEOF_HEADERS;
|
---|
25 | #endif
|
---|
26 |
|
---|
27 | #if defined(LOADER) || defined(DLEXE)
|
---|
28 | .interp : {
|
---|
29 | *(.interp);
|
---|
30 | } :interp :text
|
---|
31 | #endif
|
---|
32 |
|
---|
33 | /* Make sure the code is aligned reasonably */
|
---|
34 | . = ALIGN(., 16);
|
---|
35 |
|
---|
36 | .init : {
|
---|
37 | *(.init);
|
---|
38 | } :text
|
---|
39 |
|
---|
40 | .text : {
|
---|
41 | *(.text .text.*);
|
---|
42 | *(.rodata .rodata.*);
|
---|
43 | } :text
|
---|
44 |
|
---|
45 | #if defined(SHLIB) || defined(DLEXE)
|
---|
46 | .rel.plt : {
|
---|
47 | *(.rel.plt);
|
---|
48 | }
|
---|
49 | /*
|
---|
50 | *.rel.dyn MUST FOLLOW IMMEDIATELY after .rel.plt
|
---|
51 | * without alignment gap or DT_REL will be broken
|
---|
52 | */
|
---|
53 | .rel.dyn : {
|
---|
54 | *(.rel.*);
|
---|
55 | } :text
|
---|
56 |
|
---|
57 | .plt : {
|
---|
58 | *(.plt);
|
---|
59 | } :text
|
---|
60 |
|
---|
61 | .dynsym : {
|
---|
62 | *(.dynsym);
|
---|
63 | } :text
|
---|
64 |
|
---|
65 | .dynstr : {
|
---|
66 | *(.dynstr);
|
---|
67 | } :text
|
---|
68 |
|
---|
69 | .hash : {
|
---|
70 | *(.hash);
|
---|
71 | } :text
|
---|
72 | #endif
|
---|
73 | . = . + 0x1000;
|
---|
74 |
|
---|
75 | #if defined(SHLIB) || defined(DLEXE)
|
---|
76 | .dynamic : {
|
---|
77 | *(.dynamic);
|
---|
78 | } :data :dynamic
|
---|
79 | #endif
|
---|
80 |
|
---|
81 | .data : {
|
---|
82 | *(.data);
|
---|
83 | } :data
|
---|
84 |
|
---|
85 | #if defined(SHLIB) || defined(DLEXE)
|
---|
86 | .data.rel : {
|
---|
87 | *(.data.rel .data.rel.*);
|
---|
88 | } :data
|
---|
89 |
|
---|
90 | .got : {
|
---|
91 | *(.got);
|
---|
92 | } :data
|
---|
93 |
|
---|
94 | .got.plt : {
|
---|
95 | *(.got.plt);
|
---|
96 | } :data
|
---|
97 | #endif
|
---|
98 |
|
---|
99 | #ifndef DLEXE
|
---|
100 | .tdata : {
|
---|
101 | _tdata_start = .;
|
---|
102 | *(.tdata);
|
---|
103 | *(.gnu.linkonce.tb.*);
|
---|
104 | _tdata_end = .;
|
---|
105 | _tbss_start = .;
|
---|
106 | *(.tbss);
|
---|
107 | _tbss_end = .;
|
---|
108 | } :data
|
---|
109 |
|
---|
110 | _tls_alignment = ALIGNOF(.tdata);
|
---|
111 | #endif
|
---|
112 |
|
---|
113 | .bss : {
|
---|
114 | *(.dynbss);
|
---|
115 | *(COMMON);
|
---|
116 | *(.bss);
|
---|
117 | } :data
|
---|
118 |
|
---|
119 | #ifdef CONFIG_LINE_DEBUG
|
---|
120 | .comment 0 : { *(.comment); } :debug
|
---|
121 | .debug_abbrev 0 : { *(.debug_abbrev); } :debug
|
---|
122 | .debug_aranges 0 : { *(.debug_aranges); } :debug
|
---|
123 | .debug_info 0 : { *(.debug_info); } :debug
|
---|
124 | .debug_line 0 : { *(.debug_line); } :debug
|
---|
125 | .debug_loc 0 : { *(.debug_loc); } :debug
|
---|
126 | .debug_pubnames 0 : { *(.debug_pubnames); } :debug
|
---|
127 | .debug_pubtypes 0 : { *(.debug_pubtypes); } :debug
|
---|
128 | .debug_ranges 0 : { *(.debug_ranges); } :debug
|
---|
129 | .debug_str 0 : { *(.debug_str); } :debug
|
---|
130 | #endif
|
---|
131 |
|
---|
132 | /DISCARD/ : {
|
---|
133 | *(*);
|
---|
134 | }
|
---|
135 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.