Home | History | Annotate | Download | only in scripttempl
      1 # Linker script for Itanium VMS systems.
      2 # Tristan Gingold <gingold (a] adacore.com>.
      3 #
      4 # Copyright (C) 2014 Free Software Foundation, Inc.
      5 # 
      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.
      9 
     10 PAGESIZE=0x10000
     11 BLOCKSIZE=0x200
     12 
     13 cat <<EOF
     14 /* Copyright (C) 2014 Free Software Foundation, Inc.
     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 
     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.*)
     31     *(\$BSS\$ .bss .bss.*)
     32   }
     33 
     34   /* Code segment.  Note: name must be \$CODE\$ */
     35   ${RELOCATING+. = ALIGN (${PAGESIZE});}
     36 
     37   \$CODE\$ ALIGN (${BLOCKSIZE}) : {
     38     *(\$CODE\$ .text .text.*)
     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\$)
     50     *(\$READONLY\$ .rodata .rodata.*)
     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 : {
     68     *(.srodata .srodata.*)
     69   }
     70   .got ALIGN (8) : {
     71     *(.got)
     72   }
     73   .IA_64.pltoff ALIGN (16) : {
     74     *(.IA_64.pltoff)
     75   }
     76   \$TFR\$ ALIGN (16) : {
     77     /* Tranfer vector.  */
     78     __entry = .;
     79     *(.transfer)
     80   }
     81 
     82   ${RELOCATING+. = ALIGN (${PAGESIZE});}
     83 
     84   \$RW_SHORT\$ ALIGN (${BLOCKSIZE}) : {
     85     *(.sdata .sdata.*)
     86     *(.sbss .sbss.*)
     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 
    119 EOF
    120 
    121 . $srcdir/scripttempl/DWARF.sc
    122 
    123 cat <<EOF  
    124   .note : { *(.vms.note) }
    125 
    126   /DISCARD/ : { *(.note) *(.vms_display_name_info) }
    127 }
    128 EOF
    129