1# Linker script for Itanium VMS systems. 2# Tristan Gingold <gingold@adacore.com>. 3 4PAGESIZE=0x10000 5BLOCKSIZE=0x200 6 7cat <<EOF 8OUTPUT_FORMAT("${OUTPUT_FORMAT}") 9${LIB_SEARCH_DIRS} 10ENTRY(__entry) 11 12SECTIONS 13{ 14 /* RW segment. */ 15 ${RELOCATING+. = ${PAGESIZE};} 16 17 \$DATA\$ ALIGN (${BLOCKSIZE}) : { 18 *(\$DATA\$ .data .data.*) 19 *(\$BSS\$ .bss) 20 } 21 22 /* Code segment. Note: name must be \$CODE\$ */ 23 ${RELOCATING+. = ALIGN (${PAGESIZE});} 24 25 \$CODE\$ ALIGN (${BLOCKSIZE}) : { 26 *(\$CODE\$ .text) 27 } 28 .plt ALIGN (8) : { 29 *(.plt) 30 } 31 32 /* RO segment. */ 33 ${RELOCATING+. = ALIGN (${PAGESIZE});} 34 35 /* RO initialized data. */ 36 \$LITERAL\$ ALIGN (${BLOCKSIZE}) : { 37 *(\$LITERAL\$) 38 *(\$READONLY\$ .rodata) 39 *(.jcr) 40 *(.ctors) 41 *(.dtors) 42 *(.opd) 43 *(.gcc_except_table) 44 45 /* LIB$INITIALIZE stuff. */ 46 *(LIB\$INITIALIZDZ) /* Start marker. */ 47 *(LIB\$INITIALIZD_) /* Hi priority. */ 48 *(LIB\$INITIALIZE) /* User. */ 49 *(LIB\$INITIALIZE$) /* End marker. */ 50 } 51 52 /* Short segment. */ 53 ${RELOCATING+. = ALIGN (${PAGESIZE});} 54 55 .srodata : { 56 *(.srodata) 57 } 58 .got ALIGN (8) : { 59 *(.got) 60 } 61 .IA_64.pltoff ALIGN (16) : { 62 *(.IA_64.pltoff) 63 } 64 \$TFR\$ ALIGN (16) : { 65 /* Tranfer vector. */ 66 __entry = .; 67 *(.transfer) 68 } 69 70 ${RELOCATING+. = ALIGN (${PAGESIZE});} 71 72 \$RW_SHORT\$ ALIGN (${BLOCKSIZE}) : { 73 *(.sdata .sdata.*) 74 *(.sbss) 75 } 76 77 ${RELOCATING+. = ALIGN (${PAGESIZE});} 78 79 .IA_64.unwind ALIGN (${BLOCKSIZE}) : { 80 *(.IA_64.unwind .IA_64.unwind.*) 81 } 82 83 .IA_64.unwind_info ALIGN (8) : { 84 *(.IA_64.unwind_info .IA_64.unwind_info.*) 85 } 86 87 ${RELOCATING+. = ALIGN (${PAGESIZE});} 88 89 .dynamic /* \$DYNAMIC\$ */ ALIGN (${BLOCKSIZE}) : { 90 *(.dynamic) 91 *(.vmsdynstr) 92 *(.fixups) 93 } 94 95 ${RELOCATING+. = ALIGN (${PAGESIZE});} 96 97 .dynstr : { *(.dynstr) } 98 99 .dynsym ${RELOCATING-0} : { *(.dynsym) } 100 .rela.got : { *(.rela.got) } 101 .got.plt : { *(.got.plt) } 102 .gnu.version_d : { *(.gnu.version_d) } 103 .gnu.version : { *(.gnu.version) } 104 .gnu.version_r : { *(.gnu.version_r) } 105 .rela.IA_64.pltoff : { *(.rela.IA_64.pltoff) } 106 107 /* DWARF 2 */ 108 .debug_info 0 : { *(.debug_info${RELOCATING+ .gnu.linkonce.wi.*}) } 109 .debug_abbrev 0 : { *(.debug_abbrev) } 110 .debug_line 0 : { *(.debug_line) } 111 .debug_frame 0 : { *(.debug_frame) } 112 .debug_str 0 : { *(.debug_str) } 113 .debug_loc 0 : { *(.debug_loc) } 114 .debug_macinfo 0 : { *(.debug_macinfo) } 115 .debug_aranges 0 : { *(.debug_aranges) } 116 .debug_pubnames 0 : { *(.debug_pubnames) } 117 .trace_info 0 : { *(.trace_info) } 118 .trace_abbrev 0 : { *(.trace_abbrev) } 119 .trace_aranges 0 : { *(.trace_aranges) } 120 121 /* DWARF 3 */ 122 .debug_pubtypes 0 : { *(.debug_pubtypes) } 123 .debug_ranges 0 : { *(.debug_ranges) } 124 125 /* DWARF Extension. */ 126 .debug_macro 0 : { *(.debug_macro) } 127 128 .note : { *(.vms.note) } 129 130 /DISCARD/ : { *(.note) } 131} 132EOF 133