1 /* Common code for PA ELF implementations.
2 Copyright (C) 1999 Free Software Foundation, Inc.
4 This file is part of BFD, the Binary File Descriptor library.
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
20 #define ELF_HOWTO_TABLE_SIZE R_PARISC_UNIMPLEMENTED + 1
22 /* This file is included by multiple PA ELF BFD backends with different
25 Most of the routines are written to be size independent, but sometimes
26 external constraints require 32 or 64 bit specific code. We remap
27 the definitions/functions as necessary here. */
29 #define ELF_R_TYPE(X) ELF64_R_TYPE(X)
30 #define ELF_R_SYM(X) ELF64_R_SYM(X)
31 #define _bfd_elf_hppa_gen_reloc_type _bfd_elf64_hppa_gen_reloc_type
32 #define elf_hppa_relocate_section elf64_hppa_relocate_section
33 #define bfd_elf_bfd_final_link bfd_elf64_bfd_final_link
34 #define elf_hppa_final_link elf64_hppa_final_link
37 #define ELF_R_TYPE(X) ELF32_R_TYPE(X)
38 #define ELF_R_SYM(X) ELF32_R_SYM(X)
39 #define _bfd_elf_hppa_gen_reloc_type _bfd_elf32_hppa_gen_reloc_type
40 #define elf_hppa_relocate_section elf32_hppa_relocate_section
41 #define bfd_elf_bfd_final_link bfd_elf32_bfd_final_link
42 #define elf_hppa_final_link elf32_hppa_final_link
46 elf_hppa_relocate_section
47 PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *,
48 bfd_byte *, Elf_Internal_Rela *, Elf_Internal_Sym *, asection **));
50 static bfd_reloc_status_type elf_hppa_final_link_relocate
51 PARAMS ((reloc_howto_type *, bfd *, bfd *, asection *,
52 bfd_byte *, bfd_vma, bfd_vma, bfd_vma, struct bfd_link_info *,
53 asection *, const char *, int));
55 static unsigned long elf_hppa_relocate_insn
56 PARAMS ((bfd *, asection *, unsigned long, unsigned long, long,
57 long, unsigned long, unsigned long, unsigned long));
59 static boolean elf_hppa_add_symbol_hook
60 PARAMS ((bfd *, struct bfd_link_info *, const Elf_Internal_Sym *,
61 const char **, flagword *, asection **, bfd_vma *));
63 static boolean elf_hppa_final_link
64 PARAMS ((bfd *, struct bfd_link_info *));
66 /* ELF/PA relocation howto entries. */
68 static reloc_howto_type elf_hppa_howto_table[ELF_HOWTO_TABLE_SIZE] =
70 {R_PARISC_NONE, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_NONE", false, 0, 0, false},
72 /* The values in DIR32 are to placate the check in
73 _bfd_stab_section_find_nearest_line. */
74 {R_PARISC_DIR32, 0, 2, 32, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_DIR32", false, 0, 0xffffffff, false},
75 {R_PARISC_DIR21L, 0, 0, 21, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_DIR21L", false, 0, 0, false},
76 {R_PARISC_DIR17R, 0, 0, 17, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_DIR17R", false, 0, 0, false},
77 {R_PARISC_DIR17F, 0, 0, 17, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_DIR17F", false, 0, 0, false},
78 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
79 {R_PARISC_DIR14R, 0, 0, 14, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_DIR14R", false, 0, 0, false},
80 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
81 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
82 {R_PARISC_PCREL32, 0, 0, 32, true, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_PCREL32", false, 0, 0, false},
84 {R_PARISC_PCREL21L, 0, 0, 21, true, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_PCREL21L", false, 0, 0, false},
85 {R_PARISC_PCREL17R, 0, 0, 17, true, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_PCREL17R", false, 0, 0, false},
86 {R_PARISC_PCREL17F, 0, 0, 17, true, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_PCREL17F", false, 0, 0, false},
87 {R_PARISC_PCREL17C, 0, 0, 17, true, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_PCREL17C", false, 0, 0, false},
88 {R_PARISC_PCREL14R, 0, 0, 14, true, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_PCREL14R", false, 0, 0, false},
89 {R_PARISC_PCREL14F, 0, 0, 14, true, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_PCREL14F", false, 0, 0, false},
90 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
91 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
92 {R_PARISC_DPREL21L, 0, 0, 21, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_DPREL21L", false, 0, 0, false},
93 {R_PARISC_DPREL14WR, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_DPREL14WR", false, 0, 0, false},
95 {R_PARISC_DPREL14DR, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_DPREL14DR", false, 0, 0, false},
96 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
97 {R_PARISC_DPREL14R, 0, 0, 14, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_DPREL14R", false, 0, 0, false},
98 {R_PARISC_DPREL14F, 0, 0, 14, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_DPREL14F", false, 0, 0, false},
99 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
100 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
101 {R_PARISC_DLTREL21L, 0, 0, 21, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_DLTREL21L", false, 0, 0, false},
102 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
103 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
104 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
106 {R_PARISC_DLTREL14R, 0, 0, 14, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_DLTREL14R", false, 0, 0, false},
107 {R_PARISC_DLTREL14F, 0, 0, 14, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_DLTREL14F", false, 0, 0, false},
108 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
109 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
110 {R_PARISC_DLTIND21L, 0, 0, 21, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_DLTIND21L", false, 0, 0, false},
111 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
112 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
113 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
114 {R_PARISC_DLTIND14R, 0, 0, 14, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_DLTIND14R", false, 0, 0, false},
115 {R_PARISC_DLTIND14F, 0, 0, 14, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_DLTIND14F", false, 0, 0, false},
117 {R_PARISC_SETBASE, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_SETBASE", false, 0, 0, false},
118 {R_PARISC_SECREL32, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_SECREL32", false, 0, 0, false},
119 {R_PARISC_BASEREL21L, 0, 0, 21, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_BASEREL21L", false, 0, 0, false},
120 {R_PARISC_BASEREL17R, 0, 0, 17, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_BASEREL17R", false, 0, 0, false},
121 {R_PARISC_BASEREL17F, 0, 0, 17, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_BASEREL17F", false, 0, 0, false},
122 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
123 {R_PARISC_BASEREL14R, 0, 0, 14, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_BASEREL14R", false, 0, 0, false},
124 {R_PARISC_BASEREL14F, 0, 0, 14, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_BASEREL14F", false, 0, 0, false},
125 {R_PARISC_SEGBASE, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_SEGBASE", false, 0, 0, false},
126 {R_PARISC_SEGREL32, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_SEGREL32", false, 0, 0, false},
128 {R_PARISC_PLTOFF21L, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_PLTOFF21L", false, 0, 0, false},
129 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
130 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
131 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
132 {R_PARISC_PLTOFF14R, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_PLTOFF14R", false, 0, 0, false},
133 {R_PARISC_PLTOFF14F, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_PLTOFF14F", false, 0, 0, false},
134 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
135 {R_PARISC_LTOFF_FPTR32, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_LTOFF_FPTR32", false, 0, 0, false},
136 {R_PARISC_LTOFF_FPTR21L, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_LTOFF_FPTR21L", false, 0, 0, false},
137 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
139 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
140 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
141 {R_PARISC_LTOFF_FPTR14R, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_LTOFF_FPTR14R", false, 0, 0, false},
142 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
143 {R_PARISC_FPTR64, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_FPTR64", false, 0, 0, false},
144 {R_PARISC_PLABEL32, 0, 0, 32, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_PLABEL32", false, 0, 0, false},
145 {R_PARISC_PLABEL21L, 0, 0, 21, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_PLABEL21L", false, 0, 0, false},
146 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
147 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
148 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
150 {R_PARISC_PLABEL14R, 0, 0, 14, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_PLABEL14R", false, 0, 0, false},
151 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
152 {R_PARISC_PCREL64, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_PCREL64", false, 0, 0, false},
153 {R_PARISC_PCREL22C, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_PCREL22C", false, 0, 0, false},
154 {R_PARISC_PCREL22F, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_PCREL22F", false, 0, 0, false},
155 {R_PARISC_PCREL14WR, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_PCREL14WR", false, 0, 0, false},
156 {R_PARISC_PCREL14DR, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_PCREL14DR", false, 0, 0, false},
157 {R_PARISC_PCREL16F, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_PCREL16F", false, 0, 0, false},
158 {R_PARISC_PCREL16WF, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_PCREL16WF", false, 0, 0, false},
159 {R_PARISC_PCREL16DF, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_PCREL16DF", false, 0, 0, false},
161 {R_PARISC_DIR64, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_DIR64", false, 0, 0, false},
162 {R_PARISC_DIR64WR, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_DIR64WR", false, 0, 0, false},
163 {R_PARISC_DIR64DR, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_DIR64DR", false, 0, 0, false},
164 {R_PARISC_DIR14WR, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_DIR14WR", false, 0, 0, false},
165 {R_PARISC_DIR14DR, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_DIR14DR", false, 0, 0, false},
166 {R_PARISC_DIR16F, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_DIR16F", false, 0, 0, false},
167 {R_PARISC_DIR16WF, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_DIR16WF", false, 0, 0, false},
168 {R_PARISC_DIR16DF, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_DIR16DF", false, 0, 0, false},
169 {R_PARISC_GPREL64, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_GPREL64", false, 0, 0, false},
170 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
172 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
173 {R_PARISC_DLTREL14WR, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_DLTREL14WR", false, 0, 0, false},
174 {R_PARISC_DLTREL14DR, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_DLTREL14DR", false, 0, 0, false},
175 {R_PARISC_GPREL16F, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_GPREL16F", false, 0, 0, false},
176 {R_PARISC_GPREL16WF, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_GPREL16WF", false, 0, 0, false},
177 {R_PARISC_GPREL16DF, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_GPREL16DF", false, 0, 0, false},
178 {R_PARISC_LTOFF64, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_LTOFF64", false, 0, 0, false},
179 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
180 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
181 {R_PARISC_DLTIND14WR, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_DLTIND14WR", false, 0, 0, false},
183 {R_PARISC_DLTIND14DR, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_DLTIND14DR", false, 0, 0, false},
184 {R_PARISC_LTOFF16F, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_LTOFF16F", false, 0, 0, false},
185 {R_PARISC_LTOFF16DF, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_LTOFF16DF", false, 0, 0, false},
186 {R_PARISC_SECREL64, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_SECREL64", false, 0, 0, false},
187 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
188 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
189 {R_PARISC_BASEREL14WR, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_BSEREL14WR", false, 0, 0, false},
190 {R_PARISC_BASEREL14DR, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_BASEREL14DR", false, 0, 0, false},
191 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
192 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
194 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
195 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
196 {R_PARISC_SEGREL64, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_SEGREL64", false, 0, 0, false},
197 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
198 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
199 {R_PARISC_PLTOFF14WR, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_PLTOFF14WR", false, 0, 0, false},
200 {R_PARISC_PLTOFF14DR, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_PLTOFF14DR", false, 0, 0, false},
201 {R_PARISC_PLTOFF16F, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_PLTOFF16F", false, 0, 0, false},
202 {R_PARISC_PLTOFF16WF, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_PLTOFF16WF", false, 0, 0, false},
203 {R_PARISC_PLTOFF16DF, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_PLTOFF16DF", false, 0, 0, false},
205 {R_PARISC_LTOFF_FPTR64, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
206 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
207 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
208 {R_PARISC_LTOFF_FPTR14WR, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_LTOFF_FPTR14WR", false, 0, 0, false},
209 {R_PARISC_LTOFF_FPTR14DR, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_LTOFF_FPTR14DR", false, 0, 0, false},
210 {R_PARISC_LTOFF_FPTR16F, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_LTOFF_FPTR16F", false, 0, 0, false},
211 {R_PARISC_LTOFF_FPTR16WF, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_LTOFF_FPTR16WF", false, 0, 0, false},
212 {R_PARISC_LTOFF_FPTR16DF, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
213 {R_PARISC_COPY, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_COPY", false, 0, 0, false},
214 {R_PARISC_IPLT, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_IPLT", false, 0, 0, false},
216 {R_PARISC_EPLT, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_EPLT", false, 0, 0, false},
217 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
218 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
219 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
220 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
221 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
222 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
223 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_dont, NULL, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
224 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
225 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
227 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_dont, NULL, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
228 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
229 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
230 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
231 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
232 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
233 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
234 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_dont, NULL, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
235 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
236 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
238 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_dont, NULL, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
239 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_dont, NULL, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
240 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_dont, NULL, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
241 {R_PARISC_TPREL32, 0, 0, 0, false, 0, complain_overflow_dont, NULL, "R_PARISC_TPREL32", false, 0, 0, false},
242 {R_PARISC_TPREL21L, 0, 0, 0, false, 0, complain_overflow_dont, NULL, "R_PARISC_TPREL21L", false, 0, 0, false},
243 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_dont, NULL, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
244 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_dont, NULL, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
245 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_dont, NULL, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
246 {R_PARISC_TPREL14R, 0, 0, 0, false, 0, complain_overflow_dont, NULL, "R_PARISC_TPREL14R", false, 0, 0, false},
247 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_dont, NULL, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
249 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_dont, NULL, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
250 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_dont, NULL, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
251 {R_PARISC_LTOFF_TP21L, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_LTOFF_TP21L", false, 0, 0, false},
252 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_dont, NULL, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
253 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
254 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
255 {R_PARISC_LTOFF_TP14R, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
256 {R_PARISC_LTOFF_TP14F, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_LTOFF_TP14F", false, 0, 0, false},
257 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
258 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
260 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
261 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_dont, NULL, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
262 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
263 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
264 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
265 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
266 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
267 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
268 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_dont, NULL, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
269 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
271 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
272 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_dont, NULL, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
273 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
274 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
275 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
276 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
277 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
278 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
279 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_dont, NULL, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
280 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
282 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
283 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_dont, NULL, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
284 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
285 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
286 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
287 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
288 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
289 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
290 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_dont, NULL, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
291 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
293 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
294 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_dont, NULL, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
295 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
296 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
297 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
298 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
299 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
300 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
301 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_dont, NULL, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
302 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
304 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
305 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
306 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_dont, NULL, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
307 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
308 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
309 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
310 {R_PARISC_TPREL64, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_TPREL64", false, 0, 0, false},
311 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
312 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
313 {R_PARISC_TPREL14WR, 0, 0, 0, false, 0, complain_overflow_dont, NULL, "R_PARISC_TPREL14WR", false, 0, 0, false},
315 {R_PARISC_TPREL14DR, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_TPREL14DR", false, 0, 0, false},
316 {R_PARISC_TPREL16F, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_TPREL16F", false, 0, 0, false},
317 {R_PARISC_TPREL16WF, 0, 0, 0, false, 0, complain_overflow_dont, NULL, "R_PARISC_TPREL16WF", false, 0, 0, false},
318 {R_PARISC_TPREL16DF, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_TPREL16DF", false, 0, 0, false},
319 {R_PARISC_LTOFF_TP64, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_LTOFF_TP64", false, 0, 0, false},
320 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
321 {R_PARISC_UNIMPLEMENTED, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_UNIMPLEMENTED", false, 0, 0, false},
322 {R_PARISC_LTOFF_TP14WR, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_LTOFF_TP14WR", false, 0, 0, false},
323 {R_PARISC_LTOFF_TP14DR, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_LTOFF_TP14DR", false, 0, 0, false},
324 {R_PARISC_LTOFF_TP16F, 0, 0, 0, false, 0, complain_overflow_dont, NULL, "R_PARISC_LTOFF_TP16F", false, 0, 0, false},
326 {R_PARISC_LTOFF_TP16WF, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_LTOFF_TP16WF", false, 0, 0, false},
327 {R_PARISC_LTOFF_TP16DF, 0, 0, 0, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PARISC_LTOFF_TP16DF", false, 0, 0, false},
330 #define OFFSET_14R_FROM_21L 4
331 #define OFFSET_14F_FROM_21L 5
333 /* Return one (or more) BFD relocations which implement the base
334 relocation with modifications based on format and field. */
336 elf_hppa_reloc_type **
337 _bfd_elf_hppa_gen_reloc_type (abfd, base_type, format, field, ignore, sym)
339 elf_hppa_reloc_type base_type;
342 int ignore ATTRIBUTE_UNUSED;
343 asymbol *sym ATTRIBUTE_UNUSED;
345 elf_hppa_reloc_type *finaltype;
346 elf_hppa_reloc_type **final_types;
348 /* Allocate slots for the BFD relocation. */
349 final_types = ((elf_hppa_reloc_type **)
350 bfd_alloc (abfd, sizeof (elf_hppa_reloc_type *) * 2));
351 if (final_types == NULL)
354 /* Allocate space for the relocation itself. */
355 finaltype = ((elf_hppa_reloc_type *)
356 bfd_alloc (abfd, sizeof (elf_hppa_reloc_type)));
357 if (finaltype == NULL)
360 /* Some reasonable defaults. */
361 final_types[0] = finaltype;
362 final_types[1] = NULL;
364 #define final_type finaltype[0]
366 final_type = base_type;
368 /* Just a tangle of nested switch statements to deal with the braindamage
369 that a different field selector means a completely different relocation
373 /* We have been using generic relocation types. However, that may not
374 really make sense. Anyway, we need to support both R_PARISC_DIR64
375 and R_PARISC_DIR32 here. */
378 case R_HPPA_ABS_CALL:
386 final_type = R_PARISC_DIR14R;
389 final_type = R_PARISC_DLTIND14R;
392 final_type = R_PARISC_LTOFF_FPTR14DR;
395 final_type = R_PARISC_DLTIND14F;
398 final_type = R_PARISC_PLABEL14R;
409 final_type = R_PARISC_DIR17F;
413 final_type = R_PARISC_DIR17R;
425 final_type = R_PARISC_DIR21L;
428 final_type = R_PARISC_DLTIND21L;
431 final_type = R_PARISC_LTOFF_FPTR21L;
434 final_type = R_PARISC_PLABEL21L;
445 final_type = R_PARISC_DIR32;
446 /* When in 64bit mode, a 32bit relocation is supposed to
447 be a section relative relocation. Dwarf2 (for example)
448 uses 32bit section relative relocations. */
449 if (bfd_get_arch_info (abfd)->bits_per_address != 32)
450 final_type = R_PARISC_SECREL32;
453 final_type = R_PARISC_PLABEL32;
464 final_type = R_PARISC_DIR64;
467 final_type = R_PARISC_FPTR64;
488 final_type = base_type + OFFSET_14R_FROM_21L;
491 final_type = base_type + OFFSET_14F_FROM_21L;
503 final_type = base_type;
516 case R_HPPA_PCREL_CALL:
524 final_type = R_PARISC_PCREL14R;
527 final_type = R_PARISC_PCREL14F;
539 final_type = R_PARISC_PCREL17R;
542 final_type = R_PARISC_PCREL17F;
553 final_type = R_PARISC_PCREL22F;
565 final_type = R_PARISC_PCREL21L;
577 case R_PARISC_SEGREL32:
578 case R_PARISC_SEGBASE:
579 /* The defaults are fine for these cases. */
589 /* Translate from an elf into field into a howto relocation pointer. */
592 elf_hppa_info_to_howto (abfd, bfd_reloc, elf_reloc)
593 bfd *abfd ATTRIBUTE_UNUSED;
595 Elf_Internal_Rela *elf_reloc;
597 BFD_ASSERT (ELF_R_TYPE(elf_reloc->r_info)
598 < (unsigned int) R_PARISC_UNIMPLEMENTED);
599 bfd_reloc->howto = &elf_hppa_howto_table[ELF_R_TYPE (elf_reloc->r_info)];
602 /* Translate from an elf into field into a howto relocation pointer. */
605 elf_hppa_info_to_howto_rel (abfd, bfd_reloc, elf_reloc)
606 bfd *abfd ATTRIBUTE_UNUSED;
608 Elf_Internal_Rel *elf_reloc;
610 BFD_ASSERT (ELF_R_TYPE(elf_reloc->r_info)
611 < (unsigned int) R_PARISC_UNIMPLEMENTED);
612 bfd_reloc->howto = &elf_hppa_howto_table[ELF_R_TYPE (elf_reloc->r_info)];
615 /* Return the address of the howto table entry to perform the CODE
616 relocation for an ARCH machine. */
618 static reloc_howto_type *
619 elf_hppa_reloc_type_lookup (abfd, code)
620 bfd *abfd ATTRIBUTE_UNUSED;
621 bfd_reloc_code_real_type code;
623 if ((int) code < (int) R_PARISC_UNIMPLEMENTED)
625 BFD_ASSERT ((int) elf_hppa_howto_table[(int) code].type == (int) code);
626 return &elf_hppa_howto_table[(int) code];
632 elf_hppa_final_write_processing (abfd, linker)
634 boolean linker ATTRIBUTE_UNUSED;
636 int mach = bfd_get_mach (abfd);
638 elf_elfheader (abfd)->e_flags &= ~(EF_PARISC_ARCH | EF_PARISC_TRAPNIL
639 | EF_PARISC_EXT | EF_PARISC_LSB
640 | EF_PARISC_WIDE | EF_PARISC_NO_KABP
641 | EF_PARISC_LAZYSWAP);
644 elf_elfheader (abfd)->e_flags |= EFA_PARISC_1_0;
646 elf_elfheader (abfd)->e_flags |= EFA_PARISC_1_1;
648 elf_elfheader (abfd)->e_flags |= EFA_PARISC_2_0;
650 elf_elfheader (abfd)->e_flags |= EF_PARISC_WIDE | EFA_PARISC_2_0;
653 /* Return true if SYM represents a local label symbol. */
656 elf_hppa_is_local_label_name (abfd, name)
657 bfd *abfd ATTRIBUTE_UNUSED;
660 return (name[0] == 'L' && name[1] == '$');
663 /* Set the correct type for an ELF section. We do this by the
664 section name, which is a hack, but ought to work. */
667 elf_hppa_fake_sections (abfd, hdr, sec)
669 Elf64_Internal_Shdr *hdr;
672 register const char *name;
674 name = bfd_get_section_name (abfd, sec);
676 if (strcmp (name, ".PARISC.unwind") == 0)
680 hdr->sh_type = SHT_LOPROC + 1;
681 /* ?!? How are unwinds supposed to work for symbols in arbitrary
682 sections? Or what if we have multiple .text sections in a single
683 .o file? HP really messed up on this one.
685 Ugh. We can not use elf_section_data (sec)->this_idx at this
686 point because it is not initialized yet.
688 So we (gasp) recompute it here. Hopefully nobody ever changes the
689 way sections are numbered in elf.c! */
690 for (sec = abfd->sections, indx = 1; sec; sec = sec->next, indx++)
692 if (sec->name && strcmp (sec->name, ".text") == 0)
699 /* I have no idea if this is really necessary or what it means. */
705 /* Hook called by the linker routine which adds symbols from an object
706 file. HP's libraries define symbols with HP specific section
707 indices, which we have to handle. */
710 elf_hppa_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
712 struct bfd_link_info *info ATTRIBUTE_UNUSED;
713 const Elf_Internal_Sym *sym;
714 const char **namep ATTRIBUTE_UNUSED;
715 flagword *flagsp ATTRIBUTE_UNUSED;
719 int index = sym->st_shndx;
723 case SHN_PARISC_ANSI_COMMON:
724 *secp = bfd_make_section_old_way (abfd, ".PARISC.ansi.common");
725 (*secp)->flags |= SEC_IS_COMMON;
726 *valp = sym->st_size;
729 case SHN_PARISC_HUGE_COMMON:
730 *secp = bfd_make_section_old_way (abfd, ".PARISC.huge.common");
731 (*secp)->flags |= SEC_IS_COMMON;
732 *valp = sym->st_size;
739 /* Called after we have seen all the input files/sections, but before
740 final symbol resolution and section placement has been determined.
742 We use this hook to (possibly) provide a value for __gp, then we
743 fall back to the generic ELF final link routine. */
746 elf_hppa_final_link (abfd, info)
748 struct bfd_link_info *info;
750 /* Make sure we've got ourselves a suitable __gp value. */
751 if (!info->relocateable)
753 bfd_vma min_short_vma = (bfd_vma) -1, max_short_vma = 0;
754 struct elf_link_hash_entry *gp;
758 /* Find the min and max vma of all short sections. */
759 for (os = abfd->sections; os ; os = os->next)
763 if ((os->flags & SEC_ALLOC) == 0)
767 hi = os->vma + os->_raw_size;
771 /* This would be cleaner if we marked sections with an attribute
772 indicating they are short sections. */
773 if (strcmp (os->name, ".sbss") == 0
774 || strcmp (os->name, ".sdata") == 0)
776 if (min_short_vma > lo)
778 if (max_short_vma < hi)
783 /* See if the user wants to force a value. */
784 gp = elf_link_hash_lookup (elf_hash_table (info), "__gp", false,
788 && (gp->root.type == bfd_link_hash_defined
789 || gp->root.type == bfd_link_hash_defweak))
791 asection *gp_sec = gp->root.u.def.section;
792 gp_val = (gp->root.u.def.value
793 + gp_sec->output_section->vma
794 + gp_sec->output_offset);
796 else if (max_short_vma != 0)
798 /* Pick a sensible value. */
799 gp_val = min_short_vma;
801 /* If we don't cover all the short data, adjust. */
802 if (max_short_vma - gp_val >= 0x2000)
803 gp_val = min_short_vma + 0x2000;
805 /* If we're addressing stuff past the end, adjust back. */
806 if (gp_val > max_short_vma)
807 gp_val = max_short_vma - 0x2000 + 8;
809 /* If there was no __gp symbol, create one. */
811 gp = elf_link_hash_lookup (elf_hash_table (info), "__gp", true,
814 /* We now know the value for the global pointer, figure out which
815 section to shove it into and mark it as defined in the hash
817 for (os = abfd->sections; os ; os = os->next)
819 bfd_vma low = os->output_offset + os->output_section->vma;
820 bfd_vma high = low + os->_raw_size;
822 if (gp_val >= low && gp_val <= high)
824 gp->root.type = bfd_link_hash_defined;
825 gp->root.u.def.section = os;
826 gp->root.u.def.value = gp_val - low;
832 /* Validate whether all short sections are within
833 range of the chosen GP. */
835 if (max_short_vma != 0)
837 if (max_short_vma - min_short_vma >= 0x4000)
839 (*_bfd_error_handler)
840 (_("%s: short data segment overflowed (0x%lx >= 0x4000)"),
841 bfd_get_filename (abfd),
842 (unsigned long)(max_short_vma - min_short_vma));
845 else if ((gp_val > min_short_vma
846 && gp_val - min_short_vma > 0x2000)
847 || (gp_val < max_short_vma
848 && max_short_vma - gp_val >= 0x2000))
850 (*_bfd_error_handler)
851 (_("%s: __gp does not cover short data segment"),
852 bfd_get_filename (abfd));
857 _bfd_set_gp_value (abfd, gp_val);
860 /* Invoke the regular ELF backend linker to do all the work. */
861 return bfd_elf_bfd_final_link (abfd, info);
864 /* Relocate an HPPA ELF section. */
867 elf_hppa_relocate_section (output_bfd, info, input_bfd, input_section,
868 contents, relocs, local_syms, local_sections)
870 struct bfd_link_info *info;
872 asection *input_section;
874 Elf_Internal_Rela *relocs;
875 Elf_Internal_Sym *local_syms;
876 asection **local_sections;
878 Elf_Internal_Shdr *symtab_hdr;
879 Elf_Internal_Rela *rel;
880 Elf_Internal_Rela *relend;
882 symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
885 relend = relocs + input_section->reloc_count;
886 for (; rel < relend; rel++)
889 reloc_howto_type *howto;
890 unsigned long r_symndx;
891 struct elf_link_hash_entry *h;
892 Elf_Internal_Sym *sym;
895 bfd_reloc_status_type r;
896 const char *sym_name;
898 r_type = ELF_R_TYPE (rel->r_info);
899 if (r_type < 0 || r_type >= (int) R_PARISC_UNIMPLEMENTED)
901 bfd_set_error (bfd_error_bad_value);
904 howto = elf_hppa_howto_table + r_type;
906 r_symndx = ELF_R_SYM (rel->r_info);
908 if (info->relocateable)
910 /* This is a relocateable link. We don't have to change
911 anything, unless the reloc is against a section symbol,
912 in which case we have to adjust according to where the
913 section symbol winds up in the output section. */
914 if (r_symndx < symtab_hdr->sh_info)
916 sym = local_syms + r_symndx;
917 if (ELF_ST_TYPE (sym->st_info) == STT_SECTION)
919 sym_sec = local_sections[r_symndx];
920 rel->r_addend += sym_sec->output_offset;
927 /* This is a final link. */
931 if (r_symndx < symtab_hdr->sh_info)
933 sym = local_syms + r_symndx;
934 sym_sec = local_sections[r_symndx];
935 relocation = ((ELF_ST_TYPE (sym->st_info) == STT_SECTION
937 + sym_sec->output_offset
938 + sym_sec->output_section->vma);
944 indx = r_symndx - symtab_hdr->sh_info;
945 h = elf_sym_hashes (input_bfd)[indx];
946 while (h->root.type == bfd_link_hash_indirect
947 || h->root.type == bfd_link_hash_warning)
948 h = (struct elf_link_hash_entry *) h->root.u.i.link;
949 if (h->root.type == bfd_link_hash_defined
950 || h->root.type == bfd_link_hash_defweak)
952 sym_sec = h->root.u.def.section;
953 relocation = (h->root.u.def.value
954 + sym_sec->output_offset
955 + sym_sec->output_section->vma);
957 else if (h->root.type == bfd_link_hash_undefweak)
961 if (!((*info->callbacks->undefined_symbol)
962 (info, h->root.root.string, input_bfd,
963 input_section, rel->r_offset)))
970 sym_name = h->root.root.string;
973 sym_name = bfd_elf_string_from_elf_section (input_bfd,
976 if (sym_name == NULL)
978 if (*sym_name == '\0')
979 sym_name = bfd_section_name (input_bfd, sym_sec);
982 r = elf_hppa_final_link_relocate (howto, input_bfd, output_bfd,
983 input_section, contents,
984 rel->r_offset, relocation,
985 rel->r_addend, info, sym_sec,
986 sym_name, h == NULL);
988 if (r != bfd_reloc_ok)
994 case bfd_reloc_overflow:
996 if (!((*info->callbacks->reloc_overflow)
997 (info, sym_name, howto->name, (bfd_vma) 0,
998 input_bfd, input_section, rel->r_offset)))
1009 /* Actually perform a relocation as part of a final link. */
1011 static bfd_reloc_status_type
1012 elf_hppa_final_link_relocate (howto, input_bfd, output_bfd,
1013 input_section, contents, offset, value,
1014 addend, info, sym_sec, sym_name, is_local)
1015 reloc_howto_type *howto;
1017 bfd *output_bfd ATTRIBUTE_UNUSED;
1018 asection *input_section;
1023 struct bfd_link_info *info;
1025 const char *sym_name;
1029 unsigned long r_type = howto->type;
1030 unsigned long r_format = howto->bitsize;
1031 unsigned long r_field = e_fsel;
1032 bfd_byte *hit_data = contents + offset;
1033 boolean r_pcrel = howto->pc_relative;
1035 insn = bfd_get_32 (input_bfd, hit_data);
1037 /* For reference here a quick summary of the relocations found in the
1038 HPUX 11.00 PA64 .o and .a files, but not yet implemented. This is mostly
1039 a guide to help prioritize what relocation support is worked on first.
1040 The list will be deleted eventually.
1042 27210 R_PARISC_SEGREL32
1043 8284 R_PARISC_DLTIND21L
1044 8218 R_PARISC_DLTIND14DR
1045 6675 R_PARISC_FPTR64
1047 1584 R_PARISC_LTOFF_FPTR14DR
1048 1565 R_PARISC_LTOFF_FPTR21L
1049 1120 R_PARISC_PCREL64
1050 1096 R_PARISC_LTOFF_TP14DR
1051 982 R_PARISC_LTOFF_TP21L
1052 791 R_PARISC_GPREL64
1053 772 R_PARISC_PLTOFF14DR
1054 386 R_PARISC_PLTOFF21L
1057 1 R_PARISC_DLTIND14R
1059 1 R_PARISC_PCREL14R */
1066 case R_PARISC_PCREL22F:
1067 case R_PARISC_PCREL17F:
1072 /* Find out where we are and where we're going. */
1073 location = (offset +
1074 input_section->output_offset +
1075 input_section->output_section->vma);
1077 insn = elf_hppa_relocate_insn (output_bfd, input_section, insn,
1078 offset, value, addend, r_type,
1083 case R_PARISC_DLTREL14R:
1084 case R_PARISC_DLTREL14DR:
1085 case R_PARISC_DLTREL14WR:
1090 /* Find out where we are and where we're going. */
1091 location = (offset +
1092 input_section->output_offset +
1093 input_section->output_section->vma);
1095 insn = elf_hppa_relocate_insn (output_bfd, input_section, insn,
1096 offset, value, addend, r_type,
1101 case R_PARISC_DLTREL21L:
1106 /* Find out where we are and where we're going. */
1107 location = (offset +
1108 input_section->output_offset +
1109 input_section->output_section->vma);
1111 insn = elf_hppa_relocate_insn (output_bfd, input_section, insn,
1112 offset, value, addend, r_type,
1118 /* Something we don't know how to handle. */
1120 /* ?!? This is temporary as we flesh out basic linker support, once
1121 the basic support is functional we will return the not_supported
1122 error conditional appropriately. */
1124 return bfd_reloc_not_supported;
1126 return bfd_reloc_ok;
1130 /* Update the instruction word. */
1131 bfd_put_32 (input_bfd, insn, hit_data);
1132 return (bfd_reloc_ok);
1135 /* Relocate the given INSN given the various input parameters. */
1137 static unsigned long
1138 elf_hppa_relocate_insn (abfd, input_sect, insn, address, sym_value,
1139 r_addend, r_type, r_field, pcrel)
1141 asection *input_sect;
1143 unsigned long address;
1146 unsigned long r_type;
1147 unsigned long r_field;
1148 unsigned long pcrel;
1150 long constant_value;
1154 /* This is any 17 or 22bit PC-relative branch. In PA2.0 syntax it
1155 corresponds to the "B" instruction. */
1156 case R_PARISC_PCREL22F:
1157 case R_PARISC_PCREL17F:
1158 /* Turn SYM_VALUE into a proper PC relative address. */
1159 sym_value -= (address + input_sect->output_offset
1160 + input_sect->output_section->vma);
1162 /* Adjust for any field selectors. */
1163 sym_value = hppa_field_adjust (sym_value, -8, r_field);
1165 /* All PC relative branches are implicitly shifted by 2 places. */
1168 /* Now determine if this is a 17 or 22 bit branch and take
1169 appropriate action. */
1170 if (((insn >> 13) & 0x7) == 0x4
1171 || ((insn >> 13) & 0x7) == 0x5)
1173 unsigned int w3, w2, w1, w;
1175 /* These are 22 bit branches. Mask off bits we do not care
1177 sym_value &= 0x3fffff;
1179 /* Now extract the W1, W2, W3 and W fields from the value. */
1180 dis_assemble_22 (sym_value, &w3, &w1, &w2, &w);
1182 /* Mask out bits for the value in the instruction. */
1185 /* Insert the bits for the W1, W2 and W fields into the
1187 insn |= (w3 << 21) | (w2 << 2) | (w1 << 16) | w;
1192 unsigned int w2, w1, w;
1193 /* These are 17 bit branches. Mask off bits we do not care
1195 sym_value &= 0x1ffff;
1197 /* Now extract the W1, W2 and W fields from the value. */
1198 dis_assemble_17 (sym_value, &w1, &w2, &w);
1200 /* Mask out bits for the value in the instruction. */
1203 /* Insert the bits for the W1, W2 and W fields into the
1205 insn |= (w2 << 2) | (w1 << 16) | w;
1209 /* This corresponds to any 17 bit absolute branch. */
1210 case R_PARISC_DIR17F:
1212 unsigned int w2, w1, w;
1214 /* Adjust for any field selectors. */
1215 sym_value = hppa_field_adjust (sym_value, 0, r_field);
1217 /* All absolute branches are implicitly shifted by 2 places. */
1220 /* These are 17 bit branches. Mask off bits we do not care
1222 sym_value &= 0x1ffff;
1224 /* Now extract the W1, W2 and W fields from the value. */
1225 dis_assemble_17 (sym_value, &w1, &w2, &w);
1227 /* Mask out bits for the value in the instruction. */
1230 /* Insert the bits for the W1, W2 and W fields into the
1232 insn |= (w2 << 2) | (w1 << 16) | w;
1236 case R_PARISC_DLTREL21L:
1240 /* Subtract out the global pointer value. */
1241 sym_value -= _bfd_get_gp_value (abfd);
1243 /* Apply the desired field selector (R_FIELD). */
1244 sym_value = hppa_field_adjust (sym_value, r_addend, r_field);
1246 /* Mask off bits in INSN we do not want. */
1249 /* Turn the 21bit value into the proper format. */
1250 dis_assemble_21 (sym_value, &w);
1252 /* And insert the proper bits into INSN. */
1256 case R_PARISC_DLTREL14R:
1260 /* Subtract out the global pointer value. */
1261 sym_value -= _bfd_get_gp_value (abfd);
1263 /* Apply the desired field selector (R_FIELD). */
1264 sym_value = hppa_field_adjust (sym_value, r_addend, r_field);
1266 /* Mask off bits in INSN we do not want. */
1269 /* Turn the 14bit value into the proper format. */
1270 low_sign_unext (sym_value, 14, &w);
1272 /* And insert the proper bits into INSN. */
1276 /* This is similar to a DLTREL14R relocation, except that it applies
1277 to doubleword load/store instructions which have a slightly different
1278 bit encoding for the displacement than singleword load/store
1280 case R_PARISC_DLTREL14DR:
1284 /* Subtract out the global pointer value. */
1285 sym_value -= _bfd_get_gp_value (abfd);
1287 /* Apply the desired field selector (R_FIELD). */
1288 sym_value = hppa_field_adjust (sym_value, r_addend, r_field);
1290 /* Mask off bits in INSN we do not want. */
1293 /* The sign bit at 14 moves into bit zero in the destination. */
1294 insn |= ((sym_value & 0x2000) >> 13);
1296 /* Turn off the bits in sym_value we do not care about. */
1297 sym_value &= 0x1ff8;
1299 /* Now shift it one bit position left so that it lines up with the
1300 destination field in INSN. */
1303 return insn | sym_value;
1306 /* This is similar to DLTREL14R and DLTREL14DR relocation, except that it
1307 applies to floating point single word load store instructions which
1308 have a different encoding than other load/store instructions. */
1309 case R_PARISC_DLTREL14WR:
1313 /* Subtract out the global pointer value. */
1314 sym_value -= _bfd_get_gp_value (abfd);
1316 /* Apply the desired field selector (R_FIELD). */
1317 sym_value = hppa_field_adjust (sym_value, r_addend, r_field);
1319 /* Mask off bits in INSN we do not want. */
1322 /* The sign bit at 14 moves into bit zero in the destination. */
1323 insn |= ((sym_value & 0x2000) >> 13);
1325 /* Turn off the bits in sym_value we do not care about. */
1326 sym_value &= 0x1ffc;
1328 /* Now shift it one bit position left so that it lines up with the
1329 destination field in INSN. */
1332 return insn | sym_value;