1 2017-11-16 Nick Clifton <nickc@redhat.com>
4 * elf.c (elfcore_grok_netbsd_procinfo): Check that the note is big enough.
5 (elfcore_grok_openbsd_procinfo): Likewise.
6 (elfcore_grok_nto_status): Likewise.
8 2017-11-16 Nick Clifton <nickc@redhat.com>
10 * merge.c (sec_merge_emit): Always create padding buffer. Add
11 asserts to make sure that the buffer is long enough.
13 2017-11-15 Alan Modra <amodra@gmail.com>
15 * bfd.c (union _bfd_doprnt_args): Add "Bad".
16 (_bfd_doprnt): Handle more flags.
17 (_bfd_doprnt_scan): Likewise. Tidy setting of args array.
18 (error_handler_internal): Init args type to Bad.
20 2017-11-14 Alan Modra <amodra@gmail.com>
23 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Warn on discarding
24 non-empty dynamic section.
25 (ppc_build_one_stub): Take elf_gp from output bfd, not output
27 (ppc_size_one_stub, ppc64_elf_next_toc_section): Likewise.
29 2017-11-14 Alan Modra <amodra@gmail.com>
31 * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for user
34 2017-11-13 Jan Beulich <jbeulich@suse.com>
36 * coff-tic80.c (COFF_ENCODE_ALIGNMENT, COFF_DECODE_ALIGNMENT):
38 * coffcode.h (coff_set_alignment_hook): Drop tic80 special case.
39 (coff_write_object_contents): Likewise. Issue diagnostic for too
42 2017-11-12 H.J. Lu <hongjiu.lu@intel.com>
45 * elf.c (_bfd_elf_map_sections_to_segments): Remove PF_X from
48 2017-11-12 Alan Modra <amodra@gmail.com>
50 * elflink.c (elf_link_add_object_symbols): Ignore anything but
51 defined and defweak symbols when setting up weakdefs.
53 2017-11-12 Alan Modra <amodra@gmail.com>
55 * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Set non_got_ref
56 to keep dyn_relocs, clear to discard. Comment.
57 (allocate_dynrelocs): Always clear non_got_ref when clearing
58 dyn_relocs in non-pic case. Invert non_got_ref test. Also test
59 dynamic_adjusted and ELF_COMMON_DEF_P. Move code deleting
60 dyn_relocs on undefined syms to handle for non-pic too.
61 (elf32_hppa_relocate_section): Simplify test for non-pic dyn relocs.
62 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Set non_got_ref
63 to keep dyn_relocs, clear to discard. Comment.
64 (allocate_dynrelocs): Always clear non_got_ref when clearing
65 dyn_relocs in non-pic case. Invert non_got_ref test. Also test
66 dynamic_adjusted and ELF_COMMON_DEF_P. Move code deleting
67 dyn_relocs on undefined syms to handle for non-pic too.
68 (ppc_elf_relocate_section): Simplify test for non-pic dyn relocs.
69 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Discard
70 dyn_relocs here. Don't bother setting non_got_ref. Comment.
71 (allocate_dynrelocs): Delete special handling of non-pic ELFv2
72 ifuncs. Move code deleting dyn_relocs on undefined symbols to
73 handle for non-pic too. Don't test non_got_ref. Do test
74 dynamic_adjusted and ELF_COMMON_DEF_P.
76 2017-11-08 Djordje Todorovic <djordje.todorovic@rt-rk.com>
78 * elf32-mips.c (elf32_mips_grok_psinfo): Extract core->pid.
79 * elf64-mips.c (elf64_mips_grok_psinfo): Likewise.
80 * elfn32-mips.c (elf32_mips_grok_psinfo): Likewise.
82 2017-11-08 Djordje Todorovic <djordje.todorovic@rt-rk.com>
84 * elf32-mips.c (elf32_mips_write_core_note): New function.
85 (elf_backend_write_core_note): New macro.
86 * elf64-mips.c (elf64_mips_write_core_note): New function.
87 (elf_backend_write_core_note): New macro.
88 * elfn32-mips.c (elf32_mips_write_core_note): New function.
89 (elf_backend_write_core_note): New macro.
91 2017-11-07 Alan Modra <amodra@gmail.com>
93 * elf64-ppc.c (ppc64_elf_build_stubs): Correct pluralization in
96 2017-11-07 Alan Modra <amodra@gmail.com>
98 * sysdep.h: Formatting, comment fixes.
99 (gettext, ngettext): Redefine when ENABLE_NLS.
100 (ngettext, dngettext, dcngettext): Define when !ENABLE_NLS.
101 (_): Define using gettext.
102 (textdomain, bindtextdomain): Use safer "do nothing".
103 * hosts/alphavms.h (textdomain, bindtextdomain): Likewise.
104 (ngettext, dngettext, dcngettext): Define when !ENABLE_NLS.
106 2017-11-05 Alan Modra <amodra@gmail.com>
109 * bfd.c (_bfd_doprnt_scan): Check args index before storing, not
112 2017-11-05 Alan Modra <amodra@gmail.com>
115 * bfd.c (union _bfd_doprnt_args): New.
116 (PRINT_TYPE): Add FIELD arg. Take value from args.
117 (_bfd_doprnt): Replace ap parameter with args. Adjust all
118 PRINT_TYPE invocations and reading of format args to suit.
119 Move "%%" handling out of switch handling args. Support
120 positional parameters.
121 (_bfd_doprnt_scan): New function.
122 (error_handler_internal): Call _bfd_doprnt_scan and read args.
124 2017-11-04 Alan Modra <amodra@gmail.com>
126 * elf32-ppc.c (got_entries_needed, got_relocs_needed): New functions.
127 (allocate_dynrelocs, ppc_elf_size_dynamic_sections): Use them here.
128 (ppc_elf_relocate_section): Don't output a dynamic relocation
129 for IE GOT entries in an executable.
130 * elf64-ppc.c (allocate_got): Trim unnecessary TPREL relocs.
131 (ppc64_elf_size_dynamic_sections): Likewise.
132 (ppc64_elf_relocate_section): Likewise.
134 2017-11-04 Alan Modra <amodra@gmail.com>
136 * elf32-ppc.c (readonly_dynrelocs): Delete info param. Update all
137 callers. Don't bother with SEC_ALLOC test. Return section pointer.
139 (maybe_set_textrel): ..here.
140 * elf64-ppc.c (readonly_dynrelocs): Return section pointer.
141 (maybe_set_textrel): Call minfo to print textrel warning to map file.
143 2017-11-04 Alan Modra <amodra@gmail.com>
145 * elf32-hppa.c (enum _tls_type): Move.
146 (struct elf32_hppa_link_hash_entry): Make tls_type a bitfield.
147 (elf32_hppa_check_relocs): Set DF_STATIC_TLS only for shared libraries.
148 Tidy tls_type handling. Set symbol tls_type for GOT_TLS_LDM too.
149 (got_entries_needed, got_relocs_needed): New functions.
150 (allocate_dynrelocs): Use them.
151 (elf32_hppa_size_dynamic_sections): Likewise.
152 (elf32_hppa_relocate_section): Delete bogus FIXME. Formatting.
153 Correct code emitting relocs on GD/IE got entries. Report an
154 error when a symbol has both normal and TLS GOT relocs.
156 2017-11-04 Alan Modra <amodra@gmail.com>
159 * elf32-hppa.c (elf32_hppa_check_relocs): Don't create dyn_relocs
160 for plabels when non-pic.
161 (maybe_set_textrel): New function.
162 (readonly_dynrelocs): Move and rewrite.
163 (elf32_hppa_adjust_dynamic_symbol): Use it. Don't create copy
164 relocs when def_regular or -z nocopyreloc. Handle non_got_ref
165 for functions. Expand non_got_ref comments.
166 (elf32_hppa_size_dynamic_sections): Use maybe_set_textrel.
168 2017-11-03 H.J. Lu <hongjiu.lu@intel.com>
170 * elf32-i386.c (elf_i386_check_relocs): Set plt.refcount to 1.
171 Don't use func_pointer_refcount. Don't set plt.refcount nor
172 non_got_ref for function pointer reference.
173 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
174 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Don't use
175 func_pointer_refcount.
176 (_bfd_x86_elf_copy_indirect_symbol): Don't copy
177 func_pointer_refcount.
178 (_bfd_x86_elf_hide_symbol): Don't use func_pointer_refcount.
179 * elfxx-x86.h (GENERATE_DYNAMIC_RELOCATION_P): Likewise.
180 (elf_x86_link_hash_entry): Remove func_pointer_refcount.
182 2017-11-03 Mingi Cho <mgcho.minic@gmail.com>
183 Nick Clifton <nickc@redhat.com>
186 * coffgen.c (_bfd_coff_get_external_symbols): Check for an
187 overlarge raw syment count.
188 (coff_get_normalized_symtab): Likewise.
190 2017-11-01 James Bowman <james.bowman@ftdichip.com>
192 * archures.c: Add bfd_mach_ft32b.
193 * cpu-ft32.c: Add arch_info_struct.
194 * elf32-ft32.c: Add R_FT32_RELAX, SC0, SC1,
196 (ft32_elf_relocate_section): Add clauses for R_FT32_SC0, SC1,
198 (ft32_reloc_shortable, elf32_ft32_is_diff_reloc)
199 (elf32_ft32_adjust_diff_reloc_value)
200 (elf32_ft32_adjust_reloc_if_spans_insn)
201 (elf32_ft32_relax_delete_bytes, elf32_ft32_relax_is_branch_target)
202 (ft32_elf_relax_section): New function.
203 * reloc.c: Add BFD_RELOC_FT32_RELAX, SC0, SC1, DIFF32.
204 * bfd-in2.h: Regenerate.
205 * libbfd.h: Regenerate.
207 2017-11-01 Nick Clifton <nickc@redhat.com>
210 * coffcode.h (coff_slurp_line_table): Check for an excessively
211 large line number count.
213 2017-11-01 Nick Clifton <nickc@redhat.com>
216 * peicode.h (pe_bfd_read_buildid): Revise check for invalid size
217 and offset in light of further possible bogus values.
219 2017-11-01 Alan Modra <amodra@gmail.com>
222 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't create a plt
223 entry when just a dynamic reloc can serve. Ensure no dynamic
224 relocations when UNDEFWEAK_NO_DYNAMIC_RELOC by setting non_got_ref.
225 Expand and move the non_got_ref comment.
226 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
228 2017-11-01 Nick Clifton <nickc@redhat.com>
231 * coffgen.c (_bfd_coff_free_symbols): Fail if called on a non-COFF
233 * cofflink.c (coff_link_check_archive_element): Skip non-COFF
234 members of an archive.
236 2017-10-31 Nick Clifton <nickc@redhat.com>
239 * peicode.h (pe_bfd_read_buildid): Check for invalid size and data
242 2017-10-30 Alan Modra <amodra@gmail.com>
244 * elf32-frv.c (ELF_TARGET_ID): Don't define for generic
247 * elflink.c (elf_gc_sweep): Test elf_object_id in addition to
249 (bfd_elf_gc_sections): Likewise.
251 2017-10-30 Alan Modra <amodra@gmail.com>
254 * elf32-hppa.c (elf32_hppa_check_relocs): Move SEC_ALLOC test to
255 ensure non_got_ref is not set due to debug references.
256 (elf32_hppa_adjust_dynamic_symbol): Tidy plabel handling. Use
257 SYMBOL_CALLS_LOCAL and UNDEFWEAK_NO_DYNAMIC_RELOC when determining
258 need for a plt entry.
259 (allocate_dynrelocs): Similarly for got entries. Tidy code discarding
260 dynamic relocs when pic. Remove bogus code attempting to handle
262 (elf32_hppa_relocate_section): Similarly. Delete resolved_to_zero
264 (elf32_hppa_finish_dynamic_symbol): Use UNDEFWEAK_NO_DYNAMIC_RELOC
265 and SYMBOL_REFERENCES_LOCAL in GOT handling.
267 2017-10-28 Alan Modra <amodra@gmail.com>
270 * elflink.c (_bfd_elf_merge_symbol): Remove relocs_compatible check.
271 * elf32-hppa.c (elf_backend_relocs_compatible): Define.
272 * elf32-ppc.c (elf_backend_relocs_compatible): Define.
273 * elf64-ppc.c (elf_backend_relocs_compatible): Define.
275 2017-10-25 Alan Modra <amodra@gmail.com>
277 * archive.c (_bfd_compute_and_write_armap): Match "__gnu_lto_slim"
278 optionally prefixed with "_".
279 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
281 2017-10-24 Andrew Waterman <andrew@sifive.com>
283 * elfnn-riscv.c (_bfd_riscv_relax_lui): Don't relax to c.lui
286 2017-10-24 Renlin Li <renlin.li@arm.com>
289 * elflink.c (_bfd_elf_merge_symbol): Handle multiple definition case.
291 2017-10-23 Nick Clifton <nickc@redhat.com>
294 * elflink.c (elf_link_output_extsym): Keep global undefined
295 symbols if they have been marked as needed.
297 2017-10-23 Maciej W. Rozycki <macro@imgtec.com>
299 * elfn32-mips.c (mips_elf_n32_mkobject): New prototype and
301 (bfd_elf32_mkobject): Use `mips_elf_n32_mkobject' rather than
302 `_bfd_mips_elf_mkobject'.
304 2017-10-22 Hans-Peter Nilsson <hp@axis.com>
307 * config.bfd (cris-*-* | crisv32-*-*): Require a 64-bit BFD.
309 2017-10-19 Palmer Dabbelt <palmer@dabbelt.com>
311 * elfnn-riscv.c (riscv_pcgp_hi_reloc): New structure.
312 (riscv_pcgp_lo_reloc): Likewise.
313 (riscv_pcgp_relocs): Likewise.
314 (riscv_init_pcgp_relocs): New function.
315 (riscv_free_pcgp_relocs): Likewise.
316 (riscv_record_pcgp_hi_reloc): Likewise.
317 (riscv_record_pcgp_lo_reloc): Likewise.
318 (riscv_delete_pcgp_hi_reloc): Likewise.
319 (riscv_use_pcgp_hi_reloc): Likewise.
320 (riscv_record_pcgp_lo_reloc): Likewise.
321 (riscv_find_pcgp_lo_reloc): Likewise.
322 (riscv_delete_pcgp_lo_reloc): Likewise.
323 (_bfd_riscv_relax_pc): Likewise.
324 (_bfd_riscv_relax_section): Handle R_RISCV_PCREL_* relocations
325 via the new functions above.
327 2017-10-19 Palmer Dabbelt <palmer@dabbelt.com>
329 * elfnn-riscv.c (R_RISCV_DELETE): New define.
330 (_bfd_riscv_relax_delete): New function.
331 (perform_relocation): Handle R_RISCV_DELETE.
332 (_bfd_riscv_relax_section): Likewise.
334 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
337 * elfxx-tilegx.c (tilegx_elf_tls_transition): Replace
338 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
339 bfd_link_executable for TLS check.
340 (tilegx_elf_check_relocs): Likewise.
341 (allocate_dynrelocs): Likewise.
342 (tilegx_elf_relocate_section): Likewise.
344 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
347 * elf32-tilepro.c (tilepro_elf_tls_transition): Replace
348 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
349 bfd_link_executable for TLS check.
350 (tilepro_elf_check_relocs): Likewise.
351 (allocate_dynrelocs): Likewise.
352 (tilepro_elf_relocate_section): Likewise.
354 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
357 * elfxx-sparc.c (sparc_elf_tls_transition): Replace
358 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
359 bfd_link_executable for TLS check.
360 (_bfd_sparc_elf_check_relocs): Likewise.
361 (allocate_dynrelocs): Likewise.
362 (_bfd_sparc_elf_relocate_section): Likewise.
364 2017-10-18 H.J. Lu <hongjiu.lu@intel.com>
366 * elf32-tilepro.c (tilepro_elf_gc_mark_hook): Call
367 _bfd_generic_link_add_one_symbol to mark __tls_get_addr.
368 * elfxx-tilegx.c (tilegx_elf_gc_mark_hook): Likewise.
370 2017-10-17 H.J. Lu <hongjiu.lu@intel.com>
372 * elf32-microblaze.c (microblaze_elf_check_relocs): Check for
373 indirect and warning symbols.
375 2017-10-17 Alan Modra <amodra@gmail.com>
378 * elf-properties.c (_bfd_elf_parse_gnu_properties): Compare datasz
379 against size left rather than comparing pointers. Reorganise loop.
381 2017-10-17 Alan Modra <amodra@gmail.com>
384 * aoutx.h (aout_get_external_symbols): Handle stringsize of zero,
385 and error for any other size that doesn't cover the header word.
387 2017-10-16 H.J. Lu <hongjiu.lu@intel.com>
389 * elf-bfd.h (elf_backend_data): Remove gc_sweep_hook.
390 * elf32-arm.c (elf32_arm_gc_sweep_hook): Removed.
391 (elf_backend_gc_sweep_hook): Likewise.
392 * elf32-bfin.c (bfin_gc_sweep_hook): Likewise.
393 (bfinfdpic_gc_sweep_hook): Likewise.
394 (elf_backend_gc_sweep_hook): Likewise.
395 * elf32-cr16.c (elf32_cr16_gc_sweep_hook): Likewise.
396 (elf_backend_gc_sweep_hook): Likewise.
397 * elf32-cris.c (cris_elf_gc_sweep_hook): Likewise.
398 (elf_backend_gc_sweep_hook): Likewise.
399 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Likewise.
400 (elf_backend_gc_sweep_hook): Likewise.
401 * elf32-lm32.c (lm32_elf_gc_sweep_hook): Likewise.
402 (elf_backend_gc_sweep_hook): Likewise.
403 * elf32-m32r.c (m32r_elf_gc_sweep_hook): Likewise.
404 (elf_backend_gc_sweep_hook): Likewise.
405 * elf32-m68k.c (elf_m68k_got_entry): Remove elf_m68k_gc_sweep_hook
407 (elf_m68k_remove_got_entry_type): Removed.
408 (elf_m68k_find_got_entry_ptr): Likewise.
409 (elf_m68k_remove_got_entry): Likewise.
410 (elf_m68k_gc_sweep_hook): Likewise.
411 (elf_backend_gc_sweep_hook): Likewise.
412 * elf32-mcore.c (mcore_elf_gc_sweep_hook): Likewise.
413 (elf_backend_gc_sweep_hook): Likewise.
414 * elf32-metag.c (elf_metag_gc_sweep_hook): Likewise.
415 (elf_backend_gc_sweep_hook): Likewise.
416 * elf32-microblaze.c (elf_backend_gc_sweep_hook): Likewise.
417 (elf_backend_gc_sweep_hook): Likewise.
418 * elf32-mips.c (elf_backend_gc_sweep_hook): Likewise.
419 (elf_backend_gc_sweep_hook): Likewise.
420 * elf32-nds32.c (nds32_elf_gc_sweep_hook): Likewise.
421 (elf_backend_gc_sweep_hook): Likewise.
422 * elf32-nios2.c (nios2_elf32_gc_sweep_hook): Likewise.
423 (elf_backend_gc_sweep_hook): Likewise.
424 * elf32-or1k.c (or1k_elf_gc_sweep_hook): Likewise.
425 (elf_backend_gc_sweep_hook): Likewise.
426 * elf32-ppc.c (ppc_elf_gc_sweep_hook): Likewise.
427 (elf_backend_gc_sweep_hook): Likewise.
428 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
429 (elf_backend_gc_sweep_hook): Likewise.
430 * elf32-sparc.c (elf_backend_gc_sweep_hook): Likewise.
431 * elf32-tic6x.c (elf32_tic6x_gc_sweep_hook): Likewise.
432 (elf_backend_gc_sweep_hook): Likewise.
433 * elf32-tilegx.c (elf_backend_gc_sweep_hook): Likewise.
434 * elf32-tilepro.c (tilepro_elf_gc_sweep_hook): Likewise.
435 (elf_backend_gc_sweep_hook): Likewise.
436 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
437 (elf_backend_gc_sweep_hook): Likewise.
438 * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Likewise.
439 (elf_backend_gc_sweep_hook): Likewise.
440 * elf64-alpha.c (elf64_alpha_gc_sweep_hook): Likewise.
441 (elf_backend_gc_sweep_hook): Likewise.
442 * elf64-mips.c (elf_backend_gc_sweep_hook): Likewise.
443 * elf64-mmix.c (mmix_elf_gc_sweep_hook): Likewise.
444 (elf_backend_gc_sweep_hook): Likewise.
445 * elf64-ppc.c (elf_backend_gc_sweep_hook): Likewise.
446 (ppc64_elf_gc_sweep_hook): Likewise.
447 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
448 (elf_backend_gc_sweep_hook): Likewise.
449 * elf64-sparc.c (elf_backend_gc_sweep_hook): Likewise.
450 * elf64-tilegx.c (elf_backend_gc_sweep_hook): Likewise.
451 * elflink.c (elf_link_add_object_symbols): Don't call
452 _bfd_elf_link_check_relocs here.
453 (gc_sweep_hook_fn): Removed.
454 (elf_gc_sweep): Remove gc_sweep_hook.
455 * elfnn-aarch64.c (elfNN_aarch64_gc_sweep_hook): Removed.
456 (elf_backend_gc_sweep_hook): Likewise.
457 * elfnn-riscv.c (riscv_elf_gc_sweep_hook): Likewise.
458 (elf_backend_gc_sweep_hook): Likewise.
459 * elfxx-mips.c (_bfd_mips_elf_gc_sweep_hook): Likewise.
460 * elfxx-mips.h (_bfd_mips_elf_gc_sweep_hook): Likewise.
461 (elf_backend_gc_sweep_hook): Likewise.
462 * elfxx-sparc.c (_bfd_sparc_elf_gc_sweep_hook): Likewise.
463 * elfxx-sparc.h (_bfd_sparc_elf_gc_sweep_hook): Likewise.
464 * elfxx-target.h (elf_backend_gc_sweep_hook): Likewise.
465 (elfNN_bed): Remove elf_backend_gc_sweep_hook.
466 * elfxx-tilegx.c (tilegx_elf_gc_sweep_hook): Removed.
467 * elfxx-tilegx.h (tilegx_elf_gc_sweep_hook): Likewise.
469 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
471 * elf32-i386.c (elf_i386_backend_data): Removed.
472 (get_elf_i386_backend_data): Likewise.
473 (elf_i386_arch_bed): Replace elf_i386_backend_data with
474 elf_x86_backend_data.
475 (elf_i386_get_synthetic_symtab): Likewise.
476 (elf_i386_nacl_arch_bed): Likewise.
477 (elf_i386_vxworks_arch_bed): Likewise.
478 (elf_i386_relocate_section): Check target_os instead of
480 (elf_i386_finish_dynamic_symbol): Likewise.
481 (elf_i386_finish_dynamic_sections): Use htab->plt0_pad_byte.
482 Check target_os instead of is_vxworks.
483 (elf_i386_link_setup_gnu_properties): Remove normal_target and
484 is_vxworks. Initialize plt0_pad_byte.
485 * elf64-x86-64.c (elf_x86_64_backend_data); Removed.
486 (get_elf_x86_64_arch_data): Likewise.
487 (get_elf_x86_64_backend_data): Likewise.
488 (elf_x86_64_arch_bed): Replace elf_x86_64_backend_data with
489 elf_x86_backend_data.
490 (elf_x86_64_get_synthetic_symtab): Likewise.
491 (elf_x86_64_nacl_arch_bed): Likewise.
492 (elf_x86_64_link_setup_gnu_properties): Remove is_vxworks and
493 normal_target. Initialize plt0_pad_byte.
494 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Check target_os
495 instead of is_vxworks.
496 (_bfd_x86_elf_size_dynamic_sections): Likewise.
497 (_bfd_x86_elf_finish_dynamic_sections): Likewise.
498 (_bfd_x86_elf_adjust_dynamic_symbol): Likewise.
499 (_bfd_x86_elf_link_hash_table_create): Initialize target_os.
500 (_bfd_x86_elf_link_setup_gnu_properties): Remove is_vxworks.
501 Update normal_target. Set up plt0_pad_byte. Check target_os
502 instead of is_vxworks.
503 * elfxx-x86.h (elf_x86_target_os): New.
504 (elf_x86_backend_data): Likewise.
505 (get_elf_x86_backend_data): Likewise.
506 (elf_x86_link_hash_table): Remove is_vxworks. Add plt0_pad_byte
508 (elf_x86_init_table): Remove normal_target and is_vxworks. Add
511 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
513 * elf32-i386.c (elf_i386_finish_dynamic_sections): Call
514 _bfd_x86_elf_finish_dynamic_sections.
515 * elf64-x86-64.c (elf_x86_64_finish_dynamic_sections): Likewise.
516 * elfxx-x86.c (_bfd_x86_elf_finish_dynamic_sections): New
518 * elfxx-x86.h (_bfd_x86_elf_finish_dynamic_sections): New
521 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
524 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
525 hide symbol which was forced to be dynamic.
527 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
530 * elf32-cris.c (cris_elf_relocate_section): Don't generate
531 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
532 (cris_elf_check_relocs): Don't allocate dynamic relocation
533 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
535 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
538 * elf32-sh.c (allocate_dynrelocs): Discard dynamic relocations
539 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
540 (sh_elf_relocate_section): Don't generate dynamic relocation if
541 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
543 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
546 * elf32-s390.c (allocate_dynrelocs): Discard dynamic
547 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
548 (elf_s390_relocate_section): Don't generate dynamic relocation
549 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
550 * elf64-s390.c (allocate_dynrelocs): Discard dynamic
551 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
552 (elf_s390_relocate_section): Don't generate dynamic relocation
553 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
555 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
558 * elf32-nios2.c (nios2_elf32_relocate_section): Don't generate
559 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
560 (allocate_dynrelocs): Discard dynamic relocations if
561 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
563 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
566 * elf32-microblaze.c (microblaze_elf_relocate_section): Don't
567 generate dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is
569 (allocate_dynrelocs): Discard dynamic relocations if
570 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
572 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
575 * elf32-m68k.c (elf_m68k_check_relocs): Don't allocate dynamic
576 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
577 (elf_m68k_adjust_dynamic_symbol): Don't make symbol dynamic if
578 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
579 (elf_m68k_relocate_section): Don't generate dynamic relocation
580 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
582 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
585 * elf32-hppa.c (ensure_undef_dynamic): Don't make undefined
586 symbol dynamic if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
587 (allocate_dynrelocs): Discard dynamic relocations if
588 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
589 (elf32_hppa_relocate_section): Don't generate dynamic
590 relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
592 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
595 * elfnn-ia64.c (elfNN_ia64_check_relocs): Don't allocate
596 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
597 (allocate_fptr): Don't allocate function pointer if
598 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
599 (allocate_dynrel_entries): Don't allocate dynamic relocation
600 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
601 (set_got_entry): Don't set GOT entry if
602 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
603 (set_pltoff_entry): Don't set PLTOFF entry if
604 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
605 (elfNN_ia64_relocate_section): Don't install dynamic relocation
606 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
608 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
611 * elfxx-mips.c (mips_elf_calculate_relocation): Don't generate
612 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
613 (allocate_dynrelocs): Don't allocate dynamic relocations if
614 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
616 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
619 * elf32-arm.c (elf32_arm_final_link_relocate): Don't generate
620 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
621 (allocate_dynrelocs_for_symbol): Discard dynamic relocations
622 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
624 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
627 * elf32-tilepro.c (allocate_dynrelocs): Discard dynamic
628 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
629 (tilepro_elf_relocate_section): Don't generate dynamic
630 relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
631 * elfxx-tilegx.c (allocate_dynrelocs): Discard dynamic
632 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
633 (tilegx_elf_relocate_section): Don't generate dynamic
634 relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
636 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
639 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Don't
640 generate dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is
642 (elfNN_aarch64_allocate_dynrelocs): Discard dynamic relocations
643 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
645 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
647 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Moved to ...
648 * elf-bfd.h (UNDEFWEAK_NO_DYNAMIC_RELOC): Here.
649 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Removed.
651 2017-10-12 James Bowman <james.bowman@ftdichip.com>
653 * bfd-in2.h: Regenerate.
654 * libbfd.h: Regenerate.
655 * elf32-ft32.c: Add HOWTO R_FT32_15.
656 * reloc.c: Add BFD_RELOC_FT32_15.
658 2017-10-12 Nick Clifton <nickc@redhat.com>
660 * reloc.c (enum bfd_reloc_status): Start values at 2.
661 * bfd-in2.h: Regenerate.
662 * elfnn-aarch64.c (aarch64_relocate): Invert sense of function, so
663 that a TRUE return indicates success. Compare the result of
664 calling _bfd_aarch64_elf_put_addend against bfd_reloc_ok.
665 (build_one_stub): Change sense of tests against aarch64_relocate
667 (elfNN_aarch64_tls_relax): Return bfd_reloc_notsupported, rather
668 than FALSE, when an error is detected.
669 (elfNN_aarch64_final_link_relocate): Likewise.
671 2017-10-12 H.J. Lu <hongjiu.lu@intel.com>
673 * elf32-i386.c (elf_backend_hide_symbol): New.
674 * elf64-x86-64.c (elf_backend_hide_symbol): Likewise.
675 * elfxx-x86.c (_bfd_x86_elf_hide_symbol): Likewise.
676 * elfxx-x86.h (_bfd_x86_elf_hide_symbol): Likewise.
678 2017-10-12 Alan Modra <amodra@gmail.com>
680 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Call
681 elf_backend_hide_symbol, not _bfd_elf_link_hash_hide_symbol.
682 (bfd_elf_define_start_stop): Likewise.
684 2017-10-12 Alan Modra <amodra@gmail.com>
686 * elf32-nds32.c (nds32_elf_size_dynamic_sections): Set .interp
687 when executable rather than non-PIC.
688 * elf32-score.c (s3_bfd_score_elf_size_dynamic_sections): Likewise.
689 * elf32-score7.c (s7_bfd_score_elf_size_dynamic_sections): Likewise.
691 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
693 * elf-bfd.h (elf_backend_data): Add `linux_prpsinfo64_ugid16'
695 * elf-linux-core.h (elf_external_linux_prpsinfo64): Rename to...
696 (elf_external_linux_prpsinfo64_ugid32): ... this.
697 (swap_linux_prpsinfo32_out): Rename to...
698 (swap_linux_prpsinfo32_ugid32_out): ... this.
699 (elf_external_linux_prpsinfo64_ugid16): New structure.
700 (swap_linux_prpsinfo64_ugid16_out): New function.
701 * elfxx-target.h [!elf_backend_linux_prpsinfo64_ugid16]
702 (elf_backend_linux_prpsinfo64_ugid16): Define.
703 (elfNN_bed): Initialize `linux_prpsinfo64_ugid16' member.
704 * elf.c (elfcore_write_linux_prpsinfo64): Handle both variants
705 of the 64-bit Linux core PRPSINFO note.
706 * elf64-sh64.c (elf_backend_linux_prpsinfo64_ugid16): Define.
708 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
710 * elf-bfd.h (elf_backend_data): Add `linux_prpsinfo32_ugid16'
712 (elfcore_write_ppc_linux_prpsinfo32): Remove prototype.
713 * elf32-ppc.c (elfcore_write_ppc_linux_prpsinfo32): Remove.
714 (elf_external_ppc_linux_prpsinfo32)
715 (swap_ppc_linux_prpsinfo32_out): Move to...
716 * elf-linux-core.h (elf_external_linux_prpsinfo32_ugid32)
717 (swap_linux_prpsinfo32_ugid32_out): ... these.
718 (elf_external_linux_prpsinfo32): Rename to...
719 (elf_external_linux_prpsinfo32_ugid16): ... this.
720 (swap_linux_prpsinfo32_out): Rename to...
721 (swap_linux_prpsinfo32_ugid16_out): ... this.
722 * elfxx-target.h [!elf_backend_linux_prpsinfo32_ugid16]
723 (elf_backend_linux_prpsinfo32_ugid16): Define.
724 (elfNN_bed): Initialize `linux_prpsinfo32_ugid16' member.
725 * elf.c (elfcore_write_linux_prpsinfo32): Handle both variants
726 of the 32-bit Linux core PRPSINFO note.
727 * elf32-am33lin.c (elf_backend_linux_prpsinfo32_ugid16): Define.
728 * elf32-arm.c (elf_backend_linux_prpsinfo32_ugid16): Define.
729 * elf32-cris.c (elf_backend_linux_prpsinfo32_ugid16): Define.
730 * elf32-frv.c (elf_backend_linux_prpsinfo32_ugid16): Define.
731 * elf32-i386.c (elf_backend_linux_prpsinfo32_ugid16): Define.
732 * elf32-m32r.c (elf_backend_linux_prpsinfo32_ugid16): Define.
733 * elf32-m68k.c (elf_backend_linux_prpsinfo32_ugid16): Define.
734 * elf32-s390.c (elf_backend_linux_prpsinfo32_ugid16): Define.
735 * elf32-sh.c (elf_backend_linux_prpsinfo32_ugid16): Define.
736 * elf32-sparc.c (elf_backend_linux_prpsinfo32_ugid16): Define.
738 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
740 * elf-linux-core.h (elf_external_linux_prpsinfo64): Move the
741 `gap' member ahead of `pr_flag'.
743 2017-10-11 Pedro Alves <palves@redhat.com>
745 * bfd.c (_doprnt): Rename to ...
746 (_bfd_doprnt): ... this.
747 (error_handler_internal): Adjust.
749 2017-10-10 H.J. Lu <hongjiu.lu@intel.com>
751 * elf32-i386.c (elf_i386_check_relocs): Set GOT refcount to 1
752 instead of incrementing it.
753 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
755 2017-10-10 Renlin Li <renlin.li@arm.com>
758 * elf32-arm.c (allocate_dynrelocs_for_symbol): Only make undefined weak
759 symbols into dynamic.
761 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
764 * elfnn-riscv.c (riscv_elf_link_hash_table): Add max_alignment.
765 (riscv_elf_link_hash_table_create): Initialize max_alignment to
767 (_bfd_riscv_relax_section): Cache the max alignment of output
768 sections if possible.
770 2017-10-10 Alan Modra <amodra@gmail.com>
772 * elf64-ppc.c (ppc64_elf_before_check_relocs): Set sec_type for
773 .opd whenever .opd is present and non-zero size. Move code
774 setting abiversion to/from output file earlier. Only set
775 u.opd.func_sec when --gc-sections. Read relocs and set up
776 u.opd.func_sec values here..
777 (ppc64_elf_check_relocs): ..rather than here. Simplify opd
779 (ppc64_elf_edit_opd): Don't set sec_type for .opd here.
781 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
783 * elf-m10300.c (mn10300_elf_check_relocs): Don't free cached
786 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
788 * elf32-bfin.c (bfin_size_dynamic_sections): Don't create the
789 .interp section with "ld --no-dynamic-linker".
791 2017-10-09 Alan Modra <amodra@gmail.com>
794 * dwarf2.c (_bfd_dwarf2_cleanup_debug_info): Free
795 funcinfo_hash_table and varinfo_hash_table.
797 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
799 * elf32-sh.c (readonly_dynrelocs): Dump dynamic relocation
800 in read-only section with minfo.
801 (sh_elf_size_dynamic_sections): Likewise.
803 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
805 * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Remove
808 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
810 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_sections): Set
811 this_hdr.sh_entsize only if section size > 0.
813 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
815 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Reformat.
817 2017-10-07 H.J. Lu <hongjiu.lu@intel.com>
819 * elfxx-sparc.c (readonly_dynrelocs): Dump dynamic relocation
820 in read-only section with minfo.
821 (_bfd_sparc_elf_size_dynamic_sections): Likewise.
823 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
825 * elfxx-x86.h (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Update
828 2017-10-06 John Baldwin <jhb@FreeBSD.org>
830 * elf-bfd.h (struct elf_backend_data): Add
831 `elf_backend_grok_freebsd_prstatus'.
832 * elf.c (elfcore_grok_freebsd_note): Call
833 `elf_backend_grok_freebsd_prstatus' to handle NT_PRSTATUS if
835 * elfn32-mips.c (elf_n32_mips_grok_freebsd_prstatus): New
837 (elf_backend_grok_freebsd_prstatus): Define.
838 * elfxx-target.h (elf_backend_grok_freebsd_prstatus): Define.
839 (elfNN_bed): Initialize `elf_backend_grok_freebsd_prstatus'.
841 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
843 * elf32-i386.c (elf_i386_check_relocs): Replace has_got_reloc
844 and has_non_got_reloc with zero_undefweak.
845 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
846 * elfxx-x86.c (_bfd_x86_elf_link_hash_newfunc): Initialize
848 (_bfd_x86_elf_copy_indirect_symbol): Replace has_got_reloc and
849 has_non_got_reloc with zero_undefweak.
850 * elfxx-x86.h (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Replace
851 has_got_reloc and has_non_got_reloc with zero_undefweak.
852 (elf_x86_link_hash_entry): Likewise.
854 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
856 * elfxx-x86.h (COPY_INPUT_RELOC_P): Add "do/while(0);".
857 (VERIFY_COPY_RELOC): Likewise.
859 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
861 * elfxx-x86.h (VERIFY_COPY_RELOC): New.
862 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Use it.
863 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
865 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
867 * elfxx-x86.h (VERIFY_PLT_ENTRY): New.
868 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Use it.
869 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
871 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
873 * elfxx-x86.h (COPY_INPUT_RELOC_P): New.
874 * elf32-i386.c (elf_i386_relocate_section): Use it.
875 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
877 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
879 * elf32-i386.c (X86_SIZE_TYPE_P): New.
880 (elf_i386_relocate_section): Use GENERATE_DYNAMIC_RELOCATION_P.
881 * elf64-x86-64.c (X86_SIZE_TYPE_P): New.
882 (elf_x86_64_relocate_section): Use GENERATE_DYNAMIC_RELOCATION_P.
883 * elfxx-x86.h (GENERATE_DYNAMIC_RELOCATION_P): New.
885 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
887 * elfxx-x86.h (POINTER_LOCAL_IFUNC_P): New.
888 (PLT_LOCAL_IFUNC_P): Likewise.
889 * elf32-i386.c (elf_i386_relocate_section): Use them.
890 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
892 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
894 * elfxx-x86.h (GENERATE_RELATIVE_RELOC_P): New.
895 * elf32-i386.c (elf_i386_relocate_section): Use it.
896 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
898 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
900 * elfxx-x86.h (RESOLVED_LOCALLY_P): New.
901 * elf32-i386.c (elf_i386_relocate_section): Use it.
902 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
904 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
906 * elf32-i386.c (X86_PCREL_TYPE_P): New.
907 (elf_i386_check_relocs): Use NEED_DYNAMIC_RELOCATION_P.
908 * elf64-x86-64.c (IS_X86_64_PCREL_TYPE): Renamed to ...
909 (X86_PCREL_TYPE_P): This.
910 (elf_x86_64_check_relocs): Use NEED_DYNAMIC_RELOCATION_P.
911 Replace IS_X86_64_PCREL_TYPE with X86_PCREL_TYPE_P.
912 (elf_x86_64_relocate_section): Replace IS_X86_64_PCREL_TYPE with
914 * elfxx-x86.h (NEED_DYNAMIC_RELOCATION_P): New.
916 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
918 * elfxx-x86.h (TLS_TRANSITION_IE_TO_LE_P): New.
919 * elf32-i386.c (elf_i386_tls_transition): Use it.
920 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
922 2017-10-05 H.J. Lu <hongjiu.lu@intel.com>
924 * elf32-ppc.c (readonly_dynrelocs): Add a link_info argument.
925 Dump dynamic relocation in read-only section with minfo if
927 (ppc_elf_adjust_dynamic_symbol): Pass NULL to readonly_dynrelocs.
928 (maybe_set_textrel): Likewise.
929 (ppc_elf_size_dynamic_sections): Dump dynamic relocation in
930 read-only section with minfo.
932 2017-10-05 John Baldwin <jhb@FreeBSD.org>
934 * elf.c (elfcore_grok_freebsd_note): Handle NT_ARM_VFP.
936 2017-10-05 H.J. Lu <hongjiu.lu@intel.com>
938 * elf32-tilepro.c (readonly_dynrelocs): Dump dynamic relocation
939 in read-only section with minfo.
940 (tilepro_elf_size_dynamic_sections): Likewise.
941 * elfxx-tilegx.c (readonly_dynrelocs): Likewise.
942 (tilegx_elf_size_dynamic_sections): Likewise.
944 2017-10-05 Pedro Alves <palves@redhat.com>
947 * bfd.c (bfd_set_error): Revert 2017-10-04 change. Remove
948 ellipsis parameter. Split out bfd_error_on_input code to..
949 (bfd_set_input_error): .. New function.
950 * archive.c (_bfd_write_archive_contents): Use bfd_set_input_error.
951 * vms-lib.c (_bfd_vms_lib_write_archive_contents): Likewise.
952 * bfd-in2.h: Regenerate.
954 2017-10-05 Alan Modra <amodra@gmail.com>
956 * elflink.c (elf_link_input_bfd): Correct ctor/dtor in init_array/
957 fini_array error value.
959 2017-10-05 Alan Modra <amodra@gmail.com>
962 * elf.c (_bfd_elf_setup_sections): Don't trim reloc sections from
964 (_bfd_elf_init_reloc_shdr): Pass sec_hdr, use it to copy SHF_GROUP
966 (elf_fake_sections): Adjust calls. Exit immediately on failure.
967 (bfd_elf_set_group_contents): Add associated reloc section indices
970 2017-10-04 Alan Modra <amodra@gmail.com>
972 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't sort or
973 classify symbols for ELFv2.
975 2017-10-04 Pavel I. Kryukov <kryukov@frtk.ru>
978 * bfd.c (bfd_set_error): Avoid UB on passing arg to va_start that
979 undergoes default promotion.
980 * bfd-in2.h: Regenerate.
982 2017-10-02 Alan Modra <amodra@gmail.com>
984 * elf32-ppc.c (ppc_elf_relocate_section): Fix comment typo.
985 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
987 2017-10-01 Alan Modra <amodra@gmail.com>
990 * dwarf2.c (new_line_sorts_after): Remove end_sequence comparison.
991 (add_line_info): Always put end_sequence last.
993 2017-10-01 Alan Modra <amodra@gmail.com>
996 * dwarf2.c (read_section): Allocate buffer with extra byte for
997 bfd_simple_get_relocated_section_contents rather than copying
1000 2017-09-29 Alan Modra <amodra@gmail.com>
1002 * merge.c (merge_strings): Return FALSE on malloc failure.
1003 (_bfd_merge_sections): Return failures from record_section and
1006 2017-09-28 Alan Modra <amodra@gmail.com>
1009 * elflink.c (_bfd_elf_merge_symbol): Set non_ir_ref_dynamic in
1010 a case where plugin_notice isn't called.
1012 2017-09-27 Kuan-Lin Chen <kuanlinchentw@gmail.com>
1014 * elf32-nds32.c (nds32_elf_relax_section): Fix a tautological
1017 2017-09-26 H.J. Lu <hongjiu.lu@intel.com>
1020 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't pass
1021 output_bfd to info->callbacks->minfo.
1023 2017-09-26 Nick Clifton <nickc@redhat.com>
1026 * elf64-x86-64.c (elf_x86_64_info_to_howto): Do not trigger an
1027 assertion failure if elf_x86_64_rtype_to_howto has already issued
1030 2017-09-26 Alan Modra <amodra@gmail.com>
1033 * dwarf2.c (read_formatted_entries): Use read_attribute_value to
1036 2017-09-26 Nick Clifton <nickc@redhat.com>
1039 * dwarf2.c (read_formatted_entries): Fail early if we know that
1040 the loop parsing data entries will overflow the end of the
1043 2017-09-26 Alan Modra <amodra@gmail.com>
1046 * dwarf2.c (struct comp_unit): Delete sec_info_ptr field.
1047 (find_abstract_instance_name): Calculate DW_FORM_ref_addr relative
1048 to stash->info_ptr_memory, and check die_ref is within that memory.
1049 Set info_ptr_end correctly when another CU is refd. Check die_ref
1050 for DW_FORM_ref4 etc. is within CU.
1052 2017-09-26 Alan Modra <amodra@gmail.com>
1055 * dwarf2.c (concat_filename): Return "<unknown>" on NULL filename.
1056 (read_formatted_entries): Init "fe".
1057 (decode_line_info <DW_LNE_define_file>): Use line_info_add_file_name.
1059 2017-09-26 Alan Modra <amodra@gmail.com>
1062 * dwarf2.c (decode_line_info): Ensure line_ptr stays within
1063 bounds in inner loop.
1065 2017-09-25 Alan Modra <amodra@gmail.com>
1068 * dwarf1.c (parse_die): Sanity check pointer against section limit
1069 before dereferencing.
1070 (parse_line_table): Likewise.
1072 2017-09-25 Alan Modra <amodra@gmail.com>
1075 * dwarf2.c (scan_unit_for_symbols): Ignore DW_AT_name unless it
1077 (parse_comp_unit): Likewise.
1079 2017-09-25 Alan Modra <amodra@gmail.com>
1082 * dwarf2.c (read_formatted_entries): Error on format_count zero.
1084 2017-09-24 Alan Modra <amodra@gmail.com>
1087 * opncls.c (bfd_get_debug_link_info_1): Properly check that crc is
1088 within section bounds.
1090 2017-09-24 Alan Modra <amodra@gmail.com>
1093 * dwarf2.c (decode_line_info): Properly free line sequences on error.
1095 2017-09-24 Alan Modra <amodra@gmail.com>
1098 * dwarf2.c (find_abstract_instance_name): Add orig_info_ptr and
1099 pname param. Return status. Make name const. Don't abort,
1100 return an error. Formatting. Exit if current info_ptr matches
1101 orig_info_ptr. Update callers.
1102 (scan_unit_for_symbols): Start at nesting_level of zero. Make
1103 nested_funcs an array of structs for extensibility. Formatting.
1105 2017-09-24 Alan Modra <amodra@gmail.com>
1108 * dwarf2.c (decode_line_info): Fail on lh.line_range of zero
1109 rather than dividing by zero.
1111 2017-09-24 Alan Modra <amodra@gmail.com>
1114 * dwarf2.c (decode_line_info): Correct .debug_line unit_length check.
1116 2017-09-24 Alan Modra <amodra@gmail.com>
1119 * dwarf2.c (scan_unit_for_symbols): Check u.blk->data is non-NULL.
1121 2017-09-24 Alan Modra <amodra@gmail.com>
1124 * elf.c (_bfd_elf_slurp_version_tables): Test sh_info on
1125 SHT_GNU_verneed section for sanity. Don't zalloc memory for
1128 2017-09-22 H.J. Lu <hongjiu.lu@intel.com>
1131 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Guard against
1134 2017-09-22 H.J. Lu <hongjiu.lu@intel.com>
1137 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Also return
1138 -1 if bfd_canonicalize_dynamic_reloc returns 0.
1140 2017-09-22 Pedro Alves <palves@redhat.com>
1141 Alan Modra <amodra@gmail.com>
1143 * version.h: Add comment.
1145 2017-09-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1147 * elf.c (elfcore_grok_note): For the cases NT_S390_GS_CB and
1148 NT_S390_GS_BC, correct the previously swapped invocations of
1149 elfcore_grok_s390_gs_bc and elfcore_grok_s390_gs_cb.
1151 2017-09-19 Alan Modra <amodra@gmail.com>
1154 * elf64-ppc.c (ppc64_elf_build_stubs): Don't check glink_eh_frame
1157 2017-09-19 Alan Modra <amodra@gmail.com>
1160 * elflink.c (bfd_elf_size_dynamic_sections): Garbage collect
1161 symbols before calculating verrefs. Don't renumber dynsyms
1162 after gc. Exclude .gnu.version when zero or one dynsym.
1163 Localize some vars and reindent.
1165 2017-09-18 H.J. Lu <hongjiu.lu@intel.com>
1168 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Check error
1169 return from bfd_canonicalize_dynamic_reloc.
1171 2017-09-15 Alan Modra <amodra@gmail.com>
1174 * archive.c (bfd_ar_hdr_from_filesystem): Detect when status.st_size
1175 overflows bfd_size_type.
1177 2017-09-14 H.J. Lu <hongjiu.lu@intel.com>
1180 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument
1181 to indicate if conversion is performed.
1182 (elf_i386_check_relocs): Cache section contents and relocations
1183 if conversion is performed.
1184 * elf64-x86-64.c (elf_x86_64_check_relocs): Cache section
1185 contents and relocations if conversion is performed.
1187 2017-09-14 Nick Clifton <nickc@redhat.com>
1190 * peXXigen.c (pe_print_idata): Extend check for HintName vector
1193 2017-09-13 H.J. Lu <hongjiu.lu@intel.com>
1195 * elfxx-x86.h: Fix a typo in comments.
1197 2017-09-09 Kamil Rytarowski <n54@gmx.com>
1199 * elf32-nds32.c: Rename __BIT() to N32_BIT().
1201 2017-09-09 Alan Modra <amodra@gmail.com>
1203 * elf64-ppp.c (plt_stub_pad): Handle positive and negative
1206 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
1208 * elf32-i386.c (elf_i386_relocate_section): Update usage of
1209 UNDEFINED_WEAK_RESOLVED_TO_ZERO.
1210 (elf_i386_finish_dynamic_symbol): Likewise.
1211 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1212 (elf_x86_64_finish_dynamic_symbol): Likewise.
1213 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Likewise.
1214 (_bfd_x86_elf_fixup_symbol): Likewise.
1216 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
1218 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
1219 check has_non_got_reloc.
1221 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
1224 * elf32-i386.c (elf_i386_convert_load_reloc): Check linker_def.
1225 Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
1226 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Check
1227 linker_def. Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
1228 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Set local_ref
1229 and linker_def on __ehdr_start if it is referenced and not
1231 (_bfd_x86_elf_link_symbol_references_local): Also set local_ref
1232 and return TRUE when building executable, if a symbol has
1233 non-GOT/non-PLT relocations in text section or there is no
1235 * elfxx-x86.h (elf_x86_link_hash_entry): Add linker_def.
1237 2017-09-08 H.J. Lu <hongjiu.lu@intel.com>
1239 * elfxx-x86.h: Update comments.
1241 2017-09-08 H.J. Lu <hongjiu.lu@intel.com>
1243 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Replace
1244 elf_x86_plt_layout_table with elf_x86_init_table.
1245 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
1247 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties):
1249 * elfxx-x86.h (elf_x86_plt_layout_table): Renamed to ...
1250 (elf_x86_init_table): This.
1251 (_bfd_x86_elf_link_setup_gnu_properties): Replace
1252 elf_x86_plt_layout_table with elf_x86_init_table.
1254 2017-09-07 H.J. Lu <hongjiu.lu@intel.com>
1256 * configure.ac (bfd_backends): Don't add elf64-x86-64.lo nor
1257 elf64.lo together with elfxx-x86.lo for 64-bit BFD.
1258 * configure: Regenerated.
1259 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set r_info
1260 and r_sym fields of plt_layout.
1261 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
1263 * elfxx-x86.c (elf_x86_64_is_reloc_section): Remove BFD64 check.
1264 (_bfd_x86_elf_link_hash_table_create): Likewise. Don't set
1265 r_info nor r_sym fields.
1266 (_bfd_x86_elf_link_setup_gnu_properties): Set r_info and r_sym
1268 * elfxx-x86.h (elf_x86_plt_layout_table): Add r_info and r_sym.
1270 2017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
1272 * (_bfd_riscv_relax_align): Call bfd_set_error and
1273 print an error message when unable to relax a .align directive.
1275 2017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
1277 * elfnn-riscv.c (riscv_zero_pcrel_hi_reloc): New function.
1278 (riscv_record_pcrel_hi_reloc): Add absolute argument.
1279 (riscv_elf_relocate_section): Call riscv_zero_pcrel_hi_reloc for
1280 R_RISCV_PCREL_HI20 relocs, and pass the result to
1281 riscv_record_pcrel_hi_reloc.
1283 2017-09-07 H.J. Lu <hongjiu.lu@intel.com>
1285 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument,
1286 r_type_p. Remove the converted argument. Replace
1287 SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P. Return
1288 the new relocation type via r_type_p.
1289 (elf_i386_relocate_section): Likewise.
1290 (elf_i386_finish_dynamic_symbol): Likewise.
1291 (need_convert_load): Removed.
1292 (check_relocs_failed): Updated.
1293 (elf_i386_check_relocs): Call elf_i386_convert_load_reloc,
1294 instead of setting need_convert_load.
1295 (_bfd_i386_elf_convert_load): Removed.
1296 * elf64-x86-64.c (need_convert_load): Removed.
1297 (check_relocs_failed): Updated.
1298 (elf_x86_64_convert_load_reloc): Add an argument, r_type_p.
1299 Replace SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P.
1300 Return the new relocation type via r_type_p.
1301 (elf_x86_64_check_relocs): Call elf_x86_64_convert_load_reloc,
1302 instead of setting need_convert_load.
1303 (elf_x86_64_check_relocs): Don't check PIC if relocation has
1305 (_bfd_x86_64_elf_convert_load): Removed.
1306 (elf_x86_64_relocate_section): Replace SYMBOL_REFERENCES_LOCAL
1307 with SYMBOL_REFERENCES_LOCAL_P.
1308 (elf_x86_64_finish_dynamic_symbol): Likewise.
1309 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Don't
1311 (_bfd_x86_elf_size_dynamic_sections): Don't call convert_load.
1312 (_bfd_x86_elf_link_symbol_references_local): New function.
1313 * elfxx-x86.h (SYMBOL_REFERENCES_LOCAL_P): New.
1314 (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Replace elf.forced_local with
1315 SYMBOL_REFERENCES_LOCAL_P.
1316 (elf_x86_link_hash_entry): Add local_ref.
1317 (elf_x86_link_hash_table): Remove convert_load.
1318 (_bfd_i386_elf_convert_load): Removed.
1319 (_bfd_x86_64_elf_convert_load): Likewise.
1320 (_bfd_x86_elf_link_symbol_references_local): New.
1322 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
1324 * elf64-x86-64.c (R_X86_64_converted_reloc_bit): New.
1325 (elf_x86_64_info_to_howto): Get the real relocation type by
1326 masking out R_X86_64_converted_reloc_bit.
1327 (elf_x86_64_check_tls_transition): Get the real relocation type
1328 by masking out R_X86_64_converted_reloc_bit.
1329 (elf_x86_64_convert_load_reloc): Set R_X86_64_converted_reloc_bit
1330 instead of setting converted_reloc.
1331 (elf_x86_64_relocate_section): Check R_X86_64_converted_reloc_bit
1332 instead of converted_reloc. Get the real relocation type by
1333 masking out R_X86_64_converted_reloc_bit.
1334 (elf_x86_64_link_setup_gnu_properties): Verify that the value of
1335 R_X86_64_converted_reloc_bit is valid.
1336 * elfxx-x86.h (converted_reloc): Removed.
1338 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
1340 * elf32-i386.c (elf_i386_relocate_section): Don't change r_type
1341 when calling elf_i386_tls_transition. Don't use ELF32_R_TYPE
1342 to get the relocation type again.
1343 * elf64-x86-64.c (elf_x86_64_relocate_section): Don't change
1344 r_type when calling elf_x86_64_tls_transition. Don't use
1345 ELF32_R_TYPE to get the relocation type again.
1347 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
1349 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Properly set
1352 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
1354 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Remove the sec
1355 argument. Don't check relocation overflow. Avoid relocation
1356 overflow if --no-relax is used. Set converted_reloc on symbol
1357 if a GOTPCREL relocation is converted.
1358 (elf_x86_64_relocate_section): Issue a fatal error and suggest
1359 --no-relax if GOTPCREL relocation conversion leads to relocation
1361 * elfxx-x86.h (elf_x86_link_hash_entry): Add converted_reloc.
1363 2017-09-05 Alexander Fedotov <alexander.fedotov@nxp.com>
1364 Edmar Wienskoski <edmar.wienskoski@nxp.com
1366 * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_VLE_ADDR20.
1367 (ppc_elf_check_relocs): Handle it.
1368 (ppc_elf_vle_split20): New function.
1369 (ppc_elf_relocate_section): Handle R_PPC_VLE_ADDR20.
1371 2017-09-03 H.J. Lu <hongjiu.lu@intel.com>
1374 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Set tlsdesc_plt
1375 for x86-64 if GOT_TLS_GDESC_P is true.
1377 2017-09-03 Alan Modra <amodra@gmail.com>
1380 * elfxx-x86.h (elf_x86_hash_table): Check is_elf_hash_table first.
1382 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1384 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1385 tls_get_addr for x86-64 in one place.
1387 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1389 * configure.ac (bfd_backends): Add elf64-x86-64.lo together
1390 with elfxx-x86.lo for 64-bit BFD.
1391 * configure: Regenerated.
1393 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1395 * elf32-i386.c (elf_i386_convert_load): Renamed to ...
1396 (_bfd_i386_elf_convert_load): This. Remove static.
1397 (elf_i386_size_dynamic_sections): Removed.
1398 (elf_backend_size_dynamic_sections): Likewise.
1399 * elf64-x86-64.c (elf_x86_64_convert_load): Renamed to ...
1400 (_bfd_x86_64_elf_convert_load): This. Remove static.
1401 (elf_x86_64_size_dynamic_sections): Removed.
1402 (elf_backend_size_dynamic_sections): Likewise.
1403 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): Renamed to ...
1404 (elf_x86_allocate_dynrelocs): This. Make it static.
1405 (_bfd_x86_elf_allocate_local_dynrelocs): Renamed to ...
1406 (elf_x86_allocate_local_dynreloc): This. Make it static.
1407 (elf_i386_is_reloc_section): New function.
1408 (elf_x86_64_is_reloc_section): Likewise.
1409 (_bfd_x86_elf_link_hash_table_create): Initialize convert_load,
1410 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
1411 Rearrange got_entry_size initialization.
1412 (_bfd_x86_elf_size_dynamic_sections): New function.
1413 * elfxx-x86.h (elf_x86_link_hash_table): Add convert_load,
1414 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
1415 (_bfd_i386_elf_convert_load): New.
1416 (_bfd_x86_64_elf_convert_load): Likewise.
1417 (_bfd_x86_elf_size_dynamic_sections): Likewise.
1418 (elf_backend_size_dynamic_sections): Likewise.
1419 (_bfd_x86_elf_allocate_dynrelocs): Removed.
1420 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
1422 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1424 * elfxx-x86.h (elf_x86_link_hash_table): Rearrange fields and
1427 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1429 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
1430 sgotplt_jump_table_size with elf_x86_compute_jump_table_size.
1432 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1434 * elf32-i386.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
1435 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Moved to ...
1436 * elfxx-x86.h (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
1437 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Here.
1438 * elf64-x86-64.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
1439 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Removed.
1441 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1443 * elf32-i386.c (elf_i386_allocate_dynrelocs): Removed.
1444 (elf_i386_allocate_local_dynrelocs): Likewise.
1445 (elf_i386_size_dynamic_sections): Replace
1446 elf_i386_allocate_dynrelocs/elf_i386_allocate_local_dynrelocs
1447 with _bfd_x86_elf_allocate_dynrelocs and
1448 _bfd_x86_elf_allocate_local_dynrelocs.
1449 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Removed.
1450 (elf_x86_64_allocate_local_dynrelocs): Likewise.
1451 (elf_x86_64_size_dynamic_sections): Replace
1452 elf_x86_64_allocate_dynrelocs/elf_x86_64_allocate_local_dynrelocs
1453 with _bfd_x86_elf_allocate_dynrelocs and
1454 _bfd_x86_elf_allocate_local_dynrelocs.
1455 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): New function.
1456 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
1457 * elfxx-x86.h (_bfd_x86_elf_allocate_dynrelocs): New prototype.
1458 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
1460 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1462 * elf32-i386.c (is_i386_elf): Removed.
1463 (elf_i386_check_relocs): Replace is_i386_elf with is_x86_elf.
1464 (elf_i386_size_dynamic_sections): Likewise.
1465 (elf_i386_relocate_section): Likewise.
1466 * elf64-x86-64.c (is_x86_64_elf): Removed.
1467 (elf_x86_64_check_relocs): Replace is_x86_64_elf with
1469 (elf_x86_64_size_dynamic_sections): Likewise.
1470 (elf_x86_64_relocate_section): Likewise.
1471 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1473 * elfxx-x86.h (elf_x86_link_hash_table): Add target_id.
1476 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1478 * elf32-i386.c (elf_i386_compute_jump_table_size): Removed.
1479 (elf_i386_allocate_dynrelocs): Replace
1480 elf_i386_compute_jump_table_size with
1481 elf_x86_compute_jump_table_size.
1482 (elf_i386_size_dynamic_sections): Likewise.
1483 * elf64-x86-64.c (elf_x86_64_compute_jump_table_size): Removed.
1484 (elf_x86_64_allocate_dynrelocs): Replace
1485 elf_x86_64_compute_jump_table_size with
1486 elf_x86_compute_jump_table_size.
1487 (elf_x86_64_size_dynamic_sections): Likewise.
1488 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1490 * elfxx-x86.h (elf_x86_link_hash_table): Add got_entry_size.
1491 (elf_x86_compute_jump_table_size): New.
1493 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1495 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1497 (_bfd_x86_elf_adjust_dynamic_symbol): Use sizeof_reloc.
1498 * elfxx-x86.h (elf_x86_link_hash_table): Add sizeof_reloc.
1500 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1502 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check VxWorks
1503 with htab->is_vxworks.
1504 (elf_i386_size_dynamic_sections): Likewise.
1505 (elf_i386_relocate_section): Likewise.
1506 (elf_i386_finish_dynamic_symbol): Likewise.
1507 (elf_i386_finish_dynamic_sections): Likewise.
1509 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1511 * elf32-i386.c (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
1512 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
1513 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Moved to ...
1514 * elfxx-x86.h (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
1515 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
1516 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Here.
1517 * elf64-x86-64.c (GOT_TLS_IE, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
1518 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Removed.
1520 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1523 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Check
1524 ELF_COMMON_DEF_P for common symbols.
1526 2017-09-02 Alan Modra <amodra@gmail.com>
1528 * elf-eh-frame.c (offset_adjust): Avoid false positive gcc warning.
1529 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Likewise.
1530 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
1532 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1534 * elf32-i386.c (elf_i386_gc_mark_hook): Removed.
1535 (elf_backend_gc_mark_hook): Likewise.
1536 * elf64-x86-64.c (elf_x86_64_gc_mark_hook): Likewise.
1537 (elf_backend_gc_mark_hook): Likewise.
1538 * elfxx-x86.c (_bfd_x86_elf_gc_mark_hook): New function.
1539 * elfxx-x86.h (_bfd_x86_elf_gc_mark_hook): New.
1540 (elf_backend_gc_mark_hook): Likewise.
1542 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1544 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Removed.
1545 (elf_backend_adjust_dynamic_symbol): Likewise.
1546 * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise.
1547 (elf_backend_adjust_dynamic_symbol): Likewise.
1548 * elfxx-x86.c (_bfd_x86_elf_adjust_dynamic_symbol): New function.
1549 (_bfd_x86_elf_link_setup_gnu_properties): Copy is_vxworks.
1550 * elfxx-x86.h (elf_x86_link_hash_table): Add is_vxworks.
1551 (_bfd_x86_elf_adjust_dynamic_symbol): New.
1552 (elf_backend_adjust_dynamic_symbol): Likewise.
1554 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1556 * elfxx-x86.h (elf_x86_plt_layout_table): Fix a typo in
1559 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1561 * elf32-i386.c (elf_i386_mkobject): Removed.
1562 (bfd_elf32_mkobject): Likewise.
1563 * elf64-x86-64.c (elf_x86_64_mkobject): Likewise.
1564 (bfd_elf64_mkobject): Likewise.
1565 (bfd_elf32_mkobject): Likewise.
1566 * elfxx-x86.c (_bfd_x86_elf_mkobject): New function.
1567 * elfxx-x86.h (_bfd_x86_elf_mkobject): New.
1568 (bfd_elf64_mkobject): Likewise.
1569 (bfd_elf32_mkobject): Likewise.
1571 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1573 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Updated.
1574 Call _bfd_x86_elf_link_setup_gnu_properties.
1575 * elf64-x86-64.c (elf_x86_lazy_plt_layout): Initialize
1576 pic_plt0_entry and pic_plt_entry fields with the non-PIC PLT
1578 (elf_x86_64_non_lazy_plt): Likewise.
1579 (elf_x86_64_lazy_bnd_plt): Likewise.
1580 (elf_x86_64_non_lazy_bnd_plt): Likewise.
1581 (elf_x86_64_lazy_ibt_plt): Likewise.
1582 (elf_x32_lazy_ibt_plt): Likewise.
1583 (elf_x86_64_non_lazy_ibt_plt): Likewise.
1584 (elf_x32_non_lazy_ibt_plt): Likewise.
1585 (elf_x86_64_nacl_plt): Likewise.
1586 (elf_x86_64_link_setup_gnu_properties): Updated. Call
1587 _bfd_x86_elf_link_setup_gnu_properties.
1588 * elfxx-x86.c: Include elf-vxworks.h".
1589 (_bfd_x86_elf_link_setup_gnu_properties): New function.
1590 * elfxx-x86.h (elf_x86_lazy_plt_layout): Remove "for i386 only"
1591 comments for pic_plt0_entry and pic_plt_entry.
1592 (elf_x86_non_lazy_plt_layout): Likewise.
1593 (elf_x86_plt_layout_table): New.
1594 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
1596 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1599 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Create
1600 .eh_frame section for the second PLT.
1601 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Correct
1602 alignment of .eh_frame section for the second PLT.
1604 2017-09-01 Nick Clifton <nickc@redhat.com>
1607 * dwarf2.c (decode_line_info): Fix test for an overlong line info
1610 2017-09-01 Nick Clifton <nickc@redhat.com>
1613 * elf-attrs.c (_bfd_elf_parse_attributes): Ensure that the
1614 attribute buffer is NUL terminated.
1616 2017-08-31 Nick Clifton <nickc@redhat.com>
1619 * dwarf2.c (read_section): If necessary add a terminating NUL byte
1620 to dwarf string sections.
1622 2017-08-31 Alan Modra <amodra@gmail.com>
1624 * po/SRC-POTFILES.in: Regenerate.
1626 2017-08-31 Alan Modra <amodra@gmail.com>
1628 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Don't exit early
1629 for a section containing just a terminator. Allow multiple
1630 terminators at end of section.
1631 * elflink.c (bfd_elf_discard_info): Iterate over .eh_frame
1632 sections when not adding alignment. Assert on terminator in
1635 2017-08-31 Alan Modra <amodra@gmail.com>
1639 * elflink.c (bfd_elf_discard_info): Don't pad embedded zero
1642 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1644 * configure.ac (bfd_backends): Add elf64.lo together with
1645 elfxx-x86.lo for 64-bit BFD.
1646 * configure: Regenerated.
1648 2017-08-31 James Bowman <james.bowman@ftdichip.com>
1650 * elf32-ft32.c (ft32_elf_howto_table): Use complain_overflow_dont
1653 2017-08-31 Alan Modra <amodra@gmail.com>
1656 * opncls.c (bfd_close_all_done): Don't call bfd_cache_close
1657 before _close_and_cleanup. Call iovec->bclose after.
1658 (bfd_close): Remove code common to, and call, bfd_close_all_done.
1660 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1662 * elf32-i386.c (elf_i386_plt_type): Removed.
1663 (elf_i386_plt): Likewise.
1664 (elf_i386_get_synthetic_symtab): Updated. Call
1665 _bfd_x86_elf_get_synthetic_symtab.
1666 * elf64-x86-64.c (elf_x86_64_plt_type): Removed.
1667 (elf_x86_64_plt): Likewise.
1668 (elf_x86_64_get_synthetic_symtab): Updated. Call
1669 _bfd_x86_elf_get_synthetic_symtab.
1670 * elfxx-x86.c (elf_i386_get_plt_got_vma): New function.
1671 (elf_x86_64_get_plt_got_vma): Likewise.
1672 (elf_i386_valid_plt_reloc_p): Likewise.
1673 (elf_x86_64_valid_plt_reloc_p): Likewise.
1674 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
1675 * elfxx-x86.h (elf_x86_plt_type): New.
1676 (elf_x86_plt): Likewise.
1677 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
1679 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1681 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Check
1682 target_id instead of elf_machine_code.
1684 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1686 * elf32-i386.c (ELF_DYNAMIC_INTERPRETER): Removed.
1687 (elf_i386_lazy_plt_layout): Likewise.
1688 (elf_i386_non_lazy_plt_layout): Likewise.
1689 (elf_i386_plt_layout): Likewise.
1690 (elf_i386_link_hash_table): Likewise.
1691 (elf_i386_next_tls_desc_index): Likewise.
1692 (elf_i386_srelplt2): Likewise.
1693 (elf_i386_plt): Likewise.
1694 (elf_i386_lazy_plt): Likewise.
1695 (elf_i386_non_lazy_plt): Likewise.
1696 (elf_i386_link_hash_table_create): Likewise.
1697 (bfd_elf32_bfd_link_hash_table_create): Likewise.
1698 (elf_i386_lazy_plt): Updated.
1699 (elf_i386_non_lazy_plt): Likewise.
1700 (elf_i386_lazy_ibt_plt): Likewise.
1701 (elf_i386_non_lazy_ibt_plt): Likewise.
1702 (elf_i386_allocate_dynrelocs): Likewise.
1703 (elf_i386_size_dynamic_sections): Likewise.
1704 (elf_i386_relocate_section): Likewise.
1705 (elf_i386_finish_dynamic_symbol): Likewise.
1706 (elf_i386_finish_dynamic_sections): Likewise.
1707 (elf_i386_get_synthetic_symtab): Likewise.
1708 (elf_i386_link_setup_gnu_properties): Likewise.
1709 (elf_i386_nacl_plt): Likewise.
1710 * elf64-x86-64.c (ABI_64_P): Removed.
1711 (ELF64_DYNAMIC_INTERPRETER): Likewise.
1712 (ELF32_DYNAMIC_INTERPRETER): Likewise.
1713 (elf_x86_64_lazy_plt_layout): Likewise.
1714 (elf_x86_64_non_lazy_plt_layout): Likewise.
1715 (elf_x86_64_plt_layout): Likewise.
1716 (elf_x86_64_link_hash_table): Likewise.
1717 (elf_x86_64_plt): Likewise.
1718 (elf_x86_64_lazy_plt): Likewise.
1719 (elf_x86_64_non_lazy_plt): Likewise.
1720 (elf_x86_64_link_hash_table_create): Likewise.
1721 (bfd_elf64_bfd_link_hash_table_create): Likewise.
1722 (bfd_elf32_bfd_link_hash_table_create): Likewise.
1723 (elf_x86_64_lazy_plt): Updated.
1724 (elf_x86_64_non_lazy_plt): Likewise.
1725 (elf_x86_64_lazy_bnd_plt): Likewise.
1726 (elf_x86_64_non_lazy_bnd_plt): Likewise.
1727 (elf_x86_64_lazy_ibt_plt): Likewise.
1728 (elf_x32_lazy_ibt_plt): Likewise.
1729 (elf_x86_64_non_lazy_ibt_plt): Likewise.
1730 (elf_x32_non_lazy_ibt_plt): Likewise.
1731 (elf_x86_64_allocate_dynrelocs): Likewise.
1732 (elf_x86_64_size_dynamic_sections): Likewise.
1733 (elf_x86_64_relocate_section): Likewise.
1734 (elf_x86_64_finish_dynamic_symbol): Likewise.
1735 (elf_x86_64_finish_dynamic_sections): Likewise.
1736 (elf_x86_64_get_synthetic_symtab): Likewise.
1737 (elf_x86_64_link_setup_gnu_properties): Likewise.
1738 (elf_x86_64_nacl_plt): Likewise.
1739 * elfxx-x86.c: Include "objalloc.h", "elf/i386.h" and
1741 (ELF32_DYNAMIC_INTERPRETER): New.
1742 (ELF64_DYNAMIC_INTERPRETER): Likewise.
1743 (ELFX32_DYNAMIC_INTERPRETER): Likewise.
1744 (_bfd_x86_elf_link_hash_table_create): Likewise.
1745 (_bfd_x86_elf_link_hash_table_free): Renamed to ...
1746 (elf_x86_link_hash_table_free): This. Make it static.
1747 * elfxx-x86.h: Don't include "objalloc.h".
1749 (elf_x86_lazy_plt_layout): Likewise.
1750 (elf_x86_non_lazy_plt_layout): Likewise.
1751 (elf_x86_plt_layout): Likewise.
1752 (_bfd_x86_elf_link_hash_table_create): Likewise.
1753 (bfd_elf64_bfd_link_hash_table_create): Likewise.
1754 (bfd_elf32_bfd_link_hash_table_create): Likewise.
1755 (elf_x86_link_hash_table): Add plt, lazy_plt, non_lazy_plt,
1756 srelplt2 and next_tls_desc_index.
1757 (_bfd_x86_elf_link_hash_table_free): Removed.
1759 2017-08-30 Maciej W. Rozycki <macro@imgtec.com>
1761 * elfxx-mips.c (mips_elf_perform_relocation): Correct microMIPS
1762 branch offset interpretation.
1764 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1767 * opncls.c (bfd_close_all_done): Call _close_and_cleanup.
1769 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1771 * elf64-x86-64.c (elf_x86_64_next_tls_desc_index): Removed.
1772 (elf_x86_64_srelplt2): Likewise.
1774 2017-08-30 Alan Modra <amodra@gmail.com>
1776 * elf64-ppc.c (struct ppc_link_hash_table): Add do_tls_opt.
1777 (ppc64_elf_tls_optimize): Set it.
1778 (ppc64_elf_relocate_section): Nop addis on TPREL16_HA, and convert
1779 insn on TPREL16_LO and TPREL16_LO_DS relocs to use r13 when
1780 addis would add zero.
1781 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add do_tls_opt.
1782 (ppc_elf_tls_optimize): Set it.
1783 (ppc_elf_relocate_section): Nop addis on TPREL16_HA, and convert
1784 insn on TPREL16_LO relocs to use r2 when addis would add zero.
1786 2017-08-30 Alan Modra <amodra@gmail.com>
1788 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing
1789 __tls_get_addr call sequences to LE, don't move the addi down
1790 to the nop. Replace the bl with addi and leave the nop alone.
1792 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1794 * elf32-i386.c (elf_i386_pie_finish_undefweak_symbol):
1796 * elf64-x86-64.c (elf_x86_64_finish_local_dynamic_symbol):
1798 (elf_x86_64_pie_finish_undefweak_symbol): Likewise.
1800 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1802 * Makefile.am (BFD32_BACKENDS): Add elfxx-x86.lo.
1803 (BFD64_BACKENDS): Likewise.
1804 (BFD32_BACKENDS_CFILES): Add elfxx-x86.c.
1805 (BFD64_BACKENDS_CFILES): Likewise.
1806 * Makefile.in: Regenerated.
1807 * configure.ac (bfd_backends): Add elfxx-x86.lo together with
1808 elf32-i386.lo and elf64-x86-64.lo.
1809 * configure: Regenerated.
1810 * elf32-i386.c: Include "elfxx-x86.h" instead of "sysdep.h",
1811 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
1812 "objalloc.h" and "hashtab.h".
1813 (ELIMINATE_COPY_RELOCS): Removed.
1814 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
1815 (SYMBOL_NO_COPYRELOC): Likewise.
1816 (elf_i386_link_hash_entry): Likewise.
1817 (GOT_UNKNOWN): Likewise.
1818 (GOT_NORMAL): Likewise.
1819 (GOT_TLS_GD): Likewise.
1820 (elf_i386_hash_entry): Likewise.
1821 (elf_i386_obj_tdata): Likewise.
1822 (elf_i386_tdata): Likewise.
1823 (elf_i386_local_got_tls_type): Likewise.
1824 (elf_i386_local_tlsdesc_gotent): Likewise.
1825 (elf_i386_hash_table): Likewise.
1826 (elf_i386_link_hash_newfunc): Likewise.
1827 (elf_i386_local_htab_hash): Likewise.
1828 (elf_i386_local_htab_eq): Likewise.
1829 (elf_i386_get_local_sym_hash): Likewise.
1830 (elf_i386_link_hash_table_free): Likewise.
1831 (elf_i386_copy_indirect_symbol): Likewise.
1832 (elf_i386_fixup_symbol): Likewise.
1833 (elf_i386_readonly_dynrelocs): Likewise.
1834 (elf_i386_always_size_sections): Likewise.
1835 (elf_i386_set_tls_module_base): Likewise.
1836 (elf_i386_dtpoff_base): Likewise.
1837 (compare_relocs): Likewise.
1838 (elf_i386_hash_symbol): Likewise.
1839 (elf_i386_parse_gnu_properties): Likewise.
1840 (elf_i386_merge_gnu_properties): Likewise.
1841 (elf_i386_link_check_relocs): Likewise.
1842 (elf_i386_merge_symbol_attribute): Likewise.
1843 (bfd_elf32_bfd_link_check_relocs): Likewise.
1844 (elf_backend_copy_indirect_symbol): Likewise.
1845 (elf_backend_always_size_sections): Likewise.
1846 (elf_backend_omit_section_dynsym): Likewise.
1847 (elf_backend_hash_symbol): Likewise.
1848 (elf_backend_fixup_symbol): Likewise.
1849 (elf_backend_parse_gnu_properties): Likewise.
1850 (elf_backend_merge_gnu_properties): Likewise.
1851 (elf_backend_merge_symbol_attribute): Likewise.
1852 (elf_i386_mkobject): Updated.
1853 (elf_i386_link_hash_table_create): Likewise.
1854 (elf_i386_check_tls_transition): Likewise.
1855 (elf_i386_tls_transition): Likewise.
1856 (elf_i386_convert_load_reloc): Likewise.
1857 (elf_i386_check_relocs): Likewise.
1858 (elf_i386_adjust_dynamic_symbol): Likewise.
1859 (elf_i386_allocate_dynrelocs): Likewise.
1860 (elf_i386_convert_load): Likewise.
1861 (elf_i386_size_dynamic_sections): Likewise.
1862 (elf_i386_relocate_section): Likewise.
1863 (elf_i386_finish_dynamic_symbol ): Likewise.
1864 (elf_i386_finish_dynamic_sections): Likewise.
1865 (elf_i386_output_arch_local_syms): Likewise.
1866 (elf_i386_get_synthetic_symtab): Likewise.
1867 (elf_i386_link_setup_gnu_properties): Likewise.
1868 (elf_i386_link_hash_table): Use elf_x86_link_hash_table, instead
1869 of elf_link_hash_table, as base.
1870 (elf_i386_next_tls_desc_index): New.
1871 (elf_i386_srelplt2): Likewise.
1872 (elf_i386_plt): Likewise.
1873 (elf_i386_lazy_plt): Likewise.
1874 (elf_i386_non_lazy_plt): Likewise.
1875 * elf32-x86-64.c: Include "elfxx-x86.h" instead of "sysdep.h",
1876 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
1877 "objalloc.h" and "hashtab.h".
1878 (ELIMINATE_COPY_RELOCS): Removed.
1879 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
1880 (SYMBOL_NO_COPYRELOC): Likewise.
1881 (elf_x86_64_link_hash_entry): Likewise.
1882 (GOT_UNKNOWN): Likewise.
1883 (GOT_NORMAL): Likewise.
1884 (GOT_TLS_GD): Likewise.
1885 (elf_x86_64_hash_entry): Likewise.
1886 (elf_x86_64_obj_tdata): Likewise.
1887 (elf_x86_64_tdata): Likewise.
1888 (elf_x86_64_local_got_tls_type): Likewise.
1889 (elf_x86_64_local_tlsdesc_gotent): Likewise.
1890 (elf_x86_64_hash_table): Likewise.
1891 (elf_x86_64_link_hash_newfunc): Likewise.
1892 (elf_x86_64_local_htab_hash): Likewise.
1893 (elf_x86_64_local_htab_eq): Likewise.
1894 (elf_x86_64_get_local_sym_hash): Likewise.
1895 (elf_x86_64_link_hash_table_free): Likewise.
1896 (elf_x86_64_copy_indirect_symbol): Likewise.
1897 (elf_x86_64_fixup_symbol): Likewise.
1898 (elf_x86_64_readonly_dynrelocs): Likewise.
1899 (elf_x86_64_always_size_sections): Likewise.
1900 (elf_x86_64_set_tls_module_base): Likewise.
1901 (elf_x86_64_dtpoff_base): Likewise.
1902 (compare_relocs): Likewise.
1903 (elf_x86_64_merge_symbol_attribute): Likewise.
1904 (elf_x86_64_hash_symbol): Likewise.
1905 (elf_x86_64_parse_gnu_properties): Likewise.
1906 (elf_x86_64_merge_gnu_properties): Likewise.
1907 (elf_x86_64_link_check_relocs): Likewise.
1908 (elf_backend_copy_indirect_symbol): Likewise.
1909 (elf_backend_always_size_sections): Likewise.
1910 (bfd_elf64_bfd_link_check_relocs): Likewise.
1911 (elf_backend_merge_symbol_attribute): Likewise.
1912 (elf_backend_hash_symbol): Likewise.
1913 (elf_backend_omit_section_dynsym): Likewise.
1914 (elf_backend_fixup_symbol): Likewise.
1915 (elf_backend_parse_gnu_properties): Likewise.
1916 (elf_backend_merge_gnu_properties): Likewise.
1917 (bfd_elf32_bfd_link_check_relocs): Likewise.
1918 (elf_x86_64_mkobject): Updated.
1919 (elf_x86_64_link_hash_table_create): Likewise.
1920 (elf_x86_64_check_tls_transition): Likewise.
1921 (elf_x86_64_tls_transition): Likewise.
1922 (elf_x86_64_convert_load_reloc): Likewise.
1923 (elf_x86_64_check_relocs): Likewise.
1924 (elf_x86_64_adjust_dynamic_symbol): Likewise.
1925 (elf_x86_64_allocate_dynrelocs): Likewise.
1926 (elf_x86_64_convert_load): Likewise.
1927 (elf_x86_64_size_dynamic_sections): Likewise.
1928 (elf_x86_64_relocate_section): Likewise.
1929 (elf_x86_64_finish_dynamic_symbol ): Likewise.
1930 (elf_x86_64_finish_dynamic_sections): Likewise.
1931 (elf_x86_64_output_arch_local_syms): Likewise.
1932 (elf_x86_64_get_synthetic_symtab): Likewise.
1933 (elf_x86_64_link_setup_gnu_properties): Likewise.
1934 (elf_x86_64_link_hash_table): Use elf_x86_link_hash_table,
1935 instead of elf_link_hash_table, as base.
1936 (elf_x86_64_next_tls_desc_index): New.
1937 (elf_x86_64_srelplt2): Likewise.
1938 (elf_x86_64_plt): Likewise.
1939 (elf_x86_64_lazy_plt): Likewise.
1940 (elf_x86_64_non_lazy_plt): Likewise.
1941 * elfxx-x86.c: New file.
1942 * elfxx-x86.h: Likewise.
1944 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1946 * elf32-i386.c (elf_i386_get_synthetic_symtab): Simplify bad
1948 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1950 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1952 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check valid PLT
1953 sections before checking dynamic relocations and free invalid
1954 PLT section contents.
1955 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1957 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
1959 * elf-bfd.h (_bfd_elf_ifunc_get_synthetic_symtab): Removed.
1960 * elf-ifunc.c (_bfd_elf_ifunc_get_synthetic_symtab): Likewise.
1962 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
1965 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check for valid
1967 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1969 2017-08-27 H.J. Lu <hongjiu.lu@intel.com>
1971 * elf32-i386.c (elf_i386_link_hash_newfunc): Initialize
1973 * elf64-x86-64.c (elf_x86_64_link_hash_newfunc): Likewise.
1975 2017-08-26 H.J. Lu <hongjiu.lu@intel.com>
1978 * elf-bfd.h (elf_obj_tdata): Use ENUM_BITFIELD on object_id,
1979 dyn_lib_class and has_gnu_symbols. Change bad_symtab to bitfield.
1980 Add a has_no_copy_on_protected bitfield.
1981 (elf_has_no_copy_on_protected): New.
1982 * elf-properties.c (_bfd_elf_parse_gnu_properties): Set
1983 elf_has_no_copy_on_protected for GNU_PROPERTY_NO_COPY_ON_PROTECTED.
1984 (elf_merge_gnu_property_list): Likewise.
1985 (_bfd_elf_link_setup_gnu_properties): Set extern_protected_data
1986 to FALSE for elf_has_no_copy_on_protected.
1987 * elf32-i386.c (SYMBOL_NO_COPYRELOC): New.
1988 (elf_i386_link_hash_entry): Add def_protected.
1989 (elf_i386_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
1990 when checking info->nocopyreloc.
1991 (elf_i386_link_setup_gnu_properties): Don't set
1992 extern_protected_data here.
1993 (elf_i386_merge_symbol_attribute): New function.
1994 (elf_backend_merge_symbol_attribute): New.
1995 * elf64-x86-64.c (SYMBOL_NO_COPYRELOC): New.
1996 (elf_x86_64_link_hash_entry): Add def_protected.
1997 (elf_x86_64_need_pic): Report protected symbol for def_protected.
1998 (elf_x86_64_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
1999 when checking info->nocopyreloc.
2000 (elf_x86_64_relocate_section): Also check for R_X86_64_PC32
2001 relocation run-time overflow and unresolvable R_X86_64_32S
2002 relocation against protected data symbol defined in shared object
2003 with GNU_PROPERTY_NO_COPY_ON_PROTECTED.
2004 (elf_x86_64_link_setup_gnu_properties): Don't set
2005 extern_protected_data here.
2006 (elf_x86_64_merge_symbol_attribute): New function.
2007 (elf_backend_merge_symbol_attribute): New.
2009 2017-08-26 Alan Modra <amodra@gmail.com>
2011 * elf32-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
2012 (ppc_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
2013 (ppc_elf_relocate_section): Comment fix.
2014 * elf64-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
2015 (ppc64_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
2016 Support dynamic relocs for TPREL16 when non-pic too.
2017 (dec_dynrel_count): Adjust TPREL16 handling as per check_relocs.
2018 (ppc64_elf_relocate_section): Support dynamic relocs for TPREL16
2021 2017-08-25 H.J. Lu <hongjiu.lu@intel.com>
2023 * elf32-i386.c (elf_i386_link_hash_entry): Remove redundant
2024 "symbol" in comments.
2025 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Likewise.
2027 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
2030 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for
2031 R_X86_64_PC32 relocation run-time overflow and unresolvable
2032 R_X86_64_32S relocation with -z nocopyreloc.
2034 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
2036 * elf32-i386.c (elf_i386_check_relocs): Revert the last change.
2037 Undefined symbols may not have a type.
2038 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
2040 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
2042 * elf64-x86-64.c (elf_x86_64_need_pic): Add an argument for
2043 bfd_link_info. Report shared, PIE or PDE object based on
2045 (elf_x86_64_check_relocs): Update elf_x86_64_need_pic call.
2046 (elf_x86_64_relocate_section): Likewise.
2048 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
2050 * elf32-i386.c (elf_i386_check_relocs): Increment PLT count only
2051 for function symbols.
2052 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
2054 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
2056 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set
2057 extern_protected_data to FALSE if GNU_PROPERTY_NO_COPY_ON_PROTECTED
2058 is set on any input relocatable file.
2059 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
2061 2017-08-23 Alan Modra <amodra@gmail.com>
2064 * elf64-ppc.c (ensure_undef_dynamic): Rename from
2065 ensure_undefweak_dynamic. Handle undefined too.
2066 * elf32-ppc.c (ensure_undef_dynamic): Likewise.
2067 * elf32-hppa.c (ensure_undef_dynamic): Likewise.
2068 (allocate_dynrelocs): Discard undefined non-default visibility
2069 relocs first. Make undefined syms dynamic. Tidy goto.
2071 2017-08-21 Alan Modra <amodra@gmail.com>
2072 H.J. Lu <hongjiu.lu@intel.com>
2075 * elf-bfd.h (SYMBOLIC_BIND): Return TRUE for __start/__stop symbols.
2076 * elflink.c (bfd_elf_define_start_stop): Rewrite.
2078 2017-08-21 Hans-Peter Nilsson <hp@bitrange.com>
2081 * elf64-mmix.c (mmix_elf_relax_section): Correct handling of
2082 undefined weak symbols.
2084 2017-08-18 Nick Clifton <nickc@redhat.com>
2087 * tekhex.c (getsym): Fix check for source pointer walking off the
2088 end of the input buffer.
2090 2017-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
2093 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Skip IFUNC
2094 relocations in debug sections, change abort to _bfd_error_handler.
2096 2017-08-14 Nick Clifton <nickc@redhat.com>
2099 * elf.c (setup_group): Check for an empty or very small group
2101 * po/bfd.pot: Regenerate.
2103 2017-08-14 Alan Modra <amodra@gmail.com>
2106 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't add
2107 alignment padding here.
2108 * elflink.c (bfd_elf_discard_info): Add .eh_frame padding here
2109 in a reverse pass over sections.
2111 2017-08-11 H.J. Lu <hongjiu.lu@intel.com>
2114 * elf32-i386.c (elf_i386_get_synthetic_symtab): Allocate space
2115 for @plt suffixes first.
2116 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
2118 2017-08-08 Nick Clifton <nickc@redhat.com>
2121 * elf-attrs.c (_bfd_elf_parse_attributes): Complain about very
2122 small section lengths.
2123 * elf.c (_bfd_elf_setup_sections): Skip empty entries in the group
2125 (elfcore_grok_freebsd_prstatus): Add checks to make sure that
2126 there is enough data present in the note.
2128 2017-08-08 Alan Modra <amodra@gmail.com>
2131 * elf32-microblaze.c (microblaze_elf_check_relocs): Don't bump
2132 got.refcount for GOTOFF relocs, just create .got section.
2134 2017-08-07 H.J. Lu <hongjiu.lu@intel.com>
2136 * elflink.c (elf_link_add_object_symbols): Move common symbol
2137 check after bed->common_definition.
2139 2017-08-07 Alan Modra <amodra@gmail.com>
2142 * elflink.c (bfd_elf_final_link): Don't segfault when sections
2143 needed to define various dynamic tags have been discarded.
2145 2017-08-07 Nick Clifton <nickc@redhat.com>
2148 * elf32-i386.c (elf_i386_link_setup_gnu_properties): If the dynobj
2149 has not been set then use the bfd returned by
2150 _bfd_elf_link_setup_gnu_properties. If that is null then search
2151 through all the input bfds selecting the first normal, ELF format
2153 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
2155 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
2157 * elf32-i386.c (elf_i386_link_hash_entry): Change tls_get_addr
2159 (elf_i386_link_hash_newfunc): Initialize tls_get_addr to 0.
2160 (elf_i386_check_tls_transition): Check tls_get_addr directly.
2161 (elf_i386_convert_load_reloc): Update tls_get_addr check.
2162 (elf_i386_link_check_relocs): New function.
2163 (bfd_elf32_bfd_link_check_relocs): New.
2164 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Change tls_get_addr
2166 (elf_x86_64_link_hash_newfunc): Initialize tls_get_addr to 0.
2167 (elf_x86_64_check_tls_transition): Check tls_get_addr directly.
2168 (elf_x86_64_convert_load_reloc): Update tls_get_addr check.
2169 (elf_x86_64_link_check_relocs): New function.
2170 (bfd_elf64_bfd_link_check_relocs): New.
2171 (bfd_elf32_bfd_link_check_relocs): Likewise.
2173 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
2176 * elflink.c (elf_link_add_object_symbols): Treat common symbol
2177 as undefined for --no-define-common.
2179 2017-08-05 Alan Modra <amodra@gmail.com>
2181 * elf32-hppa.c (elf32_hppa_set_gp): Don't require an
2182 hppa_link_hash_table.
2184 2017-08-02 Max Filippov <jcmvbkbc@gmail.com>
2186 * xtensa-isa.c (xtensa_isa_init): Don't update lookup table
2187 entries for sysregs with negative indices.
2189 2017-08-01 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2191 * elf32-s390.c (elf_s390_finish_dynamic_sections): Skip if it
2192 isn't the S/390 specific elf data.
2193 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
2195 2017-07-31 Kuan-Lin Chen <rufus@andestech.com>
2197 * elfxx-riscv.c (riscv_elf_add_sub_reloc): New function.
2198 * (howto_table) [R_RISCV_ADD8]: Use riscv_elf_add_sub_reloc.
2199 [R_RISCV_ADD16]: Likewise.
2200 [R_RISCV_ADD32]: Likewise.
2201 [R_RISCV_ADD64]: Likewise.
2202 [R_RISCV_SUB6]: Likewise.
2203 [R_RISCV_SUB8]: Likewise.
2204 [R_RISCV_SUB16]: Likewise.
2205 [R_RISCV_SUB32]: Likewise.
2206 [R_RISCV_SUB64]: Likewise.
2208 2017-07-31 Alan Modra <amodra@gmail.com>
2210 * elf64-ppc.c (ppc64_elf_tls_setup): Warn on --plt-localentry
2211 without ld.so checks.
2213 2017-07-29 Alan Modra <amodra@gmail.com>
2216 * elf64-ppc.c (struct ppc_link_hash_entry): Add non_zero_localentry.
2217 (ppc64_elf_merge_symbol): Set non_zero_localentry.
2218 (is_elfv2_localentry0): Test non_zero_localentry.
2219 (ppc64_elf_tls_setup): Default to --no-plt-localentry.
2221 2017-07-28 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2223 * elf32-s390.c (elf_s390_finish_dynamic_sections): Add NULL
2224 pointer check for htab->elf.irelplt.
2225 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
2227 2017-07-27 Nick Clifton <nickc@redhat.com>
2230 * mach-o.c (bfd_mach_o_read_symtab_strtab): Fail if the symtab
2232 * nlmcode.h (nlm_swap_auxiliary_headers_in): Replace assertion
2234 * section.c (bfd_make_section_with_flags): Fail if the name or bfd
2236 * vms-alpha.c (bfd_make_section_with_flags): Correct computation
2238 (evax_bfd_print_emh): Check for invalid string lengths.
2240 2017-07-25 Nick Clifton <nickc@redhat.com>
2242 * po/fr.po: Updated French translation.
2244 2017-07-25 Benjamin Green <bengreen5mx@gmail.com>
2247 * elf32-msp430.c (msp430_elf_relax_section): Allow conversion of
2248 16-bit absolute branches into 10-bit pc-relative branches on the
2249 MSP430 as well as the MSP430X.
2251 2017-07-25 Alan Modra <amodra@gmail.com>
2253 * elf64-ppc.c (struct map_stub): Add tls_get_addr_opt_bctrl.
2254 (stub_eh_frame_size): New function.
2255 (ppc_size_one_stub): Set group tls_get_addr_opt_bctrl.
2256 (group_sections): Init group tls_get_addr_opt_bctrl.
2257 (ppc64_elf_size_stubs): Update sizing and initialization of
2258 .eh_frame. Iteration over stubs via group list.
2259 (ppc64_elf_build_stubs): Iterate over stubs via group list.
2260 (ppc64_elf_finish_dynamic_sections): Update finalization of
2263 2017-07-24 Nick Clifton <nickc@redhat.com>
2266 * mach-o.c (bfd_mach_o_canonicalize_relocs): Pass the base address
2267 of the relocs to the canonicalize_one_reloc routine.
2268 * mach-o.h (struct bfd_mach_o_backend_data): Update the prototype
2269 for the _bfd_mach_o_canonicalize_one_reloc field.
2270 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add
2271 res_base parameter. Use to check for corrupt pair relocs.
2272 * mach-o-aarch64.c (bfd_mach_o_arm64_canonicalize_one_reloc):
2274 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc):
2276 * mach-o-x86-64.c (bfd_mach_o_x86_64_canonicalize_one_reloc):
2279 * vms-alpha.c (_bfd_vms_slurp_eihd): Make sure that there is
2280 enough data in the record before attempting to parse it.
2281 (_bfd_vms_slurp_eeom): Likewise.
2283 (_bfd_vms_slurp_egsd): Check for an invalid section index.
2284 (image_set_ptr): Likewise.
2285 (alpha_vms_slurp_relocs): Likewise.
2287 (alpha_vms_object_p): Check for a truncated record.
2289 2017-07-24 Nick Clifton <nickc@redhat.com>
2292 * reloc.c (_bfd_unrecognized_reloc): New function. Reports
2293 an unrecognized reloc and sets the bfd_error value.
2294 * libbfd.h: Regenerate.
2295 * elf32-arm.c (elf32_arm_final_link_relocate): Use the new
2297 * elf32-i386.c (elf_i386_relocate_section): Likewise.
2298 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
2299 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
2300 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise.
2301 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
2303 2017-07-23 Alan Modra <amodra@gmail.com>
2305 * elf64-ppc.c (ppc64_elf_size_stubs): Correct advance to
2308 2017-07-19 Szabolcs Nagy <szabolcs.nagy@arm.com>
2311 * elfnn-aarch64.c (elfNN_aarch64_reloc_type_class): Return
2312 reloc_class_ifunc for ifunc symbols.
2314 2017-07-19 Nick Clifton <nickc@redhat.com>
2317 * archive.c (bfd_generic_archive_p): If the bfd does not have the
2318 correct magic bytes at the start, set the error to wrong format
2319 and clear the format selector before returning NULL.
2321 2017-07-19 Nick Clifton <nickc@redhat.com>
2324 * coff-rs6000.c (_bfd_strntol): New function.
2325 (_bfd_strntoll): New function.
2326 (GET_VALUE_IN_FIELD): New macro.
2327 (EQ_VALUE_IN_FIELD): new macro.
2328 (_bfd_xcoff_slurp_armap): Use new macros.
2329 (_bfd_xcoff_archive_p): Likewise.
2330 (_bfd_xcoff_read_ar_hdr): Likewise.
2331 (_bfd_xcoff_openr_next_archived_file): Likewise.
2332 (_bfd_xcoff_stat_arch_elt): Likewise.
2333 * coff64-rs6000.c (_bfd_strntol): New function.
2334 (_bfd_strntoll): New function.
2335 (GET_VALUE_IN_FIELD): New macro.
2336 (xcoff64_slurp_armap): Use new macros.
2338 2017-07-19 Claudiu Zissulescu <claziss@synopsys.com>
2339 John Eric Martin <John.Martin@emmicro-us.com>
2341 * bfd-in2.h: Regenerate.
2342 * libbfd.h: Regenerate.
2343 * elf32-arc.c (JLI): Define.
2344 * reloc.c: Add JLI relocations.
2346 2017-07-18 Nick Clifton <nickc@redhat.com>
2349 * coff-sh.c: Fix spelling typos.
2350 * compress.c: Likewise.
2351 * cpu-pdp11.c: Likewise.
2352 * ecofflink.c: Likewise.
2353 * elf-m10300.c: Likewise.
2355 * elf32-arm.c: Likewise.
2356 * elf32-m68k.c: Likewise.
2357 * elf32-nds32.c: Likewise.
2358 * elf32-ppc.c: Likewise.
2359 * elf32-sh.c: Likewise.
2360 * elf32-v850.c: Likewise.
2361 * elf64-ppc.c: Likewise.
2362 * elf64-x86-64.c: Likewise.
2363 * elflink.c: Likewise.
2364 * elfnn-aarch64.c: Likewise.
2365 * elfxx-mips.c: Likewise.
2367 * sunos.c: Likewise.
2368 * vms-alpha.c: Likewise.
2369 * xcofflink.c: Likewise.
2371 2017-07-18 Nick Clifton <nickc@redhat.com>
2374 * coffcode.h (handle_COMDAT): Replace abort with an error message
2377 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
2380 * elf64-x86-64.c (elf_x86_64_relocate_section): Limit PIC check
2383 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
2385 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
2387 2017-07-16 Alan Modra <amodra@gmail.com>
2389 * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimize
2390 __tls_index GOT entries when using __tls_get_addr_opt stub.
2391 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2393 2017-07-12 Alan Modra <amodra@gmail.com>
2395 * po/es.po: Update from translationproject.org/latest/bfd/.
2396 * po/fi.po: Likewise.
2397 * po/fr.po: Likewise.
2398 * po/id.po: Likewise.
2399 * po/ja.po: Likewise.
2400 * po/ro.po: Likewise.
2401 * po/ru.po: Likewise.
2402 * po/sr.po: Likewise.
2403 * po/sv.po: Likewise.
2404 * po/tr.po: Likewise.
2405 * po/uk.po: Likewise.
2406 * po/vi.po: Likewise.
2407 * po/zh_CN.po: Likewise.
2408 * po/hr.po: New file from translationproject.org.
2409 * configure.ac (ALL_LINGUAS): Add hr. Sort.
2410 * configure: Regenerate.
2412 2017-07-12 Nick Clifton <nickc@redhat.com>
2414 Fix compile time warnings using gcc 7.1.1.
2415 * elf32-xtensa.c (elf_xtensa_get_plt_section): Increase length of
2417 (elf_xtensa_get_gotplt_section): Increase length of got_name
2419 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add a
2420 default return of FALSE.
2421 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc): Add a
2422 default return of FALSE.
2424 2017-07-12 Alan Modra <amodra@gmail.com>
2426 * binary.c (binary_set_section_contents): Don't print filepos in
2428 (coff_write_object_contents): Cast size_t for error message.
2429 (coff_slurp_line_table): Don't use bfd_vma symndx.
2430 (coff_slurp_reloc_table): Remove unneeded cast.
2431 * dwarf2.c (read_section): Cast bfd_int64_t to long long for
2433 (find_abstract_instance_name): Likewise.
2434 * elf32-arm.c (arm_type_of_stub): Correct error arg order.
2435 (bfd_elf32_arm_stm32l4xx_erratum_scan): Don't cast error arg.
2436 (elf32_arm_check_relocs): Make r_symndx an int.
2437 * elf32-cris.c (cris_elf_check_relocs): Delete extraneous %s in
2439 * elf32-metag.c (elf_metag_relocate_section): Delete extra error
2441 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Rewrite bogus
2443 * elf32-i386.c (elf_i386_check_relocs): Make r_symndx an int.
2444 * elf32-s390.c (elf_s390_check_relocs): Likewise.
2445 * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
2446 * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
2447 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
2448 * elf64-s390.c (elf_s390_check_relocs): Likewise.
2449 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
2450 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Likewise.
2451 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
2452 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
2453 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
2454 * elf64-mmix.c (_bfd_mmix_after_linker_allocation): Cast size_t args
2455 and use %lu for error message.
2456 * elflink.c (elf_link_adjust_relocs): Delete extra error message arg.
2457 * mmo.c (mmo_scan): Make stab_loc a file_ptr. Cast expression for
2460 * elf32-arm.c (elf32_arm_tls_relax): Correct format string and args
2462 (elf32_arm_final_link_relocate): Likewise.
2463 * coff-arm.c (bfd_arm_process_before_allocation): Likewise.
2464 * coffcode.h (styp_to_sec_flags): Likewise.
2465 * cofflink.c (_bfd_coff_write_global_sym): Likewise.
2466 * ecoff.c (_bfd_ecoff_slurp_symbol_table): Likewise.
2467 * elf32-arc.c (arc_elf_merge_private_bfd_data): Likewise.
2468 * elf32-bfin.c (bfinfdpic_check_relocs): Likewise.
2469 (elf32_bfin_merge_private_bfd_data): Likewise.
2470 * elf32-cris.c (cris_elf_relocate_section): Likewise.
2471 * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
2472 * elf32-i370.c (i370_elf_merge_private_bfd_data): Likewise.
2473 (i370_elf_relocate_section): Likewise.
2474 * elf32-iq2000.c (iq2000_elf_merge_private_bfd_data): Likewise.
2475 * elf32-m32c.c (m32c_elf_merge_private_bfd_data): Likewise.
2476 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise.
2477 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
2478 * elf32-mep.c (mep_elf_merge_private_bfd_data): Likewise.
2479 * elf32-mt.c (mt_elf_merge_private_bfd_data): Likewise.
2480 * elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.
2481 * elfxx-mips.c (mips_elf_merge_obj_e_flags): Likewise.
2482 (_bfd_mips_elf_merge_private_bfd_data): Likewise.
2483 * ieee.c (ieee_write_id, read_id): Likewise.
2484 * mach-o.c (bfd_mach_o_write_contents): Likewise.
2485 (bfd_mach_o_layout_commands, bfd_mach_o_read_section_32): Likewise.
2486 (bfd_mach_o_read_section_64, bfd_mach_o_read_symtab_symbol): Likewise.
2487 (bfd_mach_o_read_command, bfd_mach_o_header_p): Likewise.
2488 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Likewise.
2489 * stabs.c (_bfd_link_section_stabs): Likewise.
2491 * coff-arm.c (coff_arm_relocate_section): Use L modifier in error
2493 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
2494 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
2495 * coff-rs6000.c (xcoff_reloc_type_toc): Likewise.
2496 * coff-sh.c (sh_relax_section): Likewise.
2497 (sh_relax_delete_bytes, sh_swap_insns): Likewise.
2498 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
2499 * coffcode.h (coff_slurp_reloc_table): Likewise.
2500 * coffgen.c (_bfd_coff_get_external_symbols): Likewise.
2501 (_bfd_coff_read_string_table): Likewise.
2502 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
2503 * compress.c (bfd_get_full_section_contents): Likewise.
2504 * dwarf2.c (read_formatted_entries, decode_line_info): Likewise.
2505 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
2506 * elf.c (bfd_elf_string_from_elf_section): Likewise.
2507 * elf32-arc.c (arc_special_overflow_checks): Likewise.
2508 * elf32-arm.c (elf32_arm_tls_relax): Likewise.
2509 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Likewise.
2510 (elf32_arm_write_section): Likewise.
2511 * elf32-bfin.c (bfin_relocate_section): Likewise.
2512 (bfinfdpic_relocate_section): Likewise.
2513 * elf32-hppa.c (hppa_build_one_stub): Likewise.
2514 (final_link_relocate, elf32_hppa_relocate_section): Likewise.
2515 * elf32-i386.c (elf_i386_tls_transition): Likewise.
2516 (elf_i386_relocate_section): Likewise.
2517 * elf32-ip2k.c (ip2k_final_link_relocate): Likewise.
2518 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise.
2519 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
2520 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
2521 * elf32-metag.c (elf_metag_relocate_section): Likewise.
2522 * elf32-nds32.c (unrecognized_reloc_msg): Likewise.
2523 (nds32_elf_relax_longcall1, nds32_elf_relax_longcall2): Likewise.
2524 (nds32_elf_relax_longcall3, nds32_elf_relax_longjump1): Likewise.
2525 (nds32_elf_relax_longjump2, nds32_elf_relax_longjump3): Likewise.
2526 (nds32_elf_relax_longcall4, nds32_elf_relax_longcall5): Likewise.
2527 (nds32_elf_relax_longcall6, nds32_elf_relax_longjump4): Likewise.
2528 (nds32_elf_relax_longjump5, nds32_elf_relax_longjump6): Likewise.
2529 (nds32_elf_relax_longjump7, nds32_elf_relax_loadstore): Likewise.
2530 (nds32_elf_relax_ptr, nds32_elf_ex9_build_hash_table): Likewise.
2531 * elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
2532 * elf32-rx.c (UNSAFE_FOR_PID): Likewise.
2533 * elf32-s390.c (invalid_tls_insn, elf_s390_relocate_section): Likewise.
2534 * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
2535 * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
2536 * elf32-sh.c (sh_elf_relax_section): Likewise.
2537 (sh_elf_relax_delete_bytes, sh_elf_swap_insns): Likewise.
2538 (sh_elf_relocate_section): Likewise.
2539 * elf32-sh64.c (shmedia_prepare_reloc): Likewise.
2540 * elf32-spu.c (spu_elf_relocate_section): Likewise.
2541 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
2542 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
2543 * elf32-v850.c (v850_elf_relax_section): Likewise.
2544 * elf32-vax.c (elf_vax_check_relocs): Likewise.
2545 (elf_vax_relocate_section): Likewise.
2546 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
2547 (extend_ebb_bounds_forward, extend_ebb_bounds_backward): Likewise.
2548 (compute_text_actions, compute_ebb_proposed_actions): Likewise.
2549 (do_fix_for_relocatable_link): Likewise.
2550 * elf64-alpha.c (elf64_alpha_relax_got_load): Likewise.
2551 (elf64_alpha_relax_with_lituse): Likewise.
2552 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Likewise.
2553 (elf_hppa_final_link_relocate): Likewise.
2554 * elf64-ia64-vms.c (elf64_ia64_relax_section): Likewise.
2555 (elf64_ia64_choose_gp, elf64_ia64_relocate_section): Likewise.
2556 (elf64_vms_link_add_object_symbols): Likewise.
2557 * elf64-mmix.c (mmix_elf_perform_relocation): Likewise.
2558 (mmix_final_link_relocate): Likewise.
2559 * elf64-s390.c (invalid_tls_insn): Likewise.
2560 (elf_s390_relocate_section): Likewise.
2561 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
2562 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
2563 (elf_x86_64_relocate_section): Likewise.
2564 * elfcode.h (elf_slurp_symbol_table): Likewise.
2565 * elfcore.h (elf_core_file_p): Likewise.
2566 * elflink.c (elf_link_read_relocs_from_section): Likewise.
2567 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
2568 (elfNN_aarch64_relocate_section): Likewise.
2569 * elfnn-ia64.c (elfNN_ia64_relax_section): Likewise.
2570 (elfNN_ia64_choose_gp, elfNN_ia64_relocate_section): Likewise.
2571 * elfnn-riscv.c (riscv_elf_relocate_section): Likewise.
2572 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
2573 (_bfd_mips_elf_relocate_section): Likewise.
2574 (_bfd_mips_elf_finish_dynamic_symbol, mips_finish_exec_plt): Likewise.
2575 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
2576 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
2577 * ieee.c (ieee_slurp_external_symbols): Likewise.
2578 * ihex.c (ihex_write_object_content): Likewise.
2579 * mach-o.c (bfd_mach_o_build_exec_seg_command): Likewise.
2580 * merge.c (_bfd_merged_section_offset): Likewise.
2581 * mmo.c (mmo_write_loc_chunk): Likewise.
2582 (mmo_write_object_contents): Likewise.
2583 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Likewise.
2584 * stabs.c (_bfd_link_section_stabs): Likewise.
2585 * xcofflink.c (xcoff_link_add_symbols, xcoff_find_tc0): Likewise.
2587 2017-07-11 Alan Modra <amodra@gmail.com>
2589 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo.
2591 2017-07-11 Alan Modra <amodra@gmail.com>
2593 * elf32-ppc.c (ppc_elf_relocate_section): Emit "unexpected
2594 instruction" error using _bfd_error_handler, not einfo.
2596 2017-07-10 Nick Clifton <nickc@redhat.com>
2598 * coffcode.h (coff_slurp_symbol_table): Do not include an entry
2599 for C_AIX_WEAKEXT if it has the same value as C_WEAKEXT.
2601 2017-07-07 John Baldwin <jhb@FreeBSD.org>
2603 * elf.c (elfcore_grok_freebsd_note): Handle NT_FREEBSD_PTLWPINFO.
2605 2017-07-07 Alan Modra <amodra@gmail.com>
2607 * coffcode.h (coff_slurp_symbol_table): Handle C_AIX_WEAKEXT.
2609 2017-07-07 Alan Modra <amodra@gmail.com>
2611 * bfd.c (_doprnt): Replace "L" with "ll" when printing bfd_vma
2612 as long long. Move code replacing "ll" with "I64", and simplify.
2614 2017-07-06 H.J. Lu <hongjiu.lu@intel.com>
2616 * bfd.c (_doprnt): Convert 'L' to 'l' when setting wide_width
2619 2017-07-05 H.J. Lu <hongjiu.lu@intel.com>
2621 * dwarf2.c (line_info_add_include_dir_stub): Replace time with
2623 (line_info_add_file_name): Likewise.
2624 (decode_line_info): Likewise.
2626 2017-07-04 Tristan Gingold <gingold@adacore.com>
2628 * version.m4: Bump version to 2.29.51
2629 * configure: Regenerate.
2631 2017-07-04 Jiong Wang <jiong.wang@arm.com>
2633 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Remove the
2634 sanity check at the head of this function.
2636 2017-07-04 Jan Kratochvil <jan.kratochvil@redhat.com>
2638 * dwarf2.c (struct dwarf2_debug): Add fields dwarf_line_str_buffer and
2639 dwarf_line_str_size.
2640 (struct attr_abbrev): Add field implicit_const.
2641 (dwarf_debug_sections): Add .debug_line_str.
2642 (enum dwarf_debug_section_enum): Add debug_line_str and debug_max.
2643 (dwarf_debug_section_assert): Add static assertion.
2644 (read_indirect_line_string): New.
2645 (read_abbrevs): Support DW_FORM_implicit_const.
2646 (is_str_attr): Support DW_FORM_line_strp.
2647 (read_attribute_value): Support DW_FORM_line_strp and
2648 DW_FORM_implicit_const.
2649 (read_attribute): Support DW_FORM_implicit_const.
2650 (line_info_add_include_dir, line_info_add_include_dir_stub):
2651 (line_info_add_file_name, read_formatted_entries): New.
2652 (decode_line_info, parse_comp_unit): Support DWARF 5.
2653 (_bfd_dwarf2_cleanup_debug_info): Free dwarf_line_str_buffer.
2655 2017-07-03 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
2657 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove the
2658 abort statement that was put for symbols that are not dynamic.
2660 2017-07-03 Tristan Gingold <gingold@adacore.com>
2662 * po/bfd.pot: Regenerate
2664 2017-07-03 Alan Modra <amodra@gmail.com>
2666 * bfd.c (_doprnt): Rewrite "ll" and "L" modifiers to "I64" for
2667 __MSVCRT__. Support "L" modifier for bfd_vma. Formatting.
2668 * elf.c (setup_group): Use "Lx" to print sh_size.
2669 (_bfd_elf_setup_sections): Remove unnecessary cast and print
2670 unknown section type in hex.
2671 (copy_special_section_fields): Style fix.
2672 (bfd_section_from_shdr): Correct format for sh_link. Use a
2673 common error message for all the variants of unrecognized
2675 (assign_file_positions_for_load_sections): Use "Lx" for lma
2676 adjust error message.
2677 (assign_file_positions_for_non_load_sections): Formatting.
2678 (rewrite_elf_program_header): Formatting. Use "Lx" for
2679 bfd_vma values in error messages.
2680 * elfcode.h (elf_slurp_reloc_table_from_section): Cast
2681 ELF_R_SYM value to type expected by format.
2682 * elflink.c (elf_link_read_relocs_from_section): Use "Lx"
2684 (elf_link_add_object_symbols): Use "Lu" for symbol sizes.
2685 (elf_link_input_bfd): Use "Lx" for r_info.
2686 (bfd_elf_gc_record_vtinherit): Use "Lx" for offset.
2688 2017-07-03 Alan Modra <amodra@gmail.com>
2690 * bfd.c (bfd_scan_vma): Don't use long long unless HAVE_LONG_LONG.
2691 * coff-rs6000.c (FMT20): Handle hosts with 64-bit long and
2692 Microsoft C library variant of long long format specifier.
2693 (PRINT20): Cast value to bfd_uint64_t not long long.
2694 * coffcode.h (coff_print_aux): Use BFD_VMA_FMT.
2695 * coff-x86_64.c (coff_amd64_reloc): Use bfd_uint64_t rather than
2696 long long. Don't cast to bfd_vma.
2697 * elf32-score.c (score3_bfd_getl48): Likewise.
2698 * vms-alpha.c (_bfd_vms_slurp_eisd): Likewise.
2700 2017-07-03 Alan Modra <amodra@gmail.com>
2702 * elf.c (_bfd_elf_print_private_bfd_data): Use BFD_VMA_FMT to
2704 (bfd_elf_print_symbol): Don't cast symbol->flags.
2705 (_bfd_elf_symbol_from_bfd_symbol): Likewise.
2706 * elf32-ppc.c (ppc_elf_begin_write_processing): Correct
2707 _bfd_error_handler argument order.
2708 (ppc_elf_merge_private_bfd_data): Don't cast flags.
2710 2017-07-03 Alan Modra <amodra@gmail.com>
2712 * configure.ac: Invoke AC_CHECK_TYPES for long long. Invoke
2713 AC_TYPE_LONG_DOUBLE.
2714 * configure: Regenerate.
2715 * config.in: Regenerate.
2717 2017-06-29 Andrew Waterman <andrew@sifive.com>
2719 * elfnn-riscv.c (riscv_elf_adjust_dynamic_symbol): Fix TLS copy
2722 2017-06-29 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
2724 * elfxx-sparc.c (allocate_dynrelocs): Don't make a symbol dynamic
2725 unless it is undefined weak.
2726 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Set the flag
2727 relative_reloc to direct non-dynamic symbols to R_SPARC_RELATIVE
2729 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): If symbol
2730 is not dynamic in PIC, abort.
2732 2017-06-29 Jiong Wang <jiong.wang@arm.com>
2735 * elfnn-aarch64.c (elfNN_aarch64_allocate_dynrelocs): Only make
2736 undefined weak symbols into dynamic.
2737 (elfNN_aarch64_final_link_relocate): Generate runtime RELATIVE
2738 relocation for non-dynamic symbols.
2739 (elfNN_aarch64_finish_dynamic_symbol): Add sanity check.
2741 2017-06-29 Jiong Wang <jiong.wang@arm.com>
2743 * elfnn-aarch64.c (aarch64_relocation_aginst_gp_p): New function.
2744 (elfNN_aarch64_final_link_relocate): Delete duplicated code for
2745 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15, BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC,
2746 BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
2747 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Optimize the
2750 2017-06-29 Andreas Arnez <arnez@linux.vnet.ibm.com>
2752 * elf-bfd.h (elfcore_write_s390_gs_cb): Add prototype.
2753 (elfcore_write_s390_gs_bc): Likewise.
2754 * elf.c (elfcore_grok_s390_gs_cb): New function.
2755 (elfcore_grok_s390_gs_bc): New function.
2756 (elfcore_grok_note): Call them.
2757 (elfcore_write_s390_gs_cb): New function.
2758 (elfcore_write_s390_gs_bc): New function.
2759 (elfcore_write_register_note): Call them.
2761 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
2763 * libbfd.c (_bfd_generic_get_section_contents): Don't call
2764 bfd_get_file_size. Check archive element size.
2765 (_bfd_generic_get_section_contents_in_window): Likewise.
2767 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
2769 * bfd-in2.h: Regenerated.
2770 * bfdio.c (bfd_get_size): Change return type to ufile_ptr.
2771 (bfd_get_file_size): Likewise.
2773 2017-06-28 Maciej W. Rozycki <macro@imgtec.com>
2774 Matthew Fortune <matthew.fortune@imgtec.com>
2776 * archures.c (bfd_mach_mips_interaptiv_mr2): New macro.
2777 * cpu-mips.c (I_interaptiv_mr2): New enum value.
2778 (arch_info_struct): Add "mips:interaptiv-mr2" entry.
2779 * elfxx-mips.c (_bfd_elf_mips_mach) <E_MIPS_MACH_IAMR2>: New
2781 (mips_set_isa_flags) <bfd_mach_mips_interaptiv_mr2>: Likewise.
2782 (bfd_mips_isa_ext) <bfd_mach_mips_interaptiv_mr2>: Likewise.
2783 (print_mips_isa_ext) <AFL_EXT_INTERAPTIV_MR2>: Likewise.
2784 (mips_mach_extensions): Add `bfd_mach_mipsisa32r3' and
2785 `bfd_mach_mips_interaptiv_mr2' entries.
2786 * bfd-in2.h: Regenerate.
2788 2017-06-27 Nick Clifton <nickc@redhat.com>
2790 * tekhex.c (pass_over): Revert accidental conversion of a local
2791 array to a static array.
2793 2017-06-27 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
2796 * elf32-avr.c (elf32_avr_adjust_diff_reloc_value): Adjust
2797 reloc addend if necessary. Adjust diff only if
2798 shrinked_insn_address < end_address.
2800 2017-06-27 Alan Modra <amodra@gmail.com>
2803 * libbfd.c (_bfd_generic_get_section_contents): Warning fix.
2804 (_bfd_generic_get_section_contents_in_window): Likewise.
2806 2017-06-26 Kuan-Lin Chen <rufus@andestech.com>
2808 * elfnn-riscv.c (perform_relocation): Support the new
2809 R_RISCV_32_PCREL relocation.
2810 (riscv_elf_relocate_section): Likewise.
2811 * elfxx-riscv.c (howto_table): Likewise.
2812 (riscv_reloc_map): Likewise.
2813 * bfd-in2.h (BFD_RELOC_RISCV_32_PCREL): New relocation.
2814 * libbfd.h: Regenerate.
2816 2017-06-27 Alan Modra <amodra@gmail.com>
2819 * libbfd.c (_bfd_generic_get_section_contents): Delete abort.
2820 Use unsigned file pointer type, and remove cast.
2821 * libbfd.c (_bfd_generic_get_section_contents_in_window): Likewise.
2822 Add "count", not "sz".
2824 2017-06-26 Pedro Alves <palves@redhat.com>
2827 * libbfd.c (_bfd_generic_get_section_contents): Add "count", not
2830 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
2833 * libbfd.c (_bfd_generic_get_section_contents_in_window): Add
2836 2017-06-26 Maciej W. Rozycki <macro@imgtec.com>
2838 * cpu-mips.c (arch_info_struct): Mark the 4010 32-bit.
2839 * elfxx-mips.c (mips_set_isa_flags) <bfd_mach_mips4010>: Set
2840 E_MIPS_ARCH_2 rather than E_MIPS_ARCH_3 in `e_flags'.
2841 (mips_mach_extensions): Mark `bfd_mach_mips4010' as extending
2842 `bfd_mach_mips6000' rather than `bfd_mach_mips4000'.
2844 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
2847 * compress.c (bfd_get_full_section_contents): Don't check the
2849 * libbfd.c (_bfd_generic_get_section_contents): Check for and
2850 reject a section whose size + offset is greater than the size
2852 (_bfd_generic_get_section_contents_in_window): Likewise.
2854 2017-06-26 Nick Clifton <nickc@redhat.com>
2857 * tekhex.c (getvalue): Check for the source pointer exceeding the
2858 end pointer before the first byte is read.
2860 2017-06-26 Nick Clifton <nickc@redhat.com>
2863 * opncls.c (get_build_id): Check that the section is big enough
2864 to contain the whole note.
2865 * compress.c (bfd_get_full_section_contents): Check for and reject
2866 a section whose size is greater than the size of the entire file.
2867 * elf32-v850.c (v850_elf_copy_notes): Allow for the ouput to not
2868 contain a notes section.
2870 2017-06-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2872 * elf64-s390.c (elf_s390_additional_program_headers): Add NULL
2874 (elf_s390_modify_segment_map): Likewise.
2875 (bfd_elf_s390_set_options): Lisewise.
2877 2017-06-26 Alan Modra <amodra@gmail.com>
2879 * elflink.c (_bfd_elf_link_create_dynstrtab): Don't make dynobj
2881 (_bfd_elf_size_group_sections): Skip --just-syms bfds.
2882 (bfd_elf_size_dynamic_sections): Ignore .note.GNU-stack and
2883 .preinit_array on --just-syms bfds.
2884 (_bfd_elf_gc_mark_extra_sections): Skip --just-syms bfds.
2885 (elf_gc_sweep, bfd_elf_parse_eh_frame_entries): Likewise.
2886 (bfd_elf_gc_sections, bfd_elf_discard_info): Likewise.
2888 2017-06-25 Sergei Trofimovich <slyfox@gentoo.org>
2890 * elf.c (find_link): Bounds check "hint".
2892 2017-06-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
2894 * elf32-arm.c (using_thumb_only): Update list of architectures in
2895 BFD_ASSERT for which the logic is valid.
2896 (using_thumb2_bl): Likewise.
2897 (using_thumb2): Likewise and return true for ARMv8-R.
2898 (arch_has_arm_nop): Likewise.
2899 (tag_cpu_arch_combine): New v8r table for ARMv8-R Tag_CPU_arch
2900 merging logic. Update commentis for value 15 of v8m_baseline,
2901 v8m_mainline and v4t_plus_v6_m arrays. Use v8r array to decide
2902 merging of value 15 of Tag_CPU_arch.
2904 2017-06-23 Jiong Wang <jiong.wang@arm.com>
2906 * reloc.c (BFD_RELOC_AARCH64_ADR_GOTPAGE): Rename to
2907 BFD_RELOC_AARCH64_ADR_GOT_PAGE
2908 * bfd-in2.h: Regenerate.
2910 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2912 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Move
2913 the error_alignment label forward. Properly align program
2914 property note section.
2916 2017-06-22 Eric Christopher <echristo@gmail.com>
2918 * elf32-arm.c (elf32_arm_final_link_relocate): Use labs rather than
2919 abs to fix a truncation warning.
2921 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2923 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Resolve
2924 local undefined weak symbol to 0.
2925 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Likewise.
2927 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2929 * elf32-i386.c (elf_i386_merge_gnu_properties): If info->shstk
2930 is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
2931 (elf_i386_link_setup_gnu_properties): If info->shstk is set,
2932 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
2933 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): If
2934 info->shstk is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
2935 (elf_x86_64_link_setup_gnu_properties): If info->shstk is set,
2936 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
2938 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2940 * elf32-i386.c (elf_i386_lazy_ibt_plt0_entry): New.
2941 (elf_i386_lazy_ibt_plt_entry): Likewise.
2942 (elf_i386_pic_lazy_ibt_plt0_entry): Likewise.
2943 (elf_i386_non_lazy_ibt_plt_entry): Likewise.
2944 (elf_i386_pic_non_lazy_ibt_plt_entry): Likewise.
2945 (elf_i386_eh_frame_lazy_ibt_plt): Likewise.
2946 (elf_i386_lazy_plt_layout): Likewise.
2947 (elf_i386_non_lazy_plt_layout): Likewise.
2948 (elf_i386_link_hash_entry): Add plt_second.
2949 (elf_i386_link_hash_table): Add plt_second and
2950 plt_second_eh_frame.
2951 (elf_i386_allocate_dynrelocs): Use the second PLT if needed.
2952 (elf_i386_size_dynamic_sections): Use .plt.got unwind info for
2953 the second PLT. Check the second PLT.
2954 (elf_i386_relocate_section): Use the second PLT to resolve
2955 PLT reference if needed.
2956 (elf_i386_finish_dynamic_symbol): Fill and use the second PLT if
2958 (elf_i386_finish_dynamic_sections): Set sh_entsize on the
2959 second PLT. Generate unwind info for the second PLT.
2960 (elf_i386_plt_type): Add plt_second.
2961 (elf_i386_get_synthetic_symtab): Support the second PLT.
2962 (elf_i386_parse_gnu_properties): Support
2963 GNU_PROPERTY_X86_FEATURE_1_AND.
2964 (elf_i386_merge_gnu_properties): Support
2965 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
2966 on GNU_PROPERTY_X86_FEATURE_1_IBT
2967 (elf_i386_link_setup_gnu_properties): If info->ibt is set,
2968 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
2969 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
2970 is set on all relocatable inputs.
2971 * elf64-x86-64.c (elf_x86_64_lazy_ibt_plt_entry): New.
2972 (elf_x32_lazy_ibt_plt_entry): Likewise.
2973 (elf_x86_64_non_lazy_ibt_plt_entry): Likewise.
2974 (elf_x32_non_lazy_ibt_plt_entry): Likewise.
2975 (elf_x86_64_eh_frame_lazy_ibt_plt): Likewise.
2976 (elf_x32_eh_frame_lazy_ibt_plt): Likewise.
2977 (elf_x86_64_lazy_ibt_plt): Likewise.
2978 (elf_x32_lazy_ibt_plt): Likewise.
2979 (elf_x86_64_non_lazy_ibt_plt): Likewise.
2980 (elf_x32_non_lazy_ibt_plt): Likewise.
2981 (elf_x86_64_get_synthetic_symtab): Support the second PLT.
2982 (elf_x86_64_parse_gnu_properties): Support
2983 GNU_PROPERTY_X86_FEATURE_1_AND.
2984 (elf_x86_64_merge_gnu_properties): Support
2985 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
2986 on GNU_PROPERTY_X86_FEATURE_1_IBT
2987 (elf_x86_64_link_setup_gnu_properties): If info->ibt is set,
2988 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
2989 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
2990 is set on all relocatable inputs.
2992 2017-06-22 Nick Clifton <nickc@redhat.com>
2995 * som.c (setup_sections): NUL terminate the space_strings buffer.
2996 Check that the space.name field does not index beyond the end of
2997 the space_strings buffer.
2999 2017-06-21 Nick Clifton <nickc@redhat.com>
3002 * coff-sh.c (sh_reloc): Check for an out of range reloc.
3004 2017-06-21 Nick Clifton <nickc@redhat.com>
3007 * vms-misc.c (_bfd_vms_save_sized_string): Use unsigned int as
3008 type of the size parameter.
3009 (_bfd_vms_save_counted_string): Add second parameter - the maximum
3010 length of the counted string.
3011 * vms.h (_bfd_vms_save_sized_string): Update prototype.
3012 (_bfd_vms_save_counted_string): Likewise.
3013 * vms-alpha.c (_bfd_vms_slurp_eisd): Update calls to
3014 _bfd_vms_save_counted_string.
3015 (_bfd_vms_slurp_ehdr): Likewise.
3016 (_bfd_vms_slurp_egsd): Likewise.
3017 (Parse_module): Likewise.
3019 2017-06-21 Alan Modra <amodra@gmail.com>
3021 * elf64-ppc.c (ppc64_elf_size_stubs): Test for localentry:0 plt
3022 calls before tocsave calls.
3023 (ppc64_elf_relocate_section): Allow localentry:0 plt calls without
3026 2017-06-21 Nick Clifton <nickc@redhat.com>
3029 * reloc.c (bfd_generic_get_relocated_section_contents): Fail if
3030 bfd_get_full_section_contents returns no contents.
3032 2017-06-21 Nick Clifton <nickc@redhat.com>
3035 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an undersized
3038 2017-06-21 Nick Clifton <nickc@redhat.com>
3041 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an empty section
3043 (image_set_ptr): Likewise.
3044 (alpha_vms_fix_sec_rel): Likewise.
3045 (alpha_vms_slurp_relocs): Likewise.
3047 2017-06-21 Nick Clifton <nickc@redhat.com>
3050 * ieee.c (ieee_slurp_sections): Check for a NULL return from
3052 (ieee_archive_p): Likewise.
3053 (ieee_object_p): Likewise.
3055 2017-06-21 Nick Clifton <nickc@redhat.com>
3058 * elf.c (setup_group): Zero the group section pointer list after
3059 allocation so that loops can be caught. Check for NULL pointers
3060 when processing a group list.
3062 2017-06-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
3064 * elf-s390.h: New file.
3065 * elf64-s390.c (struct elf_s390_link_hash_table): Add params
3067 (elf_s390_additional_program_headers): New function.
3068 (elf_s390_modify_segment_map): New function.
3069 (bfd_elf_s390_set_options): New function.
3070 (elf_backend_additional_program_headers)
3071 (elf_backend_modify_segment_map): Add macro definitions.
3073 2017-06-19 H.J. Lu <hongjiu.lu@intel.com>
3076 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Check
3077 the DYNAMIC bit instead of bfd_count_sections.
3079 2017-06-19 Nick Clifton <nickc@redhat.com>
3082 * vms-alpha.c (evax_bfd_print_emh): Check for insufficient record
3084 (evax_bfd_print_eeom): Likewise.
3085 (evax_bfd_print_egsd): Check for an overlarge record length.
3086 (evax_bfd_print_etir): Likewise.
3088 2017-06-19 Nick Clifton <nickc@redhat.com>
3091 * libieee.h (struct common_header_type): Add end_p field.
3092 * ieee.c (this_byte_and_next): Do not advance input_p beyond
3094 (read_id): Check for a length that exceeds the remaining bytes in
3096 (ieee_seek): Initialise end_p.
3097 (ieee_archive_p): Likewise.
3098 (ieee_object_p): Likewise.
3100 2017-06-19 Nick Clifton <nickc@redhat.com>
3103 * vms-alpha.c (_bfd_vms_slurp_eihs): Check for invalid offset
3104 before reading the EIHS structure entries.
3106 2017-06-19 Nick Clifton <nickc@redhat.com>
3109 * vms-alpha.c (_bfd_vms_slurp_egsd): Use unsigned int for
3110 gsd_size. Check that there are enough bytes remaining to read the
3111 type and size of the next egsd. Check that the size of the egsd
3112 does not exceed the size of the record.
3114 2017-06-19 Alan Modra <amodra@gmail.com>
3116 * config.bfd: Correct targ_underscore for cris.
3118 2017-06-18 Alan Modra <amodra@gmail.com>
3120 * config.bfd: Correct targ_underscore for epiphany, ip2k,
3121 m32c, mn10200, pru, rl78, rx, crisv32 and v850.
3123 2017-06-16 Nick Clifton <nickc@redhat.com>
3125 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Do not fail if the
3126 bucketlist is empty because there are no symbols to add to the
3129 2017-06-16 Alan Modra <amodra@gmail.com>
3135 * targets.c (struct bfd_target): Add _bfd_define_start_stop.
3136 (BFD_JUMP_TABLE_LINK): Likewise.
3137 * elf-bfd.h (bfd_elf_define_start_stop): Declare.
3138 * elflink.c (_bfd_elf_gc_mark_rsec): Update comment.
3139 (bfd_elf_define_start_stop): New function.
3140 * linker.c (bfd_generic_define_start_stop): New function.
3141 * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Init
3143 * aout-adobe.c (aout_32_bfd_define_start_stop): Define.
3144 * aout-target.h (MY_bfd_define_start_stop): Define.
3145 * aout-tic30.c (MY_bfd_define_start_stop): Define.
3146 * binary.c (binary_bfd_define_start_stop): Define.
3147 * bout.c (b_out_bfd_define_start_stop): Define.
3148 * coff-alpha.c (_bfd_ecoff_bfd_define_start_stop): Define.
3149 * coff-mips.c (_bfd_ecoff_bfd_define_start_stop): Define.
3150 * coff-rs6000.c (_bfd_xcoff_bfd_define_start_stop): Define.
3151 * coffcode.h (coff_bfd_define_start_stop): Define.
3152 * elfxx-target.h (bfd_elfNN_bfd_define_start_stop): Define.
3153 * i386msdos.c (msdos_bfd_define_start_stop): Define.
3154 * i386os9k.c (os9k_bfd_define_start_stop): Define.
3155 * ieee.c (ieee_bfd_define_start_stop): Define.
3156 * ihex.c (ihex_bfd_define_start_stop): Define.
3157 * libbfd-in.h (_bfd_nolink_bfd_define_start_stop): Define.
3158 * mach-o-target.c (bfd_mach_o_bfd_define_start_stop): Define.
3159 * mmo.c (mmo_bfd_define_start_stop): Define.
3160 * nlm-target.h (nlm_bfd_define_start_stop): Define.
3161 * oasys.c (oasys_bfd_define_start_stop): Define.
3162 * pef.c (bfd_pef_bfd_define_start_stop): Define.
3163 * plugin.c (bfd_plugin_bfd_define_start_stop): Define.
3164 * ppcboot.c (ppcboot_bfd_define_start_stop): Define.
3165 * som.c (som_bfd_define_start_stop): Define.
3166 * srec.c (srec_bfd_define_start_stop): Define.
3167 * tekhex.c (tekhex_bfd_define_start_stop): Define.
3168 * versados.c (versados_bfd_define_start_stop): Define.
3169 * vms-alpha.c (vms_bfd_define_start_stop): Define.
3170 (alpha_vms_bfd_define_start_stop): Define.
3171 * xsym.c (bfd_sym_bfd_define_start_stop): Define.
3172 * bfd-in2.h: Regenerate.
3173 * libbfd.h: Regenerate.
3175 2017-06-16 Jiong Wang <jiong.wang@arm.com>
3177 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use
3178 SYMBOL_REFERENCES_LOCAL.
3180 2017-06-15 Jiong Wang <jiong.wang@arm.com>
3183 * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
3184 (elfNN_aarch64_final_link_relocate): Also propagate relocations to
3185 runtime for if there needs copy relocation elimination.
3186 (need_copy_relocation_p): New function. Return true for symbol with
3187 pc-relative references and if it's against read-only sections.
3188 (elfNN_aarch64_adjust_dynamic_symbol): Use need_copy_relocation_p.
3189 (elfNN_aarch64_check_relocs): Allocate dynrelocs for relocation types
3190 that are related with accessing external objects.
3191 (elfNN_aarch64_gc_sweep_hook): Sync the relocation types with the change
3192 in elfNN_aarch64_check_relocs.
3194 2017-06-15 Nick Clifton <nickc@redhat.com>
3197 * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
3200 (ieee_archive_p): Likewise.
3202 2017-06-15 Nick Clifton <nickc@redhat.com>
3205 * vms-alpha.c (_bfd_vms_slurp_etir): Extend check of cmd_length.
3207 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
3209 * elf32-xtensa.c (elf_xtensa_be_plt_entry,
3210 elf_xtensa_le_plt_entry): Add dimension for the ABI to arrays,
3211 keep both windowed and call0 ABI PLT definitions.
3212 (elf_xtensa_create_plt_entry): Use selected ABI to choose upper
3213 elf_xtensa_*_plt_entry endex.
3214 (ELF_MAXPAGESIZE): Fix at minimal supported MMU page size.
3216 2017-06-14 Nick Clifton <nickc@redhat.com>
3219 * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid
3222 2017-06-14 Nick Clifton <nickc@redhat.com>
3225 * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the
3226 maximum value for the ascic pointer. Check that name processing
3227 does not read beyond this value.
3228 (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the
3231 2017-06-14 Nick Clifton <nickc@redhat.com>
3234 * versados.c (versados_mkobject): Zero the allocated tdata structure.
3235 (process_otr): Check for an invalid offset in the otr structure.
3237 2017-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
3239 * config.bfd (epiphany-*-elf): Accept epiphany-*-*.
3241 2017-06-13 H.J. Lu <hongjiu.lu@intel.com>
3247 * elf-bfd.h (elf_link_hash_entry): Add start_stop. Change the
3248 vtable field to a union.
3249 (_bfd_elf_is_start_stop): Removed.
3250 * elf32-i386.c (elf_i386_convert_load_reloc): Also check for
3251 __start_SECNAME and __stop_SECNAME symbols.
3252 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
3253 * elflink.c (_bfd_elf_is_start_stop): Removed.
3254 (_bfd_elf_gc_mark_rsec): Check start_stop instead of calling
3255 _bfd_elf_is_start_stop.
3256 (elf_gc_propagate_vtable_entries_used): Skip __start_SECNAME and
3257 __stop_SECNAME symbols. Updated.
3258 (elf_gc_smash_unused_vtentry_relocs): Likewise.
3259 (bfd_elf_gc_record_vtinherit): Likewise.
3260 (bfd_elf_gc_record_vtentry): Likewise.
3262 2017-06-13 Nick Clifton <nickc@redhat.com>
3265 * elflink.c (elf_link_adjust_relocs): Generate an error when
3266 encountering a reloc against a symbol removed by garbage
3269 2017-06-12 H.J. Lu <hongjiu.lu@intel.com>
3271 * elf-bfd.h (elf_backend_data): Add struct bfd_link_info *
3272 to merge_gnu_properties.
3273 * elf-properties.c (elf_merge_gnu_properties): Add struct
3274 bfd_link_info * and pass it to merge_gnu_properties.
3275 (elf_merge_gnu_property_list): Add struct bfd_link_info *
3276 and pass it to elf_merge_gnu_properties.
3277 (_bfd_elf_link_setup_gnu_properties): Pass info to
3278 elf_merge_gnu_property_list.
3279 * elf32-i386.c (elf_i386_merge_gnu_properties): Add struct
3281 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): Likewise.
3283 2017-06-11 Joe Zbiciak <joe.zbiciak@leftturnonly.info>
3286 * binary.c (binary_set_section_contents): Scale lma by octets
3287 per byte to set filepos.
3289 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3291 * elf32-arc.c (elf_arc_check_relocs): Fixed conditions to generate
3294 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3296 * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to
3299 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3301 * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to
3302 patched section contents for TLS IE reloc.
3303 * elf32-arc.c: Remove TCB_SIZE preprocessor macro.
3305 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3307 * elf32-arc.c (elf_arc_relocate_section): Added "call" to
3308 RELOC_FOR_GLOBAL_SYMBOL macro.
3310 2018-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3312 * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
3315 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3317 * config/tc-arc.c (md_undefined_symbol): Changed.
3318 * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed.
3320 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3322 * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
3325 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3327 * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
3328 warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
3330 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3332 * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
3335 2017-06-08 Richard Earnshaw <rearnsha@arm.com>
3337 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
3338 that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
3339 is non-zero. Add clarifying comments.
3341 2017-06-08 H.J. Lu <hongjiu.lu@intel.com>
3343 * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
3344 name. Use local IFUNC symbol name string to report unsupported
3345 non-PIC call to IFUNC function.
3346 (elf_i386_relocate_section): Dump local IFUNC name with minfo
3347 when generating R_386_IRELATIVE relocation.
3348 (elf_i386_finish_dynamic_symbol): Likewise.
3349 * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
3351 (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
3352 when generating R_X86_64_IRELATIVE relocation.
3353 (elf_x86_64_finish_dynamic_symbol): Likewise.
3355 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
3357 * elf.c (setup_group): Make sure BFD sections are created for all
3358 group sections in the input file when processing SHF_GROUP
3360 (bfd_section_from_shdr): Avoid duplicating logic already
3361 implemented in `setup_group'.
3363 2017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
3366 * peXXigen.c (pe_print_idata): Use the address of the first thunk
3367 if the hint address is zero.
3369 2017-06-06 James Clarke <jrtc27@jrtc27.com>
3372 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
3373 ELF_COMMON_DEF_P for common symbols.
3375 2017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
3377 * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
3378 SEC_GROUP sections as SEC_EXCLUDE.
3379 (bfd_elf_set_group_contents): Replace use of abort with an assert.
3380 (assign_section_numbers): Use resolve_section_groups flag instead
3381 of relocatable link type.
3382 (_bfd_elf_init_private_section_data): Use resolve_section_groups
3383 flag instead of checking the final_link flag for part of the
3384 checks in here. Fix white space as a result.
3385 * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
3386 instead of relocatable link type.
3387 (bfd_elf_final_link): Likewise.
3389 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
3391 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
3393 * elf32-score.c (score_elf_final_link_relocate): Likewise.
3394 (s3_bfd_score_elf_check_relocs): Likewise.
3395 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
3396 (score_elf_final_link_relocate): Likewise.
3397 (s7_bfd_score_elf_check_relocs): Likewise.
3399 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
3401 * elflink.c (init_reloc_cookie_rels): Remove unused variable
3404 2017-06-06 Maciej W. Rozycki <macro@imgtec.com>
3406 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
3407 from `reloc_count' rather than decrementing it.
3408 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
3409 `reloc_count' by `int_rels_per_ext_rel'.
3410 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
3411 `reloc_count' by `int_rels_per_ext_rel' for last relocation
3412 entry determination.
3413 (s3_bfd_score_elf_check_relocs): Likewise.
3414 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
3415 (s7_bfd_score_elf_relocate_section): Likewise.
3416 (s7_bfd_score_elf_check_relocs): Likewise.
3417 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
3418 prototype and function.
3419 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
3420 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
3421 triple rather than once the sum of REL and RELA relocation entry
3423 (bfd_elf64_get_reloc_upper_bound): Remove macro.
3424 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
3425 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
3426 storage allocation size determination.
3427 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
3428 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
3429 by `int_rels_per_ext_rel' for last relocation entry
3431 (bfd_elf_final_link): Do not multiply `reloc_count' by
3432 `int_rels_per_ext_rel' for internal relocation storage
3433 allocation size determination.
3434 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
3435 `int_rels_per_ext_rel' for last relocation entry determination.
3436 (elf_gc_smash_unused_vtentry_relocs): Likewise.
3437 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
3438 (_bfd_mips_elf_relocate_section): Likewise.
3440 2017-06-05 Alan Modra <amodra@gmail.com>
3443 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
3445 2017-06-01 John Baldwin <jhb@FreeBSD.org>
3447 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
3448 determine structure sizes.
3449 (elfcore_grok_freebsd_prstatus): Likewise.
3451 2017-06-01 Alan Modra <amodra@gmail.com>
3453 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
3454 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
3456 (is_elfv2_localentry0): New function.
3457 (ppc64_elf_tls_setup): Default params->plt_localentry0.
3458 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
3459 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
3460 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
3461 optimized localentry:0 stubs.
3462 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
3463 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
3465 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
3467 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
3469 2017-05-30 Casey Smith <clegg89@gmail.com>
3472 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
3473 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
3475 2017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
3477 * cpu-arc.c (arc_compatible): New function.
3479 2017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
3481 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
3483 2017-05-30 H.J. Lu <hongjiu.lu@intel.com>
3486 * bfdio.c (bfd_get_file_size): New function.
3487 * bfd-in2.h: Regenerated.
3489 2017-05-23 Dilian Palauzov <git-dpa@aegee.org>
3491 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
3494 2017-05-22 H.J. Lu <hongjiu.lu@intel.com>
3496 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
3497 dynobj instead of htab->elf.dynobj.
3499 2017-05-19 Maciej W. Rozycki <macro@imgtec.com>
3501 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
3503 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
3504 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
3505 actual number of internal relocations retrieved. Adjust
3506 function description.
3507 (bfd_elf64_canonicalize_reloc): Remove macro.
3508 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
3510 2017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
3512 * archures.c (bfd_mach_sparc_v9m8): Define.
3513 (bfd_mach_sparc_v8plusm8): Likewise.
3514 (bfd_mach_sparc_v9_p): Adjust to M8.
3515 (bfd_mach_sparc_64bit_p): Likewise.
3516 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
3517 bfd_mach_sparc_v8plusm8.
3518 * bfd-in2.h: Regenerated.
3519 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
3521 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
3522 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
3523 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
3525 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
3526 bfd_mach_sparc_v8plusm8.
3528 2017-05-19 Alan Modra <amodra@gmail.com>
3530 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
3531 debug and special sections when no non-note alloc sections in an
3534 2017-05-18 Alan Modra <amodra@gmail.com>
3536 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
3537 * elf-m10300.c: Likewise.
3539 * elf32-arc.c: Likewise.
3540 * elf32-bfin.c: Likewise.
3541 * elf32-m68k.c: Likewise.
3542 * elf32-nds32.c: Likewise.
3543 * elf32-tilepro.c: Likewise.
3544 * elflink.c: Likewise.
3545 * elfnn-aarch64.c: Likewise.
3546 * elfnn-riscv.c: Likewise.
3547 * elfxx-tilegx.c: Likewise.
3548 * mach-o.c: Likewise.
3549 * peXXigen.c: Likewise.
3550 * vms-alpha.c: Likewise.
3551 * vms-lib.c: Likewise.
3553 2017-05-17 H.J. Lu <hongjiu.lu@intel.com>
3556 * elflink.c (elf_gc_mark_debug_section): New function.
3557 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
3558 referenced by kept debug sections.
3560 2017-05-16 Alan Modra <amodra@gmail.com>
3562 * elf-m10300.c: Rename occurrences of non_ir_ref.
3563 * elf32-arm.c: Likewise.
3564 * elf32-bfin.c: Likewise.
3565 * elf32-cr16.c: Likewise.
3566 * elf32-cris.c: Likewise.
3567 * elf32-d10v.c: Likewise.
3568 * elf32-dlx.c: Likewise.
3569 * elf32-fr30.c: Likewise.
3570 * elf32-frv.c: Likewise.
3571 * elf32-hppa.c: Likewise.
3572 * elf32-i370.c: Likewise.
3573 * elf32-i386.c: Likewise.
3574 * elf32-iq2000.c: Likewise.
3575 * elf32-lm32.c: Likewise.
3576 * elf32-m32c.c: Likewise.
3577 * elf32-m32r.c: Likewise.
3578 * elf32-m68hc1x.c: Likewise.
3579 * elf32-m68k.c: Likewise.
3580 * elf32-mcore.c: Likewise.
3581 * elf32-metag.c: Likewise.
3582 * elf32-microblaze.c: Likewise.
3583 * elf32-moxie.c: Likewise.
3584 * elf32-msp430.c: Likewise.
3585 * elf32-mt.c: Likewise.
3586 * elf32-nios2.c: Likewise.
3587 * elf32-or1k.c: Likewise.
3588 * elf32-ppc.c: Likewise.
3589 * elf32-rl78.c: Likewise.
3590 * elf32-s390.c: Likewise.
3591 * elf32-score.c: Likewise.
3592 * elf32-score7.c: Likewise.
3593 * elf32-sh.c: Likewise.
3594 * elf32-tic6x.c: Likewise.
3595 * elf32-tilepro.c: Likewise.
3596 * elf32-v850.c: Likewise.
3597 * elf32-vax.c: Likewise.
3598 * elf32-xstormy16.c: Likewise.
3599 * elf32-xtensa.c: Likewise.
3600 * elf64-alpha.c: Likewise.
3601 * elf64-hppa.c: Likewise.
3602 * elf64-ia64-vms.c: Likewise.
3603 * elf64-mmix.c: Likewise.
3604 * elf64-ppc.c: Likewise.
3605 * elf64-s390.c: Likewise.
3606 * elf64-sh64.c: Likewise.
3607 * elf64-x86-64.c: Likewise.
3608 * elflink.c: Likewise.
3609 * elfnn-aarch64.c: Likewise.
3610 * elfnn-ia64.c: Likewise.
3611 * elfnn-riscv.c: Likewise.
3612 * elfxx-mips.c: Likewise.
3613 * elfxx-sparc.c: Likewise.
3614 * elfxx-tilegx.c: Likewise.
3615 * linker.c: Likewise.
3617 2017-05-16 Alan Modra <amodra@gmail.com>
3619 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
3620 * elflink.c (elf_link_add_object_symbols): Update to use
3622 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
3624 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
3626 2017-05-15 Maciej W. Rozycki <macro@imgtec.com>
3628 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
3630 2017-05-12 H.J. Lu <hongjiu.lu@intel.com>
3632 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
3633 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
3635 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
3637 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
3639 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
3641 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
3642 to plt_second/plt_second_eh_frame.
3643 (elf_x86_64_link_hash_newfunc): Updated.
3644 (elf_x86_64_allocate_dynrelocs): Likewise.
3645 (elf_x86_64_size_dynamic_sections): Likewise.
3646 (elf_x86_64_relocate_section): Likewise.
3647 (elf_x86_64_finish_dynamic_symbol): Likewise.
3648 (elf_x86_64_finish_dynamic_sections): Likewise.
3649 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
3650 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
3652 (elf_backend_setup_gnu_properties): Updated. Create the
3653 .plt.sec section instead of the .plt.sec section.
3655 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
3657 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
3658 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
3659 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
3661 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
3663 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
3664 (bfd_elf64_set_reloc): Define.
3665 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
3667 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
3669 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
3670 (struct bfd_target): New field _bfd_set_reloc.
3671 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
3672 * reloc.c (_bfd_generic_set_reloc): New function.
3673 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
3674 * nlm-target.h (nlm_set_reloc): Likewise.
3675 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
3676 * aout-tic30.c (MY_set_reloc): Likewise.
3677 * aout-target.h (MY_set_reloc): Likewise.
3678 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
3679 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
3680 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
3681 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
3682 * aout-adobe.c (aout_32_set_reloc): Likewise.
3683 * bout.c (b_out_set_reloc): Likewise.
3684 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
3685 * i386os9k.c (aout_32_set_reloc): Likewise.
3686 * ieee.c (ieee_set_reloc): Likewise.
3687 * oasys.c (oasys_set_reloc): Likewise.
3688 * som.c (som_set_reloc): Likewise.
3689 * versados.c (versados_set_reloc): Likewise.
3690 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
3691 _bfd_generic_set_reloc.
3692 (rs6000_xcoff64_aix_vec): LIkewise.
3693 * libbfd.c (_bfd_norelocs_set_reloc): New function.
3694 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
3695 * i386msdos.c (msdos_set_reloc): Define to
3696 _bfd_norelocs_set_reloc.
3697 * elfcode.h (elf_set_reloc): Define.
3698 * bfd-in2.h: Regenerated.
3700 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
3703 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
3704 for IFUNC function address.
3706 2017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
3708 * elf32-arc.c (FEATURE_LIST_NAME): Define.
3709 (CONFLICT_LIST): Likewise.
3710 (opcode/arc-attrs.h): Include.
3711 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
3712 (arc_extract_features): New file.
3713 (arc_stralloc): Likewise.
3714 (arc_elf_merge_attributes): Likewise.
3715 (arc_elf_merge_private_bfd_data): Use object attributes.
3716 (bfd_arc_get_mach_from_attributes): New function.
3717 (arc_elf_object_p): Use object attributes.
3718 (arc_elf_final_write_processing): Likewise.
3719 (elf32_arc_obj_attrs_arg_type): New function.
3720 (elf32_arc_obj_attrs_handle_unknown): Likewise.
3721 (elf32_arc_section_from_shdr): Likewise.
3722 (elf_backend_obj_attrs_vendor): Define.
3723 (elf_backend_obj_attrs_section): Likewise.
3724 (elf_backend_obj_attrs_arg_type): Likewise.
3725 (elf_backend_obj_attrs_section_type): Likewise.
3726 (elf_backend_obj_attrs_handle_unknown): Likewise.
3727 (elf_backend_section_from_shdr): Likewise.
3729 2017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
3732 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
3733 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
3734 and the destination is a Thumb symbol.
3736 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
3738 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
3739 initializer to silence GCC 4.2.
3740 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
3742 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
3744 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
3745 (LAZY_PLT_ENTRY_SIZE): This.
3746 (NON_LAZY_PLT_ENTRY_SIZE): New.
3747 (elf_x86_64_plt0_entry): Renamed to ...
3748 (elf_x86_64_lazy_plt0_entry): This.
3749 (elf_x86_64_plt_entry): Renamed to ...
3750 (elf_x86_64_lazy_plt_entry): This.
3751 (elf_x86_64_bnd_plt0_entry): Renamed to ...
3752 (elf_x86_64_lazy_bnd_plt0_entry): This.
3753 (elf_x86_64_legacy_plt_entry): Removed.
3754 (elf_x86_64_bnd_plt_entry): Renamed to ...
3755 (elf_x86_64_lazy_bnd_plt_entry): This.
3756 (elf_x86_64_legacy_plt2_entry): Renamed to ...
3757 (elf_x86_64_non_lazy_plt_entry): This.
3758 (elf_x86_64_bnd_plt2_entry): Renamed to ...
3759 (elf_x86_64_non_lazy_bnd_plt_entry): This.
3760 (elf_x86_64_eh_frame_plt): Renamed to ...
3761 (elf_x86_64_eh_frame_lazy_plt): This.
3762 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
3763 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
3764 (elf_x86_64_eh_frame_plt_got): Renamed to ...
3765 (elf_x86_64_eh_frame_non_lazy_plt): This.
3766 (elf_x86_64_lazy_plt_layout): New.
3767 (elf_x86_64_non_lazy_plt_layout): Likewise.
3768 (elf_x86_64_plt_layout): Likewise.
3769 (elf_x86_64_backend_data): Remove PLT layout information. Add
3770 os for target system.
3771 (GET_PLT_ENTRY_SIZE): Removed.
3772 (elf_x86_64_lazy_plt): New.
3773 (elf_x86_64_non_lazy_plt): Likewise.
3774 (elf_x86_64_lazy_bnd_plt): Likewise.
3775 (elf_x86_64_non_lazy_bnd_plt): Likewise.
3776 (elf_x86-64_arch_bed): Updated.
3777 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
3778 (elf_x86_64_create_dynamic_sections): Removed.
3779 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
3780 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
3781 (elf_x86-64_adjust_dynamic_symbol): Updated.
3782 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
3783 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
3784 size for PLT0 if there is no PLT0. Get plt_entry_size from
3785 non_lazy_plt for non-lazy PLT entries.
3786 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
3787 from non_lazy_plt for non-lazy PLT entries.
3788 (elf_x86-64_relocate_section): Updated. Properly get PLT index
3789 if there is no PLT0.
3790 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
3791 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
3792 entries with non-lazy PLT layout. Don't fill the second and third
3793 slots in the PLT entry if there is no PLT0.
3794 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
3795 if there is no PLT0. Set sh_entsize on the .plt.got section.
3796 (compare_relocs): New.
3797 (elf_x86_64_plt_type): Likewise.
3798 (elf_x86_64_plt): Likewise.
3799 (elf_x86_64_nacl_plt): New. Forward declaration.
3800 (elf_x86_64_get_plt_sym_val): Removed.
3801 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
3802 against all dynamic relocations.
3803 (elf_x86_64_link_setup_gnu_properties): New function.
3804 (elf_backend_create_dynamic_sections): Updated.
3805 (elf_backend_setup_gnu_properties): New.
3806 (elf_x86_64_nacl_plt): New.
3807 (elf_x86_64_nacl_arch_bed): Updated.
3809 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
3811 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
3812 (LAZY_PLT_ENTRY_SIZE): This.
3813 (NON_LAZY_PLT_ENTRY_SIZE): New.
3814 (elf_i386_plt0_entry): Renamed to ...
3815 (elf_i386_lazy_plt0_entry): This.
3816 (elf_i386_plt_entry): Renamed to ...
3817 (elf_i386_lazy_plt_entry): This.
3818 (elf_i386_pic_plt0_entry): Renamed to ...
3819 (elf_i386_pic_lazy_plt0_entry): This.
3820 (elf_i386_pic_plt_entry): Renamed to ...
3821 (elf_i386_pic_lazy_plt_entry): This.
3822 (elf_i386_got_plt_entry): Renamed to ...
3823 (elf_i386_non_lazy_plt_entry): This.
3824 (elf_i386_pic_got_plt_entry): Renamed to ...
3825 (elf_i386_pic_non_lazy_plt_entry): This.
3826 (elf_i386_eh_frame_plt): Renamed to ...
3827 (elf_i386_eh_frame_lazy_plt): This.
3828 (elf_i386_eh_frame_plt_got): Renamed to ...
3829 (elf_i386_eh_frame_non_lazy_plt): This.
3830 (elf_i386_plt_layout): Renamed to ...
3831 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
3832 eh_frame_plt_got_size.
3833 (elf_i386_non_lazy_plt_layout): New.
3834 (elf_i386_plt_layout): Likewise.
3835 (elf_i386_non_lazy_plt): Likewise.
3836 (GET_PLT_ENTRY_SIZE): Removed.
3837 (elf_i386_plt): Renamed to ...
3838 (elf_i386_lazy_plt): This.
3839 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
3840 (elf_i386_arch_bed): Updated.
3841 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
3842 (elf_i386_create_dynamic_sections): Removed.
3843 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
3844 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
3845 (elf_i386_adjust_dynamic_symbol): Updated.
3846 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
3847 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
3848 size for PLT0 if there is no PLT0.
3849 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
3850 output section is discarded only if GOT isn't empty.
3851 (elf_i386_relocate_section): Updated. Properly get PLT index
3852 if there is no PLT0.
3853 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
3854 second and third slots in the PLT entry if there is no PLT0.
3855 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
3856 if there is no PLT0. Set sh_entsize on the .plt.got section.
3857 (elf_i386_nacl_plt): Forward declaration.
3858 (elf_i386_get_plt_sym_val): Removed.
3859 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
3860 against all dynamic relocations.
3861 (elf_i386_link_setup_gnu_properties): New function.
3862 (elf_backend_create_dynamic_sections): Updated.
3863 (elf_backend_setup_gnu_properties): New.
3864 (elf_i386_nacl_plt): Updated.
3865 (elf_i386_nacl_arch_bed): Likewise.
3866 (elf_i386_vxworks_arch_bed): Likewise.
3868 2017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
3870 * elflink.c (elf_output_implib): Remove executable flag from import
3872 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
3873 library is a relocatable object file.
3875 2017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
3878 * elf32-avr.c (avr_should_move_sym): New function.
3879 (avr_should_reduce_sym_size): Likewise.
3880 (avr_should_increase_sym_size): Likewise.
3881 (elf32_avr_relax_delete_bytes): Adjust symbol values
3882 and sizes by calling new functions.
3884 2017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
3886 * config.bfd (riscv32-*): Enable rv64.
3888 2017-05-02 Alan Modra <amodra@gmail.com>
3891 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
3892 rather than h->root.type == bfd_link_hash_new.
3893 (bfd_elf_record_link_assignment): Similarly, call
3894 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
3896 2017-04-29 Alan Modra <amodra@gmail.com>
3899 * reloc.c (reloc_offset_in_range): New function.
3900 (bfd_perform_relocation, bfd_install_relocation): Use it.
3901 (_bfd_final_link_relocate): Likewise.
3903 2017-04-28 H.J. Lu <hongjiu.lu@intel.com>
3905 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
3906 before using .plt.got.
3907 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
3909 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3911 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
3912 instead of "+=" to update 0.
3914 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3916 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
3917 .plt.got section here.
3918 (elf_i386_check_relocs): Don't create the .plt.got section.
3919 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
3920 the .plt.got and .plt.bnd sections here.
3921 (elf_x86_64_check_relocs): Don't create the .plt.got nor
3924 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3926 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
3928 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
3929 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
3930 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
3931 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
3934 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3936 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
3938 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
3939 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
3940 the first relocatable ELF input with GNU properties.
3942 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3944 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
3945 VxWorks for non-PIC.
3947 2017-04-27 Alan Modra <amodra@gmail.com>
3949 * elf-bfd.h (struct elf_backend_data): Make asection param of
3950 elf_backend_eh_frame_address_size const.
3951 (_bfd_elf_eh_frame_address_size): Likewise.
3952 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
3953 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
3954 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
3955 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
3956 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
3957 (next_cie_fde_offset): Constify params.
3958 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
3960 2017-04-27 Alan Modra <amodra@gmail.com>
3962 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
3963 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
3964 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
3966 (offset_adjust): New function.
3967 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
3968 (adjust_eh_frame_local_symbols): Likewise.
3969 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
3970 after changing anything. Return true if anything changed.
3971 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
3972 _bfd_elf_adjust_eh_frame_global_symbol for globals.
3974 2017-04-27 Alan Modra <amodra@gmail.com>
3976 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
3979 2017-04-27 Alan Modra <amodra@gmail.com>
3981 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
3982 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
3983 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
3984 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
3985 for undef and undefweak dyn_relocs.
3986 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
3987 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
3988 (allocate_got, allocate_dynrelocs): Likewise.
3989 (ppc64_elf_relocate_section): Likewise.
3991 2017-04-26 H.J. Lu <hongjiu.lu@intel.com>
3993 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
3994 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
3995 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
3996 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
3998 2017-04-26 Nick Clifton <nickc@redhat.com>
4001 * reloc.c (bfd_perform_relocation): Check for a negative address
4004 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
4007 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
4009 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
4010 (elf_backend_always_renumber_dynsyms): Define.
4011 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
4012 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
4013 * elflink.c (bfd_elf_size_dynamic_sections): Also call
4014 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
4016 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
4018 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
4020 * elflink.c (bfd_elf_size_dynamic_sections): Only call
4021 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
4022 sections have been created.
4024 2017-04-26 Nick Clifton <nickc@redhat.com>
4027 * compress.c (bfd_init_section_compress_status): Check the return
4028 value from bfd_malloc.
4030 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
4032 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
4033 no_finish_dynamic_symbol.
4034 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
4036 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
4037 weak symbol, don't make it dynamic.
4038 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
4039 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
4040 relocation for GOT reference.
4041 (elf_x86_64_finish_dynamic_symbol): Abort if
4042 no_finish_dynamic_symbol isn't 0.
4044 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
4047 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
4048 undefined weak symbol, don't make it dynamic.
4049 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
4050 set no_finish_dynamic_symbol and generate R_386_RELATIVE
4051 relocation for R_386_GOT32.
4053 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
4056 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
4058 2017-04-23 Alan Modra <amodra@gmail.com>
4061 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
4062 * elf.c (lcomm_sym): New.
4063 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
4064 * bfd-in2.h: Regenerate.
4066 2017-04-23 Alan Modra <amodra@gmail.com>
4069 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
4070 parameters and comment.
4071 (_bfd_elf_get_reloc_section): Delete.
4072 (_bfd_elf_plt_get_reloc_section): Declare.
4073 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
4074 New functions. Don't blindly skip over assumed .rel/.rela prefix.
4076 (_bfd_elf_get_reloc_section): ..here. Delete.
4077 (assign_section_numbers): Call elf_get_reloc_section.
4078 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
4079 * elfxx-target.h (elf_backend_get_reloc_section): Update.
4081 2017-04-23 Alan Modra <amodra@gmail.com>
4084 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
4087 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
4090 * elf32-i386.c (elf_i386_link_hash_entry): Add
4091 no_finish_dynamic_symbol.
4092 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
4093 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
4094 symbol, don't make it dynamic in PIE.
4095 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
4096 set no_finish_dynamic_symbol and generate R_386_RELATIVE
4097 relocation for R_386_GOT32
4098 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
4101 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
4105 * elflink.c (elf_link_add_object_symbols): Require
4106 --no-dynamic-linker with -E/--dynamic-list when creating
4109 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
4111 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
4114 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
4116 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
4117 dynamic symbol sorting.
4119 2017-04-20 H.J. Lu <hongjiu.lu@intel.com>
4122 * elflink.c (elf_link_add_object_symbols): Preserve
4123 dynamic_ref_after_ir_def when restoring the symbol table for
4124 unneeded dynamic object.
4126 2017-04-19 H.J. Lu <hongjiu.lu@intel.com>
4129 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
4130 on on undefined IFUNC symbol in the second PLT.
4132 2017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
4134 * peXXigen.c (pe_print_reloc): Correct chunk_end.
4136 2017-04-19 Alan Modra <amodra@gmail.com>
4138 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
4139 or make dynamic for info->dynamic_undefined_weak 0 and 1.
4140 * elf32-ppc.c:Formatting.
4141 (ensure_undefweak_dynamic): Don't make dynamic when
4142 info->dynamic_undefined_weak is zero.
4143 (allocate_dynrelocs): Discard undefweak dyn_relocs for
4144 info->dynamic_undefined_weak. Discard undef dyn_relocs when
4145 not default visibility. Discard undef and undefweak
4147 (ppc_elf_relocate_section): Adjust to suit.
4148 * elf64-ppc.c: Formatting.
4149 (ensure_undefweak_dynamic): Don't make dynamic when
4150 info->dynamic_undefined_weak is zero.
4151 (allocate_dynrelocs): Discard undefweak dyn_relocs for
4152 info->dynamic_undefined_weak. Discard them earlier.
4154 2017-04-17 H.J. Lu <hongjiu.lu@intel.com>
4157 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
4158 before generating the version definition section.
4160 2017-04-17 Alan Modra <amodra@gmail.com>
4162 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
4163 state when a regular object file defines a symbol with
4164 incompatible type to that defined by an earlier shared lib.
4166 2017-04-13 Alan Modra <amodra@gmail.com>
4168 * coffcode.h: Wrap some overly long _bfd_error_handler args.
4170 * elf32-arm.c: Likewise.
4171 * elf32-i386.c: Likewise.
4172 * elf32-mep.c: Likewise.
4173 * elf64-ia64-vms.c: Likewise.
4174 * elf64-x86-64.c: Likewise.
4175 * elflink.c: Likewise.
4176 * elfnn-ia64.c: Likewise.
4177 * elfxx-mips.c: Likewise.
4179 2017-04-13 Alan Modra <amodra@gmail.com>
4181 * aoutx.h: Use %B and %A in error messages throughout file.
4182 * aout-cris.c: Likewise.
4183 * archive.c: Likewise.
4184 * binary.c: Likewise.
4185 * coff-rs6000.c: Likewise.
4186 * coff-tic4x.c: Likewise.
4187 * coffcode.h: Likewise.
4188 * coffgen.c: Likewise.
4189 * cofflink.c: Likewise.
4190 * coffswap.h: Likewise.
4191 * cpu-arm.c: Likewise.
4192 * elf-eh-frame.c: Likewise.
4193 * elf-m10300.c: Likewise.
4195 * elf32-arc.c: Likewise.
4196 * elf32-arm.c: Likewise.
4197 * elf32-bfin.c: Likewise.
4198 * elf32-frv.c: Likewise.
4199 * elf32-iq2000.c: Likewise.
4200 * elf32-m32c.c: Likewise.
4201 * elf32-microblaze.c: Likewise.
4202 * elf32-nds32.c: Likewise.
4203 * elf32-rl78.c: Likewise.
4204 * elf32-rx.c: Likewise.
4205 * elf32-score.c: Likewise.
4206 * elf32-score7.c: Likewise.
4207 * elf32-sh64.c: Likewise.
4208 * elf32-v850.c: Likewise.
4209 * elf32-vax.c: Likewise.
4210 * elf32-visium.c: Likewise.
4211 * elf64-ia64-vms.c: Likewise.
4212 * elf64-mmix.c: Likewise.
4213 * elf64-sh64.c: Likewise.
4214 * elfcode.h: Likewise.
4215 * elfnn-aarch64.c: Likewise.
4216 * elfnn-ia64.c: Likewise.
4217 * elfxx-mips.c: Likewise.
4218 * hpux-core.c: Likewise.
4221 * linker.c: Likewise.
4222 * merge.c: Likewise.
4224 * oasys.c: Likewise.
4225 * pdp11.c: Likewise.
4226 * peXXigen.c: Likewise.
4227 * rs6000-core.c: Likewise.
4228 * vms-alpha.c: Likewise.
4229 * xcofflink.c: Likewise.
4231 2017-04-13 Alan Modra <amodra@gmail.com>
4233 * bfd.c (PRINT_TYPE): Define.
4234 (_doprnt): New function.
4235 (error_handler_internal): Use _doprnt.
4236 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
4237 calls in their natural order, throughout file.
4238 * coff-mcore.c: Likewise.
4239 * coff-ppc.c: Likewise.
4240 * coff-tic80.c: Likewise.
4241 * cofflink.c: Likewise.
4242 * elf-s390-common.c: Likewise.
4244 * elf32-arm.c: Likewise.
4245 * elf32-i386.c: Likewise.
4246 * elf32-m32r.c: Likewise.
4247 * elf32-msp430.c: Likewise.
4248 * elf32-spu.c: Likewise.
4249 * elf64-ia64-vms.c: Likewise.
4250 * elf64-sparc.c: Likewise.
4251 * elf64-x86-64.c: Likewise.
4252 * elflink.c: Likewise.
4253 * elfnn-aarch64.c: Likewise.
4254 * elfnn-ia64.c: Likewise.
4255 * elfxx-mips.c: Likewise.
4257 2017-04-13 Alan Modra <amodra@gmail.com>
4259 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
4260 branch veneers" error. Fix double space and format message.
4261 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
4262 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
4264 2017-04-13 Alan Modra <amodra@gmail.com>
4266 * bfd-in2.h: Regenerate.
4268 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
4270 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
4271 extra `\n' in warning/error messages.
4272 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
4273 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
4275 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
4277 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
4278 processor-specific properties with generic ELF target vector.
4280 2017-04-10 Qing Zhao <qing.zhao@oracle.com>
4282 * elf32-sparc.c (elf_backend_fixup_symbol): New.
4283 * elf64-sparc.c (elf_backend_fixup_symbol): New.
4284 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
4285 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
4287 (link_hash_newfunc): Initialize has_got_reloc and
4289 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
4291 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
4293 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
4295 (_bfd_sparc_elf_fixup_symbol): New function.
4296 (allocate_dynrelocs): Don't allocate space for dynamic
4297 relocations and discard relocations against resolved undefined
4298 weak symbols in executable. Don't make resolved undefined weak
4299 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
4300 relocation against undefined weak symbols in PIE.
4301 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
4302 relocations against resolved undefined weak symbols in PIE
4303 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
4304 without ynamic PLT/GOT relocations for resolved undefined weak
4306 Don't generate dynamic relocation against resolved undefined
4307 weak symbol in executable.
4308 (pie_finish_undefweak_symbol): New function.
4309 (_bfd_sparc_elf_finish_dynamic_sections): Call
4310 pie_finish_undefweak_symbol on all symbols in PIE.
4311 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
4312 (_bfd_sparc_elf_fixup_symbol): New function.
4314 2017-04-10 Nick Clifton <nickc@redhat.com>
4316 * config.bfd: Remove ns32k from obsolete list.
4318 2017-04-10 Alan Modra <amodra@gmail.com>
4321 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
4322 (special_sections_i): Likewise for .init_array.
4323 (special_sections_p): Likewise for .preinit_array.
4325 2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
4329 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
4330 ELF_COMMON_DEF_P for common symbols.
4331 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
4332 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
4333 * elflink.c (_bfd_elf_merge_symbol): Revert commits
4334 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
4335 07492f668d2173da7a2bda3707ff0985e0f460b6.
4337 2017-04-07 Pedro Alves <palves@redhat.com>
4339 * opncls.c (bfd_get_debug_link_info): Rename to...
4340 (bfd_get_debug_link_info_1): ... this. Change type of second
4341 parameter to void pointer. Adjust.
4342 (bfd_get_debug_link_info): Reimplement on top of
4343 bfd_get_debug_link_info_1.
4344 (separate_debug_file_exists, separate_alt_debug_file_exists):
4345 Change type of second parameter to void pointer. Adjust.
4346 (get_func_type, check_func_type): Change type of second parameter
4348 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
4349 the callback functions instead of passing the address of a local.
4350 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
4351 find_separate_debug_file.
4352 (get_alt_debug_link_info_shim): Change type of second parameter to
4353 void pointer. Adjust.
4354 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
4355 find_separate_debug_file.
4356 (get_build_id_name, bfd_boolean check_build_id_file): Change type
4357 of second parameter to void pointer. Adjust.
4358 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
4359 pointer local to find_separate_debug_file.
4361 2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
4363 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
4364 external symbols with a definition.
4365 (_bfd_coff_gc_mark_extra_sections): Fix typo.
4367 2017-04-07 Alan Modra <amodra@gmail.com>
4369 * po/SRC-POTFILES.in: Regenerate.
4371 2017-04-05 Alan Modra <amodra@gmail.com>
4373 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
4376 2017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
4378 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
4379 numbers for DataDirectory entry indicies passed to
4382 2017-04-04 H.J. Lu <hongjiu.lu@intel.com>
4384 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
4385 each GNU_MBIND section and align GNU_MBIND section to page size.
4386 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
4387 segment for each GNU_MBIND section.
4388 (_bfd_elf_init_private_section_data): Copy sh_info from input
4389 for GNU_MBIND section.
4391 2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
4393 * elfnn-riscv.c (GP_NAME): Delete.
4394 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
4395 (_bfd_riscv_relax_lui): Likewise.
4397 2017-04-04 Nick Clifton <nickc@redhat.com>
4400 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
4402 (bfd_elf_final_link): Only initialize the extended symbol index
4403 section if there are extended symbol tables to list.
4405 2017-04-03 H.J. Lu <hongjiu.lu@intel.com>
4407 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
4408 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
4409 * configure.ac (elf): Add elf-properties.lo.
4410 * Makefile.in: Regenerated.
4411 * configure: Likewise.
4412 * elf-bfd.h (elf_property_kind): New.
4413 (elf_property): Likewise.
4414 (elf_property_list): Likewise.
4415 (elf_properties): Likewise.
4416 (_bfd_elf_parse_gnu_properties): Likewise.
4417 (_bfd_elf_get_property): Likewise.
4418 (_bfd_elf_link_setup_gnu_properties): Likewise.
4419 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
4420 and setup_gnu_properties.
4421 (elf_obj_tdata): Add properties.
4422 * elf-properties.c: New file.
4423 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
4424 (elf_i386_merge_gnu_properties): Likewise.
4425 (elf_backend_parse_gnu_properties): Likewise.
4426 (elf_backend_merge_gnu_properties): Likewise.
4427 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
4428 (elf_x86_64_merge_gnu_properties): Likewise.
4429 (elf_backend_parse_gnu_properties): Likewise.
4430 (elf_backend_merge_gnu_properties): Likewise.
4431 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
4432 (elf_backend_parse_gnu_properties): Likewise.
4433 (elf_backend_setup_gnu_properties): Likewise.
4434 (elfNN_bed): Add elf_backend_parse_gnu_properties,
4435 elf_backend_merge_gnu_properties and
4436 elf_backend_setup_gnu_properties.
4438 2017-03-30 Pip Cet <pipcet@gmail.com>
4440 * elf32-wasm32.c: Add relocation code, two relocs.
4441 * reloc.c: Add wasm32 relocations.
4442 * libbfd.h: Regenerate.
4443 * bfd-in2.h: Regenerate.
4444 * bfd/po/bfd.pot: Regenerate.
4446 2017-03-29 Nick Clifton <nickc@redhat.com>
4449 * coff-bfd.h (struct coff_section_data): Add new fields:
4450 saved_bias and bias.
4451 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
4452 computed for PE binaries.
4453 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
4456 2017-03-28 Hans-Peter Nilsson <hp@axis.com>
4459 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
4460 to handle a local symbol with a hash-symbol-entry; without PLT.
4461 Add BFD_ASSERT for an incidental case with GOT entry present.
4462 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
4463 isn't forced-or-set local.
4465 2017-03-27 Pip Cet <pipcet@gmail.com>
4467 * wasm-module.c: New file to support WebAssembly modules.
4468 * wasm-module.h: New file to support WebAssembly modules.
4469 * doc/webassembly.texi: Start documenting wasm-module.c.
4470 * config.bfd: Add wasm_vec.
4471 * targets.c: Likewise.
4472 * configure.ac: Likewise.
4473 * Makefile.am: Add entries for wasm-module.c.
4474 * Makefile.in: Regenerate.
4475 * configure: Regenerate.
4476 * po/SRC-POTFILES.in: Regenerate.
4478 2017-03-27 Pip Cet <pipcet@gmail.com>
4480 * cpu-wasm32.c: New file to support wasm32 architecture.
4481 * elf32-wasm32.c: New file to support wasm32 architecture.
4482 * Makefile.am: Add wasm32 architecture.
4483 * archures.c: Likewise.
4484 * config.bfd: Likewise.
4485 * configure.ac: Likewise.
4486 * targets.c: Likewise.
4487 * Makefile.in: Regenerate.
4488 * bfd-in2.h: Regenerate.
4489 * configure: Regenerate.
4490 * po/SRC-POTFILES.in: Regenerate.
4492 2017-03-20 Alan Modra <amodra@gmail.com>
4495 * elf64-ppc.c (compare_symbols): Stabilize sort.
4497 2017-03-18 Alan Modra <amodra@gmail.com>
4499 * elf64-ppc.c (struct ppc_link_hash_table): Add
4500 local_ifunc_resolver and maybe_local_ifunc_resolver.
4501 (ppc_build_one_stub): Set flags on emitting dynamic
4502 relocation to ifunc.
4503 (ppc64_elf_relocate_section): Likewise.
4504 (ppc64_elf_finish_dynamic_symbol): Likewise.
4505 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
4506 local dynamic relocs to ifuncs.
4507 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
4508 local_ifunc_resolver and maybe_local_ifunc_resolver.
4509 (ppc_elf_relocate_section): Set flag on emitting dynamic
4510 relocation to ifuncs.
4511 (ppc_elf_finish_dynamic_symbol): Likewise.
4512 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
4513 dynamic relocs to ifuncs.
4515 2017-03-13 Nick Clifton <nickc@redhat.com>
4518 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
4519 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
4520 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
4521 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
4522 * bfd-in2.h: Regenerate.
4523 * libbfd.h: Regenerate.
4524 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
4526 (IS_AARCH64_TLSDESC_RELOC): Likewise.
4527 (elfNN_aarch64_howto_table): Likewise.
4528 (aarch64_tls_transition_without_check): Likewise.
4529 (aarch64_reloc_got_type): Likewise.
4530 (elfNN_aarch64_final_link_relocate): Likewise.
4531 (elfNN_aarch64_tls_relax): Likewise.
4532 (elfNN_aarch64_relocate_section): Likewise.
4533 (elfNN_aarch64_gc_sweep_hook): Likewise.
4534 (elfNN_aarch64_check_relocs): Likewise.
4535 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
4536 (_bfd_aarch64_elf_resolve_relocation): Likewise.
4538 2017-03-11 Alan Modra <amodra@gmail.com>
4540 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
4541 parameter is in fact used. Whitespace fixes.
4542 * elf64-ppc.c: Likewise.
4544 2017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
4546 * rs6000-core.c (CORE_NEW): Simplify macro when
4547 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
4549 2017-03-07 Alan Modra <amodra@gmail.com>
4553 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
4556 2017-03-05 Alan Modra <amodra@gmail.com>
4558 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
4559 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
4560 (next_cie_fde_offset): New function.
4561 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
4562 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
4563 four bytes. Align CIEs to four or eight bytes depending on
4564 per_encoding_aligned8. Align FDEs according to their encoding.
4565 Pad last FDE to output section alignment.
4566 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
4568 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
4569 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
4570 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
4572 2017-03-02 Martin Bickel <binutils@ineranves.de>
4575 * elf.c (rewrite_elf_program_header): Do not issue a warning for
4576 empty segments which have a zero filesz, but a non-zero memsz.
4578 2017-03-02 Alan Modra <amodra@gmail.com>
4580 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
4582 2017-02-28 Alan Modra <amodra@gmail.com>
4584 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
4585 (ppc64_elf_relocate_section): Likewise.
4587 2017-02-28 Alan Modra <amodra@gmail.com>
4590 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
4591 rather than elf32_nios2_hash_table or elf_hash_table.
4592 (create_got_section): Likewise.
4593 (nios2_elf32_finish_dynamic_symbol): Likewise.
4594 (nios2_elf32_adjust_dynamic_symbol): Likewise.
4595 (nios2_elf32_size_dynamic_sections): Likewise.
4596 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
4597 vars. Use htab equivalents directly instead. Don't create
4598 all dynamic sections on needing just the GOT. Use a goto
4599 rather than a fall-through with reloc test. Ensure
4600 htab->dynobj is set when making dynamic sreloc section.
4601 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
4602 equivalent directly instead. Don't segfault on looking for
4603 .dynamic when dynamic sections have not been created. Don't
4604 segfault on .got.plt being discarded.
4605 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
4606 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
4607 fixme and another not so relevant comment.
4608 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
4609 already set, set hash table dynobj on creating .sbss.
4611 2017-02-28 Alan Modra <amodra@gmail.com>
4613 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
4614 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
4615 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
4616 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
4617 (ppc64_elf_relocate_section): Likewise.
4618 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
4619 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
4620 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
4621 * libbfd.h: Regenerate.
4622 * bfd-in2.h: Regenerate.
4624 2017-02-28 Alan Modra <amodra@gmail.com>
4626 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
4627 dynamic .data.rel.ro read-only.
4628 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
4629 rather than section flags when deciding where copy reloc goes.
4630 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
4631 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
4632 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
4633 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
4634 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
4635 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
4636 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
4637 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
4638 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
4639 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
4640 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
4641 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
4642 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
4643 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
4644 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
4645 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
4646 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
4647 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
4648 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
4650 2017-02-28 Maciej W. Rozycki <macro@imgtec.com>
4652 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
4653 `jalr $0, $25' instruction encoding.
4655 2017-02-27 Nick Clifton <nickc@redhat.com>
4658 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
4659 generating a seg-fault when encountering a symbol that has been
4660 deleted by garbage collection.
4662 2017-02-25 Alan Modra <amodra@gmail.com>
4664 * elf32-arc.c (struct dynamic_sections): Delete.
4665 (enum dyn_section_types): Delete.
4666 (dyn_section_names): Delete.
4667 (arc_create_dynamic_sections): Delete.
4668 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
4669 segfault on discarded .rela.plt section.
4670 (elf_arc_size_dynamic_sections): Formatting. Don't call
4671 arc_create_dynamic_sections. Don't allocate memory for sections
4672 handled by the generic linker. Correct code finding relocs in
4673 read-only sections. Set SEC_EXCLUDE on zero size .got,
4674 .got.plt, and .dynbss sections. Do set .interp for pies.
4676 2017-02-24 Andrew Waterman <andrew@sifive.com>
4678 * elfnn-riscv.c (GP_NAME): New macro.
4679 (riscv_global_pointer_value): Use it.
4680 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
4681 output section, consider only that section's alignment.
4683 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
4685 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
4686 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
4687 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
4688 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
4690 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
4692 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
4693 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
4696 2017-02-23 Alan Modra <amodra@gmail.com>
4699 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
4701 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
4702 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
4705 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
4708 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
4709 processing ahead of the call to `elf_gc_sweep_symbol'.
4711 2017-02-22 Nick Clifton <nickc@redhat.com>
4714 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
4715 created section 4-byte alignment.
4717 2017-02-22 Alan Modra <amodra@gmail.com>
4719 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
4720 on .got or .plt output section being discarded by script.
4721 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
4724 2017-02-21 Alan Modra <amodra@gmail.com>
4726 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
4727 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
4729 2017-02-20 Alan Modra <amodra@gmail.com>
4732 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
4733 if DT_RELSZ/DT_RELASZ is zero.
4735 2017-02-17 Nick Clifton <nickc@redhat.com>
4737 * compress.c (bfd_get_full_section_contents): Remember to reduce
4738 compressed size by the sizeof the compression header when
4739 decompressing the contents.
4741 2017-02-17 Pedro Alves <palves@redhat.com>
4743 * srec.c (Chunk): Rename to ...
4744 (_bfd_srec_len): ... this.
4745 (S3Forced): Rename to ...
4746 (_bfd_srec_forceS3): ... this.
4747 * objcopy.c: Adjust all references.
4749 2017-02-17 Pedro Alves <palves@redhat.com>
4751 * archive.c (bsd_write_armap): Rename to ...
4752 (_bfd_bsd_write_armap): ... this.
4753 (coff_write_armap): Rename to ...
4754 (_bfd_coff_write_armap): ... this.
4755 * libbfd-in.h (bsd_write_armap): Rename to ...
4756 (_bfd_bsd_write_armap): ... this.
4757 (coff_write_armap): Rename to ...
4758 (_bfd_coff_write_armap): ... this.
4759 * aout-target.h, aout-tic30.c: Adjust all users.
4760 * libbfd.h: Regenerate.
4762 2017-02-17 Pedro Alves <palves@redhat.com>
4764 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
4765 (warn_deprecated): Rename to ...
4766 (_bfd_warn_deprecated): ... this.
4767 * libbfd.c (warn_deprecated): Rename to ...
4768 (_bfd_warn_deprecated): ... this.
4769 * bfd-in2.h: Regenerate.
4771 2017-02-17 Pedro Alves <palves@redhat.com>
4773 * bfdio.c (real_ftell): Rename to ...
4774 (_bfd_real_ftell): ... this.
4775 (real_fseek): Rename to ...
4776 (_bfd_real_fseek): ... this.
4777 (real_fopen): Rename to ...
4778 (_bfd_real_fopen): ... this.
4779 * libbfd-in.h (real_ftell): Rename to ...
4780 (_bfd_real_ftell): ... this.
4781 (real_fseek): Rename to ...
4782 (_bfd_real_fseek): ... this.
4783 (real_fopen): Rename to ...
4784 (_bfd_real_fopen): ... this.
4785 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
4786 * libbfd.h: Regenerate.
4788 2017-02-17 Pedro Alves <palves@redhat.com>
4790 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
4791 * libbfd.c (read_unsigned_leb128): Rename to ...
4792 (_bfd_read_unsigned_leb128): ... this.
4793 (read_signed_leb128): Rename to ...
4794 (_bfd_read_signed_leb128): ... this.
4795 (safe_read_leb128): Rename to ...
4796 (_bfd_safe_read_leb128): ... this.
4797 * libbfd-in.h (read_unsigned_leb128): Rename to ...
4798 (_bfd_read_unsigned_leb128): ... this.
4799 (read_signed_leb128): Rename to ...
4800 (_bfd_read_signed_leb128): ... this.
4801 (safe_read_leb128): Rename to ...
4802 (_bfd_safe_read_leb128): ... this.
4803 * libbfd.h: Renegerate.
4805 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
4807 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
4808 before trying to fine matching file and line information.
4810 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
4812 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
4813 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
4814 not match current bfd, then reload debug information. Record bfd
4815 we're loading debug info for in the stash. If we have debug
4816 informatin in the cache then perform section placement before
4819 2017-02-16 Alan Modra <amodra@gmail.com>
4822 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
4823 * elfxx-target.h (elf_backend_no_page_alias): Define.
4824 (elfNN_bed): Init new field.
4825 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
4826 ensure PT_LOAD segment starts on a new page.
4827 * elf32-hppa.c (elf_backend_no_page_alias): Define.
4829 2017-02-16 Alan Modra <amodra@gmail.com>
4832 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
4835 2017-02-16 Jiong Wang <jiong.wang@arm.com>
4837 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
4838 * bfd-in2.h: Regenerated.
4840 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
4843 * elf32-i386.c (elf_i386_relocate_section): Allow
4844 "lea foo@GOT, %reg" in PIC.
4846 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
4849 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
4850 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
4851 error against local IFUNC symbol without a base register for
4854 2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
4856 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
4857 `%P: %H:' with `info->callbacks->einfo'.
4858 (ppc_elf_relocate_section): Likewise.
4859 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
4860 (ppc64_elf_edit_toc): Likewise.
4861 (ppc64_elf_relocate_section): Likewise.
4863 2017-02-14 Alan Modra <amodra@gmail.com>
4865 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
4866 --gc-keep-exported, and test versioned field of sym rather than
4867 looking for @ in name.
4869 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
4871 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
4874 2017-02-13 Nick Clifton <nickc@redhat.com>
4877 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
4880 2017-02-07 Andrew Waterman <andrew@sifive.com>
4882 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
4883 entry size if PLT header is written.
4885 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
4887 Fix sparc64 dynamic relocation processing to use the dynamic
4889 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
4890 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
4893 2017-02-03 Nick Clifton <nickc@redhat.com>
4896 * coffcode.h (coff_write_object_contents): Enlarge size of
4897 s_name_buf in order to avoid compile time warning about possible
4899 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
4900 32-bits of insn value before printing into buffer.
4902 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4904 * elfxx-mips.c (mips_elf_hash_sort_data): Add
4905 `max_local_dynindx'.
4906 (mips_elf_sort_hash_table): Handle it.
4907 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
4908 symbols bump up `max_local_dynindx' rather than
4909 `max_non_got_dynindx'.
4911 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4913 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
4914 `min_got_dynindx', `max_unref_got_dynindx' and
4915 `max_non_got_dynindx' members to the `bfd_size_type' data type.
4916 (mips_elf_sort_hash_table): Adjust accordingly.
4918 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4920 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
4921 to access the hash table.
4923 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4925 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
4926 non-NULL `htab' to the beginning.
4928 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4930 * elflink.c (elf_gc_sweep): Wrap overlong line.
4932 2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
4934 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
4935 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
4936 * elfxx-mips.c (mips_elf_link_hash_table): Add
4937 `ignore_branch_isa' member.
4938 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
4939 in branch relocation calculation as an error if
4940 `ignore_branch_isa' has been set.
4941 (_bfd_mips_elf_insn32): Rename to...
4942 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
4943 parameter to `insn32' and add an `ignore_branch_isa' parameter.
4944 Handle the new parameter.
4946 2017-01-27 Hans-Peter Nilsson <hp@axis.com>
4948 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
4949 local variable dynobj.
4952 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
4953 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
4954 executable from read-only sections into sdynrelro.
4955 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
4956 dynamic relocs in sdynrelro.
4957 (elf_backend_want_dynrelro): Define.
4959 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4961 * config.bfd (*-*-rtemsaout*): Mark as removed.
4963 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4965 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
4966 (arm-*-rtems*): Move to (arm*-*-eabi*).
4967 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
4968 (m68-*-rtems*): Move to (m68*-*-elf*).
4970 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4972 * config.bfd (*-*-rtemscoff*): Mark as removed.
4974 2017-01-24 Maciej W. Rozycki <macro@imgtec.com>
4977 * elflink.c (bfd_elf_record_link_assignment): Revert last
4978 change and don't ever clear `forced_local'. Set `mark'
4980 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
4982 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
4983 (bfd_elf_size_dynamic_sections): ... here.
4984 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
4985 and set `mark' instead in `__tls_get_addr_opt' processing.
4986 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
4988 2017-01-24 Alan Modra <amodra@gmail.com>
4990 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
4991 where dynamic relocs are preferable. Allow ifunc too.
4992 (ensure_undefweak_dynamic): New function.
4993 (allocate_dynrelocs): Use it here. Move plt handling last and
4994 don't make symbols dynamic, simplifying loop. Only make undef
4995 weak symbols with GOT entries dynamic. Correct condition
4996 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
4997 comments. Remove goto.
4998 (ppc_elf_relocate_section): Correct test for using dynamic
4999 symbol on GOT relocs. Rearrange test for emitting GOT relocs
5000 to suit. Set up explicit tls_index entries and implicit GOT
5001 tls_index entries resolvable at link time for
5002 __tls_get_addr_opt. Simplify test to clear mem for prelink.
5003 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
5004 (ensure_undefweak_dynamic): New function.
5005 (allocate_dynrelocs): Use it here. Only make undef weak symbols
5006 with GOT entries dynamic. Remove unnecessary test of
5007 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
5008 (ppc64_elf_relocate_section): Correct test for using dynamic
5009 symbol on GOT relocs. Rearrange test for emitting GOT relocs
5010 to suit. Set up explicit tls_index entries and implicit GOT
5011 tls_index entries resolvable at link time for __tls_get_addr_opt.
5012 Simplify expression to clear mem for prelink.
5014 2017-01-23 Yury Norov <ynorov@caviumnetworks.com>
5016 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
5018 2017-01-20 Jiong Wang <jiong.wang@arm.com>
5020 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
5021 (elf_backend_hash_symbol): Define.
5023 2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
5026 * elflink.c (bfd_elf_record_link_assignment): Clear any
5027 `forced_local' marking for DSO symbols that are not being
5030 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
5032 * elfnn-riscv.c (riscv_elf_object_p): New function.
5034 2017-01-12 H.J. Lu <hongjiu.lu@intel.com>
5037 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
5039 (elf_x86_64_check_relocs): Create .eh_frame section for the
5041 (elf_x86_64_size_dynamic_sections): Allocate and initialize
5042 .eh_frame section for the .plt.bnd section.
5043 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
5044 for the .plt.bnd section.
5046 2017-01-12 Nick Clifton <nickc@redhat.com>
5049 * opncls.c (find_separate_debug_file): Add include_dirs
5050 parameter. Only include the directory part of the bfd's filename
5051 in search paths if include_dirs is true. Add a couple of extra
5052 locations for looking for debug files.
5053 ( bfd_follow_gnu_debuglink): Update invocation of
5054 find_separate_debug_file.
5055 (bfd_follow_gnu_debugaltlink): Likewise.
5056 (get_build_id): New function: Finds the build-id of the given bfd.
5057 (get_build_id_name): New function: Computes the name of the
5058 separate debug info file for a bfd, based upon its build-id.
5059 (check_build_id_file): New function: Checks to see if a separate
5060 debug info file exists at the given location, and that its
5061 build-id matches that of the original bfd.
5062 (bfd_follow_build_id_debuglink): New function: Finds a separate
5063 debug info file for a given bfd by using the build-id method.
5064 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
5065 method of locating a separate debug info file before using the
5067 * bfd-in2.h: Regenerate.
5069 2017-01-11 H.J. Lu <hongjiu.lu@intel.com>
5072 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
5073 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
5074 elf_x86_64_eh_frame_plt_got.
5075 (elf_x86_64_size_dynamic_sections): Get unwind info from
5076 elf_x86_64_bnd_arch_bed for the BND PLT.
5078 2017-01-11 Jeremy Soller <jackpot51@gmail.com>
5080 * config.bfd: Add entries for i686-redox and x86_64-redox.
5082 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
5084 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
5086 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
5087 .eh_frame section to 4 bytes for x32.
5088 (elf_x86_64_check_relocs): Likewise.
5090 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
5093 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
5094 (PLT_GOT_FDE_LENGTH): Likewise.
5095 (elf_i386_plt_layout): Add eh_frame_plt_got and
5096 eh_frame_plt_got_size.
5097 (elf_i386_plt): Updated.
5098 (elf_i386_link_hash_table): Add plt_got_eh_frame.
5099 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
5100 (elf_i386_size_dynamic_sections): Allocate and initialize
5101 .eh_frame section for .plt.got.
5102 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
5104 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
5105 eh_frame_plt_got_size.
5106 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
5107 (PLT_GOT_FDE_LENGTH): Likewise.
5108 (elf_x86_64_backend_data): Add eh_frame_plt_got and
5109 eh_frame_plt_got_size.
5110 (elf_x86_64_arch_bed): Updated.
5111 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
5112 eh_frame_plt_got_size.
5113 (elf_x86_64_nacl_arch_bed): Likewise.
5114 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
5115 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
5116 (elf_x86_64_size_dynamic_sections): Allocate and initialize
5117 .eh_frame section for .plt.got.
5118 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
5121 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
5123 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
5124 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
5126 2017-01-09 Nick Clifton <nickc@redhat.com>
5128 * dwarf2.c (lookup_address_in_function_table): Return early if
5129 there are no functions in the given comp unit, or if the high
5130 address of the last function in the comp unit is less than the
5133 2017-01-09 Nick Clifton <nickc@redhat.com>
5136 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
5137 message if there are too many symbols to load.
5139 2017-01-04 James Clarke <jrtc27@jrtc27.com>
5141 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
5142 if relocs are cached.
5144 2017-01-03 Rich Felker <bugdal@aerifal.cx>
5147 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
5148 for R_MICROBLAZE_GOTOFF_64.
5150 2017-01-03 Nick Clifton <nickc@redhat.com>
5152 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
5153 warning about using a possibly uninitialised variable.
5155 2017-01-02 Alan Modra <amodra@gmail.com>
5157 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
5158 (allocate_plt_static, allocate_dynrelocs): Use it.
5160 2017-01-02 Alan Modra <amodra@gmail.com>
5162 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
5163 .PARISC.unwind section.
5165 2017-01-02 Alan Modra <amodra@gmail.com>
5168 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
5169 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
5170 indirect to GOT pointer relative code edit.
5172 2017-01-02 Alan Modra <amodra@gmail.com>
5174 Update year range in copyright notice of all files.
5176 For older changes see ChangeLog-2016
5178 Copyright (C) 2017 Free Software Foundation, Inc.
5180 Copying and distribution of this file, with or without modification,
5181 are permitted in any medium without royalty provided the copyright
5182 notice and this notice are preserved.
5188 version-control: never