source: mainline/uspace/lib/c/arch/abs32le/_link.ld.in@ 9ba040a

lfn serial ticket/834-toolchain-update topic/msim-upgrade topic/simplify-dev-export
Last change on this file since 9ba040a 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 .text : {
20 *(.text .text.*);
21 *(.rodata .rodata.*);
22 } :text
23
24 . = . + 0x1000;
25
26 .data : {
27 *(.data);
28 *(.data.rel*);
29 } :data
30
31 .got.plt : {
32 *(.got.plt);
33 } :data
34
35 .tdata : {
36 *(.tdata);
37 *(.tdata.*);
38 *(.gnu.linkonce.td.*);
39 } :data :tls
40
41 .tbss : {
42 *(.tbss);
43 *(.tbss.*);
44 *(.gnu.linkonce.tb.*);
45 } :data :tls
46
47 .sbss : {
48 *(.scommon);
49 *(.sbss);
50 }
51
52 .bss : {
53 *(COMMON);
54 *(.bss);
55 } :data
56
57 __dso_handle = .;
58
59 .init_array : {
60 PROVIDE_HIDDEN (__init_array_start = .);
61 KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*)))
62 KEEP (*(.init_array .ctors))
63 PROVIDE_HIDDEN (__init_array_end = .);
64 }
65
66 .fini_array : {
67 PROVIDE_HIDDEN (__fini_array_start = .);
68 KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*)))
69 KEEP (*(.fini_array .dtors))
70 PROVIDE_HIDDEN (__fini_array_end = .);
71 }
72
73 _end = .;
74
75 /DISCARD/ : {
76 *(*);
77 }
78}
Note: See TracBrowser for help on using the repository browser.