source: mainline/uspace/lib/c/arch/ia64/_link.ld.in@ 4fb8163

lfn serial ticket/834-toolchain-update topic/msim-upgrade topic/simplify-dev-export
Last change on this file since 4fb8163 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.4 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 /* Workaround proper alignment of the .init section */
20 . = ALIGN(., 16);
21
22 .init : {
23 *(.init);
24 } :text
25
26 .text : {
27 *(.text .text.*);
28 *(.rodata .rodata.*);
29 } :text
30
31 . = . + 0x4000;
32
33 .got : {
34 /* Tell the linker where we expect GP to point. */
35 __gp = .;
36 *(.got .got.*);
37 } :data
38
39 .data : {
40 *(.opd);
41 *(.data .data.*);
42 *(.sdata);
43 } :data
44
45 .tdata : {
46 *(.tdata);
47 *(.tdata.*);
48 *(.gnu.linkonce.td.*);
49 } :data :tls
50
51 .tbss : {
52 *(.tbss);
53 *(.tbss.*);
54 *(.gnu.linkonce.tb.*);
55 } :data :tls
56
57 .bss : {
58 *(.sbss);
59 *(.scommon);
60 *(COMMON);
61 *(.bss);
62 } :data
63
64 __dso_handle = .;
65
66 .init_array : {
67 PROVIDE_HIDDEN (__init_array_start = .);
68 KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*)))
69 KEEP (*(.init_array .ctors))
70 PROVIDE_HIDDEN (__init_array_end = .);
71 }
72
73 .fini_array : {
74 PROVIDE_HIDDEN (__fini_array_start = .);
75 KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*)))
76 KEEP (*(.fini_array .dtors))
77 PROVIDE_HIDDEN (__fini_array_end = .);
78 }
79
80 _end = .;
81
82 /DISCARD/ : {
83 *(*);
84 }
85}
Note: See TracBrowser for help on using the repository browser.