source: mainline/uspace/lib/c/arch/arm32/_link.ld.in@ 6f025a8

lfn serial ticket/834-toolchain-update topic/msim-upgrade topic/simplify-dev-export
Last change on this file since 6f025a8 was 09553a0, checked in by Dzejrou <dzejrou@…>, 7 years ago

cpp+c: added missing linker script modifications and fixed some compile errors for different architectures

  • Property mode set to 100644
File size: 1.2 KB
Line 
1STARTUP(LIBC_PATH/arch/UARCH/src/entry.o)
2ENTRY(_start)
3
4PHDRS {
5 text PT_LOAD FILEHDR PHDRS FLAGS(5);
6 data PT_LOAD FLAGS(6);
7 tls PT_TLS;
8}
9
10SECTIONS {
11#ifdef SHLIB
12 . = SEGMENT_START("text-segment", 0);
13#else
14 . = SEGMENT_START("text-segment", 0x400000);
15 PROVIDE (__executable_start = .);
16#endif
17 . = . + SIZEOF_HEADERS;
18
19 .init : {
20 *(.init);
21 } :text
22
23 .text : {
24 *(.text .text.*);
25 *(.rodata .rodata.*);
26 } :text
27
28 . = . + 0x1000;
29
30 .data : {
31 *(.opd);
32 *(.data .data.*);
33 *(.sdata);
34 } :data
35
36 .tdata : {
37 *(.tdata);
38 *(.tdata.*);
39 *(.gnu.linkonce.td.*);
40 } :data :tls
41
42 .tbss : {
43 *(.tbss);
44 *(.tbss.*);
45 *(.gnu.linkonce.tb.*);
46 } :data :tls
47
48 .bss : {
49 *(.sbss);
50 *(.scommon);
51 *(COMMON);
52 *(.bss);
53 } :data
54
55 __dso_handle = .;
56
57 .init_array : {
58 PROVIDE_HIDDEN (__init_array_start = .);
59 KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*)))
60 KEEP (*(.init_array .ctors))
61 PROVIDE_HIDDEN (__init_array_end = .);
62 }
63
64 .fini_array : {
65 PROVIDE_HIDDEN (__fini_array_start = .);
66 KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*)))
67 KEEP (*(.fini_array .dtors))
68 PROVIDE_HIDDEN (__fini_array_end = .);
69 }
70
71 _end = .;
72
73 /DISCARD/ : {
74 *(*);
75 }
76}
Note: See TracBrowser for help on using the repository browser.