enable the new framebuffer resizing code.
[AROS.git] / tools / collect-aros / ldscript.h
blob27cf4f15b8bcf9380dba89114d0a02f7ac65d378
1 const static char LDSCRIPT_PART1[] =
2 "/*\n"
3 " Script for final linking of AROS executables.\n"
4 "\n"
5 " NOTE: This file is the result of a rearrangement of the built-in ld script.\n"
6 " It's AROS-specific, in that it does constructors/destructors collecting\n"
7 " and doesn't care about some sections that are not used by AROS at the moment\n"
8 " or will never be.\n"
9 "\n"
10 " It *should* be general enough to be used on many architectures.\n"
11 "*/\n"
12 "\n"
13 "FORCE_COMMON_ALLOCATION\n" \
14 "\n" \
15 "SECTIONS\n"
16 "{\n"
17 #ifdef TARGET_FORMAT_EXE
18 " .tag :\n"
19 #else
20 " .tag 0 :\n"
21 #endif
22 " {\n"
23 " *(.tag.*)\n"
24 " } =0x90909090\n"
25 #ifdef TARGET_FORMAT_EXE
26 " . = SEGMENT_START(\"text-segment\", 0x80000000);\n"
27 " .text :\n"
28 #else
29 " .text 0 :\n"
30 #endif
31 " {\n"
32 " *(.aros.startup)\n"
33 " *(.text)\n"
34 " *(.text.*)\n"
35 " *(.stub)\n"
36 " /* .gnu.warning sections are handled specially by elf32.em. */\n"
37 " *(.gnu.warning)\n"
38 " *(.gnu.linkonce.t.*)\n"
39 " } =0x90909090\n"
40 "\n"
41 #ifdef TARGET_FORMAT_EXE
42 " . = SEGMENT_START(\"rodata-segment\", . );\n"
43 " .rodata :\n"
44 #else
45 " .rodata 0 :\n"
46 #endif
47 " {\n"
48 " *(.rodata)\n"
49 " *(.rodata.*)\n"
50 " *(.gnu.linkonce.r.*)\n"
51 " . = ALIGN(0x10);\n";
54 static const char LDSCRIPT_PART2[] =
55 " }\n"
56 #ifdef TARGET_FORMAT_EXE
57 " .rodata1 : { *(.rodata1) }\n"
58 #else
59 " .rodata1 0 : { *(.rodata1) }\n"
60 #endif
61 "\n"
62 #ifdef TARGET_FORMAT_EXE
63 " . = DATA_SEGMENT_ALIGN(0x1000,0x1000);\n"
64 #endif
65 " /*\n"
66 " Used only on PPC.\n"
67 "\n"
68 " NOTE: these should go one after the other one, so some tricks\n"
69 " must be used in the ELF loader to satisfy that requirement\n"
70 " */\n"
71 #ifdef TARGET_FORMAT_EXE
72 " .sdata2 : { *(.sdata2) *(.sdata2.*) *(.gnu.linkonce.s2.*) }\n"
73 " .sbss2 : { *(.sbss2) *(.sbss2.*) *(.gnu.linkonce.sb2.*) }\n"
74 "\n"
75 " .data :\n"
76 #else
77 " .sdata2 0 : { *(.sdata2) *(.sdata2.*) *(.gnu.linkonce.s2.*) }\n"
78 " .sbss2 0 : { *(.sbss2) *(.sbss2.*) *(.gnu.linkonce.sb2.*) }\n"
79 "\n"
80 " .data 0 :\n"
81 #endif
82 " {\n"
83 " *(.data)\n"
84 " *(.data.*)\n"
85 " *(.gnu.linkonce.d.*)\n"
86 " }\n"
87 #ifdef TARGET_FORMAT_EXE
88 " .data1 : { *(.data1) }\n"
89 #else
90 " .data1 0 : { *(.data1) }\n"
91 #endif
92 " /* ARM-specific exception stuff */\n"
93 " .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) }\n"
94 " PROVIDE(__exidx_start = .);\n"
95 " .ARM.exidx : { *(.ARM.exidx* .gnu.linkonce.armexidx.*) }\n"
96 " PROVIDE(__exidx_end = .);\n"
97 #ifdef TARGET_FORMAT_EXE
98 " .eh_frame :\n"
99 #else
100 " .eh_frame 0 :\n"
101 #endif
102 " {\n"
103 " PROVIDE(__eh_frame_start = .);\n"
104 " KEEP (*(.eh_frame))\n";
106 static const char LDSCRIPT_PART3[] =
107 " }\n"
108 #ifdef TARGET_FORMAT_EXE
109 " .gcc_except_table : { *(.gcc_except_table) }\n"
110 #else
111 " .gcc_except_table 0 : { *(.gcc_except_table) }\n"
112 #endif
113 "\n"
114 " /* We want the small data sections together, so single-instruction offsets\n"
115 " can access them all, and initialized data all before uninitialized, so\n"
116 " we can shorten the on-disk segment size. */\n"
117 #ifdef TARGET_FORMAT_EXE
118 " .sdata :\n"
119 #else
120 " .sdata 0 :\n"
121 #endif
122 " {\n"
123 " *(.sdata)\n"
124 " *(.sdata.*)\n"
125 " *(.gnu.linkonce.s.*)\n"
126 " }\n"
127 "\n"
128 #ifdef TARGET_FORMAT_EXE
129 " .sbss :\n"
130 #else
131 " .sbss 0 :\n"
132 #endif
133 " {\n"
134 " *(.sbss)\n"
135 " *(.sbss.*)\n"
136 " *(.gnu.linkonce.sb.*)\n"
137 " *(.scommon)\n"
138 " }\n"
139 "\n"
140 #ifdef TARGET_FORMAT_EXE
141 " .bss :\n"
142 #else
143 " .bss 0 :\n"
144 #endif
145 " {\n"
146 " *(.bss)\n"
147 " *(.bss.*)\n"
148 " *(.gnu.linkonce.b.*)\n"
149 " *(COMMON)\n"
150 " }\n"
151 #ifdef TARGET_FORMAT_EXE
152 " . = DATA_SEGMENT_END( . ); \n"
153 #endif
154 " /DISCARD/ : { *(.note.GNU-stack) }\n";
156 static const char LDSCRIPT_PART4[] =
157 "}\n";