1 2017-10-30 Alan Modra <amodra@gmail.com>
4 * elf32-hppa.c (elf32_hppa_check_relocs): Move SEC_ALLOC test to
5 ensure non_got_ref is not set due to debug references.
6 (elf32_hppa_adjust_dynamic_symbol): Tidy plabel handling. Use
7 SYMBOL_CALLS_LOCAL and UNDEFWEAK_NO_DYNAMIC_RELOC when determining
9 (allocate_dynrelocs): Similarly for got entries. Tidy code discarding
10 dynamic relocs when pic. Remove bogus code attempting to handle
12 (elf32_hppa_relocate_section): Similarly. Delete resolved_to_zero
14 (elf32_hppa_finish_dynamic_symbol): Use UNDEFWEAK_NO_DYNAMIC_RELOC
15 and SYMBOL_REFERENCES_LOCAL in GOT handling.
17 2017-10-28 Alan Modra <amodra@gmail.com>
20 * elflink.c (_bfd_elf_merge_symbol): Remove relocs_compatible check.
21 * elf32-hppa.c (elf_backend_relocs_compatible): Define.
22 * elf32-ppc.c (elf_backend_relocs_compatible): Define.
23 * elf64-ppc.c (elf_backend_relocs_compatible): Define.
25 2017-10-25 Alan Modra <amodra@gmail.com>
27 * archive.c (_bfd_compute_and_write_armap): Match "__gnu_lto_slim"
28 optionally prefixed with "_".
29 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
31 2017-10-24 Andrew Waterman <andrew@sifive.com>
33 * elfnn-riscv.c (_bfd_riscv_relax_lui): Don't relax to c.lui
36 2017-10-24 Renlin Li <renlin.li@arm.com>
39 * elflink.c (_bfd_elf_merge_symbol): Handle multiple definition case.
41 2017-10-23 Nick Clifton <nickc@redhat.com>
44 * elflink.c (elf_link_output_extsym): Keep global undefined
45 symbols if they have been marked as needed.
47 2017-10-23 Maciej W. Rozycki <macro@imgtec.com>
49 * elfn32-mips.c (mips_elf_n32_mkobject): New prototype and
51 (bfd_elf32_mkobject): Use `mips_elf_n32_mkobject' rather than
52 `_bfd_mips_elf_mkobject'.
54 2017-10-22 Hans-Peter Nilsson <hp@axis.com>
57 * config.bfd (cris-*-* | crisv32-*-*): Require a 64-bit BFD.
59 2017-10-19 Palmer Dabbelt <palmer@dabbelt.com>
61 * elfnn-riscv.c (riscv_pcgp_hi_reloc): New structure.
62 (riscv_pcgp_lo_reloc): Likewise.
63 (riscv_pcgp_relocs): Likewise.
64 (riscv_init_pcgp_relocs): New function.
65 (riscv_free_pcgp_relocs): Likewise.
66 (riscv_record_pcgp_hi_reloc): Likewise.
67 (riscv_record_pcgp_lo_reloc): Likewise.
68 (riscv_delete_pcgp_hi_reloc): Likewise.
69 (riscv_use_pcgp_hi_reloc): Likewise.
70 (riscv_record_pcgp_lo_reloc): Likewise.
71 (riscv_find_pcgp_lo_reloc): Likewise.
72 (riscv_delete_pcgp_lo_reloc): Likewise.
73 (_bfd_riscv_relax_pc): Likewise.
74 (_bfd_riscv_relax_section): Handle R_RISCV_PCREL_* relocations
75 via the new functions above.
77 2017-10-19 Palmer Dabbelt <palmer@dabbelt.com>
79 * elfnn-riscv.c (R_RISCV_DELETE): New define.
80 (_bfd_riscv_relax_delete): New function.
81 (perform_relocation): Handle R_RISCV_DELETE.
82 (_bfd_riscv_relax_section): Likewise.
84 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
87 * elfxx-tilegx.c (tilegx_elf_tls_transition): Replace
88 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
89 bfd_link_executable for TLS check.
90 (tilegx_elf_check_relocs): Likewise.
91 (allocate_dynrelocs): Likewise.
92 (tilegx_elf_relocate_section): Likewise.
94 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
97 * elf32-tilepro.c (tilepro_elf_tls_transition): Replace
98 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
99 bfd_link_executable for TLS check.
100 (tilepro_elf_check_relocs): Likewise.
101 (allocate_dynrelocs): Likewise.
102 (tilepro_elf_relocate_section): Likewise.
104 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
107 * elfxx-sparc.c (sparc_elf_tls_transition): Replace
108 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
109 bfd_link_executable for TLS check.
110 (_bfd_sparc_elf_check_relocs): Likewise.
111 (allocate_dynrelocs): Likewise.
112 (_bfd_sparc_elf_relocate_section): Likewise.
114 2017-10-18 H.J. Lu <hongjiu.lu@intel.com>
116 * elf32-tilepro.c (tilepro_elf_gc_mark_hook): Call
117 _bfd_generic_link_add_one_symbol to mark __tls_get_addr.
118 * elfxx-tilegx.c (tilegx_elf_gc_mark_hook): Likewise.
120 2017-10-17 H.J. Lu <hongjiu.lu@intel.com>
122 * elf32-microblaze.c (microblaze_elf_check_relocs): Check for
123 indirect and warning symbols.
125 2017-10-17 Alan Modra <amodra@gmail.com>
128 * elf-properties.c (_bfd_elf_parse_gnu_properties): Compare datasz
129 against size left rather than comparing pointers. Reorganise loop.
131 2017-10-17 Alan Modra <amodra@gmail.com>
134 * aoutx.h (aout_get_external_symbols): Handle stringsize of zero,
135 and error for any other size that doesn't cover the header word.
137 2017-10-16 H.J. Lu <hongjiu.lu@intel.com>
139 * elf-bfd.h (elf_backend_data): Remove gc_sweep_hook.
140 * elf32-arm.c (elf32_arm_gc_sweep_hook): Removed.
141 (elf_backend_gc_sweep_hook): Likewise.
142 * elf32-bfin.c (bfin_gc_sweep_hook): Likewise.
143 (bfinfdpic_gc_sweep_hook): Likewise.
144 (elf_backend_gc_sweep_hook): Likewise.
145 * elf32-cr16.c (elf32_cr16_gc_sweep_hook): Likewise.
146 (elf_backend_gc_sweep_hook): Likewise.
147 * elf32-cris.c (cris_elf_gc_sweep_hook): Likewise.
148 (elf_backend_gc_sweep_hook): Likewise.
149 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Likewise.
150 (elf_backend_gc_sweep_hook): Likewise.
151 * elf32-lm32.c (lm32_elf_gc_sweep_hook): Likewise.
152 (elf_backend_gc_sweep_hook): Likewise.
153 * elf32-m32r.c (m32r_elf_gc_sweep_hook): Likewise.
154 (elf_backend_gc_sweep_hook): Likewise.
155 * elf32-m68k.c (elf_m68k_got_entry): Remove elf_m68k_gc_sweep_hook
157 (elf_m68k_remove_got_entry_type): Removed.
158 (elf_m68k_find_got_entry_ptr): Likewise.
159 (elf_m68k_remove_got_entry): Likewise.
160 (elf_m68k_gc_sweep_hook): Likewise.
161 (elf_backend_gc_sweep_hook): Likewise.
162 * elf32-mcore.c (mcore_elf_gc_sweep_hook): Likewise.
163 (elf_backend_gc_sweep_hook): Likewise.
164 * elf32-metag.c (elf_metag_gc_sweep_hook): Likewise.
165 (elf_backend_gc_sweep_hook): Likewise.
166 * elf32-microblaze.c (elf_backend_gc_sweep_hook): Likewise.
167 (elf_backend_gc_sweep_hook): Likewise.
168 * elf32-mips.c (elf_backend_gc_sweep_hook): Likewise.
169 (elf_backend_gc_sweep_hook): Likewise.
170 * elf32-nds32.c (nds32_elf_gc_sweep_hook): Likewise.
171 (elf_backend_gc_sweep_hook): Likewise.
172 * elf32-nios2.c (nios2_elf32_gc_sweep_hook): Likewise.
173 (elf_backend_gc_sweep_hook): Likewise.
174 * elf32-or1k.c (or1k_elf_gc_sweep_hook): Likewise.
175 (elf_backend_gc_sweep_hook): Likewise.
176 * elf32-ppc.c (ppc_elf_gc_sweep_hook): Likewise.
177 (elf_backend_gc_sweep_hook): Likewise.
178 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
179 (elf_backend_gc_sweep_hook): Likewise.
180 * elf32-sparc.c (elf_backend_gc_sweep_hook): Likewise.
181 * elf32-tic6x.c (elf32_tic6x_gc_sweep_hook): Likewise.
182 (elf_backend_gc_sweep_hook): Likewise.
183 * elf32-tilegx.c (elf_backend_gc_sweep_hook): Likewise.
184 * elf32-tilepro.c (tilepro_elf_gc_sweep_hook): Likewise.
185 (elf_backend_gc_sweep_hook): Likewise.
186 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
187 (elf_backend_gc_sweep_hook): Likewise.
188 * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Likewise.
189 (elf_backend_gc_sweep_hook): Likewise.
190 * elf64-alpha.c (elf64_alpha_gc_sweep_hook): Likewise.
191 (elf_backend_gc_sweep_hook): Likewise.
192 * elf64-mips.c (elf_backend_gc_sweep_hook): Likewise.
193 * elf64-mmix.c (mmix_elf_gc_sweep_hook): Likewise.
194 (elf_backend_gc_sweep_hook): Likewise.
195 * elf64-ppc.c (elf_backend_gc_sweep_hook): Likewise.
196 (ppc64_elf_gc_sweep_hook): Likewise.
197 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
198 (elf_backend_gc_sweep_hook): Likewise.
199 * elf64-sparc.c (elf_backend_gc_sweep_hook): Likewise.
200 * elf64-tilegx.c (elf_backend_gc_sweep_hook): Likewise.
201 * elflink.c (elf_link_add_object_symbols): Don't call
202 _bfd_elf_link_check_relocs here.
203 (gc_sweep_hook_fn): Removed.
204 (elf_gc_sweep): Remove gc_sweep_hook.
205 * elfnn-aarch64.c (elfNN_aarch64_gc_sweep_hook): Removed.
206 (elf_backend_gc_sweep_hook): Likewise.
207 * elfnn-riscv.c (riscv_elf_gc_sweep_hook): Likewise.
208 (elf_backend_gc_sweep_hook): Likewise.
209 * elfxx-mips.c (_bfd_mips_elf_gc_sweep_hook): Likewise.
210 * elfxx-mips.h (_bfd_mips_elf_gc_sweep_hook): Likewise.
211 (elf_backend_gc_sweep_hook): Likewise.
212 * elfxx-sparc.c (_bfd_sparc_elf_gc_sweep_hook): Likewise.
213 * elfxx-sparc.h (_bfd_sparc_elf_gc_sweep_hook): Likewise.
214 * elfxx-target.h (elf_backend_gc_sweep_hook): Likewise.
215 (elfNN_bed): Remove elf_backend_gc_sweep_hook.
216 * elfxx-tilegx.c (tilegx_elf_gc_sweep_hook): Removed.
217 * elfxx-tilegx.h (tilegx_elf_gc_sweep_hook): Likewise.
219 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
221 * elf32-i386.c (elf_i386_backend_data): Removed.
222 (get_elf_i386_backend_data): Likewise.
223 (elf_i386_arch_bed): Replace elf_i386_backend_data with
224 elf_x86_backend_data.
225 (elf_i386_get_synthetic_symtab): Likewise.
226 (elf_i386_nacl_arch_bed): Likewise.
227 (elf_i386_vxworks_arch_bed): Likewise.
228 (elf_i386_relocate_section): Check target_os instead of
230 (elf_i386_finish_dynamic_symbol): Likewise.
231 (elf_i386_finish_dynamic_sections): Use htab->plt0_pad_byte.
232 Check target_os instead of is_vxworks.
233 (elf_i386_link_setup_gnu_properties): Remove normal_target and
234 is_vxworks. Initialize plt0_pad_byte.
235 * elf64-x86-64.c (elf_x86_64_backend_data); Removed.
236 (get_elf_x86_64_arch_data): Likewise.
237 (get_elf_x86_64_backend_data): Likewise.
238 (elf_x86_64_arch_bed): Replace elf_x86_64_backend_data with
239 elf_x86_backend_data.
240 (elf_x86_64_get_synthetic_symtab): Likewise.
241 (elf_x86_64_nacl_arch_bed): Likewise.
242 (elf_x86_64_link_setup_gnu_properties): Remove is_vxworks and
243 normal_target. Initialize plt0_pad_byte.
244 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Check target_os
245 instead of is_vxworks.
246 (_bfd_x86_elf_size_dynamic_sections): Likewise.
247 (_bfd_x86_elf_finish_dynamic_sections): Likewise.
248 (_bfd_x86_elf_adjust_dynamic_symbol): Likewise.
249 (_bfd_x86_elf_link_hash_table_create): Initialize target_os.
250 (_bfd_x86_elf_link_setup_gnu_properties): Remove is_vxworks.
251 Update normal_target. Set up plt0_pad_byte. Check target_os
252 instead of is_vxworks.
253 * elfxx-x86.h (elf_x86_target_os): New.
254 (elf_x86_backend_data): Likewise.
255 (get_elf_x86_backend_data): Likewise.
256 (elf_x86_link_hash_table): Remove is_vxworks. Add plt0_pad_byte
258 (elf_x86_init_table): Remove normal_target and is_vxworks. Add
261 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
263 * elf32-i386.c (elf_i386_finish_dynamic_sections): Call
264 _bfd_x86_elf_finish_dynamic_sections.
265 * elf64-x86-64.c (elf_x86_64_finish_dynamic_sections): Likewise.
266 * elfxx-x86.c (_bfd_x86_elf_finish_dynamic_sections): New
268 * elfxx-x86.h (_bfd_x86_elf_finish_dynamic_sections): New
271 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
274 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
275 hide symbol which was forced to be dynamic.
277 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
280 * elf32-cris.c (cris_elf_relocate_section): Don't generate
281 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
282 (cris_elf_check_relocs): Don't allocate dynamic relocation
283 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
285 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
288 * elf32-sh.c (allocate_dynrelocs): Discard dynamic relocations
289 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
290 (sh_elf_relocate_section): Don't generate dynamic relocation if
291 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
293 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
296 * elf32-s390.c (allocate_dynrelocs): Discard dynamic
297 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
298 (elf_s390_relocate_section): Don't generate dynamic relocation
299 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
300 * elf64-s390.c (allocate_dynrelocs): Discard dynamic
301 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
302 (elf_s390_relocate_section): Don't generate dynamic relocation
303 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
305 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
308 * elf32-nios2.c (nios2_elf32_relocate_section): Don't generate
309 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
310 (allocate_dynrelocs): Discard dynamic relocations if
311 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
313 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
316 * elf32-microblaze.c (microblaze_elf_relocate_section): Don't
317 generate dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is
319 (allocate_dynrelocs): Discard dynamic relocations if
320 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
322 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
325 * elf32-m68k.c (elf_m68k_check_relocs): Don't allocate dynamic
326 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
327 (elf_m68k_adjust_dynamic_symbol): Don't make symbol dynamic if
328 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
329 (elf_m68k_relocate_section): Don't generate dynamic relocation
330 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
332 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
335 * elf32-hppa.c (ensure_undef_dynamic): Don't make undefined
336 symbol dynamic if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
337 (allocate_dynrelocs): Discard dynamic relocations if
338 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
339 (elf32_hppa_relocate_section): Don't generate dynamic
340 relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
342 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
345 * elfnn-ia64.c (elfNN_ia64_check_relocs): Don't allocate
346 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
347 (allocate_fptr): Don't allocate function pointer if
348 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
349 (allocate_dynrel_entries): Don't allocate dynamic relocation
350 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
351 (set_got_entry): Don't set GOT entry if
352 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
353 (set_pltoff_entry): Don't set PLTOFF entry if
354 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
355 (elfNN_ia64_relocate_section): Don't install dynamic relocation
356 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
358 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
361 * elfxx-mips.c (mips_elf_calculate_relocation): Don't generate
362 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
363 (allocate_dynrelocs): Don't allocate dynamic relocations if
364 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
366 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
369 * elf32-arm.c (elf32_arm_final_link_relocate): Don't generate
370 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
371 (allocate_dynrelocs_for_symbol): Discard dynamic relocations
372 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
374 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
377 * elf32-tilepro.c (allocate_dynrelocs): Discard dynamic
378 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
379 (tilepro_elf_relocate_section): Don't generate dynamic
380 relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
381 * elfxx-tilegx.c (allocate_dynrelocs): Discard dynamic
382 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
383 (tilegx_elf_relocate_section): Don't generate dynamic
384 relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
386 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
389 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Don't
390 generate dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is
392 (elfNN_aarch64_allocate_dynrelocs): Discard dynamic relocations
393 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
395 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
397 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Moved to ...
398 * elf-bfd.h (UNDEFWEAK_NO_DYNAMIC_RELOC): Here.
399 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Removed.
401 2017-10-12 James Bowman <james.bowman@ftdichip.com>
403 * bfd-in2.h: Regenerate.
404 * libbfd.h: Regenerate.
405 * elf32-ft32.c: Add HOWTO R_FT32_15.
406 * reloc.c: Add BFD_RELOC_FT32_15.
408 2017-10-12 Nick Clifton <nickc@redhat.com>
410 * reloc.c (enum bfd_reloc_status): Start values at 2.
411 * bfd-in2.h: Regenerate.
412 * elfnn-aarch64.c (aarch64_relocate): Invert sense of function, so
413 that a TRUE return indicates success. Compare the result of
414 calling _bfd_aarch64_elf_put_addend against bfd_reloc_ok.
415 (build_one_stub): Change sense of tests against aarch64_relocate
417 (elfNN_aarch64_tls_relax): Return bfd_reloc_notsupported, rather
418 than FALSE, when an error is detected.
419 (elfNN_aarch64_final_link_relocate): Likewise.
421 2017-10-12 H.J. Lu <hongjiu.lu@intel.com>
423 * elf32-i386.c (elf_backend_hide_symbol): New.
424 * elf64-x86-64.c (elf_backend_hide_symbol): Likewise.
425 * elfxx-x86.c (_bfd_x86_elf_hide_symbol): Likewise.
426 * elfxx-x86.h (_bfd_x86_elf_hide_symbol): Likewise.
428 2017-10-12 Alan Modra <amodra@gmail.com>
430 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Call
431 elf_backend_hide_symbol, not _bfd_elf_link_hash_hide_symbol.
432 (bfd_elf_define_start_stop): Likewise.
434 2017-10-12 Alan Modra <amodra@gmail.com>
436 * elf32-nds32.c (nds32_elf_size_dynamic_sections): Set .interp
437 when executable rather than non-PIC.
438 * elf32-score.c (s3_bfd_score_elf_size_dynamic_sections): Likewise.
439 * elf32-score7.c (s7_bfd_score_elf_size_dynamic_sections): Likewise.
441 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
443 * elf-bfd.h (elf_backend_data): Add `linux_prpsinfo64_ugid16'
445 * elf-linux-core.h (elf_external_linux_prpsinfo64): Rename to...
446 (elf_external_linux_prpsinfo64_ugid32): ... this.
447 (swap_linux_prpsinfo32_out): Rename to...
448 (swap_linux_prpsinfo32_ugid32_out): ... this.
449 (elf_external_linux_prpsinfo64_ugid16): New structure.
450 (swap_linux_prpsinfo64_ugid16_out): New function.
451 * elfxx-target.h [!elf_backend_linux_prpsinfo64_ugid16]
452 (elf_backend_linux_prpsinfo64_ugid16): Define.
453 (elfNN_bed): Initialize `linux_prpsinfo64_ugid16' member.
454 * elf.c (elfcore_write_linux_prpsinfo64): Handle both variants
455 of the 64-bit Linux core PRPSINFO note.
456 * elf64-sh64.c (elf_backend_linux_prpsinfo64_ugid16): Define.
458 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
460 * elf-bfd.h (elf_backend_data): Add `linux_prpsinfo32_ugid16'
462 (elfcore_write_ppc_linux_prpsinfo32): Remove prototype.
463 * elf32-ppc.c (elfcore_write_ppc_linux_prpsinfo32): Remove.
464 (elf_external_ppc_linux_prpsinfo32)
465 (swap_ppc_linux_prpsinfo32_out): Move to...
466 * elf-linux-core.h (elf_external_linux_prpsinfo32_ugid32)
467 (swap_linux_prpsinfo32_ugid32_out): ... these.
468 (elf_external_linux_prpsinfo32): Rename to...
469 (elf_external_linux_prpsinfo32_ugid16): ... this.
470 (swap_linux_prpsinfo32_out): Rename to...
471 (swap_linux_prpsinfo32_ugid16_out): ... this.
472 * elfxx-target.h [!elf_backend_linux_prpsinfo32_ugid16]
473 (elf_backend_linux_prpsinfo32_ugid16): Define.
474 (elfNN_bed): Initialize `linux_prpsinfo32_ugid16' member.
475 * elf.c (elfcore_write_linux_prpsinfo32): Handle both variants
476 of the 32-bit Linux core PRPSINFO note.
477 * elf32-am33lin.c (elf_backend_linux_prpsinfo32_ugid16): Define.
478 * elf32-arm.c (elf_backend_linux_prpsinfo32_ugid16): Define.
479 * elf32-cris.c (elf_backend_linux_prpsinfo32_ugid16): Define.
480 * elf32-frv.c (elf_backend_linux_prpsinfo32_ugid16): Define.
481 * elf32-i386.c (elf_backend_linux_prpsinfo32_ugid16): Define.
482 * elf32-m32r.c (elf_backend_linux_prpsinfo32_ugid16): Define.
483 * elf32-m68k.c (elf_backend_linux_prpsinfo32_ugid16): Define.
484 * elf32-s390.c (elf_backend_linux_prpsinfo32_ugid16): Define.
485 * elf32-sh.c (elf_backend_linux_prpsinfo32_ugid16): Define.
486 * elf32-sparc.c (elf_backend_linux_prpsinfo32_ugid16): Define.
488 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
490 * elf-linux-core.h (elf_external_linux_prpsinfo64): Move the
491 `gap' member ahead of `pr_flag'.
493 2017-10-11 Pedro Alves <palves@redhat.com>
495 * bfd.c (_doprnt): Rename to ...
496 (_bfd_doprnt): ... this.
497 (error_handler_internal): Adjust.
499 2017-10-10 H.J. Lu <hongjiu.lu@intel.com>
501 * elf32-i386.c (elf_i386_check_relocs): Set GOT refcount to 1
502 instead of incrementing it.
503 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
505 2017-10-10 Renlin Li <renlin.li@arm.com>
508 * elf32-arm.c (allocate_dynrelocs_for_symbol): Only make undefined weak
509 symbols into dynamic.
511 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
514 * elfnn-riscv.c (riscv_elf_link_hash_table): Add max_alignment.
515 (riscv_elf_link_hash_table_create): Initialize max_alignment to
517 (_bfd_riscv_relax_section): Cache the max alignment of output
518 sections if possible.
520 2017-10-10 Alan Modra <amodra@gmail.com>
522 * elf64-ppc.c (ppc64_elf_before_check_relocs): Set sec_type for
523 .opd whenever .opd is present and non-zero size. Move code
524 setting abiversion to/from output file earlier. Only set
525 u.opd.func_sec when --gc-sections. Read relocs and set up
526 u.opd.func_sec values here..
527 (ppc64_elf_check_relocs): ..rather than here. Simplify opd
529 (ppc64_elf_edit_opd): Don't set sec_type for .opd here.
531 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
533 * elf-m10300.c (mn10300_elf_check_relocs): Don't free cached
536 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
538 * elf32-bfin.c (bfin_size_dynamic_sections): Don't create the
539 .interp section with "ld --no-dynamic-linker".
541 2017-10-09 Alan Modra <amodra@gmail.com>
544 * dwarf2.c (_bfd_dwarf2_cleanup_debug_info): Free
545 funcinfo_hash_table and varinfo_hash_table.
547 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
549 * elf32-sh.c (readonly_dynrelocs): Dump dynamic relocation
550 in read-only section with minfo.
551 (sh_elf_size_dynamic_sections): Likewise.
553 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
555 * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Remove
558 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
560 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_sections): Set
561 this_hdr.sh_entsize only if section size > 0.
563 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
565 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Reformat.
567 2017-10-07 H.J. Lu <hongjiu.lu@intel.com>
569 * elfxx-sparc.c (readonly_dynrelocs): Dump dynamic relocation
570 in read-only section with minfo.
571 (_bfd_sparc_elf_size_dynamic_sections): Likewise.
573 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
575 * elfxx-x86.h (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Update
578 2017-10-06 John Baldwin <jhb@FreeBSD.org>
580 * elf-bfd.h (struct elf_backend_data): Add
581 `elf_backend_grok_freebsd_prstatus'.
582 * elf.c (elfcore_grok_freebsd_note): Call
583 `elf_backend_grok_freebsd_prstatus' to handle NT_PRSTATUS if
585 * elfn32-mips.c (elf_n32_mips_grok_freebsd_prstatus): New
587 (elf_backend_grok_freebsd_prstatus): Define.
588 * elfxx-target.h (elf_backend_grok_freebsd_prstatus): Define.
589 (elfNN_bed): Initialize `elf_backend_grok_freebsd_prstatus'.
591 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
593 * elf32-i386.c (elf_i386_check_relocs): Replace has_got_reloc
594 and has_non_got_reloc with zero_undefweak.
595 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
596 * elfxx-x86.c (_bfd_x86_elf_link_hash_newfunc): Initialize
598 (_bfd_x86_elf_copy_indirect_symbol): Replace has_got_reloc and
599 has_non_got_reloc with zero_undefweak.
600 * elfxx-x86.h (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Replace
601 has_got_reloc and has_non_got_reloc with zero_undefweak.
602 (elf_x86_link_hash_entry): Likewise.
604 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
606 * elfxx-x86.h (COPY_INPUT_RELOC_P): Add "do/while(0);".
607 (VERIFY_COPY_RELOC): Likewise.
609 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
611 * elfxx-x86.h (VERIFY_COPY_RELOC): New.
612 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Use it.
613 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
615 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
617 * elfxx-x86.h (VERIFY_PLT_ENTRY): New.
618 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Use it.
619 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
621 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
623 * elfxx-x86.h (COPY_INPUT_RELOC_P): New.
624 * elf32-i386.c (elf_i386_relocate_section): Use it.
625 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
627 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
629 * elf32-i386.c (X86_SIZE_TYPE_P): New.
630 (elf_i386_relocate_section): Use GENERATE_DYNAMIC_RELOCATION_P.
631 * elf64-x86-64.c (X86_SIZE_TYPE_P): New.
632 (elf_x86_64_relocate_section): Use GENERATE_DYNAMIC_RELOCATION_P.
633 * elfxx-x86.h (GENERATE_DYNAMIC_RELOCATION_P): New.
635 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
637 * elfxx-x86.h (POINTER_LOCAL_IFUNC_P): New.
638 (PLT_LOCAL_IFUNC_P): Likewise.
639 * elf32-i386.c (elf_i386_relocate_section): Use them.
640 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
642 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
644 * elfxx-x86.h (GENERATE_RELATIVE_RELOC_P): New.
645 * elf32-i386.c (elf_i386_relocate_section): Use it.
646 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
648 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
650 * elfxx-x86.h (RESOLVED_LOCALLY_P): New.
651 * elf32-i386.c (elf_i386_relocate_section): Use it.
652 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
654 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
656 * elf32-i386.c (X86_PCREL_TYPE_P): New.
657 (elf_i386_check_relocs): Use NEED_DYNAMIC_RELOCATION_P.
658 * elf64-x86-64.c (IS_X86_64_PCREL_TYPE): Renamed to ...
659 (X86_PCREL_TYPE_P): This.
660 (elf_x86_64_check_relocs): Use NEED_DYNAMIC_RELOCATION_P.
661 Replace IS_X86_64_PCREL_TYPE with X86_PCREL_TYPE_P.
662 (elf_x86_64_relocate_section): Replace IS_X86_64_PCREL_TYPE with
664 * elfxx-x86.h (NEED_DYNAMIC_RELOCATION_P): New.
666 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
668 * elfxx-x86.h (TLS_TRANSITION_IE_TO_LE_P): New.
669 * elf32-i386.c (elf_i386_tls_transition): Use it.
670 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
672 2017-10-05 H.J. Lu <hongjiu.lu@intel.com>
674 * elf32-ppc.c (readonly_dynrelocs): Add a link_info argument.
675 Dump dynamic relocation in read-only section with minfo if
677 (ppc_elf_adjust_dynamic_symbol): Pass NULL to readonly_dynrelocs.
678 (maybe_set_textrel): Likewise.
679 (ppc_elf_size_dynamic_sections): Dump dynamic relocation in
680 read-only section with minfo.
682 2017-10-05 John Baldwin <jhb@FreeBSD.org>
684 * elf.c (elfcore_grok_freebsd_note): Handle NT_ARM_VFP.
686 2017-10-05 H.J. Lu <hongjiu.lu@intel.com>
688 * elf32-tilepro.c (readonly_dynrelocs): Dump dynamic relocation
689 in read-only section with minfo.
690 (tilepro_elf_size_dynamic_sections): Likewise.
691 * elfxx-tilegx.c (readonly_dynrelocs): Likewise.
692 (tilegx_elf_size_dynamic_sections): Likewise.
694 2017-10-05 Pedro Alves <palves@redhat.com>
697 * bfd.c (bfd_set_error): Revert 2017-10-04 change. Remove
698 ellipsis parameter. Split out bfd_error_on_input code to..
699 (bfd_set_input_error): .. New function.
700 * archive.c (_bfd_write_archive_contents): Use bfd_set_input_error.
701 * vms-lib.c (_bfd_vms_lib_write_archive_contents): Likewise.
702 * bfd-in2.h: Regenerate.
704 2017-10-05 Alan Modra <amodra@gmail.com>
706 * elflink.c (elf_link_input_bfd): Correct ctor/dtor in init_array/
707 fini_array error value.
709 2017-10-05 Alan Modra <amodra@gmail.com>
712 * elf.c (_bfd_elf_setup_sections): Don't trim reloc sections from
714 (_bfd_elf_init_reloc_shdr): Pass sec_hdr, use it to copy SHF_GROUP
716 (elf_fake_sections): Adjust calls. Exit immediately on failure.
717 (bfd_elf_set_group_contents): Add associated reloc section indices
720 2017-10-04 Alan Modra <amodra@gmail.com>
722 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't sort or
723 classify symbols for ELFv2.
725 2017-10-04 Pavel I. Kryukov <kryukov@frtk.ru>
728 * bfd.c (bfd_set_error): Avoid UB on passing arg to va_start that
729 undergoes default promotion.
730 * bfd-in2.h: Regenerate.
732 2017-10-02 Alan Modra <amodra@gmail.com>
734 * elf32-ppc.c (ppc_elf_relocate_section): Fix comment typo.
735 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
737 2017-10-01 Alan Modra <amodra@gmail.com>
740 * dwarf2.c (new_line_sorts_after): Remove end_sequence comparison.
741 (add_line_info): Always put end_sequence last.
743 2017-10-01 Alan Modra <amodra@gmail.com>
746 * dwarf2.c (read_section): Allocate buffer with extra byte for
747 bfd_simple_get_relocated_section_contents rather than copying
750 2017-09-29 Alan Modra <amodra@gmail.com>
752 * merge.c (merge_strings): Return FALSE on malloc failure.
753 (_bfd_merge_sections): Return failures from record_section and
756 2017-09-28 Alan Modra <amodra@gmail.com>
759 * elflink.c (_bfd_elf_merge_symbol): Set non_ir_ref_dynamic in
760 a case where plugin_notice isn't called.
762 2017-09-27 Kuan-Lin Chen <kuanlinchentw@gmail.com>
764 * elf32-nds32.c (nds32_elf_relax_section): Fix a tautological
767 2017-09-26 H.J. Lu <hongjiu.lu@intel.com>
770 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't pass
771 output_bfd to info->callbacks->minfo.
773 2017-09-26 Nick Clifton <nickc@redhat.com>
776 * elf64-x86-64.c (elf_x86_64_info_to_howto): Do not trigger an
777 assertion failure if elf_x86_64_rtype_to_howto has already issued
780 2017-09-26 Alan Modra <amodra@gmail.com>
783 * dwarf2.c (read_formatted_entries): Use read_attribute_value to
786 2017-09-26 Nick Clifton <nickc@redhat.com>
789 * dwarf2.c (read_formatted_entries): Fail early if we know that
790 the loop parsing data entries will overflow the end of the
793 2017-09-26 Alan Modra <amodra@gmail.com>
796 * dwarf2.c (struct comp_unit): Delete sec_info_ptr field.
797 (find_abstract_instance_name): Calculate DW_FORM_ref_addr relative
798 to stash->info_ptr_memory, and check die_ref is within that memory.
799 Set info_ptr_end correctly when another CU is refd. Check die_ref
800 for DW_FORM_ref4 etc. is within CU.
802 2017-09-26 Alan Modra <amodra@gmail.com>
805 * dwarf2.c (concat_filename): Return "<unknown>" on NULL filename.
806 (read_formatted_entries): Init "fe".
807 (decode_line_info <DW_LNE_define_file>): Use line_info_add_file_name.
809 2017-09-26 Alan Modra <amodra@gmail.com>
812 * dwarf2.c (decode_line_info): Ensure line_ptr stays within
813 bounds in inner loop.
815 2017-09-25 Alan Modra <amodra@gmail.com>
818 * dwarf1.c (parse_die): Sanity check pointer against section limit
819 before dereferencing.
820 (parse_line_table): Likewise.
822 2017-09-25 Alan Modra <amodra@gmail.com>
825 * dwarf2.c (scan_unit_for_symbols): Ignore DW_AT_name unless it
827 (parse_comp_unit): Likewise.
829 2017-09-25 Alan Modra <amodra@gmail.com>
832 * dwarf2.c (read_formatted_entries): Error on format_count zero.
834 2017-09-24 Alan Modra <amodra@gmail.com>
837 * opncls.c (bfd_get_debug_link_info_1): Properly check that crc is
838 within section bounds.
840 2017-09-24 Alan Modra <amodra@gmail.com>
843 * dwarf2.c (decode_line_info): Properly free line sequences on error.
845 2017-09-24 Alan Modra <amodra@gmail.com>
848 * dwarf2.c (find_abstract_instance_name): Add orig_info_ptr and
849 pname param. Return status. Make name const. Don't abort,
850 return an error. Formatting. Exit if current info_ptr matches
851 orig_info_ptr. Update callers.
852 (scan_unit_for_symbols): Start at nesting_level of zero. Make
853 nested_funcs an array of structs for extensibility. Formatting.
855 2017-09-24 Alan Modra <amodra@gmail.com>
858 * dwarf2.c (decode_line_info): Fail on lh.line_range of zero
859 rather than dividing by zero.
861 2017-09-24 Alan Modra <amodra@gmail.com>
864 * dwarf2.c (decode_line_info): Correct .debug_line unit_length check.
866 2017-09-24 Alan Modra <amodra@gmail.com>
869 * dwarf2.c (scan_unit_for_symbols): Check u.blk->data is non-NULL.
871 2017-09-24 Alan Modra <amodra@gmail.com>
874 * elf.c (_bfd_elf_slurp_version_tables): Test sh_info on
875 SHT_GNU_verneed section for sanity. Don't zalloc memory for
878 2017-09-22 H.J. Lu <hongjiu.lu@intel.com>
881 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Guard against
884 2017-09-22 H.J. Lu <hongjiu.lu@intel.com>
887 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Also return
888 -1 if bfd_canonicalize_dynamic_reloc returns 0.
890 2017-09-22 Pedro Alves <palves@redhat.com>
891 Alan Modra <amodra@gmail.com>
893 * version.h: Add comment.
895 2017-09-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
897 * elf.c (elfcore_grok_note): For the cases NT_S390_GS_CB and
898 NT_S390_GS_BC, correct the previously swapped invocations of
899 elfcore_grok_s390_gs_bc and elfcore_grok_s390_gs_cb.
901 2017-09-19 Alan Modra <amodra@gmail.com>
904 * elf64-ppc.c (ppc64_elf_build_stubs): Don't check glink_eh_frame
907 2017-09-19 Alan Modra <amodra@gmail.com>
910 * elflink.c (bfd_elf_size_dynamic_sections): Garbage collect
911 symbols before calculating verrefs. Don't renumber dynsyms
912 after gc. Exclude .gnu.version when zero or one dynsym.
913 Localize some vars and reindent.
915 2017-09-18 H.J. Lu <hongjiu.lu@intel.com>
918 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Check error
919 return from bfd_canonicalize_dynamic_reloc.
921 2017-09-15 Alan Modra <amodra@gmail.com>
924 * archive.c (bfd_ar_hdr_from_filesystem): Detect when status.st_size
925 overflows bfd_size_type.
927 2017-09-14 H.J. Lu <hongjiu.lu@intel.com>
930 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument
931 to indicate if conversion is performed.
932 (elf_i386_check_relocs): Cache section contents and relocations
933 if conversion is performed.
934 * elf64-x86-64.c (elf_x86_64_check_relocs): Cache section
935 contents and relocations if conversion is performed.
937 2017-09-14 Nick Clifton <nickc@redhat.com>
940 * peXXigen.c (pe_print_idata): Extend check for HintName vector
943 2017-09-13 H.J. Lu <hongjiu.lu@intel.com>
945 * elfxx-x86.h: Fix a typo in comments.
947 2017-09-09 Kamil Rytarowski <n54@gmx.com>
949 * elf32-nds32.c: Rename __BIT() to N32_BIT().
951 2017-09-09 Alan Modra <amodra@gmail.com>
953 * elf64-ppp.c (plt_stub_pad): Handle positive and negative
956 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
958 * elf32-i386.c (elf_i386_relocate_section): Update usage of
959 UNDEFINED_WEAK_RESOLVED_TO_ZERO.
960 (elf_i386_finish_dynamic_symbol): Likewise.
961 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
962 (elf_x86_64_finish_dynamic_symbol): Likewise.
963 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Likewise.
964 (_bfd_x86_elf_fixup_symbol): Likewise.
966 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
968 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
969 check has_non_got_reloc.
971 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
974 * elf32-i386.c (elf_i386_convert_load_reloc): Check linker_def.
975 Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
976 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Check
977 linker_def. Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
978 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Set local_ref
979 and linker_def on __ehdr_start if it is referenced and not
981 (_bfd_x86_elf_link_symbol_references_local): Also set local_ref
982 and return TRUE when building executable, if a symbol has
983 non-GOT/non-PLT relocations in text section or there is no
985 * elfxx-x86.h (elf_x86_link_hash_entry): Add linker_def.
987 2017-09-08 H.J. Lu <hongjiu.lu@intel.com>
989 * elfxx-x86.h: Update comments.
991 2017-09-08 H.J. Lu <hongjiu.lu@intel.com>
993 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Replace
994 elf_x86_plt_layout_table with elf_x86_init_table.
995 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
997 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties):
999 * elfxx-x86.h (elf_x86_plt_layout_table): Renamed to ...
1000 (elf_x86_init_table): This.
1001 (_bfd_x86_elf_link_setup_gnu_properties): Replace
1002 elf_x86_plt_layout_table with elf_x86_init_table.
1004 2017-09-07 H.J. Lu <hongjiu.lu@intel.com>
1006 * configure.ac (bfd_backends): Don't add elf64-x86-64.lo nor
1007 elf64.lo together with elfxx-x86.lo for 64-bit BFD.
1008 * configure: Regenerated.
1009 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set r_info
1010 and r_sym fields of plt_layout.
1011 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
1013 * elfxx-x86.c (elf_x86_64_is_reloc_section): Remove BFD64 check.
1014 (_bfd_x86_elf_link_hash_table_create): Likewise. Don't set
1015 r_info nor r_sym fields.
1016 (_bfd_x86_elf_link_setup_gnu_properties): Set r_info and r_sym
1018 * elfxx-x86.h (elf_x86_plt_layout_table): Add r_info and r_sym.
1020 2017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
1022 * (_bfd_riscv_relax_align): Call bfd_set_error and
1023 print an error message when unable to relax a .align directive.
1025 2017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
1027 * elfnn-riscv.c (riscv_zero_pcrel_hi_reloc): New function.
1028 (riscv_record_pcrel_hi_reloc): Add absolute argument.
1029 (riscv_elf_relocate_section): Call riscv_zero_pcrel_hi_reloc for
1030 R_RISCV_PCREL_HI20 relocs, and pass the result to
1031 riscv_record_pcrel_hi_reloc.
1033 2017-09-07 H.J. Lu <hongjiu.lu@intel.com>
1035 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument,
1036 r_type_p. Remove the converted argument. Replace
1037 SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P. Return
1038 the new relocation type via r_type_p.
1039 (elf_i386_relocate_section): Likewise.
1040 (elf_i386_finish_dynamic_symbol): Likewise.
1041 (need_convert_load): Removed.
1042 (check_relocs_failed): Updated.
1043 (elf_i386_check_relocs): Call elf_i386_convert_load_reloc,
1044 instead of setting need_convert_load.
1045 (_bfd_i386_elf_convert_load): Removed.
1046 * elf64-x86-64.c (need_convert_load): Removed.
1047 (check_relocs_failed): Updated.
1048 (elf_x86_64_convert_load_reloc): Add an argument, r_type_p.
1049 Replace SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P.
1050 Return the new relocation type via r_type_p.
1051 (elf_x86_64_check_relocs): Call elf_x86_64_convert_load_reloc,
1052 instead of setting need_convert_load.
1053 (elf_x86_64_check_relocs): Don't check PIC if relocation has
1055 (_bfd_x86_64_elf_convert_load): Removed.
1056 (elf_x86_64_relocate_section): Replace SYMBOL_REFERENCES_LOCAL
1057 with SYMBOL_REFERENCES_LOCAL_P.
1058 (elf_x86_64_finish_dynamic_symbol): Likewise.
1059 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Don't
1061 (_bfd_x86_elf_size_dynamic_sections): Don't call convert_load.
1062 (_bfd_x86_elf_link_symbol_references_local): New function.
1063 * elfxx-x86.h (SYMBOL_REFERENCES_LOCAL_P): New.
1064 (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Replace elf.forced_local with
1065 SYMBOL_REFERENCES_LOCAL_P.
1066 (elf_x86_link_hash_entry): Add local_ref.
1067 (elf_x86_link_hash_table): Remove convert_load.
1068 (_bfd_i386_elf_convert_load): Removed.
1069 (_bfd_x86_64_elf_convert_load): Likewise.
1070 (_bfd_x86_elf_link_symbol_references_local): New.
1072 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
1074 * elf64-x86-64.c (R_X86_64_converted_reloc_bit): New.
1075 (elf_x86_64_info_to_howto): Get the real relocation type by
1076 masking out R_X86_64_converted_reloc_bit.
1077 (elf_x86_64_check_tls_transition): Get the real relocation type
1078 by masking out R_X86_64_converted_reloc_bit.
1079 (elf_x86_64_convert_load_reloc): Set R_X86_64_converted_reloc_bit
1080 instead of setting converted_reloc.
1081 (elf_x86_64_relocate_section): Check R_X86_64_converted_reloc_bit
1082 instead of converted_reloc. Get the real relocation type by
1083 masking out R_X86_64_converted_reloc_bit.
1084 (elf_x86_64_link_setup_gnu_properties): Verify that the value of
1085 R_X86_64_converted_reloc_bit is valid.
1086 * elfxx-x86.h (converted_reloc): Removed.
1088 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
1090 * elf32-i386.c (elf_i386_relocate_section): Don't change r_type
1091 when calling elf_i386_tls_transition. Don't use ELF32_R_TYPE
1092 to get the relocation type again.
1093 * elf64-x86-64.c (elf_x86_64_relocate_section): Don't change
1094 r_type when calling elf_x86_64_tls_transition. Don't use
1095 ELF32_R_TYPE to get the relocation type again.
1097 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
1099 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Properly set
1102 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
1104 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Remove the sec
1105 argument. Don't check relocation overflow. Avoid relocation
1106 overflow if --no-relax is used. Set converted_reloc on symbol
1107 if a GOTPCREL relocation is converted.
1108 (elf_x86_64_relocate_section): Issue a fatal error and suggest
1109 --no-relax if GOTPCREL relocation conversion leads to relocation
1111 * elfxx-x86.h (elf_x86_link_hash_entry): Add converted_reloc.
1113 2017-09-05 Alexander Fedotov <alexander.fedotov@nxp.com>
1114 Edmar Wienskoski <edmar.wienskoski@nxp.com
1116 * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_VLE_ADDR20.
1117 (ppc_elf_check_relocs): Handle it.
1118 (ppc_elf_vle_split20): New function.
1119 (ppc_elf_relocate_section): Handle R_PPC_VLE_ADDR20.
1121 2017-09-03 H.J. Lu <hongjiu.lu@intel.com>
1124 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Set tlsdesc_plt
1125 for x86-64 if GOT_TLS_GDESC_P is true.
1127 2017-09-03 Alan Modra <amodra@gmail.com>
1130 * elfxx-x86.h (elf_x86_hash_table): Check is_elf_hash_table first.
1132 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1134 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1135 tls_get_addr for x86-64 in one place.
1137 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1139 * configure.ac (bfd_backends): Add elf64-x86-64.lo together
1140 with elfxx-x86.lo for 64-bit BFD.
1141 * configure: Regenerated.
1143 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1145 * elf32-i386.c (elf_i386_convert_load): Renamed to ...
1146 (_bfd_i386_elf_convert_load): This. Remove static.
1147 (elf_i386_size_dynamic_sections): Removed.
1148 (elf_backend_size_dynamic_sections): Likewise.
1149 * elf64-x86-64.c (elf_x86_64_convert_load): Renamed to ...
1150 (_bfd_x86_64_elf_convert_load): This. Remove static.
1151 (elf_x86_64_size_dynamic_sections): Removed.
1152 (elf_backend_size_dynamic_sections): Likewise.
1153 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): Renamed to ...
1154 (elf_x86_allocate_dynrelocs): This. Make it static.
1155 (_bfd_x86_elf_allocate_local_dynrelocs): Renamed to ...
1156 (elf_x86_allocate_local_dynreloc): This. Make it static.
1157 (elf_i386_is_reloc_section): New function.
1158 (elf_x86_64_is_reloc_section): Likewise.
1159 (_bfd_x86_elf_link_hash_table_create): Initialize convert_load,
1160 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
1161 Rearrange got_entry_size initialization.
1162 (_bfd_x86_elf_size_dynamic_sections): New function.
1163 * elfxx-x86.h (elf_x86_link_hash_table): Add convert_load,
1164 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
1165 (_bfd_i386_elf_convert_load): New.
1166 (_bfd_x86_64_elf_convert_load): Likewise.
1167 (_bfd_x86_elf_size_dynamic_sections): Likewise.
1168 (elf_backend_size_dynamic_sections): Likewise.
1169 (_bfd_x86_elf_allocate_dynrelocs): Removed.
1170 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
1172 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1174 * elfxx-x86.h (elf_x86_link_hash_table): Rearrange fields and
1177 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1179 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
1180 sgotplt_jump_table_size with elf_x86_compute_jump_table_size.
1182 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1184 * elf32-i386.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
1185 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Moved to ...
1186 * elfxx-x86.h (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
1187 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Here.
1188 * elf64-x86-64.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
1189 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Removed.
1191 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1193 * elf32-i386.c (elf_i386_allocate_dynrelocs): Removed.
1194 (elf_i386_allocate_local_dynrelocs): Likewise.
1195 (elf_i386_size_dynamic_sections): Replace
1196 elf_i386_allocate_dynrelocs/elf_i386_allocate_local_dynrelocs
1197 with _bfd_x86_elf_allocate_dynrelocs and
1198 _bfd_x86_elf_allocate_local_dynrelocs.
1199 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Removed.
1200 (elf_x86_64_allocate_local_dynrelocs): Likewise.
1201 (elf_x86_64_size_dynamic_sections): Replace
1202 elf_x86_64_allocate_dynrelocs/elf_x86_64_allocate_local_dynrelocs
1203 with _bfd_x86_elf_allocate_dynrelocs and
1204 _bfd_x86_elf_allocate_local_dynrelocs.
1205 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): New function.
1206 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
1207 * elfxx-x86.h (_bfd_x86_elf_allocate_dynrelocs): New prototype.
1208 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
1210 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1212 * elf32-i386.c (is_i386_elf): Removed.
1213 (elf_i386_check_relocs): Replace is_i386_elf with is_x86_elf.
1214 (elf_i386_size_dynamic_sections): Likewise.
1215 (elf_i386_relocate_section): Likewise.
1216 * elf64-x86-64.c (is_x86_64_elf): Removed.
1217 (elf_x86_64_check_relocs): Replace is_x86_64_elf with
1219 (elf_x86_64_size_dynamic_sections): Likewise.
1220 (elf_x86_64_relocate_section): Likewise.
1221 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1223 * elfxx-x86.h (elf_x86_link_hash_table): Add target_id.
1226 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1228 * elf32-i386.c (elf_i386_compute_jump_table_size): Removed.
1229 (elf_i386_allocate_dynrelocs): Replace
1230 elf_i386_compute_jump_table_size with
1231 elf_x86_compute_jump_table_size.
1232 (elf_i386_size_dynamic_sections): Likewise.
1233 * elf64-x86-64.c (elf_x86_64_compute_jump_table_size): Removed.
1234 (elf_x86_64_allocate_dynrelocs): Replace
1235 elf_x86_64_compute_jump_table_size with
1236 elf_x86_compute_jump_table_size.
1237 (elf_x86_64_size_dynamic_sections): Likewise.
1238 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1240 * elfxx-x86.h (elf_x86_link_hash_table): Add got_entry_size.
1241 (elf_x86_compute_jump_table_size): New.
1243 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1245 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1247 (_bfd_x86_elf_adjust_dynamic_symbol): Use sizeof_reloc.
1248 * elfxx-x86.h (elf_x86_link_hash_table): Add sizeof_reloc.
1250 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1252 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check VxWorks
1253 with htab->is_vxworks.
1254 (elf_i386_size_dynamic_sections): Likewise.
1255 (elf_i386_relocate_section): Likewise.
1256 (elf_i386_finish_dynamic_symbol): Likewise.
1257 (elf_i386_finish_dynamic_sections): Likewise.
1259 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1261 * elf32-i386.c (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
1262 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
1263 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Moved to ...
1264 * elfxx-x86.h (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
1265 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
1266 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Here.
1267 * elf64-x86-64.c (GOT_TLS_IE, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
1268 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Removed.
1270 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1273 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Check
1274 ELF_COMMON_DEF_P for common symbols.
1276 2017-09-02 Alan Modra <amodra@gmail.com>
1278 * elf-eh-frame.c (offset_adjust): Avoid false positive gcc warning.
1279 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Likewise.
1280 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
1282 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1284 * elf32-i386.c (elf_i386_gc_mark_hook): Removed.
1285 (elf_backend_gc_mark_hook): Likewise.
1286 * elf64-x86-64.c (elf_x86_64_gc_mark_hook): Likewise.
1287 (elf_backend_gc_mark_hook): Likewise.
1288 * elfxx-x86.c (_bfd_x86_elf_gc_mark_hook): New function.
1289 * elfxx-x86.h (_bfd_x86_elf_gc_mark_hook): New.
1290 (elf_backend_gc_mark_hook): Likewise.
1292 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1294 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Removed.
1295 (elf_backend_adjust_dynamic_symbol): Likewise.
1296 * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise.
1297 (elf_backend_adjust_dynamic_symbol): Likewise.
1298 * elfxx-x86.c (_bfd_x86_elf_adjust_dynamic_symbol): New function.
1299 (_bfd_x86_elf_link_setup_gnu_properties): Copy is_vxworks.
1300 * elfxx-x86.h (elf_x86_link_hash_table): Add is_vxworks.
1301 (_bfd_x86_elf_adjust_dynamic_symbol): New.
1302 (elf_backend_adjust_dynamic_symbol): Likewise.
1304 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1306 * elfxx-x86.h (elf_x86_plt_layout_table): Fix a typo in
1309 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1311 * elf32-i386.c (elf_i386_mkobject): Removed.
1312 (bfd_elf32_mkobject): Likewise.
1313 * elf64-x86-64.c (elf_x86_64_mkobject): Likewise.
1314 (bfd_elf64_mkobject): Likewise.
1315 (bfd_elf32_mkobject): Likewise.
1316 * elfxx-x86.c (_bfd_x86_elf_mkobject): New function.
1317 * elfxx-x86.h (_bfd_x86_elf_mkobject): New.
1318 (bfd_elf64_mkobject): Likewise.
1319 (bfd_elf32_mkobject): Likewise.
1321 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1323 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Updated.
1324 Call _bfd_x86_elf_link_setup_gnu_properties.
1325 * elf64-x86-64.c (elf_x86_lazy_plt_layout): Initialize
1326 pic_plt0_entry and pic_plt_entry fields with the non-PIC PLT
1328 (elf_x86_64_non_lazy_plt): Likewise.
1329 (elf_x86_64_lazy_bnd_plt): Likewise.
1330 (elf_x86_64_non_lazy_bnd_plt): Likewise.
1331 (elf_x86_64_lazy_ibt_plt): Likewise.
1332 (elf_x32_lazy_ibt_plt): Likewise.
1333 (elf_x86_64_non_lazy_ibt_plt): Likewise.
1334 (elf_x32_non_lazy_ibt_plt): Likewise.
1335 (elf_x86_64_nacl_plt): Likewise.
1336 (elf_x86_64_link_setup_gnu_properties): Updated. Call
1337 _bfd_x86_elf_link_setup_gnu_properties.
1338 * elfxx-x86.c: Include elf-vxworks.h".
1339 (_bfd_x86_elf_link_setup_gnu_properties): New function.
1340 * elfxx-x86.h (elf_x86_lazy_plt_layout): Remove "for i386 only"
1341 comments for pic_plt0_entry and pic_plt_entry.
1342 (elf_x86_non_lazy_plt_layout): Likewise.
1343 (elf_x86_plt_layout_table): New.
1344 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
1346 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1349 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Create
1350 .eh_frame section for the second PLT.
1351 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Correct
1352 alignment of .eh_frame section for the second PLT.
1354 2017-09-01 Nick Clifton <nickc@redhat.com>
1357 * dwarf2.c (decode_line_info): Fix test for an overlong line info
1360 2017-09-01 Nick Clifton <nickc@redhat.com>
1363 * elf-attrs.c (_bfd_elf_parse_attributes): Ensure that the
1364 attribute buffer is NUL terminated.
1366 2017-08-31 Nick Clifton <nickc@redhat.com>
1369 * dwarf2.c (read_section): If necessary add a terminating NUL byte
1370 to dwarf string sections.
1372 2017-08-31 Alan Modra <amodra@gmail.com>
1374 * po/SRC-POTFILES.in: Regenerate.
1376 2017-08-31 Alan Modra <amodra@gmail.com>
1378 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Don't exit early
1379 for a section containing just a terminator. Allow multiple
1380 terminators at end of section.
1381 * elflink.c (bfd_elf_discard_info): Iterate over .eh_frame
1382 sections when not adding alignment. Assert on terminator in
1385 2017-08-31 Alan Modra <amodra@gmail.com>
1389 * elflink.c (bfd_elf_discard_info): Don't pad embedded zero
1392 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1394 * configure.ac (bfd_backends): Add elf64.lo together with
1395 elfxx-x86.lo for 64-bit BFD.
1396 * configure: Regenerated.
1398 2017-08-31 James Bowman <james.bowman@ftdichip.com>
1400 * elf32-ft32.c (ft32_elf_howto_table): Use complain_overflow_dont
1403 2017-08-31 Alan Modra <amodra@gmail.com>
1406 * opncls.c (bfd_close_all_done): Don't call bfd_cache_close
1407 before _close_and_cleanup. Call iovec->bclose after.
1408 (bfd_close): Remove code common to, and call, bfd_close_all_done.
1410 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1412 * elf32-i386.c (elf_i386_plt_type): Removed.
1413 (elf_i386_plt): Likewise.
1414 (elf_i386_get_synthetic_symtab): Updated. Call
1415 _bfd_x86_elf_get_synthetic_symtab.
1416 * elf64-x86-64.c (elf_x86_64_plt_type): Removed.
1417 (elf_x86_64_plt): Likewise.
1418 (elf_x86_64_get_synthetic_symtab): Updated. Call
1419 _bfd_x86_elf_get_synthetic_symtab.
1420 * elfxx-x86.c (elf_i386_get_plt_got_vma): New function.
1421 (elf_x86_64_get_plt_got_vma): Likewise.
1422 (elf_i386_valid_plt_reloc_p): Likewise.
1423 (elf_x86_64_valid_plt_reloc_p): Likewise.
1424 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
1425 * elfxx-x86.h (elf_x86_plt_type): New.
1426 (elf_x86_plt): Likewise.
1427 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
1429 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1431 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Check
1432 target_id instead of elf_machine_code.
1434 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1436 * elf32-i386.c (ELF_DYNAMIC_INTERPRETER): Removed.
1437 (elf_i386_lazy_plt_layout): Likewise.
1438 (elf_i386_non_lazy_plt_layout): Likewise.
1439 (elf_i386_plt_layout): Likewise.
1440 (elf_i386_link_hash_table): Likewise.
1441 (elf_i386_next_tls_desc_index): Likewise.
1442 (elf_i386_srelplt2): Likewise.
1443 (elf_i386_plt): Likewise.
1444 (elf_i386_lazy_plt): Likewise.
1445 (elf_i386_non_lazy_plt): Likewise.
1446 (elf_i386_link_hash_table_create): Likewise.
1447 (bfd_elf32_bfd_link_hash_table_create): Likewise.
1448 (elf_i386_lazy_plt): Updated.
1449 (elf_i386_non_lazy_plt): Likewise.
1450 (elf_i386_lazy_ibt_plt): Likewise.
1451 (elf_i386_non_lazy_ibt_plt): Likewise.
1452 (elf_i386_allocate_dynrelocs): Likewise.
1453 (elf_i386_size_dynamic_sections): Likewise.
1454 (elf_i386_relocate_section): Likewise.
1455 (elf_i386_finish_dynamic_symbol): Likewise.
1456 (elf_i386_finish_dynamic_sections): Likewise.
1457 (elf_i386_get_synthetic_symtab): Likewise.
1458 (elf_i386_link_setup_gnu_properties): Likewise.
1459 (elf_i386_nacl_plt): Likewise.
1460 * elf64-x86-64.c (ABI_64_P): Removed.
1461 (ELF64_DYNAMIC_INTERPRETER): Likewise.
1462 (ELF32_DYNAMIC_INTERPRETER): Likewise.
1463 (elf_x86_64_lazy_plt_layout): Likewise.
1464 (elf_x86_64_non_lazy_plt_layout): Likewise.
1465 (elf_x86_64_plt_layout): Likewise.
1466 (elf_x86_64_link_hash_table): Likewise.
1467 (elf_x86_64_plt): Likewise.
1468 (elf_x86_64_lazy_plt): Likewise.
1469 (elf_x86_64_non_lazy_plt): Likewise.
1470 (elf_x86_64_link_hash_table_create): Likewise.
1471 (bfd_elf64_bfd_link_hash_table_create): Likewise.
1472 (bfd_elf32_bfd_link_hash_table_create): Likewise.
1473 (elf_x86_64_lazy_plt): Updated.
1474 (elf_x86_64_non_lazy_plt): Likewise.
1475 (elf_x86_64_lazy_bnd_plt): Likewise.
1476 (elf_x86_64_non_lazy_bnd_plt): Likewise.
1477 (elf_x86_64_lazy_ibt_plt): Likewise.
1478 (elf_x32_lazy_ibt_plt): Likewise.
1479 (elf_x86_64_non_lazy_ibt_plt): Likewise.
1480 (elf_x32_non_lazy_ibt_plt): Likewise.
1481 (elf_x86_64_allocate_dynrelocs): Likewise.
1482 (elf_x86_64_size_dynamic_sections): Likewise.
1483 (elf_x86_64_relocate_section): Likewise.
1484 (elf_x86_64_finish_dynamic_symbol): Likewise.
1485 (elf_x86_64_finish_dynamic_sections): Likewise.
1486 (elf_x86_64_get_synthetic_symtab): Likewise.
1487 (elf_x86_64_link_setup_gnu_properties): Likewise.
1488 (elf_x86_64_nacl_plt): Likewise.
1489 * elfxx-x86.c: Include "objalloc.h", "elf/i386.h" and
1491 (ELF32_DYNAMIC_INTERPRETER): New.
1492 (ELF64_DYNAMIC_INTERPRETER): Likewise.
1493 (ELFX32_DYNAMIC_INTERPRETER): Likewise.
1494 (_bfd_x86_elf_link_hash_table_create): Likewise.
1495 (_bfd_x86_elf_link_hash_table_free): Renamed to ...
1496 (elf_x86_link_hash_table_free): This. Make it static.
1497 * elfxx-x86.h: Don't include "objalloc.h".
1499 (elf_x86_lazy_plt_layout): Likewise.
1500 (elf_x86_non_lazy_plt_layout): Likewise.
1501 (elf_x86_plt_layout): Likewise.
1502 (_bfd_x86_elf_link_hash_table_create): Likewise.
1503 (bfd_elf64_bfd_link_hash_table_create): Likewise.
1504 (bfd_elf32_bfd_link_hash_table_create): Likewise.
1505 (elf_x86_link_hash_table): Add plt, lazy_plt, non_lazy_plt,
1506 srelplt2 and next_tls_desc_index.
1507 (_bfd_x86_elf_link_hash_table_free): Removed.
1509 2017-08-30 Maciej W. Rozycki <macro@imgtec.com>
1511 * elfxx-mips.c (mips_elf_perform_relocation): Correct microMIPS
1512 branch offset interpretation.
1514 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1517 * opncls.c (bfd_close_all_done): Call _close_and_cleanup.
1519 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1521 * elf64-x86-64.c (elf_x86_64_next_tls_desc_index): Removed.
1522 (elf_x86_64_srelplt2): Likewise.
1524 2017-08-30 Alan Modra <amodra@gmail.com>
1526 * elf64-ppc.c (struct ppc_link_hash_table): Add do_tls_opt.
1527 (ppc64_elf_tls_optimize): Set it.
1528 (ppc64_elf_relocate_section): Nop addis on TPREL16_HA, and convert
1529 insn on TPREL16_LO and TPREL16_LO_DS relocs to use r13 when
1530 addis would add zero.
1531 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add do_tls_opt.
1532 (ppc_elf_tls_optimize): Set it.
1533 (ppc_elf_relocate_section): Nop addis on TPREL16_HA, and convert
1534 insn on TPREL16_LO relocs to use r2 when addis would add zero.
1536 2017-08-30 Alan Modra <amodra@gmail.com>
1538 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing
1539 __tls_get_addr call sequences to LE, don't move the addi down
1540 to the nop. Replace the bl with addi and leave the nop alone.
1542 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1544 * elf32-i386.c (elf_i386_pie_finish_undefweak_symbol):
1546 * elf64-x86-64.c (elf_x86_64_finish_local_dynamic_symbol):
1548 (elf_x86_64_pie_finish_undefweak_symbol): Likewise.
1550 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1552 * Makefile.am (BFD32_BACKENDS): Add elfxx-x86.lo.
1553 (BFD64_BACKENDS): Likewise.
1554 (BFD32_BACKENDS_CFILES): Add elfxx-x86.c.
1555 (BFD64_BACKENDS_CFILES): Likewise.
1556 * Makefile.in: Regenerated.
1557 * configure.ac (bfd_backends): Add elfxx-x86.lo together with
1558 elf32-i386.lo and elf64-x86-64.lo.
1559 * configure: Regenerated.
1560 * elf32-i386.c: Include "elfxx-x86.h" instead of "sysdep.h",
1561 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
1562 "objalloc.h" and "hashtab.h".
1563 (ELIMINATE_COPY_RELOCS): Removed.
1564 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
1565 (SYMBOL_NO_COPYRELOC): Likewise.
1566 (elf_i386_link_hash_entry): Likewise.
1567 (GOT_UNKNOWN): Likewise.
1568 (GOT_NORMAL): Likewise.
1569 (GOT_TLS_GD): Likewise.
1570 (elf_i386_hash_entry): Likewise.
1571 (elf_i386_obj_tdata): Likewise.
1572 (elf_i386_tdata): Likewise.
1573 (elf_i386_local_got_tls_type): Likewise.
1574 (elf_i386_local_tlsdesc_gotent): Likewise.
1575 (elf_i386_hash_table): Likewise.
1576 (elf_i386_link_hash_newfunc): Likewise.
1577 (elf_i386_local_htab_hash): Likewise.
1578 (elf_i386_local_htab_eq): Likewise.
1579 (elf_i386_get_local_sym_hash): Likewise.
1580 (elf_i386_link_hash_table_free): Likewise.
1581 (elf_i386_copy_indirect_symbol): Likewise.
1582 (elf_i386_fixup_symbol): Likewise.
1583 (elf_i386_readonly_dynrelocs): Likewise.
1584 (elf_i386_always_size_sections): Likewise.
1585 (elf_i386_set_tls_module_base): Likewise.
1586 (elf_i386_dtpoff_base): Likewise.
1587 (compare_relocs): Likewise.
1588 (elf_i386_hash_symbol): Likewise.
1589 (elf_i386_parse_gnu_properties): Likewise.
1590 (elf_i386_merge_gnu_properties): Likewise.
1591 (elf_i386_link_check_relocs): Likewise.
1592 (elf_i386_merge_symbol_attribute): Likewise.
1593 (bfd_elf32_bfd_link_check_relocs): Likewise.
1594 (elf_backend_copy_indirect_symbol): Likewise.
1595 (elf_backend_always_size_sections): Likewise.
1596 (elf_backend_omit_section_dynsym): Likewise.
1597 (elf_backend_hash_symbol): Likewise.
1598 (elf_backend_fixup_symbol): Likewise.
1599 (elf_backend_parse_gnu_properties): Likewise.
1600 (elf_backend_merge_gnu_properties): Likewise.
1601 (elf_backend_merge_symbol_attribute): Likewise.
1602 (elf_i386_mkobject): Updated.
1603 (elf_i386_link_hash_table_create): Likewise.
1604 (elf_i386_check_tls_transition): Likewise.
1605 (elf_i386_tls_transition): Likewise.
1606 (elf_i386_convert_load_reloc): Likewise.
1607 (elf_i386_check_relocs): Likewise.
1608 (elf_i386_adjust_dynamic_symbol): Likewise.
1609 (elf_i386_allocate_dynrelocs): Likewise.
1610 (elf_i386_convert_load): Likewise.
1611 (elf_i386_size_dynamic_sections): Likewise.
1612 (elf_i386_relocate_section): Likewise.
1613 (elf_i386_finish_dynamic_symbol ): Likewise.
1614 (elf_i386_finish_dynamic_sections): Likewise.
1615 (elf_i386_output_arch_local_syms): Likewise.
1616 (elf_i386_get_synthetic_symtab): Likewise.
1617 (elf_i386_link_setup_gnu_properties): Likewise.
1618 (elf_i386_link_hash_table): Use elf_x86_link_hash_table, instead
1619 of elf_link_hash_table, as base.
1620 (elf_i386_next_tls_desc_index): New.
1621 (elf_i386_srelplt2): Likewise.
1622 (elf_i386_plt): Likewise.
1623 (elf_i386_lazy_plt): Likewise.
1624 (elf_i386_non_lazy_plt): Likewise.
1625 * elf32-x86-64.c: Include "elfxx-x86.h" instead of "sysdep.h",
1626 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
1627 "objalloc.h" and "hashtab.h".
1628 (ELIMINATE_COPY_RELOCS): Removed.
1629 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
1630 (SYMBOL_NO_COPYRELOC): Likewise.
1631 (elf_x86_64_link_hash_entry): Likewise.
1632 (GOT_UNKNOWN): Likewise.
1633 (GOT_NORMAL): Likewise.
1634 (GOT_TLS_GD): Likewise.
1635 (elf_x86_64_hash_entry): Likewise.
1636 (elf_x86_64_obj_tdata): Likewise.
1637 (elf_x86_64_tdata): Likewise.
1638 (elf_x86_64_local_got_tls_type): Likewise.
1639 (elf_x86_64_local_tlsdesc_gotent): Likewise.
1640 (elf_x86_64_hash_table): Likewise.
1641 (elf_x86_64_link_hash_newfunc): Likewise.
1642 (elf_x86_64_local_htab_hash): Likewise.
1643 (elf_x86_64_local_htab_eq): Likewise.
1644 (elf_x86_64_get_local_sym_hash): Likewise.
1645 (elf_x86_64_link_hash_table_free): Likewise.
1646 (elf_x86_64_copy_indirect_symbol): Likewise.
1647 (elf_x86_64_fixup_symbol): Likewise.
1648 (elf_x86_64_readonly_dynrelocs): Likewise.
1649 (elf_x86_64_always_size_sections): Likewise.
1650 (elf_x86_64_set_tls_module_base): Likewise.
1651 (elf_x86_64_dtpoff_base): Likewise.
1652 (compare_relocs): Likewise.
1653 (elf_x86_64_merge_symbol_attribute): Likewise.
1654 (elf_x86_64_hash_symbol): Likewise.
1655 (elf_x86_64_parse_gnu_properties): Likewise.
1656 (elf_x86_64_merge_gnu_properties): Likewise.
1657 (elf_x86_64_link_check_relocs): Likewise.
1658 (elf_backend_copy_indirect_symbol): Likewise.
1659 (elf_backend_always_size_sections): Likewise.
1660 (bfd_elf64_bfd_link_check_relocs): Likewise.
1661 (elf_backend_merge_symbol_attribute): Likewise.
1662 (elf_backend_hash_symbol): Likewise.
1663 (elf_backend_omit_section_dynsym): Likewise.
1664 (elf_backend_fixup_symbol): Likewise.
1665 (elf_backend_parse_gnu_properties): Likewise.
1666 (elf_backend_merge_gnu_properties): Likewise.
1667 (bfd_elf32_bfd_link_check_relocs): Likewise.
1668 (elf_x86_64_mkobject): Updated.
1669 (elf_x86_64_link_hash_table_create): Likewise.
1670 (elf_x86_64_check_tls_transition): Likewise.
1671 (elf_x86_64_tls_transition): Likewise.
1672 (elf_x86_64_convert_load_reloc): Likewise.
1673 (elf_x86_64_check_relocs): Likewise.
1674 (elf_x86_64_adjust_dynamic_symbol): Likewise.
1675 (elf_x86_64_allocate_dynrelocs): Likewise.
1676 (elf_x86_64_convert_load): Likewise.
1677 (elf_x86_64_size_dynamic_sections): Likewise.
1678 (elf_x86_64_relocate_section): Likewise.
1679 (elf_x86_64_finish_dynamic_symbol ): Likewise.
1680 (elf_x86_64_finish_dynamic_sections): Likewise.
1681 (elf_x86_64_output_arch_local_syms): Likewise.
1682 (elf_x86_64_get_synthetic_symtab): Likewise.
1683 (elf_x86_64_link_setup_gnu_properties): Likewise.
1684 (elf_x86_64_link_hash_table): Use elf_x86_link_hash_table,
1685 instead of elf_link_hash_table, as base.
1686 (elf_x86_64_next_tls_desc_index): New.
1687 (elf_x86_64_srelplt2): Likewise.
1688 (elf_x86_64_plt): Likewise.
1689 (elf_x86_64_lazy_plt): Likewise.
1690 (elf_x86_64_non_lazy_plt): Likewise.
1691 * elfxx-x86.c: New file.
1692 * elfxx-x86.h: Likewise.
1694 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1696 * elf32-i386.c (elf_i386_get_synthetic_symtab): Simplify bad
1698 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1700 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1702 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check valid PLT
1703 sections before checking dynamic relocations and free invalid
1704 PLT section contents.
1705 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1707 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
1709 * elf-bfd.h (_bfd_elf_ifunc_get_synthetic_symtab): Removed.
1710 * elf-ifunc.c (_bfd_elf_ifunc_get_synthetic_symtab): Likewise.
1712 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
1715 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check for valid
1717 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1719 2017-08-27 H.J. Lu <hongjiu.lu@intel.com>
1721 * elf32-i386.c (elf_i386_link_hash_newfunc): Initialize
1723 * elf64-x86-64.c (elf_x86_64_link_hash_newfunc): Likewise.
1725 2017-08-26 H.J. Lu <hongjiu.lu@intel.com>
1728 * elf-bfd.h (elf_obj_tdata): Use ENUM_BITFIELD on object_id,
1729 dyn_lib_class and has_gnu_symbols. Change bad_symtab to bitfield.
1730 Add a has_no_copy_on_protected bitfield.
1731 (elf_has_no_copy_on_protected): New.
1732 * elf-properties.c (_bfd_elf_parse_gnu_properties): Set
1733 elf_has_no_copy_on_protected for GNU_PROPERTY_NO_COPY_ON_PROTECTED.
1734 (elf_merge_gnu_property_list): Likewise.
1735 (_bfd_elf_link_setup_gnu_properties): Set extern_protected_data
1736 to FALSE for elf_has_no_copy_on_protected.
1737 * elf32-i386.c (SYMBOL_NO_COPYRELOC): New.
1738 (elf_i386_link_hash_entry): Add def_protected.
1739 (elf_i386_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
1740 when checking info->nocopyreloc.
1741 (elf_i386_link_setup_gnu_properties): Don't set
1742 extern_protected_data here.
1743 (elf_i386_merge_symbol_attribute): New function.
1744 (elf_backend_merge_symbol_attribute): New.
1745 * elf64-x86-64.c (SYMBOL_NO_COPYRELOC): New.
1746 (elf_x86_64_link_hash_entry): Add def_protected.
1747 (elf_x86_64_need_pic): Report protected symbol for def_protected.
1748 (elf_x86_64_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
1749 when checking info->nocopyreloc.
1750 (elf_x86_64_relocate_section): Also check for R_X86_64_PC32
1751 relocation run-time overflow and unresolvable R_X86_64_32S
1752 relocation against protected data symbol defined in shared object
1753 with GNU_PROPERTY_NO_COPY_ON_PROTECTED.
1754 (elf_x86_64_link_setup_gnu_properties): Don't set
1755 extern_protected_data here.
1756 (elf_x86_64_merge_symbol_attribute): New function.
1757 (elf_backend_merge_symbol_attribute): New.
1759 2017-08-26 Alan Modra <amodra@gmail.com>
1761 * elf32-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
1762 (ppc_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
1763 (ppc_elf_relocate_section): Comment fix.
1764 * elf64-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
1765 (ppc64_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
1766 Support dynamic relocs for TPREL16 when non-pic too.
1767 (dec_dynrel_count): Adjust TPREL16 handling as per check_relocs.
1768 (ppc64_elf_relocate_section): Support dynamic relocs for TPREL16
1771 2017-08-25 H.J. Lu <hongjiu.lu@intel.com>
1773 * elf32-i386.c (elf_i386_link_hash_entry): Remove redundant
1774 "symbol" in comments.
1775 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Likewise.
1777 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
1780 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for
1781 R_X86_64_PC32 relocation run-time overflow and unresolvable
1782 R_X86_64_32S relocation with -z nocopyreloc.
1784 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
1786 * elf32-i386.c (elf_i386_check_relocs): Revert the last change.
1787 Undefined symbols may not have a type.
1788 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1790 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1792 * elf64-x86-64.c (elf_x86_64_need_pic): Add an argument for
1793 bfd_link_info. Report shared, PIE or PDE object based on
1795 (elf_x86_64_check_relocs): Update elf_x86_64_need_pic call.
1796 (elf_x86_64_relocate_section): Likewise.
1798 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1800 * elf32-i386.c (elf_i386_check_relocs): Increment PLT count only
1801 for function symbols.
1802 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1804 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1806 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set
1807 extern_protected_data to FALSE if GNU_PROPERTY_NO_COPY_ON_PROTECTED
1808 is set on any input relocatable file.
1809 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
1811 2017-08-23 Alan Modra <amodra@gmail.com>
1814 * elf64-ppc.c (ensure_undef_dynamic): Rename from
1815 ensure_undefweak_dynamic. Handle undefined too.
1816 * elf32-ppc.c (ensure_undef_dynamic): Likewise.
1817 * elf32-hppa.c (ensure_undef_dynamic): Likewise.
1818 (allocate_dynrelocs): Discard undefined non-default visibility
1819 relocs first. Make undefined syms dynamic. Tidy goto.
1821 2017-08-21 Alan Modra <amodra@gmail.com>
1822 H.J. Lu <hongjiu.lu@intel.com>
1825 * elf-bfd.h (SYMBOLIC_BIND): Return TRUE for __start/__stop symbols.
1826 * elflink.c (bfd_elf_define_start_stop): Rewrite.
1828 2017-08-21 Hans-Peter Nilsson <hp@bitrange.com>
1831 * elf64-mmix.c (mmix_elf_relax_section): Correct handling of
1832 undefined weak symbols.
1834 2017-08-18 Nick Clifton <nickc@redhat.com>
1837 * tekhex.c (getsym): Fix check for source pointer walking off the
1838 end of the input buffer.
1840 2017-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
1843 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Skip IFUNC
1844 relocations in debug sections, change abort to _bfd_error_handler.
1846 2017-08-14 Nick Clifton <nickc@redhat.com>
1849 * elf.c (setup_group): Check for an empty or very small group
1851 * po/bfd.pot: Regenerate.
1853 2017-08-14 Alan Modra <amodra@gmail.com>
1856 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't add
1857 alignment padding here.
1858 * elflink.c (bfd_elf_discard_info): Add .eh_frame padding here
1859 in a reverse pass over sections.
1861 2017-08-11 H.J. Lu <hongjiu.lu@intel.com>
1864 * elf32-i386.c (elf_i386_get_synthetic_symtab): Allocate space
1865 for @plt suffixes first.
1866 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1868 2017-08-08 Nick Clifton <nickc@redhat.com>
1871 * elf-attrs.c (_bfd_elf_parse_attributes): Complain about very
1872 small section lengths.
1873 * elf.c (_bfd_elf_setup_sections): Skip empty entries in the group
1875 (elfcore_grok_freebsd_prstatus): Add checks to make sure that
1876 there is enough data present in the note.
1878 2017-08-08 Alan Modra <amodra@gmail.com>
1881 * elf32-microblaze.c (microblaze_elf_check_relocs): Don't bump
1882 got.refcount for GOTOFF relocs, just create .got section.
1884 2017-08-07 H.J. Lu <hongjiu.lu@intel.com>
1886 * elflink.c (elf_link_add_object_symbols): Move common symbol
1887 check after bed->common_definition.
1889 2017-08-07 Alan Modra <amodra@gmail.com>
1892 * elflink.c (bfd_elf_final_link): Don't segfault when sections
1893 needed to define various dynamic tags have been discarded.
1895 2017-08-07 Nick Clifton <nickc@redhat.com>
1898 * elf32-i386.c (elf_i386_link_setup_gnu_properties): If the dynobj
1899 has not been set then use the bfd returned by
1900 _bfd_elf_link_setup_gnu_properties. If that is null then search
1901 through all the input bfds selecting the first normal, ELF format
1903 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
1905 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
1907 * elf32-i386.c (elf_i386_link_hash_entry): Change tls_get_addr
1909 (elf_i386_link_hash_newfunc): Initialize tls_get_addr to 0.
1910 (elf_i386_check_tls_transition): Check tls_get_addr directly.
1911 (elf_i386_convert_load_reloc): Update tls_get_addr check.
1912 (elf_i386_link_check_relocs): New function.
1913 (bfd_elf32_bfd_link_check_relocs): New.
1914 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Change tls_get_addr
1916 (elf_x86_64_link_hash_newfunc): Initialize tls_get_addr to 0.
1917 (elf_x86_64_check_tls_transition): Check tls_get_addr directly.
1918 (elf_x86_64_convert_load_reloc): Update tls_get_addr check.
1919 (elf_x86_64_link_check_relocs): New function.
1920 (bfd_elf64_bfd_link_check_relocs): New.
1921 (bfd_elf32_bfd_link_check_relocs): Likewise.
1923 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
1926 * elflink.c (elf_link_add_object_symbols): Treat common symbol
1927 as undefined for --no-define-common.
1929 2017-08-05 Alan Modra <amodra@gmail.com>
1931 * elf32-hppa.c (elf32_hppa_set_gp): Don't require an
1932 hppa_link_hash_table.
1934 2017-08-02 Max Filippov <jcmvbkbc@gmail.com>
1936 * xtensa-isa.c (xtensa_isa_init): Don't update lookup table
1937 entries for sysregs with negative indices.
1939 2017-08-01 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1941 * elf32-s390.c (elf_s390_finish_dynamic_sections): Skip if it
1942 isn't the S/390 specific elf data.
1943 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
1945 2017-07-31 Kuan-Lin Chen <rufus@andestech.com>
1947 * elfxx-riscv.c (riscv_elf_add_sub_reloc): New function.
1948 * (howto_table) [R_RISCV_ADD8]: Use riscv_elf_add_sub_reloc.
1949 [R_RISCV_ADD16]: Likewise.
1950 [R_RISCV_ADD32]: Likewise.
1951 [R_RISCV_ADD64]: Likewise.
1952 [R_RISCV_SUB6]: Likewise.
1953 [R_RISCV_SUB8]: Likewise.
1954 [R_RISCV_SUB16]: Likewise.
1955 [R_RISCV_SUB32]: Likewise.
1956 [R_RISCV_SUB64]: Likewise.
1958 2017-07-31 Alan Modra <amodra@gmail.com>
1960 * elf64-ppc.c (ppc64_elf_tls_setup): Warn on --plt-localentry
1961 without ld.so checks.
1963 2017-07-29 Alan Modra <amodra@gmail.com>
1966 * elf64-ppc.c (struct ppc_link_hash_entry): Add non_zero_localentry.
1967 (ppc64_elf_merge_symbol): Set non_zero_localentry.
1968 (is_elfv2_localentry0): Test non_zero_localentry.
1969 (ppc64_elf_tls_setup): Default to --no-plt-localentry.
1971 2017-07-28 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1973 * elf32-s390.c (elf_s390_finish_dynamic_sections): Add NULL
1974 pointer check for htab->elf.irelplt.
1975 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
1977 2017-07-27 Nick Clifton <nickc@redhat.com>
1980 * mach-o.c (bfd_mach_o_read_symtab_strtab): Fail if the symtab
1982 * nlmcode.h (nlm_swap_auxiliary_headers_in): Replace assertion
1984 * section.c (bfd_make_section_with_flags): Fail if the name or bfd
1986 * vms-alpha.c (bfd_make_section_with_flags): Correct computation
1988 (evax_bfd_print_emh): Check for invalid string lengths.
1990 2017-07-25 Nick Clifton <nickc@redhat.com>
1992 * po/fr.po: Updated French translation.
1994 2017-07-25 Benjamin Green <bengreen5mx@gmail.com>
1997 * elf32-msp430.c (msp430_elf_relax_section): Allow conversion of
1998 16-bit absolute branches into 10-bit pc-relative branches on the
1999 MSP430 as well as the MSP430X.
2001 2017-07-25 Alan Modra <amodra@gmail.com>
2003 * elf64-ppc.c (struct map_stub): Add tls_get_addr_opt_bctrl.
2004 (stub_eh_frame_size): New function.
2005 (ppc_size_one_stub): Set group tls_get_addr_opt_bctrl.
2006 (group_sections): Init group tls_get_addr_opt_bctrl.
2007 (ppc64_elf_size_stubs): Update sizing and initialization of
2008 .eh_frame. Iteration over stubs via group list.
2009 (ppc64_elf_build_stubs): Iterate over stubs via group list.
2010 (ppc64_elf_finish_dynamic_sections): Update finalization of
2013 2017-07-24 Nick Clifton <nickc@redhat.com>
2016 * mach-o.c (bfd_mach_o_canonicalize_relocs): Pass the base address
2017 of the relocs to the canonicalize_one_reloc routine.
2018 * mach-o.h (struct bfd_mach_o_backend_data): Update the prototype
2019 for the _bfd_mach_o_canonicalize_one_reloc field.
2020 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add
2021 res_base parameter. Use to check for corrupt pair relocs.
2022 * mach-o-aarch64.c (bfd_mach_o_arm64_canonicalize_one_reloc):
2024 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc):
2026 * mach-o-x86-64.c (bfd_mach_o_x86_64_canonicalize_one_reloc):
2029 * vms-alpha.c (_bfd_vms_slurp_eihd): Make sure that there is
2030 enough data in the record before attempting to parse it.
2031 (_bfd_vms_slurp_eeom): Likewise.
2033 (_bfd_vms_slurp_egsd): Check for an invalid section index.
2034 (image_set_ptr): Likewise.
2035 (alpha_vms_slurp_relocs): Likewise.
2037 (alpha_vms_object_p): Check for a truncated record.
2039 2017-07-24 Nick Clifton <nickc@redhat.com>
2042 * reloc.c (_bfd_unrecognized_reloc): New function. Reports
2043 an unrecognized reloc and sets the bfd_error value.
2044 * libbfd.h: Regenerate.
2045 * elf32-arm.c (elf32_arm_final_link_relocate): Use the new
2047 * elf32-i386.c (elf_i386_relocate_section): Likewise.
2048 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
2049 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
2050 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise.
2051 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
2053 2017-07-23 Alan Modra <amodra@gmail.com>
2055 * elf64-ppc.c (ppc64_elf_size_stubs): Correct advance to
2058 2017-07-19 Szabolcs Nagy <szabolcs.nagy@arm.com>
2061 * elfnn-aarch64.c (elfNN_aarch64_reloc_type_class): Return
2062 reloc_class_ifunc for ifunc symbols.
2064 2017-07-19 Nick Clifton <nickc@redhat.com>
2067 * archive.c (bfd_generic_archive_p): If the bfd does not have the
2068 correct magic bytes at the start, set the error to wrong format
2069 and clear the format selector before returning NULL.
2071 2017-07-19 Nick Clifton <nickc@redhat.com>
2074 * coff-rs6000.c (_bfd_strntol): New function.
2075 (_bfd_strntoll): New function.
2076 (GET_VALUE_IN_FIELD): New macro.
2077 (EQ_VALUE_IN_FIELD): new macro.
2078 (_bfd_xcoff_slurp_armap): Use new macros.
2079 (_bfd_xcoff_archive_p): Likewise.
2080 (_bfd_xcoff_read_ar_hdr): Likewise.
2081 (_bfd_xcoff_openr_next_archived_file): Likewise.
2082 (_bfd_xcoff_stat_arch_elt): Likewise.
2083 * coff64-rs6000.c (_bfd_strntol): New function.
2084 (_bfd_strntoll): New function.
2085 (GET_VALUE_IN_FIELD): New macro.
2086 (xcoff64_slurp_armap): Use new macros.
2088 2017-07-19 Claudiu Zissulescu <claziss@synopsys.com>
2089 John Eric Martin <John.Martin@emmicro-us.com>
2091 * bfd-in2.h: Regenerate.
2092 * libbfd.h: Regenerate.
2093 * elf32-arc.c (JLI): Define.
2094 * reloc.c: Add JLI relocations.
2096 2017-07-18 Nick Clifton <nickc@redhat.com>
2099 * coff-sh.c: Fix spelling typos.
2100 * compress.c: Likewise.
2101 * cpu-pdp11.c: Likewise.
2102 * ecofflink.c: Likewise.
2103 * elf-m10300.c: Likewise.
2105 * elf32-arm.c: Likewise.
2106 * elf32-m68k.c: Likewise.
2107 * elf32-nds32.c: Likewise.
2108 * elf32-ppc.c: Likewise.
2109 * elf32-sh.c: Likewise.
2110 * elf32-v850.c: Likewise.
2111 * elf64-ppc.c: Likewise.
2112 * elf64-x86-64.c: Likewise.
2113 * elflink.c: Likewise.
2114 * elfnn-aarch64.c: Likewise.
2115 * elfxx-mips.c: Likewise.
2117 * sunos.c: Likewise.
2118 * vms-alpha.c: Likewise.
2119 * xcofflink.c: Likewise.
2121 2017-07-18 Nick Clifton <nickc@redhat.com>
2124 * coffcode.h (handle_COMDAT): Replace abort with an error message
2127 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
2130 * elf64-x86-64.c (elf_x86_64_relocate_section): Limit PIC check
2133 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
2135 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
2137 2017-07-16 Alan Modra <amodra@gmail.com>
2139 * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimize
2140 __tls_index GOT entries when using __tls_get_addr_opt stub.
2141 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2143 2017-07-12 Alan Modra <amodra@gmail.com>
2145 * po/es.po: Update from translationproject.org/latest/bfd/.
2146 * po/fi.po: Likewise.
2147 * po/fr.po: Likewise.
2148 * po/id.po: Likewise.
2149 * po/ja.po: Likewise.
2150 * po/ro.po: Likewise.
2151 * po/ru.po: Likewise.
2152 * po/sr.po: Likewise.
2153 * po/sv.po: Likewise.
2154 * po/tr.po: Likewise.
2155 * po/uk.po: Likewise.
2156 * po/vi.po: Likewise.
2157 * po/zh_CN.po: Likewise.
2158 * po/hr.po: New file from translationproject.org.
2159 * configure.ac (ALL_LINGUAS): Add hr. Sort.
2160 * configure: Regenerate.
2162 2017-07-12 Nick Clifton <nickc@redhat.com>
2164 Fix compile time warnings using gcc 7.1.1.
2165 * elf32-xtensa.c (elf_xtensa_get_plt_section): Increase length of
2167 (elf_xtensa_get_gotplt_section): Increase length of got_name
2169 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add a
2170 default return of FALSE.
2171 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc): Add a
2172 default return of FALSE.
2174 2017-07-12 Alan Modra <amodra@gmail.com>
2176 * binary.c (binary_set_section_contents): Don't print filepos in
2178 (coff_write_object_contents): Cast size_t for error message.
2179 (coff_slurp_line_table): Don't use bfd_vma symndx.
2180 (coff_slurp_reloc_table): Remove unneeded cast.
2181 * dwarf2.c (read_section): Cast bfd_int64_t to long long for
2183 (find_abstract_instance_name): Likewise.
2184 * elf32-arm.c (arm_type_of_stub): Correct error arg order.
2185 (bfd_elf32_arm_stm32l4xx_erratum_scan): Don't cast error arg.
2186 (elf32_arm_check_relocs): Make r_symndx an int.
2187 * elf32-cris.c (cris_elf_check_relocs): Delete extraneous %s in
2189 * elf32-metag.c (elf_metag_relocate_section): Delete extra error
2191 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Rewrite bogus
2193 * elf32-i386.c (elf_i386_check_relocs): Make r_symndx an int.
2194 * elf32-s390.c (elf_s390_check_relocs): Likewise.
2195 * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
2196 * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
2197 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
2198 * elf64-s390.c (elf_s390_check_relocs): Likewise.
2199 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
2200 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Likewise.
2201 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
2202 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
2203 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
2204 * elf64-mmix.c (_bfd_mmix_after_linker_allocation): Cast size_t args
2205 and use %lu for error message.
2206 * elflink.c (elf_link_adjust_relocs): Delete extra error message arg.
2207 * mmo.c (mmo_scan): Make stab_loc a file_ptr. Cast expression for
2210 * elf32-arm.c (elf32_arm_tls_relax): Correct format string and args
2212 (elf32_arm_final_link_relocate): Likewise.
2213 * coff-arm.c (bfd_arm_process_before_allocation): Likewise.
2214 * coffcode.h (styp_to_sec_flags): Likewise.
2215 * cofflink.c (_bfd_coff_write_global_sym): Likewise.
2216 * ecoff.c (_bfd_ecoff_slurp_symbol_table): Likewise.
2217 * elf32-arc.c (arc_elf_merge_private_bfd_data): Likewise.
2218 * elf32-bfin.c (bfinfdpic_check_relocs): Likewise.
2219 (elf32_bfin_merge_private_bfd_data): Likewise.
2220 * elf32-cris.c (cris_elf_relocate_section): Likewise.
2221 * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
2222 * elf32-i370.c (i370_elf_merge_private_bfd_data): Likewise.
2223 (i370_elf_relocate_section): Likewise.
2224 * elf32-iq2000.c (iq2000_elf_merge_private_bfd_data): Likewise.
2225 * elf32-m32c.c (m32c_elf_merge_private_bfd_data): Likewise.
2226 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise.
2227 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
2228 * elf32-mep.c (mep_elf_merge_private_bfd_data): Likewise.
2229 * elf32-mt.c (mt_elf_merge_private_bfd_data): Likewise.
2230 * elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.
2231 * elfxx-mips.c (mips_elf_merge_obj_e_flags): Likewise.
2232 (_bfd_mips_elf_merge_private_bfd_data): Likewise.
2233 * ieee.c (ieee_write_id, read_id): Likewise.
2234 * mach-o.c (bfd_mach_o_write_contents): Likewise.
2235 (bfd_mach_o_layout_commands, bfd_mach_o_read_section_32): Likewise.
2236 (bfd_mach_o_read_section_64, bfd_mach_o_read_symtab_symbol): Likewise.
2237 (bfd_mach_o_read_command, bfd_mach_o_header_p): Likewise.
2238 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Likewise.
2239 * stabs.c (_bfd_link_section_stabs): Likewise.
2241 * coff-arm.c (coff_arm_relocate_section): Use L modifier in error
2243 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
2244 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
2245 * coff-rs6000.c (xcoff_reloc_type_toc): Likewise.
2246 * coff-sh.c (sh_relax_section): Likewise.
2247 (sh_relax_delete_bytes, sh_swap_insns): Likewise.
2248 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
2249 * coffcode.h (coff_slurp_reloc_table): Likewise.
2250 * coffgen.c (_bfd_coff_get_external_symbols): Likewise.
2251 (_bfd_coff_read_string_table): Likewise.
2252 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
2253 * compress.c (bfd_get_full_section_contents): Likewise.
2254 * dwarf2.c (read_formatted_entries, decode_line_info): Likewise.
2255 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
2256 * elf.c (bfd_elf_string_from_elf_section): Likewise.
2257 * elf32-arc.c (arc_special_overflow_checks): Likewise.
2258 * elf32-arm.c (elf32_arm_tls_relax): Likewise.
2259 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Likewise.
2260 (elf32_arm_write_section): Likewise.
2261 * elf32-bfin.c (bfin_relocate_section): Likewise.
2262 (bfinfdpic_relocate_section): Likewise.
2263 * elf32-hppa.c (hppa_build_one_stub): Likewise.
2264 (final_link_relocate, elf32_hppa_relocate_section): Likewise.
2265 * elf32-i386.c (elf_i386_tls_transition): Likewise.
2266 (elf_i386_relocate_section): Likewise.
2267 * elf32-ip2k.c (ip2k_final_link_relocate): Likewise.
2268 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise.
2269 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
2270 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
2271 * elf32-metag.c (elf_metag_relocate_section): Likewise.
2272 * elf32-nds32.c (unrecognized_reloc_msg): Likewise.
2273 (nds32_elf_relax_longcall1, nds32_elf_relax_longcall2): Likewise.
2274 (nds32_elf_relax_longcall3, nds32_elf_relax_longjump1): Likewise.
2275 (nds32_elf_relax_longjump2, nds32_elf_relax_longjump3): Likewise.
2276 (nds32_elf_relax_longcall4, nds32_elf_relax_longcall5): Likewise.
2277 (nds32_elf_relax_longcall6, nds32_elf_relax_longjump4): Likewise.
2278 (nds32_elf_relax_longjump5, nds32_elf_relax_longjump6): Likewise.
2279 (nds32_elf_relax_longjump7, nds32_elf_relax_loadstore): Likewise.
2280 (nds32_elf_relax_ptr, nds32_elf_ex9_build_hash_table): Likewise.
2281 * elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
2282 * elf32-rx.c (UNSAFE_FOR_PID): Likewise.
2283 * elf32-s390.c (invalid_tls_insn, elf_s390_relocate_section): Likewise.
2284 * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
2285 * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
2286 * elf32-sh.c (sh_elf_relax_section): Likewise.
2287 (sh_elf_relax_delete_bytes, sh_elf_swap_insns): Likewise.
2288 (sh_elf_relocate_section): Likewise.
2289 * elf32-sh64.c (shmedia_prepare_reloc): Likewise.
2290 * elf32-spu.c (spu_elf_relocate_section): Likewise.
2291 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
2292 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
2293 * elf32-v850.c (v850_elf_relax_section): Likewise.
2294 * elf32-vax.c (elf_vax_check_relocs): Likewise.
2295 (elf_vax_relocate_section): Likewise.
2296 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
2297 (extend_ebb_bounds_forward, extend_ebb_bounds_backward): Likewise.
2298 (compute_text_actions, compute_ebb_proposed_actions): Likewise.
2299 (do_fix_for_relocatable_link): Likewise.
2300 * elf64-alpha.c (elf64_alpha_relax_got_load): Likewise.
2301 (elf64_alpha_relax_with_lituse): Likewise.
2302 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Likewise.
2303 (elf_hppa_final_link_relocate): Likewise.
2304 * elf64-ia64-vms.c (elf64_ia64_relax_section): Likewise.
2305 (elf64_ia64_choose_gp, elf64_ia64_relocate_section): Likewise.
2306 (elf64_vms_link_add_object_symbols): Likewise.
2307 * elf64-mmix.c (mmix_elf_perform_relocation): Likewise.
2308 (mmix_final_link_relocate): Likewise.
2309 * elf64-s390.c (invalid_tls_insn): Likewise.
2310 (elf_s390_relocate_section): Likewise.
2311 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
2312 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
2313 (elf_x86_64_relocate_section): Likewise.
2314 * elfcode.h (elf_slurp_symbol_table): Likewise.
2315 * elfcore.h (elf_core_file_p): Likewise.
2316 * elflink.c (elf_link_read_relocs_from_section): Likewise.
2317 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
2318 (elfNN_aarch64_relocate_section): Likewise.
2319 * elfnn-ia64.c (elfNN_ia64_relax_section): Likewise.
2320 (elfNN_ia64_choose_gp, elfNN_ia64_relocate_section): Likewise.
2321 * elfnn-riscv.c (riscv_elf_relocate_section): Likewise.
2322 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
2323 (_bfd_mips_elf_relocate_section): Likewise.
2324 (_bfd_mips_elf_finish_dynamic_symbol, mips_finish_exec_plt): Likewise.
2325 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
2326 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
2327 * ieee.c (ieee_slurp_external_symbols): Likewise.
2328 * ihex.c (ihex_write_object_content): Likewise.
2329 * mach-o.c (bfd_mach_o_build_exec_seg_command): Likewise.
2330 * merge.c (_bfd_merged_section_offset): Likewise.
2331 * mmo.c (mmo_write_loc_chunk): Likewise.
2332 (mmo_write_object_contents): Likewise.
2333 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Likewise.
2334 * stabs.c (_bfd_link_section_stabs): Likewise.
2335 * xcofflink.c (xcoff_link_add_symbols, xcoff_find_tc0): Likewise.
2337 2017-07-11 Alan Modra <amodra@gmail.com>
2339 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo.
2341 2017-07-11 Alan Modra <amodra@gmail.com>
2343 * elf32-ppc.c (ppc_elf_relocate_section): Emit "unexpected
2344 instruction" error using _bfd_error_handler, not einfo.
2346 2017-07-10 Nick Clifton <nickc@redhat.com>
2348 * coffcode.h (coff_slurp_symbol_table): Do not include an entry
2349 for C_AIX_WEAKEXT if it has the same value as C_WEAKEXT.
2351 2017-07-07 John Baldwin <jhb@FreeBSD.org>
2353 * elf.c (elfcore_grok_freebsd_note): Handle NT_FREEBSD_PTLWPINFO.
2355 2017-07-07 Alan Modra <amodra@gmail.com>
2357 * coffcode.h (coff_slurp_symbol_table): Handle C_AIX_WEAKEXT.
2359 2017-07-07 Alan Modra <amodra@gmail.com>
2361 * bfd.c (_doprnt): Replace "L" with "ll" when printing bfd_vma
2362 as long long. Move code replacing "ll" with "I64", and simplify.
2364 2017-07-06 H.J. Lu <hongjiu.lu@intel.com>
2366 * bfd.c (_doprnt): Convert 'L' to 'l' when setting wide_width
2369 2017-07-05 H.J. Lu <hongjiu.lu@intel.com>
2371 * dwarf2.c (line_info_add_include_dir_stub): Replace time with
2373 (line_info_add_file_name): Likewise.
2374 (decode_line_info): Likewise.
2376 2017-07-04 Tristan Gingold <gingold@adacore.com>
2378 * version.m4: Bump version to 2.29.51
2379 * configure: Regenerate.
2381 2017-07-04 Jiong Wang <jiong.wang@arm.com>
2383 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Remove the
2384 sanity check at the head of this function.
2386 2017-07-04 Jan Kratochvil <jan.kratochvil@redhat.com>
2388 * dwarf2.c (struct dwarf2_debug): Add fields dwarf_line_str_buffer and
2389 dwarf_line_str_size.
2390 (struct attr_abbrev): Add field implicit_const.
2391 (dwarf_debug_sections): Add .debug_line_str.
2392 (enum dwarf_debug_section_enum): Add debug_line_str and debug_max.
2393 (dwarf_debug_section_assert): Add static assertion.
2394 (read_indirect_line_string): New.
2395 (read_abbrevs): Support DW_FORM_implicit_const.
2396 (is_str_attr): Support DW_FORM_line_strp.
2397 (read_attribute_value): Support DW_FORM_line_strp and
2398 DW_FORM_implicit_const.
2399 (read_attribute): Support DW_FORM_implicit_const.
2400 (line_info_add_include_dir, line_info_add_include_dir_stub):
2401 (line_info_add_file_name, read_formatted_entries): New.
2402 (decode_line_info, parse_comp_unit): Support DWARF 5.
2403 (_bfd_dwarf2_cleanup_debug_info): Free dwarf_line_str_buffer.
2405 2017-07-03 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
2407 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove the
2408 abort statement that was put for symbols that are not dynamic.
2410 2017-07-03 Tristan Gingold <gingold@adacore.com>
2412 * po/bfd.pot: Regenerate
2414 2017-07-03 Alan Modra <amodra@gmail.com>
2416 * bfd.c (_doprnt): Rewrite "ll" and "L" modifiers to "I64" for
2417 __MSVCRT__. Support "L" modifier for bfd_vma. Formatting.
2418 * elf.c (setup_group): Use "Lx" to print sh_size.
2419 (_bfd_elf_setup_sections): Remove unnecessary cast and print
2420 unknown section type in hex.
2421 (copy_special_section_fields): Style fix.
2422 (bfd_section_from_shdr): Correct format for sh_link. Use a
2423 common error message for all the variants of unrecognized
2425 (assign_file_positions_for_load_sections): Use "Lx" for lma
2426 adjust error message.
2427 (assign_file_positions_for_non_load_sections): Formatting.
2428 (rewrite_elf_program_header): Formatting. Use "Lx" for
2429 bfd_vma values in error messages.
2430 * elfcode.h (elf_slurp_reloc_table_from_section): Cast
2431 ELF_R_SYM value to type expected by format.
2432 * elflink.c (elf_link_read_relocs_from_section): Use "Lx"
2434 (elf_link_add_object_symbols): Use "Lu" for symbol sizes.
2435 (elf_link_input_bfd): Use "Lx" for r_info.
2436 (bfd_elf_gc_record_vtinherit): Use "Lx" for offset.
2438 2017-07-03 Alan Modra <amodra@gmail.com>
2440 * bfd.c (bfd_scan_vma): Don't use long long unless HAVE_LONG_LONG.
2441 * coff-rs6000.c (FMT20): Handle hosts with 64-bit long and
2442 Microsoft C library variant of long long format specifier.
2443 (PRINT20): Cast value to bfd_uint64_t not long long.
2444 * coffcode.h (coff_print_aux): Use BFD_VMA_FMT.
2445 * coff-x86_64.c (coff_amd64_reloc): Use bfd_uint64_t rather than
2446 long long. Don't cast to bfd_vma.
2447 * elf32-score.c (score3_bfd_getl48): Likewise.
2448 * vms-alpha.c (_bfd_vms_slurp_eisd): Likewise.
2450 2017-07-03 Alan Modra <amodra@gmail.com>
2452 * elf.c (_bfd_elf_print_private_bfd_data): Use BFD_VMA_FMT to
2454 (bfd_elf_print_symbol): Don't cast symbol->flags.
2455 (_bfd_elf_symbol_from_bfd_symbol): Likewise.
2456 * elf32-ppc.c (ppc_elf_begin_write_processing): Correct
2457 _bfd_error_handler argument order.
2458 (ppc_elf_merge_private_bfd_data): Don't cast flags.
2460 2017-07-03 Alan Modra <amodra@gmail.com>
2462 * configure.ac: Invoke AC_CHECK_TYPES for long long. Invoke
2463 AC_TYPE_LONG_DOUBLE.
2464 * configure: Regenerate.
2465 * config.in: Regenerate.
2467 2017-06-29 Andrew Waterman <andrew@sifive.com>
2469 * elfnn-riscv.c (riscv_elf_adjust_dynamic_symbol): Fix TLS copy
2472 2017-06-29 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
2474 * elfxx-sparc.c (allocate_dynrelocs): Don't make a symbol dynamic
2475 unless it is undefined weak.
2476 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Set the flag
2477 relative_reloc to direct non-dynamic symbols to R_SPARC_RELATIVE
2479 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): If symbol
2480 is not dynamic in PIC, abort.
2482 2017-06-29 Jiong Wang <jiong.wang@arm.com>
2485 * elfnn-aarch64.c (elfNN_aarch64_allocate_dynrelocs): Only make
2486 undefined weak symbols into dynamic.
2487 (elfNN_aarch64_final_link_relocate): Generate runtime RELATIVE
2488 relocation for non-dynamic symbols.
2489 (elfNN_aarch64_finish_dynamic_symbol): Add sanity check.
2491 2017-06-29 Jiong Wang <jiong.wang@arm.com>
2493 * elfnn-aarch64.c (aarch64_relocation_aginst_gp_p): New function.
2494 (elfNN_aarch64_final_link_relocate): Delete duplicated code for
2495 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15, BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC,
2496 BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
2497 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Optimize the
2500 2017-06-29 Andreas Arnez <arnez@linux.vnet.ibm.com>
2502 * elf-bfd.h (elfcore_write_s390_gs_cb): Add prototype.
2503 (elfcore_write_s390_gs_bc): Likewise.
2504 * elf.c (elfcore_grok_s390_gs_cb): New function.
2505 (elfcore_grok_s390_gs_bc): New function.
2506 (elfcore_grok_note): Call them.
2507 (elfcore_write_s390_gs_cb): New function.
2508 (elfcore_write_s390_gs_bc): New function.
2509 (elfcore_write_register_note): Call them.
2511 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
2513 * libbfd.c (_bfd_generic_get_section_contents): Don't call
2514 bfd_get_file_size. Check archive element size.
2515 (_bfd_generic_get_section_contents_in_window): Likewise.
2517 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
2519 * bfd-in2.h: Regenerated.
2520 * bfdio.c (bfd_get_size): Change return type to ufile_ptr.
2521 (bfd_get_file_size): Likewise.
2523 2017-06-28 Maciej W. Rozycki <macro@imgtec.com>
2524 Matthew Fortune <matthew.fortune@imgtec.com>
2526 * archures.c (bfd_mach_mips_interaptiv_mr2): New macro.
2527 * cpu-mips.c (I_interaptiv_mr2): New enum value.
2528 (arch_info_struct): Add "mips:interaptiv-mr2" entry.
2529 * elfxx-mips.c (_bfd_elf_mips_mach) <E_MIPS_MACH_IAMR2>: New
2531 (mips_set_isa_flags) <bfd_mach_mips_interaptiv_mr2>: Likewise.
2532 (bfd_mips_isa_ext) <bfd_mach_mips_interaptiv_mr2>: Likewise.
2533 (print_mips_isa_ext) <AFL_EXT_INTERAPTIV_MR2>: Likewise.
2534 (mips_mach_extensions): Add `bfd_mach_mipsisa32r3' and
2535 `bfd_mach_mips_interaptiv_mr2' entries.
2536 * bfd-in2.h: Regenerate.
2538 2017-06-27 Nick Clifton <nickc@redhat.com>
2540 * tekhex.c (pass_over): Revert accidental conversion of a local
2541 array to a static array.
2543 2017-06-27 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
2546 * elf32-avr.c (elf32_avr_adjust_diff_reloc_value): Adjust
2547 reloc addend if necessary. Adjust diff only if
2548 shrinked_insn_address < end_address.
2550 2017-06-27 Alan Modra <amodra@gmail.com>
2553 * libbfd.c (_bfd_generic_get_section_contents): Warning fix.
2554 (_bfd_generic_get_section_contents_in_window): Likewise.
2556 2017-06-26 Kuan-Lin Chen <rufus@andestech.com>
2558 * elfnn-riscv.c (perform_relocation): Support the new
2559 R_RISCV_32_PCREL relocation.
2560 (riscv_elf_relocate_section): Likewise.
2561 * elfxx-riscv.c (howto_table): Likewise.
2562 (riscv_reloc_map): Likewise.
2563 * bfd-in2.h (BFD_RELOC_RISCV_32_PCREL): New relocation.
2564 * libbfd.h: Regenerate.
2566 2017-06-27 Alan Modra <amodra@gmail.com>
2569 * libbfd.c (_bfd_generic_get_section_contents): Delete abort.
2570 Use unsigned file pointer type, and remove cast.
2571 * libbfd.c (_bfd_generic_get_section_contents_in_window): Likewise.
2572 Add "count", not "sz".
2574 2017-06-26 Pedro Alves <palves@redhat.com>
2577 * libbfd.c (_bfd_generic_get_section_contents): Add "count", not
2580 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
2583 * libbfd.c (_bfd_generic_get_section_contents_in_window): Add
2586 2017-06-26 Maciej W. Rozycki <macro@imgtec.com>
2588 * cpu-mips.c (arch_info_struct): Mark the 4010 32-bit.
2589 * elfxx-mips.c (mips_set_isa_flags) <bfd_mach_mips4010>: Set
2590 E_MIPS_ARCH_2 rather than E_MIPS_ARCH_3 in `e_flags'.
2591 (mips_mach_extensions): Mark `bfd_mach_mips4010' as extending
2592 `bfd_mach_mips6000' rather than `bfd_mach_mips4000'.
2594 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
2597 * compress.c (bfd_get_full_section_contents): Don't check the
2599 * libbfd.c (_bfd_generic_get_section_contents): Check for and
2600 reject a section whose size + offset is greater than the size
2602 (_bfd_generic_get_section_contents_in_window): Likewise.
2604 2017-06-26 Nick Clifton <nickc@redhat.com>
2607 * tekhex.c (getvalue): Check for the source pointer exceeding the
2608 end pointer before the first byte is read.
2610 2017-06-26 Nick Clifton <nickc@redhat.com>
2613 * opncls.c (get_build_id): Check that the section is big enough
2614 to contain the whole note.
2615 * compress.c (bfd_get_full_section_contents): Check for and reject
2616 a section whose size is greater than the size of the entire file.
2617 * elf32-v850.c (v850_elf_copy_notes): Allow for the ouput to not
2618 contain a notes section.
2620 2017-06-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2622 * elf64-s390.c (elf_s390_additional_program_headers): Add NULL
2624 (elf_s390_modify_segment_map): Likewise.
2625 (bfd_elf_s390_set_options): Lisewise.
2627 2017-06-26 Alan Modra <amodra@gmail.com>
2629 * elflink.c (_bfd_elf_link_create_dynstrtab): Don't make dynobj
2631 (_bfd_elf_size_group_sections): Skip --just-syms bfds.
2632 (bfd_elf_size_dynamic_sections): Ignore .note.GNU-stack and
2633 .preinit_array on --just-syms bfds.
2634 (_bfd_elf_gc_mark_extra_sections): Skip --just-syms bfds.
2635 (elf_gc_sweep, bfd_elf_parse_eh_frame_entries): Likewise.
2636 (bfd_elf_gc_sections, bfd_elf_discard_info): Likewise.
2638 2017-06-25 Sergei Trofimovich <slyfox@gentoo.org>
2640 * elf.c (find_link): Bounds check "hint".
2642 2017-06-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
2644 * elf32-arm.c (using_thumb_only): Update list of architectures in
2645 BFD_ASSERT for which the logic is valid.
2646 (using_thumb2_bl): Likewise.
2647 (using_thumb2): Likewise and return true for ARMv8-R.
2648 (arch_has_arm_nop): Likewise.
2649 (tag_cpu_arch_combine): New v8r table for ARMv8-R Tag_CPU_arch
2650 merging logic. Update commentis for value 15 of v8m_baseline,
2651 v8m_mainline and v4t_plus_v6_m arrays. Use v8r array to decide
2652 merging of value 15 of Tag_CPU_arch.
2654 2017-06-23 Jiong Wang <jiong.wang@arm.com>
2656 * reloc.c (BFD_RELOC_AARCH64_ADR_GOTPAGE): Rename to
2657 BFD_RELOC_AARCH64_ADR_GOT_PAGE
2658 * bfd-in2.h: Regenerate.
2660 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2662 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Move
2663 the error_alignment label forward. Properly align program
2664 property note section.
2666 2017-06-22 Eric Christopher <echristo@gmail.com>
2668 * elf32-arm.c (elf32_arm_final_link_relocate): Use labs rather than
2669 abs to fix a truncation warning.
2671 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2673 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Resolve
2674 local undefined weak symbol to 0.
2675 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Likewise.
2677 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2679 * elf32-i386.c (elf_i386_merge_gnu_properties): If info->shstk
2680 is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
2681 (elf_i386_link_setup_gnu_properties): If info->shstk is set,
2682 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
2683 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): If
2684 info->shstk is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
2685 (elf_x86_64_link_setup_gnu_properties): If info->shstk is set,
2686 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
2688 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2690 * elf32-i386.c (elf_i386_lazy_ibt_plt0_entry): New.
2691 (elf_i386_lazy_ibt_plt_entry): Likewise.
2692 (elf_i386_pic_lazy_ibt_plt0_entry): Likewise.
2693 (elf_i386_non_lazy_ibt_plt_entry): Likewise.
2694 (elf_i386_pic_non_lazy_ibt_plt_entry): Likewise.
2695 (elf_i386_eh_frame_lazy_ibt_plt): Likewise.
2696 (elf_i386_lazy_plt_layout): Likewise.
2697 (elf_i386_non_lazy_plt_layout): Likewise.
2698 (elf_i386_link_hash_entry): Add plt_second.
2699 (elf_i386_link_hash_table): Add plt_second and
2700 plt_second_eh_frame.
2701 (elf_i386_allocate_dynrelocs): Use the second PLT if needed.
2702 (elf_i386_size_dynamic_sections): Use .plt.got unwind info for
2703 the second PLT. Check the second PLT.
2704 (elf_i386_relocate_section): Use the second PLT to resolve
2705 PLT reference if needed.
2706 (elf_i386_finish_dynamic_symbol): Fill and use the second PLT if
2708 (elf_i386_finish_dynamic_sections): Set sh_entsize on the
2709 second PLT. Generate unwind info for the second PLT.
2710 (elf_i386_plt_type): Add plt_second.
2711 (elf_i386_get_synthetic_symtab): Support the second PLT.
2712 (elf_i386_parse_gnu_properties): Support
2713 GNU_PROPERTY_X86_FEATURE_1_AND.
2714 (elf_i386_merge_gnu_properties): Support
2715 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
2716 on GNU_PROPERTY_X86_FEATURE_1_IBT
2717 (elf_i386_link_setup_gnu_properties): If info->ibt is set,
2718 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
2719 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
2720 is set on all relocatable inputs.
2721 * elf64-x86-64.c (elf_x86_64_lazy_ibt_plt_entry): New.
2722 (elf_x32_lazy_ibt_plt_entry): Likewise.
2723 (elf_x86_64_non_lazy_ibt_plt_entry): Likewise.
2724 (elf_x32_non_lazy_ibt_plt_entry): Likewise.
2725 (elf_x86_64_eh_frame_lazy_ibt_plt): Likewise.
2726 (elf_x32_eh_frame_lazy_ibt_plt): Likewise.
2727 (elf_x86_64_lazy_ibt_plt): Likewise.
2728 (elf_x32_lazy_ibt_plt): Likewise.
2729 (elf_x86_64_non_lazy_ibt_plt): Likewise.
2730 (elf_x32_non_lazy_ibt_plt): Likewise.
2731 (elf_x86_64_get_synthetic_symtab): Support the second PLT.
2732 (elf_x86_64_parse_gnu_properties): Support
2733 GNU_PROPERTY_X86_FEATURE_1_AND.
2734 (elf_x86_64_merge_gnu_properties): Support
2735 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
2736 on GNU_PROPERTY_X86_FEATURE_1_IBT
2737 (elf_x86_64_link_setup_gnu_properties): If info->ibt is set,
2738 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
2739 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
2740 is set on all relocatable inputs.
2742 2017-06-22 Nick Clifton <nickc@redhat.com>
2745 * som.c (setup_sections): NUL terminate the space_strings buffer.
2746 Check that the space.name field does not index beyond the end of
2747 the space_strings buffer.
2749 2017-06-21 Nick Clifton <nickc@redhat.com>
2752 * coff-sh.c (sh_reloc): Check for an out of range reloc.
2754 2017-06-21 Nick Clifton <nickc@redhat.com>
2757 * vms-misc.c (_bfd_vms_save_sized_string): Use unsigned int as
2758 type of the size parameter.
2759 (_bfd_vms_save_counted_string): Add second parameter - the maximum
2760 length of the counted string.
2761 * vms.h (_bfd_vms_save_sized_string): Update prototype.
2762 (_bfd_vms_save_counted_string): Likewise.
2763 * vms-alpha.c (_bfd_vms_slurp_eisd): Update calls to
2764 _bfd_vms_save_counted_string.
2765 (_bfd_vms_slurp_ehdr): Likewise.
2766 (_bfd_vms_slurp_egsd): Likewise.
2767 (Parse_module): Likewise.
2769 2017-06-21 Alan Modra <amodra@gmail.com>
2771 * elf64-ppc.c (ppc64_elf_size_stubs): Test for localentry:0 plt
2772 calls before tocsave calls.
2773 (ppc64_elf_relocate_section): Allow localentry:0 plt calls without
2776 2017-06-21 Nick Clifton <nickc@redhat.com>
2779 * reloc.c (bfd_generic_get_relocated_section_contents): Fail if
2780 bfd_get_full_section_contents returns no contents.
2782 2017-06-21 Nick Clifton <nickc@redhat.com>
2785 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an undersized
2788 2017-06-21 Nick Clifton <nickc@redhat.com>
2791 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an empty section
2793 (image_set_ptr): Likewise.
2794 (alpha_vms_fix_sec_rel): Likewise.
2795 (alpha_vms_slurp_relocs): Likewise.
2797 2017-06-21 Nick Clifton <nickc@redhat.com>
2800 * ieee.c (ieee_slurp_sections): Check for a NULL return from
2802 (ieee_archive_p): Likewise.
2803 (ieee_object_p): Likewise.
2805 2017-06-21 Nick Clifton <nickc@redhat.com>
2808 * elf.c (setup_group): Zero the group section pointer list after
2809 allocation so that loops can be caught. Check for NULL pointers
2810 when processing a group list.
2812 2017-06-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2814 * elf-s390.h: New file.
2815 * elf64-s390.c (struct elf_s390_link_hash_table): Add params
2817 (elf_s390_additional_program_headers): New function.
2818 (elf_s390_modify_segment_map): New function.
2819 (bfd_elf_s390_set_options): New function.
2820 (elf_backend_additional_program_headers)
2821 (elf_backend_modify_segment_map): Add macro definitions.
2823 2017-06-19 H.J. Lu <hongjiu.lu@intel.com>
2826 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Check
2827 the DYNAMIC bit instead of bfd_count_sections.
2829 2017-06-19 Nick Clifton <nickc@redhat.com>
2832 * vms-alpha.c (evax_bfd_print_emh): Check for insufficient record
2834 (evax_bfd_print_eeom): Likewise.
2835 (evax_bfd_print_egsd): Check for an overlarge record length.
2836 (evax_bfd_print_etir): Likewise.
2838 2017-06-19 Nick Clifton <nickc@redhat.com>
2841 * libieee.h (struct common_header_type): Add end_p field.
2842 * ieee.c (this_byte_and_next): Do not advance input_p beyond
2844 (read_id): Check for a length that exceeds the remaining bytes in
2846 (ieee_seek): Initialise end_p.
2847 (ieee_archive_p): Likewise.
2848 (ieee_object_p): Likewise.
2850 2017-06-19 Nick Clifton <nickc@redhat.com>
2853 * vms-alpha.c (_bfd_vms_slurp_eihs): Check for invalid offset
2854 before reading the EIHS structure entries.
2856 2017-06-19 Nick Clifton <nickc@redhat.com>
2859 * vms-alpha.c (_bfd_vms_slurp_egsd): Use unsigned int for
2860 gsd_size. Check that there are enough bytes remaining to read the
2861 type and size of the next egsd. Check that the size of the egsd
2862 does not exceed the size of the record.
2864 2017-06-19 Alan Modra <amodra@gmail.com>
2866 * config.bfd: Correct targ_underscore for cris.
2868 2017-06-18 Alan Modra <amodra@gmail.com>
2870 * config.bfd: Correct targ_underscore for epiphany, ip2k,
2871 m32c, mn10200, pru, rl78, rx, crisv32 and v850.
2873 2017-06-16 Nick Clifton <nickc@redhat.com>
2875 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Do not fail if the
2876 bucketlist is empty because there are no symbols to add to the
2879 2017-06-16 Alan Modra <amodra@gmail.com>
2885 * targets.c (struct bfd_target): Add _bfd_define_start_stop.
2886 (BFD_JUMP_TABLE_LINK): Likewise.
2887 * elf-bfd.h (bfd_elf_define_start_stop): Declare.
2888 * elflink.c (_bfd_elf_gc_mark_rsec): Update comment.
2889 (bfd_elf_define_start_stop): New function.
2890 * linker.c (bfd_generic_define_start_stop): New function.
2891 * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Init
2893 * aout-adobe.c (aout_32_bfd_define_start_stop): Define.
2894 * aout-target.h (MY_bfd_define_start_stop): Define.
2895 * aout-tic30.c (MY_bfd_define_start_stop): Define.
2896 * binary.c (binary_bfd_define_start_stop): Define.
2897 * bout.c (b_out_bfd_define_start_stop): Define.
2898 * coff-alpha.c (_bfd_ecoff_bfd_define_start_stop): Define.
2899 * coff-mips.c (_bfd_ecoff_bfd_define_start_stop): Define.
2900 * coff-rs6000.c (_bfd_xcoff_bfd_define_start_stop): Define.
2901 * coffcode.h (coff_bfd_define_start_stop): Define.
2902 * elfxx-target.h (bfd_elfNN_bfd_define_start_stop): Define.
2903 * i386msdos.c (msdos_bfd_define_start_stop): Define.
2904 * i386os9k.c (os9k_bfd_define_start_stop): Define.
2905 * ieee.c (ieee_bfd_define_start_stop): Define.
2906 * ihex.c (ihex_bfd_define_start_stop): Define.
2907 * libbfd-in.h (_bfd_nolink_bfd_define_start_stop): Define.
2908 * mach-o-target.c (bfd_mach_o_bfd_define_start_stop): Define.
2909 * mmo.c (mmo_bfd_define_start_stop): Define.
2910 * nlm-target.h (nlm_bfd_define_start_stop): Define.
2911 * oasys.c (oasys_bfd_define_start_stop): Define.
2912 * pef.c (bfd_pef_bfd_define_start_stop): Define.
2913 * plugin.c (bfd_plugin_bfd_define_start_stop): Define.
2914 * ppcboot.c (ppcboot_bfd_define_start_stop): Define.
2915 * som.c (som_bfd_define_start_stop): Define.
2916 * srec.c (srec_bfd_define_start_stop): Define.
2917 * tekhex.c (tekhex_bfd_define_start_stop): Define.
2918 * versados.c (versados_bfd_define_start_stop): Define.
2919 * vms-alpha.c (vms_bfd_define_start_stop): Define.
2920 (alpha_vms_bfd_define_start_stop): Define.
2921 * xsym.c (bfd_sym_bfd_define_start_stop): Define.
2922 * bfd-in2.h: Regenerate.
2923 * libbfd.h: Regenerate.
2925 2017-06-16 Jiong Wang <jiong.wang@arm.com>
2927 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use
2928 SYMBOL_REFERENCES_LOCAL.
2930 2017-06-15 Jiong Wang <jiong.wang@arm.com>
2933 * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
2934 (elfNN_aarch64_final_link_relocate): Also propagate relocations to
2935 runtime for if there needs copy relocation elimination.
2936 (need_copy_relocation_p): New function. Return true for symbol with
2937 pc-relative references and if it's against read-only sections.
2938 (elfNN_aarch64_adjust_dynamic_symbol): Use need_copy_relocation_p.
2939 (elfNN_aarch64_check_relocs): Allocate dynrelocs for relocation types
2940 that are related with accessing external objects.
2941 (elfNN_aarch64_gc_sweep_hook): Sync the relocation types with the change
2942 in elfNN_aarch64_check_relocs.
2944 2017-06-15 Nick Clifton <nickc@redhat.com>
2947 * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
2950 (ieee_archive_p): Likewise.
2952 2017-06-15 Nick Clifton <nickc@redhat.com>
2955 * vms-alpha.c (_bfd_vms_slurp_etir): Extend check of cmd_length.
2957 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
2959 * elf32-xtensa.c (elf_xtensa_be_plt_entry,
2960 elf_xtensa_le_plt_entry): Add dimension for the ABI to arrays,
2961 keep both windowed and call0 ABI PLT definitions.
2962 (elf_xtensa_create_plt_entry): Use selected ABI to choose upper
2963 elf_xtensa_*_plt_entry endex.
2964 (ELF_MAXPAGESIZE): Fix at minimal supported MMU page size.
2966 2017-06-14 Nick Clifton <nickc@redhat.com>
2969 * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid
2972 2017-06-14 Nick Clifton <nickc@redhat.com>
2975 * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the
2976 maximum value for the ascic pointer. Check that name processing
2977 does not read beyond this value.
2978 (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the
2981 2017-06-14 Nick Clifton <nickc@redhat.com>
2984 * versados.c (versados_mkobject): Zero the allocated tdata structure.
2985 (process_otr): Check for an invalid offset in the otr structure.
2987 2017-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
2989 * config.bfd (epiphany-*-elf): Accept epiphany-*-*.
2991 2017-06-13 H.J. Lu <hongjiu.lu@intel.com>
2997 * elf-bfd.h (elf_link_hash_entry): Add start_stop. Change the
2998 vtable field to a union.
2999 (_bfd_elf_is_start_stop): Removed.
3000 * elf32-i386.c (elf_i386_convert_load_reloc): Also check for
3001 __start_SECNAME and __stop_SECNAME symbols.
3002 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
3003 * elflink.c (_bfd_elf_is_start_stop): Removed.
3004 (_bfd_elf_gc_mark_rsec): Check start_stop instead of calling
3005 _bfd_elf_is_start_stop.
3006 (elf_gc_propagate_vtable_entries_used): Skip __start_SECNAME and
3007 __stop_SECNAME symbols. Updated.
3008 (elf_gc_smash_unused_vtentry_relocs): Likewise.
3009 (bfd_elf_gc_record_vtinherit): Likewise.
3010 (bfd_elf_gc_record_vtentry): Likewise.
3012 2017-06-13 Nick Clifton <nickc@redhat.com>
3015 * elflink.c (elf_link_adjust_relocs): Generate an error when
3016 encountering a reloc against a symbol removed by garbage
3019 2017-06-12 H.J. Lu <hongjiu.lu@intel.com>
3021 * elf-bfd.h (elf_backend_data): Add struct bfd_link_info *
3022 to merge_gnu_properties.
3023 * elf-properties.c (elf_merge_gnu_properties): Add struct
3024 bfd_link_info * and pass it to merge_gnu_properties.
3025 (elf_merge_gnu_property_list): Add struct bfd_link_info *
3026 and pass it to elf_merge_gnu_properties.
3027 (_bfd_elf_link_setup_gnu_properties): Pass info to
3028 elf_merge_gnu_property_list.
3029 * elf32-i386.c (elf_i386_merge_gnu_properties): Add struct
3031 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): Likewise.
3033 2017-06-11 Joe Zbiciak <joe.zbiciak@leftturnonly.info>
3036 * binary.c (binary_set_section_contents): Scale lma by octets
3037 per byte to set filepos.
3039 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3041 * elf32-arc.c (elf_arc_check_relocs): Fixed conditions to generate
3044 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3046 * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to
3049 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3051 * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to
3052 patched section contents for TLS IE reloc.
3053 * elf32-arc.c: Remove TCB_SIZE preprocessor macro.
3055 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3057 * elf32-arc.c (elf_arc_relocate_section): Added "call" to
3058 RELOC_FOR_GLOBAL_SYMBOL macro.
3060 2018-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3062 * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
3065 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3067 * config/tc-arc.c (md_undefined_symbol): Changed.
3068 * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed.
3070 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3072 * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
3075 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3077 * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
3078 warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
3080 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3082 * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
3085 2017-06-08 Richard Earnshaw <rearnsha@arm.com>
3087 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
3088 that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
3089 is non-zero. Add clarifying comments.
3091 2017-06-08 H.J. Lu <hongjiu.lu@intel.com>
3093 * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
3094 name. Use local IFUNC symbol name string to report unsupported
3095 non-PIC call to IFUNC function.
3096 (elf_i386_relocate_section): Dump local IFUNC name with minfo
3097 when generating R_386_IRELATIVE relocation.
3098 (elf_i386_finish_dynamic_symbol): Likewise.
3099 * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
3101 (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
3102 when generating R_X86_64_IRELATIVE relocation.
3103 (elf_x86_64_finish_dynamic_symbol): Likewise.
3105 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
3107 * elf.c (setup_group): Make sure BFD sections are created for all
3108 group sections in the input file when processing SHF_GROUP
3110 (bfd_section_from_shdr): Avoid duplicating logic already
3111 implemented in `setup_group'.
3113 2017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
3116 * peXXigen.c (pe_print_idata): Use the address of the first thunk
3117 if the hint address is zero.
3119 2017-06-06 James Clarke <jrtc27@jrtc27.com>
3122 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
3123 ELF_COMMON_DEF_P for common symbols.
3125 2017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
3127 * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
3128 SEC_GROUP sections as SEC_EXCLUDE.
3129 (bfd_elf_set_group_contents): Replace use of abort with an assert.
3130 (assign_section_numbers): Use resolve_section_groups flag instead
3131 of relocatable link type.
3132 (_bfd_elf_init_private_section_data): Use resolve_section_groups
3133 flag instead of checking the final_link flag for part of the
3134 checks in here. Fix white space as a result.
3135 * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
3136 instead of relocatable link type.
3137 (bfd_elf_final_link): Likewise.
3139 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
3141 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
3143 * elf32-score.c (score_elf_final_link_relocate): Likewise.
3144 (s3_bfd_score_elf_check_relocs): Likewise.
3145 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
3146 (score_elf_final_link_relocate): Likewise.
3147 (s7_bfd_score_elf_check_relocs): Likewise.
3149 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
3151 * elflink.c (init_reloc_cookie_rels): Remove unused variable
3154 2017-06-06 Maciej W. Rozycki <macro@imgtec.com>
3156 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
3157 from `reloc_count' rather than decrementing it.
3158 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
3159 `reloc_count' by `int_rels_per_ext_rel'.
3160 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
3161 `reloc_count' by `int_rels_per_ext_rel' for last relocation
3162 entry determination.
3163 (s3_bfd_score_elf_check_relocs): Likewise.
3164 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
3165 (s7_bfd_score_elf_relocate_section): Likewise.
3166 (s7_bfd_score_elf_check_relocs): Likewise.
3167 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
3168 prototype and function.
3169 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
3170 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
3171 triple rather than once the sum of REL and RELA relocation entry
3173 (bfd_elf64_get_reloc_upper_bound): Remove macro.
3174 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
3175 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
3176 storage allocation size determination.
3177 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
3178 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
3179 by `int_rels_per_ext_rel' for last relocation entry
3181 (bfd_elf_final_link): Do not multiply `reloc_count' by
3182 `int_rels_per_ext_rel' for internal relocation storage
3183 allocation size determination.
3184 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
3185 `int_rels_per_ext_rel' for last relocation entry determination.
3186 (elf_gc_smash_unused_vtentry_relocs): Likewise.
3187 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
3188 (_bfd_mips_elf_relocate_section): Likewise.
3190 2017-06-05 Alan Modra <amodra@gmail.com>
3193 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
3195 2017-06-01 John Baldwin <jhb@FreeBSD.org>
3197 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
3198 determine structure sizes.
3199 (elfcore_grok_freebsd_prstatus): Likewise.
3201 2017-06-01 Alan Modra <amodra@gmail.com>
3203 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
3204 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
3206 (is_elfv2_localentry0): New function.
3207 (ppc64_elf_tls_setup): Default params->plt_localentry0.
3208 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
3209 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
3210 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
3211 optimized localentry:0 stubs.
3212 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
3213 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
3215 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
3217 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
3219 2017-05-30 Casey Smith <clegg89@gmail.com>
3222 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
3223 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
3225 2017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
3227 * cpu-arc.c (arc_compatible): New function.
3229 2017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
3231 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
3233 2017-05-30 H.J. Lu <hongjiu.lu@intel.com>
3236 * bfdio.c (bfd_get_file_size): New function.
3237 * bfd-in2.h: Regenerated.
3239 2017-05-23 Dilian Palauzov <git-dpa@aegee.org>
3241 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
3244 2017-05-22 H.J. Lu <hongjiu.lu@intel.com>
3246 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
3247 dynobj instead of htab->elf.dynobj.
3249 2017-05-19 Maciej W. Rozycki <macro@imgtec.com>
3251 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
3253 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
3254 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
3255 actual number of internal relocations retrieved. Adjust
3256 function description.
3257 (bfd_elf64_canonicalize_reloc): Remove macro.
3258 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
3260 2017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
3262 * archures.c (bfd_mach_sparc_v9m8): Define.
3263 (bfd_mach_sparc_v8plusm8): Likewise.
3264 (bfd_mach_sparc_v9_p): Adjust to M8.
3265 (bfd_mach_sparc_64bit_p): Likewise.
3266 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
3267 bfd_mach_sparc_v8plusm8.
3268 * bfd-in2.h: Regenerated.
3269 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
3271 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
3272 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
3273 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
3275 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
3276 bfd_mach_sparc_v8plusm8.
3278 2017-05-19 Alan Modra <amodra@gmail.com>
3280 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
3281 debug and special sections when no non-note alloc sections in an
3284 2017-05-18 Alan Modra <amodra@gmail.com>
3286 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
3287 * elf-m10300.c: Likewise.
3289 * elf32-arc.c: Likewise.
3290 * elf32-bfin.c: Likewise.
3291 * elf32-m68k.c: Likewise.
3292 * elf32-nds32.c: Likewise.
3293 * elf32-tilepro.c: Likewise.
3294 * elflink.c: Likewise.
3295 * elfnn-aarch64.c: Likewise.
3296 * elfnn-riscv.c: Likewise.
3297 * elfxx-tilegx.c: Likewise.
3298 * mach-o.c: Likewise.
3299 * peXXigen.c: Likewise.
3300 * vms-alpha.c: Likewise.
3301 * vms-lib.c: Likewise.
3303 2017-05-17 H.J. Lu <hongjiu.lu@intel.com>
3306 * elflink.c (elf_gc_mark_debug_section): New function.
3307 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
3308 referenced by kept debug sections.
3310 2017-05-16 Alan Modra <amodra@gmail.com>
3312 * elf-m10300.c: Rename occurrences of non_ir_ref.
3313 * elf32-arm.c: Likewise.
3314 * elf32-bfin.c: Likewise.
3315 * elf32-cr16.c: Likewise.
3316 * elf32-cris.c: Likewise.
3317 * elf32-d10v.c: Likewise.
3318 * elf32-dlx.c: Likewise.
3319 * elf32-fr30.c: Likewise.
3320 * elf32-frv.c: Likewise.
3321 * elf32-hppa.c: Likewise.
3322 * elf32-i370.c: Likewise.
3323 * elf32-i386.c: Likewise.
3324 * elf32-iq2000.c: Likewise.
3325 * elf32-lm32.c: Likewise.
3326 * elf32-m32c.c: Likewise.
3327 * elf32-m32r.c: Likewise.
3328 * elf32-m68hc1x.c: Likewise.
3329 * elf32-m68k.c: Likewise.
3330 * elf32-mcore.c: Likewise.
3331 * elf32-metag.c: Likewise.
3332 * elf32-microblaze.c: Likewise.
3333 * elf32-moxie.c: Likewise.
3334 * elf32-msp430.c: Likewise.
3335 * elf32-mt.c: Likewise.
3336 * elf32-nios2.c: Likewise.
3337 * elf32-or1k.c: Likewise.
3338 * elf32-ppc.c: Likewise.
3339 * elf32-rl78.c: Likewise.
3340 * elf32-s390.c: Likewise.
3341 * elf32-score.c: Likewise.
3342 * elf32-score7.c: Likewise.
3343 * elf32-sh.c: Likewise.
3344 * elf32-tic6x.c: Likewise.
3345 * elf32-tilepro.c: Likewise.
3346 * elf32-v850.c: Likewise.
3347 * elf32-vax.c: Likewise.
3348 * elf32-xstormy16.c: Likewise.
3349 * elf32-xtensa.c: Likewise.
3350 * elf64-alpha.c: Likewise.
3351 * elf64-hppa.c: Likewise.
3352 * elf64-ia64-vms.c: Likewise.
3353 * elf64-mmix.c: Likewise.
3354 * elf64-ppc.c: Likewise.
3355 * elf64-s390.c: Likewise.
3356 * elf64-sh64.c: Likewise.
3357 * elf64-x86-64.c: Likewise.
3358 * elflink.c: Likewise.
3359 * elfnn-aarch64.c: Likewise.
3360 * elfnn-ia64.c: Likewise.
3361 * elfnn-riscv.c: Likewise.
3362 * elfxx-mips.c: Likewise.
3363 * elfxx-sparc.c: Likewise.
3364 * elfxx-tilegx.c: Likewise.
3365 * linker.c: Likewise.
3367 2017-05-16 Alan Modra <amodra@gmail.com>
3369 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
3370 * elflink.c (elf_link_add_object_symbols): Update to use
3372 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
3374 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
3376 2017-05-15 Maciej W. Rozycki <macro@imgtec.com>
3378 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
3380 2017-05-12 H.J. Lu <hongjiu.lu@intel.com>
3382 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
3383 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
3385 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
3387 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
3389 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
3391 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
3392 to plt_second/plt_second_eh_frame.
3393 (elf_x86_64_link_hash_newfunc): Updated.
3394 (elf_x86_64_allocate_dynrelocs): Likewise.
3395 (elf_x86_64_size_dynamic_sections): Likewise.
3396 (elf_x86_64_relocate_section): Likewise.
3397 (elf_x86_64_finish_dynamic_symbol): Likewise.
3398 (elf_x86_64_finish_dynamic_sections): Likewise.
3399 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
3400 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
3402 (elf_backend_setup_gnu_properties): Updated. Create the
3403 .plt.sec section instead of the .plt.sec section.
3405 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
3407 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
3408 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
3409 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
3411 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
3413 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
3414 (bfd_elf64_set_reloc): Define.
3415 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
3417 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
3419 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
3420 (struct bfd_target): New field _bfd_set_reloc.
3421 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
3422 * reloc.c (_bfd_generic_set_reloc): New function.
3423 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
3424 * nlm-target.h (nlm_set_reloc): Likewise.
3425 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
3426 * aout-tic30.c (MY_set_reloc): Likewise.
3427 * aout-target.h (MY_set_reloc): Likewise.
3428 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
3429 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
3430 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
3431 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
3432 * aout-adobe.c (aout_32_set_reloc): Likewise.
3433 * bout.c (b_out_set_reloc): Likewise.
3434 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
3435 * i386os9k.c (aout_32_set_reloc): Likewise.
3436 * ieee.c (ieee_set_reloc): Likewise.
3437 * oasys.c (oasys_set_reloc): Likewise.
3438 * som.c (som_set_reloc): Likewise.
3439 * versados.c (versados_set_reloc): Likewise.
3440 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
3441 _bfd_generic_set_reloc.
3442 (rs6000_xcoff64_aix_vec): LIkewise.
3443 * libbfd.c (_bfd_norelocs_set_reloc): New function.
3444 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
3445 * i386msdos.c (msdos_set_reloc): Define to
3446 _bfd_norelocs_set_reloc.
3447 * elfcode.h (elf_set_reloc): Define.
3448 * bfd-in2.h: Regenerated.
3450 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
3453 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
3454 for IFUNC function address.
3456 2017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
3458 * elf32-arc.c (FEATURE_LIST_NAME): Define.
3459 (CONFLICT_LIST): Likewise.
3460 (opcode/arc-attrs.h): Include.
3461 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
3462 (arc_extract_features): New file.
3463 (arc_stralloc): Likewise.
3464 (arc_elf_merge_attributes): Likewise.
3465 (arc_elf_merge_private_bfd_data): Use object attributes.
3466 (bfd_arc_get_mach_from_attributes): New function.
3467 (arc_elf_object_p): Use object attributes.
3468 (arc_elf_final_write_processing): Likewise.
3469 (elf32_arc_obj_attrs_arg_type): New function.
3470 (elf32_arc_obj_attrs_handle_unknown): Likewise.
3471 (elf32_arc_section_from_shdr): Likewise.
3472 (elf_backend_obj_attrs_vendor): Define.
3473 (elf_backend_obj_attrs_section): Likewise.
3474 (elf_backend_obj_attrs_arg_type): Likewise.
3475 (elf_backend_obj_attrs_section_type): Likewise.
3476 (elf_backend_obj_attrs_handle_unknown): Likewise.
3477 (elf_backend_section_from_shdr): Likewise.
3479 2017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
3482 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
3483 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
3484 and the destination is a Thumb symbol.
3486 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
3488 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
3489 initializer to silence GCC 4.2.
3490 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
3492 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
3494 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
3495 (LAZY_PLT_ENTRY_SIZE): This.
3496 (NON_LAZY_PLT_ENTRY_SIZE): New.
3497 (elf_x86_64_plt0_entry): Renamed to ...
3498 (elf_x86_64_lazy_plt0_entry): This.
3499 (elf_x86_64_plt_entry): Renamed to ...
3500 (elf_x86_64_lazy_plt_entry): This.
3501 (elf_x86_64_bnd_plt0_entry): Renamed to ...
3502 (elf_x86_64_lazy_bnd_plt0_entry): This.
3503 (elf_x86_64_legacy_plt_entry): Removed.
3504 (elf_x86_64_bnd_plt_entry): Renamed to ...
3505 (elf_x86_64_lazy_bnd_plt_entry): This.
3506 (elf_x86_64_legacy_plt2_entry): Renamed to ...
3507 (elf_x86_64_non_lazy_plt_entry): This.
3508 (elf_x86_64_bnd_plt2_entry): Renamed to ...
3509 (elf_x86_64_non_lazy_bnd_plt_entry): This.
3510 (elf_x86_64_eh_frame_plt): Renamed to ...
3511 (elf_x86_64_eh_frame_lazy_plt): This.
3512 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
3513 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
3514 (elf_x86_64_eh_frame_plt_got): Renamed to ...
3515 (elf_x86_64_eh_frame_non_lazy_plt): This.
3516 (elf_x86_64_lazy_plt_layout): New.
3517 (elf_x86_64_non_lazy_plt_layout): Likewise.
3518 (elf_x86_64_plt_layout): Likewise.
3519 (elf_x86_64_backend_data): Remove PLT layout information. Add
3520 os for target system.
3521 (GET_PLT_ENTRY_SIZE): Removed.
3522 (elf_x86_64_lazy_plt): New.
3523 (elf_x86_64_non_lazy_plt): Likewise.
3524 (elf_x86_64_lazy_bnd_plt): Likewise.
3525 (elf_x86_64_non_lazy_bnd_plt): Likewise.
3526 (elf_x86-64_arch_bed): Updated.
3527 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
3528 (elf_x86_64_create_dynamic_sections): Removed.
3529 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
3530 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
3531 (elf_x86-64_adjust_dynamic_symbol): Updated.
3532 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
3533 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
3534 size for PLT0 if there is no PLT0. Get plt_entry_size from
3535 non_lazy_plt for non-lazy PLT entries.
3536 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
3537 from non_lazy_plt for non-lazy PLT entries.
3538 (elf_x86-64_relocate_section): Updated. Properly get PLT index
3539 if there is no PLT0.
3540 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
3541 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
3542 entries with non-lazy PLT layout. Don't fill the second and third
3543 slots in the PLT entry if there is no PLT0.
3544 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
3545 if there is no PLT0. Set sh_entsize on the .plt.got section.
3546 (compare_relocs): New.
3547 (elf_x86_64_plt_type): Likewise.
3548 (elf_x86_64_plt): Likewise.
3549 (elf_x86_64_nacl_plt): New. Forward declaration.
3550 (elf_x86_64_get_plt_sym_val): Removed.
3551 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
3552 against all dynamic relocations.
3553 (elf_x86_64_link_setup_gnu_properties): New function.
3554 (elf_backend_create_dynamic_sections): Updated.
3555 (elf_backend_setup_gnu_properties): New.
3556 (elf_x86_64_nacl_plt): New.
3557 (elf_x86_64_nacl_arch_bed): Updated.
3559 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
3561 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
3562 (LAZY_PLT_ENTRY_SIZE): This.
3563 (NON_LAZY_PLT_ENTRY_SIZE): New.
3564 (elf_i386_plt0_entry): Renamed to ...
3565 (elf_i386_lazy_plt0_entry): This.
3566 (elf_i386_plt_entry): Renamed to ...
3567 (elf_i386_lazy_plt_entry): This.
3568 (elf_i386_pic_plt0_entry): Renamed to ...
3569 (elf_i386_pic_lazy_plt0_entry): This.
3570 (elf_i386_pic_plt_entry): Renamed to ...
3571 (elf_i386_pic_lazy_plt_entry): This.
3572 (elf_i386_got_plt_entry): Renamed to ...
3573 (elf_i386_non_lazy_plt_entry): This.
3574 (elf_i386_pic_got_plt_entry): Renamed to ...
3575 (elf_i386_pic_non_lazy_plt_entry): This.
3576 (elf_i386_eh_frame_plt): Renamed to ...
3577 (elf_i386_eh_frame_lazy_plt): This.
3578 (elf_i386_eh_frame_plt_got): Renamed to ...
3579 (elf_i386_eh_frame_non_lazy_plt): This.
3580 (elf_i386_plt_layout): Renamed to ...
3581 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
3582 eh_frame_plt_got_size.
3583 (elf_i386_non_lazy_plt_layout): New.
3584 (elf_i386_plt_layout): Likewise.
3585 (elf_i386_non_lazy_plt): Likewise.
3586 (GET_PLT_ENTRY_SIZE): Removed.
3587 (elf_i386_plt): Renamed to ...
3588 (elf_i386_lazy_plt): This.
3589 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
3590 (elf_i386_arch_bed): Updated.
3591 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
3592 (elf_i386_create_dynamic_sections): Removed.
3593 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
3594 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
3595 (elf_i386_adjust_dynamic_symbol): Updated.
3596 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
3597 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
3598 size for PLT0 if there is no PLT0.
3599 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
3600 output section is discarded only if GOT isn't empty.
3601 (elf_i386_relocate_section): Updated. Properly get PLT index
3602 if there is no PLT0.
3603 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
3604 second and third slots in the PLT entry if there is no PLT0.
3605 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
3606 if there is no PLT0. Set sh_entsize on the .plt.got section.
3607 (elf_i386_nacl_plt): Forward declaration.
3608 (elf_i386_get_plt_sym_val): Removed.
3609 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
3610 against all dynamic relocations.
3611 (elf_i386_link_setup_gnu_properties): New function.
3612 (elf_backend_create_dynamic_sections): Updated.
3613 (elf_backend_setup_gnu_properties): New.
3614 (elf_i386_nacl_plt): Updated.
3615 (elf_i386_nacl_arch_bed): Likewise.
3616 (elf_i386_vxworks_arch_bed): Likewise.
3618 2017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
3620 * elflink.c (elf_output_implib): Remove executable flag from import
3622 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
3623 library is a relocatable object file.
3625 2017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
3628 * elf32-avr.c (avr_should_move_sym): New function.
3629 (avr_should_reduce_sym_size): Likewise.
3630 (avr_should_increase_sym_size): Likewise.
3631 (elf32_avr_relax_delete_bytes): Adjust symbol values
3632 and sizes by calling new functions.
3634 2017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
3636 * config.bfd (riscv32-*): Enable rv64.
3638 2017-05-02 Alan Modra <amodra@gmail.com>
3641 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
3642 rather than h->root.type == bfd_link_hash_new.
3643 (bfd_elf_record_link_assignment): Similarly, call
3644 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
3646 2017-04-29 Alan Modra <amodra@gmail.com>
3649 * reloc.c (reloc_offset_in_range): New function.
3650 (bfd_perform_relocation, bfd_install_relocation): Use it.
3651 (_bfd_final_link_relocate): Likewise.
3653 2017-04-28 H.J. Lu <hongjiu.lu@intel.com>
3655 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
3656 before using .plt.got.
3657 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
3659 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3661 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
3662 instead of "+=" to update 0.
3664 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3666 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
3667 .plt.got section here.
3668 (elf_i386_check_relocs): Don't create the .plt.got section.
3669 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
3670 the .plt.got and .plt.bnd sections here.
3671 (elf_x86_64_check_relocs): Don't create the .plt.got nor
3674 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3676 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
3678 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
3679 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
3680 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
3681 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
3684 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3686 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
3688 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
3689 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
3690 the first relocatable ELF input with GNU properties.
3692 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3694 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
3695 VxWorks for non-PIC.
3697 2017-04-27 Alan Modra <amodra@gmail.com>
3699 * elf-bfd.h (struct elf_backend_data): Make asection param of
3700 elf_backend_eh_frame_address_size const.
3701 (_bfd_elf_eh_frame_address_size): Likewise.
3702 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
3703 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
3704 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
3705 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
3706 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
3707 (next_cie_fde_offset): Constify params.
3708 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
3710 2017-04-27 Alan Modra <amodra@gmail.com>
3712 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
3713 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
3714 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
3716 (offset_adjust): New function.
3717 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
3718 (adjust_eh_frame_local_symbols): Likewise.
3719 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
3720 after changing anything. Return true if anything changed.
3721 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
3722 _bfd_elf_adjust_eh_frame_global_symbol for globals.
3724 2017-04-27 Alan Modra <amodra@gmail.com>
3726 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
3729 2017-04-27 Alan Modra <amodra@gmail.com>
3731 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
3732 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
3733 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
3734 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
3735 for undef and undefweak dyn_relocs.
3736 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
3737 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
3738 (allocate_got, allocate_dynrelocs): Likewise.
3739 (ppc64_elf_relocate_section): Likewise.
3741 2017-04-26 H.J. Lu <hongjiu.lu@intel.com>
3743 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
3744 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
3745 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
3746 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
3748 2017-04-26 Nick Clifton <nickc@redhat.com>
3751 * reloc.c (bfd_perform_relocation): Check for a negative address
3754 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
3757 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
3759 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
3760 (elf_backend_always_renumber_dynsyms): Define.
3761 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
3762 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
3763 * elflink.c (bfd_elf_size_dynamic_sections): Also call
3764 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
3766 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
3768 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
3770 * elflink.c (bfd_elf_size_dynamic_sections): Only call
3771 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
3772 sections have been created.
3774 2017-04-26 Nick Clifton <nickc@redhat.com>
3777 * compress.c (bfd_init_section_compress_status): Check the return
3778 value from bfd_malloc.
3780 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3782 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
3783 no_finish_dynamic_symbol.
3784 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
3786 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
3787 weak symbol, don't make it dynamic.
3788 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
3789 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
3790 relocation for GOT reference.
3791 (elf_x86_64_finish_dynamic_symbol): Abort if
3792 no_finish_dynamic_symbol isn't 0.
3794 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3797 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
3798 undefined weak symbol, don't make it dynamic.
3799 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
3800 set no_finish_dynamic_symbol and generate R_386_RELATIVE
3801 relocation for R_386_GOT32.
3803 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3806 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
3808 2017-04-23 Alan Modra <amodra@gmail.com>
3811 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
3812 * elf.c (lcomm_sym): New.
3813 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
3814 * bfd-in2.h: Regenerate.
3816 2017-04-23 Alan Modra <amodra@gmail.com>
3819 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
3820 parameters and comment.
3821 (_bfd_elf_get_reloc_section): Delete.
3822 (_bfd_elf_plt_get_reloc_section): Declare.
3823 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
3824 New functions. Don't blindly skip over assumed .rel/.rela prefix.
3826 (_bfd_elf_get_reloc_section): ..here. Delete.
3827 (assign_section_numbers): Call elf_get_reloc_section.
3828 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
3829 * elfxx-target.h (elf_backend_get_reloc_section): Update.
3831 2017-04-23 Alan Modra <amodra@gmail.com>
3834 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
3837 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
3840 * elf32-i386.c (elf_i386_link_hash_entry): Add
3841 no_finish_dynamic_symbol.
3842 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
3843 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
3844 symbol, don't make it dynamic in PIE.
3845 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
3846 set no_finish_dynamic_symbol and generate R_386_RELATIVE
3847 relocation for R_386_GOT32
3848 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
3851 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
3855 * elflink.c (elf_link_add_object_symbols): Require
3856 --no-dynamic-linker with -E/--dynamic-list when creating
3859 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
3861 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
3864 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
3866 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
3867 dynamic symbol sorting.
3869 2017-04-20 H.J. Lu <hongjiu.lu@intel.com>
3872 * elflink.c (elf_link_add_object_symbols): Preserve
3873 dynamic_ref_after_ir_def when restoring the symbol table for
3874 unneeded dynamic object.
3876 2017-04-19 H.J. Lu <hongjiu.lu@intel.com>
3879 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
3880 on on undefined IFUNC symbol in the second PLT.
3882 2017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
3884 * peXXigen.c (pe_print_reloc): Correct chunk_end.
3886 2017-04-19 Alan Modra <amodra@gmail.com>
3888 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
3889 or make dynamic for info->dynamic_undefined_weak 0 and 1.
3890 * elf32-ppc.c:Formatting.
3891 (ensure_undefweak_dynamic): Don't make dynamic when
3892 info->dynamic_undefined_weak is zero.
3893 (allocate_dynrelocs): Discard undefweak dyn_relocs for
3894 info->dynamic_undefined_weak. Discard undef dyn_relocs when
3895 not default visibility. Discard undef and undefweak
3897 (ppc_elf_relocate_section): Adjust to suit.
3898 * elf64-ppc.c: Formatting.
3899 (ensure_undefweak_dynamic): Don't make dynamic when
3900 info->dynamic_undefined_weak is zero.
3901 (allocate_dynrelocs): Discard undefweak dyn_relocs for
3902 info->dynamic_undefined_weak. Discard them earlier.
3904 2017-04-17 H.J. Lu <hongjiu.lu@intel.com>
3907 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
3908 before generating the version definition section.
3910 2017-04-17 Alan Modra <amodra@gmail.com>
3912 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
3913 state when a regular object file defines a symbol with
3914 incompatible type to that defined by an earlier shared lib.
3916 2017-04-13 Alan Modra <amodra@gmail.com>
3918 * coffcode.h: Wrap some overly long _bfd_error_handler args.
3920 * elf32-arm.c: Likewise.
3921 * elf32-i386.c: Likewise.
3922 * elf32-mep.c: Likewise.
3923 * elf64-ia64-vms.c: Likewise.
3924 * elf64-x86-64.c: Likewise.
3925 * elflink.c: Likewise.
3926 * elfnn-ia64.c: Likewise.
3927 * elfxx-mips.c: Likewise.
3929 2017-04-13 Alan Modra <amodra@gmail.com>
3931 * aoutx.h: Use %B and %A in error messages throughout file.
3932 * aout-cris.c: Likewise.
3933 * archive.c: Likewise.
3934 * binary.c: Likewise.
3935 * coff-rs6000.c: Likewise.
3936 * coff-tic4x.c: Likewise.
3937 * coffcode.h: Likewise.
3938 * coffgen.c: Likewise.
3939 * cofflink.c: Likewise.
3940 * coffswap.h: Likewise.
3941 * cpu-arm.c: Likewise.
3942 * elf-eh-frame.c: Likewise.
3943 * elf-m10300.c: Likewise.
3945 * elf32-arc.c: Likewise.
3946 * elf32-arm.c: Likewise.
3947 * elf32-bfin.c: Likewise.
3948 * elf32-frv.c: Likewise.
3949 * elf32-iq2000.c: Likewise.
3950 * elf32-m32c.c: Likewise.
3951 * elf32-microblaze.c: Likewise.
3952 * elf32-nds32.c: Likewise.
3953 * elf32-rl78.c: Likewise.
3954 * elf32-rx.c: Likewise.
3955 * elf32-score.c: Likewise.
3956 * elf32-score7.c: Likewise.
3957 * elf32-sh64.c: Likewise.
3958 * elf32-v850.c: Likewise.
3959 * elf32-vax.c: Likewise.
3960 * elf32-visium.c: Likewise.
3961 * elf64-ia64-vms.c: Likewise.
3962 * elf64-mmix.c: Likewise.
3963 * elf64-sh64.c: Likewise.
3964 * elfcode.h: Likewise.
3965 * elfnn-aarch64.c: Likewise.
3966 * elfnn-ia64.c: Likewise.
3967 * elfxx-mips.c: Likewise.
3968 * hpux-core.c: Likewise.
3971 * linker.c: Likewise.
3972 * merge.c: Likewise.
3974 * oasys.c: Likewise.
3975 * pdp11.c: Likewise.
3976 * peXXigen.c: Likewise.
3977 * rs6000-core.c: Likewise.
3978 * vms-alpha.c: Likewise.
3979 * xcofflink.c: Likewise.
3981 2017-04-13 Alan Modra <amodra@gmail.com>
3983 * bfd.c (PRINT_TYPE): Define.
3984 (_doprnt): New function.
3985 (error_handler_internal): Use _doprnt.
3986 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
3987 calls in their natural order, throughout file.
3988 * coff-mcore.c: Likewise.
3989 * coff-ppc.c: Likewise.
3990 * coff-tic80.c: Likewise.
3991 * cofflink.c: Likewise.
3992 * elf-s390-common.c: Likewise.
3994 * elf32-arm.c: Likewise.
3995 * elf32-i386.c: Likewise.
3996 * elf32-m32r.c: Likewise.
3997 * elf32-msp430.c: Likewise.
3998 * elf32-spu.c: Likewise.
3999 * elf64-ia64-vms.c: Likewise.
4000 * elf64-sparc.c: Likewise.
4001 * elf64-x86-64.c: Likewise.
4002 * elflink.c: Likewise.
4003 * elfnn-aarch64.c: Likewise.
4004 * elfnn-ia64.c: Likewise.
4005 * elfxx-mips.c: Likewise.
4007 2017-04-13 Alan Modra <amodra@gmail.com>
4009 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
4010 branch veneers" error. Fix double space and format message.
4011 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
4012 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
4014 2017-04-13 Alan Modra <amodra@gmail.com>
4016 * bfd-in2.h: Regenerate.
4018 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
4020 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
4021 extra `\n' in warning/error messages.
4022 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
4023 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
4025 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
4027 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
4028 processor-specific properties with generic ELF target vector.
4030 2017-04-10 Qing Zhao <qing.zhao@oracle.com>
4032 * elf32-sparc.c (elf_backend_fixup_symbol): New.
4033 * elf64-sparc.c (elf_backend_fixup_symbol): New.
4034 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
4035 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
4037 (link_hash_newfunc): Initialize has_got_reloc and
4039 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
4041 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
4043 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
4045 (_bfd_sparc_elf_fixup_symbol): New function.
4046 (allocate_dynrelocs): Don't allocate space for dynamic
4047 relocations and discard relocations against resolved undefined
4048 weak symbols in executable. Don't make resolved undefined weak
4049 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
4050 relocation against undefined weak symbols in PIE.
4051 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
4052 relocations against resolved undefined weak symbols in PIE
4053 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
4054 without ynamic PLT/GOT relocations for resolved undefined weak
4056 Don't generate dynamic relocation against resolved undefined
4057 weak symbol in executable.
4058 (pie_finish_undefweak_symbol): New function.
4059 (_bfd_sparc_elf_finish_dynamic_sections): Call
4060 pie_finish_undefweak_symbol on all symbols in PIE.
4061 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
4062 (_bfd_sparc_elf_fixup_symbol): New function.
4064 2017-04-10 Nick Clifton <nickc@redhat.com>
4066 * config.bfd: Remove ns32k from obsolete list.
4068 2017-04-10 Alan Modra <amodra@gmail.com>
4071 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
4072 (special_sections_i): Likewise for .init_array.
4073 (special_sections_p): Likewise for .preinit_array.
4075 2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
4079 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
4080 ELF_COMMON_DEF_P for common symbols.
4081 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
4082 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
4083 * elflink.c (_bfd_elf_merge_symbol): Revert commits
4084 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
4085 07492f668d2173da7a2bda3707ff0985e0f460b6.
4087 2017-04-07 Pedro Alves <palves@redhat.com>
4089 * opncls.c (bfd_get_debug_link_info): Rename to...
4090 (bfd_get_debug_link_info_1): ... this. Change type of second
4091 parameter to void pointer. Adjust.
4092 (bfd_get_debug_link_info): Reimplement on top of
4093 bfd_get_debug_link_info_1.
4094 (separate_debug_file_exists, separate_alt_debug_file_exists):
4095 Change type of second parameter to void pointer. Adjust.
4096 (get_func_type, check_func_type): Change type of second parameter
4098 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
4099 the callback functions instead of passing the address of a local.
4100 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
4101 find_separate_debug_file.
4102 (get_alt_debug_link_info_shim): Change type of second parameter to
4103 void pointer. Adjust.
4104 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
4105 find_separate_debug_file.
4106 (get_build_id_name, bfd_boolean check_build_id_file): Change type
4107 of second parameter to void pointer. Adjust.
4108 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
4109 pointer local to find_separate_debug_file.
4111 2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
4113 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
4114 external symbols with a definition.
4115 (_bfd_coff_gc_mark_extra_sections): Fix typo.
4117 2017-04-07 Alan Modra <amodra@gmail.com>
4119 * po/SRC-POTFILES.in: Regenerate.
4121 2017-04-05 Alan Modra <amodra@gmail.com>
4123 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
4126 2017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
4128 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
4129 numbers for DataDirectory entry indicies passed to
4132 2017-04-04 H.J. Lu <hongjiu.lu@intel.com>
4134 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
4135 each GNU_MBIND section and align GNU_MBIND section to page size.
4136 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
4137 segment for each GNU_MBIND section.
4138 (_bfd_elf_init_private_section_data): Copy sh_info from input
4139 for GNU_MBIND section.
4141 2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
4143 * elfnn-riscv.c (GP_NAME): Delete.
4144 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
4145 (_bfd_riscv_relax_lui): Likewise.
4147 2017-04-04 Nick Clifton <nickc@redhat.com>
4150 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
4152 (bfd_elf_final_link): Only initialize the extended symbol index
4153 section if there are extended symbol tables to list.
4155 2017-04-03 H.J. Lu <hongjiu.lu@intel.com>
4157 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
4158 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
4159 * configure.ac (elf): Add elf-properties.lo.
4160 * Makefile.in: Regenerated.
4161 * configure: Likewise.
4162 * elf-bfd.h (elf_property_kind): New.
4163 (elf_property): Likewise.
4164 (elf_property_list): Likewise.
4165 (elf_properties): Likewise.
4166 (_bfd_elf_parse_gnu_properties): Likewise.
4167 (_bfd_elf_get_property): Likewise.
4168 (_bfd_elf_link_setup_gnu_properties): Likewise.
4169 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
4170 and setup_gnu_properties.
4171 (elf_obj_tdata): Add properties.
4172 * elf-properties.c: New file.
4173 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
4174 (elf_i386_merge_gnu_properties): Likewise.
4175 (elf_backend_parse_gnu_properties): Likewise.
4176 (elf_backend_merge_gnu_properties): Likewise.
4177 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
4178 (elf_x86_64_merge_gnu_properties): Likewise.
4179 (elf_backend_parse_gnu_properties): Likewise.
4180 (elf_backend_merge_gnu_properties): Likewise.
4181 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
4182 (elf_backend_parse_gnu_properties): Likewise.
4183 (elf_backend_setup_gnu_properties): Likewise.
4184 (elfNN_bed): Add elf_backend_parse_gnu_properties,
4185 elf_backend_merge_gnu_properties and
4186 elf_backend_setup_gnu_properties.
4188 2017-03-30 Pip Cet <pipcet@gmail.com>
4190 * elf32-wasm32.c: Add relocation code, two relocs.
4191 * reloc.c: Add wasm32 relocations.
4192 * libbfd.h: Regenerate.
4193 * bfd-in2.h: Regenerate.
4194 * bfd/po/bfd.pot: Regenerate.
4196 2017-03-29 Nick Clifton <nickc@redhat.com>
4199 * coff-bfd.h (struct coff_section_data): Add new fields:
4200 saved_bias and bias.
4201 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
4202 computed for PE binaries.
4203 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
4206 2017-03-28 Hans-Peter Nilsson <hp@axis.com>
4209 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
4210 to handle a local symbol with a hash-symbol-entry; without PLT.
4211 Add BFD_ASSERT for an incidental case with GOT entry present.
4212 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
4213 isn't forced-or-set local.
4215 2017-03-27 Pip Cet <pipcet@gmail.com>
4217 * wasm-module.c: New file to support WebAssembly modules.
4218 * wasm-module.h: New file to support WebAssembly modules.
4219 * doc/webassembly.texi: Start documenting wasm-module.c.
4220 * config.bfd: Add wasm_vec.
4221 * targets.c: Likewise.
4222 * configure.ac: Likewise.
4223 * Makefile.am: Add entries for wasm-module.c.
4224 * Makefile.in: Regenerate.
4225 * configure: Regenerate.
4226 * po/SRC-POTFILES.in: Regenerate.
4228 2017-03-27 Pip Cet <pipcet@gmail.com>
4230 * cpu-wasm32.c: New file to support wasm32 architecture.
4231 * elf32-wasm32.c: New file to support wasm32 architecture.
4232 * Makefile.am: Add wasm32 architecture.
4233 * archures.c: Likewise.
4234 * config.bfd: Likewise.
4235 * configure.ac: Likewise.
4236 * targets.c: Likewise.
4237 * Makefile.in: Regenerate.
4238 * bfd-in2.h: Regenerate.
4239 * configure: Regenerate.
4240 * po/SRC-POTFILES.in: Regenerate.
4242 2017-03-20 Alan Modra <amodra@gmail.com>
4245 * elf64-ppc.c (compare_symbols): Stabilize sort.
4247 2017-03-18 Alan Modra <amodra@gmail.com>
4249 * elf64-ppc.c (struct ppc_link_hash_table): Add
4250 local_ifunc_resolver and maybe_local_ifunc_resolver.
4251 (ppc_build_one_stub): Set flags on emitting dynamic
4252 relocation to ifunc.
4253 (ppc64_elf_relocate_section): Likewise.
4254 (ppc64_elf_finish_dynamic_symbol): Likewise.
4255 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
4256 local dynamic relocs to ifuncs.
4257 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
4258 local_ifunc_resolver and maybe_local_ifunc_resolver.
4259 (ppc_elf_relocate_section): Set flag on emitting dynamic
4260 relocation to ifuncs.
4261 (ppc_elf_finish_dynamic_symbol): Likewise.
4262 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
4263 dynamic relocs to ifuncs.
4265 2017-03-13 Nick Clifton <nickc@redhat.com>
4268 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
4269 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
4270 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
4271 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
4272 * bfd-in2.h: Regenerate.
4273 * libbfd.h: Regenerate.
4274 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
4276 (IS_AARCH64_TLSDESC_RELOC): Likewise.
4277 (elfNN_aarch64_howto_table): Likewise.
4278 (aarch64_tls_transition_without_check): Likewise.
4279 (aarch64_reloc_got_type): Likewise.
4280 (elfNN_aarch64_final_link_relocate): Likewise.
4281 (elfNN_aarch64_tls_relax): Likewise.
4282 (elfNN_aarch64_relocate_section): Likewise.
4283 (elfNN_aarch64_gc_sweep_hook): Likewise.
4284 (elfNN_aarch64_check_relocs): Likewise.
4285 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
4286 (_bfd_aarch64_elf_resolve_relocation): Likewise.
4288 2017-03-11 Alan Modra <amodra@gmail.com>
4290 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
4291 parameter is in fact used. Whitespace fixes.
4292 * elf64-ppc.c: Likewise.
4294 2017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
4296 * rs6000-core.c (CORE_NEW): Simplify macro when
4297 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
4299 2017-03-07 Alan Modra <amodra@gmail.com>
4303 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
4306 2017-03-05 Alan Modra <amodra@gmail.com>
4308 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
4309 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
4310 (next_cie_fde_offset): New function.
4311 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
4312 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
4313 four bytes. Align CIEs to four or eight bytes depending on
4314 per_encoding_aligned8. Align FDEs according to their encoding.
4315 Pad last FDE to output section alignment.
4316 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
4318 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
4319 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
4320 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
4322 2017-03-02 Martin Bickel <binutils@ineranves.de>
4325 * elf.c (rewrite_elf_program_header): Do not issue a warning for
4326 empty segments which have a zero filesz, but a non-zero memsz.
4328 2017-03-02 Alan Modra <amodra@gmail.com>
4330 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
4332 2017-02-28 Alan Modra <amodra@gmail.com>
4334 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
4335 (ppc64_elf_relocate_section): Likewise.
4337 2017-02-28 Alan Modra <amodra@gmail.com>
4340 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
4341 rather than elf32_nios2_hash_table or elf_hash_table.
4342 (create_got_section): Likewise.
4343 (nios2_elf32_finish_dynamic_symbol): Likewise.
4344 (nios2_elf32_adjust_dynamic_symbol): Likewise.
4345 (nios2_elf32_size_dynamic_sections): Likewise.
4346 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
4347 vars. Use htab equivalents directly instead. Don't create
4348 all dynamic sections on needing just the GOT. Use a goto
4349 rather than a fall-through with reloc test. Ensure
4350 htab->dynobj is set when making dynamic sreloc section.
4351 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
4352 equivalent directly instead. Don't segfault on looking for
4353 .dynamic when dynamic sections have not been created. Don't
4354 segfault on .got.plt being discarded.
4355 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
4356 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
4357 fixme and another not so relevant comment.
4358 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
4359 already set, set hash table dynobj on creating .sbss.
4361 2017-02-28 Alan Modra <amodra@gmail.com>
4363 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
4364 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
4365 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
4366 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
4367 (ppc64_elf_relocate_section): Likewise.
4368 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
4369 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
4370 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
4371 * libbfd.h: Regenerate.
4372 * bfd-in2.h: Regenerate.
4374 2017-02-28 Alan Modra <amodra@gmail.com>
4376 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
4377 dynamic .data.rel.ro read-only.
4378 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
4379 rather than section flags when deciding where copy reloc goes.
4380 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
4381 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
4382 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
4383 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
4384 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
4385 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
4386 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
4387 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
4388 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
4389 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
4390 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
4391 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
4392 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
4393 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
4394 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
4395 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
4396 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
4397 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
4398 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
4400 2017-02-28 Maciej W. Rozycki <macro@imgtec.com>
4402 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
4403 `jalr $0, $25' instruction encoding.
4405 2017-02-27 Nick Clifton <nickc@redhat.com>
4408 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
4409 generating a seg-fault when encountering a symbol that has been
4410 deleted by garbage collection.
4412 2017-02-25 Alan Modra <amodra@gmail.com>
4414 * elf32-arc.c (struct dynamic_sections): Delete.
4415 (enum dyn_section_types): Delete.
4416 (dyn_section_names): Delete.
4417 (arc_create_dynamic_sections): Delete.
4418 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
4419 segfault on discarded .rela.plt section.
4420 (elf_arc_size_dynamic_sections): Formatting. Don't call
4421 arc_create_dynamic_sections. Don't allocate memory for sections
4422 handled by the generic linker. Correct code finding relocs in
4423 read-only sections. Set SEC_EXCLUDE on zero size .got,
4424 .got.plt, and .dynbss sections. Do set .interp for pies.
4426 2017-02-24 Andrew Waterman <andrew@sifive.com>
4428 * elfnn-riscv.c (GP_NAME): New macro.
4429 (riscv_global_pointer_value): Use it.
4430 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
4431 output section, consider only that section's alignment.
4433 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
4435 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
4436 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
4437 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
4438 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
4440 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
4442 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
4443 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
4446 2017-02-23 Alan Modra <amodra@gmail.com>
4449 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
4451 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
4452 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
4455 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
4458 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
4459 processing ahead of the call to `elf_gc_sweep_symbol'.
4461 2017-02-22 Nick Clifton <nickc@redhat.com>
4464 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
4465 created section 4-byte alignment.
4467 2017-02-22 Alan Modra <amodra@gmail.com>
4469 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
4470 on .got or .plt output section being discarded by script.
4471 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
4474 2017-02-21 Alan Modra <amodra@gmail.com>
4476 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
4477 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
4479 2017-02-20 Alan Modra <amodra@gmail.com>
4482 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
4483 if DT_RELSZ/DT_RELASZ is zero.
4485 2017-02-17 Nick Clifton <nickc@redhat.com>
4487 * compress.c (bfd_get_full_section_contents): Remember to reduce
4488 compressed size by the sizeof the compression header when
4489 decompressing the contents.
4491 2017-02-17 Pedro Alves <palves@redhat.com>
4493 * srec.c (Chunk): Rename to ...
4494 (_bfd_srec_len): ... this.
4495 (S3Forced): Rename to ...
4496 (_bfd_srec_forceS3): ... this.
4497 * objcopy.c: Adjust all references.
4499 2017-02-17 Pedro Alves <palves@redhat.com>
4501 * archive.c (bsd_write_armap): Rename to ...
4502 (_bfd_bsd_write_armap): ... this.
4503 (coff_write_armap): Rename to ...
4504 (_bfd_coff_write_armap): ... this.
4505 * libbfd-in.h (bsd_write_armap): Rename to ...
4506 (_bfd_bsd_write_armap): ... this.
4507 (coff_write_armap): Rename to ...
4508 (_bfd_coff_write_armap): ... this.
4509 * aout-target.h, aout-tic30.c: Adjust all users.
4510 * libbfd.h: Regenerate.
4512 2017-02-17 Pedro Alves <palves@redhat.com>
4514 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
4515 (warn_deprecated): Rename to ...
4516 (_bfd_warn_deprecated): ... this.
4517 * libbfd.c (warn_deprecated): Rename to ...
4518 (_bfd_warn_deprecated): ... this.
4519 * bfd-in2.h: Regenerate.
4521 2017-02-17 Pedro Alves <palves@redhat.com>
4523 * bfdio.c (real_ftell): Rename to ...
4524 (_bfd_real_ftell): ... this.
4525 (real_fseek): Rename to ...
4526 (_bfd_real_fseek): ... this.
4527 (real_fopen): Rename to ...
4528 (_bfd_real_fopen): ... this.
4529 * libbfd-in.h (real_ftell): Rename to ...
4530 (_bfd_real_ftell): ... this.
4531 (real_fseek): Rename to ...
4532 (_bfd_real_fseek): ... this.
4533 (real_fopen): Rename to ...
4534 (_bfd_real_fopen): ... this.
4535 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
4536 * libbfd.h: Regenerate.
4538 2017-02-17 Pedro Alves <palves@redhat.com>
4540 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
4541 * libbfd.c (read_unsigned_leb128): Rename to ...
4542 (_bfd_read_unsigned_leb128): ... this.
4543 (read_signed_leb128): Rename to ...
4544 (_bfd_read_signed_leb128): ... this.
4545 (safe_read_leb128): Rename to ...
4546 (_bfd_safe_read_leb128): ... this.
4547 * libbfd-in.h (read_unsigned_leb128): Rename to ...
4548 (_bfd_read_unsigned_leb128): ... this.
4549 (read_signed_leb128): Rename to ...
4550 (_bfd_read_signed_leb128): ... this.
4551 (safe_read_leb128): Rename to ...
4552 (_bfd_safe_read_leb128): ... this.
4553 * libbfd.h: Renegerate.
4555 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
4557 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
4558 before trying to fine matching file and line information.
4560 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
4562 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
4563 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
4564 not match current bfd, then reload debug information. Record bfd
4565 we're loading debug info for in the stash. If we have debug
4566 informatin in the cache then perform section placement before
4569 2017-02-16 Alan Modra <amodra@gmail.com>
4572 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
4573 * elfxx-target.h (elf_backend_no_page_alias): Define.
4574 (elfNN_bed): Init new field.
4575 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
4576 ensure PT_LOAD segment starts on a new page.
4577 * elf32-hppa.c (elf_backend_no_page_alias): Define.
4579 2017-02-16 Alan Modra <amodra@gmail.com>
4582 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
4585 2017-02-16 Jiong Wang <jiong.wang@arm.com>
4587 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
4588 * bfd-in2.h: Regenerated.
4590 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
4593 * elf32-i386.c (elf_i386_relocate_section): Allow
4594 "lea foo@GOT, %reg" in PIC.
4596 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
4599 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
4600 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
4601 error against local IFUNC symbol without a base register for
4604 2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
4606 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
4607 `%P: %H:' with `info->callbacks->einfo'.
4608 (ppc_elf_relocate_section): Likewise.
4609 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
4610 (ppc64_elf_edit_toc): Likewise.
4611 (ppc64_elf_relocate_section): Likewise.
4613 2017-02-14 Alan Modra <amodra@gmail.com>
4615 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
4616 --gc-keep-exported, and test versioned field of sym rather than
4617 looking for @ in name.
4619 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
4621 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
4624 2017-02-13 Nick Clifton <nickc@redhat.com>
4627 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
4630 2017-02-07 Andrew Waterman <andrew@sifive.com>
4632 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
4633 entry size if PLT header is written.
4635 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
4637 Fix sparc64 dynamic relocation processing to use the dynamic
4639 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
4640 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
4643 2017-02-03 Nick Clifton <nickc@redhat.com>
4646 * coffcode.h (coff_write_object_contents): Enlarge size of
4647 s_name_buf in order to avoid compile time warning about possible
4649 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
4650 32-bits of insn value before printing into buffer.
4652 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4654 * elfxx-mips.c (mips_elf_hash_sort_data): Add
4655 `max_local_dynindx'.
4656 (mips_elf_sort_hash_table): Handle it.
4657 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
4658 symbols bump up `max_local_dynindx' rather than
4659 `max_non_got_dynindx'.
4661 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4663 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
4664 `min_got_dynindx', `max_unref_got_dynindx' and
4665 `max_non_got_dynindx' members to the `bfd_size_type' data type.
4666 (mips_elf_sort_hash_table): Adjust accordingly.
4668 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4670 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
4671 to access the hash table.
4673 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4675 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
4676 non-NULL `htab' to the beginning.
4678 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4680 * elflink.c (elf_gc_sweep): Wrap overlong line.
4682 2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
4684 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
4685 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
4686 * elfxx-mips.c (mips_elf_link_hash_table): Add
4687 `ignore_branch_isa' member.
4688 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
4689 in branch relocation calculation as an error if
4690 `ignore_branch_isa' has been set.
4691 (_bfd_mips_elf_insn32): Rename to...
4692 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
4693 parameter to `insn32' and add an `ignore_branch_isa' parameter.
4694 Handle the new parameter.
4696 2017-01-27 Hans-Peter Nilsson <hp@axis.com>
4698 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
4699 local variable dynobj.
4702 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
4703 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
4704 executable from read-only sections into sdynrelro.
4705 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
4706 dynamic relocs in sdynrelro.
4707 (elf_backend_want_dynrelro): Define.
4709 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4711 * config.bfd (*-*-rtemsaout*): Mark as removed.
4713 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4715 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
4716 (arm-*-rtems*): Move to (arm*-*-eabi*).
4717 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
4718 (m68-*-rtems*): Move to (m68*-*-elf*).
4720 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4722 * config.bfd (*-*-rtemscoff*): Mark as removed.
4724 2017-01-24 Maciej W. Rozycki <macro@imgtec.com>
4727 * elflink.c (bfd_elf_record_link_assignment): Revert last
4728 change and don't ever clear `forced_local'. Set `mark'
4730 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
4732 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
4733 (bfd_elf_size_dynamic_sections): ... here.
4734 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
4735 and set `mark' instead in `__tls_get_addr_opt' processing.
4736 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
4738 2017-01-24 Alan Modra <amodra@gmail.com>
4740 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
4741 where dynamic relocs are preferable. Allow ifunc too.
4742 (ensure_undefweak_dynamic): New function.
4743 (allocate_dynrelocs): Use it here. Move plt handling last and
4744 don't make symbols dynamic, simplifying loop. Only make undef
4745 weak symbols with GOT entries dynamic. Correct condition
4746 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
4747 comments. Remove goto.
4748 (ppc_elf_relocate_section): Correct test for using dynamic
4749 symbol on GOT relocs. Rearrange test for emitting GOT relocs
4750 to suit. Set up explicit tls_index entries and implicit GOT
4751 tls_index entries resolvable at link time for
4752 __tls_get_addr_opt. Simplify test to clear mem for prelink.
4753 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
4754 (ensure_undefweak_dynamic): New function.
4755 (allocate_dynrelocs): Use it here. Only make undef weak symbols
4756 with GOT entries dynamic. Remove unnecessary test of
4757 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
4758 (ppc64_elf_relocate_section): Correct test for using dynamic
4759 symbol on GOT relocs. Rearrange test for emitting GOT relocs
4760 to suit. Set up explicit tls_index entries and implicit GOT
4761 tls_index entries resolvable at link time for __tls_get_addr_opt.
4762 Simplify expression to clear mem for prelink.
4764 2017-01-23 Yury Norov <ynorov@caviumnetworks.com>
4766 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
4768 2017-01-20 Jiong Wang <jiong.wang@arm.com>
4770 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
4771 (elf_backend_hash_symbol): Define.
4773 2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
4776 * elflink.c (bfd_elf_record_link_assignment): Clear any
4777 `forced_local' marking for DSO symbols that are not being
4780 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
4782 * elfnn-riscv.c (riscv_elf_object_p): New function.
4784 2017-01-12 H.J. Lu <hongjiu.lu@intel.com>
4787 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
4789 (elf_x86_64_check_relocs): Create .eh_frame section for the
4791 (elf_x86_64_size_dynamic_sections): Allocate and initialize
4792 .eh_frame section for the .plt.bnd section.
4793 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
4794 for the .plt.bnd section.
4796 2017-01-12 Nick Clifton <nickc@redhat.com>
4799 * opncls.c (find_separate_debug_file): Add include_dirs
4800 parameter. Only include the directory part of the bfd's filename
4801 in search paths if include_dirs is true. Add a couple of extra
4802 locations for looking for debug files.
4803 ( bfd_follow_gnu_debuglink): Update invocation of
4804 find_separate_debug_file.
4805 (bfd_follow_gnu_debugaltlink): Likewise.
4806 (get_build_id): New function: Finds the build-id of the given bfd.
4807 (get_build_id_name): New function: Computes the name of the
4808 separate debug info file for a bfd, based upon its build-id.
4809 (check_build_id_file): New function: Checks to see if a separate
4810 debug info file exists at the given location, and that its
4811 build-id matches that of the original bfd.
4812 (bfd_follow_build_id_debuglink): New function: Finds a separate
4813 debug info file for a given bfd by using the build-id method.
4814 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
4815 method of locating a separate debug info file before using the
4817 * bfd-in2.h: Regenerate.
4819 2017-01-11 H.J. Lu <hongjiu.lu@intel.com>
4822 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
4823 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
4824 elf_x86_64_eh_frame_plt_got.
4825 (elf_x86_64_size_dynamic_sections): Get unwind info from
4826 elf_x86_64_bnd_arch_bed for the BND PLT.
4828 2017-01-11 Jeremy Soller <jackpot51@gmail.com>
4830 * config.bfd: Add entries for i686-redox and x86_64-redox.
4832 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4834 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
4836 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
4837 .eh_frame section to 4 bytes for x32.
4838 (elf_x86_64_check_relocs): Likewise.
4840 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4843 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
4844 (PLT_GOT_FDE_LENGTH): Likewise.
4845 (elf_i386_plt_layout): Add eh_frame_plt_got and
4846 eh_frame_plt_got_size.
4847 (elf_i386_plt): Updated.
4848 (elf_i386_link_hash_table): Add plt_got_eh_frame.
4849 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
4850 (elf_i386_size_dynamic_sections): Allocate and initialize
4851 .eh_frame section for .plt.got.
4852 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
4854 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
4855 eh_frame_plt_got_size.
4856 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
4857 (PLT_GOT_FDE_LENGTH): Likewise.
4858 (elf_x86_64_backend_data): Add eh_frame_plt_got and
4859 eh_frame_plt_got_size.
4860 (elf_x86_64_arch_bed): Updated.
4861 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
4862 eh_frame_plt_got_size.
4863 (elf_x86_64_nacl_arch_bed): Likewise.
4864 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
4865 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
4866 (elf_x86_64_size_dynamic_sections): Allocate and initialize
4867 .eh_frame section for .plt.got.
4868 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
4871 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4873 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
4874 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
4876 2017-01-09 Nick Clifton <nickc@redhat.com>
4878 * dwarf2.c (lookup_address_in_function_table): Return early if
4879 there are no functions in the given comp unit, or if the high
4880 address of the last function in the comp unit is less than the
4883 2017-01-09 Nick Clifton <nickc@redhat.com>
4886 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
4887 message if there are too many symbols to load.
4889 2017-01-04 James Clarke <jrtc27@jrtc27.com>
4891 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
4892 if relocs are cached.
4894 2017-01-03 Rich Felker <bugdal@aerifal.cx>
4897 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
4898 for R_MICROBLAZE_GOTOFF_64.
4900 2017-01-03 Nick Clifton <nickc@redhat.com>
4902 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
4903 warning about using a possibly uninitialised variable.
4905 2017-01-02 Alan Modra <amodra@gmail.com>
4907 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
4908 (allocate_plt_static, allocate_dynrelocs): Use it.
4910 2017-01-02 Alan Modra <amodra@gmail.com>
4912 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
4913 .PARISC.unwind section.
4915 2017-01-02 Alan Modra <amodra@gmail.com>
4918 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
4919 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
4920 indirect to GOT pointer relative code edit.
4922 2017-01-02 Alan Modra <amodra@gmail.com>
4924 Update year range in copyright notice of all files.
4926 For older changes see ChangeLog-2016
4928 Copyright (C) 2017 Free Software Foundation, Inc.
4930 Copying and distribution of this file, with or without modification,
4931 are permitted in any medium without royalty provided the copyright
4932 notice and this notice are preserved.
4938 version-control: never