Upload Tizen:Base source
[external/binutils.git] / ld / emulparams / elf64hppa.sh
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=0x8000000000001000
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=0x8000000000001000
16
17 ARCH=hppa
18 MACHINE=hppa2.0w
19 ENTRY="main"
20 TEMPLATE_NAME=elf32
21 GENERATE_SHLIB_SCRIPT=yes
22
23 # We really want multiple .stub sections, one for each input .text section,
24 # but for now this is good enough.
25 OTHER_READONLY_SECTIONS="
26   .PARISC.unwind ${RELOCATING-0} : { *(.PARISC.unwind) }"
27
28 # The PA64 ELF port treats .plt sections differently than most.  We also have
29 # to create a .opd section.  What most systems call the .got, we call the .dlt
30 OTHER_READWRITE_SECTIONS="
31   .PARISC.pfa_count ${RELOCATING-0} : { *(.PARISC.pfa_count) }
32   .PARISC.global ${RELOCATING-0} : { *(.PARISC.global) }
33   .opd          ${RELOCATING-0} : { *(.opd) }
34   ${RELOCATING+PROVIDE (__gp = .);}
35   .plt          ${RELOCATING-0} : { *(.plt) }
36   .dlt          ${RELOCATING-0} : { *(.dlt) }"
37
38 # The PA64 ELF port has an additional huge bss section.
39 OTHER_BSS_SECTIONS="
40   .PARISC.ansi.common ${RELOCATING-0} : { *(.PARISC.ansi.common) }
41   .PARISC.huge.common ${RELOCATING-0} : { *(.PARISC.huge.common) }
42   .hbss         ${RELOCATING-0} : { *(.hbss) }
43   .tbss         ${RELOCATING-0} : { *(.tbss) }"
44
45 #OTHER_SYMBOLS='PROVIDE (__TLS_SIZE = SIZEOF (.tbss));'
46 OTHER_SYMBOLS='
47   PROVIDE (__TLS_SIZE = 0);
48   PROVIDE (__TLS_INIT_SIZE = 0);
49   PROVIDE (__TLS_INIT_START = 0);
50   PROVIDE (__TLS_INIT_A = 0);
51   PROVIDE (__TLS_PREALLOC_DTV_A = 0);'
52
53 # HPs use .dlt where systems use .got.  Sigh.
54 OTHER_GOT_RELOC_SECTIONS="
55   .rela.dlt     ${RELOCATING-0} : { *(.rela.dlt) }
56   .rela.opd     ${RELOCATING-0} : { *(.rela.opd) }"
57
58 # We're not actually providing a symbol anymore (due to the inability to be
59 # safe in regards to shared libraries). So we just allocate the hunk of space
60 # unconditionally, but do not mess around with the symbol table.
61 DATA_START_SYMBOLS='. += 16;'
62
63 DATA_PLT=
64 PLT_BEFORE_GOT=
65
66 # .dynamic should be at the start of the .text segment.
67 TEXT_DYNAMIC=
68
69 # The linker is required to define these two symbols.
70 EXECUTABLE_SYMBOLS='PROVIDE (__SYSTEM_ID = 0x214); PROVIDE (_FPU_STATUS = 0x0);'
71 # The PA64 ELF port needs two additional initializer sections and also wants
72 # a start/end symbol pair for the .init and .fini sections.
73 INIT_START='KEEP (*(.HP.init)); PROVIDE (__preinit_start = .); KEEP (*(.preinit)); PROVIDE (__preinit_end = .); PROVIDE (__init_start = .);'
74 INIT_END='PROVIDE (__init_end = .);'
75 FINI_START='PROVIDE (__fini_start = .);'
76 FINI_END='PROVIDE (__fini_end = .);'