Home | History | Annotate | Line # | Download | only in emulparams
      1 SCRIPT_NAME=elf64hppa
      2 ELFSIZE=64
      3 OUTPUT_FORMAT="elf64-hppa"
      4 NO_REL_RELOCS=yes
      5 TEXT_START_ADDR=0x4000000000001000
      6 DATA_ADDR=0x8000000100000000
      7 TARGET_PAGE_SIZE=4096
      8 MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
      9 LIB_PATH="=/usr/lib/pa20_64:=/opt/langtools/lib/pa20_64"
     10 
     11 # The HP dynamic linker actually requires you set the start of text and
     12 # data to some reasonable value.  Of course nobody knows what reasoanble
     13 # really is, so we just use the same values that HP's linker uses.
     14 SHLIB_TEXT_START_ADDR=0x4000000000001000
     15 SHLIB_DATA_ADDR=0x8000000100000000
     16 
     17 ARCH=hppa
     18 MACHINE=hppa2.0w
     19 NOP=0x08000240
     20 ENTRY="main"
     21 TEMPLATE_NAME=elf
     22 GENERATE_SHLIB_SCRIPT=yes
     23 
     24 # We really want multiple .stub sections, one for each input .text section,
     25 # but for now this is good enough.
     26 OTHER_READONLY_SECTIONS="
     27   .PARISC.unwind ${RELOCATING-0} : { *(.PARISC.unwind) }"
     28 
     29 # The PA64 ELF port treats .plt sections differently than most.  We also have
     30 # to create a .opd section.  What most systems call the .got, we call the .dlt
     31 OTHER_READWRITE_SECTIONS="
     32   .PARISC.pfa_count ${RELOCATING-0} : { *(.PARISC.pfa_count) }
     33   .PARISC.global ${RELOCATING-0} : { *(.PARISC.global) }
     34   .data.rel     ${RELOCATING-0} : { *(.data.rel.local*) }
     35   .opd          ${RELOCATING-0} : { *(.opd) }
     36   .HP.init      ${RELOCATING-0} :
     37   {
     38     KEEP (*(SORT_NONE(.HP.init)))
     39   }
     40   .preinit      ${RELOCATING-0} :
     41   {
     42     ${RELOCATING+${PREINIT_START}}
     43     KEEP (*(SORT_NONE(.preinit)))
     44     ${RELOCATING+${PREINIT_END}}
     45   }
     46 
     47 # HP messed up the .init and .fini sections and they are expected
     48 # to contain arrays of function pointers.
     49   .init         ${RELOCATING-0} :
     50   {
     51     ${RELOCATING+${INIT_START}}
     52     KEEP (*(SORT_NONE(.init)))
     53     ${RELOCATING+${INIT_END}}
     54   }
     55   .fini         ${RELOCATING-0} :
     56   {
     57     ${RELOCATING+${FINI_START}}
     58     KEEP (*(SORT_NONE(.fini)))
     59     ${RELOCATING+${FINI_END}}
     60   }
     61   ${RELOCATING+PROVIDE (__gp = .);}
     62   .plt          ${RELOCATING-0} : { *(.plt) }
     63   .dlt          ${RELOCATING-0} : { *(.dlt) }"
     64 
     65 # The PA64 ELF port has an additional huge bss section.
     66 OTHER_BSS_SECTIONS="
     67   .PARISC.ansi.common ${RELOCATING-0} : { *(.PARISC.ansi.common) }
     68   .PARISC.huge.common ${RELOCATING-0} : { *(.PARISC.huge.common) }
     69   .hbss         ${RELOCATING-0} : { *(.hbss) }
     70   .tbss         ${RELOCATING-0} : { *(.tbss) }"
     71 
     72 # OTHER_SYMBOLS='PROVIDE (__TLS_SIZE = SIZEOF (.tbss));'
     73 
     74 # These symbols need to be provided in final relocations.
     75 OTHER_SYMBOLS='
     76   PROVIDE (__SYSTEM_ID = 0x214);
     77   PROVIDE (_FPU_STATUS = 0x0);
     78   PROVIDE (__TLS_SIZE = 0);
     79   PROVIDE (__TLS_INIT_SIZE = 0);
     80   PROVIDE (__TLS_INIT_START = 0);
     81   PROVIDE (__TLS_INIT_A = 0);
     82   PROVIDE (__TLS_PREALLOC_DTV_A = 0);
     83   PROVIDE (__SYSTEM_ID_D = 0);
     84   PROVIDE (__TLS_SIZE_D = 0);
     85   PROVIDE (__FPU_REVISION = 0);
     86   PROVIDE (__FPU_MODEL = 0);
     87   PROVIDE (__CPU_REVISION = 0);
     88   PROVIDE (__CPU_KEYBITS_1 = 0);
     89   PROVIDE (__LOAD_INFO = 0);
     90   PROVIDE (__ARGC = 0);
     91   PROVIDE (__ARGV = 0);
     92   PROVIDE (__ENVP = 0);
     93   PROVIDE (__libdl_jmp_tbl = 0);
     94   PROVIDE (__systab = 0);'
     95 
     96 # HPs use .dlt where systems use .got.  Sigh.
     97 OTHER_GOT_RELOC_SECTIONS="
     98   .rela.dlt     ${RELOCATING-0} : { *(.rela.dlt) }
     99   .rela.opd     ${RELOCATING-0} : { *(.rela.opd) }"
    100 
    101 DATA_PLT=
    102 PLT_BEFORE_GOT=
    103 
    104 # .dynamic should be at the start of the .text segment.
    105 TEXT_DYNAMIC=
    106 
    107 # The PA64 ELF port needs two additional initializer sections and also wants
    108 # a start/end symbol pair for the .init and .fini sections.
    109 PREINIT_START='PROVIDE (__preinit_start = .);'
    110 PREINIT_END='PROVIDE (__preinit_end = .);'
    111 INIT_START='PROVIDE (__init_start = .);'
    112 INIT_END='PROVIDE (__init_end = .);'
    113 FINI_START='PROVIDE (__fini_start = .);'
    114 FINI_END='PROVIDE (__fini_end = .);'
    115