Commit | Line | Data |
---|---|---|
202e2356 NC |
1 | # Linker script for Itanium VMS systems. |
2 | # Tristan Gingold <gingold@adacore.com>. | |
985743c7 | 3 | # |
219d1afa | 4 | # Copyright (C) 2014-2018 Free Software Foundation, Inc. |
6c19b93b | 5 | # |
985743c7 NC |
6 | # Copying and distribution of this file, with or without modification, |
7 | # are permitted in any medium without royalty provided the copyright | |
8 | # notice and this notice are preserved. | |
202e2356 NC |
9 | |
10 | PAGESIZE=0x10000 | |
11 | BLOCKSIZE=0x200 | |
12 | ||
13 | cat <<EOF | |
219d1afa | 14 | /* Copyright (C) 2014-2018 Free Software Foundation, Inc. |
985743c7 NC |
15 | |
16 | Copying and distribution of this script, with or without modification, | |
17 | are permitted in any medium without royalty provided the copyright | |
18 | notice and this notice are preserved. */ | |
19 | ||
202e2356 NC |
20 | OUTPUT_FORMAT("${OUTPUT_FORMAT}") |
21 | ${LIB_SEARCH_DIRS} | |
22 | ENTRY(__entry) | |
23 | ||
24 | SECTIONS | |
25 | { | |
26 | /* RW segment. */ | |
27 | ${RELOCATING+. = ${PAGESIZE};} | |
28 | ||
29 | \$DATA\$ ALIGN (${BLOCKSIZE}) : { | |
30 | *(\$DATA\$ .data .data.*) | |
639453f5 | 31 | *(\$BSS\$ .bss .bss.*) |
202e2356 NC |
32 | } |
33 | ||
34 | /* Code segment. Note: name must be \$CODE\$ */ | |
35 | ${RELOCATING+. = ALIGN (${PAGESIZE});} | |
36 | ||
37 | \$CODE\$ ALIGN (${BLOCKSIZE}) : { | |
639453f5 | 38 | *(\$CODE\$ .text .text.*) |
202e2356 NC |
39 | } |
40 | .plt ALIGN (8) : { | |
41 | *(.plt) | |
42 | } | |
43 | ||
44 | /* RO segment. */ | |
45 | ${RELOCATING+. = ALIGN (${PAGESIZE});} | |
46 | ||
47 | /* RO initialized data. */ | |
48 | \$LITERAL\$ ALIGN (${BLOCKSIZE}) : { | |
49 | *(\$LITERAL\$) | |
639453f5 | 50 | *(\$READONLY\$ .rodata .rodata.*) |
202e2356 NC |
51 | *(.jcr) |
52 | *(.ctors) | |
53 | *(.dtors) | |
54 | *(.opd) | |
55 | *(.gcc_except_table) | |
56 | ||
57 | /* LIB$INITIALIZE stuff. */ | |
58 | *(LIB\$INITIALIZDZ) /* Start marker. */ | |
59 | *(LIB\$INITIALIZD_) /* Hi priority. */ | |
60 | *(LIB\$INITIALIZE) /* User. */ | |
61 | *(LIB\$INITIALIZE$) /* End marker. */ | |
62 | } | |
63 | ||
64 | /* Short segment. */ | |
65 | ${RELOCATING+. = ALIGN (${PAGESIZE});} | |
66 | ||
67 | .srodata : { | |
639453f5 | 68 | *(.srodata .srodata.*) |
202e2356 NC |
69 | } |
70 | .got ALIGN (8) : { | |
71 | *(.got) | |
72 | } | |
73 | .IA_64.pltoff ALIGN (16) : { | |
74 | *(.IA_64.pltoff) | |
75 | } | |
76 | \$TFR\$ ALIGN (16) : { | |
b81c93c8 | 77 | /* Transfer vector. */ |
202e2356 NC |
78 | __entry = .; |
79 | *(.transfer) | |
80 | } | |
81 | ||
82 | ${RELOCATING+. = ALIGN (${PAGESIZE});} | |
83 | ||
84 | \$RW_SHORT\$ ALIGN (${BLOCKSIZE}) : { | |
85 | *(.sdata .sdata.*) | |
639453f5 | 86 | *(.sbss .sbss.*) |
202e2356 NC |
87 | } |
88 | ||
89 | ${RELOCATING+. = ALIGN (${PAGESIZE});} | |
90 | ||
91 | .IA_64.unwind ALIGN (${BLOCKSIZE}) : { | |
92 | *(.IA_64.unwind .IA_64.unwind.*) | |
93 | } | |
94 | ||
95 | .IA_64.unwind_info ALIGN (8) : { | |
96 | *(.IA_64.unwind_info .IA_64.unwind_info.*) | |
97 | } | |
98 | ||
99 | ${RELOCATING+. = ALIGN (${PAGESIZE});} | |
100 | ||
101 | .dynamic /* \$DYNAMIC\$ */ ALIGN (${BLOCKSIZE}) : { | |
102 | *(.dynamic) | |
103 | *(.vmsdynstr) | |
104 | *(.fixups) | |
105 | } | |
106 | ||
107 | ${RELOCATING+. = ALIGN (${PAGESIZE});} | |
108 | ||
109 | .dynstr : { *(.dynstr) } | |
110 | ||
111 | .dynsym ${RELOCATING-0} : { *(.dynsym) } | |
112 | .rela.got : { *(.rela.got) } | |
113 | .got.plt : { *(.got.plt) } | |
114 | .gnu.version_d : { *(.gnu.version_d) } | |
115 | .gnu.version : { *(.gnu.version) } | |
116 | .gnu.version_r : { *(.gnu.version_r) } | |
117 | .rela.IA_64.pltoff : { *(.rela.IA_64.pltoff) } | |
118 | ||
ceb0a680 NC |
119 | EOF |
120 | ||
d061dfac | 121 | . $srcdir/scripttempl/DWARF.sc |
ceb0a680 | 122 | |
6c19b93b | 123 | cat <<EOF |
202e2356 NC |
124 | .note : { *(.vms.note) } |
125 | ||
639453f5 | 126 | /DISCARD/ : { *(.note) *(.vms_display_name_info) } |
202e2356 NC |
127 | } |
128 | EOF |