1 2017-11-14 Alan Modra <amodra@gmail.com>
3 * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for user
6 2017-11-13 Jan Beulich <jbeulich@suse.com>
8 * coff-tic80.c (COFF_ENCODE_ALIGNMENT, COFF_DECODE_ALIGNMENT):
10 * coffcode.h (coff_set_alignment_hook): Drop tic80 special case.
11 (coff_write_object_contents): Likewise. Issue diagnostic for too
14 2017-11-12 H.J. Lu <hongjiu.lu@intel.com>
17 * elf.c (_bfd_elf_map_sections_to_segments): Remove PF_X from
20 2017-11-12 Alan Modra <amodra@gmail.com>
22 * elflink.c (elf_link_add_object_symbols): Ignore anything but
23 defined and defweak symbols when setting up weakdefs.
25 2017-11-12 Alan Modra <amodra@gmail.com>
27 * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Set non_got_ref
28 to keep dyn_relocs, clear to discard. Comment.
29 (allocate_dynrelocs): Always clear non_got_ref when clearing
30 dyn_relocs in non-pic case. Invert non_got_ref test. Also test
31 dynamic_adjusted and ELF_COMMON_DEF_P. Move code deleting
32 dyn_relocs on undefined syms to handle for non-pic too.
33 (elf32_hppa_relocate_section): Simplify test for non-pic dyn relocs.
34 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Set non_got_ref
35 to keep dyn_relocs, clear to discard. Comment.
36 (allocate_dynrelocs): Always clear non_got_ref when clearing
37 dyn_relocs in non-pic case. Invert non_got_ref test. Also test
38 dynamic_adjusted and ELF_COMMON_DEF_P. Move code deleting
39 dyn_relocs on undefined syms to handle for non-pic too.
40 (ppc_elf_relocate_section): Simplify test for non-pic dyn relocs.
41 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Discard
42 dyn_relocs here. Don't bother setting non_got_ref. Comment.
43 (allocate_dynrelocs): Delete special handling of non-pic ELFv2
44 ifuncs. Move code deleting dyn_relocs on undefined symbols to
45 handle for non-pic too. Don't test non_got_ref. Do test
46 dynamic_adjusted and ELF_COMMON_DEF_P.
48 2017-11-08 Djordje Todorovic <djordje.todorovic@rt-rk.com>
50 * elf32-mips.c (elf32_mips_grok_psinfo): Extract core->pid.
51 * elf64-mips.c (elf64_mips_grok_psinfo): Likewise.
52 * elfn32-mips.c (elf32_mips_grok_psinfo): Likewise.
54 2017-11-08 Djordje Todorovic <djordje.todorovic@rt-rk.com>
56 * elf32-mips.c (elf32_mips_write_core_note): New function.
57 (elf_backend_write_core_note): New macro.
58 * elf64-mips.c (elf64_mips_write_core_note): New function.
59 (elf_backend_write_core_note): New macro.
60 * elfn32-mips.c (elf32_mips_write_core_note): New function.
61 (elf_backend_write_core_note): New macro.
63 2017-11-07 Alan Modra <amodra@gmail.com>
65 * elf64-ppc.c (ppc64_elf_build_stubs): Correct pluralization in
68 2017-11-07 Alan Modra <amodra@gmail.com>
70 * sysdep.h: Formatting, comment fixes.
71 (gettext, ngettext): Redefine when ENABLE_NLS.
72 (ngettext, dngettext, dcngettext): Define when !ENABLE_NLS.
73 (_): Define using gettext.
74 (textdomain, bindtextdomain): Use safer "do nothing".
75 * hosts/alphavms.h (textdomain, bindtextdomain): Likewise.
76 (ngettext, dngettext, dcngettext): Define when !ENABLE_NLS.
78 2017-11-05 Alan Modra <amodra@gmail.com>
81 * bfd.c (_bfd_doprnt_scan): Check args index before storing, not
84 2017-11-05 Alan Modra <amodra@gmail.com>
87 * bfd.c (union _bfd_doprnt_args): New.
88 (PRINT_TYPE): Add FIELD arg. Take value from args.
89 (_bfd_doprnt): Replace ap parameter with args. Adjust all
90 PRINT_TYPE invocations and reading of format args to suit.
91 Move "%%" handling out of switch handling args. Support
92 positional parameters.
93 (_bfd_doprnt_scan): New function.
94 (error_handler_internal): Call _bfd_doprnt_scan and read args.
96 2017-11-04 Alan Modra <amodra@gmail.com>
98 * elf32-ppc.c (got_entries_needed, got_relocs_needed): New functions.
99 (allocate_dynrelocs, ppc_elf_size_dynamic_sections): Use them here.
100 (ppc_elf_relocate_section): Don't output a dynamic relocation
101 for IE GOT entries in an executable.
102 * elf64-ppc.c (allocate_got): Trim unnecessary TPREL relocs.
103 (ppc64_elf_size_dynamic_sections): Likewise.
104 (ppc64_elf_relocate_section): Likewise.
106 2017-11-04 Alan Modra <amodra@gmail.com>
108 * elf32-ppc.c (readonly_dynrelocs): Delete info param. Update all
109 callers. Don't bother with SEC_ALLOC test. Return section pointer.
111 (maybe_set_textrel): ..here.
112 * elf64-ppc.c (readonly_dynrelocs): Return section pointer.
113 (maybe_set_textrel): Call minfo to print textrel warning to map file.
115 2017-11-04 Alan Modra <amodra@gmail.com>
117 * elf32-hppa.c (enum _tls_type): Move.
118 (struct elf32_hppa_link_hash_entry): Make tls_type a bitfield.
119 (elf32_hppa_check_relocs): Set DF_STATIC_TLS only for shared libraries.
120 Tidy tls_type handling. Set symbol tls_type for GOT_TLS_LDM too.
121 (got_entries_needed, got_relocs_needed): New functions.
122 (allocate_dynrelocs): Use them.
123 (elf32_hppa_size_dynamic_sections): Likewise.
124 (elf32_hppa_relocate_section): Delete bogus FIXME. Formatting.
125 Correct code emitting relocs on GD/IE got entries. Report an
126 error when a symbol has both normal and TLS GOT relocs.
128 2017-11-04 Alan Modra <amodra@gmail.com>
131 * elf32-hppa.c (elf32_hppa_check_relocs): Don't create dyn_relocs
132 for plabels when non-pic.
133 (maybe_set_textrel): New function.
134 (readonly_dynrelocs): Move and rewrite.
135 (elf32_hppa_adjust_dynamic_symbol): Use it. Don't create copy
136 relocs when def_regular or -z nocopyreloc. Handle non_got_ref
137 for functions. Expand non_got_ref comments.
138 (elf32_hppa_size_dynamic_sections): Use maybe_set_textrel.
140 2017-11-03 H.J. Lu <hongjiu.lu@intel.com>
142 * elf32-i386.c (elf_i386_check_relocs): Set plt.refcount to 1.
143 Don't use func_pointer_refcount. Don't set plt.refcount nor
144 non_got_ref for function pointer reference.
145 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
146 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Don't use
147 func_pointer_refcount.
148 (_bfd_x86_elf_copy_indirect_symbol): Don't copy
149 func_pointer_refcount.
150 (_bfd_x86_elf_hide_symbol): Don't use func_pointer_refcount.
151 * elfxx-x86.h (GENERATE_DYNAMIC_RELOCATION_P): Likewise.
152 (elf_x86_link_hash_entry): Remove func_pointer_refcount.
154 2017-11-03 Mingi Cho <mgcho.minic@gmail.com>
155 Nick Clifton <nickc@redhat.com>
158 * coffgen.c (_bfd_coff_get_external_symbols): Check for an
159 overlarge raw syment count.
160 (coff_get_normalized_symtab): Likewise.
162 2017-11-01 James Bowman <james.bowman@ftdichip.com>
164 * archures.c: Add bfd_mach_ft32b.
165 * cpu-ft32.c: Add arch_info_struct.
166 * elf32-ft32.c: Add R_FT32_RELAX, SC0, SC1,
168 (ft32_elf_relocate_section): Add clauses for R_FT32_SC0, SC1,
170 (ft32_reloc_shortable, elf32_ft32_is_diff_reloc)
171 (elf32_ft32_adjust_diff_reloc_value)
172 (elf32_ft32_adjust_reloc_if_spans_insn)
173 (elf32_ft32_relax_delete_bytes, elf32_ft32_relax_is_branch_target)
174 (ft32_elf_relax_section): New function.
175 * reloc.c: Add BFD_RELOC_FT32_RELAX, SC0, SC1, DIFF32.
176 * bfd-in2.h: Regenerate.
177 * libbfd.h: Regenerate.
179 2017-11-01 Nick Clifton <nickc@redhat.com>
182 * coffcode.h (coff_slurp_line_table): Check for an excessively
183 large line number count.
185 2017-11-01 Nick Clifton <nickc@redhat.com>
188 * peicode.h (pe_bfd_read_buildid): Revise check for invalid size
189 and offset in light of further possible bogus values.
191 2017-11-01 Alan Modra <amodra@gmail.com>
194 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't create a plt
195 entry when just a dynamic reloc can serve. Ensure no dynamic
196 relocations when UNDEFWEAK_NO_DYNAMIC_RELOC by setting non_got_ref.
197 Expand and move the non_got_ref comment.
198 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
200 2017-11-01 Nick Clifton <nickc@redhat.com>
203 * coffgen.c (_bfd_coff_free_symbols): Fail if called on a non-COFF
205 * cofflink.c (coff_link_check_archive_element): Skip non-COFF
206 members of an archive.
208 2017-10-31 Nick Clifton <nickc@redhat.com>
211 * peicode.h (pe_bfd_read_buildid): Check for invalid size and data
214 2017-10-30 Alan Modra <amodra@gmail.com>
216 * elf32-frv.c (ELF_TARGET_ID): Don't define for generic
219 * elflink.c (elf_gc_sweep): Test elf_object_id in addition to
221 (bfd_elf_gc_sections): Likewise.
223 2017-10-30 Alan Modra <amodra@gmail.com>
226 * elf32-hppa.c (elf32_hppa_check_relocs): Move SEC_ALLOC test to
227 ensure non_got_ref is not set due to debug references.
228 (elf32_hppa_adjust_dynamic_symbol): Tidy plabel handling. Use
229 SYMBOL_CALLS_LOCAL and UNDEFWEAK_NO_DYNAMIC_RELOC when determining
230 need for a plt entry.
231 (allocate_dynrelocs): Similarly for got entries. Tidy code discarding
232 dynamic relocs when pic. Remove bogus code attempting to handle
234 (elf32_hppa_relocate_section): Similarly. Delete resolved_to_zero
236 (elf32_hppa_finish_dynamic_symbol): Use UNDEFWEAK_NO_DYNAMIC_RELOC
237 and SYMBOL_REFERENCES_LOCAL in GOT handling.
239 2017-10-28 Alan Modra <amodra@gmail.com>
242 * elflink.c (_bfd_elf_merge_symbol): Remove relocs_compatible check.
243 * elf32-hppa.c (elf_backend_relocs_compatible): Define.
244 * elf32-ppc.c (elf_backend_relocs_compatible): Define.
245 * elf64-ppc.c (elf_backend_relocs_compatible): Define.
247 2017-10-25 Alan Modra <amodra@gmail.com>
249 * archive.c (_bfd_compute_and_write_armap): Match "__gnu_lto_slim"
250 optionally prefixed with "_".
251 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
253 2017-10-24 Andrew Waterman <andrew@sifive.com>
255 * elfnn-riscv.c (_bfd_riscv_relax_lui): Don't relax to c.lui
258 2017-10-24 Renlin Li <renlin.li@arm.com>
261 * elflink.c (_bfd_elf_merge_symbol): Handle multiple definition case.
263 2017-10-23 Nick Clifton <nickc@redhat.com>
266 * elflink.c (elf_link_output_extsym): Keep global undefined
267 symbols if they have been marked as needed.
269 2017-10-23 Maciej W. Rozycki <macro@imgtec.com>
271 * elfn32-mips.c (mips_elf_n32_mkobject): New prototype and
273 (bfd_elf32_mkobject): Use `mips_elf_n32_mkobject' rather than
274 `_bfd_mips_elf_mkobject'.
276 2017-10-22 Hans-Peter Nilsson <hp@axis.com>
279 * config.bfd (cris-*-* | crisv32-*-*): Require a 64-bit BFD.
281 2017-10-19 Palmer Dabbelt <palmer@dabbelt.com>
283 * elfnn-riscv.c (riscv_pcgp_hi_reloc): New structure.
284 (riscv_pcgp_lo_reloc): Likewise.
285 (riscv_pcgp_relocs): Likewise.
286 (riscv_init_pcgp_relocs): New function.
287 (riscv_free_pcgp_relocs): Likewise.
288 (riscv_record_pcgp_hi_reloc): Likewise.
289 (riscv_record_pcgp_lo_reloc): Likewise.
290 (riscv_delete_pcgp_hi_reloc): Likewise.
291 (riscv_use_pcgp_hi_reloc): Likewise.
292 (riscv_record_pcgp_lo_reloc): Likewise.
293 (riscv_find_pcgp_lo_reloc): Likewise.
294 (riscv_delete_pcgp_lo_reloc): Likewise.
295 (_bfd_riscv_relax_pc): Likewise.
296 (_bfd_riscv_relax_section): Handle R_RISCV_PCREL_* relocations
297 via the new functions above.
299 2017-10-19 Palmer Dabbelt <palmer@dabbelt.com>
301 * elfnn-riscv.c (R_RISCV_DELETE): New define.
302 (_bfd_riscv_relax_delete): New function.
303 (perform_relocation): Handle R_RISCV_DELETE.
304 (_bfd_riscv_relax_section): Likewise.
306 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
309 * elfxx-tilegx.c (tilegx_elf_tls_transition): Replace
310 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
311 bfd_link_executable for TLS check.
312 (tilegx_elf_check_relocs): Likewise.
313 (allocate_dynrelocs): Likewise.
314 (tilegx_elf_relocate_section): Likewise.
316 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
319 * elf32-tilepro.c (tilepro_elf_tls_transition): Replace
320 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
321 bfd_link_executable for TLS check.
322 (tilepro_elf_check_relocs): Likewise.
323 (allocate_dynrelocs): Likewise.
324 (tilepro_elf_relocate_section): Likewise.
326 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
329 * elfxx-sparc.c (sparc_elf_tls_transition): Replace
330 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
331 bfd_link_executable for TLS check.
332 (_bfd_sparc_elf_check_relocs): Likewise.
333 (allocate_dynrelocs): Likewise.
334 (_bfd_sparc_elf_relocate_section): Likewise.
336 2017-10-18 H.J. Lu <hongjiu.lu@intel.com>
338 * elf32-tilepro.c (tilepro_elf_gc_mark_hook): Call
339 _bfd_generic_link_add_one_symbol to mark __tls_get_addr.
340 * elfxx-tilegx.c (tilegx_elf_gc_mark_hook): Likewise.
342 2017-10-17 H.J. Lu <hongjiu.lu@intel.com>
344 * elf32-microblaze.c (microblaze_elf_check_relocs): Check for
345 indirect and warning symbols.
347 2017-10-17 Alan Modra <amodra@gmail.com>
350 * elf-properties.c (_bfd_elf_parse_gnu_properties): Compare datasz
351 against size left rather than comparing pointers. Reorganise loop.
353 2017-10-17 Alan Modra <amodra@gmail.com>
356 * aoutx.h (aout_get_external_symbols): Handle stringsize of zero,
357 and error for any other size that doesn't cover the header word.
359 2017-10-16 H.J. Lu <hongjiu.lu@intel.com>
361 * elf-bfd.h (elf_backend_data): Remove gc_sweep_hook.
362 * elf32-arm.c (elf32_arm_gc_sweep_hook): Removed.
363 (elf_backend_gc_sweep_hook): Likewise.
364 * elf32-bfin.c (bfin_gc_sweep_hook): Likewise.
365 (bfinfdpic_gc_sweep_hook): Likewise.
366 (elf_backend_gc_sweep_hook): Likewise.
367 * elf32-cr16.c (elf32_cr16_gc_sweep_hook): Likewise.
368 (elf_backend_gc_sweep_hook): Likewise.
369 * elf32-cris.c (cris_elf_gc_sweep_hook): Likewise.
370 (elf_backend_gc_sweep_hook): Likewise.
371 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Likewise.
372 (elf_backend_gc_sweep_hook): Likewise.
373 * elf32-lm32.c (lm32_elf_gc_sweep_hook): Likewise.
374 (elf_backend_gc_sweep_hook): Likewise.
375 * elf32-m32r.c (m32r_elf_gc_sweep_hook): Likewise.
376 (elf_backend_gc_sweep_hook): Likewise.
377 * elf32-m68k.c (elf_m68k_got_entry): Remove elf_m68k_gc_sweep_hook
379 (elf_m68k_remove_got_entry_type): Removed.
380 (elf_m68k_find_got_entry_ptr): Likewise.
381 (elf_m68k_remove_got_entry): Likewise.
382 (elf_m68k_gc_sweep_hook): Likewise.
383 (elf_backend_gc_sweep_hook): Likewise.
384 * elf32-mcore.c (mcore_elf_gc_sweep_hook): Likewise.
385 (elf_backend_gc_sweep_hook): Likewise.
386 * elf32-metag.c (elf_metag_gc_sweep_hook): Likewise.
387 (elf_backend_gc_sweep_hook): Likewise.
388 * elf32-microblaze.c (elf_backend_gc_sweep_hook): Likewise.
389 (elf_backend_gc_sweep_hook): Likewise.
390 * elf32-mips.c (elf_backend_gc_sweep_hook): Likewise.
391 (elf_backend_gc_sweep_hook): Likewise.
392 * elf32-nds32.c (nds32_elf_gc_sweep_hook): Likewise.
393 (elf_backend_gc_sweep_hook): Likewise.
394 * elf32-nios2.c (nios2_elf32_gc_sweep_hook): Likewise.
395 (elf_backend_gc_sweep_hook): Likewise.
396 * elf32-or1k.c (or1k_elf_gc_sweep_hook): Likewise.
397 (elf_backend_gc_sweep_hook): Likewise.
398 * elf32-ppc.c (ppc_elf_gc_sweep_hook): Likewise.
399 (elf_backend_gc_sweep_hook): Likewise.
400 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
401 (elf_backend_gc_sweep_hook): Likewise.
402 * elf32-sparc.c (elf_backend_gc_sweep_hook): Likewise.
403 * elf32-tic6x.c (elf32_tic6x_gc_sweep_hook): Likewise.
404 (elf_backend_gc_sweep_hook): Likewise.
405 * elf32-tilegx.c (elf_backend_gc_sweep_hook): Likewise.
406 * elf32-tilepro.c (tilepro_elf_gc_sweep_hook): Likewise.
407 (elf_backend_gc_sweep_hook): Likewise.
408 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
409 (elf_backend_gc_sweep_hook): Likewise.
410 * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Likewise.
411 (elf_backend_gc_sweep_hook): Likewise.
412 * elf64-alpha.c (elf64_alpha_gc_sweep_hook): Likewise.
413 (elf_backend_gc_sweep_hook): Likewise.
414 * elf64-mips.c (elf_backend_gc_sweep_hook): Likewise.
415 * elf64-mmix.c (mmix_elf_gc_sweep_hook): Likewise.
416 (elf_backend_gc_sweep_hook): Likewise.
417 * elf64-ppc.c (elf_backend_gc_sweep_hook): Likewise.
418 (ppc64_elf_gc_sweep_hook): Likewise.
419 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
420 (elf_backend_gc_sweep_hook): Likewise.
421 * elf64-sparc.c (elf_backend_gc_sweep_hook): Likewise.
422 * elf64-tilegx.c (elf_backend_gc_sweep_hook): Likewise.
423 * elflink.c (elf_link_add_object_symbols): Don't call
424 _bfd_elf_link_check_relocs here.
425 (gc_sweep_hook_fn): Removed.
426 (elf_gc_sweep): Remove gc_sweep_hook.
427 * elfnn-aarch64.c (elfNN_aarch64_gc_sweep_hook): Removed.
428 (elf_backend_gc_sweep_hook): Likewise.
429 * elfnn-riscv.c (riscv_elf_gc_sweep_hook): Likewise.
430 (elf_backend_gc_sweep_hook): Likewise.
431 * elfxx-mips.c (_bfd_mips_elf_gc_sweep_hook): Likewise.
432 * elfxx-mips.h (_bfd_mips_elf_gc_sweep_hook): Likewise.
433 (elf_backend_gc_sweep_hook): Likewise.
434 * elfxx-sparc.c (_bfd_sparc_elf_gc_sweep_hook): Likewise.
435 * elfxx-sparc.h (_bfd_sparc_elf_gc_sweep_hook): Likewise.
436 * elfxx-target.h (elf_backend_gc_sweep_hook): Likewise.
437 (elfNN_bed): Remove elf_backend_gc_sweep_hook.
438 * elfxx-tilegx.c (tilegx_elf_gc_sweep_hook): Removed.
439 * elfxx-tilegx.h (tilegx_elf_gc_sweep_hook): Likewise.
441 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
443 * elf32-i386.c (elf_i386_backend_data): Removed.
444 (get_elf_i386_backend_data): Likewise.
445 (elf_i386_arch_bed): Replace elf_i386_backend_data with
446 elf_x86_backend_data.
447 (elf_i386_get_synthetic_symtab): Likewise.
448 (elf_i386_nacl_arch_bed): Likewise.
449 (elf_i386_vxworks_arch_bed): Likewise.
450 (elf_i386_relocate_section): Check target_os instead of
452 (elf_i386_finish_dynamic_symbol): Likewise.
453 (elf_i386_finish_dynamic_sections): Use htab->plt0_pad_byte.
454 Check target_os instead of is_vxworks.
455 (elf_i386_link_setup_gnu_properties): Remove normal_target and
456 is_vxworks. Initialize plt0_pad_byte.
457 * elf64-x86-64.c (elf_x86_64_backend_data); Removed.
458 (get_elf_x86_64_arch_data): Likewise.
459 (get_elf_x86_64_backend_data): Likewise.
460 (elf_x86_64_arch_bed): Replace elf_x86_64_backend_data with
461 elf_x86_backend_data.
462 (elf_x86_64_get_synthetic_symtab): Likewise.
463 (elf_x86_64_nacl_arch_bed): Likewise.
464 (elf_x86_64_link_setup_gnu_properties): Remove is_vxworks and
465 normal_target. Initialize plt0_pad_byte.
466 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Check target_os
467 instead of is_vxworks.
468 (_bfd_x86_elf_size_dynamic_sections): Likewise.
469 (_bfd_x86_elf_finish_dynamic_sections): Likewise.
470 (_bfd_x86_elf_adjust_dynamic_symbol): Likewise.
471 (_bfd_x86_elf_link_hash_table_create): Initialize target_os.
472 (_bfd_x86_elf_link_setup_gnu_properties): Remove is_vxworks.
473 Update normal_target. Set up plt0_pad_byte. Check target_os
474 instead of is_vxworks.
475 * elfxx-x86.h (elf_x86_target_os): New.
476 (elf_x86_backend_data): Likewise.
477 (get_elf_x86_backend_data): Likewise.
478 (elf_x86_link_hash_table): Remove is_vxworks. Add plt0_pad_byte
480 (elf_x86_init_table): Remove normal_target and is_vxworks. Add
483 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
485 * elf32-i386.c (elf_i386_finish_dynamic_sections): Call
486 _bfd_x86_elf_finish_dynamic_sections.
487 * elf64-x86-64.c (elf_x86_64_finish_dynamic_sections): Likewise.
488 * elfxx-x86.c (_bfd_x86_elf_finish_dynamic_sections): New
490 * elfxx-x86.h (_bfd_x86_elf_finish_dynamic_sections): New
493 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
496 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
497 hide symbol which was forced to be dynamic.
499 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
502 * elf32-cris.c (cris_elf_relocate_section): Don't generate
503 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
504 (cris_elf_check_relocs): Don't allocate dynamic relocation
505 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
507 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
510 * elf32-sh.c (allocate_dynrelocs): Discard dynamic relocations
511 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
512 (sh_elf_relocate_section): Don't generate dynamic relocation if
513 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
515 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
518 * elf32-s390.c (allocate_dynrelocs): Discard dynamic
519 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
520 (elf_s390_relocate_section): Don't generate dynamic relocation
521 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
522 * elf64-s390.c (allocate_dynrelocs): Discard dynamic
523 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
524 (elf_s390_relocate_section): Don't generate dynamic relocation
525 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
527 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
530 * elf32-nios2.c (nios2_elf32_relocate_section): Don't generate
531 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
532 (allocate_dynrelocs): Discard dynamic relocations if
533 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
535 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
538 * elf32-microblaze.c (microblaze_elf_relocate_section): Don't
539 generate dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is
541 (allocate_dynrelocs): Discard dynamic relocations if
542 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
544 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
547 * elf32-m68k.c (elf_m68k_check_relocs): Don't allocate dynamic
548 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
549 (elf_m68k_adjust_dynamic_symbol): Don't make symbol dynamic if
550 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
551 (elf_m68k_relocate_section): Don't generate dynamic relocation
552 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
554 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
557 * elf32-hppa.c (ensure_undef_dynamic): Don't make undefined
558 symbol dynamic if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
559 (allocate_dynrelocs): Discard dynamic relocations if
560 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
561 (elf32_hppa_relocate_section): Don't generate dynamic
562 relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
564 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
567 * elfnn-ia64.c (elfNN_ia64_check_relocs): Don't allocate
568 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
569 (allocate_fptr): Don't allocate function pointer if
570 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
571 (allocate_dynrel_entries): Don't allocate dynamic relocation
572 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
573 (set_got_entry): Don't set GOT entry if
574 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
575 (set_pltoff_entry): Don't set PLTOFF entry if
576 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
577 (elfNN_ia64_relocate_section): Don't install dynamic relocation
578 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
580 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
583 * elfxx-mips.c (mips_elf_calculate_relocation): Don't generate
584 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
585 (allocate_dynrelocs): Don't allocate dynamic relocations if
586 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
588 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
591 * elf32-arm.c (elf32_arm_final_link_relocate): Don't generate
592 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
593 (allocate_dynrelocs_for_symbol): Discard dynamic relocations
594 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
596 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
599 * elf32-tilepro.c (allocate_dynrelocs): Discard dynamic
600 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
601 (tilepro_elf_relocate_section): Don't generate dynamic
602 relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
603 * elfxx-tilegx.c (allocate_dynrelocs): Discard dynamic
604 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
605 (tilegx_elf_relocate_section): Don't generate dynamic
606 relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
608 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
611 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Don't
612 generate dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is
614 (elfNN_aarch64_allocate_dynrelocs): Discard dynamic relocations
615 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
617 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
619 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Moved to ...
620 * elf-bfd.h (UNDEFWEAK_NO_DYNAMIC_RELOC): Here.
621 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Removed.
623 2017-10-12 James Bowman <james.bowman@ftdichip.com>
625 * bfd-in2.h: Regenerate.
626 * libbfd.h: Regenerate.
627 * elf32-ft32.c: Add HOWTO R_FT32_15.
628 * reloc.c: Add BFD_RELOC_FT32_15.
630 2017-10-12 Nick Clifton <nickc@redhat.com>
632 * reloc.c (enum bfd_reloc_status): Start values at 2.
633 * bfd-in2.h: Regenerate.
634 * elfnn-aarch64.c (aarch64_relocate): Invert sense of function, so
635 that a TRUE return indicates success. Compare the result of
636 calling _bfd_aarch64_elf_put_addend against bfd_reloc_ok.
637 (build_one_stub): Change sense of tests against aarch64_relocate
639 (elfNN_aarch64_tls_relax): Return bfd_reloc_notsupported, rather
640 than FALSE, when an error is detected.
641 (elfNN_aarch64_final_link_relocate): Likewise.
643 2017-10-12 H.J. Lu <hongjiu.lu@intel.com>
645 * elf32-i386.c (elf_backend_hide_symbol): New.
646 * elf64-x86-64.c (elf_backend_hide_symbol): Likewise.
647 * elfxx-x86.c (_bfd_x86_elf_hide_symbol): Likewise.
648 * elfxx-x86.h (_bfd_x86_elf_hide_symbol): Likewise.
650 2017-10-12 Alan Modra <amodra@gmail.com>
652 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Call
653 elf_backend_hide_symbol, not _bfd_elf_link_hash_hide_symbol.
654 (bfd_elf_define_start_stop): Likewise.
656 2017-10-12 Alan Modra <amodra@gmail.com>
658 * elf32-nds32.c (nds32_elf_size_dynamic_sections): Set .interp
659 when executable rather than non-PIC.
660 * elf32-score.c (s3_bfd_score_elf_size_dynamic_sections): Likewise.
661 * elf32-score7.c (s7_bfd_score_elf_size_dynamic_sections): Likewise.
663 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
665 * elf-bfd.h (elf_backend_data): Add `linux_prpsinfo64_ugid16'
667 * elf-linux-core.h (elf_external_linux_prpsinfo64): Rename to...
668 (elf_external_linux_prpsinfo64_ugid32): ... this.
669 (swap_linux_prpsinfo32_out): Rename to...
670 (swap_linux_prpsinfo32_ugid32_out): ... this.
671 (elf_external_linux_prpsinfo64_ugid16): New structure.
672 (swap_linux_prpsinfo64_ugid16_out): New function.
673 * elfxx-target.h [!elf_backend_linux_prpsinfo64_ugid16]
674 (elf_backend_linux_prpsinfo64_ugid16): Define.
675 (elfNN_bed): Initialize `linux_prpsinfo64_ugid16' member.
676 * elf.c (elfcore_write_linux_prpsinfo64): Handle both variants
677 of the 64-bit Linux core PRPSINFO note.
678 * elf64-sh64.c (elf_backend_linux_prpsinfo64_ugid16): Define.
680 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
682 * elf-bfd.h (elf_backend_data): Add `linux_prpsinfo32_ugid16'
684 (elfcore_write_ppc_linux_prpsinfo32): Remove prototype.
685 * elf32-ppc.c (elfcore_write_ppc_linux_prpsinfo32): Remove.
686 (elf_external_ppc_linux_prpsinfo32)
687 (swap_ppc_linux_prpsinfo32_out): Move to...
688 * elf-linux-core.h (elf_external_linux_prpsinfo32_ugid32)
689 (swap_linux_prpsinfo32_ugid32_out): ... these.
690 (elf_external_linux_prpsinfo32): Rename to...
691 (elf_external_linux_prpsinfo32_ugid16): ... this.
692 (swap_linux_prpsinfo32_out): Rename to...
693 (swap_linux_prpsinfo32_ugid16_out): ... this.
694 * elfxx-target.h [!elf_backend_linux_prpsinfo32_ugid16]
695 (elf_backend_linux_prpsinfo32_ugid16): Define.
696 (elfNN_bed): Initialize `linux_prpsinfo32_ugid16' member.
697 * elf.c (elfcore_write_linux_prpsinfo32): Handle both variants
698 of the 32-bit Linux core PRPSINFO note.
699 * elf32-am33lin.c (elf_backend_linux_prpsinfo32_ugid16): Define.
700 * elf32-arm.c (elf_backend_linux_prpsinfo32_ugid16): Define.
701 * elf32-cris.c (elf_backend_linux_prpsinfo32_ugid16): Define.
702 * elf32-frv.c (elf_backend_linux_prpsinfo32_ugid16): Define.
703 * elf32-i386.c (elf_backend_linux_prpsinfo32_ugid16): Define.
704 * elf32-m32r.c (elf_backend_linux_prpsinfo32_ugid16): Define.
705 * elf32-m68k.c (elf_backend_linux_prpsinfo32_ugid16): Define.
706 * elf32-s390.c (elf_backend_linux_prpsinfo32_ugid16): Define.
707 * elf32-sh.c (elf_backend_linux_prpsinfo32_ugid16): Define.
708 * elf32-sparc.c (elf_backend_linux_prpsinfo32_ugid16): Define.
710 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
712 * elf-linux-core.h (elf_external_linux_prpsinfo64): Move the
713 `gap' member ahead of `pr_flag'.
715 2017-10-11 Pedro Alves <palves@redhat.com>
717 * bfd.c (_doprnt): Rename to ...
718 (_bfd_doprnt): ... this.
719 (error_handler_internal): Adjust.
721 2017-10-10 H.J. Lu <hongjiu.lu@intel.com>
723 * elf32-i386.c (elf_i386_check_relocs): Set GOT refcount to 1
724 instead of incrementing it.
725 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
727 2017-10-10 Renlin Li <renlin.li@arm.com>
730 * elf32-arm.c (allocate_dynrelocs_for_symbol): Only make undefined weak
731 symbols into dynamic.
733 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
736 * elfnn-riscv.c (riscv_elf_link_hash_table): Add max_alignment.
737 (riscv_elf_link_hash_table_create): Initialize max_alignment to
739 (_bfd_riscv_relax_section): Cache the max alignment of output
740 sections if possible.
742 2017-10-10 Alan Modra <amodra@gmail.com>
744 * elf64-ppc.c (ppc64_elf_before_check_relocs): Set sec_type for
745 .opd whenever .opd is present and non-zero size. Move code
746 setting abiversion to/from output file earlier. Only set
747 u.opd.func_sec when --gc-sections. Read relocs and set up
748 u.opd.func_sec values here..
749 (ppc64_elf_check_relocs): ..rather than here. Simplify opd
751 (ppc64_elf_edit_opd): Don't set sec_type for .opd here.
753 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
755 * elf-m10300.c (mn10300_elf_check_relocs): Don't free cached
758 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
760 * elf32-bfin.c (bfin_size_dynamic_sections): Don't create the
761 .interp section with "ld --no-dynamic-linker".
763 2017-10-09 Alan Modra <amodra@gmail.com>
766 * dwarf2.c (_bfd_dwarf2_cleanup_debug_info): Free
767 funcinfo_hash_table and varinfo_hash_table.
769 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
771 * elf32-sh.c (readonly_dynrelocs): Dump dynamic relocation
772 in read-only section with minfo.
773 (sh_elf_size_dynamic_sections): Likewise.
775 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
777 * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Remove
780 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
782 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_sections): Set
783 this_hdr.sh_entsize only if section size > 0.
785 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
787 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Reformat.
789 2017-10-07 H.J. Lu <hongjiu.lu@intel.com>
791 * elfxx-sparc.c (readonly_dynrelocs): Dump dynamic relocation
792 in read-only section with minfo.
793 (_bfd_sparc_elf_size_dynamic_sections): Likewise.
795 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
797 * elfxx-x86.h (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Update
800 2017-10-06 John Baldwin <jhb@FreeBSD.org>
802 * elf-bfd.h (struct elf_backend_data): Add
803 `elf_backend_grok_freebsd_prstatus'.
804 * elf.c (elfcore_grok_freebsd_note): Call
805 `elf_backend_grok_freebsd_prstatus' to handle NT_PRSTATUS if
807 * elfn32-mips.c (elf_n32_mips_grok_freebsd_prstatus): New
809 (elf_backend_grok_freebsd_prstatus): Define.
810 * elfxx-target.h (elf_backend_grok_freebsd_prstatus): Define.
811 (elfNN_bed): Initialize `elf_backend_grok_freebsd_prstatus'.
813 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
815 * elf32-i386.c (elf_i386_check_relocs): Replace has_got_reloc
816 and has_non_got_reloc with zero_undefweak.
817 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
818 * elfxx-x86.c (_bfd_x86_elf_link_hash_newfunc): Initialize
820 (_bfd_x86_elf_copy_indirect_symbol): Replace has_got_reloc and
821 has_non_got_reloc with zero_undefweak.
822 * elfxx-x86.h (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Replace
823 has_got_reloc and has_non_got_reloc with zero_undefweak.
824 (elf_x86_link_hash_entry): Likewise.
826 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
828 * elfxx-x86.h (COPY_INPUT_RELOC_P): Add "do/while(0);".
829 (VERIFY_COPY_RELOC): Likewise.
831 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
833 * elfxx-x86.h (VERIFY_COPY_RELOC): New.
834 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Use it.
835 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
837 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
839 * elfxx-x86.h (VERIFY_PLT_ENTRY): New.
840 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Use it.
841 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
843 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
845 * elfxx-x86.h (COPY_INPUT_RELOC_P): New.
846 * elf32-i386.c (elf_i386_relocate_section): Use it.
847 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
849 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
851 * elf32-i386.c (X86_SIZE_TYPE_P): New.
852 (elf_i386_relocate_section): Use GENERATE_DYNAMIC_RELOCATION_P.
853 * elf64-x86-64.c (X86_SIZE_TYPE_P): New.
854 (elf_x86_64_relocate_section): Use GENERATE_DYNAMIC_RELOCATION_P.
855 * elfxx-x86.h (GENERATE_DYNAMIC_RELOCATION_P): New.
857 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
859 * elfxx-x86.h (POINTER_LOCAL_IFUNC_P): New.
860 (PLT_LOCAL_IFUNC_P): Likewise.
861 * elf32-i386.c (elf_i386_relocate_section): Use them.
862 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
864 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
866 * elfxx-x86.h (GENERATE_RELATIVE_RELOC_P): New.
867 * elf32-i386.c (elf_i386_relocate_section): Use it.
868 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
870 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
872 * elfxx-x86.h (RESOLVED_LOCALLY_P): New.
873 * elf32-i386.c (elf_i386_relocate_section): Use it.
874 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
876 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
878 * elf32-i386.c (X86_PCREL_TYPE_P): New.
879 (elf_i386_check_relocs): Use NEED_DYNAMIC_RELOCATION_P.
880 * elf64-x86-64.c (IS_X86_64_PCREL_TYPE): Renamed to ...
881 (X86_PCREL_TYPE_P): This.
882 (elf_x86_64_check_relocs): Use NEED_DYNAMIC_RELOCATION_P.
883 Replace IS_X86_64_PCREL_TYPE with X86_PCREL_TYPE_P.
884 (elf_x86_64_relocate_section): Replace IS_X86_64_PCREL_TYPE with
886 * elfxx-x86.h (NEED_DYNAMIC_RELOCATION_P): New.
888 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
890 * elfxx-x86.h (TLS_TRANSITION_IE_TO_LE_P): New.
891 * elf32-i386.c (elf_i386_tls_transition): Use it.
892 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
894 2017-10-05 H.J. Lu <hongjiu.lu@intel.com>
896 * elf32-ppc.c (readonly_dynrelocs): Add a link_info argument.
897 Dump dynamic relocation in read-only section with minfo if
899 (ppc_elf_adjust_dynamic_symbol): Pass NULL to readonly_dynrelocs.
900 (maybe_set_textrel): Likewise.
901 (ppc_elf_size_dynamic_sections): Dump dynamic relocation in
902 read-only section with minfo.
904 2017-10-05 John Baldwin <jhb@FreeBSD.org>
906 * elf.c (elfcore_grok_freebsd_note): Handle NT_ARM_VFP.
908 2017-10-05 H.J. Lu <hongjiu.lu@intel.com>
910 * elf32-tilepro.c (readonly_dynrelocs): Dump dynamic relocation
911 in read-only section with minfo.
912 (tilepro_elf_size_dynamic_sections): Likewise.
913 * elfxx-tilegx.c (readonly_dynrelocs): Likewise.
914 (tilegx_elf_size_dynamic_sections): Likewise.
916 2017-10-05 Pedro Alves <palves@redhat.com>
919 * bfd.c (bfd_set_error): Revert 2017-10-04 change. Remove
920 ellipsis parameter. Split out bfd_error_on_input code to..
921 (bfd_set_input_error): .. New function.
922 * archive.c (_bfd_write_archive_contents): Use bfd_set_input_error.
923 * vms-lib.c (_bfd_vms_lib_write_archive_contents): Likewise.
924 * bfd-in2.h: Regenerate.
926 2017-10-05 Alan Modra <amodra@gmail.com>
928 * elflink.c (elf_link_input_bfd): Correct ctor/dtor in init_array/
929 fini_array error value.
931 2017-10-05 Alan Modra <amodra@gmail.com>
934 * elf.c (_bfd_elf_setup_sections): Don't trim reloc sections from
936 (_bfd_elf_init_reloc_shdr): Pass sec_hdr, use it to copy SHF_GROUP
938 (elf_fake_sections): Adjust calls. Exit immediately on failure.
939 (bfd_elf_set_group_contents): Add associated reloc section indices
942 2017-10-04 Alan Modra <amodra@gmail.com>
944 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't sort or
945 classify symbols for ELFv2.
947 2017-10-04 Pavel I. Kryukov <kryukov@frtk.ru>
950 * bfd.c (bfd_set_error): Avoid UB on passing arg to va_start that
951 undergoes default promotion.
952 * bfd-in2.h: Regenerate.
954 2017-10-02 Alan Modra <amodra@gmail.com>
956 * elf32-ppc.c (ppc_elf_relocate_section): Fix comment typo.
957 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
959 2017-10-01 Alan Modra <amodra@gmail.com>
962 * dwarf2.c (new_line_sorts_after): Remove end_sequence comparison.
963 (add_line_info): Always put end_sequence last.
965 2017-10-01 Alan Modra <amodra@gmail.com>
968 * dwarf2.c (read_section): Allocate buffer with extra byte for
969 bfd_simple_get_relocated_section_contents rather than copying
972 2017-09-29 Alan Modra <amodra@gmail.com>
974 * merge.c (merge_strings): Return FALSE on malloc failure.
975 (_bfd_merge_sections): Return failures from record_section and
978 2017-09-28 Alan Modra <amodra@gmail.com>
981 * elflink.c (_bfd_elf_merge_symbol): Set non_ir_ref_dynamic in
982 a case where plugin_notice isn't called.
984 2017-09-27 Kuan-Lin Chen <kuanlinchentw@gmail.com>
986 * elf32-nds32.c (nds32_elf_relax_section): Fix a tautological
989 2017-09-26 H.J. Lu <hongjiu.lu@intel.com>
992 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't pass
993 output_bfd to info->callbacks->minfo.
995 2017-09-26 Nick Clifton <nickc@redhat.com>
998 * elf64-x86-64.c (elf_x86_64_info_to_howto): Do not trigger an
999 assertion failure if elf_x86_64_rtype_to_howto has already issued
1002 2017-09-26 Alan Modra <amodra@gmail.com>
1005 * dwarf2.c (read_formatted_entries): Use read_attribute_value to
1008 2017-09-26 Nick Clifton <nickc@redhat.com>
1011 * dwarf2.c (read_formatted_entries): Fail early if we know that
1012 the loop parsing data entries will overflow the end of the
1015 2017-09-26 Alan Modra <amodra@gmail.com>
1018 * dwarf2.c (struct comp_unit): Delete sec_info_ptr field.
1019 (find_abstract_instance_name): Calculate DW_FORM_ref_addr relative
1020 to stash->info_ptr_memory, and check die_ref is within that memory.
1021 Set info_ptr_end correctly when another CU is refd. Check die_ref
1022 for DW_FORM_ref4 etc. is within CU.
1024 2017-09-26 Alan Modra <amodra@gmail.com>
1027 * dwarf2.c (concat_filename): Return "<unknown>" on NULL filename.
1028 (read_formatted_entries): Init "fe".
1029 (decode_line_info <DW_LNE_define_file>): Use line_info_add_file_name.
1031 2017-09-26 Alan Modra <amodra@gmail.com>
1034 * dwarf2.c (decode_line_info): Ensure line_ptr stays within
1035 bounds in inner loop.
1037 2017-09-25 Alan Modra <amodra@gmail.com>
1040 * dwarf1.c (parse_die): Sanity check pointer against section limit
1041 before dereferencing.
1042 (parse_line_table): Likewise.
1044 2017-09-25 Alan Modra <amodra@gmail.com>
1047 * dwarf2.c (scan_unit_for_symbols): Ignore DW_AT_name unless it
1049 (parse_comp_unit): Likewise.
1051 2017-09-25 Alan Modra <amodra@gmail.com>
1054 * dwarf2.c (read_formatted_entries): Error on format_count zero.
1056 2017-09-24 Alan Modra <amodra@gmail.com>
1059 * opncls.c (bfd_get_debug_link_info_1): Properly check that crc is
1060 within section bounds.
1062 2017-09-24 Alan Modra <amodra@gmail.com>
1065 * dwarf2.c (decode_line_info): Properly free line sequences on error.
1067 2017-09-24 Alan Modra <amodra@gmail.com>
1070 * dwarf2.c (find_abstract_instance_name): Add orig_info_ptr and
1071 pname param. Return status. Make name const. Don't abort,
1072 return an error. Formatting. Exit if current info_ptr matches
1073 orig_info_ptr. Update callers.
1074 (scan_unit_for_symbols): Start at nesting_level of zero. Make
1075 nested_funcs an array of structs for extensibility. Formatting.
1077 2017-09-24 Alan Modra <amodra@gmail.com>
1080 * dwarf2.c (decode_line_info): Fail on lh.line_range of zero
1081 rather than dividing by zero.
1083 2017-09-24 Alan Modra <amodra@gmail.com>
1086 * dwarf2.c (decode_line_info): Correct .debug_line unit_length check.
1088 2017-09-24 Alan Modra <amodra@gmail.com>
1091 * dwarf2.c (scan_unit_for_symbols): Check u.blk->data is non-NULL.
1093 2017-09-24 Alan Modra <amodra@gmail.com>
1096 * elf.c (_bfd_elf_slurp_version_tables): Test sh_info on
1097 SHT_GNU_verneed section for sanity. Don't zalloc memory for
1100 2017-09-22 H.J. Lu <hongjiu.lu@intel.com>
1103 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Guard against
1106 2017-09-22 H.J. Lu <hongjiu.lu@intel.com>
1109 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Also return
1110 -1 if bfd_canonicalize_dynamic_reloc returns 0.
1112 2017-09-22 Pedro Alves <palves@redhat.com>
1113 Alan Modra <amodra@gmail.com>
1115 * version.h: Add comment.
1117 2017-09-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1119 * elf.c (elfcore_grok_note): For the cases NT_S390_GS_CB and
1120 NT_S390_GS_BC, correct the previously swapped invocations of
1121 elfcore_grok_s390_gs_bc and elfcore_grok_s390_gs_cb.
1123 2017-09-19 Alan Modra <amodra@gmail.com>
1126 * elf64-ppc.c (ppc64_elf_build_stubs): Don't check glink_eh_frame
1129 2017-09-19 Alan Modra <amodra@gmail.com>
1132 * elflink.c (bfd_elf_size_dynamic_sections): Garbage collect
1133 symbols before calculating verrefs. Don't renumber dynsyms
1134 after gc. Exclude .gnu.version when zero or one dynsym.
1135 Localize some vars and reindent.
1137 2017-09-18 H.J. Lu <hongjiu.lu@intel.com>
1140 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Check error
1141 return from bfd_canonicalize_dynamic_reloc.
1143 2017-09-15 Alan Modra <amodra@gmail.com>
1146 * archive.c (bfd_ar_hdr_from_filesystem): Detect when status.st_size
1147 overflows bfd_size_type.
1149 2017-09-14 H.J. Lu <hongjiu.lu@intel.com>
1152 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument
1153 to indicate if conversion is performed.
1154 (elf_i386_check_relocs): Cache section contents and relocations
1155 if conversion is performed.
1156 * elf64-x86-64.c (elf_x86_64_check_relocs): Cache section
1157 contents and relocations if conversion is performed.
1159 2017-09-14 Nick Clifton <nickc@redhat.com>
1162 * peXXigen.c (pe_print_idata): Extend check for HintName vector
1165 2017-09-13 H.J. Lu <hongjiu.lu@intel.com>
1167 * elfxx-x86.h: Fix a typo in comments.
1169 2017-09-09 Kamil Rytarowski <n54@gmx.com>
1171 * elf32-nds32.c: Rename __BIT() to N32_BIT().
1173 2017-09-09 Alan Modra <amodra@gmail.com>
1175 * elf64-ppp.c (plt_stub_pad): Handle positive and negative
1178 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
1180 * elf32-i386.c (elf_i386_relocate_section): Update usage of
1181 UNDEFINED_WEAK_RESOLVED_TO_ZERO.
1182 (elf_i386_finish_dynamic_symbol): Likewise.
1183 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1184 (elf_x86_64_finish_dynamic_symbol): Likewise.
1185 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Likewise.
1186 (_bfd_x86_elf_fixup_symbol): Likewise.
1188 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
1190 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
1191 check has_non_got_reloc.
1193 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
1196 * elf32-i386.c (elf_i386_convert_load_reloc): Check linker_def.
1197 Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
1198 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Check
1199 linker_def. Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
1200 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Set local_ref
1201 and linker_def on __ehdr_start if it is referenced and not
1203 (_bfd_x86_elf_link_symbol_references_local): Also set local_ref
1204 and return TRUE when building executable, if a symbol has
1205 non-GOT/non-PLT relocations in text section or there is no
1207 * elfxx-x86.h (elf_x86_link_hash_entry): Add linker_def.
1209 2017-09-08 H.J. Lu <hongjiu.lu@intel.com>
1211 * elfxx-x86.h: Update comments.
1213 2017-09-08 H.J. Lu <hongjiu.lu@intel.com>
1215 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Replace
1216 elf_x86_plt_layout_table with elf_x86_init_table.
1217 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
1219 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties):
1221 * elfxx-x86.h (elf_x86_plt_layout_table): Renamed to ...
1222 (elf_x86_init_table): This.
1223 (_bfd_x86_elf_link_setup_gnu_properties): Replace
1224 elf_x86_plt_layout_table with elf_x86_init_table.
1226 2017-09-07 H.J. Lu <hongjiu.lu@intel.com>
1228 * configure.ac (bfd_backends): Don't add elf64-x86-64.lo nor
1229 elf64.lo together with elfxx-x86.lo for 64-bit BFD.
1230 * configure: Regenerated.
1231 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set r_info
1232 and r_sym fields of plt_layout.
1233 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
1235 * elfxx-x86.c (elf_x86_64_is_reloc_section): Remove BFD64 check.
1236 (_bfd_x86_elf_link_hash_table_create): Likewise. Don't set
1237 r_info nor r_sym fields.
1238 (_bfd_x86_elf_link_setup_gnu_properties): Set r_info and r_sym
1240 * elfxx-x86.h (elf_x86_plt_layout_table): Add r_info and r_sym.
1242 2017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
1244 * (_bfd_riscv_relax_align): Call bfd_set_error and
1245 print an error message when unable to relax a .align directive.
1247 2017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
1249 * elfnn-riscv.c (riscv_zero_pcrel_hi_reloc): New function.
1250 (riscv_record_pcrel_hi_reloc): Add absolute argument.
1251 (riscv_elf_relocate_section): Call riscv_zero_pcrel_hi_reloc for
1252 R_RISCV_PCREL_HI20 relocs, and pass the result to
1253 riscv_record_pcrel_hi_reloc.
1255 2017-09-07 H.J. Lu <hongjiu.lu@intel.com>
1257 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument,
1258 r_type_p. Remove the converted argument. Replace
1259 SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P. Return
1260 the new relocation type via r_type_p.
1261 (elf_i386_relocate_section): Likewise.
1262 (elf_i386_finish_dynamic_symbol): Likewise.
1263 (need_convert_load): Removed.
1264 (check_relocs_failed): Updated.
1265 (elf_i386_check_relocs): Call elf_i386_convert_load_reloc,
1266 instead of setting need_convert_load.
1267 (_bfd_i386_elf_convert_load): Removed.
1268 * elf64-x86-64.c (need_convert_load): Removed.
1269 (check_relocs_failed): Updated.
1270 (elf_x86_64_convert_load_reloc): Add an argument, r_type_p.
1271 Replace SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P.
1272 Return the new relocation type via r_type_p.
1273 (elf_x86_64_check_relocs): Call elf_x86_64_convert_load_reloc,
1274 instead of setting need_convert_load.
1275 (elf_x86_64_check_relocs): Don't check PIC if relocation has
1277 (_bfd_x86_64_elf_convert_load): Removed.
1278 (elf_x86_64_relocate_section): Replace SYMBOL_REFERENCES_LOCAL
1279 with SYMBOL_REFERENCES_LOCAL_P.
1280 (elf_x86_64_finish_dynamic_symbol): Likewise.
1281 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Don't
1283 (_bfd_x86_elf_size_dynamic_sections): Don't call convert_load.
1284 (_bfd_x86_elf_link_symbol_references_local): New function.
1285 * elfxx-x86.h (SYMBOL_REFERENCES_LOCAL_P): New.
1286 (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Replace elf.forced_local with
1287 SYMBOL_REFERENCES_LOCAL_P.
1288 (elf_x86_link_hash_entry): Add local_ref.
1289 (elf_x86_link_hash_table): Remove convert_load.
1290 (_bfd_i386_elf_convert_load): Removed.
1291 (_bfd_x86_64_elf_convert_load): Likewise.
1292 (_bfd_x86_elf_link_symbol_references_local): New.
1294 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
1296 * elf64-x86-64.c (R_X86_64_converted_reloc_bit): New.
1297 (elf_x86_64_info_to_howto): Get the real relocation type by
1298 masking out R_X86_64_converted_reloc_bit.
1299 (elf_x86_64_check_tls_transition): Get the real relocation type
1300 by masking out R_X86_64_converted_reloc_bit.
1301 (elf_x86_64_convert_load_reloc): Set R_X86_64_converted_reloc_bit
1302 instead of setting converted_reloc.
1303 (elf_x86_64_relocate_section): Check R_X86_64_converted_reloc_bit
1304 instead of converted_reloc. Get the real relocation type by
1305 masking out R_X86_64_converted_reloc_bit.
1306 (elf_x86_64_link_setup_gnu_properties): Verify that the value of
1307 R_X86_64_converted_reloc_bit is valid.
1308 * elfxx-x86.h (converted_reloc): Removed.
1310 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
1312 * elf32-i386.c (elf_i386_relocate_section): Don't change r_type
1313 when calling elf_i386_tls_transition. Don't use ELF32_R_TYPE
1314 to get the relocation type again.
1315 * elf64-x86-64.c (elf_x86_64_relocate_section): Don't change
1316 r_type when calling elf_x86_64_tls_transition. Don't use
1317 ELF32_R_TYPE to get the relocation type again.
1319 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
1321 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Properly set
1324 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
1326 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Remove the sec
1327 argument. Don't check relocation overflow. Avoid relocation
1328 overflow if --no-relax is used. Set converted_reloc on symbol
1329 if a GOTPCREL relocation is converted.
1330 (elf_x86_64_relocate_section): Issue a fatal error and suggest
1331 --no-relax if GOTPCREL relocation conversion leads to relocation
1333 * elfxx-x86.h (elf_x86_link_hash_entry): Add converted_reloc.
1335 2017-09-05 Alexander Fedotov <alexander.fedotov@nxp.com>
1336 Edmar Wienskoski <edmar.wienskoski@nxp.com
1338 * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_VLE_ADDR20.
1339 (ppc_elf_check_relocs): Handle it.
1340 (ppc_elf_vle_split20): New function.
1341 (ppc_elf_relocate_section): Handle R_PPC_VLE_ADDR20.
1343 2017-09-03 H.J. Lu <hongjiu.lu@intel.com>
1346 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Set tlsdesc_plt
1347 for x86-64 if GOT_TLS_GDESC_P is true.
1349 2017-09-03 Alan Modra <amodra@gmail.com>
1352 * elfxx-x86.h (elf_x86_hash_table): Check is_elf_hash_table first.
1354 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1356 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1357 tls_get_addr for x86-64 in one place.
1359 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1361 * configure.ac (bfd_backends): Add elf64-x86-64.lo together
1362 with elfxx-x86.lo for 64-bit BFD.
1363 * configure: Regenerated.
1365 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1367 * elf32-i386.c (elf_i386_convert_load): Renamed to ...
1368 (_bfd_i386_elf_convert_load): This. Remove static.
1369 (elf_i386_size_dynamic_sections): Removed.
1370 (elf_backend_size_dynamic_sections): Likewise.
1371 * elf64-x86-64.c (elf_x86_64_convert_load): Renamed to ...
1372 (_bfd_x86_64_elf_convert_load): This. Remove static.
1373 (elf_x86_64_size_dynamic_sections): Removed.
1374 (elf_backend_size_dynamic_sections): Likewise.
1375 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): Renamed to ...
1376 (elf_x86_allocate_dynrelocs): This. Make it static.
1377 (_bfd_x86_elf_allocate_local_dynrelocs): Renamed to ...
1378 (elf_x86_allocate_local_dynreloc): This. Make it static.
1379 (elf_i386_is_reloc_section): New function.
1380 (elf_x86_64_is_reloc_section): Likewise.
1381 (_bfd_x86_elf_link_hash_table_create): Initialize convert_load,
1382 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
1383 Rearrange got_entry_size initialization.
1384 (_bfd_x86_elf_size_dynamic_sections): New function.
1385 * elfxx-x86.h (elf_x86_link_hash_table): Add convert_load,
1386 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
1387 (_bfd_i386_elf_convert_load): New.
1388 (_bfd_x86_64_elf_convert_load): Likewise.
1389 (_bfd_x86_elf_size_dynamic_sections): Likewise.
1390 (elf_backend_size_dynamic_sections): Likewise.
1391 (_bfd_x86_elf_allocate_dynrelocs): Removed.
1392 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
1394 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1396 * elfxx-x86.h (elf_x86_link_hash_table): Rearrange fields and
1399 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1401 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
1402 sgotplt_jump_table_size with elf_x86_compute_jump_table_size.
1404 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1406 * elf32-i386.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
1407 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Moved to ...
1408 * elfxx-x86.h (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
1409 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Here.
1410 * elf64-x86-64.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
1411 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Removed.
1413 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1415 * elf32-i386.c (elf_i386_allocate_dynrelocs): Removed.
1416 (elf_i386_allocate_local_dynrelocs): Likewise.
1417 (elf_i386_size_dynamic_sections): Replace
1418 elf_i386_allocate_dynrelocs/elf_i386_allocate_local_dynrelocs
1419 with _bfd_x86_elf_allocate_dynrelocs and
1420 _bfd_x86_elf_allocate_local_dynrelocs.
1421 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Removed.
1422 (elf_x86_64_allocate_local_dynrelocs): Likewise.
1423 (elf_x86_64_size_dynamic_sections): Replace
1424 elf_x86_64_allocate_dynrelocs/elf_x86_64_allocate_local_dynrelocs
1425 with _bfd_x86_elf_allocate_dynrelocs and
1426 _bfd_x86_elf_allocate_local_dynrelocs.
1427 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): New function.
1428 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
1429 * elfxx-x86.h (_bfd_x86_elf_allocate_dynrelocs): New prototype.
1430 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
1432 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1434 * elf32-i386.c (is_i386_elf): Removed.
1435 (elf_i386_check_relocs): Replace is_i386_elf with is_x86_elf.
1436 (elf_i386_size_dynamic_sections): Likewise.
1437 (elf_i386_relocate_section): Likewise.
1438 * elf64-x86-64.c (is_x86_64_elf): Removed.
1439 (elf_x86_64_check_relocs): Replace is_x86_64_elf with
1441 (elf_x86_64_size_dynamic_sections): Likewise.
1442 (elf_x86_64_relocate_section): Likewise.
1443 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1445 * elfxx-x86.h (elf_x86_link_hash_table): Add target_id.
1448 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1450 * elf32-i386.c (elf_i386_compute_jump_table_size): Removed.
1451 (elf_i386_allocate_dynrelocs): Replace
1452 elf_i386_compute_jump_table_size with
1453 elf_x86_compute_jump_table_size.
1454 (elf_i386_size_dynamic_sections): Likewise.
1455 * elf64-x86-64.c (elf_x86_64_compute_jump_table_size): Removed.
1456 (elf_x86_64_allocate_dynrelocs): Replace
1457 elf_x86_64_compute_jump_table_size with
1458 elf_x86_compute_jump_table_size.
1459 (elf_x86_64_size_dynamic_sections): Likewise.
1460 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1462 * elfxx-x86.h (elf_x86_link_hash_table): Add got_entry_size.
1463 (elf_x86_compute_jump_table_size): New.
1465 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1467 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1469 (_bfd_x86_elf_adjust_dynamic_symbol): Use sizeof_reloc.
1470 * elfxx-x86.h (elf_x86_link_hash_table): Add sizeof_reloc.
1472 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1474 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check VxWorks
1475 with htab->is_vxworks.
1476 (elf_i386_size_dynamic_sections): Likewise.
1477 (elf_i386_relocate_section): Likewise.
1478 (elf_i386_finish_dynamic_symbol): Likewise.
1479 (elf_i386_finish_dynamic_sections): Likewise.
1481 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1483 * elf32-i386.c (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
1484 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
1485 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Moved to ...
1486 * elfxx-x86.h (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
1487 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
1488 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Here.
1489 * elf64-x86-64.c (GOT_TLS_IE, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
1490 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Removed.
1492 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1495 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Check
1496 ELF_COMMON_DEF_P for common symbols.
1498 2017-09-02 Alan Modra <amodra@gmail.com>
1500 * elf-eh-frame.c (offset_adjust): Avoid false positive gcc warning.
1501 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Likewise.
1502 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
1504 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1506 * elf32-i386.c (elf_i386_gc_mark_hook): Removed.
1507 (elf_backend_gc_mark_hook): Likewise.
1508 * elf64-x86-64.c (elf_x86_64_gc_mark_hook): Likewise.
1509 (elf_backend_gc_mark_hook): Likewise.
1510 * elfxx-x86.c (_bfd_x86_elf_gc_mark_hook): New function.
1511 * elfxx-x86.h (_bfd_x86_elf_gc_mark_hook): New.
1512 (elf_backend_gc_mark_hook): Likewise.
1514 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1516 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Removed.
1517 (elf_backend_adjust_dynamic_symbol): Likewise.
1518 * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise.
1519 (elf_backend_adjust_dynamic_symbol): Likewise.
1520 * elfxx-x86.c (_bfd_x86_elf_adjust_dynamic_symbol): New function.
1521 (_bfd_x86_elf_link_setup_gnu_properties): Copy is_vxworks.
1522 * elfxx-x86.h (elf_x86_link_hash_table): Add is_vxworks.
1523 (_bfd_x86_elf_adjust_dynamic_symbol): New.
1524 (elf_backend_adjust_dynamic_symbol): Likewise.
1526 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1528 * elfxx-x86.h (elf_x86_plt_layout_table): Fix a typo in
1531 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1533 * elf32-i386.c (elf_i386_mkobject): Removed.
1534 (bfd_elf32_mkobject): Likewise.
1535 * elf64-x86-64.c (elf_x86_64_mkobject): Likewise.
1536 (bfd_elf64_mkobject): Likewise.
1537 (bfd_elf32_mkobject): Likewise.
1538 * elfxx-x86.c (_bfd_x86_elf_mkobject): New function.
1539 * elfxx-x86.h (_bfd_x86_elf_mkobject): New.
1540 (bfd_elf64_mkobject): Likewise.
1541 (bfd_elf32_mkobject): Likewise.
1543 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1545 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Updated.
1546 Call _bfd_x86_elf_link_setup_gnu_properties.
1547 * elf64-x86-64.c (elf_x86_lazy_plt_layout): Initialize
1548 pic_plt0_entry and pic_plt_entry fields with the non-PIC PLT
1550 (elf_x86_64_non_lazy_plt): Likewise.
1551 (elf_x86_64_lazy_bnd_plt): Likewise.
1552 (elf_x86_64_non_lazy_bnd_plt): Likewise.
1553 (elf_x86_64_lazy_ibt_plt): Likewise.
1554 (elf_x32_lazy_ibt_plt): Likewise.
1555 (elf_x86_64_non_lazy_ibt_plt): Likewise.
1556 (elf_x32_non_lazy_ibt_plt): Likewise.
1557 (elf_x86_64_nacl_plt): Likewise.
1558 (elf_x86_64_link_setup_gnu_properties): Updated. Call
1559 _bfd_x86_elf_link_setup_gnu_properties.
1560 * elfxx-x86.c: Include elf-vxworks.h".
1561 (_bfd_x86_elf_link_setup_gnu_properties): New function.
1562 * elfxx-x86.h (elf_x86_lazy_plt_layout): Remove "for i386 only"
1563 comments for pic_plt0_entry and pic_plt_entry.
1564 (elf_x86_non_lazy_plt_layout): Likewise.
1565 (elf_x86_plt_layout_table): New.
1566 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
1568 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1571 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Create
1572 .eh_frame section for the second PLT.
1573 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Correct
1574 alignment of .eh_frame section for the second PLT.
1576 2017-09-01 Nick Clifton <nickc@redhat.com>
1579 * dwarf2.c (decode_line_info): Fix test for an overlong line info
1582 2017-09-01 Nick Clifton <nickc@redhat.com>
1585 * elf-attrs.c (_bfd_elf_parse_attributes): Ensure that the
1586 attribute buffer is NUL terminated.
1588 2017-08-31 Nick Clifton <nickc@redhat.com>
1591 * dwarf2.c (read_section): If necessary add a terminating NUL byte
1592 to dwarf string sections.
1594 2017-08-31 Alan Modra <amodra@gmail.com>
1596 * po/SRC-POTFILES.in: Regenerate.
1598 2017-08-31 Alan Modra <amodra@gmail.com>
1600 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Don't exit early
1601 for a section containing just a terminator. Allow multiple
1602 terminators at end of section.
1603 * elflink.c (bfd_elf_discard_info): Iterate over .eh_frame
1604 sections when not adding alignment. Assert on terminator in
1607 2017-08-31 Alan Modra <amodra@gmail.com>
1611 * elflink.c (bfd_elf_discard_info): Don't pad embedded zero
1614 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1616 * configure.ac (bfd_backends): Add elf64.lo together with
1617 elfxx-x86.lo for 64-bit BFD.
1618 * configure: Regenerated.
1620 2017-08-31 James Bowman <james.bowman@ftdichip.com>
1622 * elf32-ft32.c (ft32_elf_howto_table): Use complain_overflow_dont
1625 2017-08-31 Alan Modra <amodra@gmail.com>
1628 * opncls.c (bfd_close_all_done): Don't call bfd_cache_close
1629 before _close_and_cleanup. Call iovec->bclose after.
1630 (bfd_close): Remove code common to, and call, bfd_close_all_done.
1632 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1634 * elf32-i386.c (elf_i386_plt_type): Removed.
1635 (elf_i386_plt): Likewise.
1636 (elf_i386_get_synthetic_symtab): Updated. Call
1637 _bfd_x86_elf_get_synthetic_symtab.
1638 * elf64-x86-64.c (elf_x86_64_plt_type): Removed.
1639 (elf_x86_64_plt): Likewise.
1640 (elf_x86_64_get_synthetic_symtab): Updated. Call
1641 _bfd_x86_elf_get_synthetic_symtab.
1642 * elfxx-x86.c (elf_i386_get_plt_got_vma): New function.
1643 (elf_x86_64_get_plt_got_vma): Likewise.
1644 (elf_i386_valid_plt_reloc_p): Likewise.
1645 (elf_x86_64_valid_plt_reloc_p): Likewise.
1646 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
1647 * elfxx-x86.h (elf_x86_plt_type): New.
1648 (elf_x86_plt): Likewise.
1649 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
1651 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1653 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Check
1654 target_id instead of elf_machine_code.
1656 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1658 * elf32-i386.c (ELF_DYNAMIC_INTERPRETER): Removed.
1659 (elf_i386_lazy_plt_layout): Likewise.
1660 (elf_i386_non_lazy_plt_layout): Likewise.
1661 (elf_i386_plt_layout): Likewise.
1662 (elf_i386_link_hash_table): Likewise.
1663 (elf_i386_next_tls_desc_index): Likewise.
1664 (elf_i386_srelplt2): Likewise.
1665 (elf_i386_plt): Likewise.
1666 (elf_i386_lazy_plt): Likewise.
1667 (elf_i386_non_lazy_plt): Likewise.
1668 (elf_i386_link_hash_table_create): Likewise.
1669 (bfd_elf32_bfd_link_hash_table_create): Likewise.
1670 (elf_i386_lazy_plt): Updated.
1671 (elf_i386_non_lazy_plt): Likewise.
1672 (elf_i386_lazy_ibt_plt): Likewise.
1673 (elf_i386_non_lazy_ibt_plt): Likewise.
1674 (elf_i386_allocate_dynrelocs): Likewise.
1675 (elf_i386_size_dynamic_sections): Likewise.
1676 (elf_i386_relocate_section): Likewise.
1677 (elf_i386_finish_dynamic_symbol): Likewise.
1678 (elf_i386_finish_dynamic_sections): Likewise.
1679 (elf_i386_get_synthetic_symtab): Likewise.
1680 (elf_i386_link_setup_gnu_properties): Likewise.
1681 (elf_i386_nacl_plt): Likewise.
1682 * elf64-x86-64.c (ABI_64_P): Removed.
1683 (ELF64_DYNAMIC_INTERPRETER): Likewise.
1684 (ELF32_DYNAMIC_INTERPRETER): Likewise.
1685 (elf_x86_64_lazy_plt_layout): Likewise.
1686 (elf_x86_64_non_lazy_plt_layout): Likewise.
1687 (elf_x86_64_plt_layout): Likewise.
1688 (elf_x86_64_link_hash_table): Likewise.
1689 (elf_x86_64_plt): Likewise.
1690 (elf_x86_64_lazy_plt): Likewise.
1691 (elf_x86_64_non_lazy_plt): Likewise.
1692 (elf_x86_64_link_hash_table_create): Likewise.
1693 (bfd_elf64_bfd_link_hash_table_create): Likewise.
1694 (bfd_elf32_bfd_link_hash_table_create): Likewise.
1695 (elf_x86_64_lazy_plt): Updated.
1696 (elf_x86_64_non_lazy_plt): Likewise.
1697 (elf_x86_64_lazy_bnd_plt): Likewise.
1698 (elf_x86_64_non_lazy_bnd_plt): Likewise.
1699 (elf_x86_64_lazy_ibt_plt): Likewise.
1700 (elf_x32_lazy_ibt_plt): Likewise.
1701 (elf_x86_64_non_lazy_ibt_plt): Likewise.
1702 (elf_x32_non_lazy_ibt_plt): Likewise.
1703 (elf_x86_64_allocate_dynrelocs): Likewise.
1704 (elf_x86_64_size_dynamic_sections): Likewise.
1705 (elf_x86_64_relocate_section): Likewise.
1706 (elf_x86_64_finish_dynamic_symbol): Likewise.
1707 (elf_x86_64_finish_dynamic_sections): Likewise.
1708 (elf_x86_64_get_synthetic_symtab): Likewise.
1709 (elf_x86_64_link_setup_gnu_properties): Likewise.
1710 (elf_x86_64_nacl_plt): Likewise.
1711 * elfxx-x86.c: Include "objalloc.h", "elf/i386.h" and
1713 (ELF32_DYNAMIC_INTERPRETER): New.
1714 (ELF64_DYNAMIC_INTERPRETER): Likewise.
1715 (ELFX32_DYNAMIC_INTERPRETER): Likewise.
1716 (_bfd_x86_elf_link_hash_table_create): Likewise.
1717 (_bfd_x86_elf_link_hash_table_free): Renamed to ...
1718 (elf_x86_link_hash_table_free): This. Make it static.
1719 * elfxx-x86.h: Don't include "objalloc.h".
1721 (elf_x86_lazy_plt_layout): Likewise.
1722 (elf_x86_non_lazy_plt_layout): Likewise.
1723 (elf_x86_plt_layout): Likewise.
1724 (_bfd_x86_elf_link_hash_table_create): Likewise.
1725 (bfd_elf64_bfd_link_hash_table_create): Likewise.
1726 (bfd_elf32_bfd_link_hash_table_create): Likewise.
1727 (elf_x86_link_hash_table): Add plt, lazy_plt, non_lazy_plt,
1728 srelplt2 and next_tls_desc_index.
1729 (_bfd_x86_elf_link_hash_table_free): Removed.
1731 2017-08-30 Maciej W. Rozycki <macro@imgtec.com>
1733 * elfxx-mips.c (mips_elf_perform_relocation): Correct microMIPS
1734 branch offset interpretation.
1736 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1739 * opncls.c (bfd_close_all_done): Call _close_and_cleanup.
1741 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1743 * elf64-x86-64.c (elf_x86_64_next_tls_desc_index): Removed.
1744 (elf_x86_64_srelplt2): Likewise.
1746 2017-08-30 Alan Modra <amodra@gmail.com>
1748 * elf64-ppc.c (struct ppc_link_hash_table): Add do_tls_opt.
1749 (ppc64_elf_tls_optimize): Set it.
1750 (ppc64_elf_relocate_section): Nop addis on TPREL16_HA, and convert
1751 insn on TPREL16_LO and TPREL16_LO_DS relocs to use r13 when
1752 addis would add zero.
1753 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add do_tls_opt.
1754 (ppc_elf_tls_optimize): Set it.
1755 (ppc_elf_relocate_section): Nop addis on TPREL16_HA, and convert
1756 insn on TPREL16_LO relocs to use r2 when addis would add zero.
1758 2017-08-30 Alan Modra <amodra@gmail.com>
1760 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing
1761 __tls_get_addr call sequences to LE, don't move the addi down
1762 to the nop. Replace the bl with addi and leave the nop alone.
1764 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1766 * elf32-i386.c (elf_i386_pie_finish_undefweak_symbol):
1768 * elf64-x86-64.c (elf_x86_64_finish_local_dynamic_symbol):
1770 (elf_x86_64_pie_finish_undefweak_symbol): Likewise.
1772 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1774 * Makefile.am (BFD32_BACKENDS): Add elfxx-x86.lo.
1775 (BFD64_BACKENDS): Likewise.
1776 (BFD32_BACKENDS_CFILES): Add elfxx-x86.c.
1777 (BFD64_BACKENDS_CFILES): Likewise.
1778 * Makefile.in: Regenerated.
1779 * configure.ac (bfd_backends): Add elfxx-x86.lo together with
1780 elf32-i386.lo and elf64-x86-64.lo.
1781 * configure: Regenerated.
1782 * elf32-i386.c: Include "elfxx-x86.h" instead of "sysdep.h",
1783 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
1784 "objalloc.h" and "hashtab.h".
1785 (ELIMINATE_COPY_RELOCS): Removed.
1786 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
1787 (SYMBOL_NO_COPYRELOC): Likewise.
1788 (elf_i386_link_hash_entry): Likewise.
1789 (GOT_UNKNOWN): Likewise.
1790 (GOT_NORMAL): Likewise.
1791 (GOT_TLS_GD): Likewise.
1792 (elf_i386_hash_entry): Likewise.
1793 (elf_i386_obj_tdata): Likewise.
1794 (elf_i386_tdata): Likewise.
1795 (elf_i386_local_got_tls_type): Likewise.
1796 (elf_i386_local_tlsdesc_gotent): Likewise.
1797 (elf_i386_hash_table): Likewise.
1798 (elf_i386_link_hash_newfunc): Likewise.
1799 (elf_i386_local_htab_hash): Likewise.
1800 (elf_i386_local_htab_eq): Likewise.
1801 (elf_i386_get_local_sym_hash): Likewise.
1802 (elf_i386_link_hash_table_free): Likewise.
1803 (elf_i386_copy_indirect_symbol): Likewise.
1804 (elf_i386_fixup_symbol): Likewise.
1805 (elf_i386_readonly_dynrelocs): Likewise.
1806 (elf_i386_always_size_sections): Likewise.
1807 (elf_i386_set_tls_module_base): Likewise.
1808 (elf_i386_dtpoff_base): Likewise.
1809 (compare_relocs): Likewise.
1810 (elf_i386_hash_symbol): Likewise.
1811 (elf_i386_parse_gnu_properties): Likewise.
1812 (elf_i386_merge_gnu_properties): Likewise.
1813 (elf_i386_link_check_relocs): Likewise.
1814 (elf_i386_merge_symbol_attribute): Likewise.
1815 (bfd_elf32_bfd_link_check_relocs): Likewise.
1816 (elf_backend_copy_indirect_symbol): Likewise.
1817 (elf_backend_always_size_sections): Likewise.
1818 (elf_backend_omit_section_dynsym): Likewise.
1819 (elf_backend_hash_symbol): Likewise.
1820 (elf_backend_fixup_symbol): Likewise.
1821 (elf_backend_parse_gnu_properties): Likewise.
1822 (elf_backend_merge_gnu_properties): Likewise.
1823 (elf_backend_merge_symbol_attribute): Likewise.
1824 (elf_i386_mkobject): Updated.
1825 (elf_i386_link_hash_table_create): Likewise.
1826 (elf_i386_check_tls_transition): Likewise.
1827 (elf_i386_tls_transition): Likewise.
1828 (elf_i386_convert_load_reloc): Likewise.
1829 (elf_i386_check_relocs): Likewise.
1830 (elf_i386_adjust_dynamic_symbol): Likewise.
1831 (elf_i386_allocate_dynrelocs): Likewise.
1832 (elf_i386_convert_load): Likewise.
1833 (elf_i386_size_dynamic_sections): Likewise.
1834 (elf_i386_relocate_section): Likewise.
1835 (elf_i386_finish_dynamic_symbol ): Likewise.
1836 (elf_i386_finish_dynamic_sections): Likewise.
1837 (elf_i386_output_arch_local_syms): Likewise.
1838 (elf_i386_get_synthetic_symtab): Likewise.
1839 (elf_i386_link_setup_gnu_properties): Likewise.
1840 (elf_i386_link_hash_table): Use elf_x86_link_hash_table, instead
1841 of elf_link_hash_table, as base.
1842 (elf_i386_next_tls_desc_index): New.
1843 (elf_i386_srelplt2): Likewise.
1844 (elf_i386_plt): Likewise.
1845 (elf_i386_lazy_plt): Likewise.
1846 (elf_i386_non_lazy_plt): Likewise.
1847 * elf32-x86-64.c: Include "elfxx-x86.h" instead of "sysdep.h",
1848 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
1849 "objalloc.h" and "hashtab.h".
1850 (ELIMINATE_COPY_RELOCS): Removed.
1851 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
1852 (SYMBOL_NO_COPYRELOC): Likewise.
1853 (elf_x86_64_link_hash_entry): Likewise.
1854 (GOT_UNKNOWN): Likewise.
1855 (GOT_NORMAL): Likewise.
1856 (GOT_TLS_GD): Likewise.
1857 (elf_x86_64_hash_entry): Likewise.
1858 (elf_x86_64_obj_tdata): Likewise.
1859 (elf_x86_64_tdata): Likewise.
1860 (elf_x86_64_local_got_tls_type): Likewise.
1861 (elf_x86_64_local_tlsdesc_gotent): Likewise.
1862 (elf_x86_64_hash_table): Likewise.
1863 (elf_x86_64_link_hash_newfunc): Likewise.
1864 (elf_x86_64_local_htab_hash): Likewise.
1865 (elf_x86_64_local_htab_eq): Likewise.
1866 (elf_x86_64_get_local_sym_hash): Likewise.
1867 (elf_x86_64_link_hash_table_free): Likewise.
1868 (elf_x86_64_copy_indirect_symbol): Likewise.
1869 (elf_x86_64_fixup_symbol): Likewise.
1870 (elf_x86_64_readonly_dynrelocs): Likewise.
1871 (elf_x86_64_always_size_sections): Likewise.
1872 (elf_x86_64_set_tls_module_base): Likewise.
1873 (elf_x86_64_dtpoff_base): Likewise.
1874 (compare_relocs): Likewise.
1875 (elf_x86_64_merge_symbol_attribute): Likewise.
1876 (elf_x86_64_hash_symbol): Likewise.
1877 (elf_x86_64_parse_gnu_properties): Likewise.
1878 (elf_x86_64_merge_gnu_properties): Likewise.
1879 (elf_x86_64_link_check_relocs): Likewise.
1880 (elf_backend_copy_indirect_symbol): Likewise.
1881 (elf_backend_always_size_sections): Likewise.
1882 (bfd_elf64_bfd_link_check_relocs): Likewise.
1883 (elf_backend_merge_symbol_attribute): Likewise.
1884 (elf_backend_hash_symbol): Likewise.
1885 (elf_backend_omit_section_dynsym): Likewise.
1886 (elf_backend_fixup_symbol): Likewise.
1887 (elf_backend_parse_gnu_properties): Likewise.
1888 (elf_backend_merge_gnu_properties): Likewise.
1889 (bfd_elf32_bfd_link_check_relocs): Likewise.
1890 (elf_x86_64_mkobject): Updated.
1891 (elf_x86_64_link_hash_table_create): Likewise.
1892 (elf_x86_64_check_tls_transition): Likewise.
1893 (elf_x86_64_tls_transition): Likewise.
1894 (elf_x86_64_convert_load_reloc): Likewise.
1895 (elf_x86_64_check_relocs): Likewise.
1896 (elf_x86_64_adjust_dynamic_symbol): Likewise.
1897 (elf_x86_64_allocate_dynrelocs): Likewise.
1898 (elf_x86_64_convert_load): Likewise.
1899 (elf_x86_64_size_dynamic_sections): Likewise.
1900 (elf_x86_64_relocate_section): Likewise.
1901 (elf_x86_64_finish_dynamic_symbol ): Likewise.
1902 (elf_x86_64_finish_dynamic_sections): Likewise.
1903 (elf_x86_64_output_arch_local_syms): Likewise.
1904 (elf_x86_64_get_synthetic_symtab): Likewise.
1905 (elf_x86_64_link_setup_gnu_properties): Likewise.
1906 (elf_x86_64_link_hash_table): Use elf_x86_link_hash_table,
1907 instead of elf_link_hash_table, as base.
1908 (elf_x86_64_next_tls_desc_index): New.
1909 (elf_x86_64_srelplt2): Likewise.
1910 (elf_x86_64_plt): Likewise.
1911 (elf_x86_64_lazy_plt): Likewise.
1912 (elf_x86_64_non_lazy_plt): Likewise.
1913 * elfxx-x86.c: New file.
1914 * elfxx-x86.h: Likewise.
1916 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1918 * elf32-i386.c (elf_i386_get_synthetic_symtab): Simplify bad
1920 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1922 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1924 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check valid PLT
1925 sections before checking dynamic relocations and free invalid
1926 PLT section contents.
1927 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1929 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
1931 * elf-bfd.h (_bfd_elf_ifunc_get_synthetic_symtab): Removed.
1932 * elf-ifunc.c (_bfd_elf_ifunc_get_synthetic_symtab): Likewise.
1934 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
1937 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check for valid
1939 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1941 2017-08-27 H.J. Lu <hongjiu.lu@intel.com>
1943 * elf32-i386.c (elf_i386_link_hash_newfunc): Initialize
1945 * elf64-x86-64.c (elf_x86_64_link_hash_newfunc): Likewise.
1947 2017-08-26 H.J. Lu <hongjiu.lu@intel.com>
1950 * elf-bfd.h (elf_obj_tdata): Use ENUM_BITFIELD on object_id,
1951 dyn_lib_class and has_gnu_symbols. Change bad_symtab to bitfield.
1952 Add a has_no_copy_on_protected bitfield.
1953 (elf_has_no_copy_on_protected): New.
1954 * elf-properties.c (_bfd_elf_parse_gnu_properties): Set
1955 elf_has_no_copy_on_protected for GNU_PROPERTY_NO_COPY_ON_PROTECTED.
1956 (elf_merge_gnu_property_list): Likewise.
1957 (_bfd_elf_link_setup_gnu_properties): Set extern_protected_data
1958 to FALSE for elf_has_no_copy_on_protected.
1959 * elf32-i386.c (SYMBOL_NO_COPYRELOC): New.
1960 (elf_i386_link_hash_entry): Add def_protected.
1961 (elf_i386_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
1962 when checking info->nocopyreloc.
1963 (elf_i386_link_setup_gnu_properties): Don't set
1964 extern_protected_data here.
1965 (elf_i386_merge_symbol_attribute): New function.
1966 (elf_backend_merge_symbol_attribute): New.
1967 * elf64-x86-64.c (SYMBOL_NO_COPYRELOC): New.
1968 (elf_x86_64_link_hash_entry): Add def_protected.
1969 (elf_x86_64_need_pic): Report protected symbol for def_protected.
1970 (elf_x86_64_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
1971 when checking info->nocopyreloc.
1972 (elf_x86_64_relocate_section): Also check for R_X86_64_PC32
1973 relocation run-time overflow and unresolvable R_X86_64_32S
1974 relocation against protected data symbol defined in shared object
1975 with GNU_PROPERTY_NO_COPY_ON_PROTECTED.
1976 (elf_x86_64_link_setup_gnu_properties): Don't set
1977 extern_protected_data here.
1978 (elf_x86_64_merge_symbol_attribute): New function.
1979 (elf_backend_merge_symbol_attribute): New.
1981 2017-08-26 Alan Modra <amodra@gmail.com>
1983 * elf32-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
1984 (ppc_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
1985 (ppc_elf_relocate_section): Comment fix.
1986 * elf64-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
1987 (ppc64_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
1988 Support dynamic relocs for TPREL16 when non-pic too.
1989 (dec_dynrel_count): Adjust TPREL16 handling as per check_relocs.
1990 (ppc64_elf_relocate_section): Support dynamic relocs for TPREL16
1993 2017-08-25 H.J. Lu <hongjiu.lu@intel.com>
1995 * elf32-i386.c (elf_i386_link_hash_entry): Remove redundant
1996 "symbol" in comments.
1997 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Likewise.
1999 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
2002 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for
2003 R_X86_64_PC32 relocation run-time overflow and unresolvable
2004 R_X86_64_32S relocation with -z nocopyreloc.
2006 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
2008 * elf32-i386.c (elf_i386_check_relocs): Revert the last change.
2009 Undefined symbols may not have a type.
2010 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
2012 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
2014 * elf64-x86-64.c (elf_x86_64_need_pic): Add an argument for
2015 bfd_link_info. Report shared, PIE or PDE object based on
2017 (elf_x86_64_check_relocs): Update elf_x86_64_need_pic call.
2018 (elf_x86_64_relocate_section): Likewise.
2020 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
2022 * elf32-i386.c (elf_i386_check_relocs): Increment PLT count only
2023 for function symbols.
2024 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
2026 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
2028 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set
2029 extern_protected_data to FALSE if GNU_PROPERTY_NO_COPY_ON_PROTECTED
2030 is set on any input relocatable file.
2031 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
2033 2017-08-23 Alan Modra <amodra@gmail.com>
2036 * elf64-ppc.c (ensure_undef_dynamic): Rename from
2037 ensure_undefweak_dynamic. Handle undefined too.
2038 * elf32-ppc.c (ensure_undef_dynamic): Likewise.
2039 * elf32-hppa.c (ensure_undef_dynamic): Likewise.
2040 (allocate_dynrelocs): Discard undefined non-default visibility
2041 relocs first. Make undefined syms dynamic. Tidy goto.
2043 2017-08-21 Alan Modra <amodra@gmail.com>
2044 H.J. Lu <hongjiu.lu@intel.com>
2047 * elf-bfd.h (SYMBOLIC_BIND): Return TRUE for __start/__stop symbols.
2048 * elflink.c (bfd_elf_define_start_stop): Rewrite.
2050 2017-08-21 Hans-Peter Nilsson <hp@bitrange.com>
2053 * elf64-mmix.c (mmix_elf_relax_section): Correct handling of
2054 undefined weak symbols.
2056 2017-08-18 Nick Clifton <nickc@redhat.com>
2059 * tekhex.c (getsym): Fix check for source pointer walking off the
2060 end of the input buffer.
2062 2017-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
2065 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Skip IFUNC
2066 relocations in debug sections, change abort to _bfd_error_handler.
2068 2017-08-14 Nick Clifton <nickc@redhat.com>
2071 * elf.c (setup_group): Check for an empty or very small group
2073 * po/bfd.pot: Regenerate.
2075 2017-08-14 Alan Modra <amodra@gmail.com>
2078 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't add
2079 alignment padding here.
2080 * elflink.c (bfd_elf_discard_info): Add .eh_frame padding here
2081 in a reverse pass over sections.
2083 2017-08-11 H.J. Lu <hongjiu.lu@intel.com>
2086 * elf32-i386.c (elf_i386_get_synthetic_symtab): Allocate space
2087 for @plt suffixes first.
2088 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
2090 2017-08-08 Nick Clifton <nickc@redhat.com>
2093 * elf-attrs.c (_bfd_elf_parse_attributes): Complain about very
2094 small section lengths.
2095 * elf.c (_bfd_elf_setup_sections): Skip empty entries in the group
2097 (elfcore_grok_freebsd_prstatus): Add checks to make sure that
2098 there is enough data present in the note.
2100 2017-08-08 Alan Modra <amodra@gmail.com>
2103 * elf32-microblaze.c (microblaze_elf_check_relocs): Don't bump
2104 got.refcount for GOTOFF relocs, just create .got section.
2106 2017-08-07 H.J. Lu <hongjiu.lu@intel.com>
2108 * elflink.c (elf_link_add_object_symbols): Move common symbol
2109 check after bed->common_definition.
2111 2017-08-07 Alan Modra <amodra@gmail.com>
2114 * elflink.c (bfd_elf_final_link): Don't segfault when sections
2115 needed to define various dynamic tags have been discarded.
2117 2017-08-07 Nick Clifton <nickc@redhat.com>
2120 * elf32-i386.c (elf_i386_link_setup_gnu_properties): If the dynobj
2121 has not been set then use the bfd returned by
2122 _bfd_elf_link_setup_gnu_properties. If that is null then search
2123 through all the input bfds selecting the first normal, ELF format
2125 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
2127 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
2129 * elf32-i386.c (elf_i386_link_hash_entry): Change tls_get_addr
2131 (elf_i386_link_hash_newfunc): Initialize tls_get_addr to 0.
2132 (elf_i386_check_tls_transition): Check tls_get_addr directly.
2133 (elf_i386_convert_load_reloc): Update tls_get_addr check.
2134 (elf_i386_link_check_relocs): New function.
2135 (bfd_elf32_bfd_link_check_relocs): New.
2136 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Change tls_get_addr
2138 (elf_x86_64_link_hash_newfunc): Initialize tls_get_addr to 0.
2139 (elf_x86_64_check_tls_transition): Check tls_get_addr directly.
2140 (elf_x86_64_convert_load_reloc): Update tls_get_addr check.
2141 (elf_x86_64_link_check_relocs): New function.
2142 (bfd_elf64_bfd_link_check_relocs): New.
2143 (bfd_elf32_bfd_link_check_relocs): Likewise.
2145 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
2148 * elflink.c (elf_link_add_object_symbols): Treat common symbol
2149 as undefined for --no-define-common.
2151 2017-08-05 Alan Modra <amodra@gmail.com>
2153 * elf32-hppa.c (elf32_hppa_set_gp): Don't require an
2154 hppa_link_hash_table.
2156 2017-08-02 Max Filippov <jcmvbkbc@gmail.com>
2158 * xtensa-isa.c (xtensa_isa_init): Don't update lookup table
2159 entries for sysregs with negative indices.
2161 2017-08-01 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2163 * elf32-s390.c (elf_s390_finish_dynamic_sections): Skip if it
2164 isn't the S/390 specific elf data.
2165 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
2167 2017-07-31 Kuan-Lin Chen <rufus@andestech.com>
2169 * elfxx-riscv.c (riscv_elf_add_sub_reloc): New function.
2170 * (howto_table) [R_RISCV_ADD8]: Use riscv_elf_add_sub_reloc.
2171 [R_RISCV_ADD16]: Likewise.
2172 [R_RISCV_ADD32]: Likewise.
2173 [R_RISCV_ADD64]: Likewise.
2174 [R_RISCV_SUB6]: Likewise.
2175 [R_RISCV_SUB8]: Likewise.
2176 [R_RISCV_SUB16]: Likewise.
2177 [R_RISCV_SUB32]: Likewise.
2178 [R_RISCV_SUB64]: Likewise.
2180 2017-07-31 Alan Modra <amodra@gmail.com>
2182 * elf64-ppc.c (ppc64_elf_tls_setup): Warn on --plt-localentry
2183 without ld.so checks.
2185 2017-07-29 Alan Modra <amodra@gmail.com>
2188 * elf64-ppc.c (struct ppc_link_hash_entry): Add non_zero_localentry.
2189 (ppc64_elf_merge_symbol): Set non_zero_localentry.
2190 (is_elfv2_localentry0): Test non_zero_localentry.
2191 (ppc64_elf_tls_setup): Default to --no-plt-localentry.
2193 2017-07-28 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2195 * elf32-s390.c (elf_s390_finish_dynamic_sections): Add NULL
2196 pointer check for htab->elf.irelplt.
2197 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
2199 2017-07-27 Nick Clifton <nickc@redhat.com>
2202 * mach-o.c (bfd_mach_o_read_symtab_strtab): Fail if the symtab
2204 * nlmcode.h (nlm_swap_auxiliary_headers_in): Replace assertion
2206 * section.c (bfd_make_section_with_flags): Fail if the name or bfd
2208 * vms-alpha.c (bfd_make_section_with_flags): Correct computation
2210 (evax_bfd_print_emh): Check for invalid string lengths.
2212 2017-07-25 Nick Clifton <nickc@redhat.com>
2214 * po/fr.po: Updated French translation.
2216 2017-07-25 Benjamin Green <bengreen5mx@gmail.com>
2219 * elf32-msp430.c (msp430_elf_relax_section): Allow conversion of
2220 16-bit absolute branches into 10-bit pc-relative branches on the
2221 MSP430 as well as the MSP430X.
2223 2017-07-25 Alan Modra <amodra@gmail.com>
2225 * elf64-ppc.c (struct map_stub): Add tls_get_addr_opt_bctrl.
2226 (stub_eh_frame_size): New function.
2227 (ppc_size_one_stub): Set group tls_get_addr_opt_bctrl.
2228 (group_sections): Init group tls_get_addr_opt_bctrl.
2229 (ppc64_elf_size_stubs): Update sizing and initialization of
2230 .eh_frame. Iteration over stubs via group list.
2231 (ppc64_elf_build_stubs): Iterate over stubs via group list.
2232 (ppc64_elf_finish_dynamic_sections): Update finalization of
2235 2017-07-24 Nick Clifton <nickc@redhat.com>
2238 * mach-o.c (bfd_mach_o_canonicalize_relocs): Pass the base address
2239 of the relocs to the canonicalize_one_reloc routine.
2240 * mach-o.h (struct bfd_mach_o_backend_data): Update the prototype
2241 for the _bfd_mach_o_canonicalize_one_reloc field.
2242 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add
2243 res_base parameter. Use to check for corrupt pair relocs.
2244 * mach-o-aarch64.c (bfd_mach_o_arm64_canonicalize_one_reloc):
2246 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc):
2248 * mach-o-x86-64.c (bfd_mach_o_x86_64_canonicalize_one_reloc):
2251 * vms-alpha.c (_bfd_vms_slurp_eihd): Make sure that there is
2252 enough data in the record before attempting to parse it.
2253 (_bfd_vms_slurp_eeom): Likewise.
2255 (_bfd_vms_slurp_egsd): Check for an invalid section index.
2256 (image_set_ptr): Likewise.
2257 (alpha_vms_slurp_relocs): Likewise.
2259 (alpha_vms_object_p): Check for a truncated record.
2261 2017-07-24 Nick Clifton <nickc@redhat.com>
2264 * reloc.c (_bfd_unrecognized_reloc): New function. Reports
2265 an unrecognized reloc and sets the bfd_error value.
2266 * libbfd.h: Regenerate.
2267 * elf32-arm.c (elf32_arm_final_link_relocate): Use the new
2269 * elf32-i386.c (elf_i386_relocate_section): Likewise.
2270 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
2271 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
2272 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise.
2273 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
2275 2017-07-23 Alan Modra <amodra@gmail.com>
2277 * elf64-ppc.c (ppc64_elf_size_stubs): Correct advance to
2280 2017-07-19 Szabolcs Nagy <szabolcs.nagy@arm.com>
2283 * elfnn-aarch64.c (elfNN_aarch64_reloc_type_class): Return
2284 reloc_class_ifunc for ifunc symbols.
2286 2017-07-19 Nick Clifton <nickc@redhat.com>
2289 * archive.c (bfd_generic_archive_p): If the bfd does not have the
2290 correct magic bytes at the start, set the error to wrong format
2291 and clear the format selector before returning NULL.
2293 2017-07-19 Nick Clifton <nickc@redhat.com>
2296 * coff-rs6000.c (_bfd_strntol): New function.
2297 (_bfd_strntoll): New function.
2298 (GET_VALUE_IN_FIELD): New macro.
2299 (EQ_VALUE_IN_FIELD): new macro.
2300 (_bfd_xcoff_slurp_armap): Use new macros.
2301 (_bfd_xcoff_archive_p): Likewise.
2302 (_bfd_xcoff_read_ar_hdr): Likewise.
2303 (_bfd_xcoff_openr_next_archived_file): Likewise.
2304 (_bfd_xcoff_stat_arch_elt): Likewise.
2305 * coff64-rs6000.c (_bfd_strntol): New function.
2306 (_bfd_strntoll): New function.
2307 (GET_VALUE_IN_FIELD): New macro.
2308 (xcoff64_slurp_armap): Use new macros.
2310 2017-07-19 Claudiu Zissulescu <claziss@synopsys.com>
2311 John Eric Martin <John.Martin@emmicro-us.com>
2313 * bfd-in2.h: Regenerate.
2314 * libbfd.h: Regenerate.
2315 * elf32-arc.c (JLI): Define.
2316 * reloc.c: Add JLI relocations.
2318 2017-07-18 Nick Clifton <nickc@redhat.com>
2321 * coff-sh.c: Fix spelling typos.
2322 * compress.c: Likewise.
2323 * cpu-pdp11.c: Likewise.
2324 * ecofflink.c: Likewise.
2325 * elf-m10300.c: Likewise.
2327 * elf32-arm.c: Likewise.
2328 * elf32-m68k.c: Likewise.
2329 * elf32-nds32.c: Likewise.
2330 * elf32-ppc.c: Likewise.
2331 * elf32-sh.c: Likewise.
2332 * elf32-v850.c: Likewise.
2333 * elf64-ppc.c: Likewise.
2334 * elf64-x86-64.c: Likewise.
2335 * elflink.c: Likewise.
2336 * elfnn-aarch64.c: Likewise.
2337 * elfxx-mips.c: Likewise.
2339 * sunos.c: Likewise.
2340 * vms-alpha.c: Likewise.
2341 * xcofflink.c: Likewise.
2343 2017-07-18 Nick Clifton <nickc@redhat.com>
2346 * coffcode.h (handle_COMDAT): Replace abort with an error message
2349 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
2352 * elf64-x86-64.c (elf_x86_64_relocate_section): Limit PIC check
2355 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
2357 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
2359 2017-07-16 Alan Modra <amodra@gmail.com>
2361 * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimize
2362 __tls_index GOT entries when using __tls_get_addr_opt stub.
2363 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2365 2017-07-12 Alan Modra <amodra@gmail.com>
2367 * po/es.po: Update from translationproject.org/latest/bfd/.
2368 * po/fi.po: Likewise.
2369 * po/fr.po: Likewise.
2370 * po/id.po: Likewise.
2371 * po/ja.po: Likewise.
2372 * po/ro.po: Likewise.
2373 * po/ru.po: Likewise.
2374 * po/sr.po: Likewise.
2375 * po/sv.po: Likewise.
2376 * po/tr.po: Likewise.
2377 * po/uk.po: Likewise.
2378 * po/vi.po: Likewise.
2379 * po/zh_CN.po: Likewise.
2380 * po/hr.po: New file from translationproject.org.
2381 * configure.ac (ALL_LINGUAS): Add hr. Sort.
2382 * configure: Regenerate.
2384 2017-07-12 Nick Clifton <nickc@redhat.com>
2386 Fix compile time warnings using gcc 7.1.1.
2387 * elf32-xtensa.c (elf_xtensa_get_plt_section): Increase length of
2389 (elf_xtensa_get_gotplt_section): Increase length of got_name
2391 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add a
2392 default return of FALSE.
2393 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc): Add a
2394 default return of FALSE.
2396 2017-07-12 Alan Modra <amodra@gmail.com>
2398 * binary.c (binary_set_section_contents): Don't print filepos in
2400 (coff_write_object_contents): Cast size_t for error message.
2401 (coff_slurp_line_table): Don't use bfd_vma symndx.
2402 (coff_slurp_reloc_table): Remove unneeded cast.
2403 * dwarf2.c (read_section): Cast bfd_int64_t to long long for
2405 (find_abstract_instance_name): Likewise.
2406 * elf32-arm.c (arm_type_of_stub): Correct error arg order.
2407 (bfd_elf32_arm_stm32l4xx_erratum_scan): Don't cast error arg.
2408 (elf32_arm_check_relocs): Make r_symndx an int.
2409 * elf32-cris.c (cris_elf_check_relocs): Delete extraneous %s in
2411 * elf32-metag.c (elf_metag_relocate_section): Delete extra error
2413 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Rewrite bogus
2415 * elf32-i386.c (elf_i386_check_relocs): Make r_symndx an int.
2416 * elf32-s390.c (elf_s390_check_relocs): Likewise.
2417 * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
2418 * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
2419 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
2420 * elf64-s390.c (elf_s390_check_relocs): Likewise.
2421 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
2422 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Likewise.
2423 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
2424 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
2425 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
2426 * elf64-mmix.c (_bfd_mmix_after_linker_allocation): Cast size_t args
2427 and use %lu for error message.
2428 * elflink.c (elf_link_adjust_relocs): Delete extra error message arg.
2429 * mmo.c (mmo_scan): Make stab_loc a file_ptr. Cast expression for
2432 * elf32-arm.c (elf32_arm_tls_relax): Correct format string and args
2434 (elf32_arm_final_link_relocate): Likewise.
2435 * coff-arm.c (bfd_arm_process_before_allocation): Likewise.
2436 * coffcode.h (styp_to_sec_flags): Likewise.
2437 * cofflink.c (_bfd_coff_write_global_sym): Likewise.
2438 * ecoff.c (_bfd_ecoff_slurp_symbol_table): Likewise.
2439 * elf32-arc.c (arc_elf_merge_private_bfd_data): Likewise.
2440 * elf32-bfin.c (bfinfdpic_check_relocs): Likewise.
2441 (elf32_bfin_merge_private_bfd_data): Likewise.
2442 * elf32-cris.c (cris_elf_relocate_section): Likewise.
2443 * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
2444 * elf32-i370.c (i370_elf_merge_private_bfd_data): Likewise.
2445 (i370_elf_relocate_section): Likewise.
2446 * elf32-iq2000.c (iq2000_elf_merge_private_bfd_data): Likewise.
2447 * elf32-m32c.c (m32c_elf_merge_private_bfd_data): Likewise.
2448 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise.
2449 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
2450 * elf32-mep.c (mep_elf_merge_private_bfd_data): Likewise.
2451 * elf32-mt.c (mt_elf_merge_private_bfd_data): Likewise.
2452 * elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.
2453 * elfxx-mips.c (mips_elf_merge_obj_e_flags): Likewise.
2454 (_bfd_mips_elf_merge_private_bfd_data): Likewise.
2455 * ieee.c (ieee_write_id, read_id): Likewise.
2456 * mach-o.c (bfd_mach_o_write_contents): Likewise.
2457 (bfd_mach_o_layout_commands, bfd_mach_o_read_section_32): Likewise.
2458 (bfd_mach_o_read_section_64, bfd_mach_o_read_symtab_symbol): Likewise.
2459 (bfd_mach_o_read_command, bfd_mach_o_header_p): Likewise.
2460 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Likewise.
2461 * stabs.c (_bfd_link_section_stabs): Likewise.
2463 * coff-arm.c (coff_arm_relocate_section): Use L modifier in error
2465 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
2466 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
2467 * coff-rs6000.c (xcoff_reloc_type_toc): Likewise.
2468 * coff-sh.c (sh_relax_section): Likewise.
2469 (sh_relax_delete_bytes, sh_swap_insns): Likewise.
2470 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
2471 * coffcode.h (coff_slurp_reloc_table): Likewise.
2472 * coffgen.c (_bfd_coff_get_external_symbols): Likewise.
2473 (_bfd_coff_read_string_table): Likewise.
2474 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
2475 * compress.c (bfd_get_full_section_contents): Likewise.
2476 * dwarf2.c (read_formatted_entries, decode_line_info): Likewise.
2477 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
2478 * elf.c (bfd_elf_string_from_elf_section): Likewise.
2479 * elf32-arc.c (arc_special_overflow_checks): Likewise.
2480 * elf32-arm.c (elf32_arm_tls_relax): Likewise.
2481 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Likewise.
2482 (elf32_arm_write_section): Likewise.
2483 * elf32-bfin.c (bfin_relocate_section): Likewise.
2484 (bfinfdpic_relocate_section): Likewise.
2485 * elf32-hppa.c (hppa_build_one_stub): Likewise.
2486 (final_link_relocate, elf32_hppa_relocate_section): Likewise.
2487 * elf32-i386.c (elf_i386_tls_transition): Likewise.
2488 (elf_i386_relocate_section): Likewise.
2489 * elf32-ip2k.c (ip2k_final_link_relocate): Likewise.
2490 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise.
2491 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
2492 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
2493 * elf32-metag.c (elf_metag_relocate_section): Likewise.
2494 * elf32-nds32.c (unrecognized_reloc_msg): Likewise.
2495 (nds32_elf_relax_longcall1, nds32_elf_relax_longcall2): Likewise.
2496 (nds32_elf_relax_longcall3, nds32_elf_relax_longjump1): Likewise.
2497 (nds32_elf_relax_longjump2, nds32_elf_relax_longjump3): Likewise.
2498 (nds32_elf_relax_longcall4, nds32_elf_relax_longcall5): Likewise.
2499 (nds32_elf_relax_longcall6, nds32_elf_relax_longjump4): Likewise.
2500 (nds32_elf_relax_longjump5, nds32_elf_relax_longjump6): Likewise.
2501 (nds32_elf_relax_longjump7, nds32_elf_relax_loadstore): Likewise.
2502 (nds32_elf_relax_ptr, nds32_elf_ex9_build_hash_table): Likewise.
2503 * elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
2504 * elf32-rx.c (UNSAFE_FOR_PID): Likewise.
2505 * elf32-s390.c (invalid_tls_insn, elf_s390_relocate_section): Likewise.
2506 * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
2507 * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
2508 * elf32-sh.c (sh_elf_relax_section): Likewise.
2509 (sh_elf_relax_delete_bytes, sh_elf_swap_insns): Likewise.
2510 (sh_elf_relocate_section): Likewise.
2511 * elf32-sh64.c (shmedia_prepare_reloc): Likewise.
2512 * elf32-spu.c (spu_elf_relocate_section): Likewise.
2513 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
2514 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
2515 * elf32-v850.c (v850_elf_relax_section): Likewise.
2516 * elf32-vax.c (elf_vax_check_relocs): Likewise.
2517 (elf_vax_relocate_section): Likewise.
2518 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
2519 (extend_ebb_bounds_forward, extend_ebb_bounds_backward): Likewise.
2520 (compute_text_actions, compute_ebb_proposed_actions): Likewise.
2521 (do_fix_for_relocatable_link): Likewise.
2522 * elf64-alpha.c (elf64_alpha_relax_got_load): Likewise.
2523 (elf64_alpha_relax_with_lituse): Likewise.
2524 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Likewise.
2525 (elf_hppa_final_link_relocate): Likewise.
2526 * elf64-ia64-vms.c (elf64_ia64_relax_section): Likewise.
2527 (elf64_ia64_choose_gp, elf64_ia64_relocate_section): Likewise.
2528 (elf64_vms_link_add_object_symbols): Likewise.
2529 * elf64-mmix.c (mmix_elf_perform_relocation): Likewise.
2530 (mmix_final_link_relocate): Likewise.
2531 * elf64-s390.c (invalid_tls_insn): Likewise.
2532 (elf_s390_relocate_section): Likewise.
2533 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
2534 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
2535 (elf_x86_64_relocate_section): Likewise.
2536 * elfcode.h (elf_slurp_symbol_table): Likewise.
2537 * elfcore.h (elf_core_file_p): Likewise.
2538 * elflink.c (elf_link_read_relocs_from_section): Likewise.
2539 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
2540 (elfNN_aarch64_relocate_section): Likewise.
2541 * elfnn-ia64.c (elfNN_ia64_relax_section): Likewise.
2542 (elfNN_ia64_choose_gp, elfNN_ia64_relocate_section): Likewise.
2543 * elfnn-riscv.c (riscv_elf_relocate_section): Likewise.
2544 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
2545 (_bfd_mips_elf_relocate_section): Likewise.
2546 (_bfd_mips_elf_finish_dynamic_symbol, mips_finish_exec_plt): Likewise.
2547 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
2548 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
2549 * ieee.c (ieee_slurp_external_symbols): Likewise.
2550 * ihex.c (ihex_write_object_content): Likewise.
2551 * mach-o.c (bfd_mach_o_build_exec_seg_command): Likewise.
2552 * merge.c (_bfd_merged_section_offset): Likewise.
2553 * mmo.c (mmo_write_loc_chunk): Likewise.
2554 (mmo_write_object_contents): Likewise.
2555 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Likewise.
2556 * stabs.c (_bfd_link_section_stabs): Likewise.
2557 * xcofflink.c (xcoff_link_add_symbols, xcoff_find_tc0): Likewise.
2559 2017-07-11 Alan Modra <amodra@gmail.com>
2561 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo.
2563 2017-07-11 Alan Modra <amodra@gmail.com>
2565 * elf32-ppc.c (ppc_elf_relocate_section): Emit "unexpected
2566 instruction" error using _bfd_error_handler, not einfo.
2568 2017-07-10 Nick Clifton <nickc@redhat.com>
2570 * coffcode.h (coff_slurp_symbol_table): Do not include an entry
2571 for C_AIX_WEAKEXT if it has the same value as C_WEAKEXT.
2573 2017-07-07 John Baldwin <jhb@FreeBSD.org>
2575 * elf.c (elfcore_grok_freebsd_note): Handle NT_FREEBSD_PTLWPINFO.
2577 2017-07-07 Alan Modra <amodra@gmail.com>
2579 * coffcode.h (coff_slurp_symbol_table): Handle C_AIX_WEAKEXT.
2581 2017-07-07 Alan Modra <amodra@gmail.com>
2583 * bfd.c (_doprnt): Replace "L" with "ll" when printing bfd_vma
2584 as long long. Move code replacing "ll" with "I64", and simplify.
2586 2017-07-06 H.J. Lu <hongjiu.lu@intel.com>
2588 * bfd.c (_doprnt): Convert 'L' to 'l' when setting wide_width
2591 2017-07-05 H.J. Lu <hongjiu.lu@intel.com>
2593 * dwarf2.c (line_info_add_include_dir_stub): Replace time with
2595 (line_info_add_file_name): Likewise.
2596 (decode_line_info): Likewise.
2598 2017-07-04 Tristan Gingold <gingold@adacore.com>
2600 * version.m4: Bump version to 2.29.51
2601 * configure: Regenerate.
2603 2017-07-04 Jiong Wang <jiong.wang@arm.com>
2605 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Remove the
2606 sanity check at the head of this function.
2608 2017-07-04 Jan Kratochvil <jan.kratochvil@redhat.com>
2610 * dwarf2.c (struct dwarf2_debug): Add fields dwarf_line_str_buffer and
2611 dwarf_line_str_size.
2612 (struct attr_abbrev): Add field implicit_const.
2613 (dwarf_debug_sections): Add .debug_line_str.
2614 (enum dwarf_debug_section_enum): Add debug_line_str and debug_max.
2615 (dwarf_debug_section_assert): Add static assertion.
2616 (read_indirect_line_string): New.
2617 (read_abbrevs): Support DW_FORM_implicit_const.
2618 (is_str_attr): Support DW_FORM_line_strp.
2619 (read_attribute_value): Support DW_FORM_line_strp and
2620 DW_FORM_implicit_const.
2621 (read_attribute): Support DW_FORM_implicit_const.
2622 (line_info_add_include_dir, line_info_add_include_dir_stub):
2623 (line_info_add_file_name, read_formatted_entries): New.
2624 (decode_line_info, parse_comp_unit): Support DWARF 5.
2625 (_bfd_dwarf2_cleanup_debug_info): Free dwarf_line_str_buffer.
2627 2017-07-03 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
2629 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove the
2630 abort statement that was put for symbols that are not dynamic.
2632 2017-07-03 Tristan Gingold <gingold@adacore.com>
2634 * po/bfd.pot: Regenerate
2636 2017-07-03 Alan Modra <amodra@gmail.com>
2638 * bfd.c (_doprnt): Rewrite "ll" and "L" modifiers to "I64" for
2639 __MSVCRT__. Support "L" modifier for bfd_vma. Formatting.
2640 * elf.c (setup_group): Use "Lx" to print sh_size.
2641 (_bfd_elf_setup_sections): Remove unnecessary cast and print
2642 unknown section type in hex.
2643 (copy_special_section_fields): Style fix.
2644 (bfd_section_from_shdr): Correct format for sh_link. Use a
2645 common error message for all the variants of unrecognized
2647 (assign_file_positions_for_load_sections): Use "Lx" for lma
2648 adjust error message.
2649 (assign_file_positions_for_non_load_sections): Formatting.
2650 (rewrite_elf_program_header): Formatting. Use "Lx" for
2651 bfd_vma values in error messages.
2652 * elfcode.h (elf_slurp_reloc_table_from_section): Cast
2653 ELF_R_SYM value to type expected by format.
2654 * elflink.c (elf_link_read_relocs_from_section): Use "Lx"
2656 (elf_link_add_object_symbols): Use "Lu" for symbol sizes.
2657 (elf_link_input_bfd): Use "Lx" for r_info.
2658 (bfd_elf_gc_record_vtinherit): Use "Lx" for offset.
2660 2017-07-03 Alan Modra <amodra@gmail.com>
2662 * bfd.c (bfd_scan_vma): Don't use long long unless HAVE_LONG_LONG.
2663 * coff-rs6000.c (FMT20): Handle hosts with 64-bit long and
2664 Microsoft C library variant of long long format specifier.
2665 (PRINT20): Cast value to bfd_uint64_t not long long.
2666 * coffcode.h (coff_print_aux): Use BFD_VMA_FMT.
2667 * coff-x86_64.c (coff_amd64_reloc): Use bfd_uint64_t rather than
2668 long long. Don't cast to bfd_vma.
2669 * elf32-score.c (score3_bfd_getl48): Likewise.
2670 * vms-alpha.c (_bfd_vms_slurp_eisd): Likewise.
2672 2017-07-03 Alan Modra <amodra@gmail.com>
2674 * elf.c (_bfd_elf_print_private_bfd_data): Use BFD_VMA_FMT to
2676 (bfd_elf_print_symbol): Don't cast symbol->flags.
2677 (_bfd_elf_symbol_from_bfd_symbol): Likewise.
2678 * elf32-ppc.c (ppc_elf_begin_write_processing): Correct
2679 _bfd_error_handler argument order.
2680 (ppc_elf_merge_private_bfd_data): Don't cast flags.
2682 2017-07-03 Alan Modra <amodra@gmail.com>
2684 * configure.ac: Invoke AC_CHECK_TYPES for long long. Invoke
2685 AC_TYPE_LONG_DOUBLE.
2686 * configure: Regenerate.
2687 * config.in: Regenerate.
2689 2017-06-29 Andrew Waterman <andrew@sifive.com>
2691 * elfnn-riscv.c (riscv_elf_adjust_dynamic_symbol): Fix TLS copy
2694 2017-06-29 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
2696 * elfxx-sparc.c (allocate_dynrelocs): Don't make a symbol dynamic
2697 unless it is undefined weak.
2698 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Set the flag
2699 relative_reloc to direct non-dynamic symbols to R_SPARC_RELATIVE
2701 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): If symbol
2702 is not dynamic in PIC, abort.
2704 2017-06-29 Jiong Wang <jiong.wang@arm.com>
2707 * elfnn-aarch64.c (elfNN_aarch64_allocate_dynrelocs): Only make
2708 undefined weak symbols into dynamic.
2709 (elfNN_aarch64_final_link_relocate): Generate runtime RELATIVE
2710 relocation for non-dynamic symbols.
2711 (elfNN_aarch64_finish_dynamic_symbol): Add sanity check.
2713 2017-06-29 Jiong Wang <jiong.wang@arm.com>
2715 * elfnn-aarch64.c (aarch64_relocation_aginst_gp_p): New function.
2716 (elfNN_aarch64_final_link_relocate): Delete duplicated code for
2717 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15, BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC,
2718 BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
2719 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Optimize the
2722 2017-06-29 Andreas Arnez <arnez@linux.vnet.ibm.com>
2724 * elf-bfd.h (elfcore_write_s390_gs_cb): Add prototype.
2725 (elfcore_write_s390_gs_bc): Likewise.
2726 * elf.c (elfcore_grok_s390_gs_cb): New function.
2727 (elfcore_grok_s390_gs_bc): New function.
2728 (elfcore_grok_note): Call them.
2729 (elfcore_write_s390_gs_cb): New function.
2730 (elfcore_write_s390_gs_bc): New function.
2731 (elfcore_write_register_note): Call them.
2733 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
2735 * libbfd.c (_bfd_generic_get_section_contents): Don't call
2736 bfd_get_file_size. Check archive element size.
2737 (_bfd_generic_get_section_contents_in_window): Likewise.
2739 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
2741 * bfd-in2.h: Regenerated.
2742 * bfdio.c (bfd_get_size): Change return type to ufile_ptr.
2743 (bfd_get_file_size): Likewise.
2745 2017-06-28 Maciej W. Rozycki <macro@imgtec.com>
2746 Matthew Fortune <matthew.fortune@imgtec.com>
2748 * archures.c (bfd_mach_mips_interaptiv_mr2): New macro.
2749 * cpu-mips.c (I_interaptiv_mr2): New enum value.
2750 (arch_info_struct): Add "mips:interaptiv-mr2" entry.
2751 * elfxx-mips.c (_bfd_elf_mips_mach) <E_MIPS_MACH_IAMR2>: New
2753 (mips_set_isa_flags) <bfd_mach_mips_interaptiv_mr2>: Likewise.
2754 (bfd_mips_isa_ext) <bfd_mach_mips_interaptiv_mr2>: Likewise.
2755 (print_mips_isa_ext) <AFL_EXT_INTERAPTIV_MR2>: Likewise.
2756 (mips_mach_extensions): Add `bfd_mach_mipsisa32r3' and
2757 `bfd_mach_mips_interaptiv_mr2' entries.
2758 * bfd-in2.h: Regenerate.
2760 2017-06-27 Nick Clifton <nickc@redhat.com>
2762 * tekhex.c (pass_over): Revert accidental conversion of a local
2763 array to a static array.
2765 2017-06-27 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
2768 * elf32-avr.c (elf32_avr_adjust_diff_reloc_value): Adjust
2769 reloc addend if necessary. Adjust diff only if
2770 shrinked_insn_address < end_address.
2772 2017-06-27 Alan Modra <amodra@gmail.com>
2775 * libbfd.c (_bfd_generic_get_section_contents): Warning fix.
2776 (_bfd_generic_get_section_contents_in_window): Likewise.
2778 2017-06-26 Kuan-Lin Chen <rufus@andestech.com>
2780 * elfnn-riscv.c (perform_relocation): Support the new
2781 R_RISCV_32_PCREL relocation.
2782 (riscv_elf_relocate_section): Likewise.
2783 * elfxx-riscv.c (howto_table): Likewise.
2784 (riscv_reloc_map): Likewise.
2785 * bfd-in2.h (BFD_RELOC_RISCV_32_PCREL): New relocation.
2786 * libbfd.h: Regenerate.
2788 2017-06-27 Alan Modra <amodra@gmail.com>
2791 * libbfd.c (_bfd_generic_get_section_contents): Delete abort.
2792 Use unsigned file pointer type, and remove cast.
2793 * libbfd.c (_bfd_generic_get_section_contents_in_window): Likewise.
2794 Add "count", not "sz".
2796 2017-06-26 Pedro Alves <palves@redhat.com>
2799 * libbfd.c (_bfd_generic_get_section_contents): Add "count", not
2802 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
2805 * libbfd.c (_bfd_generic_get_section_contents_in_window): Add
2808 2017-06-26 Maciej W. Rozycki <macro@imgtec.com>
2810 * cpu-mips.c (arch_info_struct): Mark the 4010 32-bit.
2811 * elfxx-mips.c (mips_set_isa_flags) <bfd_mach_mips4010>: Set
2812 E_MIPS_ARCH_2 rather than E_MIPS_ARCH_3 in `e_flags'.
2813 (mips_mach_extensions): Mark `bfd_mach_mips4010' as extending
2814 `bfd_mach_mips6000' rather than `bfd_mach_mips4000'.
2816 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
2819 * compress.c (bfd_get_full_section_contents): Don't check the
2821 * libbfd.c (_bfd_generic_get_section_contents): Check for and
2822 reject a section whose size + offset is greater than the size
2824 (_bfd_generic_get_section_contents_in_window): Likewise.
2826 2017-06-26 Nick Clifton <nickc@redhat.com>
2829 * tekhex.c (getvalue): Check for the source pointer exceeding the
2830 end pointer before the first byte is read.
2832 2017-06-26 Nick Clifton <nickc@redhat.com>
2835 * opncls.c (get_build_id): Check that the section is big enough
2836 to contain the whole note.
2837 * compress.c (bfd_get_full_section_contents): Check for and reject
2838 a section whose size is greater than the size of the entire file.
2839 * elf32-v850.c (v850_elf_copy_notes): Allow for the ouput to not
2840 contain a notes section.
2842 2017-06-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2844 * elf64-s390.c (elf_s390_additional_program_headers): Add NULL
2846 (elf_s390_modify_segment_map): Likewise.
2847 (bfd_elf_s390_set_options): Lisewise.
2849 2017-06-26 Alan Modra <amodra@gmail.com>
2851 * elflink.c (_bfd_elf_link_create_dynstrtab): Don't make dynobj
2853 (_bfd_elf_size_group_sections): Skip --just-syms bfds.
2854 (bfd_elf_size_dynamic_sections): Ignore .note.GNU-stack and
2855 .preinit_array on --just-syms bfds.
2856 (_bfd_elf_gc_mark_extra_sections): Skip --just-syms bfds.
2857 (elf_gc_sweep, bfd_elf_parse_eh_frame_entries): Likewise.
2858 (bfd_elf_gc_sections, bfd_elf_discard_info): Likewise.
2860 2017-06-25 Sergei Trofimovich <slyfox@gentoo.org>
2862 * elf.c (find_link): Bounds check "hint".
2864 2017-06-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
2866 * elf32-arm.c (using_thumb_only): Update list of architectures in
2867 BFD_ASSERT for which the logic is valid.
2868 (using_thumb2_bl): Likewise.
2869 (using_thumb2): Likewise and return true for ARMv8-R.
2870 (arch_has_arm_nop): Likewise.
2871 (tag_cpu_arch_combine): New v8r table for ARMv8-R Tag_CPU_arch
2872 merging logic. Update commentis for value 15 of v8m_baseline,
2873 v8m_mainline and v4t_plus_v6_m arrays. Use v8r array to decide
2874 merging of value 15 of Tag_CPU_arch.
2876 2017-06-23 Jiong Wang <jiong.wang@arm.com>
2878 * reloc.c (BFD_RELOC_AARCH64_ADR_GOTPAGE): Rename to
2879 BFD_RELOC_AARCH64_ADR_GOT_PAGE
2880 * bfd-in2.h: Regenerate.
2882 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2884 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Move
2885 the error_alignment label forward. Properly align program
2886 property note section.
2888 2017-06-22 Eric Christopher <echristo@gmail.com>
2890 * elf32-arm.c (elf32_arm_final_link_relocate): Use labs rather than
2891 abs to fix a truncation warning.
2893 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2895 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Resolve
2896 local undefined weak symbol to 0.
2897 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Likewise.
2899 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2901 * elf32-i386.c (elf_i386_merge_gnu_properties): If info->shstk
2902 is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
2903 (elf_i386_link_setup_gnu_properties): If info->shstk is set,
2904 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
2905 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): If
2906 info->shstk is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
2907 (elf_x86_64_link_setup_gnu_properties): If info->shstk is set,
2908 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
2910 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2912 * elf32-i386.c (elf_i386_lazy_ibt_plt0_entry): New.
2913 (elf_i386_lazy_ibt_plt_entry): Likewise.
2914 (elf_i386_pic_lazy_ibt_plt0_entry): Likewise.
2915 (elf_i386_non_lazy_ibt_plt_entry): Likewise.
2916 (elf_i386_pic_non_lazy_ibt_plt_entry): Likewise.
2917 (elf_i386_eh_frame_lazy_ibt_plt): Likewise.
2918 (elf_i386_lazy_plt_layout): Likewise.
2919 (elf_i386_non_lazy_plt_layout): Likewise.
2920 (elf_i386_link_hash_entry): Add plt_second.
2921 (elf_i386_link_hash_table): Add plt_second and
2922 plt_second_eh_frame.
2923 (elf_i386_allocate_dynrelocs): Use the second PLT if needed.
2924 (elf_i386_size_dynamic_sections): Use .plt.got unwind info for
2925 the second PLT. Check the second PLT.
2926 (elf_i386_relocate_section): Use the second PLT to resolve
2927 PLT reference if needed.
2928 (elf_i386_finish_dynamic_symbol): Fill and use the second PLT if
2930 (elf_i386_finish_dynamic_sections): Set sh_entsize on the
2931 second PLT. Generate unwind info for the second PLT.
2932 (elf_i386_plt_type): Add plt_second.
2933 (elf_i386_get_synthetic_symtab): Support the second PLT.
2934 (elf_i386_parse_gnu_properties): Support
2935 GNU_PROPERTY_X86_FEATURE_1_AND.
2936 (elf_i386_merge_gnu_properties): Support
2937 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
2938 on GNU_PROPERTY_X86_FEATURE_1_IBT
2939 (elf_i386_link_setup_gnu_properties): If info->ibt is set,
2940 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
2941 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
2942 is set on all relocatable inputs.
2943 * elf64-x86-64.c (elf_x86_64_lazy_ibt_plt_entry): New.
2944 (elf_x32_lazy_ibt_plt_entry): Likewise.
2945 (elf_x86_64_non_lazy_ibt_plt_entry): Likewise.
2946 (elf_x32_non_lazy_ibt_plt_entry): Likewise.
2947 (elf_x86_64_eh_frame_lazy_ibt_plt): Likewise.
2948 (elf_x32_eh_frame_lazy_ibt_plt): Likewise.
2949 (elf_x86_64_lazy_ibt_plt): Likewise.
2950 (elf_x32_lazy_ibt_plt): Likewise.
2951 (elf_x86_64_non_lazy_ibt_plt): Likewise.
2952 (elf_x32_non_lazy_ibt_plt): Likewise.
2953 (elf_x86_64_get_synthetic_symtab): Support the second PLT.
2954 (elf_x86_64_parse_gnu_properties): Support
2955 GNU_PROPERTY_X86_FEATURE_1_AND.
2956 (elf_x86_64_merge_gnu_properties): Support
2957 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
2958 on GNU_PROPERTY_X86_FEATURE_1_IBT
2959 (elf_x86_64_link_setup_gnu_properties): If info->ibt is set,
2960 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
2961 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
2962 is set on all relocatable inputs.
2964 2017-06-22 Nick Clifton <nickc@redhat.com>
2967 * som.c (setup_sections): NUL terminate the space_strings buffer.
2968 Check that the space.name field does not index beyond the end of
2969 the space_strings buffer.
2971 2017-06-21 Nick Clifton <nickc@redhat.com>
2974 * coff-sh.c (sh_reloc): Check for an out of range reloc.
2976 2017-06-21 Nick Clifton <nickc@redhat.com>
2979 * vms-misc.c (_bfd_vms_save_sized_string): Use unsigned int as
2980 type of the size parameter.
2981 (_bfd_vms_save_counted_string): Add second parameter - the maximum
2982 length of the counted string.
2983 * vms.h (_bfd_vms_save_sized_string): Update prototype.
2984 (_bfd_vms_save_counted_string): Likewise.
2985 * vms-alpha.c (_bfd_vms_slurp_eisd): Update calls to
2986 _bfd_vms_save_counted_string.
2987 (_bfd_vms_slurp_ehdr): Likewise.
2988 (_bfd_vms_slurp_egsd): Likewise.
2989 (Parse_module): Likewise.
2991 2017-06-21 Alan Modra <amodra@gmail.com>
2993 * elf64-ppc.c (ppc64_elf_size_stubs): Test for localentry:0 plt
2994 calls before tocsave calls.
2995 (ppc64_elf_relocate_section): Allow localentry:0 plt calls without
2998 2017-06-21 Nick Clifton <nickc@redhat.com>
3001 * reloc.c (bfd_generic_get_relocated_section_contents): Fail if
3002 bfd_get_full_section_contents returns no contents.
3004 2017-06-21 Nick Clifton <nickc@redhat.com>
3007 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an undersized
3010 2017-06-21 Nick Clifton <nickc@redhat.com>
3013 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an empty section
3015 (image_set_ptr): Likewise.
3016 (alpha_vms_fix_sec_rel): Likewise.
3017 (alpha_vms_slurp_relocs): Likewise.
3019 2017-06-21 Nick Clifton <nickc@redhat.com>
3022 * ieee.c (ieee_slurp_sections): Check for a NULL return from
3024 (ieee_archive_p): Likewise.
3025 (ieee_object_p): Likewise.
3027 2017-06-21 Nick Clifton <nickc@redhat.com>
3030 * elf.c (setup_group): Zero the group section pointer list after
3031 allocation so that loops can be caught. Check for NULL pointers
3032 when processing a group list.
3034 2017-06-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
3036 * elf-s390.h: New file.
3037 * elf64-s390.c (struct elf_s390_link_hash_table): Add params
3039 (elf_s390_additional_program_headers): New function.
3040 (elf_s390_modify_segment_map): New function.
3041 (bfd_elf_s390_set_options): New function.
3042 (elf_backend_additional_program_headers)
3043 (elf_backend_modify_segment_map): Add macro definitions.
3045 2017-06-19 H.J. Lu <hongjiu.lu@intel.com>
3048 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Check
3049 the DYNAMIC bit instead of bfd_count_sections.
3051 2017-06-19 Nick Clifton <nickc@redhat.com>
3054 * vms-alpha.c (evax_bfd_print_emh): Check for insufficient record
3056 (evax_bfd_print_eeom): Likewise.
3057 (evax_bfd_print_egsd): Check for an overlarge record length.
3058 (evax_bfd_print_etir): Likewise.
3060 2017-06-19 Nick Clifton <nickc@redhat.com>
3063 * libieee.h (struct common_header_type): Add end_p field.
3064 * ieee.c (this_byte_and_next): Do not advance input_p beyond
3066 (read_id): Check for a length that exceeds the remaining bytes in
3068 (ieee_seek): Initialise end_p.
3069 (ieee_archive_p): Likewise.
3070 (ieee_object_p): Likewise.
3072 2017-06-19 Nick Clifton <nickc@redhat.com>
3075 * vms-alpha.c (_bfd_vms_slurp_eihs): Check for invalid offset
3076 before reading the EIHS structure entries.
3078 2017-06-19 Nick Clifton <nickc@redhat.com>
3081 * vms-alpha.c (_bfd_vms_slurp_egsd): Use unsigned int for
3082 gsd_size. Check that there are enough bytes remaining to read the
3083 type and size of the next egsd. Check that the size of the egsd
3084 does not exceed the size of the record.
3086 2017-06-19 Alan Modra <amodra@gmail.com>
3088 * config.bfd: Correct targ_underscore for cris.
3090 2017-06-18 Alan Modra <amodra@gmail.com>
3092 * config.bfd: Correct targ_underscore for epiphany, ip2k,
3093 m32c, mn10200, pru, rl78, rx, crisv32 and v850.
3095 2017-06-16 Nick Clifton <nickc@redhat.com>
3097 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Do not fail if the
3098 bucketlist is empty because there are no symbols to add to the
3101 2017-06-16 Alan Modra <amodra@gmail.com>
3107 * targets.c (struct bfd_target): Add _bfd_define_start_stop.
3108 (BFD_JUMP_TABLE_LINK): Likewise.
3109 * elf-bfd.h (bfd_elf_define_start_stop): Declare.
3110 * elflink.c (_bfd_elf_gc_mark_rsec): Update comment.
3111 (bfd_elf_define_start_stop): New function.
3112 * linker.c (bfd_generic_define_start_stop): New function.
3113 * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Init
3115 * aout-adobe.c (aout_32_bfd_define_start_stop): Define.
3116 * aout-target.h (MY_bfd_define_start_stop): Define.
3117 * aout-tic30.c (MY_bfd_define_start_stop): Define.
3118 * binary.c (binary_bfd_define_start_stop): Define.
3119 * bout.c (b_out_bfd_define_start_stop): Define.
3120 * coff-alpha.c (_bfd_ecoff_bfd_define_start_stop): Define.
3121 * coff-mips.c (_bfd_ecoff_bfd_define_start_stop): Define.
3122 * coff-rs6000.c (_bfd_xcoff_bfd_define_start_stop): Define.
3123 * coffcode.h (coff_bfd_define_start_stop): Define.
3124 * elfxx-target.h (bfd_elfNN_bfd_define_start_stop): Define.
3125 * i386msdos.c (msdos_bfd_define_start_stop): Define.
3126 * i386os9k.c (os9k_bfd_define_start_stop): Define.
3127 * ieee.c (ieee_bfd_define_start_stop): Define.
3128 * ihex.c (ihex_bfd_define_start_stop): Define.
3129 * libbfd-in.h (_bfd_nolink_bfd_define_start_stop): Define.
3130 * mach-o-target.c (bfd_mach_o_bfd_define_start_stop): Define.
3131 * mmo.c (mmo_bfd_define_start_stop): Define.
3132 * nlm-target.h (nlm_bfd_define_start_stop): Define.
3133 * oasys.c (oasys_bfd_define_start_stop): Define.
3134 * pef.c (bfd_pef_bfd_define_start_stop): Define.
3135 * plugin.c (bfd_plugin_bfd_define_start_stop): Define.
3136 * ppcboot.c (ppcboot_bfd_define_start_stop): Define.
3137 * som.c (som_bfd_define_start_stop): Define.
3138 * srec.c (srec_bfd_define_start_stop): Define.
3139 * tekhex.c (tekhex_bfd_define_start_stop): Define.
3140 * versados.c (versados_bfd_define_start_stop): Define.
3141 * vms-alpha.c (vms_bfd_define_start_stop): Define.
3142 (alpha_vms_bfd_define_start_stop): Define.
3143 * xsym.c (bfd_sym_bfd_define_start_stop): Define.
3144 * bfd-in2.h: Regenerate.
3145 * libbfd.h: Regenerate.
3147 2017-06-16 Jiong Wang <jiong.wang@arm.com>
3149 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use
3150 SYMBOL_REFERENCES_LOCAL.
3152 2017-06-15 Jiong Wang <jiong.wang@arm.com>
3155 * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
3156 (elfNN_aarch64_final_link_relocate): Also propagate relocations to
3157 runtime for if there needs copy relocation elimination.
3158 (need_copy_relocation_p): New function. Return true for symbol with
3159 pc-relative references and if it's against read-only sections.
3160 (elfNN_aarch64_adjust_dynamic_symbol): Use need_copy_relocation_p.
3161 (elfNN_aarch64_check_relocs): Allocate dynrelocs for relocation types
3162 that are related with accessing external objects.
3163 (elfNN_aarch64_gc_sweep_hook): Sync the relocation types with the change
3164 in elfNN_aarch64_check_relocs.
3166 2017-06-15 Nick Clifton <nickc@redhat.com>
3169 * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
3172 (ieee_archive_p): Likewise.
3174 2017-06-15 Nick Clifton <nickc@redhat.com>
3177 * vms-alpha.c (_bfd_vms_slurp_etir): Extend check of cmd_length.
3179 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
3181 * elf32-xtensa.c (elf_xtensa_be_plt_entry,
3182 elf_xtensa_le_plt_entry): Add dimension for the ABI to arrays,
3183 keep both windowed and call0 ABI PLT definitions.
3184 (elf_xtensa_create_plt_entry): Use selected ABI to choose upper
3185 elf_xtensa_*_plt_entry endex.
3186 (ELF_MAXPAGESIZE): Fix at minimal supported MMU page size.
3188 2017-06-14 Nick Clifton <nickc@redhat.com>
3191 * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid
3194 2017-06-14 Nick Clifton <nickc@redhat.com>
3197 * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the
3198 maximum value for the ascic pointer. Check that name processing
3199 does not read beyond this value.
3200 (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the
3203 2017-06-14 Nick Clifton <nickc@redhat.com>
3206 * versados.c (versados_mkobject): Zero the allocated tdata structure.
3207 (process_otr): Check for an invalid offset in the otr structure.
3209 2017-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
3211 * config.bfd (epiphany-*-elf): Accept epiphany-*-*.
3213 2017-06-13 H.J. Lu <hongjiu.lu@intel.com>
3219 * elf-bfd.h (elf_link_hash_entry): Add start_stop. Change the
3220 vtable field to a union.
3221 (_bfd_elf_is_start_stop): Removed.
3222 * elf32-i386.c (elf_i386_convert_load_reloc): Also check for
3223 __start_SECNAME and __stop_SECNAME symbols.
3224 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
3225 * elflink.c (_bfd_elf_is_start_stop): Removed.
3226 (_bfd_elf_gc_mark_rsec): Check start_stop instead of calling
3227 _bfd_elf_is_start_stop.
3228 (elf_gc_propagate_vtable_entries_used): Skip __start_SECNAME and
3229 __stop_SECNAME symbols. Updated.
3230 (elf_gc_smash_unused_vtentry_relocs): Likewise.
3231 (bfd_elf_gc_record_vtinherit): Likewise.
3232 (bfd_elf_gc_record_vtentry): Likewise.
3234 2017-06-13 Nick Clifton <nickc@redhat.com>
3237 * elflink.c (elf_link_adjust_relocs): Generate an error when
3238 encountering a reloc against a symbol removed by garbage
3241 2017-06-12 H.J. Lu <hongjiu.lu@intel.com>
3243 * elf-bfd.h (elf_backend_data): Add struct bfd_link_info *
3244 to merge_gnu_properties.
3245 * elf-properties.c (elf_merge_gnu_properties): Add struct
3246 bfd_link_info * and pass it to merge_gnu_properties.
3247 (elf_merge_gnu_property_list): Add struct bfd_link_info *
3248 and pass it to elf_merge_gnu_properties.
3249 (_bfd_elf_link_setup_gnu_properties): Pass info to
3250 elf_merge_gnu_property_list.
3251 * elf32-i386.c (elf_i386_merge_gnu_properties): Add struct
3253 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): Likewise.
3255 2017-06-11 Joe Zbiciak <joe.zbiciak@leftturnonly.info>
3258 * binary.c (binary_set_section_contents): Scale lma by octets
3259 per byte to set filepos.
3261 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3263 * elf32-arc.c (elf_arc_check_relocs): Fixed conditions to generate
3266 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3268 * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to
3271 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3273 * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to
3274 patched section contents for TLS IE reloc.
3275 * elf32-arc.c: Remove TCB_SIZE preprocessor macro.
3277 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3279 * elf32-arc.c (elf_arc_relocate_section): Added "call" to
3280 RELOC_FOR_GLOBAL_SYMBOL macro.
3282 2018-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3284 * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
3287 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3289 * config/tc-arc.c (md_undefined_symbol): Changed.
3290 * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed.
3292 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3294 * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
3297 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3299 * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
3300 warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
3302 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3304 * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
3307 2017-06-08 Richard Earnshaw <rearnsha@arm.com>
3309 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
3310 that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
3311 is non-zero. Add clarifying comments.
3313 2017-06-08 H.J. Lu <hongjiu.lu@intel.com>
3315 * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
3316 name. Use local IFUNC symbol name string to report unsupported
3317 non-PIC call to IFUNC function.
3318 (elf_i386_relocate_section): Dump local IFUNC name with minfo
3319 when generating R_386_IRELATIVE relocation.
3320 (elf_i386_finish_dynamic_symbol): Likewise.
3321 * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
3323 (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
3324 when generating R_X86_64_IRELATIVE relocation.
3325 (elf_x86_64_finish_dynamic_symbol): Likewise.
3327 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
3329 * elf.c (setup_group): Make sure BFD sections are created for all
3330 group sections in the input file when processing SHF_GROUP
3332 (bfd_section_from_shdr): Avoid duplicating logic already
3333 implemented in `setup_group'.
3335 2017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
3338 * peXXigen.c (pe_print_idata): Use the address of the first thunk
3339 if the hint address is zero.
3341 2017-06-06 James Clarke <jrtc27@jrtc27.com>
3344 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
3345 ELF_COMMON_DEF_P for common symbols.
3347 2017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
3349 * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
3350 SEC_GROUP sections as SEC_EXCLUDE.
3351 (bfd_elf_set_group_contents): Replace use of abort with an assert.
3352 (assign_section_numbers): Use resolve_section_groups flag instead
3353 of relocatable link type.
3354 (_bfd_elf_init_private_section_data): Use resolve_section_groups
3355 flag instead of checking the final_link flag for part of the
3356 checks in here. Fix white space as a result.
3357 * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
3358 instead of relocatable link type.
3359 (bfd_elf_final_link): Likewise.
3361 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
3363 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
3365 * elf32-score.c (score_elf_final_link_relocate): Likewise.
3366 (s3_bfd_score_elf_check_relocs): Likewise.
3367 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
3368 (score_elf_final_link_relocate): Likewise.
3369 (s7_bfd_score_elf_check_relocs): Likewise.
3371 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
3373 * elflink.c (init_reloc_cookie_rels): Remove unused variable
3376 2017-06-06 Maciej W. Rozycki <macro@imgtec.com>
3378 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
3379 from `reloc_count' rather than decrementing it.
3380 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
3381 `reloc_count' by `int_rels_per_ext_rel'.
3382 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
3383 `reloc_count' by `int_rels_per_ext_rel' for last relocation
3384 entry determination.
3385 (s3_bfd_score_elf_check_relocs): Likewise.
3386 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
3387 (s7_bfd_score_elf_relocate_section): Likewise.
3388 (s7_bfd_score_elf_check_relocs): Likewise.
3389 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
3390 prototype and function.
3391 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
3392 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
3393 triple rather than once the sum of REL and RELA relocation entry
3395 (bfd_elf64_get_reloc_upper_bound): Remove macro.
3396 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
3397 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
3398 storage allocation size determination.
3399 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
3400 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
3401 by `int_rels_per_ext_rel' for last relocation entry
3403 (bfd_elf_final_link): Do not multiply `reloc_count' by
3404 `int_rels_per_ext_rel' for internal relocation storage
3405 allocation size determination.
3406 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
3407 `int_rels_per_ext_rel' for last relocation entry determination.
3408 (elf_gc_smash_unused_vtentry_relocs): Likewise.
3409 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
3410 (_bfd_mips_elf_relocate_section): Likewise.
3412 2017-06-05 Alan Modra <amodra@gmail.com>
3415 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
3417 2017-06-01 John Baldwin <jhb@FreeBSD.org>
3419 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
3420 determine structure sizes.
3421 (elfcore_grok_freebsd_prstatus): Likewise.
3423 2017-06-01 Alan Modra <amodra@gmail.com>
3425 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
3426 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
3428 (is_elfv2_localentry0): New function.
3429 (ppc64_elf_tls_setup): Default params->plt_localentry0.
3430 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
3431 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
3432 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
3433 optimized localentry:0 stubs.
3434 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
3435 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
3437 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
3439 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
3441 2017-05-30 Casey Smith <clegg89@gmail.com>
3444 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
3445 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
3447 2017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
3449 * cpu-arc.c (arc_compatible): New function.
3451 2017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
3453 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
3455 2017-05-30 H.J. Lu <hongjiu.lu@intel.com>
3458 * bfdio.c (bfd_get_file_size): New function.
3459 * bfd-in2.h: Regenerated.
3461 2017-05-23 Dilian Palauzov <git-dpa@aegee.org>
3463 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
3466 2017-05-22 H.J. Lu <hongjiu.lu@intel.com>
3468 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
3469 dynobj instead of htab->elf.dynobj.
3471 2017-05-19 Maciej W. Rozycki <macro@imgtec.com>
3473 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
3475 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
3476 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
3477 actual number of internal relocations retrieved. Adjust
3478 function description.
3479 (bfd_elf64_canonicalize_reloc): Remove macro.
3480 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
3482 2017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
3484 * archures.c (bfd_mach_sparc_v9m8): Define.
3485 (bfd_mach_sparc_v8plusm8): Likewise.
3486 (bfd_mach_sparc_v9_p): Adjust to M8.
3487 (bfd_mach_sparc_64bit_p): Likewise.
3488 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
3489 bfd_mach_sparc_v8plusm8.
3490 * bfd-in2.h: Regenerated.
3491 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
3493 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
3494 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
3495 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
3497 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
3498 bfd_mach_sparc_v8plusm8.
3500 2017-05-19 Alan Modra <amodra@gmail.com>
3502 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
3503 debug and special sections when no non-note alloc sections in an
3506 2017-05-18 Alan Modra <amodra@gmail.com>
3508 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
3509 * elf-m10300.c: Likewise.
3511 * elf32-arc.c: Likewise.
3512 * elf32-bfin.c: Likewise.
3513 * elf32-m68k.c: Likewise.
3514 * elf32-nds32.c: Likewise.
3515 * elf32-tilepro.c: Likewise.
3516 * elflink.c: Likewise.
3517 * elfnn-aarch64.c: Likewise.
3518 * elfnn-riscv.c: Likewise.
3519 * elfxx-tilegx.c: Likewise.
3520 * mach-o.c: Likewise.
3521 * peXXigen.c: Likewise.
3522 * vms-alpha.c: Likewise.
3523 * vms-lib.c: Likewise.
3525 2017-05-17 H.J. Lu <hongjiu.lu@intel.com>
3528 * elflink.c (elf_gc_mark_debug_section): New function.
3529 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
3530 referenced by kept debug sections.
3532 2017-05-16 Alan Modra <amodra@gmail.com>
3534 * elf-m10300.c: Rename occurrences of non_ir_ref.
3535 * elf32-arm.c: Likewise.
3536 * elf32-bfin.c: Likewise.
3537 * elf32-cr16.c: Likewise.
3538 * elf32-cris.c: Likewise.
3539 * elf32-d10v.c: Likewise.
3540 * elf32-dlx.c: Likewise.
3541 * elf32-fr30.c: Likewise.
3542 * elf32-frv.c: Likewise.
3543 * elf32-hppa.c: Likewise.
3544 * elf32-i370.c: Likewise.
3545 * elf32-i386.c: Likewise.
3546 * elf32-iq2000.c: Likewise.
3547 * elf32-lm32.c: Likewise.
3548 * elf32-m32c.c: Likewise.
3549 * elf32-m32r.c: Likewise.
3550 * elf32-m68hc1x.c: Likewise.
3551 * elf32-m68k.c: Likewise.
3552 * elf32-mcore.c: Likewise.
3553 * elf32-metag.c: Likewise.
3554 * elf32-microblaze.c: Likewise.
3555 * elf32-moxie.c: Likewise.
3556 * elf32-msp430.c: Likewise.
3557 * elf32-mt.c: Likewise.
3558 * elf32-nios2.c: Likewise.
3559 * elf32-or1k.c: Likewise.
3560 * elf32-ppc.c: Likewise.
3561 * elf32-rl78.c: Likewise.
3562 * elf32-s390.c: Likewise.
3563 * elf32-score.c: Likewise.
3564 * elf32-score7.c: Likewise.
3565 * elf32-sh.c: Likewise.
3566 * elf32-tic6x.c: Likewise.
3567 * elf32-tilepro.c: Likewise.
3568 * elf32-v850.c: Likewise.
3569 * elf32-vax.c: Likewise.
3570 * elf32-xstormy16.c: Likewise.
3571 * elf32-xtensa.c: Likewise.
3572 * elf64-alpha.c: Likewise.
3573 * elf64-hppa.c: Likewise.
3574 * elf64-ia64-vms.c: Likewise.
3575 * elf64-mmix.c: Likewise.
3576 * elf64-ppc.c: Likewise.
3577 * elf64-s390.c: Likewise.
3578 * elf64-sh64.c: Likewise.
3579 * elf64-x86-64.c: Likewise.
3580 * elflink.c: Likewise.
3581 * elfnn-aarch64.c: Likewise.
3582 * elfnn-ia64.c: Likewise.
3583 * elfnn-riscv.c: Likewise.
3584 * elfxx-mips.c: Likewise.
3585 * elfxx-sparc.c: Likewise.
3586 * elfxx-tilegx.c: Likewise.
3587 * linker.c: Likewise.
3589 2017-05-16 Alan Modra <amodra@gmail.com>
3591 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
3592 * elflink.c (elf_link_add_object_symbols): Update to use
3594 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
3596 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
3598 2017-05-15 Maciej W. Rozycki <macro@imgtec.com>
3600 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
3602 2017-05-12 H.J. Lu <hongjiu.lu@intel.com>
3604 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
3605 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
3607 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
3609 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
3611 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
3613 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
3614 to plt_second/plt_second_eh_frame.
3615 (elf_x86_64_link_hash_newfunc): Updated.
3616 (elf_x86_64_allocate_dynrelocs): Likewise.
3617 (elf_x86_64_size_dynamic_sections): Likewise.
3618 (elf_x86_64_relocate_section): Likewise.
3619 (elf_x86_64_finish_dynamic_symbol): Likewise.
3620 (elf_x86_64_finish_dynamic_sections): Likewise.
3621 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
3622 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
3624 (elf_backend_setup_gnu_properties): Updated. Create the
3625 .plt.sec section instead of the .plt.sec section.
3627 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
3629 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
3630 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
3631 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
3633 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
3635 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
3636 (bfd_elf64_set_reloc): Define.
3637 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
3639 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
3641 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
3642 (struct bfd_target): New field _bfd_set_reloc.
3643 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
3644 * reloc.c (_bfd_generic_set_reloc): New function.
3645 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
3646 * nlm-target.h (nlm_set_reloc): Likewise.
3647 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
3648 * aout-tic30.c (MY_set_reloc): Likewise.
3649 * aout-target.h (MY_set_reloc): Likewise.
3650 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
3651 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
3652 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
3653 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
3654 * aout-adobe.c (aout_32_set_reloc): Likewise.
3655 * bout.c (b_out_set_reloc): Likewise.
3656 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
3657 * i386os9k.c (aout_32_set_reloc): Likewise.
3658 * ieee.c (ieee_set_reloc): Likewise.
3659 * oasys.c (oasys_set_reloc): Likewise.
3660 * som.c (som_set_reloc): Likewise.
3661 * versados.c (versados_set_reloc): Likewise.
3662 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
3663 _bfd_generic_set_reloc.
3664 (rs6000_xcoff64_aix_vec): LIkewise.
3665 * libbfd.c (_bfd_norelocs_set_reloc): New function.
3666 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
3667 * i386msdos.c (msdos_set_reloc): Define to
3668 _bfd_norelocs_set_reloc.
3669 * elfcode.h (elf_set_reloc): Define.
3670 * bfd-in2.h: Regenerated.
3672 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
3675 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
3676 for IFUNC function address.
3678 2017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
3680 * elf32-arc.c (FEATURE_LIST_NAME): Define.
3681 (CONFLICT_LIST): Likewise.
3682 (opcode/arc-attrs.h): Include.
3683 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
3684 (arc_extract_features): New file.
3685 (arc_stralloc): Likewise.
3686 (arc_elf_merge_attributes): Likewise.
3687 (arc_elf_merge_private_bfd_data): Use object attributes.
3688 (bfd_arc_get_mach_from_attributes): New function.
3689 (arc_elf_object_p): Use object attributes.
3690 (arc_elf_final_write_processing): Likewise.
3691 (elf32_arc_obj_attrs_arg_type): New function.
3692 (elf32_arc_obj_attrs_handle_unknown): Likewise.
3693 (elf32_arc_section_from_shdr): Likewise.
3694 (elf_backend_obj_attrs_vendor): Define.
3695 (elf_backend_obj_attrs_section): Likewise.
3696 (elf_backend_obj_attrs_arg_type): Likewise.
3697 (elf_backend_obj_attrs_section_type): Likewise.
3698 (elf_backend_obj_attrs_handle_unknown): Likewise.
3699 (elf_backend_section_from_shdr): Likewise.
3701 2017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
3704 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
3705 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
3706 and the destination is a Thumb symbol.
3708 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
3710 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
3711 initializer to silence GCC 4.2.
3712 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
3714 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
3716 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
3717 (LAZY_PLT_ENTRY_SIZE): This.
3718 (NON_LAZY_PLT_ENTRY_SIZE): New.
3719 (elf_x86_64_plt0_entry): Renamed to ...
3720 (elf_x86_64_lazy_plt0_entry): This.
3721 (elf_x86_64_plt_entry): Renamed to ...
3722 (elf_x86_64_lazy_plt_entry): This.
3723 (elf_x86_64_bnd_plt0_entry): Renamed to ...
3724 (elf_x86_64_lazy_bnd_plt0_entry): This.
3725 (elf_x86_64_legacy_plt_entry): Removed.
3726 (elf_x86_64_bnd_plt_entry): Renamed to ...
3727 (elf_x86_64_lazy_bnd_plt_entry): This.
3728 (elf_x86_64_legacy_plt2_entry): Renamed to ...
3729 (elf_x86_64_non_lazy_plt_entry): This.
3730 (elf_x86_64_bnd_plt2_entry): Renamed to ...
3731 (elf_x86_64_non_lazy_bnd_plt_entry): This.
3732 (elf_x86_64_eh_frame_plt): Renamed to ...
3733 (elf_x86_64_eh_frame_lazy_plt): This.
3734 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
3735 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
3736 (elf_x86_64_eh_frame_plt_got): Renamed to ...
3737 (elf_x86_64_eh_frame_non_lazy_plt): This.
3738 (elf_x86_64_lazy_plt_layout): New.
3739 (elf_x86_64_non_lazy_plt_layout): Likewise.
3740 (elf_x86_64_plt_layout): Likewise.
3741 (elf_x86_64_backend_data): Remove PLT layout information. Add
3742 os for target system.
3743 (GET_PLT_ENTRY_SIZE): Removed.
3744 (elf_x86_64_lazy_plt): New.
3745 (elf_x86_64_non_lazy_plt): Likewise.
3746 (elf_x86_64_lazy_bnd_plt): Likewise.
3747 (elf_x86_64_non_lazy_bnd_plt): Likewise.
3748 (elf_x86-64_arch_bed): Updated.
3749 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
3750 (elf_x86_64_create_dynamic_sections): Removed.
3751 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
3752 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
3753 (elf_x86-64_adjust_dynamic_symbol): Updated.
3754 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
3755 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
3756 size for PLT0 if there is no PLT0. Get plt_entry_size from
3757 non_lazy_plt for non-lazy PLT entries.
3758 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
3759 from non_lazy_plt for non-lazy PLT entries.
3760 (elf_x86-64_relocate_section): Updated. Properly get PLT index
3761 if there is no PLT0.
3762 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
3763 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
3764 entries with non-lazy PLT layout. Don't fill the second and third
3765 slots in the PLT entry if there is no PLT0.
3766 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
3767 if there is no PLT0. Set sh_entsize on the .plt.got section.
3768 (compare_relocs): New.
3769 (elf_x86_64_plt_type): Likewise.
3770 (elf_x86_64_plt): Likewise.
3771 (elf_x86_64_nacl_plt): New. Forward declaration.
3772 (elf_x86_64_get_plt_sym_val): Removed.
3773 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
3774 against all dynamic relocations.
3775 (elf_x86_64_link_setup_gnu_properties): New function.
3776 (elf_backend_create_dynamic_sections): Updated.
3777 (elf_backend_setup_gnu_properties): New.
3778 (elf_x86_64_nacl_plt): New.
3779 (elf_x86_64_nacl_arch_bed): Updated.
3781 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
3783 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
3784 (LAZY_PLT_ENTRY_SIZE): This.
3785 (NON_LAZY_PLT_ENTRY_SIZE): New.
3786 (elf_i386_plt0_entry): Renamed to ...
3787 (elf_i386_lazy_plt0_entry): This.
3788 (elf_i386_plt_entry): Renamed to ...
3789 (elf_i386_lazy_plt_entry): This.
3790 (elf_i386_pic_plt0_entry): Renamed to ...
3791 (elf_i386_pic_lazy_plt0_entry): This.
3792 (elf_i386_pic_plt_entry): Renamed to ...
3793 (elf_i386_pic_lazy_plt_entry): This.
3794 (elf_i386_got_plt_entry): Renamed to ...
3795 (elf_i386_non_lazy_plt_entry): This.
3796 (elf_i386_pic_got_plt_entry): Renamed to ...
3797 (elf_i386_pic_non_lazy_plt_entry): This.
3798 (elf_i386_eh_frame_plt): Renamed to ...
3799 (elf_i386_eh_frame_lazy_plt): This.
3800 (elf_i386_eh_frame_plt_got): Renamed to ...
3801 (elf_i386_eh_frame_non_lazy_plt): This.
3802 (elf_i386_plt_layout): Renamed to ...
3803 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
3804 eh_frame_plt_got_size.
3805 (elf_i386_non_lazy_plt_layout): New.
3806 (elf_i386_plt_layout): Likewise.
3807 (elf_i386_non_lazy_plt): Likewise.
3808 (GET_PLT_ENTRY_SIZE): Removed.
3809 (elf_i386_plt): Renamed to ...
3810 (elf_i386_lazy_plt): This.
3811 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
3812 (elf_i386_arch_bed): Updated.
3813 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
3814 (elf_i386_create_dynamic_sections): Removed.
3815 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
3816 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
3817 (elf_i386_adjust_dynamic_symbol): Updated.
3818 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
3819 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
3820 size for PLT0 if there is no PLT0.
3821 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
3822 output section is discarded only if GOT isn't empty.
3823 (elf_i386_relocate_section): Updated. Properly get PLT index
3824 if there is no PLT0.
3825 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
3826 second and third slots in the PLT entry if there is no PLT0.
3827 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
3828 if there is no PLT0. Set sh_entsize on the .plt.got section.
3829 (elf_i386_nacl_plt): Forward declaration.
3830 (elf_i386_get_plt_sym_val): Removed.
3831 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
3832 against all dynamic relocations.
3833 (elf_i386_link_setup_gnu_properties): New function.
3834 (elf_backend_create_dynamic_sections): Updated.
3835 (elf_backend_setup_gnu_properties): New.
3836 (elf_i386_nacl_plt): Updated.
3837 (elf_i386_nacl_arch_bed): Likewise.
3838 (elf_i386_vxworks_arch_bed): Likewise.
3840 2017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
3842 * elflink.c (elf_output_implib): Remove executable flag from import
3844 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
3845 library is a relocatable object file.
3847 2017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
3850 * elf32-avr.c (avr_should_move_sym): New function.
3851 (avr_should_reduce_sym_size): Likewise.
3852 (avr_should_increase_sym_size): Likewise.
3853 (elf32_avr_relax_delete_bytes): Adjust symbol values
3854 and sizes by calling new functions.
3856 2017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
3858 * config.bfd (riscv32-*): Enable rv64.
3860 2017-05-02 Alan Modra <amodra@gmail.com>
3863 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
3864 rather than h->root.type == bfd_link_hash_new.
3865 (bfd_elf_record_link_assignment): Similarly, call
3866 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
3868 2017-04-29 Alan Modra <amodra@gmail.com>
3871 * reloc.c (reloc_offset_in_range): New function.
3872 (bfd_perform_relocation, bfd_install_relocation): Use it.
3873 (_bfd_final_link_relocate): Likewise.
3875 2017-04-28 H.J. Lu <hongjiu.lu@intel.com>
3877 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
3878 before using .plt.got.
3879 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
3881 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3883 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
3884 instead of "+=" to update 0.
3886 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3888 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
3889 .plt.got section here.
3890 (elf_i386_check_relocs): Don't create the .plt.got section.
3891 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
3892 the .plt.got and .plt.bnd sections here.
3893 (elf_x86_64_check_relocs): Don't create the .plt.got nor
3896 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3898 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
3900 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
3901 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
3902 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
3903 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
3906 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3908 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
3910 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
3911 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
3912 the first relocatable ELF input with GNU properties.
3914 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3916 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
3917 VxWorks for non-PIC.
3919 2017-04-27 Alan Modra <amodra@gmail.com>
3921 * elf-bfd.h (struct elf_backend_data): Make asection param of
3922 elf_backend_eh_frame_address_size const.
3923 (_bfd_elf_eh_frame_address_size): Likewise.
3924 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
3925 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
3926 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
3927 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
3928 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
3929 (next_cie_fde_offset): Constify params.
3930 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
3932 2017-04-27 Alan Modra <amodra@gmail.com>
3934 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
3935 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
3936 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
3938 (offset_adjust): New function.
3939 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
3940 (adjust_eh_frame_local_symbols): Likewise.
3941 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
3942 after changing anything. Return true if anything changed.
3943 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
3944 _bfd_elf_adjust_eh_frame_global_symbol for globals.
3946 2017-04-27 Alan Modra <amodra@gmail.com>
3948 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
3951 2017-04-27 Alan Modra <amodra@gmail.com>
3953 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
3954 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
3955 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
3956 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
3957 for undef and undefweak dyn_relocs.
3958 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
3959 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
3960 (allocate_got, allocate_dynrelocs): Likewise.
3961 (ppc64_elf_relocate_section): Likewise.
3963 2017-04-26 H.J. Lu <hongjiu.lu@intel.com>
3965 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
3966 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
3967 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
3968 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
3970 2017-04-26 Nick Clifton <nickc@redhat.com>
3973 * reloc.c (bfd_perform_relocation): Check for a negative address
3976 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
3979 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
3981 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
3982 (elf_backend_always_renumber_dynsyms): Define.
3983 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
3984 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
3985 * elflink.c (bfd_elf_size_dynamic_sections): Also call
3986 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
3988 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
3990 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
3992 * elflink.c (bfd_elf_size_dynamic_sections): Only call
3993 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
3994 sections have been created.
3996 2017-04-26 Nick Clifton <nickc@redhat.com>
3999 * compress.c (bfd_init_section_compress_status): Check the return
4000 value from bfd_malloc.
4002 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
4004 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
4005 no_finish_dynamic_symbol.
4006 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
4008 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
4009 weak symbol, don't make it dynamic.
4010 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
4011 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
4012 relocation for GOT reference.
4013 (elf_x86_64_finish_dynamic_symbol): Abort if
4014 no_finish_dynamic_symbol isn't 0.
4016 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
4019 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
4020 undefined weak symbol, don't make it dynamic.
4021 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
4022 set no_finish_dynamic_symbol and generate R_386_RELATIVE
4023 relocation for R_386_GOT32.
4025 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
4028 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
4030 2017-04-23 Alan Modra <amodra@gmail.com>
4033 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
4034 * elf.c (lcomm_sym): New.
4035 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
4036 * bfd-in2.h: Regenerate.
4038 2017-04-23 Alan Modra <amodra@gmail.com>
4041 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
4042 parameters and comment.
4043 (_bfd_elf_get_reloc_section): Delete.
4044 (_bfd_elf_plt_get_reloc_section): Declare.
4045 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
4046 New functions. Don't blindly skip over assumed .rel/.rela prefix.
4048 (_bfd_elf_get_reloc_section): ..here. Delete.
4049 (assign_section_numbers): Call elf_get_reloc_section.
4050 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
4051 * elfxx-target.h (elf_backend_get_reloc_section): Update.
4053 2017-04-23 Alan Modra <amodra@gmail.com>
4056 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
4059 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
4062 * elf32-i386.c (elf_i386_link_hash_entry): Add
4063 no_finish_dynamic_symbol.
4064 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
4065 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
4066 symbol, don't make it dynamic in PIE.
4067 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
4068 set no_finish_dynamic_symbol and generate R_386_RELATIVE
4069 relocation for R_386_GOT32
4070 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
4073 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
4077 * elflink.c (elf_link_add_object_symbols): Require
4078 --no-dynamic-linker with -E/--dynamic-list when creating
4081 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
4083 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
4086 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
4088 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
4089 dynamic symbol sorting.
4091 2017-04-20 H.J. Lu <hongjiu.lu@intel.com>
4094 * elflink.c (elf_link_add_object_symbols): Preserve
4095 dynamic_ref_after_ir_def when restoring the symbol table for
4096 unneeded dynamic object.
4098 2017-04-19 H.J. Lu <hongjiu.lu@intel.com>
4101 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
4102 on on undefined IFUNC symbol in the second PLT.
4104 2017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
4106 * peXXigen.c (pe_print_reloc): Correct chunk_end.
4108 2017-04-19 Alan Modra <amodra@gmail.com>
4110 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
4111 or make dynamic for info->dynamic_undefined_weak 0 and 1.
4112 * elf32-ppc.c:Formatting.
4113 (ensure_undefweak_dynamic): Don't make dynamic when
4114 info->dynamic_undefined_weak is zero.
4115 (allocate_dynrelocs): Discard undefweak dyn_relocs for
4116 info->dynamic_undefined_weak. Discard undef dyn_relocs when
4117 not default visibility. Discard undef and undefweak
4119 (ppc_elf_relocate_section): Adjust to suit.
4120 * elf64-ppc.c: Formatting.
4121 (ensure_undefweak_dynamic): Don't make dynamic when
4122 info->dynamic_undefined_weak is zero.
4123 (allocate_dynrelocs): Discard undefweak dyn_relocs for
4124 info->dynamic_undefined_weak. Discard them earlier.
4126 2017-04-17 H.J. Lu <hongjiu.lu@intel.com>
4129 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
4130 before generating the version definition section.
4132 2017-04-17 Alan Modra <amodra@gmail.com>
4134 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
4135 state when a regular object file defines a symbol with
4136 incompatible type to that defined by an earlier shared lib.
4138 2017-04-13 Alan Modra <amodra@gmail.com>
4140 * coffcode.h: Wrap some overly long _bfd_error_handler args.
4142 * elf32-arm.c: Likewise.
4143 * elf32-i386.c: Likewise.
4144 * elf32-mep.c: Likewise.
4145 * elf64-ia64-vms.c: Likewise.
4146 * elf64-x86-64.c: Likewise.
4147 * elflink.c: Likewise.
4148 * elfnn-ia64.c: Likewise.
4149 * elfxx-mips.c: Likewise.
4151 2017-04-13 Alan Modra <amodra@gmail.com>
4153 * aoutx.h: Use %B and %A in error messages throughout file.
4154 * aout-cris.c: Likewise.
4155 * archive.c: Likewise.
4156 * binary.c: Likewise.
4157 * coff-rs6000.c: Likewise.
4158 * coff-tic4x.c: Likewise.
4159 * coffcode.h: Likewise.
4160 * coffgen.c: Likewise.
4161 * cofflink.c: Likewise.
4162 * coffswap.h: Likewise.
4163 * cpu-arm.c: Likewise.
4164 * elf-eh-frame.c: Likewise.
4165 * elf-m10300.c: Likewise.
4167 * elf32-arc.c: Likewise.
4168 * elf32-arm.c: Likewise.
4169 * elf32-bfin.c: Likewise.
4170 * elf32-frv.c: Likewise.
4171 * elf32-iq2000.c: Likewise.
4172 * elf32-m32c.c: Likewise.
4173 * elf32-microblaze.c: Likewise.
4174 * elf32-nds32.c: Likewise.
4175 * elf32-rl78.c: Likewise.
4176 * elf32-rx.c: Likewise.
4177 * elf32-score.c: Likewise.
4178 * elf32-score7.c: Likewise.
4179 * elf32-sh64.c: Likewise.
4180 * elf32-v850.c: Likewise.
4181 * elf32-vax.c: Likewise.
4182 * elf32-visium.c: Likewise.
4183 * elf64-ia64-vms.c: Likewise.
4184 * elf64-mmix.c: Likewise.
4185 * elf64-sh64.c: Likewise.
4186 * elfcode.h: Likewise.
4187 * elfnn-aarch64.c: Likewise.
4188 * elfnn-ia64.c: Likewise.
4189 * elfxx-mips.c: Likewise.
4190 * hpux-core.c: Likewise.
4193 * linker.c: Likewise.
4194 * merge.c: Likewise.
4196 * oasys.c: Likewise.
4197 * pdp11.c: Likewise.
4198 * peXXigen.c: Likewise.
4199 * rs6000-core.c: Likewise.
4200 * vms-alpha.c: Likewise.
4201 * xcofflink.c: Likewise.
4203 2017-04-13 Alan Modra <amodra@gmail.com>
4205 * bfd.c (PRINT_TYPE): Define.
4206 (_doprnt): New function.
4207 (error_handler_internal): Use _doprnt.
4208 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
4209 calls in their natural order, throughout file.
4210 * coff-mcore.c: Likewise.
4211 * coff-ppc.c: Likewise.
4212 * coff-tic80.c: Likewise.
4213 * cofflink.c: Likewise.
4214 * elf-s390-common.c: Likewise.
4216 * elf32-arm.c: Likewise.
4217 * elf32-i386.c: Likewise.
4218 * elf32-m32r.c: Likewise.
4219 * elf32-msp430.c: Likewise.
4220 * elf32-spu.c: Likewise.
4221 * elf64-ia64-vms.c: Likewise.
4222 * elf64-sparc.c: Likewise.
4223 * elf64-x86-64.c: Likewise.
4224 * elflink.c: Likewise.
4225 * elfnn-aarch64.c: Likewise.
4226 * elfnn-ia64.c: Likewise.
4227 * elfxx-mips.c: Likewise.
4229 2017-04-13 Alan Modra <amodra@gmail.com>
4231 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
4232 branch veneers" error. Fix double space and format message.
4233 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
4234 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
4236 2017-04-13 Alan Modra <amodra@gmail.com>
4238 * bfd-in2.h: Regenerate.
4240 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
4242 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
4243 extra `\n' in warning/error messages.
4244 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
4245 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
4247 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
4249 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
4250 processor-specific properties with generic ELF target vector.
4252 2017-04-10 Qing Zhao <qing.zhao@oracle.com>
4254 * elf32-sparc.c (elf_backend_fixup_symbol): New.
4255 * elf64-sparc.c (elf_backend_fixup_symbol): New.
4256 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
4257 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
4259 (link_hash_newfunc): Initialize has_got_reloc and
4261 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
4263 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
4265 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
4267 (_bfd_sparc_elf_fixup_symbol): New function.
4268 (allocate_dynrelocs): Don't allocate space for dynamic
4269 relocations and discard relocations against resolved undefined
4270 weak symbols in executable. Don't make resolved undefined weak
4271 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
4272 relocation against undefined weak symbols in PIE.
4273 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
4274 relocations against resolved undefined weak symbols in PIE
4275 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
4276 without ynamic PLT/GOT relocations for resolved undefined weak
4278 Don't generate dynamic relocation against resolved undefined
4279 weak symbol in executable.
4280 (pie_finish_undefweak_symbol): New function.
4281 (_bfd_sparc_elf_finish_dynamic_sections): Call
4282 pie_finish_undefweak_symbol on all symbols in PIE.
4283 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
4284 (_bfd_sparc_elf_fixup_symbol): New function.
4286 2017-04-10 Nick Clifton <nickc@redhat.com>
4288 * config.bfd: Remove ns32k from obsolete list.
4290 2017-04-10 Alan Modra <amodra@gmail.com>
4293 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
4294 (special_sections_i): Likewise for .init_array.
4295 (special_sections_p): Likewise for .preinit_array.
4297 2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
4301 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
4302 ELF_COMMON_DEF_P for common symbols.
4303 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
4304 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
4305 * elflink.c (_bfd_elf_merge_symbol): Revert commits
4306 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
4307 07492f668d2173da7a2bda3707ff0985e0f460b6.
4309 2017-04-07 Pedro Alves <palves@redhat.com>
4311 * opncls.c (bfd_get_debug_link_info): Rename to...
4312 (bfd_get_debug_link_info_1): ... this. Change type of second
4313 parameter to void pointer. Adjust.
4314 (bfd_get_debug_link_info): Reimplement on top of
4315 bfd_get_debug_link_info_1.
4316 (separate_debug_file_exists, separate_alt_debug_file_exists):
4317 Change type of second parameter to void pointer. Adjust.
4318 (get_func_type, check_func_type): Change type of second parameter
4320 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
4321 the callback functions instead of passing the address of a local.
4322 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
4323 find_separate_debug_file.
4324 (get_alt_debug_link_info_shim): Change type of second parameter to
4325 void pointer. Adjust.
4326 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
4327 find_separate_debug_file.
4328 (get_build_id_name, bfd_boolean check_build_id_file): Change type
4329 of second parameter to void pointer. Adjust.
4330 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
4331 pointer local to find_separate_debug_file.
4333 2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
4335 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
4336 external symbols with a definition.
4337 (_bfd_coff_gc_mark_extra_sections): Fix typo.
4339 2017-04-07 Alan Modra <amodra@gmail.com>
4341 * po/SRC-POTFILES.in: Regenerate.
4343 2017-04-05 Alan Modra <amodra@gmail.com>
4345 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
4348 2017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
4350 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
4351 numbers for DataDirectory entry indicies passed to
4354 2017-04-04 H.J. Lu <hongjiu.lu@intel.com>
4356 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
4357 each GNU_MBIND section and align GNU_MBIND section to page size.
4358 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
4359 segment for each GNU_MBIND section.
4360 (_bfd_elf_init_private_section_data): Copy sh_info from input
4361 for GNU_MBIND section.
4363 2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
4365 * elfnn-riscv.c (GP_NAME): Delete.
4366 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
4367 (_bfd_riscv_relax_lui): Likewise.
4369 2017-04-04 Nick Clifton <nickc@redhat.com>
4372 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
4374 (bfd_elf_final_link): Only initialize the extended symbol index
4375 section if there are extended symbol tables to list.
4377 2017-04-03 H.J. Lu <hongjiu.lu@intel.com>
4379 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
4380 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
4381 * configure.ac (elf): Add elf-properties.lo.
4382 * Makefile.in: Regenerated.
4383 * configure: Likewise.
4384 * elf-bfd.h (elf_property_kind): New.
4385 (elf_property): Likewise.
4386 (elf_property_list): Likewise.
4387 (elf_properties): Likewise.
4388 (_bfd_elf_parse_gnu_properties): Likewise.
4389 (_bfd_elf_get_property): Likewise.
4390 (_bfd_elf_link_setup_gnu_properties): Likewise.
4391 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
4392 and setup_gnu_properties.
4393 (elf_obj_tdata): Add properties.
4394 * elf-properties.c: New file.
4395 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
4396 (elf_i386_merge_gnu_properties): Likewise.
4397 (elf_backend_parse_gnu_properties): Likewise.
4398 (elf_backend_merge_gnu_properties): Likewise.
4399 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
4400 (elf_x86_64_merge_gnu_properties): Likewise.
4401 (elf_backend_parse_gnu_properties): Likewise.
4402 (elf_backend_merge_gnu_properties): Likewise.
4403 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
4404 (elf_backend_parse_gnu_properties): Likewise.
4405 (elf_backend_setup_gnu_properties): Likewise.
4406 (elfNN_bed): Add elf_backend_parse_gnu_properties,
4407 elf_backend_merge_gnu_properties and
4408 elf_backend_setup_gnu_properties.
4410 2017-03-30 Pip Cet <pipcet@gmail.com>
4412 * elf32-wasm32.c: Add relocation code, two relocs.
4413 * reloc.c: Add wasm32 relocations.
4414 * libbfd.h: Regenerate.
4415 * bfd-in2.h: Regenerate.
4416 * bfd/po/bfd.pot: Regenerate.
4418 2017-03-29 Nick Clifton <nickc@redhat.com>
4421 * coff-bfd.h (struct coff_section_data): Add new fields:
4422 saved_bias and bias.
4423 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
4424 computed for PE binaries.
4425 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
4428 2017-03-28 Hans-Peter Nilsson <hp@axis.com>
4431 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
4432 to handle a local symbol with a hash-symbol-entry; without PLT.
4433 Add BFD_ASSERT for an incidental case with GOT entry present.
4434 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
4435 isn't forced-or-set local.
4437 2017-03-27 Pip Cet <pipcet@gmail.com>
4439 * wasm-module.c: New file to support WebAssembly modules.
4440 * wasm-module.h: New file to support WebAssembly modules.
4441 * doc/webassembly.texi: Start documenting wasm-module.c.
4442 * config.bfd: Add wasm_vec.
4443 * targets.c: Likewise.
4444 * configure.ac: Likewise.
4445 * Makefile.am: Add entries for wasm-module.c.
4446 * Makefile.in: Regenerate.
4447 * configure: Regenerate.
4448 * po/SRC-POTFILES.in: Regenerate.
4450 2017-03-27 Pip Cet <pipcet@gmail.com>
4452 * cpu-wasm32.c: New file to support wasm32 architecture.
4453 * elf32-wasm32.c: New file to support wasm32 architecture.
4454 * Makefile.am: Add wasm32 architecture.
4455 * archures.c: Likewise.
4456 * config.bfd: Likewise.
4457 * configure.ac: Likewise.
4458 * targets.c: Likewise.
4459 * Makefile.in: Regenerate.
4460 * bfd-in2.h: Regenerate.
4461 * configure: Regenerate.
4462 * po/SRC-POTFILES.in: Regenerate.
4464 2017-03-20 Alan Modra <amodra@gmail.com>
4467 * elf64-ppc.c (compare_symbols): Stabilize sort.
4469 2017-03-18 Alan Modra <amodra@gmail.com>
4471 * elf64-ppc.c (struct ppc_link_hash_table): Add
4472 local_ifunc_resolver and maybe_local_ifunc_resolver.
4473 (ppc_build_one_stub): Set flags on emitting dynamic
4474 relocation to ifunc.
4475 (ppc64_elf_relocate_section): Likewise.
4476 (ppc64_elf_finish_dynamic_symbol): Likewise.
4477 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
4478 local dynamic relocs to ifuncs.
4479 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
4480 local_ifunc_resolver and maybe_local_ifunc_resolver.
4481 (ppc_elf_relocate_section): Set flag on emitting dynamic
4482 relocation to ifuncs.
4483 (ppc_elf_finish_dynamic_symbol): Likewise.
4484 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
4485 dynamic relocs to ifuncs.
4487 2017-03-13 Nick Clifton <nickc@redhat.com>
4490 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
4491 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
4492 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
4493 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
4494 * bfd-in2.h: Regenerate.
4495 * libbfd.h: Regenerate.
4496 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
4498 (IS_AARCH64_TLSDESC_RELOC): Likewise.
4499 (elfNN_aarch64_howto_table): Likewise.
4500 (aarch64_tls_transition_without_check): Likewise.
4501 (aarch64_reloc_got_type): Likewise.
4502 (elfNN_aarch64_final_link_relocate): Likewise.
4503 (elfNN_aarch64_tls_relax): Likewise.
4504 (elfNN_aarch64_relocate_section): Likewise.
4505 (elfNN_aarch64_gc_sweep_hook): Likewise.
4506 (elfNN_aarch64_check_relocs): Likewise.
4507 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
4508 (_bfd_aarch64_elf_resolve_relocation): Likewise.
4510 2017-03-11 Alan Modra <amodra@gmail.com>
4512 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
4513 parameter is in fact used. Whitespace fixes.
4514 * elf64-ppc.c: Likewise.
4516 2017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
4518 * rs6000-core.c (CORE_NEW): Simplify macro when
4519 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
4521 2017-03-07 Alan Modra <amodra@gmail.com>
4525 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
4528 2017-03-05 Alan Modra <amodra@gmail.com>
4530 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
4531 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
4532 (next_cie_fde_offset): New function.
4533 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
4534 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
4535 four bytes. Align CIEs to four or eight bytes depending on
4536 per_encoding_aligned8. Align FDEs according to their encoding.
4537 Pad last FDE to output section alignment.
4538 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
4540 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
4541 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
4542 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
4544 2017-03-02 Martin Bickel <binutils@ineranves.de>
4547 * elf.c (rewrite_elf_program_header): Do not issue a warning for
4548 empty segments which have a zero filesz, but a non-zero memsz.
4550 2017-03-02 Alan Modra <amodra@gmail.com>
4552 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
4554 2017-02-28 Alan Modra <amodra@gmail.com>
4556 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
4557 (ppc64_elf_relocate_section): Likewise.
4559 2017-02-28 Alan Modra <amodra@gmail.com>
4562 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
4563 rather than elf32_nios2_hash_table or elf_hash_table.
4564 (create_got_section): Likewise.
4565 (nios2_elf32_finish_dynamic_symbol): Likewise.
4566 (nios2_elf32_adjust_dynamic_symbol): Likewise.
4567 (nios2_elf32_size_dynamic_sections): Likewise.
4568 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
4569 vars. Use htab equivalents directly instead. Don't create
4570 all dynamic sections on needing just the GOT. Use a goto
4571 rather than a fall-through with reloc test. Ensure
4572 htab->dynobj is set when making dynamic sreloc section.
4573 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
4574 equivalent directly instead. Don't segfault on looking for
4575 .dynamic when dynamic sections have not been created. Don't
4576 segfault on .got.plt being discarded.
4577 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
4578 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
4579 fixme and another not so relevant comment.
4580 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
4581 already set, set hash table dynobj on creating .sbss.
4583 2017-02-28 Alan Modra <amodra@gmail.com>
4585 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
4586 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
4587 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
4588 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
4589 (ppc64_elf_relocate_section): Likewise.
4590 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
4591 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
4592 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
4593 * libbfd.h: Regenerate.
4594 * bfd-in2.h: Regenerate.
4596 2017-02-28 Alan Modra <amodra@gmail.com>
4598 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
4599 dynamic .data.rel.ro read-only.
4600 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
4601 rather than section flags when deciding where copy reloc goes.
4602 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
4603 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
4604 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
4605 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
4606 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
4607 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
4608 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
4609 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
4610 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
4611 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
4612 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
4613 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
4614 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
4615 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
4616 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
4617 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
4618 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
4619 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
4620 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
4622 2017-02-28 Maciej W. Rozycki <macro@imgtec.com>
4624 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
4625 `jalr $0, $25' instruction encoding.
4627 2017-02-27 Nick Clifton <nickc@redhat.com>
4630 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
4631 generating a seg-fault when encountering a symbol that has been
4632 deleted by garbage collection.
4634 2017-02-25 Alan Modra <amodra@gmail.com>
4636 * elf32-arc.c (struct dynamic_sections): Delete.
4637 (enum dyn_section_types): Delete.
4638 (dyn_section_names): Delete.
4639 (arc_create_dynamic_sections): Delete.
4640 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
4641 segfault on discarded .rela.plt section.
4642 (elf_arc_size_dynamic_sections): Formatting. Don't call
4643 arc_create_dynamic_sections. Don't allocate memory for sections
4644 handled by the generic linker. Correct code finding relocs in
4645 read-only sections. Set SEC_EXCLUDE on zero size .got,
4646 .got.plt, and .dynbss sections. Do set .interp for pies.
4648 2017-02-24 Andrew Waterman <andrew@sifive.com>
4650 * elfnn-riscv.c (GP_NAME): New macro.
4651 (riscv_global_pointer_value): Use it.
4652 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
4653 output section, consider only that section's alignment.
4655 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
4657 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
4658 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
4659 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
4660 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
4662 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
4664 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
4665 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
4668 2017-02-23 Alan Modra <amodra@gmail.com>
4671 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
4673 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
4674 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
4677 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
4680 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
4681 processing ahead of the call to `elf_gc_sweep_symbol'.
4683 2017-02-22 Nick Clifton <nickc@redhat.com>
4686 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
4687 created section 4-byte alignment.
4689 2017-02-22 Alan Modra <amodra@gmail.com>
4691 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
4692 on .got or .plt output section being discarded by script.
4693 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
4696 2017-02-21 Alan Modra <amodra@gmail.com>
4698 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
4699 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
4701 2017-02-20 Alan Modra <amodra@gmail.com>
4704 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
4705 if DT_RELSZ/DT_RELASZ is zero.
4707 2017-02-17 Nick Clifton <nickc@redhat.com>
4709 * compress.c (bfd_get_full_section_contents): Remember to reduce
4710 compressed size by the sizeof the compression header when
4711 decompressing the contents.
4713 2017-02-17 Pedro Alves <palves@redhat.com>
4715 * srec.c (Chunk): Rename to ...
4716 (_bfd_srec_len): ... this.
4717 (S3Forced): Rename to ...
4718 (_bfd_srec_forceS3): ... this.
4719 * objcopy.c: Adjust all references.
4721 2017-02-17 Pedro Alves <palves@redhat.com>
4723 * archive.c (bsd_write_armap): Rename to ...
4724 (_bfd_bsd_write_armap): ... this.
4725 (coff_write_armap): Rename to ...
4726 (_bfd_coff_write_armap): ... this.
4727 * libbfd-in.h (bsd_write_armap): Rename to ...
4728 (_bfd_bsd_write_armap): ... this.
4729 (coff_write_armap): Rename to ...
4730 (_bfd_coff_write_armap): ... this.
4731 * aout-target.h, aout-tic30.c: Adjust all users.
4732 * libbfd.h: Regenerate.
4734 2017-02-17 Pedro Alves <palves@redhat.com>
4736 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
4737 (warn_deprecated): Rename to ...
4738 (_bfd_warn_deprecated): ... this.
4739 * libbfd.c (warn_deprecated): Rename to ...
4740 (_bfd_warn_deprecated): ... this.
4741 * bfd-in2.h: Regenerate.
4743 2017-02-17 Pedro Alves <palves@redhat.com>
4745 * bfdio.c (real_ftell): Rename to ...
4746 (_bfd_real_ftell): ... this.
4747 (real_fseek): Rename to ...
4748 (_bfd_real_fseek): ... this.
4749 (real_fopen): Rename to ...
4750 (_bfd_real_fopen): ... this.
4751 * libbfd-in.h (real_ftell): Rename to ...
4752 (_bfd_real_ftell): ... this.
4753 (real_fseek): Rename to ...
4754 (_bfd_real_fseek): ... this.
4755 (real_fopen): Rename to ...
4756 (_bfd_real_fopen): ... this.
4757 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
4758 * libbfd.h: Regenerate.
4760 2017-02-17 Pedro Alves <palves@redhat.com>
4762 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
4763 * libbfd.c (read_unsigned_leb128): Rename to ...
4764 (_bfd_read_unsigned_leb128): ... this.
4765 (read_signed_leb128): Rename to ...
4766 (_bfd_read_signed_leb128): ... this.
4767 (safe_read_leb128): Rename to ...
4768 (_bfd_safe_read_leb128): ... this.
4769 * libbfd-in.h (read_unsigned_leb128): Rename to ...
4770 (_bfd_read_unsigned_leb128): ... this.
4771 (read_signed_leb128): Rename to ...
4772 (_bfd_read_signed_leb128): ... this.
4773 (safe_read_leb128): Rename to ...
4774 (_bfd_safe_read_leb128): ... this.
4775 * libbfd.h: Renegerate.
4777 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
4779 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
4780 before trying to fine matching file and line information.
4782 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
4784 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
4785 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
4786 not match current bfd, then reload debug information. Record bfd
4787 we're loading debug info for in the stash. If we have debug
4788 informatin in the cache then perform section placement before
4791 2017-02-16 Alan Modra <amodra@gmail.com>
4794 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
4795 * elfxx-target.h (elf_backend_no_page_alias): Define.
4796 (elfNN_bed): Init new field.
4797 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
4798 ensure PT_LOAD segment starts on a new page.
4799 * elf32-hppa.c (elf_backend_no_page_alias): Define.
4801 2017-02-16 Alan Modra <amodra@gmail.com>
4804 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
4807 2017-02-16 Jiong Wang <jiong.wang@arm.com>
4809 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
4810 * bfd-in2.h: Regenerated.
4812 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
4815 * elf32-i386.c (elf_i386_relocate_section): Allow
4816 "lea foo@GOT, %reg" in PIC.
4818 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
4821 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
4822 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
4823 error against local IFUNC symbol without a base register for
4826 2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
4828 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
4829 `%P: %H:' with `info->callbacks->einfo'.
4830 (ppc_elf_relocate_section): Likewise.
4831 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
4832 (ppc64_elf_edit_toc): Likewise.
4833 (ppc64_elf_relocate_section): Likewise.
4835 2017-02-14 Alan Modra <amodra@gmail.com>
4837 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
4838 --gc-keep-exported, and test versioned field of sym rather than
4839 looking for @ in name.
4841 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
4843 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
4846 2017-02-13 Nick Clifton <nickc@redhat.com>
4849 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
4852 2017-02-07 Andrew Waterman <andrew@sifive.com>
4854 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
4855 entry size if PLT header is written.
4857 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
4859 Fix sparc64 dynamic relocation processing to use the dynamic
4861 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
4862 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
4865 2017-02-03 Nick Clifton <nickc@redhat.com>
4868 * coffcode.h (coff_write_object_contents): Enlarge size of
4869 s_name_buf in order to avoid compile time warning about possible
4871 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
4872 32-bits of insn value before printing into buffer.
4874 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4876 * elfxx-mips.c (mips_elf_hash_sort_data): Add
4877 `max_local_dynindx'.
4878 (mips_elf_sort_hash_table): Handle it.
4879 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
4880 symbols bump up `max_local_dynindx' rather than
4881 `max_non_got_dynindx'.
4883 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4885 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
4886 `min_got_dynindx', `max_unref_got_dynindx' and
4887 `max_non_got_dynindx' members to the `bfd_size_type' data type.
4888 (mips_elf_sort_hash_table): Adjust accordingly.
4890 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4892 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
4893 to access the hash table.
4895 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4897 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
4898 non-NULL `htab' to the beginning.
4900 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4902 * elflink.c (elf_gc_sweep): Wrap overlong line.
4904 2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
4906 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
4907 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
4908 * elfxx-mips.c (mips_elf_link_hash_table): Add
4909 `ignore_branch_isa' member.
4910 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
4911 in branch relocation calculation as an error if
4912 `ignore_branch_isa' has been set.
4913 (_bfd_mips_elf_insn32): Rename to...
4914 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
4915 parameter to `insn32' and add an `ignore_branch_isa' parameter.
4916 Handle the new parameter.
4918 2017-01-27 Hans-Peter Nilsson <hp@axis.com>
4920 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
4921 local variable dynobj.
4924 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
4925 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
4926 executable from read-only sections into sdynrelro.
4927 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
4928 dynamic relocs in sdynrelro.
4929 (elf_backend_want_dynrelro): Define.
4931 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4933 * config.bfd (*-*-rtemsaout*): Mark as removed.
4935 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4937 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
4938 (arm-*-rtems*): Move to (arm*-*-eabi*).
4939 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
4940 (m68-*-rtems*): Move to (m68*-*-elf*).
4942 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4944 * config.bfd (*-*-rtemscoff*): Mark as removed.
4946 2017-01-24 Maciej W. Rozycki <macro@imgtec.com>
4949 * elflink.c (bfd_elf_record_link_assignment): Revert last
4950 change and don't ever clear `forced_local'. Set `mark'
4952 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
4954 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
4955 (bfd_elf_size_dynamic_sections): ... here.
4956 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
4957 and set `mark' instead in `__tls_get_addr_opt' processing.
4958 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
4960 2017-01-24 Alan Modra <amodra@gmail.com>
4962 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
4963 where dynamic relocs are preferable. Allow ifunc too.
4964 (ensure_undefweak_dynamic): New function.
4965 (allocate_dynrelocs): Use it here. Move plt handling last and
4966 don't make symbols dynamic, simplifying loop. Only make undef
4967 weak symbols with GOT entries dynamic. Correct condition
4968 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
4969 comments. Remove goto.
4970 (ppc_elf_relocate_section): Correct test for using dynamic
4971 symbol on GOT relocs. Rearrange test for emitting GOT relocs
4972 to suit. Set up explicit tls_index entries and implicit GOT
4973 tls_index entries resolvable at link time for
4974 __tls_get_addr_opt. Simplify test to clear mem for prelink.
4975 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
4976 (ensure_undefweak_dynamic): New function.
4977 (allocate_dynrelocs): Use it here. Only make undef weak symbols
4978 with GOT entries dynamic. Remove unnecessary test of
4979 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
4980 (ppc64_elf_relocate_section): Correct test for using dynamic
4981 symbol on GOT relocs. Rearrange test for emitting GOT relocs
4982 to suit. Set up explicit tls_index entries and implicit GOT
4983 tls_index entries resolvable at link time for __tls_get_addr_opt.
4984 Simplify expression to clear mem for prelink.
4986 2017-01-23 Yury Norov <ynorov@caviumnetworks.com>
4988 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
4990 2017-01-20 Jiong Wang <jiong.wang@arm.com>
4992 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
4993 (elf_backend_hash_symbol): Define.
4995 2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
4998 * elflink.c (bfd_elf_record_link_assignment): Clear any
4999 `forced_local' marking for DSO symbols that are not being
5002 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
5004 * elfnn-riscv.c (riscv_elf_object_p): New function.
5006 2017-01-12 H.J. Lu <hongjiu.lu@intel.com>
5009 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
5011 (elf_x86_64_check_relocs): Create .eh_frame section for the
5013 (elf_x86_64_size_dynamic_sections): Allocate and initialize
5014 .eh_frame section for the .plt.bnd section.
5015 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
5016 for the .plt.bnd section.
5018 2017-01-12 Nick Clifton <nickc@redhat.com>
5021 * opncls.c (find_separate_debug_file): Add include_dirs
5022 parameter. Only include the directory part of the bfd's filename
5023 in search paths if include_dirs is true. Add a couple of extra
5024 locations for looking for debug files.
5025 ( bfd_follow_gnu_debuglink): Update invocation of
5026 find_separate_debug_file.
5027 (bfd_follow_gnu_debugaltlink): Likewise.
5028 (get_build_id): New function: Finds the build-id of the given bfd.
5029 (get_build_id_name): New function: Computes the name of the
5030 separate debug info file for a bfd, based upon its build-id.
5031 (check_build_id_file): New function: Checks to see if a separate
5032 debug info file exists at the given location, and that its
5033 build-id matches that of the original bfd.
5034 (bfd_follow_build_id_debuglink): New function: Finds a separate
5035 debug info file for a given bfd by using the build-id method.
5036 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
5037 method of locating a separate debug info file before using the
5039 * bfd-in2.h: Regenerate.
5041 2017-01-11 H.J. Lu <hongjiu.lu@intel.com>
5044 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
5045 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
5046 elf_x86_64_eh_frame_plt_got.
5047 (elf_x86_64_size_dynamic_sections): Get unwind info from
5048 elf_x86_64_bnd_arch_bed for the BND PLT.
5050 2017-01-11 Jeremy Soller <jackpot51@gmail.com>
5052 * config.bfd: Add entries for i686-redox and x86_64-redox.
5054 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
5056 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
5058 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
5059 .eh_frame section to 4 bytes for x32.
5060 (elf_x86_64_check_relocs): Likewise.
5062 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
5065 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
5066 (PLT_GOT_FDE_LENGTH): Likewise.
5067 (elf_i386_plt_layout): Add eh_frame_plt_got and
5068 eh_frame_plt_got_size.
5069 (elf_i386_plt): Updated.
5070 (elf_i386_link_hash_table): Add plt_got_eh_frame.
5071 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
5072 (elf_i386_size_dynamic_sections): Allocate and initialize
5073 .eh_frame section for .plt.got.
5074 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
5076 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
5077 eh_frame_plt_got_size.
5078 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
5079 (PLT_GOT_FDE_LENGTH): Likewise.
5080 (elf_x86_64_backend_data): Add eh_frame_plt_got and
5081 eh_frame_plt_got_size.
5082 (elf_x86_64_arch_bed): Updated.
5083 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
5084 eh_frame_plt_got_size.
5085 (elf_x86_64_nacl_arch_bed): Likewise.
5086 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
5087 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
5088 (elf_x86_64_size_dynamic_sections): Allocate and initialize
5089 .eh_frame section for .plt.got.
5090 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
5093 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
5095 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
5096 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
5098 2017-01-09 Nick Clifton <nickc@redhat.com>
5100 * dwarf2.c (lookup_address_in_function_table): Return early if
5101 there are no functions in the given comp unit, or if the high
5102 address of the last function in the comp unit is less than the
5105 2017-01-09 Nick Clifton <nickc@redhat.com>
5108 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
5109 message if there are too many symbols to load.
5111 2017-01-04 James Clarke <jrtc27@jrtc27.com>
5113 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
5114 if relocs are cached.
5116 2017-01-03 Rich Felker <bugdal@aerifal.cx>
5119 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
5120 for R_MICROBLAZE_GOTOFF_64.
5122 2017-01-03 Nick Clifton <nickc@redhat.com>
5124 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
5125 warning about using a possibly uninitialised variable.
5127 2017-01-02 Alan Modra <amodra@gmail.com>
5129 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
5130 (allocate_plt_static, allocate_dynrelocs): Use it.
5132 2017-01-02 Alan Modra <amodra@gmail.com>
5134 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
5135 .PARISC.unwind section.
5137 2017-01-02 Alan Modra <amodra@gmail.com>
5140 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
5141 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
5142 indirect to GOT pointer relative code edit.
5144 2017-01-02 Alan Modra <amodra@gmail.com>
5146 Update year range in copyright notice of all files.
5148 For older changes see ChangeLog-2016
5150 Copyright (C) 2017 Free Software Foundation, Inc.
5152 Copying and distribution of this file, with or without modification,
5153 are permitted in any medium without royalty provided the copyright
5154 notice and this notice are preserved.
5160 version-control: never