grub2: bring back build of aros-side grub2 tools
[AROS.git] / tools / collect-aros / ldscript.h
blobd1409c3133222c661ec0571c869d45618ffdefa7
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 " .tag 0 :\n"
18 " {\n"
19 " *(.tag.*)\n"
20 " } =0x90909090\n"
21 " .text 0 :\n"
22 " {\n"
23 " *(.aros.startup)\n"
24 " *(.text)\n"
25 " *(.text.*)\n"
26 " *(.stub)\n"
27 " /* .gnu.warning sections are handled specially by elf32.em. */\n"
28 " *(.gnu.warning)\n"
29 " *(.gnu.linkonce.t.*)\n"
30 " } =0x90909090\n"
31 "\n"
32 " .rodata 0 :\n"
33 " {\n"
34 " *(.rodata)\n"
35 " *(.rodata.*)\n"
36 " *(.gnu.linkonce.r.*)\n"
37 " . = ALIGN(0x10);\n";
40 static const char LDSCRIPT_PART2[] =
41 " }\n"
42 " .rodata1 0 : { *(.rodata1) }\n"
43 "\n"
44 " /*\n"
45 " Used only on PPC.\n"
46 "\n"
47 " NOTE: these should go one after the other one, so some tricks\n"
48 " must be used in the ELF loader to satisfy that requirement\n"
49 " */\n"
50 " .sdata2 0 : { *(.sdata2) *(.sdata2.*) *(.gnu.linkonce.s2.*) }\n"
51 " .sbss2 0 : { *(.sbss2) *(.sbss2.*) *(.gnu.linkonce.sb2.*) }\n"
52 "\n"
53 " .data 0 :\n"
54 " {\n"
55 " *(.data)\n"
56 " *(.data.*)\n"
57 " *(.gnu.linkonce.d.*)\n"
58 " }\n"
59 " .data1 0 : { *(.data1) }\n"
60 " /* ARM-specific exception stuff */\n"
61 " .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) }\n"
62 " PROVIDE(__exidx_start = .);\n"
63 " .ARM.exidx : { *(.ARM.exidx* .gnu.linkonce.armexidx.*) }\n"
64 " PROVIDE(__exidx_end = .);\n"
65 " .eh_frame 0 :\n"
66 " {\n"
67 " PROVIDE(__eh_frame_start = .);\n"
68 " KEEP (*(.eh_frame))\n";
70 static const char LDSCRIPT_PART3[] =
71 " }\n"
72 " .gcc_except_table 0 : { *(.gcc_except_table) }\n"
73 "\n"
74 " /* We want the small data sections together, so single-instruction offsets\n"
75 " can access them all, and initialized data all before uninitialized, so\n"
76 " we can shorten the on-disk segment size. */\n"
77 " .sdata 0 :\n"
78 " {\n"
79 " *(.sdata)\n"
80 " *(.sdata.*)\n"
81 " *(.gnu.linkonce.s.*)\n"
82 " }\n"
83 "\n"
84 " .sbss 0 :\n"
85 " {\n"
86 " *(.sbss)\n"
87 " *(.sbss.*)\n"
88 " *(.gnu.linkonce.sb.*)\n"
89 " *(.scommon)\n"
90 " }\n"
91 "\n"
92 " .bss 0 :\n"
93 " {\n"
94 " *(.bss)\n"
95 " *(.bss.*)\n"
96 " *(.gnu.linkonce.b.*)\n"
97 " *(COMMON)\n"
98 " }\n"
99 " /DISCARD/ : { *(.note.GNU-stack) }\n";
101 static const char LDSCRIPT_PART4[] =
102 "}\n";