aboutsummaryrefslogtreecommitdiff
path: root/ld/scripttempl/ia64vms.sc
blob: b8be91f2ef43d276007c0231d68dba7ed22965bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
# Linker script for Itanium VMS systems.
# Tristan Gingold <gingold@adacore.com>.

PAGESIZE=0x10000
BLOCKSIZE=0x200

cat <<EOF
OUTPUT_FORMAT("${OUTPUT_FORMAT}")
${LIB_SEARCH_DIRS}
ENTRY(__entry)

SECTIONS
{
  /* RW segment.  */
  ${RELOCATING+. = ${PAGESIZE};}

  \$DATA\$ ALIGN (${BLOCKSIZE}) : {
    *(\$DATA\$ .data .data.*)
    *(\$BSS\$ .bss)
  }

  /* Code segment.  Note: name must be \$CODE\$ */
  ${RELOCATING+. = ALIGN (${PAGESIZE});}

  \$CODE\$ ALIGN (${BLOCKSIZE}) : {
    *(\$CODE\$ .text)
  }
  .plt ALIGN (8) : {
    *(.plt)
  }

  /* RO segment.  */
  ${RELOCATING+. = ALIGN (${PAGESIZE});}

  /* RO initialized data.  */
  \$LITERAL\$ ALIGN (${BLOCKSIZE}) : {
    *(\$LITERAL\$)
    *(\$READONLY\$ .rodata)
    *(.jcr)
    *(.ctors)
    *(.dtors)
    *(.opd)
    *(.gcc_except_table)

    /* LIB$INITIALIZE stuff.  */
    *(LIB\$INITIALIZDZ)	/* Start marker.  */
    *(LIB\$INITIALIZD_)	/* Hi priority.  */
    *(LIB\$INITIALIZE)	/* User.  */
    *(LIB\$INITIALIZE$)	/* End marker.  */
  }

  /* Short segment.  */
  ${RELOCATING+. = ALIGN (${PAGESIZE});}

  .srodata : {
    *(.srodata)
  }
  .got ALIGN (8) : {
    *(.got)
  }
  .IA_64.pltoff ALIGN (16) : {
    *(.IA_64.pltoff)
  }
  \$TFR\$ ALIGN (16) : {
    /* Tranfer vector.  */
    __entry = .;
    *(.transfer)
  }

  ${RELOCATING+. = ALIGN (${PAGESIZE});}

  \$RW_SHORT\$ ALIGN (${BLOCKSIZE}) : {
    *(.sdata .sdata.*)
    *(.sbss)
  }

  ${RELOCATING+. = ALIGN (${PAGESIZE});}

  .IA_64.unwind ALIGN (${BLOCKSIZE}) : {
    *(.IA_64.unwind .IA_64.unwind.*)
  }

  .IA_64.unwind_info ALIGN (8) : {
    *(.IA_64.unwind_info .IA_64.unwind_info.*)
  }

  ${RELOCATING+. = ALIGN (${PAGESIZE});}

  .dynamic /* \$DYNAMIC\$ */ ALIGN (${BLOCKSIZE}) : {
    *(.dynamic)
    *(.vmsdynstr)
    *(.fixups)
  }

  ${RELOCATING+. = ALIGN (${PAGESIZE});}

  .dynstr : { *(.dynstr) }

  .dynsym       ${RELOCATING-0} : { *(.dynsym) }
  .rela.got : { *(.rela.got) }
  .got.plt : { *(.got.plt) }
  .gnu.version_d : { *(.gnu.version_d) }
  .gnu.version : { *(.gnu.version) }
  .gnu.version_r : { *(.gnu.version_r) }
  .rela.IA_64.pltoff : { *(.rela.IA_64.pltoff) }

EOF

source $srcdir/scripttempl/DWARF.sc

cat <<EOF  
  .note : { *(.vms.note) }

  /DISCARD/ : { *(.note) }
}
EOF