1 2017-12-06 Alan Modra <amodra@gmail.com>
3 * doc/header.sed: Trim trailing space when splitting lines.
4 * aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-cris.c,
5 * aout-ns32k.c, * aout-target.h, * aout-tic30.c, * aoutf1.h, * aoutx.h,
6 * arc-got.h, * arc-plt.def, * arc-plt.h, * archive.c, * archive64.c,
7 * archures.c, * armnetbsd.c, * bfd-in.h, * bfd.c, * bfdio.c, * binary.c,
8 * bout.c, * cache.c, * cisco-core.c, * coff-alpha.c, * coff-apollo.c,
9 * coff-arm.c, * coff-h8300.c, * coff-i386.c, * coff-i860.c,
10 * coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mcore.c,
11 * coff-mips.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c,
12 * coff-stgo32.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c,
13 * coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c,
14 * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c,
15 * coffswap.h, * compress.c, * corefile.c, * cpu-alpha.c, * cpu-arm.c,
16 * cpu-avr.c, * cpu-bfin.c, * cpu-cr16.c, * cpu-cr16c.c, * cpu-crx.c,
17 * cpu-d10v.c, * cpu-frv.c, * cpu-ft32.c, * cpu-i370.c, * cpu-i960.c,
18 * cpu-ia64-opc.c, * cpu-ip2k.c, * cpu-lm32.c, * cpu-m32r.c,
19 * cpu-mcore.c, * cpu-microblaze.c, * cpu-mips.c, * cpu-moxie.c,
20 * cpu-mt.c, * cpu-nios2.c, * cpu-ns32k.c, * cpu-or1k.c, * cpu-powerpc.c,
21 * cpu-pru.c, * cpu-sh.c, * cpu-spu.c, * cpu-v850.c, * cpu-v850_rh850.c,
22 * cpu-xgate.c, * cpu-z80.c, * dwarf1.c, * dwarf2.c, * ecoff.c,
23 * ecofflink.c, * ecoffswap.h, * elf-bfd.h, * elf-eh-frame.c,
24 * elf-hppa.h, * elf-m10200.c, * elf-m10300.c, * elf-s390-common.c,
25 * elf-strtab.c, * elf-vxworks.c, * elf.c, * elf32-am33lin.c,
26 * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-avr.h,
27 * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c,
28 * elf32-crx.c, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c,
29 * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c,
30 * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c, * elf32-i860.c,
31 * elf32-i960.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32c.c,
32 * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68hc1x.c,
33 * elf32-m68hc1x.h, * elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c,
34 * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c,
35 * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c,
36 * elf32-nds32.h, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c,
37 * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c,
38 * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score.h,
39 * elf32-score7.c, * elf32-sh-symbian.c, * elf32-sh.c, * elf32-sh64.c,
40 * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilegx.c,
41 * elf32-tilegx.h, * elf32-tilepro.c, * elf32-tilepro.h, * elf32-v850.c,
42 * elf32-vax.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c,
43 * elf32-xgate.h, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c,
44 * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c,
45 * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c,
46 * elf64-tilegx.c, * elf64-tilegx.h, * elf64-x86-64.c, * elfcore.h,
47 * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c,
48 * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-aarch64.h, * elfxx-ia64.c,
49 * elfxx-ia64.h, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-sparc.c,
50 * elfxx-tilegx.c, * elfxx-x86.c, * elfxx-x86.h, * freebsd.h, * hash.c,
51 * host-aout.c, * hp300hpux.c, * hppabsd-core.c, * hpux-core.c,
52 * i386aout.c, * i386linux.c, * i386lynx.c, * i386mach3.c, * i386msdos.c,
53 * i386netbsd.c, * ieee.c, * ihex.c, * irix-core.c, * libaout.h,
54 * libbfd-in.h, * libbfd.c, * libcoff-in.h, * libnlm.h, * libpei.h,
55 * libxcoff.h, * linker.c, * lynx-core.c, * m68k4knetbsd.c,
56 * m68klinux.c, * m68knetbsd.c, * m88kmach3.c, * mach-o-aarch64.c,
57 * mach-o-arm.c, * mach-o-i386.c, * mach-o-target.c, * mach-o-x86-64.c,
58 * mach-o.c, * mach-o.h, * merge.c, * mipsbsd.c, * mmo.c, * netbsd.h,
59 * netbsd-core.c, * newsos3.c, * nlm-target.h, * nlm32-ppc.c,
60 * nlm32-sparc.c, * nlmcode.h, * ns32k.h, * ns32knetbsd.c, * oasys.c,
61 * opncls.c, * pc532-mach.c, * pdp11.c, * pe-arm.c, * pe-i386.c,
62 * pe-mcore.c, * pe-mips.c, * pe-x86_64.c, * peXXigen.c, * pef.c,
63 * pef.h, * pei-arm.c, * pei-i386.c, * pei-mcore.c, * pei-x86_64.c,
64 * peicode.h, * plugin.c, * ppcboot.c, * ptrace-core.c, * reloc.c,
65 * riscix.c, * rs6000-core.c, * section.c, * som.c, * som.h,
66 * sparclinux.c, * sparcnetbsd.c, * srec.c, * stabs.c, * sunos.c,
67 * syms.c, * targets.c, * tekhex.c, * trad-core.c, * vax1knetbsd.c,
68 * vaxnetbsd.c, * verilog.c, * versados.c, * vms-alpha.c, * vms-lib.c,
69 * vms-misc.c, * wasm-module.c, * wasm-module.h, * xcofflink.c,
70 * xsym.c, * xsym.h: Whitespace fixes.
71 * bfd-in2.h, * libbfd.h, * libcoff.h: Regenerate.
73 2017-12-06 Alan Modra <amodra@gmail.com>
75 * elf32-lm32.c (lm32_elf_check_relocs): Skip non-ALLOC sections.
76 * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
77 * elf32-nds32.c (nds32_elf_check_relocs): Likewise.
78 * elf32-or1k.c (or1k_elf_check_relocs): Likewise.
79 * elf32-sh.c (sh_elf_check_relocs): Likewise.
81 2017-12-06 Alan Modra <amodra@gmail.com>
83 * elf32-hppa.c (struct elf32_hppa_dyn_reloc_entry): Delete. Use
84 struct elf_dyn_relocs throughout file instead.
85 (elf32_hppa_adjust_dynamic_symbol): Comment tidy.
86 * elf32-lm32.c (struct elf_lm32_dyn_relocs): Delete. Use
87 struct elf_dyn_relocs throughout file instead.
88 (lm32_elf_adjust_dynamic_symbol): Use readonly_dynrelocs.
89 * elf32-m32r.c (struct elf_m32r_dyn_relocs): Delete. Use
90 struct elf_dyn_relocs throughout file instead.
91 (m32r_elf_adjust_dynamic_symbol): Use readonly_dynrelocs, but disable.
92 Disable -z no-copyreloc too.
93 * elf32-metag.c (struct elf_metag_dyn_reloc_entry): Delete. Use
94 struct elf_dyn_relocs throughout file instead.
95 (elf_metag_adjust_dynamic_symbol): Use readonly_dynrelocs.
96 * elf32-microblaze.c (struct elf32_mb_dyn_relocs): Delete. Use
97 struct elf_dyn_relocs throughout file instead.
98 (readonly_dynrelocs): New function.
99 (microblaze_elf_adjust_dynamic_symbol): Use it.
100 * elf32-nds32.c (struct elf_nds32_dyn_relocs): Delete. Use
101 struct elf_dyn_relocs throughout file instead.
102 (nds32_elf_adjust_dynamic_symbol): Use readonly_dynrelocs, but disable.
103 Disable -z no-copyreloc too.
104 * elf32-nios2.c (struct elf32_nios2_dyn_relocs): Delete. Use
105 struct elf_dyn_relocs throughout file instead.
106 * elf32-or1k.c (struct elf_or1k_dyn_relocs): Delete. Use
107 struct elf_dyn_relocs throughout file instead.
108 (or1k_elf_adjust_dynamic_symbol): Use readonly_dynrelocs.
109 * elf32-sh.c (struct elf_sh_dyn_relocs): Delete. Use
110 struct elf_dyn_relocs throughout file instead.
111 (sh_elf_adjust_dynamic_symbol): Use readonly_dynrelocs, but disable.
112 Disable -z no-copyreloc too.
113 * elf32-tilepro.c (struct tilepro_elf_dyn_relocs): Delete. Use
114 struct elf_dyn_relocs throughout file instead.
115 (tilepro_elf_adjust_dynamic_symbol): Use readonly_dynrelocs.
116 * elfnn-riscv.c (struct riscv_elf_dyn_relocs): Delete. Use
117 struct elf_dyn_relocs throughout file instead.
118 (riscv_elf_adjust_dynamic_symbol): Use readonly_dynrelocs.
119 * elfxx-sparc.c (struct _bfd_sparc_elf_dyn_relocs): Delete. Use
120 struct elf_dyn_relocs throughout file instead.
121 (_bfd_sparc_elf_adjust_dynamic_symbol): Use readonly_dynrelocs.
122 * elfxx-tilegx.c (struct tilegx_elf_dyn_relocs): Delete. Use
123 struct elf_dyn_relocs throughout file instead.
124 (tilegx_elf_adjust_dynamic_symbol): Use readonly_dynrelocs.
125 * elf32-s390.c (elf_s390_adjust_dynamic_symbol): Use readonly_dynrelocs.
126 * elf64-s390.c (elf_s390_adjust_dynamic_symbol): Use readonly_dynrelocs.
128 2017-12-06 Alan Modra <amodra@gmail.com>
130 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Comment tidy.
131 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
132 * elfnn-aarch64.c (elfNN_aarch64_adjust_dynamic_symbol): Likewise.
134 2017-12-04 Alan Modra <amodra@gmail.com>
136 * elfxx-x86.c (readonly_dynrelocs): New function.
137 (maybe_set_textrel): New function. Always prints via minfo and
138 correct "readonly" to "read-only" in warning message., replacing..
139 (_bfd_x86_elf_readonly_dynrelocs): ..this.
140 (_bfd_x86_elf_size_dynamic_sections): Correct "readonly" to
141 "read-only" in warning message. Formatting.
142 (_bfd_x86_elf_adjust_dynamic_symbol): Use readonly_dynrelocs.
143 * linker.c (bfd_link_hash_traverse): Comment typo fix.
145 2017-12-01 H.J. Lu <hongjiu.lu@intel.com>
147 * elfxx-x86.c (_bfd_x86_elf_readonly_dynrelocs): Print symbol
150 2017-12-01 Alan Modra <amodra@gmail.com>
152 * elf32-hppa.c (maybe_set_textrel): Print symbol for map file output.
153 * elf32-ppc.c (maybe_set_textrel): Likewise.
154 * elf64-ppc.c (maybe_set_textrel): Likewise.
155 * elf32-arm.c (readonly_dynrelocs): New function.
156 (maybe_set_textrel): New function, replacing..
157 (elf32_arm_readonly_dynrelocs): ..this.
158 * elf32-lm32.c (readonly_dynrelocs): New function.
159 (maybe_set_textrel): New function, replacing old version of..
160 (readonly_dynrelocs): ..this.
161 * elf32-m32r.c (readonly_dynrelocs): New function.
162 (maybe_set_textrel): New function, replacing old version of..
163 (readonly_dynrelocs): ..this.
164 * elf32-metag.c (readonly_dynrelocs): New function.
165 (maybe_set_textrel): New function, replacing old version of..
166 (readonly_dynrelocs): ..this.
167 * elf32-nds32.c: Delete unnecessary forward declarations.
168 (readonly_dynrelocs): New function.
169 (maybe_set_textrel): New function, replacing old version of..
170 (readonly_dynrelocs): ..this.
171 * elf32-or1k.c (readonly_dynrelocs): New function.
172 (maybe_set_textrel): New function, replacing old version of..
173 (readonly_dynrelocs): ..this.
174 * elf32-s390.c (readonly_dynrelocs): New function.
175 (maybe_set_textrel): New function, replacing old version of..
176 (readonly_dynrelocs): ..this.
177 * elf32-sh.c (readonly_dynrelocs): New function.
178 (maybe_set_textrel): New function, replacing old version of..
179 (readonly_dynrelocs): ..this.
180 * elf32-tic6x.c (readonly_dynrelocs): New function.
181 (maybe_set_textrel): New function, replacing..
182 (elf32_tic6x_readonly_dynrelocs): ..this.
183 * elf32-tilepro.c (readonly_dynrelocs): New function.
184 (maybe_set_textrel): New function, replacing old version of..
185 (readonly_dynrelocs): ..this.
186 * elf64-s390.c (readonly_dynrelocs): New function.
187 (maybe_set_textrel): New function, replacing old version of..
188 (readonly_dynrelocs): ..this.
189 * elfnn-aarch64.c (readonly_dynrelocs): New function.
190 (maybe_set_textrel): New function, replacing..
191 (aarch64_readonly_readonly_dynrelocs): ..this.
192 * elfnn-riscv.c (readonly_dynrelocs): New function.
193 (maybe_set_textrel): New function, replacing old version of..
194 (readonly_dynrelocs): ..this.
195 * elfxx-sparc.c (readonly_dynrelocs): New function.
196 (maybe_set_textrel): New function, replacing old version of..
197 (readonly_dynrelocs): ..this.
198 * elfxx-tilegx.c (readonly_dynrelocs): New function.
199 (maybe_set_textrel): New function, replacing old version of..
200 (readonly_dynrelocs): ..this.
202 2017-12-01 Alan Modra <amodra@gmail.com>
205 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Don't do anything
206 special with non_got_ref for weak aliases.
207 (elf32_hppa_check_relocs): Tweak setting of non_got_ref.
208 (elf32_hppa_adjust_dynamic_symbol): When initialising weak aliases,
209 don't uselessly copy non_got_ref. Clear dyn_relocs instead if
210 strong symbol is allocated in dynbss. Tidy comments.
211 (elf32_hppa_relocate_section): Comment fix.
212 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Don't do anything
213 special with non_got_ref for weak aliases.
214 (ppc_elf_adjust_dynamic_symbol): When initialising weak aliases,
215 don't uselessly copy non_got_ref. Clear dyn_relocs instead if
216 strong symbol is allocated in dynbss. Tidy comments.
217 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't do anything
218 special with non_got_ref for weak aliases.
219 (ppc64_elf_adjust_dynamic_symbol): When initialising weak aliases,
220 don't uselessly copy non_got_ref. Clear dyn_relocs instead if
221 strong symbol is allocated in dynbss. Tidy comments.
223 2017-11-29 Nick Clifton <nickc@redhat.com>
226 * coffcode.h (coff_slurp_reloc_table): Check for a NULL symbol
227 pointer when processing relocs.
229 2017-11-29 Stefan Stroe <stroestefan@gmail.com>
231 * po/Make-in (datadir): Define as @datadir@.
232 (localedir): Define as @localedir@.
233 (gnulocaledir, gettextsrcdir): Use @datarootdir@.
235 2017-11-28 Nick Clifton <nickc@redhat.com>
238 * coffgen.c (_bfd_coff_read_string_table): Check for an excessive
239 size of the external string table.
241 2017-11-28 Nick Clifton <nickc@redhat.com>
244 * reloc.c (reloc_offset_in_range): Rename to
245 bfd_reloc_offset_in_range and export.
246 (bfd_perform_relocation): Rename function invocation.
247 (bfd_install_relocation): Likewise.
248 (bfd_final_link_relocate): Likewise.
249 * bfd-in2.h: Regenerate.
250 * coff-arm.c (coff_arm_reloc): Use bfd_reloc_offset_in_range.
251 * coff-i386.c (coff_i386_reloc): Likewise.
252 * coff-i860.c (coff_i860_reloc): Likewise.
253 * coff-m68k.c (mk68kcoff_common_addend_special_fn): Likewise.
254 * coff-m88k.c (m88k_special_reloc): Likewise.
255 * coff-mips.c (mips_reflo_reloc): Likewise.
256 * coff-x86_64.c (coff_amd64_reloc): Likewise.
258 2017-11-28 H.J. Lu <hongjiu.lu@intel.com>
260 * elf-m10300.c (mn10300_elf_check_relocs): Don't set
262 * elf32-arm.c (elf32_arm_check_relocs): Likewise.
263 * elf32-bfin.c (bfin_check_relocs): Likewise.
264 * elf32-cr16.c (cr16_elf_check_relocs): Likewise.
265 * elf32-cris.c (cris_elf_check_relocs): Likewise.
266 * elf32-d10v.c (elf32_d10v_check_relocs): Likewise.
267 * elf32-dlx.c (elf32_dlx_check_relocs): Likewise.
268 * elf32-fr30.c (fr30_elf_check_relocs): Likewise.
269 * elf32-frv.c (elf32_frv_check_relocs): Likewise.
270 * elf32-hppa.c (elf32_hppa_check_relocs): Likewise.
271 * elf32-i370.c (i370_elf_check_relocs): Likewise.
272 * elf32-i386.c (elf_i386_check_relocs): Likewise.
273 * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
274 * elf32-lm32.c (lm32_elf_check_relocs): Likewise.
275 * elf32-m32c.c (m32c_elf_check_relocs): Likewise.
276 * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
277 * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise.
278 * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
279 * elf32-mcore.c (mcore_elf_check_relocs): Likewise.
280 * elf32-metag.c (elf_metag_check_relocs): Likewise.
281 * elf32-microblaze.c (microblaze_elf_check_relocs): Likewise.
282 * elf32-moxie.c (moxie_elf_check_relocs): Likewise.
283 * elf32-msp430.c (elf32_msp430_check_relocs): Likewise.
284 * elf32-mt.c (mt_elf_check_relocs): Likewise.
285 * elf32-nios2.c (nios2_elf32_check_relocs): Likewise.
286 * elf32-or1k.c (or1k_elf_check_relocs): Likewise.
287 * elf32-ppc.c (ppc_elf_check_relocs): Likewise.
288 * elf32-rl78.c (rl78_elf_check_relocs): Likewise.
289 * elf32-s390.c (elf_s390_check_relocs): Likewise.
290 * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
291 * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
292 * elf32-sh.c (sh_elf_check_relocs): Likewise.
293 * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
294 * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
295 * elf32-v850.c (v850_elf_check_relocs): Likewise.
296 * elf32-vax.c (elf_vax_check_relocs): Likewise.
297 * elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise.
298 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
299 * elf64-aarch64.c (elf64_aarch64_check_relocs): Likewise.
300 * elf64-alpha.c (elf64_alpha_check_relocs): Likewise.
301 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
302 * elf64-ia64-vms.c (elf64_ia64_check_relocs): Likewise.
303 * elf64-mmix.c (mmix_elf_check_relocs): Likewise.
304 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
305 * elf64-s390.c (elf_s390_check_relocs): Likewise.
306 * elf64-sh64.c (sh_elf64_check_relocs): Likewise.
307 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
308 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Likewise.
309 * elfnn-ia64.c (elfNN_ia64_check_relocs): Likewise.
310 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
311 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
312 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
313 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
315 2017-11-28 Alan Modra <amodra@gmail.com>
318 * elflink.c (_bfd_elf_merge_symbol): Allow weak symbols to override
319 early passes over linker script symbols.
320 * linker.c (_bfd_generic_link_add_one_symbol): Allow symbols to
321 override early passes over linker script symbols. Clear ldscript_def
322 on symbol definitions.
324 2017-11-28 Alan Modra <amodra@gmail.com>
326 * elf64-mmix.c (bfd_elf64_bfd_copy_link_hash_symbol_type): Define.
328 2017-11-28 H.J. Lu <hongjiu.lu@intel.com>
331 * elflink.c (_bfd_elf_merge_symbol): Also skip definition from
333 (elf_link_add_object_symbols): If linker plugin is enabled, set
334 non_ir_ref_regular on symbols referenced in regular objects so
335 that linker plugin will get the correct symbol resolution.
337 2017-11-27 Szabolcs Nagy <szabolcs.nagy@arm.com>
340 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Use
341 bfd_link_executable instead of bfd_link_pic for TLS.
342 (elfNN_aarch64_allocate_dynrelocs): Likewise.
343 (aarch64_can_relax_tls): Likewise.
345 2017-11-27 Szabolcs Nagy <szabolcs.nagy@arm.com>
348 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Use
349 UNDEFWEAK_NO_DYNAMIC_RELOC to avoid dynamic GOT relocs.
350 (elfNN_aarch64_allocate_dynrelocs): Likewise.
352 2017-11-24 H.J. Lu <hongjiu.lu@intel.com>
355 * elf.c (elf_read_notes): Add an argument for note aligment.
356 (elf_parse_notes): Likewise.
357 (_bfd_elf_make_section_from_shdr): Pass section aligment to
359 (bfd_section_from_phdr): Pass segment aligment to elf_read_notes.
360 (elf_parse_notes): Add an argument for note aligment. Use
361 ELF_NOTE_DESC_OFFSET to get the offset of the note descriptor.
362 Use ELF_NOTE_NEXT_OFFSET to get the offset of the next note
364 (elf_read_notes): Add an argument for note aligment and pass it
367 2017-11-23 Alan Modra <amodra@gmail.com>
369 * elf32-hppa.c (pc_dynrelocs): Define.
370 (elf32_hppa_copy_indirect_symbol): Don't copy dyn_relocs to weakdefs.
371 (alias_readonly_dynrelocs): New function.
372 (elf32_hppa_adjust_dynamic_symbol): Don't clear non_got_ref to
373 indicate dyn_relocs should be discarded, discard them here.
374 Use alias_readonly_dynrelocs.
375 (allocate_dynrelocs): Don't test or clear non_got_ref.
376 (elf32_hppa_relocate_section): Simplify test for dynamic relocs.
377 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Don't copy dyn_relocs
379 (alias_readonly_dynrelocs, pc_dynrelocs): New functions.
380 (ppc_elf_adjust_dynamic_symbol): Don't clear non_got_ref to
381 indicate dyn_relocs should be discarded, discard them here.
382 Use alias_readonly_dynrelocs.
383 (allocate_dynrelocs): Don't test or clear non_got_ref.
384 (ppc_elf_relocate_section): Simplify test for dynamic relocs.
386 2017-11-23 Alan Modra <amodra@gmail.com>
388 * elf64-ppc.c (struct ppc_link_hash_entry): Delete weakref field.
389 (ppc64_elf_copy_indirect_symbol): Don't set weakref.
390 (alias_readonly_dynrelocs): Use u.alias rather than weakref.
391 (ppc64_elf_adjust_dynamic_symbol): Don't use
392 alias_readonly_dynrelocs for function symbols.
394 2017-11-23 Alan Modra <amodra@gmail.com>
396 * elf-bfd.h (struct elf_link_hash_entry): Add is_weakalias.
397 Rename u.weakdef to u.alias and update comment.
398 (weakdef): New static inline function.
399 * elflink.c (bfd_elf_record_link_assignment) Test is_weakalias
400 rather than u.weakdef != NULL, and use weakdef function.
401 (_bfd_elf_adjust_dynamic_symbol): Likewise.
402 (_bfd_elf_fix_symbol_flags): Likewise. Clear is_weakalias on
403 all aliases if def has been overridden in a regular object, not
405 (elf_link_add_object_symbols): Delete new_weakdef flag. Test
406 is_weakalias and use weakdef. Set is_weakalias and circular
407 u.alias. Update comments.
408 (_bfd_elf_gc_mark_rsec): Test is_weakalias rather than
409 u.weakdef != NULL and use weakdef function.
410 * elf-m10300.c (_bfd_mn10300_elf_adjust_dynamic_symbol): Test
411 is_weakalias rather than u.weakdef != NULL and use weakdef
412 function. Assert that def is strong defined.
413 * elf32-arc.c (elf_arc_adjust_dynamic_symbol): Likewise.
414 * elf32-arm.c (elf32_arm_adjust_dynamic_symbol): Likewise.
415 * elf32-bfin.c (elf32_bfinfdpic_adjust_dynamic_symbol): Likewise.
416 (bfin_adjust_dynamic_symbol): Likewise.
417 * elf32-cr16.c (_bfd_cr16_elf_adjust_dynamic_symbol): Likewise.
418 * elf32-cris.c (elf_cris_adjust_dynamic_symbol): Likewise.
419 * elf32-frv.c (elf32_frvfdpic_adjust_dynamic_symbol): Likewise.
420 * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Likewise.
421 * elf32-i370.c (i370_elf_adjust_dynamic_symbol): Likewise.
422 * elf32-lm32.c (lm32_elf_adjust_dynamic_symbol): Likewise.
423 * elf32-m32r.c (m32r_elf_adjust_dynamic_symbol): Likewise.
424 * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Likewise.
425 * elf32-metag.c (elf_metag_adjust_dynamic_symbol): Likewise.
426 * elf32-microblaze.c (microblaze_elf_adjust_dynamic_symbol): Likewise.
427 * elf32-nds32.c (nds32_elf_adjust_dynamic_symbol): Likewise.
428 * elf32-nios2.c (nios2_elf32_adjust_dynamic_symbol): Likewise.
429 * elf32-or1k.c (or1k_elf_adjust_dynamic_symbol): Likewise.
430 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Likewise.
431 * elf32-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
432 * elf32-score.c (s3_bfd_score_elf_adjust_dynamic_symbol): Likewise.
433 * elf32-score7.c (s7_bfd_score_elf_adjust_dynamic_symbol): Likewise.
434 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): Likewise.
435 * elf32-tic6x.c (elf32_tic6x_adjust_dynamic_symbol): Likewise.
436 * elf32-tilepro.c (tilepro_elf_gc_mark_hook): Likewise.
437 (tilepro_elf_adjust_dynamic_symbol): Likewise.
438 * elf32-vax.c (elf_vax_adjust_dynamic_symbol): Likewise.
439 * elf32-xtensa.c (elf_xtensa_adjust_dynamic_symbol): Likewise.
440 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Likewise.
441 * elf64-hppa.c (elf64_hppa_adjust_dynamic_symbol): Likewise.
442 * elf64-ia64-vms.c (elf64_ia64_adjust_dynamic_symbol): Likewise.
443 * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
444 (ppc64_elf_adjust_dynamic_symbol): Likewise.
445 * elf64-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
446 * elf64-sh64.c (sh64_elf64_adjust_dynamic_symbol): Likewise.
447 * elfnn-aarch64.c (elfNN_aarch64_adjust_dynamic_symbol): Likewise.
448 * elfnn-ia64.c (elfNN_ia64_adjust_dynamic_symbol): Likewise.
449 * elfnn-riscv.c (riscv_elf_adjust_dynamic_symbol): Likewise.
450 * elfxx-mips.c (_bfd_mips_elf_adjust_dynamic_symbol): Likewise.
451 * elfxx-sparc.c (_bfd_sparc_elf_gc_mark_hook): Likewise.
452 (_bfd_sparc_elf_adjust_dynamic_symbol): Likewise.
453 * elfxx-tilegx.c (tilegx_elf_gc_mark_hook): Likewise.
454 (tilegx_elf_adjust_dynamic_symbol): Likewise.
455 * elfxx-x86.c (_bfd_x86_elf_adjust_dynamic_symbol): Likewise.
457 2017-11-21 Alan Modra <amodra@gmail.com>
459 * elf-bfd.h (elf_symbol_from): Check for NULL symbol bfd.
460 * elfcode.h (elf_slurp_reloc_table_from_section): Add FIXME comment.
462 2017-11-20 Nick Clifton <nickc@redhat.com>
465 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Skip
466 objects without a GNU_PROPERTY note section when looking for a bfd
467 onto which notes can be accumulated.
469 2017-11-20 Alan Modra <amodra@gmail.com>
473 * elf.c (_bfd_elf_init_reloc_shdr): Delete "sec_hdr" parameter
474 and leave rel_hdr->sh_flags zero. Update calls.
475 (bfd_elf_set_group_contents): Check input rel/rela SHF_GROUP
476 flag when !gas before adding rel/rela section to group. Set
477 output rel/rela SHF_GROUP flags.
479 2017-11-18 Jim Wilson <jimw@sifive.com>
481 * elfnn-riscv.c (_bfd_riscv_relax_align): Add space between alignment
482 and to in error message.
484 2017-11-17 H.J. Lu <hongjiu.lu@intel.com>
486 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Pass
487 "%F%P:", instead of "%F:", to linker callback in case of error.
489 2017-11-16 Nick Clifton <nickc@redhat.com>
492 * elf.c (elfcore_grok_netbsd_procinfo): Check that the note is big enough.
493 (elfcore_grok_openbsd_procinfo): Likewise.
494 (elfcore_grok_nto_status): Likewise.
496 2017-11-16 Nick Clifton <nickc@redhat.com>
498 * merge.c (sec_merge_emit): Always create padding buffer. Add
499 asserts to make sure that the buffer is long enough.
501 2017-11-15 Alan Modra <amodra@gmail.com>
503 * bfd.c (union _bfd_doprnt_args): Add "Bad".
504 (_bfd_doprnt): Handle more flags.
505 (_bfd_doprnt_scan): Likewise. Tidy setting of args array.
506 (error_handler_internal): Init args type to Bad.
508 2017-11-14 Alan Modra <amodra@gmail.com>
511 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Warn on discarding
512 non-empty dynamic section.
513 (ppc_build_one_stub): Take elf_gp from output bfd, not output
515 (ppc_size_one_stub, ppc64_elf_next_toc_section): Likewise.
517 2017-11-14 Alan Modra <amodra@gmail.com>
519 * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for user
522 2017-11-13 Jan Beulich <jbeulich@suse.com>
524 * coff-tic80.c (COFF_ENCODE_ALIGNMENT, COFF_DECODE_ALIGNMENT):
526 * coffcode.h (coff_set_alignment_hook): Drop tic80 special case.
527 (coff_write_object_contents): Likewise. Issue diagnostic for too
530 2017-11-12 H.J. Lu <hongjiu.lu@intel.com>
533 * elf.c (_bfd_elf_map_sections_to_segments): Remove PF_X from
536 2017-11-12 Alan Modra <amodra@gmail.com>
538 * elflink.c (elf_link_add_object_symbols): Ignore anything but
539 defined and defweak symbols when setting up weakdefs.
541 2017-11-12 Alan Modra <amodra@gmail.com>
543 * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Set non_got_ref
544 to keep dyn_relocs, clear to discard. Comment.
545 (allocate_dynrelocs): Always clear non_got_ref when clearing
546 dyn_relocs in non-pic case. Invert non_got_ref test. Also test
547 dynamic_adjusted and ELF_COMMON_DEF_P. Move code deleting
548 dyn_relocs on undefined syms to handle for non-pic too.
549 (elf32_hppa_relocate_section): Simplify test for non-pic dyn relocs.
550 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Set non_got_ref
551 to keep dyn_relocs, clear to discard. Comment.
552 (allocate_dynrelocs): Always clear non_got_ref when clearing
553 dyn_relocs in non-pic case. Invert non_got_ref test. Also test
554 dynamic_adjusted and ELF_COMMON_DEF_P. Move code deleting
555 dyn_relocs on undefined syms to handle for non-pic too.
556 (ppc_elf_relocate_section): Simplify test for non-pic dyn relocs.
557 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Discard
558 dyn_relocs here. Don't bother setting non_got_ref. Comment.
559 (allocate_dynrelocs): Delete special handling of non-pic ELFv2
560 ifuncs. Move code deleting dyn_relocs on undefined symbols to
561 handle for non-pic too. Don't test non_got_ref. Do test
562 dynamic_adjusted and ELF_COMMON_DEF_P.
564 2017-11-08 Djordje Todorovic <djordje.todorovic@rt-rk.com>
566 * elf32-mips.c (elf32_mips_grok_psinfo): Extract core->pid.
567 * elf64-mips.c (elf64_mips_grok_psinfo): Likewise.
568 * elfn32-mips.c (elf32_mips_grok_psinfo): Likewise.
570 2017-11-08 Djordje Todorovic <djordje.todorovic@rt-rk.com>
572 * elf32-mips.c (elf32_mips_write_core_note): New function.
573 (elf_backend_write_core_note): New macro.
574 * elf64-mips.c (elf64_mips_write_core_note): New function.
575 (elf_backend_write_core_note): New macro.
576 * elfn32-mips.c (elf32_mips_write_core_note): New function.
577 (elf_backend_write_core_note): New macro.
579 2017-11-07 Alan Modra <amodra@gmail.com>
581 * elf64-ppc.c (ppc64_elf_build_stubs): Correct pluralization in
584 2017-11-07 Alan Modra <amodra@gmail.com>
586 * sysdep.h: Formatting, comment fixes.
587 (gettext, ngettext): Redefine when ENABLE_NLS.
588 (ngettext, dngettext, dcngettext): Define when !ENABLE_NLS.
589 (_): Define using gettext.
590 (textdomain, bindtextdomain): Use safer "do nothing".
591 * hosts/alphavms.h (textdomain, bindtextdomain): Likewise.
592 (ngettext, dngettext, dcngettext): Define when !ENABLE_NLS.
594 2017-11-05 Alan Modra <amodra@gmail.com>
597 * bfd.c (_bfd_doprnt_scan): Check args index before storing, not
600 2017-11-05 Alan Modra <amodra@gmail.com>
603 * bfd.c (union _bfd_doprnt_args): New.
604 (PRINT_TYPE): Add FIELD arg. Take value from args.
605 (_bfd_doprnt): Replace ap parameter with args. Adjust all
606 PRINT_TYPE invocations and reading of format args to suit.
607 Move "%%" handling out of switch handling args. Support
608 positional parameters.
609 (_bfd_doprnt_scan): New function.
610 (error_handler_internal): Call _bfd_doprnt_scan and read args.
612 2017-11-04 Alan Modra <amodra@gmail.com>
614 * elf32-ppc.c (got_entries_needed, got_relocs_needed): New functions.
615 (allocate_dynrelocs, ppc_elf_size_dynamic_sections): Use them here.
616 (ppc_elf_relocate_section): Don't output a dynamic relocation
617 for IE GOT entries in an executable.
618 * elf64-ppc.c (allocate_got): Trim unnecessary TPREL relocs.
619 (ppc64_elf_size_dynamic_sections): Likewise.
620 (ppc64_elf_relocate_section): Likewise.
622 2017-11-04 Alan Modra <amodra@gmail.com>
624 * elf32-ppc.c (readonly_dynrelocs): Delete info param. Update all
625 callers. Don't bother with SEC_ALLOC test. Return section pointer.
627 (maybe_set_textrel): ..here.
628 * elf64-ppc.c (readonly_dynrelocs): Return section pointer.
629 (maybe_set_textrel): Call minfo to print textrel warning to map file.
631 2017-11-04 Alan Modra <amodra@gmail.com>
633 * elf32-hppa.c (enum _tls_type): Move.
634 (struct elf32_hppa_link_hash_entry): Make tls_type a bitfield.
635 (elf32_hppa_check_relocs): Set DF_STATIC_TLS only for shared libraries.
636 Tidy tls_type handling. Set symbol tls_type for GOT_TLS_LDM too.
637 (got_entries_needed, got_relocs_needed): New functions.
638 (allocate_dynrelocs): Use them.
639 (elf32_hppa_size_dynamic_sections): Likewise.
640 (elf32_hppa_relocate_section): Delete bogus FIXME. Formatting.
641 Correct code emitting relocs on GD/IE got entries. Report an
642 error when a symbol has both normal and TLS GOT relocs.
644 2017-11-04 Alan Modra <amodra@gmail.com>
647 * elf32-hppa.c (elf32_hppa_check_relocs): Don't create dyn_relocs
648 for plabels when non-pic.
649 (maybe_set_textrel): New function.
650 (readonly_dynrelocs): Move and rewrite.
651 (elf32_hppa_adjust_dynamic_symbol): Use it. Don't create copy
652 relocs when def_regular or -z nocopyreloc. Handle non_got_ref
653 for functions. Expand non_got_ref comments.
654 (elf32_hppa_size_dynamic_sections): Use maybe_set_textrel.
656 2017-11-03 H.J. Lu <hongjiu.lu@intel.com>
658 * elf32-i386.c (elf_i386_check_relocs): Set plt.refcount to 1.
659 Don't use func_pointer_refcount. Don't set plt.refcount nor
660 non_got_ref for function pointer reference.
661 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
662 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Don't use
663 func_pointer_refcount.
664 (_bfd_x86_elf_copy_indirect_symbol): Don't copy
665 func_pointer_refcount.
666 (_bfd_x86_elf_hide_symbol): Don't use func_pointer_refcount.
667 * elfxx-x86.h (GENERATE_DYNAMIC_RELOCATION_P): Likewise.
668 (elf_x86_link_hash_entry): Remove func_pointer_refcount.
670 2017-11-03 Mingi Cho <mgcho.minic@gmail.com>
671 Nick Clifton <nickc@redhat.com>
674 * coffgen.c (_bfd_coff_get_external_symbols): Check for an
675 overlarge raw syment count.
676 (coff_get_normalized_symtab): Likewise.
678 2017-11-01 James Bowman <james.bowman@ftdichip.com>
680 * archures.c: Add bfd_mach_ft32b.
681 * cpu-ft32.c: Add arch_info_struct.
682 * elf32-ft32.c: Add R_FT32_RELAX, SC0, SC1,
684 (ft32_elf_relocate_section): Add clauses for R_FT32_SC0, SC1,
686 (ft32_reloc_shortable, elf32_ft32_is_diff_reloc)
687 (elf32_ft32_adjust_diff_reloc_value)
688 (elf32_ft32_adjust_reloc_if_spans_insn)
689 (elf32_ft32_relax_delete_bytes, elf32_ft32_relax_is_branch_target)
690 (ft32_elf_relax_section): New function.
691 * reloc.c: Add BFD_RELOC_FT32_RELAX, SC0, SC1, DIFF32.
692 * bfd-in2.h: Regenerate.
693 * libbfd.h: Regenerate.
695 2017-11-01 Nick Clifton <nickc@redhat.com>
698 * coffcode.h (coff_slurp_line_table): Check for an excessively
699 large line number count.
701 2017-11-01 Nick Clifton <nickc@redhat.com>
704 * peicode.h (pe_bfd_read_buildid): Revise check for invalid size
705 and offset in light of further possible bogus values.
707 2017-11-01 Alan Modra <amodra@gmail.com>
710 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't create a plt
711 entry when just a dynamic reloc can serve. Ensure no dynamic
712 relocations when UNDEFWEAK_NO_DYNAMIC_RELOC by setting non_got_ref.
713 Expand and move the non_got_ref comment.
714 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
716 2017-11-01 Nick Clifton <nickc@redhat.com>
719 * coffgen.c (_bfd_coff_free_symbols): Fail if called on a non-COFF
721 * cofflink.c (coff_link_check_archive_element): Skip non-COFF
722 members of an archive.
724 2017-10-31 Nick Clifton <nickc@redhat.com>
727 * peicode.h (pe_bfd_read_buildid): Check for invalid size and data
730 2017-10-30 Alan Modra <amodra@gmail.com>
732 * elf32-frv.c (ELF_TARGET_ID): Don't define for generic
735 * elflink.c (elf_gc_sweep): Test elf_object_id in addition to
737 (bfd_elf_gc_sections): Likewise.
739 2017-10-30 Alan Modra <amodra@gmail.com>
742 * elf32-hppa.c (elf32_hppa_check_relocs): Move SEC_ALLOC test to
743 ensure non_got_ref is not set due to debug references.
744 (elf32_hppa_adjust_dynamic_symbol): Tidy plabel handling. Use
745 SYMBOL_CALLS_LOCAL and UNDEFWEAK_NO_DYNAMIC_RELOC when determining
746 need for a plt entry.
747 (allocate_dynrelocs): Similarly for got entries. Tidy code discarding
748 dynamic relocs when pic. Remove bogus code attempting to handle
750 (elf32_hppa_relocate_section): Similarly. Delete resolved_to_zero
752 (elf32_hppa_finish_dynamic_symbol): Use UNDEFWEAK_NO_DYNAMIC_RELOC
753 and SYMBOL_REFERENCES_LOCAL in GOT handling.
755 2017-10-28 Alan Modra <amodra@gmail.com>
758 * elflink.c (_bfd_elf_merge_symbol): Remove relocs_compatible check.
759 * elf32-hppa.c (elf_backend_relocs_compatible): Define.
760 * elf32-ppc.c (elf_backend_relocs_compatible): Define.
761 * elf64-ppc.c (elf_backend_relocs_compatible): Define.
763 2017-10-25 Alan Modra <amodra@gmail.com>
765 * archive.c (_bfd_compute_and_write_armap): Match "__gnu_lto_slim"
766 optionally prefixed with "_".
767 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
769 2017-10-24 Andrew Waterman <andrew@sifive.com>
771 * elfnn-riscv.c (_bfd_riscv_relax_lui): Don't relax to c.lui
774 2017-10-24 Renlin Li <renlin.li@arm.com>
777 * elflink.c (_bfd_elf_merge_symbol): Handle multiple definition case.
779 2017-10-23 Nick Clifton <nickc@redhat.com>
782 * elflink.c (elf_link_output_extsym): Keep global undefined
783 symbols if they have been marked as needed.
785 2017-10-23 Maciej W. Rozycki <macro@imgtec.com>
787 * elfn32-mips.c (mips_elf_n32_mkobject): New prototype and
789 (bfd_elf32_mkobject): Use `mips_elf_n32_mkobject' rather than
790 `_bfd_mips_elf_mkobject'.
792 2017-10-22 Hans-Peter Nilsson <hp@axis.com>
795 * config.bfd (cris-*-* | crisv32-*-*): Require a 64-bit BFD.
797 2017-10-19 Palmer Dabbelt <palmer@dabbelt.com>
799 * elfnn-riscv.c (riscv_pcgp_hi_reloc): New structure.
800 (riscv_pcgp_lo_reloc): Likewise.
801 (riscv_pcgp_relocs): Likewise.
802 (riscv_init_pcgp_relocs): New function.
803 (riscv_free_pcgp_relocs): Likewise.
804 (riscv_record_pcgp_hi_reloc): Likewise.
805 (riscv_record_pcgp_lo_reloc): Likewise.
806 (riscv_delete_pcgp_hi_reloc): Likewise.
807 (riscv_use_pcgp_hi_reloc): Likewise.
808 (riscv_record_pcgp_lo_reloc): Likewise.
809 (riscv_find_pcgp_lo_reloc): Likewise.
810 (riscv_delete_pcgp_lo_reloc): Likewise.
811 (_bfd_riscv_relax_pc): Likewise.
812 (_bfd_riscv_relax_section): Handle R_RISCV_PCREL_* relocations
813 via the new functions above.
815 2017-10-19 Palmer Dabbelt <palmer@dabbelt.com>
817 * elfnn-riscv.c (R_RISCV_DELETE): New define.
818 (_bfd_riscv_relax_delete): New function.
819 (perform_relocation): Handle R_RISCV_DELETE.
820 (_bfd_riscv_relax_section): Likewise.
822 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
825 * elfxx-tilegx.c (tilegx_elf_tls_transition): Replace
826 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
827 bfd_link_executable for TLS check.
828 (tilegx_elf_check_relocs): Likewise.
829 (allocate_dynrelocs): Likewise.
830 (tilegx_elf_relocate_section): Likewise.
832 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
835 * elf32-tilepro.c (tilepro_elf_tls_transition): Replace
836 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
837 bfd_link_executable for TLS check.
838 (tilepro_elf_check_relocs): Likewise.
839 (allocate_dynrelocs): Likewise.
840 (tilepro_elf_relocate_section): Likewise.
842 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
845 * elfxx-sparc.c (sparc_elf_tls_transition): Replace
846 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
847 bfd_link_executable for TLS check.
848 (_bfd_sparc_elf_check_relocs): Likewise.
849 (allocate_dynrelocs): Likewise.
850 (_bfd_sparc_elf_relocate_section): Likewise.
852 2017-10-18 H.J. Lu <hongjiu.lu@intel.com>
854 * elf32-tilepro.c (tilepro_elf_gc_mark_hook): Call
855 _bfd_generic_link_add_one_symbol to mark __tls_get_addr.
856 * elfxx-tilegx.c (tilegx_elf_gc_mark_hook): Likewise.
858 2017-10-17 H.J. Lu <hongjiu.lu@intel.com>
860 * elf32-microblaze.c (microblaze_elf_check_relocs): Check for
861 indirect and warning symbols.
863 2017-10-17 Alan Modra <amodra@gmail.com>
866 * elf-properties.c (_bfd_elf_parse_gnu_properties): Compare datasz
867 against size left rather than comparing pointers. Reorganise loop.
869 2017-10-17 Alan Modra <amodra@gmail.com>
872 * aoutx.h (aout_get_external_symbols): Handle stringsize of zero,
873 and error for any other size that doesn't cover the header word.
875 2017-10-16 H.J. Lu <hongjiu.lu@intel.com>
877 * elf-bfd.h (elf_backend_data): Remove gc_sweep_hook.
878 * elf32-arm.c (elf32_arm_gc_sweep_hook): Removed.
879 (elf_backend_gc_sweep_hook): Likewise.
880 * elf32-bfin.c (bfin_gc_sweep_hook): Likewise.
881 (bfinfdpic_gc_sweep_hook): Likewise.
882 (elf_backend_gc_sweep_hook): Likewise.
883 * elf32-cr16.c (elf32_cr16_gc_sweep_hook): Likewise.
884 (elf_backend_gc_sweep_hook): Likewise.
885 * elf32-cris.c (cris_elf_gc_sweep_hook): Likewise.
886 (elf_backend_gc_sweep_hook): Likewise.
887 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Likewise.
888 (elf_backend_gc_sweep_hook): Likewise.
889 * elf32-lm32.c (lm32_elf_gc_sweep_hook): Likewise.
890 (elf_backend_gc_sweep_hook): Likewise.
891 * elf32-m32r.c (m32r_elf_gc_sweep_hook): Likewise.
892 (elf_backend_gc_sweep_hook): Likewise.
893 * elf32-m68k.c (elf_m68k_got_entry): Remove elf_m68k_gc_sweep_hook
895 (elf_m68k_remove_got_entry_type): Removed.
896 (elf_m68k_find_got_entry_ptr): Likewise.
897 (elf_m68k_remove_got_entry): Likewise.
898 (elf_m68k_gc_sweep_hook): Likewise.
899 (elf_backend_gc_sweep_hook): Likewise.
900 * elf32-mcore.c (mcore_elf_gc_sweep_hook): Likewise.
901 (elf_backend_gc_sweep_hook): Likewise.
902 * elf32-metag.c (elf_metag_gc_sweep_hook): Likewise.
903 (elf_backend_gc_sweep_hook): Likewise.
904 * elf32-microblaze.c (elf_backend_gc_sweep_hook): Likewise.
905 (elf_backend_gc_sweep_hook): Likewise.
906 * elf32-mips.c (elf_backend_gc_sweep_hook): Likewise.
907 (elf_backend_gc_sweep_hook): Likewise.
908 * elf32-nds32.c (nds32_elf_gc_sweep_hook): Likewise.
909 (elf_backend_gc_sweep_hook): Likewise.
910 * elf32-nios2.c (nios2_elf32_gc_sweep_hook): Likewise.
911 (elf_backend_gc_sweep_hook): Likewise.
912 * elf32-or1k.c (or1k_elf_gc_sweep_hook): Likewise.
913 (elf_backend_gc_sweep_hook): Likewise.
914 * elf32-ppc.c (ppc_elf_gc_sweep_hook): Likewise.
915 (elf_backend_gc_sweep_hook): Likewise.
916 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
917 (elf_backend_gc_sweep_hook): Likewise.
918 * elf32-sparc.c (elf_backend_gc_sweep_hook): Likewise.
919 * elf32-tic6x.c (elf32_tic6x_gc_sweep_hook): Likewise.
920 (elf_backend_gc_sweep_hook): Likewise.
921 * elf32-tilegx.c (elf_backend_gc_sweep_hook): Likewise.
922 * elf32-tilepro.c (tilepro_elf_gc_sweep_hook): Likewise.
923 (elf_backend_gc_sweep_hook): Likewise.
924 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
925 (elf_backend_gc_sweep_hook): Likewise.
926 * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Likewise.
927 (elf_backend_gc_sweep_hook): Likewise.
928 * elf64-alpha.c (elf64_alpha_gc_sweep_hook): Likewise.
929 (elf_backend_gc_sweep_hook): Likewise.
930 * elf64-mips.c (elf_backend_gc_sweep_hook): Likewise.
931 * elf64-mmix.c (mmix_elf_gc_sweep_hook): Likewise.
932 (elf_backend_gc_sweep_hook): Likewise.
933 * elf64-ppc.c (elf_backend_gc_sweep_hook): Likewise.
934 (ppc64_elf_gc_sweep_hook): Likewise.
935 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
936 (elf_backend_gc_sweep_hook): Likewise.
937 * elf64-sparc.c (elf_backend_gc_sweep_hook): Likewise.
938 * elf64-tilegx.c (elf_backend_gc_sweep_hook): Likewise.
939 * elflink.c (elf_link_add_object_symbols): Don't call
940 _bfd_elf_link_check_relocs here.
941 (gc_sweep_hook_fn): Removed.
942 (elf_gc_sweep): Remove gc_sweep_hook.
943 * elfnn-aarch64.c (elfNN_aarch64_gc_sweep_hook): Removed.
944 (elf_backend_gc_sweep_hook): Likewise.
945 * elfnn-riscv.c (riscv_elf_gc_sweep_hook): Likewise.
946 (elf_backend_gc_sweep_hook): Likewise.
947 * elfxx-mips.c (_bfd_mips_elf_gc_sweep_hook): Likewise.
948 * elfxx-mips.h (_bfd_mips_elf_gc_sweep_hook): Likewise.
949 (elf_backend_gc_sweep_hook): Likewise.
950 * elfxx-sparc.c (_bfd_sparc_elf_gc_sweep_hook): Likewise.
951 * elfxx-sparc.h (_bfd_sparc_elf_gc_sweep_hook): Likewise.
952 * elfxx-target.h (elf_backend_gc_sweep_hook): Likewise.
953 (elfNN_bed): Remove elf_backend_gc_sweep_hook.
954 * elfxx-tilegx.c (tilegx_elf_gc_sweep_hook): Removed.
955 * elfxx-tilegx.h (tilegx_elf_gc_sweep_hook): Likewise.
957 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
959 * elf32-i386.c (elf_i386_backend_data): Removed.
960 (get_elf_i386_backend_data): Likewise.
961 (elf_i386_arch_bed): Replace elf_i386_backend_data with
962 elf_x86_backend_data.
963 (elf_i386_get_synthetic_symtab): Likewise.
964 (elf_i386_nacl_arch_bed): Likewise.
965 (elf_i386_vxworks_arch_bed): Likewise.
966 (elf_i386_relocate_section): Check target_os instead of
968 (elf_i386_finish_dynamic_symbol): Likewise.
969 (elf_i386_finish_dynamic_sections): Use htab->plt0_pad_byte.
970 Check target_os instead of is_vxworks.
971 (elf_i386_link_setup_gnu_properties): Remove normal_target and
972 is_vxworks. Initialize plt0_pad_byte.
973 * elf64-x86-64.c (elf_x86_64_backend_data); Removed.
974 (get_elf_x86_64_arch_data): Likewise.
975 (get_elf_x86_64_backend_data): Likewise.
976 (elf_x86_64_arch_bed): Replace elf_x86_64_backend_data with
977 elf_x86_backend_data.
978 (elf_x86_64_get_synthetic_symtab): Likewise.
979 (elf_x86_64_nacl_arch_bed): Likewise.
980 (elf_x86_64_link_setup_gnu_properties): Remove is_vxworks and
981 normal_target. Initialize plt0_pad_byte.
982 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Check target_os
983 instead of is_vxworks.
984 (_bfd_x86_elf_size_dynamic_sections): Likewise.
985 (_bfd_x86_elf_finish_dynamic_sections): Likewise.
986 (_bfd_x86_elf_adjust_dynamic_symbol): Likewise.
987 (_bfd_x86_elf_link_hash_table_create): Initialize target_os.
988 (_bfd_x86_elf_link_setup_gnu_properties): Remove is_vxworks.
989 Update normal_target. Set up plt0_pad_byte. Check target_os
990 instead of is_vxworks.
991 * elfxx-x86.h (elf_x86_target_os): New.
992 (elf_x86_backend_data): Likewise.
993 (get_elf_x86_backend_data): Likewise.
994 (elf_x86_link_hash_table): Remove is_vxworks. Add plt0_pad_byte
996 (elf_x86_init_table): Remove normal_target and is_vxworks. Add
999 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
1001 * elf32-i386.c (elf_i386_finish_dynamic_sections): Call
1002 _bfd_x86_elf_finish_dynamic_sections.
1003 * elf64-x86-64.c (elf_x86_64_finish_dynamic_sections): Likewise.
1004 * elfxx-x86.c (_bfd_x86_elf_finish_dynamic_sections): New
1006 * elfxx-x86.h (_bfd_x86_elf_finish_dynamic_sections): New
1009 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
1012 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
1013 hide symbol which was forced to be dynamic.
1015 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
1018 * elf32-cris.c (cris_elf_relocate_section): Don't generate
1019 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1020 (cris_elf_check_relocs): Don't allocate dynamic relocation
1021 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1023 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
1026 * elf32-sh.c (allocate_dynrelocs): Discard dynamic relocations
1027 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1028 (sh_elf_relocate_section): Don't generate dynamic relocation if
1029 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1031 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
1034 * elf32-s390.c (allocate_dynrelocs): Discard dynamic
1035 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1036 (elf_s390_relocate_section): Don't generate dynamic relocation
1037 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1038 * elf64-s390.c (allocate_dynrelocs): Discard dynamic
1039 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1040 (elf_s390_relocate_section): Don't generate dynamic relocation
1041 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1043 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
1046 * elf32-nios2.c (nios2_elf32_relocate_section): Don't generate
1047 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1048 (allocate_dynrelocs): Discard dynamic relocations if
1049 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1051 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
1054 * elf32-microblaze.c (microblaze_elf_relocate_section): Don't
1055 generate dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is
1057 (allocate_dynrelocs): Discard dynamic relocations if
1058 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1060 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
1063 * elf32-m68k.c (elf_m68k_check_relocs): Don't allocate dynamic
1064 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1065 (elf_m68k_adjust_dynamic_symbol): Don't make symbol dynamic if
1066 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1067 (elf_m68k_relocate_section): Don't generate dynamic relocation
1068 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1070 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
1073 * elf32-hppa.c (ensure_undef_dynamic): Don't make undefined
1074 symbol dynamic if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1075 (allocate_dynrelocs): Discard dynamic relocations if
1076 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1077 (elf32_hppa_relocate_section): Don't generate dynamic
1078 relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1080 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
1083 * elfnn-ia64.c (elfNN_ia64_check_relocs): Don't allocate
1084 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1085 (allocate_fptr): Don't allocate function pointer if
1086 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1087 (allocate_dynrel_entries): Don't allocate dynamic relocation
1088 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1089 (set_got_entry): Don't set GOT entry if
1090 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1091 (set_pltoff_entry): Don't set PLTOFF entry if
1092 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1093 (elfNN_ia64_relocate_section): Don't install dynamic relocation
1094 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1096 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
1099 * elfxx-mips.c (mips_elf_calculate_relocation): Don't generate
1100 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1101 (allocate_dynrelocs): Don't allocate dynamic relocations if
1102 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1104 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
1107 * elf32-arm.c (elf32_arm_final_link_relocate): Don't generate
1108 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1109 (allocate_dynrelocs_for_symbol): Discard dynamic relocations
1110 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1112 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
1115 * elf32-tilepro.c (allocate_dynrelocs): Discard dynamic
1116 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1117 (tilepro_elf_relocate_section): Don't generate dynamic
1118 relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1119 * elfxx-tilegx.c (allocate_dynrelocs): Discard dynamic
1120 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1121 (tilegx_elf_relocate_section): Don't generate dynamic
1122 relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1124 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
1127 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Don't
1128 generate dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is
1130 (elfNN_aarch64_allocate_dynrelocs): Discard dynamic relocations
1131 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1133 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
1135 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Moved to ...
1136 * elf-bfd.h (UNDEFWEAK_NO_DYNAMIC_RELOC): Here.
1137 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Removed.
1139 2017-10-12 James Bowman <james.bowman@ftdichip.com>
1141 * bfd-in2.h: Regenerate.
1142 * libbfd.h: Regenerate.
1143 * elf32-ft32.c: Add HOWTO R_FT32_15.
1144 * reloc.c: Add BFD_RELOC_FT32_15.
1146 2017-10-12 Nick Clifton <nickc@redhat.com>
1148 * reloc.c (enum bfd_reloc_status): Start values at 2.
1149 * bfd-in2.h: Regenerate.
1150 * elfnn-aarch64.c (aarch64_relocate): Invert sense of function, so
1151 that a TRUE return indicates success. Compare the result of
1152 calling _bfd_aarch64_elf_put_addend against bfd_reloc_ok.
1153 (build_one_stub): Change sense of tests against aarch64_relocate
1155 (elfNN_aarch64_tls_relax): Return bfd_reloc_notsupported, rather
1156 than FALSE, when an error is detected.
1157 (elfNN_aarch64_final_link_relocate): Likewise.
1159 2017-10-12 H.J. Lu <hongjiu.lu@intel.com>
1161 * elf32-i386.c (elf_backend_hide_symbol): New.
1162 * elf64-x86-64.c (elf_backend_hide_symbol): Likewise.
1163 * elfxx-x86.c (_bfd_x86_elf_hide_symbol): Likewise.
1164 * elfxx-x86.h (_bfd_x86_elf_hide_symbol): Likewise.
1166 2017-10-12 Alan Modra <amodra@gmail.com>
1168 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Call
1169 elf_backend_hide_symbol, not _bfd_elf_link_hash_hide_symbol.
1170 (bfd_elf_define_start_stop): Likewise.
1172 2017-10-12 Alan Modra <amodra@gmail.com>
1174 * elf32-nds32.c (nds32_elf_size_dynamic_sections): Set .interp
1175 when executable rather than non-PIC.
1176 * elf32-score.c (s3_bfd_score_elf_size_dynamic_sections): Likewise.
1177 * elf32-score7.c (s7_bfd_score_elf_size_dynamic_sections): Likewise.
1179 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
1181 * elf-bfd.h (elf_backend_data): Add `linux_prpsinfo64_ugid16'
1183 * elf-linux-core.h (elf_external_linux_prpsinfo64): Rename to...
1184 (elf_external_linux_prpsinfo64_ugid32): ... this.
1185 (swap_linux_prpsinfo32_out): Rename to...
1186 (swap_linux_prpsinfo32_ugid32_out): ... this.
1187 (elf_external_linux_prpsinfo64_ugid16): New structure.
1188 (swap_linux_prpsinfo64_ugid16_out): New function.
1189 * elfxx-target.h [!elf_backend_linux_prpsinfo64_ugid16]
1190 (elf_backend_linux_prpsinfo64_ugid16): Define.
1191 (elfNN_bed): Initialize `linux_prpsinfo64_ugid16' member.
1192 * elf.c (elfcore_write_linux_prpsinfo64): Handle both variants
1193 of the 64-bit Linux core PRPSINFO note.
1194 * elf64-sh64.c (elf_backend_linux_prpsinfo64_ugid16): Define.
1196 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
1198 * elf-bfd.h (elf_backend_data): Add `linux_prpsinfo32_ugid16'
1200 (elfcore_write_ppc_linux_prpsinfo32): Remove prototype.
1201 * elf32-ppc.c (elfcore_write_ppc_linux_prpsinfo32): Remove.
1202 (elf_external_ppc_linux_prpsinfo32)
1203 (swap_ppc_linux_prpsinfo32_out): Move to...
1204 * elf-linux-core.h (elf_external_linux_prpsinfo32_ugid32)
1205 (swap_linux_prpsinfo32_ugid32_out): ... these.
1206 (elf_external_linux_prpsinfo32): Rename to...
1207 (elf_external_linux_prpsinfo32_ugid16): ... this.
1208 (swap_linux_prpsinfo32_out): Rename to...
1209 (swap_linux_prpsinfo32_ugid16_out): ... this.
1210 * elfxx-target.h [!elf_backend_linux_prpsinfo32_ugid16]
1211 (elf_backend_linux_prpsinfo32_ugid16): Define.
1212 (elfNN_bed): Initialize `linux_prpsinfo32_ugid16' member.
1213 * elf.c (elfcore_write_linux_prpsinfo32): Handle both variants
1214 of the 32-bit Linux core PRPSINFO note.
1215 * elf32-am33lin.c (elf_backend_linux_prpsinfo32_ugid16): Define.
1216 * elf32-arm.c (elf_backend_linux_prpsinfo32_ugid16): Define.
1217 * elf32-cris.c (elf_backend_linux_prpsinfo32_ugid16): Define.
1218 * elf32-frv.c (elf_backend_linux_prpsinfo32_ugid16): Define.
1219 * elf32-i386.c (elf_backend_linux_prpsinfo32_ugid16): Define.
1220 * elf32-m32r.c (elf_backend_linux_prpsinfo32_ugid16): Define.
1221 * elf32-m68k.c (elf_backend_linux_prpsinfo32_ugid16): Define.
1222 * elf32-s390.c (elf_backend_linux_prpsinfo32_ugid16): Define.
1223 * elf32-sh.c (elf_backend_linux_prpsinfo32_ugid16): Define.
1224 * elf32-sparc.c (elf_backend_linux_prpsinfo32_ugid16): Define.
1226 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
1228 * elf-linux-core.h (elf_external_linux_prpsinfo64): Move the
1229 `gap' member ahead of `pr_flag'.
1231 2017-10-11 Pedro Alves <palves@redhat.com>
1233 * bfd.c (_doprnt): Rename to ...
1234 (_bfd_doprnt): ... this.
1235 (error_handler_internal): Adjust.
1237 2017-10-10 H.J. Lu <hongjiu.lu@intel.com>
1239 * elf32-i386.c (elf_i386_check_relocs): Set GOT refcount to 1
1240 instead of incrementing it.
1241 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1243 2017-10-10 Renlin Li <renlin.li@arm.com>
1246 * elf32-arm.c (allocate_dynrelocs_for_symbol): Only make undefined weak
1247 symbols into dynamic.
1249 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
1252 * elfnn-riscv.c (riscv_elf_link_hash_table): Add max_alignment.
1253 (riscv_elf_link_hash_table_create): Initialize max_alignment to
1255 (_bfd_riscv_relax_section): Cache the max alignment of output
1256 sections if possible.
1258 2017-10-10 Alan Modra <amodra@gmail.com>
1260 * elf64-ppc.c (ppc64_elf_before_check_relocs): Set sec_type for
1261 .opd whenever .opd is present and non-zero size. Move code
1262 setting abiversion to/from output file earlier. Only set
1263 u.opd.func_sec when --gc-sections. Read relocs and set up
1264 u.opd.func_sec values here..
1265 (ppc64_elf_check_relocs): ..rather than here. Simplify opd
1267 (ppc64_elf_edit_opd): Don't set sec_type for .opd here.
1269 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
1271 * elf-m10300.c (mn10300_elf_check_relocs): Don't free cached
1274 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
1276 * elf32-bfin.c (bfin_size_dynamic_sections): Don't create the
1277 .interp section with "ld --no-dynamic-linker".
1279 2017-10-09 Alan Modra <amodra@gmail.com>
1282 * dwarf2.c (_bfd_dwarf2_cleanup_debug_info): Free
1283 funcinfo_hash_table and varinfo_hash_table.
1285 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
1287 * elf32-sh.c (readonly_dynrelocs): Dump dynamic relocation
1288 in read-only section with minfo.
1289 (sh_elf_size_dynamic_sections): Likewise.
1291 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
1293 * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Remove
1296 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
1298 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_sections): Set
1299 this_hdr.sh_entsize only if section size > 0.
1301 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
1303 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Reformat.
1305 2017-10-07 H.J. Lu <hongjiu.lu@intel.com>
1307 * elfxx-sparc.c (readonly_dynrelocs): Dump dynamic relocation
1308 in read-only section with minfo.
1309 (_bfd_sparc_elf_size_dynamic_sections): Likewise.
1311 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
1313 * elfxx-x86.h (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Update
1316 2017-10-06 John Baldwin <jhb@FreeBSD.org>
1318 * elf-bfd.h (struct elf_backend_data): Add
1319 `elf_backend_grok_freebsd_prstatus'.
1320 * elf.c (elfcore_grok_freebsd_note): Call
1321 `elf_backend_grok_freebsd_prstatus' to handle NT_PRSTATUS if
1323 * elfn32-mips.c (elf_n32_mips_grok_freebsd_prstatus): New
1325 (elf_backend_grok_freebsd_prstatus): Define.
1326 * elfxx-target.h (elf_backend_grok_freebsd_prstatus): Define.
1327 (elfNN_bed): Initialize `elf_backend_grok_freebsd_prstatus'.
1329 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
1331 * elf32-i386.c (elf_i386_check_relocs): Replace has_got_reloc
1332 and has_non_got_reloc with zero_undefweak.
1333 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1334 * elfxx-x86.c (_bfd_x86_elf_link_hash_newfunc): Initialize
1335 zero_undefweak to 1.
1336 (_bfd_x86_elf_copy_indirect_symbol): Replace has_got_reloc and
1337 has_non_got_reloc with zero_undefweak.
1338 * elfxx-x86.h (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Replace
1339 has_got_reloc and has_non_got_reloc with zero_undefweak.
1340 (elf_x86_link_hash_entry): Likewise.
1342 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
1344 * elfxx-x86.h (COPY_INPUT_RELOC_P): Add "do/while(0);".
1345 (VERIFY_COPY_RELOC): Likewise.
1347 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
1349 * elfxx-x86.h (VERIFY_COPY_RELOC): New.
1350 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Use it.
1351 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
1353 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
1355 * elfxx-x86.h (VERIFY_PLT_ENTRY): New.
1356 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Use it.
1357 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
1359 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
1361 * elfxx-x86.h (COPY_INPUT_RELOC_P): New.
1362 * elf32-i386.c (elf_i386_relocate_section): Use it.
1363 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1365 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
1367 * elf32-i386.c (X86_SIZE_TYPE_P): New.
1368 (elf_i386_relocate_section): Use GENERATE_DYNAMIC_RELOCATION_P.
1369 * elf64-x86-64.c (X86_SIZE_TYPE_P): New.
1370 (elf_x86_64_relocate_section): Use GENERATE_DYNAMIC_RELOCATION_P.
1371 * elfxx-x86.h (GENERATE_DYNAMIC_RELOCATION_P): New.
1373 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
1375 * elfxx-x86.h (POINTER_LOCAL_IFUNC_P): New.
1376 (PLT_LOCAL_IFUNC_P): Likewise.
1377 * elf32-i386.c (elf_i386_relocate_section): Use them.
1378 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1380 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
1382 * elfxx-x86.h (GENERATE_RELATIVE_RELOC_P): New.
1383 * elf32-i386.c (elf_i386_relocate_section): Use it.
1384 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1386 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
1388 * elfxx-x86.h (RESOLVED_LOCALLY_P): New.
1389 * elf32-i386.c (elf_i386_relocate_section): Use it.
1390 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1392 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
1394 * elf32-i386.c (X86_PCREL_TYPE_P): New.
1395 (elf_i386_check_relocs): Use NEED_DYNAMIC_RELOCATION_P.
1396 * elf64-x86-64.c (IS_X86_64_PCREL_TYPE): Renamed to ...
1397 (X86_PCREL_TYPE_P): This.
1398 (elf_x86_64_check_relocs): Use NEED_DYNAMIC_RELOCATION_P.
1399 Replace IS_X86_64_PCREL_TYPE with X86_PCREL_TYPE_P.
1400 (elf_x86_64_relocate_section): Replace IS_X86_64_PCREL_TYPE with
1402 * elfxx-x86.h (NEED_DYNAMIC_RELOCATION_P): New.
1404 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
1406 * elfxx-x86.h (TLS_TRANSITION_IE_TO_LE_P): New.
1407 * elf32-i386.c (elf_i386_tls_transition): Use it.
1408 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
1410 2017-10-05 H.J. Lu <hongjiu.lu@intel.com>
1412 * elf32-ppc.c (readonly_dynrelocs): Add a link_info argument.
1413 Dump dynamic relocation in read-only section with minfo if
1415 (ppc_elf_adjust_dynamic_symbol): Pass NULL to readonly_dynrelocs.
1416 (maybe_set_textrel): Likewise.
1417 (ppc_elf_size_dynamic_sections): Dump dynamic relocation in
1418 read-only section with minfo.
1420 2017-10-05 John Baldwin <jhb@FreeBSD.org>
1422 * elf.c (elfcore_grok_freebsd_note): Handle NT_ARM_VFP.
1424 2017-10-05 H.J. Lu <hongjiu.lu@intel.com>
1426 * elf32-tilepro.c (readonly_dynrelocs): Dump dynamic relocation
1427 in read-only section with minfo.
1428 (tilepro_elf_size_dynamic_sections): Likewise.
1429 * elfxx-tilegx.c (readonly_dynrelocs): Likewise.
1430 (tilegx_elf_size_dynamic_sections): Likewise.
1432 2017-10-05 Pedro Alves <palves@redhat.com>
1435 * bfd.c (bfd_set_error): Revert 2017-10-04 change. Remove
1436 ellipsis parameter. Split out bfd_error_on_input code to..
1437 (bfd_set_input_error): .. New function.
1438 * archive.c (_bfd_write_archive_contents): Use bfd_set_input_error.
1439 * vms-lib.c (_bfd_vms_lib_write_archive_contents): Likewise.
1440 * bfd-in2.h: Regenerate.
1442 2017-10-05 Alan Modra <amodra@gmail.com>
1444 * elflink.c (elf_link_input_bfd): Correct ctor/dtor in init_array/
1445 fini_array error value.
1447 2017-10-05 Alan Modra <amodra@gmail.com>
1450 * elf.c (_bfd_elf_setup_sections): Don't trim reloc sections from
1452 (_bfd_elf_init_reloc_shdr): Pass sec_hdr, use it to copy SHF_GROUP
1454 (elf_fake_sections): Adjust calls. Exit immediately on failure.
1455 (bfd_elf_set_group_contents): Add associated reloc section indices
1458 2017-10-04 Alan Modra <amodra@gmail.com>
1460 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't sort or
1461 classify symbols for ELFv2.
1463 2017-10-04 Pavel I. Kryukov <kryukov@frtk.ru>
1466 * bfd.c (bfd_set_error): Avoid UB on passing arg to va_start that
1467 undergoes default promotion.
1468 * bfd-in2.h: Regenerate.
1470 2017-10-02 Alan Modra <amodra@gmail.com>
1472 * elf32-ppc.c (ppc_elf_relocate_section): Fix comment typo.
1473 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1475 2017-10-01 Alan Modra <amodra@gmail.com>
1478 * dwarf2.c (new_line_sorts_after): Remove end_sequence comparison.
1479 (add_line_info): Always put end_sequence last.
1481 2017-10-01 Alan Modra <amodra@gmail.com>
1484 * dwarf2.c (read_section): Allocate buffer with extra byte for
1485 bfd_simple_get_relocated_section_contents rather than copying
1488 2017-09-29 Alan Modra <amodra@gmail.com>
1490 * merge.c (merge_strings): Return FALSE on malloc failure.
1491 (_bfd_merge_sections): Return failures from record_section and
1494 2017-09-28 Alan Modra <amodra@gmail.com>
1497 * elflink.c (_bfd_elf_merge_symbol): Set non_ir_ref_dynamic in
1498 a case where plugin_notice isn't called.
1500 2017-09-27 Kuan-Lin Chen <kuanlinchentw@gmail.com>
1502 * elf32-nds32.c (nds32_elf_relax_section): Fix a tautological
1505 2017-09-26 H.J. Lu <hongjiu.lu@intel.com>
1508 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't pass
1509 output_bfd to info->callbacks->minfo.
1511 2017-09-26 Nick Clifton <nickc@redhat.com>
1514 * elf64-x86-64.c (elf_x86_64_info_to_howto): Do not trigger an
1515 assertion failure if elf_x86_64_rtype_to_howto has already issued
1518 2017-09-26 Alan Modra <amodra@gmail.com>
1521 * dwarf2.c (read_formatted_entries): Use read_attribute_value to
1524 2017-09-26 Nick Clifton <nickc@redhat.com>
1527 * dwarf2.c (read_formatted_entries): Fail early if we know that
1528 the loop parsing data entries will overflow the end of the
1531 2017-09-26 Alan Modra <amodra@gmail.com>
1534 * dwarf2.c (struct comp_unit): Delete sec_info_ptr field.
1535 (find_abstract_instance_name): Calculate DW_FORM_ref_addr relative
1536 to stash->info_ptr_memory, and check die_ref is within that memory.
1537 Set info_ptr_end correctly when another CU is refd. Check die_ref
1538 for DW_FORM_ref4 etc. is within CU.
1540 2017-09-26 Alan Modra <amodra@gmail.com>
1543 * dwarf2.c (concat_filename): Return "<unknown>" on NULL filename.
1544 (read_formatted_entries): Init "fe".
1545 (decode_line_info <DW_LNE_define_file>): Use line_info_add_file_name.
1547 2017-09-26 Alan Modra <amodra@gmail.com>
1550 * dwarf2.c (decode_line_info): Ensure line_ptr stays within
1551 bounds in inner loop.
1553 2017-09-25 Alan Modra <amodra@gmail.com>
1556 * dwarf1.c (parse_die): Sanity check pointer against section limit
1557 before dereferencing.
1558 (parse_line_table): Likewise.
1560 2017-09-25 Alan Modra <amodra@gmail.com>
1563 * dwarf2.c (scan_unit_for_symbols): Ignore DW_AT_name unless it
1565 (parse_comp_unit): Likewise.
1567 2017-09-25 Alan Modra <amodra@gmail.com>
1570 * dwarf2.c (read_formatted_entries): Error on format_count zero.
1572 2017-09-24 Alan Modra <amodra@gmail.com>
1575 * opncls.c (bfd_get_debug_link_info_1): Properly check that crc is
1576 within section bounds.
1578 2017-09-24 Alan Modra <amodra@gmail.com>
1581 * dwarf2.c (decode_line_info): Properly free line sequences on error.
1583 2017-09-24 Alan Modra <amodra@gmail.com>
1586 * dwarf2.c (find_abstract_instance_name): Add orig_info_ptr and
1587 pname param. Return status. Make name const. Don't abort,
1588 return an error. Formatting. Exit if current info_ptr matches
1589 orig_info_ptr. Update callers.
1590 (scan_unit_for_symbols): Start at nesting_level of zero. Make
1591 nested_funcs an array of structs for extensibility. Formatting.
1593 2017-09-24 Alan Modra <amodra@gmail.com>
1596 * dwarf2.c (decode_line_info): Fail on lh.line_range of zero
1597 rather than dividing by zero.
1599 2017-09-24 Alan Modra <amodra@gmail.com>
1602 * dwarf2.c (decode_line_info): Correct .debug_line unit_length check.
1604 2017-09-24 Alan Modra <amodra@gmail.com>
1607 * dwarf2.c (scan_unit_for_symbols): Check u.blk->data is non-NULL.
1609 2017-09-24 Alan Modra <amodra@gmail.com>
1612 * elf.c (_bfd_elf_slurp_version_tables): Test sh_info on
1613 SHT_GNU_verneed section for sanity. Don't zalloc memory for
1616 2017-09-22 H.J. Lu <hongjiu.lu@intel.com>
1619 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Guard against
1622 2017-09-22 H.J. Lu <hongjiu.lu@intel.com>
1625 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Also return
1626 -1 if bfd_canonicalize_dynamic_reloc returns 0.
1628 2017-09-22 Pedro Alves <palves@redhat.com>
1629 Alan Modra <amodra@gmail.com>
1631 * version.h: Add comment.
1633 2017-09-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1635 * elf.c (elfcore_grok_note): For the cases NT_S390_GS_CB and
1636 NT_S390_GS_BC, correct the previously swapped invocations of
1637 elfcore_grok_s390_gs_bc and elfcore_grok_s390_gs_cb.
1639 2017-09-19 Alan Modra <amodra@gmail.com>
1642 * elf64-ppc.c (ppc64_elf_build_stubs): Don't check glink_eh_frame
1645 2017-09-19 Alan Modra <amodra@gmail.com>
1648 * elflink.c (bfd_elf_size_dynamic_sections): Garbage collect
1649 symbols before calculating verrefs. Don't renumber dynsyms
1650 after gc. Exclude .gnu.version when zero or one dynsym.
1651 Localize some vars and reindent.
1653 2017-09-18 H.J. Lu <hongjiu.lu@intel.com>
1656 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Check error
1657 return from bfd_canonicalize_dynamic_reloc.
1659 2017-09-15 Alan Modra <amodra@gmail.com>
1662 * archive.c (bfd_ar_hdr_from_filesystem): Detect when status.st_size
1663 overflows bfd_size_type.
1665 2017-09-14 H.J. Lu <hongjiu.lu@intel.com>
1668 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument
1669 to indicate if conversion is performed.
1670 (elf_i386_check_relocs): Cache section contents and relocations
1671 if conversion is performed.
1672 * elf64-x86-64.c (elf_x86_64_check_relocs): Cache section
1673 contents and relocations if conversion is performed.
1675 2017-09-14 Nick Clifton <nickc@redhat.com>
1678 * peXXigen.c (pe_print_idata): Extend check for HintName vector
1681 2017-09-13 H.J. Lu <hongjiu.lu@intel.com>
1683 * elfxx-x86.h: Fix a typo in comments.
1685 2017-09-09 Kamil Rytarowski <n54@gmx.com>
1687 * elf32-nds32.c: Rename __BIT() to N32_BIT().
1689 2017-09-09 Alan Modra <amodra@gmail.com>
1691 * elf64-ppp.c (plt_stub_pad): Handle positive and negative
1694 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
1696 * elf32-i386.c (elf_i386_relocate_section): Update usage of
1697 UNDEFINED_WEAK_RESOLVED_TO_ZERO.
1698 (elf_i386_finish_dynamic_symbol): Likewise.
1699 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1700 (elf_x86_64_finish_dynamic_symbol): Likewise.
1701 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Likewise.
1702 (_bfd_x86_elf_fixup_symbol): Likewise.
1704 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
1706 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
1707 check has_non_got_reloc.
1709 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
1712 * elf32-i386.c (elf_i386_convert_load_reloc): Check linker_def.
1713 Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
1714 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Check
1715 linker_def. Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
1716 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Set local_ref
1717 and linker_def on __ehdr_start if it is referenced and not
1719 (_bfd_x86_elf_link_symbol_references_local): Also set local_ref
1720 and return TRUE when building executable, if a symbol has
1721 non-GOT/non-PLT relocations in text section or there is no
1723 * elfxx-x86.h (elf_x86_link_hash_entry): Add linker_def.
1725 2017-09-08 H.J. Lu <hongjiu.lu@intel.com>
1727 * elfxx-x86.h: Update comments.
1729 2017-09-08 H.J. Lu <hongjiu.lu@intel.com>
1731 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Replace
1732 elf_x86_plt_layout_table with elf_x86_init_table.
1733 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
1735 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties):
1737 * elfxx-x86.h (elf_x86_plt_layout_table): Renamed to ...
1738 (elf_x86_init_table): This.
1739 (_bfd_x86_elf_link_setup_gnu_properties): Replace
1740 elf_x86_plt_layout_table with elf_x86_init_table.
1742 2017-09-07 H.J. Lu <hongjiu.lu@intel.com>
1744 * configure.ac (bfd_backends): Don't add elf64-x86-64.lo nor
1745 elf64.lo together with elfxx-x86.lo for 64-bit BFD.
1746 * configure: Regenerated.
1747 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set r_info
1748 and r_sym fields of plt_layout.
1749 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
1751 * elfxx-x86.c (elf_x86_64_is_reloc_section): Remove BFD64 check.
1752 (_bfd_x86_elf_link_hash_table_create): Likewise. Don't set
1753 r_info nor r_sym fields.
1754 (_bfd_x86_elf_link_setup_gnu_properties): Set r_info and r_sym
1756 * elfxx-x86.h (elf_x86_plt_layout_table): Add r_info and r_sym.
1758 2017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
1760 * (_bfd_riscv_relax_align): Call bfd_set_error and
1761 print an error message when unable to relax a .align directive.
1763 2017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
1765 * elfnn-riscv.c (riscv_zero_pcrel_hi_reloc): New function.
1766 (riscv_record_pcrel_hi_reloc): Add absolute argument.
1767 (riscv_elf_relocate_section): Call riscv_zero_pcrel_hi_reloc for
1768 R_RISCV_PCREL_HI20 relocs, and pass the result to
1769 riscv_record_pcrel_hi_reloc.
1771 2017-09-07 H.J. Lu <hongjiu.lu@intel.com>
1773 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument,
1774 r_type_p. Remove the converted argument. Replace
1775 SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P. Return
1776 the new relocation type via r_type_p.
1777 (elf_i386_relocate_section): Likewise.
1778 (elf_i386_finish_dynamic_symbol): Likewise.
1779 (need_convert_load): Removed.
1780 (check_relocs_failed): Updated.
1781 (elf_i386_check_relocs): Call elf_i386_convert_load_reloc,
1782 instead of setting need_convert_load.
1783 (_bfd_i386_elf_convert_load): Removed.
1784 * elf64-x86-64.c (need_convert_load): Removed.
1785 (check_relocs_failed): Updated.
1786 (elf_x86_64_convert_load_reloc): Add an argument, r_type_p.
1787 Replace SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P.
1788 Return the new relocation type via r_type_p.
1789 (elf_x86_64_check_relocs): Call elf_x86_64_convert_load_reloc,
1790 instead of setting need_convert_load.
1791 (elf_x86_64_check_relocs): Don't check PIC if relocation has
1793 (_bfd_x86_64_elf_convert_load): Removed.
1794 (elf_x86_64_relocate_section): Replace SYMBOL_REFERENCES_LOCAL
1795 with SYMBOL_REFERENCES_LOCAL_P.
1796 (elf_x86_64_finish_dynamic_symbol): Likewise.
1797 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Don't
1799 (_bfd_x86_elf_size_dynamic_sections): Don't call convert_load.
1800 (_bfd_x86_elf_link_symbol_references_local): New function.
1801 * elfxx-x86.h (SYMBOL_REFERENCES_LOCAL_P): New.
1802 (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Replace elf.forced_local with
1803 SYMBOL_REFERENCES_LOCAL_P.
1804 (elf_x86_link_hash_entry): Add local_ref.
1805 (elf_x86_link_hash_table): Remove convert_load.
1806 (_bfd_i386_elf_convert_load): Removed.
1807 (_bfd_x86_64_elf_convert_load): Likewise.
1808 (_bfd_x86_elf_link_symbol_references_local): New.
1810 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
1812 * elf64-x86-64.c (R_X86_64_converted_reloc_bit): New.
1813 (elf_x86_64_info_to_howto): Get the real relocation type by
1814 masking out R_X86_64_converted_reloc_bit.
1815 (elf_x86_64_check_tls_transition): Get the real relocation type
1816 by masking out R_X86_64_converted_reloc_bit.
1817 (elf_x86_64_convert_load_reloc): Set R_X86_64_converted_reloc_bit
1818 instead of setting converted_reloc.
1819 (elf_x86_64_relocate_section): Check R_X86_64_converted_reloc_bit
1820 instead of converted_reloc. Get the real relocation type by
1821 masking out R_X86_64_converted_reloc_bit.
1822 (elf_x86_64_link_setup_gnu_properties): Verify that the value of
1823 R_X86_64_converted_reloc_bit is valid.
1824 * elfxx-x86.h (converted_reloc): Removed.
1826 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
1828 * elf32-i386.c (elf_i386_relocate_section): Don't change r_type
1829 when calling elf_i386_tls_transition. Don't use ELF32_R_TYPE
1830 to get the relocation type again.
1831 * elf64-x86-64.c (elf_x86_64_relocate_section): Don't change
1832 r_type when calling elf_x86_64_tls_transition. Don't use
1833 ELF32_R_TYPE to get the relocation type again.
1835 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
1837 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Properly set
1840 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
1842 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Remove the sec
1843 argument. Don't check relocation overflow. Avoid relocation
1844 overflow if --no-relax is used. Set converted_reloc on symbol
1845 if a GOTPCREL relocation is converted.
1846 (elf_x86_64_relocate_section): Issue a fatal error and suggest
1847 --no-relax if GOTPCREL relocation conversion leads to relocation
1849 * elfxx-x86.h (elf_x86_link_hash_entry): Add converted_reloc.
1851 2017-09-05 Alexander Fedotov <alexander.fedotov@nxp.com>
1852 Edmar Wienskoski <edmar.wienskoski@nxp.com
1854 * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_VLE_ADDR20.
1855 (ppc_elf_check_relocs): Handle it.
1856 (ppc_elf_vle_split20): New function.
1857 (ppc_elf_relocate_section): Handle R_PPC_VLE_ADDR20.
1859 2017-09-03 H.J. Lu <hongjiu.lu@intel.com>
1862 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Set tlsdesc_plt
1863 for x86-64 if GOT_TLS_GDESC_P is true.
1865 2017-09-03 Alan Modra <amodra@gmail.com>
1868 * elfxx-x86.h (elf_x86_hash_table): Check is_elf_hash_table first.
1870 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1872 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1873 tls_get_addr for x86-64 in one place.
1875 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1877 * configure.ac (bfd_backends): Add elf64-x86-64.lo together
1878 with elfxx-x86.lo for 64-bit BFD.
1879 * configure: Regenerated.
1881 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1883 * elf32-i386.c (elf_i386_convert_load): Renamed to ...
1884 (_bfd_i386_elf_convert_load): This. Remove static.
1885 (elf_i386_size_dynamic_sections): Removed.
1886 (elf_backend_size_dynamic_sections): Likewise.
1887 * elf64-x86-64.c (elf_x86_64_convert_load): Renamed to ...
1888 (_bfd_x86_64_elf_convert_load): This. Remove static.
1889 (elf_x86_64_size_dynamic_sections): Removed.
1890 (elf_backend_size_dynamic_sections): Likewise.
1891 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): Renamed to ...
1892 (elf_x86_allocate_dynrelocs): This. Make it static.
1893 (_bfd_x86_elf_allocate_local_dynrelocs): Renamed to ...
1894 (elf_x86_allocate_local_dynreloc): This. Make it static.
1895 (elf_i386_is_reloc_section): New function.
1896 (elf_x86_64_is_reloc_section): Likewise.
1897 (_bfd_x86_elf_link_hash_table_create): Initialize convert_load,
1898 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
1899 Rearrange got_entry_size initialization.
1900 (_bfd_x86_elf_size_dynamic_sections): New function.
1901 * elfxx-x86.h (elf_x86_link_hash_table): Add convert_load,
1902 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
1903 (_bfd_i386_elf_convert_load): New.
1904 (_bfd_x86_64_elf_convert_load): Likewise.
1905 (_bfd_x86_elf_size_dynamic_sections): Likewise.
1906 (elf_backend_size_dynamic_sections): Likewise.
1907 (_bfd_x86_elf_allocate_dynrelocs): Removed.
1908 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
1910 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1912 * elfxx-x86.h (elf_x86_link_hash_table): Rearrange fields and
1915 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1917 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
1918 sgotplt_jump_table_size with elf_x86_compute_jump_table_size.
1920 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1922 * elf32-i386.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
1923 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Moved to ...
1924 * elfxx-x86.h (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
1925 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Here.
1926 * elf64-x86-64.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
1927 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Removed.
1929 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1931 * elf32-i386.c (elf_i386_allocate_dynrelocs): Removed.
1932 (elf_i386_allocate_local_dynrelocs): Likewise.
1933 (elf_i386_size_dynamic_sections): Replace
1934 elf_i386_allocate_dynrelocs/elf_i386_allocate_local_dynrelocs
1935 with _bfd_x86_elf_allocate_dynrelocs and
1936 _bfd_x86_elf_allocate_local_dynrelocs.
1937 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Removed.
1938 (elf_x86_64_allocate_local_dynrelocs): Likewise.
1939 (elf_x86_64_size_dynamic_sections): Replace
1940 elf_x86_64_allocate_dynrelocs/elf_x86_64_allocate_local_dynrelocs
1941 with _bfd_x86_elf_allocate_dynrelocs and
1942 _bfd_x86_elf_allocate_local_dynrelocs.
1943 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): New function.
1944 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
1945 * elfxx-x86.h (_bfd_x86_elf_allocate_dynrelocs): New prototype.
1946 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
1948 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1950 * elf32-i386.c (is_i386_elf): Removed.
1951 (elf_i386_check_relocs): Replace is_i386_elf with is_x86_elf.
1952 (elf_i386_size_dynamic_sections): Likewise.
1953 (elf_i386_relocate_section): Likewise.
1954 * elf64-x86-64.c (is_x86_64_elf): Removed.
1955 (elf_x86_64_check_relocs): Replace is_x86_64_elf with
1957 (elf_x86_64_size_dynamic_sections): Likewise.
1958 (elf_x86_64_relocate_section): Likewise.
1959 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1961 * elfxx-x86.h (elf_x86_link_hash_table): Add target_id.
1964 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1966 * elf32-i386.c (elf_i386_compute_jump_table_size): Removed.
1967 (elf_i386_allocate_dynrelocs): Replace
1968 elf_i386_compute_jump_table_size with
1969 elf_x86_compute_jump_table_size.
1970 (elf_i386_size_dynamic_sections): Likewise.
1971 * elf64-x86-64.c (elf_x86_64_compute_jump_table_size): Removed.
1972 (elf_x86_64_allocate_dynrelocs): Replace
1973 elf_x86_64_compute_jump_table_size with
1974 elf_x86_compute_jump_table_size.
1975 (elf_x86_64_size_dynamic_sections): Likewise.
1976 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1978 * elfxx-x86.h (elf_x86_link_hash_table): Add got_entry_size.
1979 (elf_x86_compute_jump_table_size): New.
1981 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1983 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1985 (_bfd_x86_elf_adjust_dynamic_symbol): Use sizeof_reloc.
1986 * elfxx-x86.h (elf_x86_link_hash_table): Add sizeof_reloc.
1988 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1990 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check VxWorks
1991 with htab->is_vxworks.
1992 (elf_i386_size_dynamic_sections): Likewise.
1993 (elf_i386_relocate_section): Likewise.
1994 (elf_i386_finish_dynamic_symbol): Likewise.
1995 (elf_i386_finish_dynamic_sections): Likewise.
1997 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1999 * elf32-i386.c (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
2000 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
2001 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Moved to ...
2002 * elfxx-x86.h (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
2003 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
2004 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Here.
2005 * elf64-x86-64.c (GOT_TLS_IE, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
2006 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Removed.
2008 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
2011 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Check
2012 ELF_COMMON_DEF_P for common symbols.
2014 2017-09-02 Alan Modra <amodra@gmail.com>
2016 * elf-eh-frame.c (offset_adjust): Avoid false positive gcc warning.
2017 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Likewise.
2018 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
2020 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
2022 * elf32-i386.c (elf_i386_gc_mark_hook): Removed.
2023 (elf_backend_gc_mark_hook): Likewise.
2024 * elf64-x86-64.c (elf_x86_64_gc_mark_hook): Likewise.
2025 (elf_backend_gc_mark_hook): Likewise.
2026 * elfxx-x86.c (_bfd_x86_elf_gc_mark_hook): New function.
2027 * elfxx-x86.h (_bfd_x86_elf_gc_mark_hook): New.
2028 (elf_backend_gc_mark_hook): Likewise.
2030 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
2032 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Removed.
2033 (elf_backend_adjust_dynamic_symbol): Likewise.
2034 * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise.
2035 (elf_backend_adjust_dynamic_symbol): Likewise.
2036 * elfxx-x86.c (_bfd_x86_elf_adjust_dynamic_symbol): New function.
2037 (_bfd_x86_elf_link_setup_gnu_properties): Copy is_vxworks.
2038 * elfxx-x86.h (elf_x86_link_hash_table): Add is_vxworks.
2039 (_bfd_x86_elf_adjust_dynamic_symbol): New.
2040 (elf_backend_adjust_dynamic_symbol): Likewise.
2042 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
2044 * elfxx-x86.h (elf_x86_plt_layout_table): Fix a typo in
2047 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
2049 * elf32-i386.c (elf_i386_mkobject): Removed.
2050 (bfd_elf32_mkobject): Likewise.
2051 * elf64-x86-64.c (elf_x86_64_mkobject): Likewise.
2052 (bfd_elf64_mkobject): Likewise.
2053 (bfd_elf32_mkobject): Likewise.
2054 * elfxx-x86.c (_bfd_x86_elf_mkobject): New function.
2055 * elfxx-x86.h (_bfd_x86_elf_mkobject): New.
2056 (bfd_elf64_mkobject): Likewise.
2057 (bfd_elf32_mkobject): Likewise.
2059 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
2061 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Updated.
2062 Call _bfd_x86_elf_link_setup_gnu_properties.
2063 * elf64-x86-64.c (elf_x86_lazy_plt_layout): Initialize
2064 pic_plt0_entry and pic_plt_entry fields with the non-PIC PLT
2066 (elf_x86_64_non_lazy_plt): Likewise.
2067 (elf_x86_64_lazy_bnd_plt): Likewise.
2068 (elf_x86_64_non_lazy_bnd_plt): Likewise.
2069 (elf_x86_64_lazy_ibt_plt): Likewise.
2070 (elf_x32_lazy_ibt_plt): Likewise.
2071 (elf_x86_64_non_lazy_ibt_plt): Likewise.
2072 (elf_x32_non_lazy_ibt_plt): Likewise.
2073 (elf_x86_64_nacl_plt): Likewise.
2074 (elf_x86_64_link_setup_gnu_properties): Updated. Call
2075 _bfd_x86_elf_link_setup_gnu_properties.
2076 * elfxx-x86.c: Include elf-vxworks.h".
2077 (_bfd_x86_elf_link_setup_gnu_properties): New function.
2078 * elfxx-x86.h (elf_x86_lazy_plt_layout): Remove "for i386 only"
2079 comments for pic_plt0_entry and pic_plt_entry.
2080 (elf_x86_non_lazy_plt_layout): Likewise.
2081 (elf_x86_plt_layout_table): New.
2082 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
2084 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
2087 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Create
2088 .eh_frame section for the second PLT.
2089 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Correct
2090 alignment of .eh_frame section for the second PLT.
2092 2017-09-01 Nick Clifton <nickc@redhat.com>
2095 * dwarf2.c (decode_line_info): Fix test for an overlong line info
2098 2017-09-01 Nick Clifton <nickc@redhat.com>
2101 * elf-attrs.c (_bfd_elf_parse_attributes): Ensure that the
2102 attribute buffer is NUL terminated.
2104 2017-08-31 Nick Clifton <nickc@redhat.com>
2107 * dwarf2.c (read_section): If necessary add a terminating NUL byte
2108 to dwarf string sections.
2110 2017-08-31 Alan Modra <amodra@gmail.com>
2112 * po/SRC-POTFILES.in: Regenerate.
2114 2017-08-31 Alan Modra <amodra@gmail.com>
2116 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Don't exit early
2117 for a section containing just a terminator. Allow multiple
2118 terminators at end of section.
2119 * elflink.c (bfd_elf_discard_info): Iterate over .eh_frame
2120 sections when not adding alignment. Assert on terminator in
2123 2017-08-31 Alan Modra <amodra@gmail.com>
2127 * elflink.c (bfd_elf_discard_info): Don't pad embedded zero
2130 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
2132 * configure.ac (bfd_backends): Add elf64.lo together with
2133 elfxx-x86.lo for 64-bit BFD.
2134 * configure: Regenerated.
2136 2017-08-31 James Bowman <james.bowman@ftdichip.com>
2138 * elf32-ft32.c (ft32_elf_howto_table): Use complain_overflow_dont
2141 2017-08-31 Alan Modra <amodra@gmail.com>
2144 * opncls.c (bfd_close_all_done): Don't call bfd_cache_close
2145 before _close_and_cleanup. Call iovec->bclose after.
2146 (bfd_close): Remove code common to, and call, bfd_close_all_done.
2148 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
2150 * elf32-i386.c (elf_i386_plt_type): Removed.
2151 (elf_i386_plt): Likewise.
2152 (elf_i386_get_synthetic_symtab): Updated. Call
2153 _bfd_x86_elf_get_synthetic_symtab.
2154 * elf64-x86-64.c (elf_x86_64_plt_type): Removed.
2155 (elf_x86_64_plt): Likewise.
2156 (elf_x86_64_get_synthetic_symtab): Updated. Call
2157 _bfd_x86_elf_get_synthetic_symtab.
2158 * elfxx-x86.c (elf_i386_get_plt_got_vma): New function.
2159 (elf_x86_64_get_plt_got_vma): Likewise.
2160 (elf_i386_valid_plt_reloc_p): Likewise.
2161 (elf_x86_64_valid_plt_reloc_p): Likewise.
2162 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
2163 * elfxx-x86.h (elf_x86_plt_type): New.
2164 (elf_x86_plt): Likewise.
2165 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
2167 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
2169 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Check
2170 target_id instead of elf_machine_code.
2172 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
2174 * elf32-i386.c (ELF_DYNAMIC_INTERPRETER): Removed.
2175 (elf_i386_lazy_plt_layout): Likewise.
2176 (elf_i386_non_lazy_plt_layout): Likewise.
2177 (elf_i386_plt_layout): Likewise.
2178 (elf_i386_link_hash_table): Likewise.
2179 (elf_i386_next_tls_desc_index): Likewise.
2180 (elf_i386_srelplt2): Likewise.
2181 (elf_i386_plt): Likewise.
2182 (elf_i386_lazy_plt): Likewise.
2183 (elf_i386_non_lazy_plt): Likewise.
2184 (elf_i386_link_hash_table_create): Likewise.
2185 (bfd_elf32_bfd_link_hash_table_create): Likewise.
2186 (elf_i386_lazy_plt): Updated.
2187 (elf_i386_non_lazy_plt): Likewise.
2188 (elf_i386_lazy_ibt_plt): Likewise.
2189 (elf_i386_non_lazy_ibt_plt): Likewise.
2190 (elf_i386_allocate_dynrelocs): Likewise.
2191 (elf_i386_size_dynamic_sections): Likewise.
2192 (elf_i386_relocate_section): Likewise.
2193 (elf_i386_finish_dynamic_symbol): Likewise.
2194 (elf_i386_finish_dynamic_sections): Likewise.
2195 (elf_i386_get_synthetic_symtab): Likewise.
2196 (elf_i386_link_setup_gnu_properties): Likewise.
2197 (elf_i386_nacl_plt): Likewise.
2198 * elf64-x86-64.c (ABI_64_P): Removed.
2199 (ELF64_DYNAMIC_INTERPRETER): Likewise.
2200 (ELF32_DYNAMIC_INTERPRETER): Likewise.
2201 (elf_x86_64_lazy_plt_layout): Likewise.
2202 (elf_x86_64_non_lazy_plt_layout): Likewise.
2203 (elf_x86_64_plt_layout): Likewise.
2204 (elf_x86_64_link_hash_table): Likewise.
2205 (elf_x86_64_plt): Likewise.
2206 (elf_x86_64_lazy_plt): Likewise.
2207 (elf_x86_64_non_lazy_plt): Likewise.
2208 (elf_x86_64_link_hash_table_create): Likewise.
2209 (bfd_elf64_bfd_link_hash_table_create): Likewise.
2210 (bfd_elf32_bfd_link_hash_table_create): Likewise.
2211 (elf_x86_64_lazy_plt): Updated.
2212 (elf_x86_64_non_lazy_plt): Likewise.
2213 (elf_x86_64_lazy_bnd_plt): Likewise.
2214 (elf_x86_64_non_lazy_bnd_plt): Likewise.
2215 (elf_x86_64_lazy_ibt_plt): Likewise.
2216 (elf_x32_lazy_ibt_plt): Likewise.
2217 (elf_x86_64_non_lazy_ibt_plt): Likewise.
2218 (elf_x32_non_lazy_ibt_plt): Likewise.
2219 (elf_x86_64_allocate_dynrelocs): Likewise.
2220 (elf_x86_64_size_dynamic_sections): Likewise.
2221 (elf_x86_64_relocate_section): Likewise.
2222 (elf_x86_64_finish_dynamic_symbol): Likewise.
2223 (elf_x86_64_finish_dynamic_sections): Likewise.
2224 (elf_x86_64_get_synthetic_symtab): Likewise.
2225 (elf_x86_64_link_setup_gnu_properties): Likewise.
2226 (elf_x86_64_nacl_plt): Likewise.
2227 * elfxx-x86.c: Include "objalloc.h", "elf/i386.h" and
2229 (ELF32_DYNAMIC_INTERPRETER): New.
2230 (ELF64_DYNAMIC_INTERPRETER): Likewise.
2231 (ELFX32_DYNAMIC_INTERPRETER): Likewise.
2232 (_bfd_x86_elf_link_hash_table_create): Likewise.
2233 (_bfd_x86_elf_link_hash_table_free): Renamed to ...
2234 (elf_x86_link_hash_table_free): This. Make it static.
2235 * elfxx-x86.h: Don't include "objalloc.h".
2237 (elf_x86_lazy_plt_layout): Likewise.
2238 (elf_x86_non_lazy_plt_layout): Likewise.
2239 (elf_x86_plt_layout): Likewise.
2240 (_bfd_x86_elf_link_hash_table_create): Likewise.
2241 (bfd_elf64_bfd_link_hash_table_create): Likewise.
2242 (bfd_elf32_bfd_link_hash_table_create): Likewise.
2243 (elf_x86_link_hash_table): Add plt, lazy_plt, non_lazy_plt,
2244 srelplt2 and next_tls_desc_index.
2245 (_bfd_x86_elf_link_hash_table_free): Removed.
2247 2017-08-30 Maciej W. Rozycki <macro@imgtec.com>
2249 * elfxx-mips.c (mips_elf_perform_relocation): Correct microMIPS
2250 branch offset interpretation.
2252 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
2255 * opncls.c (bfd_close_all_done): Call _close_and_cleanup.
2257 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
2259 * elf64-x86-64.c (elf_x86_64_next_tls_desc_index): Removed.
2260 (elf_x86_64_srelplt2): Likewise.
2262 2017-08-30 Alan Modra <amodra@gmail.com>
2264 * elf64-ppc.c (struct ppc_link_hash_table): Add do_tls_opt.
2265 (ppc64_elf_tls_optimize): Set it.
2266 (ppc64_elf_relocate_section): Nop addis on TPREL16_HA, and convert
2267 insn on TPREL16_LO and TPREL16_LO_DS relocs to use r13 when
2268 addis would add zero.
2269 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add do_tls_opt.
2270 (ppc_elf_tls_optimize): Set it.
2271 (ppc_elf_relocate_section): Nop addis on TPREL16_HA, and convert
2272 insn on TPREL16_LO relocs to use r2 when addis would add zero.
2274 2017-08-30 Alan Modra <amodra@gmail.com>
2276 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing
2277 __tls_get_addr call sequences to LE, don't move the addi down
2278 to the nop. Replace the bl with addi and leave the nop alone.
2280 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
2282 * elf32-i386.c (elf_i386_pie_finish_undefweak_symbol):
2284 * elf64-x86-64.c (elf_x86_64_finish_local_dynamic_symbol):
2286 (elf_x86_64_pie_finish_undefweak_symbol): Likewise.
2288 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
2290 * Makefile.am (BFD32_BACKENDS): Add elfxx-x86.lo.
2291 (BFD64_BACKENDS): Likewise.
2292 (BFD32_BACKENDS_CFILES): Add elfxx-x86.c.
2293 (BFD64_BACKENDS_CFILES): Likewise.
2294 * Makefile.in: Regenerated.
2295 * configure.ac (bfd_backends): Add elfxx-x86.lo together with
2296 elf32-i386.lo and elf64-x86-64.lo.
2297 * configure: Regenerated.
2298 * elf32-i386.c: Include "elfxx-x86.h" instead of "sysdep.h",
2299 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
2300 "objalloc.h" and "hashtab.h".
2301 (ELIMINATE_COPY_RELOCS): Removed.
2302 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
2303 (SYMBOL_NO_COPYRELOC): Likewise.
2304 (elf_i386_link_hash_entry): Likewise.
2305 (GOT_UNKNOWN): Likewise.
2306 (GOT_NORMAL): Likewise.
2307 (GOT_TLS_GD): Likewise.
2308 (elf_i386_hash_entry): Likewise.
2309 (elf_i386_obj_tdata): Likewise.
2310 (elf_i386_tdata): Likewise.
2311 (elf_i386_local_got_tls_type): Likewise.
2312 (elf_i386_local_tlsdesc_gotent): Likewise.
2313 (elf_i386_hash_table): Likewise.
2314 (elf_i386_link_hash_newfunc): Likewise.
2315 (elf_i386_local_htab_hash): Likewise.
2316 (elf_i386_local_htab_eq): Likewise.
2317 (elf_i386_get_local_sym_hash): Likewise.
2318 (elf_i386_link_hash_table_free): Likewise.
2319 (elf_i386_copy_indirect_symbol): Likewise.
2320 (elf_i386_fixup_symbol): Likewise.
2321 (elf_i386_readonly_dynrelocs): Likewise.
2322 (elf_i386_always_size_sections): Likewise.
2323 (elf_i386_set_tls_module_base): Likewise.
2324 (elf_i386_dtpoff_base): Likewise.
2325 (compare_relocs): Likewise.
2326 (elf_i386_hash_symbol): Likewise.
2327 (elf_i386_parse_gnu_properties): Likewise.
2328 (elf_i386_merge_gnu_properties): Likewise.
2329 (elf_i386_link_check_relocs): Likewise.
2330 (elf_i386_merge_symbol_attribute): Likewise.
2331 (bfd_elf32_bfd_link_check_relocs): Likewise.
2332 (elf_backend_copy_indirect_symbol): Likewise.
2333 (elf_backend_always_size_sections): Likewise.
2334 (elf_backend_omit_section_dynsym): Likewise.
2335 (elf_backend_hash_symbol): Likewise.
2336 (elf_backend_fixup_symbol): Likewise.
2337 (elf_backend_parse_gnu_properties): Likewise.
2338 (elf_backend_merge_gnu_properties): Likewise.
2339 (elf_backend_merge_symbol_attribute): Likewise.
2340 (elf_i386_mkobject): Updated.
2341 (elf_i386_link_hash_table_create): Likewise.
2342 (elf_i386_check_tls_transition): Likewise.
2343 (elf_i386_tls_transition): Likewise.
2344 (elf_i386_convert_load_reloc): Likewise.
2345 (elf_i386_check_relocs): Likewise.
2346 (elf_i386_adjust_dynamic_symbol): Likewise.
2347 (elf_i386_allocate_dynrelocs): Likewise.
2348 (elf_i386_convert_load): Likewise.
2349 (elf_i386_size_dynamic_sections): Likewise.
2350 (elf_i386_relocate_section): Likewise.
2351 (elf_i386_finish_dynamic_symbol ): Likewise.
2352 (elf_i386_finish_dynamic_sections): Likewise.
2353 (elf_i386_output_arch_local_syms): Likewise.
2354 (elf_i386_get_synthetic_symtab): Likewise.
2355 (elf_i386_link_setup_gnu_properties): Likewise.
2356 (elf_i386_link_hash_table): Use elf_x86_link_hash_table, instead
2357 of elf_link_hash_table, as base.
2358 (elf_i386_next_tls_desc_index): New.
2359 (elf_i386_srelplt2): Likewise.
2360 (elf_i386_plt): Likewise.
2361 (elf_i386_lazy_plt): Likewise.
2362 (elf_i386_non_lazy_plt): Likewise.
2363 * elf32-x86-64.c: Include "elfxx-x86.h" instead of "sysdep.h",
2364 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
2365 "objalloc.h" and "hashtab.h".
2366 (ELIMINATE_COPY_RELOCS): Removed.
2367 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
2368 (SYMBOL_NO_COPYRELOC): Likewise.
2369 (elf_x86_64_link_hash_entry): Likewise.
2370 (GOT_UNKNOWN): Likewise.
2371 (GOT_NORMAL): Likewise.
2372 (GOT_TLS_GD): Likewise.
2373 (elf_x86_64_hash_entry): Likewise.
2374 (elf_x86_64_obj_tdata): Likewise.
2375 (elf_x86_64_tdata): Likewise.
2376 (elf_x86_64_local_got_tls_type): Likewise.
2377 (elf_x86_64_local_tlsdesc_gotent): Likewise.
2378 (elf_x86_64_hash_table): Likewise.
2379 (elf_x86_64_link_hash_newfunc): Likewise.
2380 (elf_x86_64_local_htab_hash): Likewise.
2381 (elf_x86_64_local_htab_eq): Likewise.
2382 (elf_x86_64_get_local_sym_hash): Likewise.
2383 (elf_x86_64_link_hash_table_free): Likewise.
2384 (elf_x86_64_copy_indirect_symbol): Likewise.
2385 (elf_x86_64_fixup_symbol): Likewise.
2386 (elf_x86_64_readonly_dynrelocs): Likewise.
2387 (elf_x86_64_always_size_sections): Likewise.
2388 (elf_x86_64_set_tls_module_base): Likewise.
2389 (elf_x86_64_dtpoff_base): Likewise.
2390 (compare_relocs): Likewise.
2391 (elf_x86_64_merge_symbol_attribute): Likewise.
2392 (elf_x86_64_hash_symbol): Likewise.
2393 (elf_x86_64_parse_gnu_properties): Likewise.
2394 (elf_x86_64_merge_gnu_properties): Likewise.
2395 (elf_x86_64_link_check_relocs): Likewise.
2396 (elf_backend_copy_indirect_symbol): Likewise.
2397 (elf_backend_always_size_sections): Likewise.
2398 (bfd_elf64_bfd_link_check_relocs): Likewise.
2399 (elf_backend_merge_symbol_attribute): Likewise.
2400 (elf_backend_hash_symbol): Likewise.
2401 (elf_backend_omit_section_dynsym): Likewise.
2402 (elf_backend_fixup_symbol): Likewise.
2403 (elf_backend_parse_gnu_properties): Likewise.
2404 (elf_backend_merge_gnu_properties): Likewise.
2405 (bfd_elf32_bfd_link_check_relocs): Likewise.
2406 (elf_x86_64_mkobject): Updated.
2407 (elf_x86_64_link_hash_table_create): Likewise.
2408 (elf_x86_64_check_tls_transition): Likewise.
2409 (elf_x86_64_tls_transition): Likewise.
2410 (elf_x86_64_convert_load_reloc): Likewise.
2411 (elf_x86_64_check_relocs): Likewise.
2412 (elf_x86_64_adjust_dynamic_symbol): Likewise.
2413 (elf_x86_64_allocate_dynrelocs): Likewise.
2414 (elf_x86_64_convert_load): Likewise.
2415 (elf_x86_64_size_dynamic_sections): Likewise.
2416 (elf_x86_64_relocate_section): Likewise.
2417 (elf_x86_64_finish_dynamic_symbol ): Likewise.
2418 (elf_x86_64_finish_dynamic_sections): Likewise.
2419 (elf_x86_64_output_arch_local_syms): Likewise.
2420 (elf_x86_64_get_synthetic_symtab): Likewise.
2421 (elf_x86_64_link_setup_gnu_properties): Likewise.
2422 (elf_x86_64_link_hash_table): Use elf_x86_link_hash_table,
2423 instead of elf_link_hash_table, as base.
2424 (elf_x86_64_next_tls_desc_index): New.
2425 (elf_x86_64_srelplt2): Likewise.
2426 (elf_x86_64_plt): Likewise.
2427 (elf_x86_64_lazy_plt): Likewise.
2428 (elf_x86_64_non_lazy_plt): Likewise.
2429 * elfxx-x86.c: New file.
2430 * elfxx-x86.h: Likewise.
2432 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
2434 * elf32-i386.c (elf_i386_get_synthetic_symtab): Simplify bad
2436 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
2438 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
2440 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check valid PLT
2441 sections before checking dynamic relocations and free invalid
2442 PLT section contents.
2443 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
2445 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
2447 * elf-bfd.h (_bfd_elf_ifunc_get_synthetic_symtab): Removed.
2448 * elf-ifunc.c (_bfd_elf_ifunc_get_synthetic_symtab): Likewise.
2450 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
2453 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check for valid
2455 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
2457 2017-08-27 H.J. Lu <hongjiu.lu@intel.com>
2459 * elf32-i386.c (elf_i386_link_hash_newfunc): Initialize
2461 * elf64-x86-64.c (elf_x86_64_link_hash_newfunc): Likewise.
2463 2017-08-26 H.J. Lu <hongjiu.lu@intel.com>
2466 * elf-bfd.h (elf_obj_tdata): Use ENUM_BITFIELD on object_id,
2467 dyn_lib_class and has_gnu_symbols. Change bad_symtab to bitfield.
2468 Add a has_no_copy_on_protected bitfield.
2469 (elf_has_no_copy_on_protected): New.
2470 * elf-properties.c (_bfd_elf_parse_gnu_properties): Set
2471 elf_has_no_copy_on_protected for GNU_PROPERTY_NO_COPY_ON_PROTECTED.
2472 (elf_merge_gnu_property_list): Likewise.
2473 (_bfd_elf_link_setup_gnu_properties): Set extern_protected_data
2474 to FALSE for elf_has_no_copy_on_protected.
2475 * elf32-i386.c (SYMBOL_NO_COPYRELOC): New.
2476 (elf_i386_link_hash_entry): Add def_protected.
2477 (elf_i386_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
2478 when checking info->nocopyreloc.
2479 (elf_i386_link_setup_gnu_properties): Don't set
2480 extern_protected_data here.
2481 (elf_i386_merge_symbol_attribute): New function.
2482 (elf_backend_merge_symbol_attribute): New.
2483 * elf64-x86-64.c (SYMBOL_NO_COPYRELOC): New.
2484 (elf_x86_64_link_hash_entry): Add def_protected.
2485 (elf_x86_64_need_pic): Report protected symbol for def_protected.
2486 (elf_x86_64_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
2487 when checking info->nocopyreloc.
2488 (elf_x86_64_relocate_section): Also check for R_X86_64_PC32
2489 relocation run-time overflow and unresolvable R_X86_64_32S
2490 relocation against protected data symbol defined in shared object
2491 with GNU_PROPERTY_NO_COPY_ON_PROTECTED.
2492 (elf_x86_64_link_setup_gnu_properties): Don't set
2493 extern_protected_data here.
2494 (elf_x86_64_merge_symbol_attribute): New function.
2495 (elf_backend_merge_symbol_attribute): New.
2497 2017-08-26 Alan Modra <amodra@gmail.com>
2499 * elf32-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
2500 (ppc_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
2501 (ppc_elf_relocate_section): Comment fix.
2502 * elf64-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
2503 (ppc64_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
2504 Support dynamic relocs for TPREL16 when non-pic too.
2505 (dec_dynrel_count): Adjust TPREL16 handling as per check_relocs.
2506 (ppc64_elf_relocate_section): Support dynamic relocs for TPREL16
2509 2017-08-25 H.J. Lu <hongjiu.lu@intel.com>
2511 * elf32-i386.c (elf_i386_link_hash_entry): Remove redundant
2512 "symbol" in comments.
2513 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Likewise.
2515 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
2518 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for
2519 R_X86_64_PC32 relocation run-time overflow and unresolvable
2520 R_X86_64_32S relocation with -z nocopyreloc.
2522 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
2524 * elf32-i386.c (elf_i386_check_relocs): Revert the last change.
2525 Undefined symbols may not have a type.
2526 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
2528 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
2530 * elf64-x86-64.c (elf_x86_64_need_pic): Add an argument for
2531 bfd_link_info. Report shared, PIE or PDE object based on
2533 (elf_x86_64_check_relocs): Update elf_x86_64_need_pic call.
2534 (elf_x86_64_relocate_section): Likewise.
2536 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
2538 * elf32-i386.c (elf_i386_check_relocs): Increment PLT count only
2539 for function symbols.
2540 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
2542 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
2544 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set
2545 extern_protected_data to FALSE if GNU_PROPERTY_NO_COPY_ON_PROTECTED
2546 is set on any input relocatable file.
2547 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
2549 2017-08-23 Alan Modra <amodra@gmail.com>
2552 * elf64-ppc.c (ensure_undef_dynamic): Rename from
2553 ensure_undefweak_dynamic. Handle undefined too.
2554 * elf32-ppc.c (ensure_undef_dynamic): Likewise.
2555 * elf32-hppa.c (ensure_undef_dynamic): Likewise.
2556 (allocate_dynrelocs): Discard undefined non-default visibility
2557 relocs first. Make undefined syms dynamic. Tidy goto.
2559 2017-08-21 Alan Modra <amodra@gmail.com>
2560 H.J. Lu <hongjiu.lu@intel.com>
2563 * elf-bfd.h (SYMBOLIC_BIND): Return TRUE for __start/__stop symbols.
2564 * elflink.c (bfd_elf_define_start_stop): Rewrite.
2566 2017-08-21 Hans-Peter Nilsson <hp@bitrange.com>
2569 * elf64-mmix.c (mmix_elf_relax_section): Correct handling of
2570 undefined weak symbols.
2572 2017-08-18 Nick Clifton <nickc@redhat.com>
2575 * tekhex.c (getsym): Fix check for source pointer walking off the
2576 end of the input buffer.
2578 2017-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
2581 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Skip IFUNC
2582 relocations in debug sections, change abort to _bfd_error_handler.
2584 2017-08-14 Nick Clifton <nickc@redhat.com>
2587 * elf.c (setup_group): Check for an empty or very small group
2589 * po/bfd.pot: Regenerate.
2591 2017-08-14 Alan Modra <amodra@gmail.com>
2594 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't add
2595 alignment padding here.
2596 * elflink.c (bfd_elf_discard_info): Add .eh_frame padding here
2597 in a reverse pass over sections.
2599 2017-08-11 H.J. Lu <hongjiu.lu@intel.com>
2602 * elf32-i386.c (elf_i386_get_synthetic_symtab): Allocate space
2603 for @plt suffixes first.
2604 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
2606 2017-08-08 Nick Clifton <nickc@redhat.com>
2609 * elf-attrs.c (_bfd_elf_parse_attributes): Complain about very
2610 small section lengths.
2611 * elf.c (_bfd_elf_setup_sections): Skip empty entries in the group
2613 (elfcore_grok_freebsd_prstatus): Add checks to make sure that
2614 there is enough data present in the note.
2616 2017-08-08 Alan Modra <amodra@gmail.com>
2619 * elf32-microblaze.c (microblaze_elf_check_relocs): Don't bump
2620 got.refcount for GOTOFF relocs, just create .got section.
2622 2017-08-07 H.J. Lu <hongjiu.lu@intel.com>
2624 * elflink.c (elf_link_add_object_symbols): Move common symbol
2625 check after bed->common_definition.
2627 2017-08-07 Alan Modra <amodra@gmail.com>
2630 * elflink.c (bfd_elf_final_link): Don't segfault when sections
2631 needed to define various dynamic tags have been discarded.
2633 2017-08-07 Nick Clifton <nickc@redhat.com>
2636 * elf32-i386.c (elf_i386_link_setup_gnu_properties): If the dynobj
2637 has not been set then use the bfd returned by
2638 _bfd_elf_link_setup_gnu_properties. If that is null then search
2639 through all the input bfds selecting the first normal, ELF format
2641 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
2643 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
2645 * elf32-i386.c (elf_i386_link_hash_entry): Change tls_get_addr
2647 (elf_i386_link_hash_newfunc): Initialize tls_get_addr to 0.
2648 (elf_i386_check_tls_transition): Check tls_get_addr directly.
2649 (elf_i386_convert_load_reloc): Update tls_get_addr check.
2650 (elf_i386_link_check_relocs): New function.
2651 (bfd_elf32_bfd_link_check_relocs): New.
2652 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Change tls_get_addr
2654 (elf_x86_64_link_hash_newfunc): Initialize tls_get_addr to 0.
2655 (elf_x86_64_check_tls_transition): Check tls_get_addr directly.
2656 (elf_x86_64_convert_load_reloc): Update tls_get_addr check.
2657 (elf_x86_64_link_check_relocs): New function.
2658 (bfd_elf64_bfd_link_check_relocs): New.
2659 (bfd_elf32_bfd_link_check_relocs): Likewise.
2661 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
2664 * elflink.c (elf_link_add_object_symbols): Treat common symbol
2665 as undefined for --no-define-common.
2667 2017-08-05 Alan Modra <amodra@gmail.com>
2669 * elf32-hppa.c (elf32_hppa_set_gp): Don't require an
2670 hppa_link_hash_table.
2672 2017-08-02 Max Filippov <jcmvbkbc@gmail.com>
2674 * xtensa-isa.c (xtensa_isa_init): Don't update lookup table
2675 entries for sysregs with negative indices.
2677 2017-08-01 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2679 * elf32-s390.c (elf_s390_finish_dynamic_sections): Skip if it
2680 isn't the S/390 specific elf data.
2681 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
2683 2017-07-31 Kuan-Lin Chen <rufus@andestech.com>
2685 * elfxx-riscv.c (riscv_elf_add_sub_reloc): New function.
2686 * (howto_table) [R_RISCV_ADD8]: Use riscv_elf_add_sub_reloc.
2687 [R_RISCV_ADD16]: Likewise.
2688 [R_RISCV_ADD32]: Likewise.
2689 [R_RISCV_ADD64]: Likewise.
2690 [R_RISCV_SUB6]: Likewise.
2691 [R_RISCV_SUB8]: Likewise.
2692 [R_RISCV_SUB16]: Likewise.
2693 [R_RISCV_SUB32]: Likewise.
2694 [R_RISCV_SUB64]: Likewise.
2696 2017-07-31 Alan Modra <amodra@gmail.com>
2698 * elf64-ppc.c (ppc64_elf_tls_setup): Warn on --plt-localentry
2699 without ld.so checks.
2701 2017-07-29 Alan Modra <amodra@gmail.com>
2704 * elf64-ppc.c (struct ppc_link_hash_entry): Add non_zero_localentry.
2705 (ppc64_elf_merge_symbol): Set non_zero_localentry.
2706 (is_elfv2_localentry0): Test non_zero_localentry.
2707 (ppc64_elf_tls_setup): Default to --no-plt-localentry.
2709 2017-07-28 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2711 * elf32-s390.c (elf_s390_finish_dynamic_sections): Add NULL
2712 pointer check for htab->elf.irelplt.
2713 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
2715 2017-07-27 Nick Clifton <nickc@redhat.com>
2718 * mach-o.c (bfd_mach_o_read_symtab_strtab): Fail if the symtab
2720 * nlmcode.h (nlm_swap_auxiliary_headers_in): Replace assertion
2722 * section.c (bfd_make_section_with_flags): Fail if the name or bfd
2724 * vms-alpha.c (bfd_make_section_with_flags): Correct computation
2726 (evax_bfd_print_emh): Check for invalid string lengths.
2728 2017-07-25 Nick Clifton <nickc@redhat.com>
2730 * po/fr.po: Updated French translation.
2732 2017-07-25 Benjamin Green <bengreen5mx@gmail.com>
2735 * elf32-msp430.c (msp430_elf_relax_section): Allow conversion of
2736 16-bit absolute branches into 10-bit pc-relative branches on the
2737 MSP430 as well as the MSP430X.
2739 2017-07-25 Alan Modra <amodra@gmail.com>
2741 * elf64-ppc.c (struct map_stub): Add tls_get_addr_opt_bctrl.
2742 (stub_eh_frame_size): New function.
2743 (ppc_size_one_stub): Set group tls_get_addr_opt_bctrl.
2744 (group_sections): Init group tls_get_addr_opt_bctrl.
2745 (ppc64_elf_size_stubs): Update sizing and initialization of
2746 .eh_frame. Iteration over stubs via group list.
2747 (ppc64_elf_build_stubs): Iterate over stubs via group list.
2748 (ppc64_elf_finish_dynamic_sections): Update finalization of
2751 2017-07-24 Nick Clifton <nickc@redhat.com>
2754 * mach-o.c (bfd_mach_o_canonicalize_relocs): Pass the base address
2755 of the relocs to the canonicalize_one_reloc routine.
2756 * mach-o.h (struct bfd_mach_o_backend_data): Update the prototype
2757 for the _bfd_mach_o_canonicalize_one_reloc field.
2758 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add
2759 res_base parameter. Use to check for corrupt pair relocs.
2760 * mach-o-aarch64.c (bfd_mach_o_arm64_canonicalize_one_reloc):
2762 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc):
2764 * mach-o-x86-64.c (bfd_mach_o_x86_64_canonicalize_one_reloc):
2767 * vms-alpha.c (_bfd_vms_slurp_eihd): Make sure that there is
2768 enough data in the record before attempting to parse it.
2769 (_bfd_vms_slurp_eeom): Likewise.
2771 (_bfd_vms_slurp_egsd): Check for an invalid section index.
2772 (image_set_ptr): Likewise.
2773 (alpha_vms_slurp_relocs): Likewise.
2775 (alpha_vms_object_p): Check for a truncated record.
2777 2017-07-24 Nick Clifton <nickc@redhat.com>
2780 * reloc.c (_bfd_unrecognized_reloc): New function. Reports
2781 an unrecognized reloc and sets the bfd_error value.
2782 * libbfd.h: Regenerate.
2783 * elf32-arm.c (elf32_arm_final_link_relocate): Use the new
2785 * elf32-i386.c (elf_i386_relocate_section): Likewise.
2786 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
2787 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
2788 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise.
2789 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
2791 2017-07-23 Alan Modra <amodra@gmail.com>
2793 * elf64-ppc.c (ppc64_elf_size_stubs): Correct advance to
2796 2017-07-19 Szabolcs Nagy <szabolcs.nagy@arm.com>
2799 * elfnn-aarch64.c (elfNN_aarch64_reloc_type_class): Return
2800 reloc_class_ifunc for ifunc symbols.
2802 2017-07-19 Nick Clifton <nickc@redhat.com>
2805 * archive.c (bfd_generic_archive_p): If the bfd does not have the
2806 correct magic bytes at the start, set the error to wrong format
2807 and clear the format selector before returning NULL.
2809 2017-07-19 Nick Clifton <nickc@redhat.com>
2812 * coff-rs6000.c (_bfd_strntol): New function.
2813 (_bfd_strntoll): New function.
2814 (GET_VALUE_IN_FIELD): New macro.
2815 (EQ_VALUE_IN_FIELD): new macro.
2816 (_bfd_xcoff_slurp_armap): Use new macros.
2817 (_bfd_xcoff_archive_p): Likewise.
2818 (_bfd_xcoff_read_ar_hdr): Likewise.
2819 (_bfd_xcoff_openr_next_archived_file): Likewise.
2820 (_bfd_xcoff_stat_arch_elt): Likewise.
2821 * coff64-rs6000.c (_bfd_strntol): New function.
2822 (_bfd_strntoll): New function.
2823 (GET_VALUE_IN_FIELD): New macro.
2824 (xcoff64_slurp_armap): Use new macros.
2826 2017-07-19 Claudiu Zissulescu <claziss@synopsys.com>
2827 John Eric Martin <John.Martin@emmicro-us.com>
2829 * bfd-in2.h: Regenerate.
2830 * libbfd.h: Regenerate.
2831 * elf32-arc.c (JLI): Define.
2832 * reloc.c: Add JLI relocations.
2834 2017-07-18 Nick Clifton <nickc@redhat.com>
2837 * coff-sh.c: Fix spelling typos.
2838 * compress.c: Likewise.
2839 * cpu-pdp11.c: Likewise.
2840 * ecofflink.c: Likewise.
2841 * elf-m10300.c: Likewise.
2843 * elf32-arm.c: Likewise.
2844 * elf32-m68k.c: Likewise.
2845 * elf32-nds32.c: Likewise.
2846 * elf32-ppc.c: Likewise.
2847 * elf32-sh.c: Likewise.
2848 * elf32-v850.c: Likewise.
2849 * elf64-ppc.c: Likewise.
2850 * elf64-x86-64.c: Likewise.
2851 * elflink.c: Likewise.
2852 * elfnn-aarch64.c: Likewise.
2853 * elfxx-mips.c: Likewise.
2855 * sunos.c: Likewise.
2856 * vms-alpha.c: Likewise.
2857 * xcofflink.c: Likewise.
2859 2017-07-18 Nick Clifton <nickc@redhat.com>
2862 * coffcode.h (handle_COMDAT): Replace abort with an error message
2865 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
2868 * elf64-x86-64.c (elf_x86_64_relocate_section): Limit PIC check
2871 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
2873 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
2875 2017-07-16 Alan Modra <amodra@gmail.com>
2877 * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimize
2878 __tls_index GOT entries when using __tls_get_addr_opt stub.
2879 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2881 2017-07-12 Alan Modra <amodra@gmail.com>
2883 * po/es.po: Update from translationproject.org/latest/bfd/.
2884 * po/fi.po: Likewise.
2885 * po/fr.po: Likewise.
2886 * po/id.po: Likewise.
2887 * po/ja.po: Likewise.
2888 * po/ro.po: Likewise.
2889 * po/ru.po: Likewise.
2890 * po/sr.po: Likewise.
2891 * po/sv.po: Likewise.
2892 * po/tr.po: Likewise.
2893 * po/uk.po: Likewise.
2894 * po/vi.po: Likewise.
2895 * po/zh_CN.po: Likewise.
2896 * po/hr.po: New file from translationproject.org.
2897 * configure.ac (ALL_LINGUAS): Add hr. Sort.
2898 * configure: Regenerate.
2900 2017-07-12 Nick Clifton <nickc@redhat.com>
2902 Fix compile time warnings using gcc 7.1.1.
2903 * elf32-xtensa.c (elf_xtensa_get_plt_section): Increase length of
2905 (elf_xtensa_get_gotplt_section): Increase length of got_name
2907 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add a
2908 default return of FALSE.
2909 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc): Add a
2910 default return of FALSE.
2912 2017-07-12 Alan Modra <amodra@gmail.com>
2914 * binary.c (binary_set_section_contents): Don't print filepos in
2916 (coff_write_object_contents): Cast size_t for error message.
2917 (coff_slurp_line_table): Don't use bfd_vma symndx.
2918 (coff_slurp_reloc_table): Remove unneeded cast.
2919 * dwarf2.c (read_section): Cast bfd_int64_t to long long for
2921 (find_abstract_instance_name): Likewise.
2922 * elf32-arm.c (arm_type_of_stub): Correct error arg order.
2923 (bfd_elf32_arm_stm32l4xx_erratum_scan): Don't cast error arg.
2924 (elf32_arm_check_relocs): Make r_symndx an int.
2925 * elf32-cris.c (cris_elf_check_relocs): Delete extraneous %s in
2927 * elf32-metag.c (elf_metag_relocate_section): Delete extra error
2929 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Rewrite bogus
2931 * elf32-i386.c (elf_i386_check_relocs): Make r_symndx an int.
2932 * elf32-s390.c (elf_s390_check_relocs): Likewise.
2933 * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
2934 * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
2935 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
2936 * elf64-s390.c (elf_s390_check_relocs): Likewise.
2937 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
2938 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Likewise.
2939 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
2940 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
2941 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
2942 * elf64-mmix.c (_bfd_mmix_after_linker_allocation): Cast size_t args
2943 and use %lu for error message.
2944 * elflink.c (elf_link_adjust_relocs): Delete extra error message arg.
2945 * mmo.c (mmo_scan): Make stab_loc a file_ptr. Cast expression for
2948 * elf32-arm.c (elf32_arm_tls_relax): Correct format string and args
2950 (elf32_arm_final_link_relocate): Likewise.
2951 * coff-arm.c (bfd_arm_process_before_allocation): Likewise.
2952 * coffcode.h (styp_to_sec_flags): Likewise.
2953 * cofflink.c (_bfd_coff_write_global_sym): Likewise.
2954 * ecoff.c (_bfd_ecoff_slurp_symbol_table): Likewise.
2955 * elf32-arc.c (arc_elf_merge_private_bfd_data): Likewise.
2956 * elf32-bfin.c (bfinfdpic_check_relocs): Likewise.
2957 (elf32_bfin_merge_private_bfd_data): Likewise.
2958 * elf32-cris.c (cris_elf_relocate_section): Likewise.
2959 * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
2960 * elf32-i370.c (i370_elf_merge_private_bfd_data): Likewise.
2961 (i370_elf_relocate_section): Likewise.
2962 * elf32-iq2000.c (iq2000_elf_merge_private_bfd_data): Likewise.
2963 * elf32-m32c.c (m32c_elf_merge_private_bfd_data): Likewise.
2964 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise.
2965 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
2966 * elf32-mep.c (mep_elf_merge_private_bfd_data): Likewise.
2967 * elf32-mt.c (mt_elf_merge_private_bfd_data): Likewise.
2968 * elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.
2969 * elfxx-mips.c (mips_elf_merge_obj_e_flags): Likewise.
2970 (_bfd_mips_elf_merge_private_bfd_data): Likewise.
2971 * ieee.c (ieee_write_id, read_id): Likewise.
2972 * mach-o.c (bfd_mach_o_write_contents): Likewise.
2973 (bfd_mach_o_layout_commands, bfd_mach_o_read_section_32): Likewise.
2974 (bfd_mach_o_read_section_64, bfd_mach_o_read_symtab_symbol): Likewise.
2975 (bfd_mach_o_read_command, bfd_mach_o_header_p): Likewise.
2976 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Likewise.
2977 * stabs.c (_bfd_link_section_stabs): Likewise.
2979 * coff-arm.c (coff_arm_relocate_section): Use L modifier in error
2981 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
2982 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
2983 * coff-rs6000.c (xcoff_reloc_type_toc): Likewise.
2984 * coff-sh.c (sh_relax_section): Likewise.
2985 (sh_relax_delete_bytes, sh_swap_insns): Likewise.
2986 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
2987 * coffcode.h (coff_slurp_reloc_table): Likewise.
2988 * coffgen.c (_bfd_coff_get_external_symbols): Likewise.
2989 (_bfd_coff_read_string_table): Likewise.
2990 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
2991 * compress.c (bfd_get_full_section_contents): Likewise.
2992 * dwarf2.c (read_formatted_entries, decode_line_info): Likewise.
2993 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
2994 * elf.c (bfd_elf_string_from_elf_section): Likewise.
2995 * elf32-arc.c (arc_special_overflow_checks): Likewise.
2996 * elf32-arm.c (elf32_arm_tls_relax): Likewise.
2997 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Likewise.
2998 (elf32_arm_write_section): Likewise.
2999 * elf32-bfin.c (bfin_relocate_section): Likewise.
3000 (bfinfdpic_relocate_section): Likewise.
3001 * elf32-hppa.c (hppa_build_one_stub): Likewise.
3002 (final_link_relocate, elf32_hppa_relocate_section): Likewise.
3003 * elf32-i386.c (elf_i386_tls_transition): Likewise.
3004 (elf_i386_relocate_section): Likewise.
3005 * elf32-ip2k.c (ip2k_final_link_relocate): Likewise.
3006 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise.
3007 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
3008 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
3009 * elf32-metag.c (elf_metag_relocate_section): Likewise.
3010 * elf32-nds32.c (unrecognized_reloc_msg): Likewise.
3011 (nds32_elf_relax_longcall1, nds32_elf_relax_longcall2): Likewise.
3012 (nds32_elf_relax_longcall3, nds32_elf_relax_longjump1): Likewise.
3013 (nds32_elf_relax_longjump2, nds32_elf_relax_longjump3): Likewise.
3014 (nds32_elf_relax_longcall4, nds32_elf_relax_longcall5): Likewise.
3015 (nds32_elf_relax_longcall6, nds32_elf_relax_longjump4): Likewise.
3016 (nds32_elf_relax_longjump5, nds32_elf_relax_longjump6): Likewise.
3017 (nds32_elf_relax_longjump7, nds32_elf_relax_loadstore): Likewise.
3018 (nds32_elf_relax_ptr, nds32_elf_ex9_build_hash_table): Likewise.
3019 * elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
3020 * elf32-rx.c (UNSAFE_FOR_PID): Likewise.
3021 * elf32-s390.c (invalid_tls_insn, elf_s390_relocate_section): Likewise.
3022 * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
3023 * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
3024 * elf32-sh.c (sh_elf_relax_section): Likewise.
3025 (sh_elf_relax_delete_bytes, sh_elf_swap_insns): Likewise.
3026 (sh_elf_relocate_section): Likewise.
3027 * elf32-sh64.c (shmedia_prepare_reloc): Likewise.
3028 * elf32-spu.c (spu_elf_relocate_section): Likewise.
3029 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
3030 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
3031 * elf32-v850.c (v850_elf_relax_section): Likewise.
3032 * elf32-vax.c (elf_vax_check_relocs): Likewise.
3033 (elf_vax_relocate_section): Likewise.
3034 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
3035 (extend_ebb_bounds_forward, extend_ebb_bounds_backward): Likewise.
3036 (compute_text_actions, compute_ebb_proposed_actions): Likewise.
3037 (do_fix_for_relocatable_link): Likewise.
3038 * elf64-alpha.c (elf64_alpha_relax_got_load): Likewise.
3039 (elf64_alpha_relax_with_lituse): Likewise.
3040 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Likewise.
3041 (elf_hppa_final_link_relocate): Likewise.
3042 * elf64-ia64-vms.c (elf64_ia64_relax_section): Likewise.
3043 (elf64_ia64_choose_gp, elf64_ia64_relocate_section): Likewise.
3044 (elf64_vms_link_add_object_symbols): Likewise.
3045 * elf64-mmix.c (mmix_elf_perform_relocation): Likewise.
3046 (mmix_final_link_relocate): Likewise.
3047 * elf64-s390.c (invalid_tls_insn): Likewise.
3048 (elf_s390_relocate_section): Likewise.
3049 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
3050 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
3051 (elf_x86_64_relocate_section): Likewise.
3052 * elfcode.h (elf_slurp_symbol_table): Likewise.
3053 * elfcore.h (elf_core_file_p): Likewise.
3054 * elflink.c (elf_link_read_relocs_from_section): Likewise.
3055 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
3056 (elfNN_aarch64_relocate_section): Likewise.
3057 * elfnn-ia64.c (elfNN_ia64_relax_section): Likewise.
3058 (elfNN_ia64_choose_gp, elfNN_ia64_relocate_section): Likewise.
3059 * elfnn-riscv.c (riscv_elf_relocate_section): Likewise.
3060 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
3061 (_bfd_mips_elf_relocate_section): Likewise.
3062 (_bfd_mips_elf_finish_dynamic_symbol, mips_finish_exec_plt): Likewise.
3063 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
3064 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
3065 * ieee.c (ieee_slurp_external_symbols): Likewise.
3066 * ihex.c (ihex_write_object_content): Likewise.
3067 * mach-o.c (bfd_mach_o_build_exec_seg_command): Likewise.
3068 * merge.c (_bfd_merged_section_offset): Likewise.
3069 * mmo.c (mmo_write_loc_chunk): Likewise.
3070 (mmo_write_object_contents): Likewise.
3071 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Likewise.
3072 * stabs.c (_bfd_link_section_stabs): Likewise.
3073 * xcofflink.c (xcoff_link_add_symbols, xcoff_find_tc0): Likewise.
3075 2017-07-11 Alan Modra <amodra@gmail.com>
3077 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo.
3079 2017-07-11 Alan Modra <amodra@gmail.com>
3081 * elf32-ppc.c (ppc_elf_relocate_section): Emit "unexpected
3082 instruction" error using _bfd_error_handler, not einfo.
3084 2017-07-10 Nick Clifton <nickc@redhat.com>
3086 * coffcode.h (coff_slurp_symbol_table): Do not include an entry
3087 for C_AIX_WEAKEXT if it has the same value as C_WEAKEXT.
3089 2017-07-07 John Baldwin <jhb@FreeBSD.org>
3091 * elf.c (elfcore_grok_freebsd_note): Handle NT_FREEBSD_PTLWPINFO.
3093 2017-07-07 Alan Modra <amodra@gmail.com>
3095 * coffcode.h (coff_slurp_symbol_table): Handle C_AIX_WEAKEXT.
3097 2017-07-07 Alan Modra <amodra@gmail.com>
3099 * bfd.c (_doprnt): Replace "L" with "ll" when printing bfd_vma
3100 as long long. Move code replacing "ll" with "I64", and simplify.
3102 2017-07-06 H.J. Lu <hongjiu.lu@intel.com>
3104 * bfd.c (_doprnt): Convert 'L' to 'l' when setting wide_width
3107 2017-07-05 H.J. Lu <hongjiu.lu@intel.com>
3109 * dwarf2.c (line_info_add_include_dir_stub): Replace time with
3111 (line_info_add_file_name): Likewise.
3112 (decode_line_info): Likewise.
3114 2017-07-04 Tristan Gingold <gingold@adacore.com>
3116 * version.m4: Bump version to 2.29.51
3117 * configure: Regenerate.
3119 2017-07-04 Jiong Wang <jiong.wang@arm.com>
3121 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Remove the
3122 sanity check at the head of this function.
3124 2017-07-04 Jan Kratochvil <jan.kratochvil@redhat.com>
3126 * dwarf2.c (struct dwarf2_debug): Add fields dwarf_line_str_buffer and
3127 dwarf_line_str_size.
3128 (struct attr_abbrev): Add field implicit_const.
3129 (dwarf_debug_sections): Add .debug_line_str.
3130 (enum dwarf_debug_section_enum): Add debug_line_str and debug_max.
3131 (dwarf_debug_section_assert): Add static assertion.
3132 (read_indirect_line_string): New.
3133 (read_abbrevs): Support DW_FORM_implicit_const.
3134 (is_str_attr): Support DW_FORM_line_strp.
3135 (read_attribute_value): Support DW_FORM_line_strp and
3136 DW_FORM_implicit_const.
3137 (read_attribute): Support DW_FORM_implicit_const.
3138 (line_info_add_include_dir, line_info_add_include_dir_stub):
3139 (line_info_add_file_name, read_formatted_entries): New.
3140 (decode_line_info, parse_comp_unit): Support DWARF 5.
3141 (_bfd_dwarf2_cleanup_debug_info): Free dwarf_line_str_buffer.
3143 2017-07-03 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
3145 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove the
3146 abort statement that was put for symbols that are not dynamic.
3148 2017-07-03 Tristan Gingold <gingold@adacore.com>
3150 * po/bfd.pot: Regenerate
3152 2017-07-03 Alan Modra <amodra@gmail.com>
3154 * bfd.c (_doprnt): Rewrite "ll" and "L" modifiers to "I64" for
3155 __MSVCRT__. Support "L" modifier for bfd_vma. Formatting.
3156 * elf.c (setup_group): Use "Lx" to print sh_size.
3157 (_bfd_elf_setup_sections): Remove unnecessary cast and print
3158 unknown section type in hex.
3159 (copy_special_section_fields): Style fix.
3160 (bfd_section_from_shdr): Correct format for sh_link. Use a
3161 common error message for all the variants of unrecognized
3163 (assign_file_positions_for_load_sections): Use "Lx" for lma
3164 adjust error message.
3165 (assign_file_positions_for_non_load_sections): Formatting.
3166 (rewrite_elf_program_header): Formatting. Use "Lx" for
3167 bfd_vma values in error messages.
3168 * elfcode.h (elf_slurp_reloc_table_from_section): Cast
3169 ELF_R_SYM value to type expected by format.
3170 * elflink.c (elf_link_read_relocs_from_section): Use "Lx"
3172 (elf_link_add_object_symbols): Use "Lu" for symbol sizes.
3173 (elf_link_input_bfd): Use "Lx" for r_info.
3174 (bfd_elf_gc_record_vtinherit): Use "Lx" for offset.
3176 2017-07-03 Alan Modra <amodra@gmail.com>
3178 * bfd.c (bfd_scan_vma): Don't use long long unless HAVE_LONG_LONG.
3179 * coff-rs6000.c (FMT20): Handle hosts with 64-bit long and
3180 Microsoft C library variant of long long format specifier.
3181 (PRINT20): Cast value to bfd_uint64_t not long long.
3182 * coffcode.h (coff_print_aux): Use BFD_VMA_FMT.
3183 * coff-x86_64.c (coff_amd64_reloc): Use bfd_uint64_t rather than
3184 long long. Don't cast to bfd_vma.
3185 * elf32-score.c (score3_bfd_getl48): Likewise.
3186 * vms-alpha.c (_bfd_vms_slurp_eisd): Likewise.
3188 2017-07-03 Alan Modra <amodra@gmail.com>
3190 * elf.c (_bfd_elf_print_private_bfd_data): Use BFD_VMA_FMT to
3192 (bfd_elf_print_symbol): Don't cast symbol->flags.
3193 (_bfd_elf_symbol_from_bfd_symbol): Likewise.
3194 * elf32-ppc.c (ppc_elf_begin_write_processing): Correct
3195 _bfd_error_handler argument order.
3196 (ppc_elf_merge_private_bfd_data): Don't cast flags.
3198 2017-07-03 Alan Modra <amodra@gmail.com>
3200 * configure.ac: Invoke AC_CHECK_TYPES for long long. Invoke
3201 AC_TYPE_LONG_DOUBLE.
3202 * configure: Regenerate.
3203 * config.in: Regenerate.
3205 2017-06-29 Andrew Waterman <andrew@sifive.com>
3207 * elfnn-riscv.c (riscv_elf_adjust_dynamic_symbol): Fix TLS copy
3210 2017-06-29 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
3212 * elfxx-sparc.c (allocate_dynrelocs): Don't make a symbol dynamic
3213 unless it is undefined weak.
3214 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Set the flag
3215 relative_reloc to direct non-dynamic symbols to R_SPARC_RELATIVE
3217 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): If symbol
3218 is not dynamic in PIC, abort.
3220 2017-06-29 Jiong Wang <jiong.wang@arm.com>
3223 * elfnn-aarch64.c (elfNN_aarch64_allocate_dynrelocs): Only make
3224 undefined weak symbols into dynamic.
3225 (elfNN_aarch64_final_link_relocate): Generate runtime RELATIVE
3226 relocation for non-dynamic symbols.
3227 (elfNN_aarch64_finish_dynamic_symbol): Add sanity check.
3229 2017-06-29 Jiong Wang <jiong.wang@arm.com>
3231 * elfnn-aarch64.c (aarch64_relocation_aginst_gp_p): New function.
3232 (elfNN_aarch64_final_link_relocate): Delete duplicated code for
3233 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15, BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC,
3234 BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
3235 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Optimize the
3238 2017-06-29 Andreas Arnez <arnez@linux.vnet.ibm.com>
3240 * elf-bfd.h (elfcore_write_s390_gs_cb): Add prototype.
3241 (elfcore_write_s390_gs_bc): Likewise.
3242 * elf.c (elfcore_grok_s390_gs_cb): New function.
3243 (elfcore_grok_s390_gs_bc): New function.
3244 (elfcore_grok_note): Call them.
3245 (elfcore_write_s390_gs_cb): New function.
3246 (elfcore_write_s390_gs_bc): New function.
3247 (elfcore_write_register_note): Call them.
3249 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
3251 * libbfd.c (_bfd_generic_get_section_contents): Don't call
3252 bfd_get_file_size. Check archive element size.
3253 (_bfd_generic_get_section_contents_in_window): Likewise.
3255 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
3257 * bfd-in2.h: Regenerated.
3258 * bfdio.c (bfd_get_size): Change return type to ufile_ptr.
3259 (bfd_get_file_size): Likewise.
3261 2017-06-28 Maciej W. Rozycki <macro@imgtec.com>
3262 Matthew Fortune <matthew.fortune@imgtec.com>
3264 * archures.c (bfd_mach_mips_interaptiv_mr2): New macro.
3265 * cpu-mips.c (I_interaptiv_mr2): New enum value.
3266 (arch_info_struct): Add "mips:interaptiv-mr2" entry.
3267 * elfxx-mips.c (_bfd_elf_mips_mach) <E_MIPS_MACH_IAMR2>: New
3269 (mips_set_isa_flags) <bfd_mach_mips_interaptiv_mr2>: Likewise.
3270 (bfd_mips_isa_ext) <bfd_mach_mips_interaptiv_mr2>: Likewise.
3271 (print_mips_isa_ext) <AFL_EXT_INTERAPTIV_MR2>: Likewise.
3272 (mips_mach_extensions): Add `bfd_mach_mipsisa32r3' and
3273 `bfd_mach_mips_interaptiv_mr2' entries.
3274 * bfd-in2.h: Regenerate.
3276 2017-06-27 Nick Clifton <nickc@redhat.com>
3278 * tekhex.c (pass_over): Revert accidental conversion of a local
3279 array to a static array.
3281 2017-06-27 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
3284 * elf32-avr.c (elf32_avr_adjust_diff_reloc_value): Adjust
3285 reloc addend if necessary. Adjust diff only if
3286 shrinked_insn_address < end_address.
3288 2017-06-27 Alan Modra <amodra@gmail.com>
3291 * libbfd.c (_bfd_generic_get_section_contents): Warning fix.
3292 (_bfd_generic_get_section_contents_in_window): Likewise.
3294 2017-06-26 Kuan-Lin Chen <rufus@andestech.com>
3296 * elfnn-riscv.c (perform_relocation): Support the new
3297 R_RISCV_32_PCREL relocation.
3298 (riscv_elf_relocate_section): Likewise.
3299 * elfxx-riscv.c (howto_table): Likewise.
3300 (riscv_reloc_map): Likewise.
3301 * bfd-in2.h (BFD_RELOC_RISCV_32_PCREL): New relocation.
3302 * libbfd.h: Regenerate.
3304 2017-06-27 Alan Modra <amodra@gmail.com>
3307 * libbfd.c (_bfd_generic_get_section_contents): Delete abort.
3308 Use unsigned file pointer type, and remove cast.
3309 * libbfd.c (_bfd_generic_get_section_contents_in_window): Likewise.
3310 Add "count", not "sz".
3312 2017-06-26 Pedro Alves <palves@redhat.com>
3315 * libbfd.c (_bfd_generic_get_section_contents): Add "count", not
3318 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
3321 * libbfd.c (_bfd_generic_get_section_contents_in_window): Add
3324 2017-06-26 Maciej W. Rozycki <macro@imgtec.com>
3326 * cpu-mips.c (arch_info_struct): Mark the 4010 32-bit.
3327 * elfxx-mips.c (mips_set_isa_flags) <bfd_mach_mips4010>: Set
3328 E_MIPS_ARCH_2 rather than E_MIPS_ARCH_3 in `e_flags'.
3329 (mips_mach_extensions): Mark `bfd_mach_mips4010' as extending
3330 `bfd_mach_mips6000' rather than `bfd_mach_mips4000'.
3332 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
3335 * compress.c (bfd_get_full_section_contents): Don't check the
3337 * libbfd.c (_bfd_generic_get_section_contents): Check for and
3338 reject a section whose size + offset is greater than the size
3340 (_bfd_generic_get_section_contents_in_window): Likewise.
3342 2017-06-26 Nick Clifton <nickc@redhat.com>
3345 * tekhex.c (getvalue): Check for the source pointer exceeding the
3346 end pointer before the first byte is read.
3348 2017-06-26 Nick Clifton <nickc@redhat.com>
3351 * opncls.c (get_build_id): Check that the section is big enough
3352 to contain the whole note.
3353 * compress.c (bfd_get_full_section_contents): Check for and reject
3354 a section whose size is greater than the size of the entire file.
3355 * elf32-v850.c (v850_elf_copy_notes): Allow for the ouput to not
3356 contain a notes section.
3358 2017-06-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
3360 * elf64-s390.c (elf_s390_additional_program_headers): Add NULL
3362 (elf_s390_modify_segment_map): Likewise.
3363 (bfd_elf_s390_set_options): Lisewise.
3365 2017-06-26 Alan Modra <amodra@gmail.com>
3367 * elflink.c (_bfd_elf_link_create_dynstrtab): Don't make dynobj
3369 (_bfd_elf_size_group_sections): Skip --just-syms bfds.
3370 (bfd_elf_size_dynamic_sections): Ignore .note.GNU-stack and
3371 .preinit_array on --just-syms bfds.
3372 (_bfd_elf_gc_mark_extra_sections): Skip --just-syms bfds.
3373 (elf_gc_sweep, bfd_elf_parse_eh_frame_entries): Likewise.
3374 (bfd_elf_gc_sections, bfd_elf_discard_info): Likewise.
3376 2017-06-25 Sergei Trofimovich <slyfox@gentoo.org>
3378 * elf.c (find_link): Bounds check "hint".
3380 2017-06-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
3382 * elf32-arm.c (using_thumb_only): Update list of architectures in
3383 BFD_ASSERT for which the logic is valid.
3384 (using_thumb2_bl): Likewise.
3385 (using_thumb2): Likewise and return true for ARMv8-R.
3386 (arch_has_arm_nop): Likewise.
3387 (tag_cpu_arch_combine): New v8r table for ARMv8-R Tag_CPU_arch
3388 merging logic. Update commentis for value 15 of v8m_baseline,
3389 v8m_mainline and v4t_plus_v6_m arrays. Use v8r array to decide
3390 merging of value 15 of Tag_CPU_arch.
3392 2017-06-23 Jiong Wang <jiong.wang@arm.com>
3394 * reloc.c (BFD_RELOC_AARCH64_ADR_GOTPAGE): Rename to
3395 BFD_RELOC_AARCH64_ADR_GOT_PAGE
3396 * bfd-in2.h: Regenerate.
3398 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
3400 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Move
3401 the error_alignment label forward. Properly align program
3402 property note section.
3404 2017-06-22 Eric Christopher <echristo@gmail.com>
3406 * elf32-arm.c (elf32_arm_final_link_relocate): Use labs rather than
3407 abs to fix a truncation warning.
3409 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
3411 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Resolve
3412 local undefined weak symbol to 0.
3413 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Likewise.
3415 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
3417 * elf32-i386.c (elf_i386_merge_gnu_properties): If info->shstk
3418 is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
3419 (elf_i386_link_setup_gnu_properties): If info->shstk is set,
3420 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
3421 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): If
3422 info->shstk is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
3423 (elf_x86_64_link_setup_gnu_properties): If info->shstk is set,
3424 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
3426 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
3428 * elf32-i386.c (elf_i386_lazy_ibt_plt0_entry): New.
3429 (elf_i386_lazy_ibt_plt_entry): Likewise.
3430 (elf_i386_pic_lazy_ibt_plt0_entry): Likewise.
3431 (elf_i386_non_lazy_ibt_plt_entry): Likewise.
3432 (elf_i386_pic_non_lazy_ibt_plt_entry): Likewise.
3433 (elf_i386_eh_frame_lazy_ibt_plt): Likewise.
3434 (elf_i386_lazy_plt_layout): Likewise.
3435 (elf_i386_non_lazy_plt_layout): Likewise.
3436 (elf_i386_link_hash_entry): Add plt_second.
3437 (elf_i386_link_hash_table): Add plt_second and
3438 plt_second_eh_frame.
3439 (elf_i386_allocate_dynrelocs): Use the second PLT if needed.
3440 (elf_i386_size_dynamic_sections): Use .plt.got unwind info for
3441 the second PLT. Check the second PLT.
3442 (elf_i386_relocate_section): Use the second PLT to resolve
3443 PLT reference if needed.
3444 (elf_i386_finish_dynamic_symbol): Fill and use the second PLT if
3446 (elf_i386_finish_dynamic_sections): Set sh_entsize on the
3447 second PLT. Generate unwind info for the second PLT.
3448 (elf_i386_plt_type): Add plt_second.
3449 (elf_i386_get_synthetic_symtab): Support the second PLT.
3450 (elf_i386_parse_gnu_properties): Support
3451 GNU_PROPERTY_X86_FEATURE_1_AND.
3452 (elf_i386_merge_gnu_properties): Support
3453 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
3454 on GNU_PROPERTY_X86_FEATURE_1_IBT
3455 (elf_i386_link_setup_gnu_properties): If info->ibt is set,
3456 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
3457 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
3458 is set on all relocatable inputs.
3459 * elf64-x86-64.c (elf_x86_64_lazy_ibt_plt_entry): New.
3460 (elf_x32_lazy_ibt_plt_entry): Likewise.
3461 (elf_x86_64_non_lazy_ibt_plt_entry): Likewise.
3462 (elf_x32_non_lazy_ibt_plt_entry): Likewise.
3463 (elf_x86_64_eh_frame_lazy_ibt_plt): Likewise.
3464 (elf_x32_eh_frame_lazy_ibt_plt): Likewise.
3465 (elf_x86_64_lazy_ibt_plt): Likewise.
3466 (elf_x32_lazy_ibt_plt): Likewise.
3467 (elf_x86_64_non_lazy_ibt_plt): Likewise.
3468 (elf_x32_non_lazy_ibt_plt): Likewise.
3469 (elf_x86_64_get_synthetic_symtab): Support the second PLT.
3470 (elf_x86_64_parse_gnu_properties): Support
3471 GNU_PROPERTY_X86_FEATURE_1_AND.
3472 (elf_x86_64_merge_gnu_properties): Support
3473 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
3474 on GNU_PROPERTY_X86_FEATURE_1_IBT
3475 (elf_x86_64_link_setup_gnu_properties): If info->ibt is set,
3476 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
3477 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
3478 is set on all relocatable inputs.
3480 2017-06-22 Nick Clifton <nickc@redhat.com>
3483 * som.c (setup_sections): NUL terminate the space_strings buffer.
3484 Check that the space.name field does not index beyond the end of
3485 the space_strings buffer.
3487 2017-06-21 Nick Clifton <nickc@redhat.com>
3490 * coff-sh.c (sh_reloc): Check for an out of range reloc.
3492 2017-06-21 Nick Clifton <nickc@redhat.com>
3495 * vms-misc.c (_bfd_vms_save_sized_string): Use unsigned int as
3496 type of the size parameter.
3497 (_bfd_vms_save_counted_string): Add second parameter - the maximum
3498 length of the counted string.
3499 * vms.h (_bfd_vms_save_sized_string): Update prototype.
3500 (_bfd_vms_save_counted_string): Likewise.
3501 * vms-alpha.c (_bfd_vms_slurp_eisd): Update calls to
3502 _bfd_vms_save_counted_string.
3503 (_bfd_vms_slurp_ehdr): Likewise.
3504 (_bfd_vms_slurp_egsd): Likewise.
3505 (Parse_module): Likewise.
3507 2017-06-21 Alan Modra <amodra@gmail.com>
3509 * elf64-ppc.c (ppc64_elf_size_stubs): Test for localentry:0 plt
3510 calls before tocsave calls.
3511 (ppc64_elf_relocate_section): Allow localentry:0 plt calls without
3514 2017-06-21 Nick Clifton <nickc@redhat.com>
3517 * reloc.c (bfd_generic_get_relocated_section_contents): Fail if
3518 bfd_get_full_section_contents returns no contents.
3520 2017-06-21 Nick Clifton <nickc@redhat.com>
3523 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an undersized
3526 2017-06-21 Nick Clifton <nickc@redhat.com>
3529 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an empty section
3531 (image_set_ptr): Likewise.
3532 (alpha_vms_fix_sec_rel): Likewise.
3533 (alpha_vms_slurp_relocs): Likewise.
3535 2017-06-21 Nick Clifton <nickc@redhat.com>
3538 * ieee.c (ieee_slurp_sections): Check for a NULL return from
3540 (ieee_archive_p): Likewise.
3541 (ieee_object_p): Likewise.
3543 2017-06-21 Nick Clifton <nickc@redhat.com>
3546 * elf.c (setup_group): Zero the group section pointer list after
3547 allocation so that loops can be caught. Check for NULL pointers
3548 when processing a group list.
3550 2017-06-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
3552 * elf-s390.h: New file.
3553 * elf64-s390.c (struct elf_s390_link_hash_table): Add params
3555 (elf_s390_additional_program_headers): New function.
3556 (elf_s390_modify_segment_map): New function.
3557 (bfd_elf_s390_set_options): New function.
3558 (elf_backend_additional_program_headers)
3559 (elf_backend_modify_segment_map): Add macro definitions.
3561 2017-06-19 H.J. Lu <hongjiu.lu@intel.com>
3564 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Check
3565 the DYNAMIC bit instead of bfd_count_sections.
3567 2017-06-19 Nick Clifton <nickc@redhat.com>
3570 * vms-alpha.c (evax_bfd_print_emh): Check for insufficient record
3572 (evax_bfd_print_eeom): Likewise.
3573 (evax_bfd_print_egsd): Check for an overlarge record length.
3574 (evax_bfd_print_etir): Likewise.
3576 2017-06-19 Nick Clifton <nickc@redhat.com>
3579 * libieee.h (struct common_header_type): Add end_p field.
3580 * ieee.c (this_byte_and_next): Do not advance input_p beyond
3582 (read_id): Check for a length that exceeds the remaining bytes in
3584 (ieee_seek): Initialise end_p.
3585 (ieee_archive_p): Likewise.
3586 (ieee_object_p): Likewise.
3588 2017-06-19 Nick Clifton <nickc@redhat.com>
3591 * vms-alpha.c (_bfd_vms_slurp_eihs): Check for invalid offset
3592 before reading the EIHS structure entries.
3594 2017-06-19 Nick Clifton <nickc@redhat.com>
3597 * vms-alpha.c (_bfd_vms_slurp_egsd): Use unsigned int for
3598 gsd_size. Check that there are enough bytes remaining to read the
3599 type and size of the next egsd. Check that the size of the egsd
3600 does not exceed the size of the record.
3602 2017-06-19 Alan Modra <amodra@gmail.com>
3604 * config.bfd: Correct targ_underscore for cris.
3606 2017-06-18 Alan Modra <amodra@gmail.com>
3608 * config.bfd: Correct targ_underscore for epiphany, ip2k,
3609 m32c, mn10200, pru, rl78, rx, crisv32 and v850.
3611 2017-06-16 Nick Clifton <nickc@redhat.com>
3613 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Do not fail if the
3614 bucketlist is empty because there are no symbols to add to the
3617 2017-06-16 Alan Modra <amodra@gmail.com>
3623 * targets.c (struct bfd_target): Add _bfd_define_start_stop.
3624 (BFD_JUMP_TABLE_LINK): Likewise.
3625 * elf-bfd.h (bfd_elf_define_start_stop): Declare.
3626 * elflink.c (_bfd_elf_gc_mark_rsec): Update comment.
3627 (bfd_elf_define_start_stop): New function.
3628 * linker.c (bfd_generic_define_start_stop): New function.
3629 * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Init
3631 * aout-adobe.c (aout_32_bfd_define_start_stop): Define.
3632 * aout-target.h (MY_bfd_define_start_stop): Define.
3633 * aout-tic30.c (MY_bfd_define_start_stop): Define.
3634 * binary.c (binary_bfd_define_start_stop): Define.
3635 * bout.c (b_out_bfd_define_start_stop): Define.
3636 * coff-alpha.c (_bfd_ecoff_bfd_define_start_stop): Define.
3637 * coff-mips.c (_bfd_ecoff_bfd_define_start_stop): Define.
3638 * coff-rs6000.c (_bfd_xcoff_bfd_define_start_stop): Define.
3639 * coffcode.h (coff_bfd_define_start_stop): Define.
3640 * elfxx-target.h (bfd_elfNN_bfd_define_start_stop): Define.
3641 * i386msdos.c (msdos_bfd_define_start_stop): Define.
3642 * i386os9k.c (os9k_bfd_define_start_stop): Define.
3643 * ieee.c (ieee_bfd_define_start_stop): Define.
3644 * ihex.c (ihex_bfd_define_start_stop): Define.
3645 * libbfd-in.h (_bfd_nolink_bfd_define_start_stop): Define.
3646 * mach-o-target.c (bfd_mach_o_bfd_define_start_stop): Define.
3647 * mmo.c (mmo_bfd_define_start_stop): Define.
3648 * nlm-target.h (nlm_bfd_define_start_stop): Define.
3649 * oasys.c (oasys_bfd_define_start_stop): Define.
3650 * pef.c (bfd_pef_bfd_define_start_stop): Define.
3651 * plugin.c (bfd_plugin_bfd_define_start_stop): Define.
3652 * ppcboot.c (ppcboot_bfd_define_start_stop): Define.
3653 * som.c (som_bfd_define_start_stop): Define.
3654 * srec.c (srec_bfd_define_start_stop): Define.
3655 * tekhex.c (tekhex_bfd_define_start_stop): Define.
3656 * versados.c (versados_bfd_define_start_stop): Define.
3657 * vms-alpha.c (vms_bfd_define_start_stop): Define.
3658 (alpha_vms_bfd_define_start_stop): Define.
3659 * xsym.c (bfd_sym_bfd_define_start_stop): Define.
3660 * bfd-in2.h: Regenerate.
3661 * libbfd.h: Regenerate.
3663 2017-06-16 Jiong Wang <jiong.wang@arm.com>
3665 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use
3666 SYMBOL_REFERENCES_LOCAL.
3668 2017-06-15 Jiong Wang <jiong.wang@arm.com>
3671 * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
3672 (elfNN_aarch64_final_link_relocate): Also propagate relocations to
3673 runtime for if there needs copy relocation elimination.
3674 (need_copy_relocation_p): New function. Return true for symbol with
3675 pc-relative references and if it's against read-only sections.
3676 (elfNN_aarch64_adjust_dynamic_symbol): Use need_copy_relocation_p.
3677 (elfNN_aarch64_check_relocs): Allocate dynrelocs for relocation types
3678 that are related with accessing external objects.
3679 (elfNN_aarch64_gc_sweep_hook): Sync the relocation types with the change
3680 in elfNN_aarch64_check_relocs.
3682 2017-06-15 Nick Clifton <nickc@redhat.com>
3685 * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
3688 (ieee_archive_p): Likewise.
3690 2017-06-15 Nick Clifton <nickc@redhat.com>
3693 * vms-alpha.c (_bfd_vms_slurp_etir): Extend check of cmd_length.
3695 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
3697 * elf32-xtensa.c (elf_xtensa_be_plt_entry,
3698 elf_xtensa_le_plt_entry): Add dimension for the ABI to arrays,
3699 keep both windowed and call0 ABI PLT definitions.
3700 (elf_xtensa_create_plt_entry): Use selected ABI to choose upper
3701 elf_xtensa_*_plt_entry endex.
3702 (ELF_MAXPAGESIZE): Fix at minimal supported MMU page size.
3704 2017-06-14 Nick Clifton <nickc@redhat.com>
3707 * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid
3710 2017-06-14 Nick Clifton <nickc@redhat.com>
3713 * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the
3714 maximum value for the ascic pointer. Check that name processing
3715 does not read beyond this value.
3716 (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the
3719 2017-06-14 Nick Clifton <nickc@redhat.com>
3722 * versados.c (versados_mkobject): Zero the allocated tdata structure.
3723 (process_otr): Check for an invalid offset in the otr structure.
3725 2017-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
3727 * config.bfd (epiphany-*-elf): Accept epiphany-*-*.
3729 2017-06-13 H.J. Lu <hongjiu.lu@intel.com>
3735 * elf-bfd.h (elf_link_hash_entry): Add start_stop. Change the
3736 vtable field to a union.
3737 (_bfd_elf_is_start_stop): Removed.
3738 * elf32-i386.c (elf_i386_convert_load_reloc): Also check for
3739 __start_SECNAME and __stop_SECNAME symbols.
3740 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
3741 * elflink.c (_bfd_elf_is_start_stop): Removed.
3742 (_bfd_elf_gc_mark_rsec): Check start_stop instead of calling
3743 _bfd_elf_is_start_stop.
3744 (elf_gc_propagate_vtable_entries_used): Skip __start_SECNAME and
3745 __stop_SECNAME symbols. Updated.
3746 (elf_gc_smash_unused_vtentry_relocs): Likewise.
3747 (bfd_elf_gc_record_vtinherit): Likewise.
3748 (bfd_elf_gc_record_vtentry): Likewise.
3750 2017-06-13 Nick Clifton <nickc@redhat.com>
3753 * elflink.c (elf_link_adjust_relocs): Generate an error when
3754 encountering a reloc against a symbol removed by garbage
3757 2017-06-12 H.J. Lu <hongjiu.lu@intel.com>
3759 * elf-bfd.h (elf_backend_data): Add struct bfd_link_info *
3760 to merge_gnu_properties.
3761 * elf-properties.c (elf_merge_gnu_properties): Add struct
3762 bfd_link_info * and pass it to merge_gnu_properties.
3763 (elf_merge_gnu_property_list): Add struct bfd_link_info *
3764 and pass it to elf_merge_gnu_properties.
3765 (_bfd_elf_link_setup_gnu_properties): Pass info to
3766 elf_merge_gnu_property_list.
3767 * elf32-i386.c (elf_i386_merge_gnu_properties): Add struct
3769 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): Likewise.
3771 2017-06-11 Joe Zbiciak <joe.zbiciak@leftturnonly.info>
3774 * binary.c (binary_set_section_contents): Scale lma by octets
3775 per byte to set filepos.
3777 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3779 * elf32-arc.c (elf_arc_check_relocs): Fixed conditions to generate
3782 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3784 * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to
3787 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3789 * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to
3790 patched section contents for TLS IE reloc.
3791 * elf32-arc.c: Remove TCB_SIZE preprocessor macro.
3793 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3795 * elf32-arc.c (elf_arc_relocate_section): Added "call" to
3796 RELOC_FOR_GLOBAL_SYMBOL macro.
3798 2018-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3800 * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
3803 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3805 * config/tc-arc.c (md_undefined_symbol): Changed.
3806 * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed.
3808 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3810 * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
3813 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3815 * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
3816 warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
3818 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3820 * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
3823 2017-06-08 Richard Earnshaw <rearnsha@arm.com>
3825 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
3826 that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
3827 is non-zero. Add clarifying comments.
3829 2017-06-08 H.J. Lu <hongjiu.lu@intel.com>
3831 * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
3832 name. Use local IFUNC symbol name string to report unsupported
3833 non-PIC call to IFUNC function.
3834 (elf_i386_relocate_section): Dump local IFUNC name with minfo
3835 when generating R_386_IRELATIVE relocation.
3836 (elf_i386_finish_dynamic_symbol): Likewise.
3837 * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
3839 (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
3840 when generating R_X86_64_IRELATIVE relocation.
3841 (elf_x86_64_finish_dynamic_symbol): Likewise.
3843 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
3845 * elf.c (setup_group): Make sure BFD sections are created for all
3846 group sections in the input file when processing SHF_GROUP
3848 (bfd_section_from_shdr): Avoid duplicating logic already
3849 implemented in `setup_group'.
3851 2017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
3854 * peXXigen.c (pe_print_idata): Use the address of the first thunk
3855 if the hint address is zero.
3857 2017-06-06 James Clarke <jrtc27@jrtc27.com>
3860 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
3861 ELF_COMMON_DEF_P for common symbols.
3863 2017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
3865 * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
3866 SEC_GROUP sections as SEC_EXCLUDE.
3867 (bfd_elf_set_group_contents): Replace use of abort with an assert.
3868 (assign_section_numbers): Use resolve_section_groups flag instead
3869 of relocatable link type.
3870 (_bfd_elf_init_private_section_data): Use resolve_section_groups
3871 flag instead of checking the final_link flag for part of the
3872 checks in here. Fix white space as a result.
3873 * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
3874 instead of relocatable link type.
3875 (bfd_elf_final_link): Likewise.
3877 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
3879 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
3881 * elf32-score.c (score_elf_final_link_relocate): Likewise.
3882 (s3_bfd_score_elf_check_relocs): Likewise.
3883 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
3884 (score_elf_final_link_relocate): Likewise.
3885 (s7_bfd_score_elf_check_relocs): Likewise.
3887 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
3889 * elflink.c (init_reloc_cookie_rels): Remove unused variable
3892 2017-06-06 Maciej W. Rozycki <macro@imgtec.com>
3894 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
3895 from `reloc_count' rather than decrementing it.
3896 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
3897 `reloc_count' by `int_rels_per_ext_rel'.
3898 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
3899 `reloc_count' by `int_rels_per_ext_rel' for last relocation
3900 entry determination.
3901 (s3_bfd_score_elf_check_relocs): Likewise.
3902 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
3903 (s7_bfd_score_elf_relocate_section): Likewise.
3904 (s7_bfd_score_elf_check_relocs): Likewise.
3905 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
3906 prototype and function.
3907 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
3908 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
3909 triple rather than once the sum of REL and RELA relocation entry
3911 (bfd_elf64_get_reloc_upper_bound): Remove macro.
3912 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
3913 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
3914 storage allocation size determination.
3915 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
3916 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
3917 by `int_rels_per_ext_rel' for last relocation entry
3919 (bfd_elf_final_link): Do not multiply `reloc_count' by
3920 `int_rels_per_ext_rel' for internal relocation storage
3921 allocation size determination.
3922 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
3923 `int_rels_per_ext_rel' for last relocation entry determination.
3924 (elf_gc_smash_unused_vtentry_relocs): Likewise.
3925 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
3926 (_bfd_mips_elf_relocate_section): Likewise.
3928 2017-06-05 Alan Modra <amodra@gmail.com>
3931 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
3933 2017-06-01 John Baldwin <jhb@FreeBSD.org>
3935 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
3936 determine structure sizes.
3937 (elfcore_grok_freebsd_prstatus): Likewise.
3939 2017-06-01 Alan Modra <amodra@gmail.com>
3941 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
3942 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
3944 (is_elfv2_localentry0): New function.
3945 (ppc64_elf_tls_setup): Default params->plt_localentry0.
3946 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
3947 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
3948 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
3949 optimized localentry:0 stubs.
3950 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
3951 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
3953 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
3955 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
3957 2017-05-30 Casey Smith <clegg89@gmail.com>
3960 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
3961 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
3963 2017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
3965 * cpu-arc.c (arc_compatible): New function.
3967 2017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
3969 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
3971 2017-05-30 H.J. Lu <hongjiu.lu@intel.com>
3974 * bfdio.c (bfd_get_file_size): New function.
3975 * bfd-in2.h: Regenerated.
3977 2017-05-23 Dilian Palauzov <git-dpa@aegee.org>
3979 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
3982 2017-05-22 H.J. Lu <hongjiu.lu@intel.com>
3984 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
3985 dynobj instead of htab->elf.dynobj.
3987 2017-05-19 Maciej W. Rozycki <macro@imgtec.com>
3989 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
3991 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
3992 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
3993 actual number of internal relocations retrieved. Adjust
3994 function description.
3995 (bfd_elf64_canonicalize_reloc): Remove macro.
3996 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
3998 2017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
4000 * archures.c (bfd_mach_sparc_v9m8): Define.
4001 (bfd_mach_sparc_v8plusm8): Likewise.
4002 (bfd_mach_sparc_v9_p): Adjust to M8.
4003 (bfd_mach_sparc_64bit_p): Likewise.
4004 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
4005 bfd_mach_sparc_v8plusm8.
4006 * bfd-in2.h: Regenerated.
4007 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
4009 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
4010 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
4011 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
4013 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
4014 bfd_mach_sparc_v8plusm8.
4016 2017-05-19 Alan Modra <amodra@gmail.com>
4018 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
4019 debug and special sections when no non-note alloc sections in an
4022 2017-05-18 Alan Modra <amodra@gmail.com>
4024 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
4025 * elf-m10300.c: Likewise.
4027 * elf32-arc.c: Likewise.
4028 * elf32-bfin.c: Likewise.
4029 * elf32-m68k.c: Likewise.
4030 * elf32-nds32.c: Likewise.
4031 * elf32-tilepro.c: Likewise.
4032 * elflink.c: Likewise.
4033 * elfnn-aarch64.c: Likewise.
4034 * elfnn-riscv.c: Likewise.
4035 * elfxx-tilegx.c: Likewise.
4036 * mach-o.c: Likewise.
4037 * peXXigen.c: Likewise.
4038 * vms-alpha.c: Likewise.
4039 * vms-lib.c: Likewise.
4041 2017-05-17 H.J. Lu <hongjiu.lu@intel.com>
4044 * elflink.c (elf_gc_mark_debug_section): New function.
4045 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
4046 referenced by kept debug sections.
4048 2017-05-16 Alan Modra <amodra@gmail.com>
4050 * elf-m10300.c: Rename occurrences of non_ir_ref.
4051 * elf32-arm.c: Likewise.
4052 * elf32-bfin.c: Likewise.
4053 * elf32-cr16.c: Likewise.
4054 * elf32-cris.c: Likewise.
4055 * elf32-d10v.c: Likewise.
4056 * elf32-dlx.c: Likewise.
4057 * elf32-fr30.c: Likewise.
4058 * elf32-frv.c: Likewise.
4059 * elf32-hppa.c: Likewise.
4060 * elf32-i370.c: Likewise.
4061 * elf32-i386.c: Likewise.
4062 * elf32-iq2000.c: Likewise.
4063 * elf32-lm32.c: Likewise.
4064 * elf32-m32c.c: Likewise.
4065 * elf32-m32r.c: Likewise.
4066 * elf32-m68hc1x.c: Likewise.
4067 * elf32-m68k.c: Likewise.
4068 * elf32-mcore.c: Likewise.
4069 * elf32-metag.c: Likewise.
4070 * elf32-microblaze.c: Likewise.
4071 * elf32-moxie.c: Likewise.
4072 * elf32-msp430.c: Likewise.
4073 * elf32-mt.c: Likewise.
4074 * elf32-nios2.c: Likewise.
4075 * elf32-or1k.c: Likewise.
4076 * elf32-ppc.c: Likewise.
4077 * elf32-rl78.c: Likewise.
4078 * elf32-s390.c: Likewise.
4079 * elf32-score.c: Likewise.
4080 * elf32-score7.c: Likewise.
4081 * elf32-sh.c: Likewise.
4082 * elf32-tic6x.c: Likewise.
4083 * elf32-tilepro.c: Likewise.
4084 * elf32-v850.c: Likewise.
4085 * elf32-vax.c: Likewise.
4086 * elf32-xstormy16.c: Likewise.
4087 * elf32-xtensa.c: Likewise.
4088 * elf64-alpha.c: Likewise.
4089 * elf64-hppa.c: Likewise.
4090 * elf64-ia64-vms.c: Likewise.
4091 * elf64-mmix.c: Likewise.
4092 * elf64-ppc.c: Likewise.
4093 * elf64-s390.c: Likewise.
4094 * elf64-sh64.c: Likewise.
4095 * elf64-x86-64.c: Likewise.
4096 * elflink.c: Likewise.
4097 * elfnn-aarch64.c: Likewise.
4098 * elfnn-ia64.c: Likewise.
4099 * elfnn-riscv.c: Likewise.
4100 * elfxx-mips.c: Likewise.
4101 * elfxx-sparc.c: Likewise.
4102 * elfxx-tilegx.c: Likewise.
4103 * linker.c: Likewise.
4105 2017-05-16 Alan Modra <amodra@gmail.com>
4107 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
4108 * elflink.c (elf_link_add_object_symbols): Update to use
4110 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
4112 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
4114 2017-05-15 Maciej W. Rozycki <macro@imgtec.com>
4116 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
4118 2017-05-12 H.J. Lu <hongjiu.lu@intel.com>
4120 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
4121 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
4123 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
4125 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
4127 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
4129 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
4130 to plt_second/plt_second_eh_frame.
4131 (elf_x86_64_link_hash_newfunc): Updated.
4132 (elf_x86_64_allocate_dynrelocs): Likewise.
4133 (elf_x86_64_size_dynamic_sections): Likewise.
4134 (elf_x86_64_relocate_section): Likewise.
4135 (elf_x86_64_finish_dynamic_symbol): Likewise.
4136 (elf_x86_64_finish_dynamic_sections): Likewise.
4137 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
4138 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
4140 (elf_backend_setup_gnu_properties): Updated. Create the
4141 .plt.sec section instead of the .plt.sec section.
4143 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
4145 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
4146 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
4147 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
4149 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
4151 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
4152 (bfd_elf64_set_reloc): Define.
4153 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
4155 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
4157 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
4158 (struct bfd_target): New field _bfd_set_reloc.
4159 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
4160 * reloc.c (_bfd_generic_set_reloc): New function.
4161 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
4162 * nlm-target.h (nlm_set_reloc): Likewise.
4163 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
4164 * aout-tic30.c (MY_set_reloc): Likewise.
4165 * aout-target.h (MY_set_reloc): Likewise.
4166 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
4167 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
4168 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
4169 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
4170 * aout-adobe.c (aout_32_set_reloc): Likewise.
4171 * bout.c (b_out_set_reloc): Likewise.
4172 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
4173 * i386os9k.c (aout_32_set_reloc): Likewise.
4174 * ieee.c (ieee_set_reloc): Likewise.
4175 * oasys.c (oasys_set_reloc): Likewise.
4176 * som.c (som_set_reloc): Likewise.
4177 * versados.c (versados_set_reloc): Likewise.
4178 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
4179 _bfd_generic_set_reloc.
4180 (rs6000_xcoff64_aix_vec): LIkewise.
4181 * libbfd.c (_bfd_norelocs_set_reloc): New function.
4182 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
4183 * i386msdos.c (msdos_set_reloc): Define to
4184 _bfd_norelocs_set_reloc.
4185 * elfcode.h (elf_set_reloc): Define.
4186 * bfd-in2.h: Regenerated.
4188 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
4191 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
4192 for IFUNC function address.
4194 2017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
4196 * elf32-arc.c (FEATURE_LIST_NAME): Define.
4197 (CONFLICT_LIST): Likewise.
4198 (opcode/arc-attrs.h): Include.
4199 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
4200 (arc_extract_features): New file.
4201 (arc_stralloc): Likewise.
4202 (arc_elf_merge_attributes): Likewise.
4203 (arc_elf_merge_private_bfd_data): Use object attributes.
4204 (bfd_arc_get_mach_from_attributes): New function.
4205 (arc_elf_object_p): Use object attributes.
4206 (arc_elf_final_write_processing): Likewise.
4207 (elf32_arc_obj_attrs_arg_type): New function.
4208 (elf32_arc_obj_attrs_handle_unknown): Likewise.
4209 (elf32_arc_section_from_shdr): Likewise.
4210 (elf_backend_obj_attrs_vendor): Define.
4211 (elf_backend_obj_attrs_section): Likewise.
4212 (elf_backend_obj_attrs_arg_type): Likewise.
4213 (elf_backend_obj_attrs_section_type): Likewise.
4214 (elf_backend_obj_attrs_handle_unknown): Likewise.
4215 (elf_backend_section_from_shdr): Likewise.
4217 2017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
4220 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
4221 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
4222 and the destination is a Thumb symbol.
4224 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
4226 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
4227 initializer to silence GCC 4.2.
4228 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
4230 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
4232 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
4233 (LAZY_PLT_ENTRY_SIZE): This.
4234 (NON_LAZY_PLT_ENTRY_SIZE): New.
4235 (elf_x86_64_plt0_entry): Renamed to ...
4236 (elf_x86_64_lazy_plt0_entry): This.
4237 (elf_x86_64_plt_entry): Renamed to ...
4238 (elf_x86_64_lazy_plt_entry): This.
4239 (elf_x86_64_bnd_plt0_entry): Renamed to ...
4240 (elf_x86_64_lazy_bnd_plt0_entry): This.
4241 (elf_x86_64_legacy_plt_entry): Removed.
4242 (elf_x86_64_bnd_plt_entry): Renamed to ...
4243 (elf_x86_64_lazy_bnd_plt_entry): This.
4244 (elf_x86_64_legacy_plt2_entry): Renamed to ...
4245 (elf_x86_64_non_lazy_plt_entry): This.
4246 (elf_x86_64_bnd_plt2_entry): Renamed to ...
4247 (elf_x86_64_non_lazy_bnd_plt_entry): This.
4248 (elf_x86_64_eh_frame_plt): Renamed to ...
4249 (elf_x86_64_eh_frame_lazy_plt): This.
4250 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
4251 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
4252 (elf_x86_64_eh_frame_plt_got): Renamed to ...
4253 (elf_x86_64_eh_frame_non_lazy_plt): This.
4254 (elf_x86_64_lazy_plt_layout): New.
4255 (elf_x86_64_non_lazy_plt_layout): Likewise.
4256 (elf_x86_64_plt_layout): Likewise.
4257 (elf_x86_64_backend_data): Remove PLT layout information. Add
4258 os for target system.
4259 (GET_PLT_ENTRY_SIZE): Removed.
4260 (elf_x86_64_lazy_plt): New.
4261 (elf_x86_64_non_lazy_plt): Likewise.
4262 (elf_x86_64_lazy_bnd_plt): Likewise.
4263 (elf_x86_64_non_lazy_bnd_plt): Likewise.
4264 (elf_x86-64_arch_bed): Updated.
4265 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
4266 (elf_x86_64_create_dynamic_sections): Removed.
4267 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
4268 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
4269 (elf_x86-64_adjust_dynamic_symbol): Updated.
4270 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
4271 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
4272 size for PLT0 if there is no PLT0. Get plt_entry_size from
4273 non_lazy_plt for non-lazy PLT entries.
4274 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
4275 from non_lazy_plt for non-lazy PLT entries.
4276 (elf_x86-64_relocate_section): Updated. Properly get PLT index
4277 if there is no PLT0.
4278 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
4279 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
4280 entries with non-lazy PLT layout. Don't fill the second and third
4281 slots in the PLT entry if there is no PLT0.
4282 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
4283 if there is no PLT0. Set sh_entsize on the .plt.got section.
4284 (compare_relocs): New.
4285 (elf_x86_64_plt_type): Likewise.
4286 (elf_x86_64_plt): Likewise.
4287 (elf_x86_64_nacl_plt): New. Forward declaration.
4288 (elf_x86_64_get_plt_sym_val): Removed.
4289 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
4290 against all dynamic relocations.
4291 (elf_x86_64_link_setup_gnu_properties): New function.
4292 (elf_backend_create_dynamic_sections): Updated.
4293 (elf_backend_setup_gnu_properties): New.
4294 (elf_x86_64_nacl_plt): New.
4295 (elf_x86_64_nacl_arch_bed): Updated.
4297 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
4299 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
4300 (LAZY_PLT_ENTRY_SIZE): This.
4301 (NON_LAZY_PLT_ENTRY_SIZE): New.
4302 (elf_i386_plt0_entry): Renamed to ...
4303 (elf_i386_lazy_plt0_entry): This.
4304 (elf_i386_plt_entry): Renamed to ...
4305 (elf_i386_lazy_plt_entry): This.
4306 (elf_i386_pic_plt0_entry): Renamed to ...
4307 (elf_i386_pic_lazy_plt0_entry): This.
4308 (elf_i386_pic_plt_entry): Renamed to ...
4309 (elf_i386_pic_lazy_plt_entry): This.
4310 (elf_i386_got_plt_entry): Renamed to ...
4311 (elf_i386_non_lazy_plt_entry): This.
4312 (elf_i386_pic_got_plt_entry): Renamed to ...
4313 (elf_i386_pic_non_lazy_plt_entry): This.
4314 (elf_i386_eh_frame_plt): Renamed to ...
4315 (elf_i386_eh_frame_lazy_plt): This.
4316 (elf_i386_eh_frame_plt_got): Renamed to ...
4317 (elf_i386_eh_frame_non_lazy_plt): This.
4318 (elf_i386_plt_layout): Renamed to ...
4319 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
4320 eh_frame_plt_got_size.
4321 (elf_i386_non_lazy_plt_layout): New.
4322 (elf_i386_plt_layout): Likewise.
4323 (elf_i386_non_lazy_plt): Likewise.
4324 (GET_PLT_ENTRY_SIZE): Removed.
4325 (elf_i386_plt): Renamed to ...
4326 (elf_i386_lazy_plt): This.
4327 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
4328 (elf_i386_arch_bed): Updated.
4329 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
4330 (elf_i386_create_dynamic_sections): Removed.
4331 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
4332 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
4333 (elf_i386_adjust_dynamic_symbol): Updated.
4334 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
4335 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
4336 size for PLT0 if there is no PLT0.
4337 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
4338 output section is discarded only if GOT isn't empty.
4339 (elf_i386_relocate_section): Updated. Properly get PLT index
4340 if there is no PLT0.
4341 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
4342 second and third slots in the PLT entry if there is no PLT0.
4343 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
4344 if there is no PLT0. Set sh_entsize on the .plt.got section.
4345 (elf_i386_nacl_plt): Forward declaration.
4346 (elf_i386_get_plt_sym_val): Removed.
4347 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
4348 against all dynamic relocations.
4349 (elf_i386_link_setup_gnu_properties): New function.
4350 (elf_backend_create_dynamic_sections): Updated.
4351 (elf_backend_setup_gnu_properties): New.
4352 (elf_i386_nacl_plt): Updated.
4353 (elf_i386_nacl_arch_bed): Likewise.
4354 (elf_i386_vxworks_arch_bed): Likewise.
4356 2017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
4358 * elflink.c (elf_output_implib): Remove executable flag from import
4360 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
4361 library is a relocatable object file.
4363 2017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
4366 * elf32-avr.c (avr_should_move_sym): New function.
4367 (avr_should_reduce_sym_size): Likewise.
4368 (avr_should_increase_sym_size): Likewise.
4369 (elf32_avr_relax_delete_bytes): Adjust symbol values
4370 and sizes by calling new functions.
4372 2017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
4374 * config.bfd (riscv32-*): Enable rv64.
4376 2017-05-02 Alan Modra <amodra@gmail.com>
4379 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
4380 rather than h->root.type == bfd_link_hash_new.
4381 (bfd_elf_record_link_assignment): Similarly, call
4382 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
4384 2017-04-29 Alan Modra <amodra@gmail.com>
4387 * reloc.c (reloc_offset_in_range): New function.
4388 (bfd_perform_relocation, bfd_install_relocation): Use it.
4389 (_bfd_final_link_relocate): Likewise.
4391 2017-04-28 H.J. Lu <hongjiu.lu@intel.com>
4393 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
4394 before using .plt.got.
4395 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
4397 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
4399 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
4400 instead of "+=" to update 0.
4402 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
4404 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
4405 .plt.got section here.
4406 (elf_i386_check_relocs): Don't create the .plt.got section.
4407 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
4408 the .plt.got and .plt.bnd sections here.
4409 (elf_x86_64_check_relocs): Don't create the .plt.got nor
4412 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
4414 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
4416 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
4417 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
4418 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
4419 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
4422 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
4424 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
4426 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
4427 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
4428 the first relocatable ELF input with GNU properties.
4430 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
4432 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
4433 VxWorks for non-PIC.
4435 2017-04-27 Alan Modra <amodra@gmail.com>
4437 * elf-bfd.h (struct elf_backend_data): Make asection param of
4438 elf_backend_eh_frame_address_size const.
4439 (_bfd_elf_eh_frame_address_size): Likewise.
4440 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
4441 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
4442 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
4443 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
4444 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
4445 (next_cie_fde_offset): Constify params.
4446 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
4448 2017-04-27 Alan Modra <amodra@gmail.com>
4450 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
4451 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
4452 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
4454 (offset_adjust): New function.
4455 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
4456 (adjust_eh_frame_local_symbols): Likewise.
4457 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
4458 after changing anything. Return true if anything changed.
4459 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
4460 _bfd_elf_adjust_eh_frame_global_symbol for globals.
4462 2017-04-27 Alan Modra <amodra@gmail.com>
4464 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
4467 2017-04-27 Alan Modra <amodra@gmail.com>
4469 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
4470 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
4471 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
4472 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
4473 for undef and undefweak dyn_relocs.
4474 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
4475 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
4476 (allocate_got, allocate_dynrelocs): Likewise.
4477 (ppc64_elf_relocate_section): Likewise.
4479 2017-04-26 H.J. Lu <hongjiu.lu@intel.com>
4481 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
4482 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
4483 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
4484 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
4486 2017-04-26 Nick Clifton <nickc@redhat.com>
4489 * reloc.c (bfd_perform_relocation): Check for a negative address
4492 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
4495 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
4497 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
4498 (elf_backend_always_renumber_dynsyms): Define.
4499 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
4500 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
4501 * elflink.c (bfd_elf_size_dynamic_sections): Also call
4502 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
4504 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
4506 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
4508 * elflink.c (bfd_elf_size_dynamic_sections): Only call
4509 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
4510 sections have been created.
4512 2017-04-26 Nick Clifton <nickc@redhat.com>
4515 * compress.c (bfd_init_section_compress_status): Check the return
4516 value from bfd_malloc.
4518 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
4520 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
4521 no_finish_dynamic_symbol.
4522 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
4524 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
4525 weak symbol, don't make it dynamic.
4526 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
4527 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
4528 relocation for GOT reference.
4529 (elf_x86_64_finish_dynamic_symbol): Abort if
4530 no_finish_dynamic_symbol isn't 0.
4532 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
4535 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
4536 undefined weak symbol, don't make it dynamic.
4537 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
4538 set no_finish_dynamic_symbol and generate R_386_RELATIVE
4539 relocation for R_386_GOT32.
4541 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
4544 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
4546 2017-04-23 Alan Modra <amodra@gmail.com>
4549 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
4550 * elf.c (lcomm_sym): New.
4551 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
4552 * bfd-in2.h: Regenerate.
4554 2017-04-23 Alan Modra <amodra@gmail.com>
4557 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
4558 parameters and comment.
4559 (_bfd_elf_get_reloc_section): Delete.
4560 (_bfd_elf_plt_get_reloc_section): Declare.
4561 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
4562 New functions. Don't blindly skip over assumed .rel/.rela prefix.
4564 (_bfd_elf_get_reloc_section): ..here. Delete.
4565 (assign_section_numbers): Call elf_get_reloc_section.
4566 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
4567 * elfxx-target.h (elf_backend_get_reloc_section): Update.
4569 2017-04-23 Alan Modra <amodra@gmail.com>
4572 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
4575 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
4578 * elf32-i386.c (elf_i386_link_hash_entry): Add
4579 no_finish_dynamic_symbol.
4580 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
4581 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
4582 symbol, don't make it dynamic in PIE.
4583 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
4584 set no_finish_dynamic_symbol and generate R_386_RELATIVE
4585 relocation for R_386_GOT32
4586 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
4589 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
4593 * elflink.c (elf_link_add_object_symbols): Require
4594 --no-dynamic-linker with -E/--dynamic-list when creating
4597 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
4599 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
4602 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
4604 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
4605 dynamic symbol sorting.
4607 2017-04-20 H.J. Lu <hongjiu.lu@intel.com>
4610 * elflink.c (elf_link_add_object_symbols): Preserve
4611 dynamic_ref_after_ir_def when restoring the symbol table for
4612 unneeded dynamic object.
4614 2017-04-19 H.J. Lu <hongjiu.lu@intel.com>
4617 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
4618 on on undefined IFUNC symbol in the second PLT.
4620 2017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
4622 * peXXigen.c (pe_print_reloc): Correct chunk_end.
4624 2017-04-19 Alan Modra <amodra@gmail.com>
4626 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
4627 or make dynamic for info->dynamic_undefined_weak 0 and 1.
4628 * elf32-ppc.c:Formatting.
4629 (ensure_undefweak_dynamic): Don't make dynamic when
4630 info->dynamic_undefined_weak is zero.
4631 (allocate_dynrelocs): Discard undefweak dyn_relocs for
4632 info->dynamic_undefined_weak. Discard undef dyn_relocs when
4633 not default visibility. Discard undef and undefweak
4635 (ppc_elf_relocate_section): Adjust to suit.
4636 * elf64-ppc.c: Formatting.
4637 (ensure_undefweak_dynamic): Don't make dynamic when
4638 info->dynamic_undefined_weak is zero.
4639 (allocate_dynrelocs): Discard undefweak dyn_relocs for
4640 info->dynamic_undefined_weak. Discard them earlier.
4642 2017-04-17 H.J. Lu <hongjiu.lu@intel.com>
4645 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
4646 before generating the version definition section.
4648 2017-04-17 Alan Modra <amodra@gmail.com>
4650 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
4651 state when a regular object file defines a symbol with
4652 incompatible type to that defined by an earlier shared lib.
4654 2017-04-13 Alan Modra <amodra@gmail.com>
4656 * coffcode.h: Wrap some overly long _bfd_error_handler args.
4658 * elf32-arm.c: Likewise.
4659 * elf32-i386.c: Likewise.
4660 * elf32-mep.c: Likewise.
4661 * elf64-ia64-vms.c: Likewise.
4662 * elf64-x86-64.c: Likewise.
4663 * elflink.c: Likewise.
4664 * elfnn-ia64.c: Likewise.
4665 * elfxx-mips.c: Likewise.
4667 2017-04-13 Alan Modra <amodra@gmail.com>
4669 * aoutx.h: Use %B and %A in error messages throughout file.
4670 * aout-cris.c: Likewise.
4671 * archive.c: Likewise.
4672 * binary.c: Likewise.
4673 * coff-rs6000.c: Likewise.
4674 * coff-tic4x.c: Likewise.
4675 * coffcode.h: Likewise.
4676 * coffgen.c: Likewise.
4677 * cofflink.c: Likewise.
4678 * coffswap.h: Likewise.
4679 * cpu-arm.c: Likewise.
4680 * elf-eh-frame.c: Likewise.
4681 * elf-m10300.c: Likewise.
4683 * elf32-arc.c: Likewise.
4684 * elf32-arm.c: Likewise.
4685 * elf32-bfin.c: Likewise.
4686 * elf32-frv.c: Likewise.
4687 * elf32-iq2000.c: Likewise.
4688 * elf32-m32c.c: Likewise.
4689 * elf32-microblaze.c: Likewise.
4690 * elf32-nds32.c: Likewise.
4691 * elf32-rl78.c: Likewise.
4692 * elf32-rx.c: Likewise.
4693 * elf32-score.c: Likewise.
4694 * elf32-score7.c: Likewise.
4695 * elf32-sh64.c: Likewise.
4696 * elf32-v850.c: Likewise.
4697 * elf32-vax.c: Likewise.
4698 * elf32-visium.c: Likewise.
4699 * elf64-ia64-vms.c: Likewise.
4700 * elf64-mmix.c: Likewise.
4701 * elf64-sh64.c: Likewise.
4702 * elfcode.h: Likewise.
4703 * elfnn-aarch64.c: Likewise.
4704 * elfnn-ia64.c: Likewise.
4705 * elfxx-mips.c: Likewise.
4706 * hpux-core.c: Likewise.
4709 * linker.c: Likewise.
4710 * merge.c: Likewise.
4712 * oasys.c: Likewise.
4713 * pdp11.c: Likewise.
4714 * peXXigen.c: Likewise.
4715 * rs6000-core.c: Likewise.
4716 * vms-alpha.c: Likewise.
4717 * xcofflink.c: Likewise.
4719 2017-04-13 Alan Modra <amodra@gmail.com>
4721 * bfd.c (PRINT_TYPE): Define.
4722 (_doprnt): New function.
4723 (error_handler_internal): Use _doprnt.
4724 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
4725 calls in their natural order, throughout file.
4726 * coff-mcore.c: Likewise.
4727 * coff-ppc.c: Likewise.
4728 * coff-tic80.c: Likewise.
4729 * cofflink.c: Likewise.
4730 * elf-s390-common.c: Likewise.
4732 * elf32-arm.c: Likewise.
4733 * elf32-i386.c: Likewise.
4734 * elf32-m32r.c: Likewise.
4735 * elf32-msp430.c: Likewise.
4736 * elf32-spu.c: Likewise.
4737 * elf64-ia64-vms.c: Likewise.
4738 * elf64-sparc.c: Likewise.
4739 * elf64-x86-64.c: Likewise.
4740 * elflink.c: Likewise.
4741 * elfnn-aarch64.c: Likewise.
4742 * elfnn-ia64.c: Likewise.
4743 * elfxx-mips.c: Likewise.
4745 2017-04-13 Alan Modra <amodra@gmail.com>
4747 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
4748 branch veneers" error. Fix double space and format message.
4749 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
4750 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
4752 2017-04-13 Alan Modra <amodra@gmail.com>
4754 * bfd-in2.h: Regenerate.
4756 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
4758 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
4759 extra `\n' in warning/error messages.
4760 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
4761 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
4763 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
4765 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
4766 processor-specific properties with generic ELF target vector.
4768 2017-04-10 Qing Zhao <qing.zhao@oracle.com>
4770 * elf32-sparc.c (elf_backend_fixup_symbol): New.
4771 * elf64-sparc.c (elf_backend_fixup_symbol): New.
4772 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
4773 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
4775 (link_hash_newfunc): Initialize has_got_reloc and
4777 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
4779 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
4781 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
4783 (_bfd_sparc_elf_fixup_symbol): New function.
4784 (allocate_dynrelocs): Don't allocate space for dynamic
4785 relocations and discard relocations against resolved undefined
4786 weak symbols in executable. Don't make resolved undefined weak
4787 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
4788 relocation against undefined weak symbols in PIE.
4789 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
4790 relocations against resolved undefined weak symbols in PIE
4791 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
4792 without ynamic PLT/GOT relocations for resolved undefined weak
4794 Don't generate dynamic relocation against resolved undefined
4795 weak symbol in executable.
4796 (pie_finish_undefweak_symbol): New function.
4797 (_bfd_sparc_elf_finish_dynamic_sections): Call
4798 pie_finish_undefweak_symbol on all symbols in PIE.
4799 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
4800 (_bfd_sparc_elf_fixup_symbol): New function.
4802 2017-04-10 Nick Clifton <nickc@redhat.com>
4804 * config.bfd: Remove ns32k from obsolete list.
4806 2017-04-10 Alan Modra <amodra@gmail.com>
4809 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
4810 (special_sections_i): Likewise for .init_array.
4811 (special_sections_p): Likewise for .preinit_array.
4813 2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
4817 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
4818 ELF_COMMON_DEF_P for common symbols.
4819 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
4820 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
4821 * elflink.c (_bfd_elf_merge_symbol): Revert commits
4822 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
4823 07492f668d2173da7a2bda3707ff0985e0f460b6.
4825 2017-04-07 Pedro Alves <palves@redhat.com>
4827 * opncls.c (bfd_get_debug_link_info): Rename to...
4828 (bfd_get_debug_link_info_1): ... this. Change type of second
4829 parameter to void pointer. Adjust.
4830 (bfd_get_debug_link_info): Reimplement on top of
4831 bfd_get_debug_link_info_1.
4832 (separate_debug_file_exists, separate_alt_debug_file_exists):
4833 Change type of second parameter to void pointer. Adjust.
4834 (get_func_type, check_func_type): Change type of second parameter
4836 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
4837 the callback functions instead of passing the address of a local.
4838 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
4839 find_separate_debug_file.
4840 (get_alt_debug_link_info_shim): Change type of second parameter to
4841 void pointer. Adjust.
4842 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
4843 find_separate_debug_file.
4844 (get_build_id_name, bfd_boolean check_build_id_file): Change type
4845 of second parameter to void pointer. Adjust.
4846 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
4847 pointer local to find_separate_debug_file.
4849 2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
4851 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
4852 external symbols with a definition.
4853 (_bfd_coff_gc_mark_extra_sections): Fix typo.
4855 2017-04-07 Alan Modra <amodra@gmail.com>
4857 * po/SRC-POTFILES.in: Regenerate.
4859 2017-04-05 Alan Modra <amodra@gmail.com>
4861 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
4864 2017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
4866 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
4867 numbers for DataDirectory entry indicies passed to
4870 2017-04-04 H.J. Lu <hongjiu.lu@intel.com>
4872 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
4873 each GNU_MBIND section and align GNU_MBIND section to page size.
4874 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
4875 segment for each GNU_MBIND section.
4876 (_bfd_elf_init_private_section_data): Copy sh_info from input
4877 for GNU_MBIND section.
4879 2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
4881 * elfnn-riscv.c (GP_NAME): Delete.
4882 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
4883 (_bfd_riscv_relax_lui): Likewise.
4885 2017-04-04 Nick Clifton <nickc@redhat.com>
4888 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
4890 (bfd_elf_final_link): Only initialize the extended symbol index
4891 section if there are extended symbol tables to list.
4893 2017-04-03 H.J. Lu <hongjiu.lu@intel.com>
4895 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
4896 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
4897 * configure.ac (elf): Add elf-properties.lo.
4898 * Makefile.in: Regenerated.
4899 * configure: Likewise.
4900 * elf-bfd.h (elf_property_kind): New.
4901 (elf_property): Likewise.
4902 (elf_property_list): Likewise.
4903 (elf_properties): Likewise.
4904 (_bfd_elf_parse_gnu_properties): Likewise.
4905 (_bfd_elf_get_property): Likewise.
4906 (_bfd_elf_link_setup_gnu_properties): Likewise.
4907 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
4908 and setup_gnu_properties.
4909 (elf_obj_tdata): Add properties.
4910 * elf-properties.c: New file.
4911 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
4912 (elf_i386_merge_gnu_properties): Likewise.
4913 (elf_backend_parse_gnu_properties): Likewise.
4914 (elf_backend_merge_gnu_properties): Likewise.
4915 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
4916 (elf_x86_64_merge_gnu_properties): Likewise.
4917 (elf_backend_parse_gnu_properties): Likewise.
4918 (elf_backend_merge_gnu_properties): Likewise.
4919 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
4920 (elf_backend_parse_gnu_properties): Likewise.
4921 (elf_backend_setup_gnu_properties): Likewise.
4922 (elfNN_bed): Add elf_backend_parse_gnu_properties,
4923 elf_backend_merge_gnu_properties and
4924 elf_backend_setup_gnu_properties.
4926 2017-03-30 Pip Cet <pipcet@gmail.com>
4928 * elf32-wasm32.c: Add relocation code, two relocs.
4929 * reloc.c: Add wasm32 relocations.
4930 * libbfd.h: Regenerate.
4931 * bfd-in2.h: Regenerate.
4932 * bfd/po/bfd.pot: Regenerate.
4934 2017-03-29 Nick Clifton <nickc@redhat.com>
4937 * coff-bfd.h (struct coff_section_data): Add new fields:
4938 saved_bias and bias.
4939 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
4940 computed for PE binaries.
4941 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
4944 2017-03-28 Hans-Peter Nilsson <hp@axis.com>
4947 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
4948 to handle a local symbol with a hash-symbol-entry; without PLT.
4949 Add BFD_ASSERT for an incidental case with GOT entry present.
4950 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
4951 isn't forced-or-set local.
4953 2017-03-27 Pip Cet <pipcet@gmail.com>
4955 * wasm-module.c: New file to support WebAssembly modules.
4956 * wasm-module.h: New file to support WebAssembly modules.
4957 * doc/webassembly.texi: Start documenting wasm-module.c.
4958 * config.bfd: Add wasm_vec.
4959 * targets.c: Likewise.
4960 * configure.ac: Likewise.
4961 * Makefile.am: Add entries for wasm-module.c.
4962 * Makefile.in: Regenerate.
4963 * configure: Regenerate.
4964 * po/SRC-POTFILES.in: Regenerate.
4966 2017-03-27 Pip Cet <pipcet@gmail.com>
4968 * cpu-wasm32.c: New file to support wasm32 architecture.
4969 * elf32-wasm32.c: New file to support wasm32 architecture.
4970 * Makefile.am: Add wasm32 architecture.
4971 * archures.c: Likewise.
4972 * config.bfd: Likewise.
4973 * configure.ac: Likewise.
4974 * targets.c: Likewise.
4975 * Makefile.in: Regenerate.
4976 * bfd-in2.h: Regenerate.
4977 * configure: Regenerate.
4978 * po/SRC-POTFILES.in: Regenerate.
4980 2017-03-20 Alan Modra <amodra@gmail.com>
4983 * elf64-ppc.c (compare_symbols): Stabilize sort.
4985 2017-03-18 Alan Modra <amodra@gmail.com>
4987 * elf64-ppc.c (struct ppc_link_hash_table): Add
4988 local_ifunc_resolver and maybe_local_ifunc_resolver.
4989 (ppc_build_one_stub): Set flags on emitting dynamic
4990 relocation to ifunc.
4991 (ppc64_elf_relocate_section): Likewise.
4992 (ppc64_elf_finish_dynamic_symbol): Likewise.
4993 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
4994 local dynamic relocs to ifuncs.
4995 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
4996 local_ifunc_resolver and maybe_local_ifunc_resolver.
4997 (ppc_elf_relocate_section): Set flag on emitting dynamic
4998 relocation to ifuncs.
4999 (ppc_elf_finish_dynamic_symbol): Likewise.
5000 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
5001 dynamic relocs to ifuncs.
5003 2017-03-13 Nick Clifton <nickc@redhat.com>
5006 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
5007 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
5008 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
5009 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
5010 * bfd-in2.h: Regenerate.
5011 * libbfd.h: Regenerate.
5012 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
5014 (IS_AARCH64_TLSDESC_RELOC): Likewise.
5015 (elfNN_aarch64_howto_table): Likewise.
5016 (aarch64_tls_transition_without_check): Likewise.
5017 (aarch64_reloc_got_type): Likewise.
5018 (elfNN_aarch64_final_link_relocate): Likewise.
5019 (elfNN_aarch64_tls_relax): Likewise.
5020 (elfNN_aarch64_relocate_section): Likewise.
5021 (elfNN_aarch64_gc_sweep_hook): Likewise.
5022 (elfNN_aarch64_check_relocs): Likewise.
5023 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
5024 (_bfd_aarch64_elf_resolve_relocation): Likewise.
5026 2017-03-11 Alan Modra <amodra@gmail.com>
5028 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
5029 parameter is in fact used. Whitespace fixes.
5030 * elf64-ppc.c: Likewise.
5032 2017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
5034 * rs6000-core.c (CORE_NEW): Simplify macro when
5035 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
5037 2017-03-07 Alan Modra <amodra@gmail.com>
5041 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
5044 2017-03-05 Alan Modra <amodra@gmail.com>
5046 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
5047 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
5048 (next_cie_fde_offset): New function.
5049 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
5050 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
5051 four bytes. Align CIEs to four or eight bytes depending on
5052 per_encoding_aligned8. Align FDEs according to their encoding.
5053 Pad last FDE to output section alignment.
5054 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
5056 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
5057 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
5058 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
5060 2017-03-02 Martin Bickel <binutils@ineranves.de>
5063 * elf.c (rewrite_elf_program_header): Do not issue a warning for
5064 empty segments which have a zero filesz, but a non-zero memsz.
5066 2017-03-02 Alan Modra <amodra@gmail.com>
5068 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
5070 2017-02-28 Alan Modra <amodra@gmail.com>
5072 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
5073 (ppc64_elf_relocate_section): Likewise.
5075 2017-02-28 Alan Modra <amodra@gmail.com>
5078 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
5079 rather than elf32_nios2_hash_table or elf_hash_table.
5080 (create_got_section): Likewise.
5081 (nios2_elf32_finish_dynamic_symbol): Likewise.
5082 (nios2_elf32_adjust_dynamic_symbol): Likewise.
5083 (nios2_elf32_size_dynamic_sections): Likewise.
5084 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
5085 vars. Use htab equivalents directly instead. Don't create
5086 all dynamic sections on needing just the GOT. Use a goto
5087 rather than a fall-through with reloc test. Ensure
5088 htab->dynobj is set when making dynamic sreloc section.
5089 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
5090 equivalent directly instead. Don't segfault on looking for
5091 .dynamic when dynamic sections have not been created. Don't
5092 segfault on .got.plt being discarded.
5093 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
5094 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
5095 fixme and another not so relevant comment.
5096 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
5097 already set, set hash table dynobj on creating .sbss.
5099 2017-02-28 Alan Modra <amodra@gmail.com>
5101 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
5102 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
5103 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
5104 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
5105 (ppc64_elf_relocate_section): Likewise.
5106 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
5107 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
5108 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
5109 * libbfd.h: Regenerate.
5110 * bfd-in2.h: Regenerate.
5112 2017-02-28 Alan Modra <amodra@gmail.com>
5114 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
5115 dynamic .data.rel.ro read-only.
5116 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
5117 rather than section flags when deciding where copy reloc goes.
5118 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
5119 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
5120 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
5121 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
5122 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
5123 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
5124 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
5125 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
5126 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
5127 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
5128 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
5129 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
5130 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
5131 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
5132 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
5133 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
5134 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
5135 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
5136 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
5138 2017-02-28 Maciej W. Rozycki <macro@imgtec.com>
5140 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
5141 `jalr $0, $25' instruction encoding.
5143 2017-02-27 Nick Clifton <nickc@redhat.com>
5146 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
5147 generating a seg-fault when encountering a symbol that has been
5148 deleted by garbage collection.
5150 2017-02-25 Alan Modra <amodra@gmail.com>
5152 * elf32-arc.c (struct dynamic_sections): Delete.
5153 (enum dyn_section_types): Delete.
5154 (dyn_section_names): Delete.
5155 (arc_create_dynamic_sections): Delete.
5156 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
5157 segfault on discarded .rela.plt section.
5158 (elf_arc_size_dynamic_sections): Formatting. Don't call
5159 arc_create_dynamic_sections. Don't allocate memory for sections
5160 handled by the generic linker. Correct code finding relocs in
5161 read-only sections. Set SEC_EXCLUDE on zero size .got,
5162 .got.plt, and .dynbss sections. Do set .interp for pies.
5164 2017-02-24 Andrew Waterman <andrew@sifive.com>
5166 * elfnn-riscv.c (GP_NAME): New macro.
5167 (riscv_global_pointer_value): Use it.
5168 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
5169 output section, consider only that section's alignment.
5171 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
5173 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
5174 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
5175 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
5176 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
5178 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
5180 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
5181 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
5184 2017-02-23 Alan Modra <amodra@gmail.com>
5187 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
5189 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
5190 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
5193 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
5196 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
5197 processing ahead of the call to `elf_gc_sweep_symbol'.
5199 2017-02-22 Nick Clifton <nickc@redhat.com>
5202 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
5203 created section 4-byte alignment.
5205 2017-02-22 Alan Modra <amodra@gmail.com>
5207 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
5208 on .got or .plt output section being discarded by script.
5209 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
5212 2017-02-21 Alan Modra <amodra@gmail.com>
5214 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
5215 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
5217 2017-02-20 Alan Modra <amodra@gmail.com>
5220 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
5221 if DT_RELSZ/DT_RELASZ is zero.
5223 2017-02-17 Nick Clifton <nickc@redhat.com>
5225 * compress.c (bfd_get_full_section_contents): Remember to reduce
5226 compressed size by the sizeof the compression header when
5227 decompressing the contents.
5229 2017-02-17 Pedro Alves <palves@redhat.com>
5231 * srec.c (Chunk): Rename to ...
5232 (_bfd_srec_len): ... this.
5233 (S3Forced): Rename to ...
5234 (_bfd_srec_forceS3): ... this.
5235 * objcopy.c: Adjust all references.
5237 2017-02-17 Pedro Alves <palves@redhat.com>
5239 * archive.c (bsd_write_armap): Rename to ...
5240 (_bfd_bsd_write_armap): ... this.
5241 (coff_write_armap): Rename to ...
5242 (_bfd_coff_write_armap): ... this.
5243 * libbfd-in.h (bsd_write_armap): Rename to ...
5244 (_bfd_bsd_write_armap): ... this.
5245 (coff_write_armap): Rename to ...
5246 (_bfd_coff_write_armap): ... this.
5247 * aout-target.h, aout-tic30.c: Adjust all users.
5248 * libbfd.h: Regenerate.
5250 2017-02-17 Pedro Alves <palves@redhat.com>
5252 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
5253 (warn_deprecated): Rename to ...
5254 (_bfd_warn_deprecated): ... this.
5255 * libbfd.c (warn_deprecated): Rename to ...
5256 (_bfd_warn_deprecated): ... this.
5257 * bfd-in2.h: Regenerate.
5259 2017-02-17 Pedro Alves <palves@redhat.com>
5261 * bfdio.c (real_ftell): Rename to ...
5262 (_bfd_real_ftell): ... this.
5263 (real_fseek): Rename to ...
5264 (_bfd_real_fseek): ... this.
5265 (real_fopen): Rename to ...
5266 (_bfd_real_fopen): ... this.
5267 * libbfd-in.h (real_ftell): Rename to ...
5268 (_bfd_real_ftell): ... this.
5269 (real_fseek): Rename to ...
5270 (_bfd_real_fseek): ... this.
5271 (real_fopen): Rename to ...
5272 (_bfd_real_fopen): ... this.
5273 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
5274 * libbfd.h: Regenerate.
5276 2017-02-17 Pedro Alves <palves@redhat.com>
5278 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
5279 * libbfd.c (read_unsigned_leb128): Rename to ...
5280 (_bfd_read_unsigned_leb128): ... this.
5281 (read_signed_leb128): Rename to ...
5282 (_bfd_read_signed_leb128): ... this.
5283 (safe_read_leb128): Rename to ...
5284 (_bfd_safe_read_leb128): ... this.
5285 * libbfd-in.h (read_unsigned_leb128): Rename to ...
5286 (_bfd_read_unsigned_leb128): ... this.
5287 (read_signed_leb128): Rename to ...
5288 (_bfd_read_signed_leb128): ... this.
5289 (safe_read_leb128): Rename to ...
5290 (_bfd_safe_read_leb128): ... this.
5291 * libbfd.h: Renegerate.
5293 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
5295 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
5296 before trying to fine matching file and line information.
5298 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
5300 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
5301 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
5302 not match current bfd, then reload debug information. Record bfd
5303 we're loading debug info for in the stash. If we have debug
5304 informatin in the cache then perform section placement before
5307 2017-02-16 Alan Modra <amodra@gmail.com>
5310 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
5311 * elfxx-target.h (elf_backend_no_page_alias): Define.
5312 (elfNN_bed): Init new field.
5313 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
5314 ensure PT_LOAD segment starts on a new page.
5315 * elf32-hppa.c (elf_backend_no_page_alias): Define.
5317 2017-02-16 Alan Modra <amodra@gmail.com>
5320 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
5323 2017-02-16 Jiong Wang <jiong.wang@arm.com>
5325 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
5326 * bfd-in2.h: Regenerated.
5328 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
5331 * elf32-i386.c (elf_i386_relocate_section): Allow
5332 "lea foo@GOT, %reg" in PIC.
5334 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
5337 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
5338 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
5339 error against local IFUNC symbol without a base register for
5342 2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
5344 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
5345 `%P: %H:' with `info->callbacks->einfo'.
5346 (ppc_elf_relocate_section): Likewise.
5347 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
5348 (ppc64_elf_edit_toc): Likewise.
5349 (ppc64_elf_relocate_section): Likewise.
5351 2017-02-14 Alan Modra <amodra@gmail.com>
5353 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
5354 --gc-keep-exported, and test versioned field of sym rather than
5355 looking for @ in name.
5357 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
5359 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
5362 2017-02-13 Nick Clifton <nickc@redhat.com>
5365 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
5368 2017-02-07 Andrew Waterman <andrew@sifive.com>
5370 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
5371 entry size if PLT header is written.
5373 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
5375 Fix sparc64 dynamic relocation processing to use the dynamic
5377 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
5378 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
5381 2017-02-03 Nick Clifton <nickc@redhat.com>
5384 * coffcode.h (coff_write_object_contents): Enlarge size of
5385 s_name_buf in order to avoid compile time warning about possible
5387 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
5388 32-bits of insn value before printing into buffer.
5390 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
5392 * elfxx-mips.c (mips_elf_hash_sort_data): Add
5393 `max_local_dynindx'.
5394 (mips_elf_sort_hash_table): Handle it.
5395 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
5396 symbols bump up `max_local_dynindx' rather than
5397 `max_non_got_dynindx'.
5399 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
5401 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
5402 `min_got_dynindx', `max_unref_got_dynindx' and
5403 `max_non_got_dynindx' members to the `bfd_size_type' data type.
5404 (mips_elf_sort_hash_table): Adjust accordingly.
5406 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
5408 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
5409 to access the hash table.
5411 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
5413 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
5414 non-NULL `htab' to the beginning.
5416 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
5418 * elflink.c (elf_gc_sweep): Wrap overlong line.
5420 2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
5422 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
5423 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
5424 * elfxx-mips.c (mips_elf_link_hash_table): Add
5425 `ignore_branch_isa' member.
5426 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
5427 in branch relocation calculation as an error if
5428 `ignore_branch_isa' has been set.
5429 (_bfd_mips_elf_insn32): Rename to...
5430 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
5431 parameter to `insn32' and add an `ignore_branch_isa' parameter.
5432 Handle the new parameter.
5434 2017-01-27 Hans-Peter Nilsson <hp@axis.com>
5436 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
5437 local variable dynobj.
5440 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
5441 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
5442 executable from read-only sections into sdynrelro.
5443 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
5444 dynamic relocs in sdynrelro.
5445 (elf_backend_want_dynrelro): Define.
5447 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
5449 * config.bfd (*-*-rtemsaout*): Mark as removed.
5451 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
5453 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
5454 (arm-*-rtems*): Move to (arm*-*-eabi*).
5455 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
5456 (m68-*-rtems*): Move to (m68*-*-elf*).
5458 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
5460 * config.bfd (*-*-rtemscoff*): Mark as removed.
5462 2017-01-24 Maciej W. Rozycki <macro@imgtec.com>
5465 * elflink.c (bfd_elf_record_link_assignment): Revert last
5466 change and don't ever clear `forced_local'. Set `mark'
5468 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
5470 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
5471 (bfd_elf_size_dynamic_sections): ... here.
5472 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
5473 and set `mark' instead in `__tls_get_addr_opt' processing.
5474 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
5476 2017-01-24 Alan Modra <amodra@gmail.com>
5478 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
5479 where dynamic relocs are preferable. Allow ifunc too.
5480 (ensure_undefweak_dynamic): New function.
5481 (allocate_dynrelocs): Use it here. Move plt handling last and
5482 don't make symbols dynamic, simplifying loop. Only make undef
5483 weak symbols with GOT entries dynamic. Correct condition
5484 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
5485 comments. Remove goto.
5486 (ppc_elf_relocate_section): Correct test for using dynamic
5487 symbol on GOT relocs. Rearrange test for emitting GOT relocs
5488 to suit. Set up explicit tls_index entries and implicit GOT
5489 tls_index entries resolvable at link time for
5490 __tls_get_addr_opt. Simplify test to clear mem for prelink.
5491 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
5492 (ensure_undefweak_dynamic): New function.
5493 (allocate_dynrelocs): Use it here. Only make undef weak symbols
5494 with GOT entries dynamic. Remove unnecessary test of
5495 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
5496 (ppc64_elf_relocate_section): Correct test for using dynamic
5497 symbol on GOT relocs. Rearrange test for emitting GOT relocs
5498 to suit. Set up explicit tls_index entries and implicit GOT
5499 tls_index entries resolvable at link time for __tls_get_addr_opt.
5500 Simplify expression to clear mem for prelink.
5502 2017-01-23 Yury Norov <ynorov@caviumnetworks.com>
5504 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
5506 2017-01-20 Jiong Wang <jiong.wang@arm.com>
5508 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
5509 (elf_backend_hash_symbol): Define.
5511 2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
5514 * elflink.c (bfd_elf_record_link_assignment): Clear any
5515 `forced_local' marking for DSO symbols that are not being
5518 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
5520 * elfnn-riscv.c (riscv_elf_object_p): New function.
5522 2017-01-12 H.J. Lu <hongjiu.lu@intel.com>
5525 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
5527 (elf_x86_64_check_relocs): Create .eh_frame section for the
5529 (elf_x86_64_size_dynamic_sections): Allocate and initialize
5530 .eh_frame section for the .plt.bnd section.
5531 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
5532 for the .plt.bnd section.
5534 2017-01-12 Nick Clifton <nickc@redhat.com>
5537 * opncls.c (find_separate_debug_file): Add include_dirs
5538 parameter. Only include the directory part of the bfd's filename
5539 in search paths if include_dirs is true. Add a couple of extra
5540 locations for looking for debug files.
5541 ( bfd_follow_gnu_debuglink): Update invocation of
5542 find_separate_debug_file.
5543 (bfd_follow_gnu_debugaltlink): Likewise.
5544 (get_build_id): New function: Finds the build-id of the given bfd.
5545 (get_build_id_name): New function: Computes the name of the
5546 separate debug info file for a bfd, based upon its build-id.
5547 (check_build_id_file): New function: Checks to see if a separate
5548 debug info file exists at the given location, and that its
5549 build-id matches that of the original bfd.
5550 (bfd_follow_build_id_debuglink): New function: Finds a separate
5551 debug info file for a given bfd by using the build-id method.
5552 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
5553 method of locating a separate debug info file before using the
5555 * bfd-in2.h: Regenerate.
5557 2017-01-11 H.J. Lu <hongjiu.lu@intel.com>
5560 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
5561 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
5562 elf_x86_64_eh_frame_plt_got.
5563 (elf_x86_64_size_dynamic_sections): Get unwind info from
5564 elf_x86_64_bnd_arch_bed for the BND PLT.
5566 2017-01-11 Jeremy Soller <jackpot51@gmail.com>
5568 * config.bfd: Add entries for i686-redox and x86_64-redox.
5570 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
5572 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
5574 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
5575 .eh_frame section to 4 bytes for x32.
5576 (elf_x86_64_check_relocs): Likewise.
5578 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
5581 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
5582 (PLT_GOT_FDE_LENGTH): Likewise.
5583 (elf_i386_plt_layout): Add eh_frame_plt_got and
5584 eh_frame_plt_got_size.
5585 (elf_i386_plt): Updated.
5586 (elf_i386_link_hash_table): Add plt_got_eh_frame.
5587 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
5588 (elf_i386_size_dynamic_sections): Allocate and initialize
5589 .eh_frame section for .plt.got.
5590 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
5592 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
5593 eh_frame_plt_got_size.
5594 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
5595 (PLT_GOT_FDE_LENGTH): Likewise.
5596 (elf_x86_64_backend_data): Add eh_frame_plt_got and
5597 eh_frame_plt_got_size.
5598 (elf_x86_64_arch_bed): Updated.
5599 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
5600 eh_frame_plt_got_size.
5601 (elf_x86_64_nacl_arch_bed): Likewise.
5602 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
5603 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
5604 (elf_x86_64_size_dynamic_sections): Allocate and initialize
5605 .eh_frame section for .plt.got.
5606 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
5609 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
5611 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
5612 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
5614 2017-01-09 Nick Clifton <nickc@redhat.com>
5616 * dwarf2.c (lookup_address_in_function_table): Return early if
5617 there are no functions in the given comp unit, or if the high
5618 address of the last function in the comp unit is less than the
5621 2017-01-09 Nick Clifton <nickc@redhat.com>
5624 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
5625 message if there are too many symbols to load.
5627 2017-01-04 James Clarke <jrtc27@jrtc27.com>
5629 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
5630 if relocs are cached.
5632 2017-01-03 Rich Felker <bugdal@aerifal.cx>
5635 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
5636 for R_MICROBLAZE_GOTOFF_64.
5638 2017-01-03 Nick Clifton <nickc@redhat.com>
5640 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
5641 warning about using a possibly uninitialised variable.
5643 2017-01-02 Alan Modra <amodra@gmail.com>
5645 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
5646 (allocate_plt_static, allocate_dynrelocs): Use it.
5648 2017-01-02 Alan Modra <amodra@gmail.com>
5650 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
5651 .PARISC.unwind section.
5653 2017-01-02 Alan Modra <amodra@gmail.com>
5656 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
5657 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
5658 indirect to GOT pointer relative code edit.
5660 2017-01-02 Alan Modra <amodra@gmail.com>
5662 Update year range in copyright notice of all files.
5664 For older changes see ChangeLog-2016
5666 Copyright (C) 2017 Free Software Foundation, Inc.
5668 Copying and distribution of this file, with or without modification,
5669 are permitted in any medium without royalty provided the copyright
5670 notice and this notice are preserved.
5676 version-control: never