source: mainline/uspace/lib/c/arch/mips32/_link.ld.in@ 8e2154e7

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