1 const static char LDSCRIPT_PART1
[] =
3 " Script for final linking of AROS executables.\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"
10 " It *should* be general enough to be used on many architectures.\n"
13 "FORCE_COMMON_ALLOCATION\n" \
17 #ifdef TARGET_FORMAT_EXE
25 #ifdef TARGET_FORMAT_EXE
26 " . = SEGMENT_START(\"text-segment\", 0x80000000);\n"
36 " /* .gnu.warning sections are handled specially by elf32.em. */\n"
38 " *(.gnu.linkonce.t.*)\n"
41 #ifdef TARGET_FORMAT_EXE
42 " . = SEGMENT_START(\"rodata-segment\", . );\n"
50 " *(.gnu.linkonce.r.*)\n"
51 " . = ALIGN(0x10);\n";
54 static const char LDSCRIPT_PART2
[] =
56 #ifdef TARGET_FORMAT_EXE
57 " .rodata1 : { *(.rodata1) }\n"
59 " .rodata1 0 : { *(.rodata1) }\n"
62 #ifdef TARGET_FORMAT_EXE
63 " . = DATA_SEGMENT_ALIGN(0x1000,0x1000);\n"
66 " Used only on PPC.\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"
71 #ifdef TARGET_FORMAT_EXE
72 " .sdata2 : { *(.sdata2) *(.sdata2.*) *(.gnu.linkonce.s2.*) }\n"
73 " .sbss2 : { *(.sbss2) *(.sbss2.*) *(.gnu.linkonce.sb2.*) }\n"
77 " .sdata2 0 : { *(.sdata2) *(.sdata2.*) *(.gnu.linkonce.s2.*) }\n"
78 " .sbss2 0 : { *(.sbss2) *(.sbss2.*) *(.gnu.linkonce.sb2.*) }\n"
85 " *(.gnu.linkonce.d.*)\n"
87 #ifdef TARGET_FORMAT_EXE
88 " .data1 : { *(.data1) }\n"
90 " .data1 0 : { *(.data1) }\n"
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
103 " PROVIDE(__eh_frame_start = .);\n"
104 " KEEP (*(.eh_frame))\n";
106 static const char LDSCRIPT_PART3
[] =
108 #ifdef TARGET_FORMAT_EXE
109 " .gcc_except_table : { *(.gcc_except_table) }\n"
111 " .gcc_except_table 0 : { *(.gcc_except_table) }\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
125 " *(.gnu.linkonce.s.*)\n"
128 #ifdef TARGET_FORMAT_EXE
136 " *(.gnu.linkonce.sb.*)\n"
140 #ifdef TARGET_FORMAT_EXE
148 " *(.gnu.linkonce.b.*)\n"
151 #ifdef TARGET_FORMAT_EXE
152 " . = DATA_SEGMENT_END( . ); \n"
154 " /DISCARD/ : { *(.note.GNU-stack) }\n";
156 static const char LDSCRIPT_PART4
[] =