1 2017-11-14 Alan Modra <amodra@gmail.com>
4 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Warn on discarding
5 non-empty dynamic section.
6 (ppc_build_one_stub): Take elf_gp from output bfd, not output
8 (ppc_size_one_stub, ppc64_elf_next_toc_section): Likewise.
10 2017-11-14 Alan Modra <amodra@gmail.com>
12 * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for user
15 2017-11-13 Jan Beulich <jbeulich@suse.com>
17 * coff-tic80.c (COFF_ENCODE_ALIGNMENT, COFF_DECODE_ALIGNMENT):
19 * coffcode.h (coff_set_alignment_hook): Drop tic80 special case.
20 (coff_write_object_contents): Likewise. Issue diagnostic for too
23 2017-11-12 H.J. Lu <hongjiu.lu@intel.com>
26 * elf.c (_bfd_elf_map_sections_to_segments): Remove PF_X from
29 2017-11-12 Alan Modra <amodra@gmail.com>
31 * elflink.c (elf_link_add_object_symbols): Ignore anything but
32 defined and defweak symbols when setting up weakdefs.
34 2017-11-12 Alan Modra <amodra@gmail.com>
36 * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Set non_got_ref
37 to keep dyn_relocs, clear to discard. Comment.
38 (allocate_dynrelocs): Always clear non_got_ref when clearing
39 dyn_relocs in non-pic case. Invert non_got_ref test. Also test
40 dynamic_adjusted and ELF_COMMON_DEF_P. Move code deleting
41 dyn_relocs on undefined syms to handle for non-pic too.
42 (elf32_hppa_relocate_section): Simplify test for non-pic dyn relocs.
43 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Set non_got_ref
44 to keep dyn_relocs, clear to discard. Comment.
45 (allocate_dynrelocs): Always clear non_got_ref when clearing
46 dyn_relocs in non-pic case. Invert non_got_ref test. Also test
47 dynamic_adjusted and ELF_COMMON_DEF_P. Move code deleting
48 dyn_relocs on undefined syms to handle for non-pic too.
49 (ppc_elf_relocate_section): Simplify test for non-pic dyn relocs.
50 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Discard
51 dyn_relocs here. Don't bother setting non_got_ref. Comment.
52 (allocate_dynrelocs): Delete special handling of non-pic ELFv2
53 ifuncs. Move code deleting dyn_relocs on undefined symbols to
54 handle for non-pic too. Don't test non_got_ref. Do test
55 dynamic_adjusted and ELF_COMMON_DEF_P.
57 2017-11-08 Djordje Todorovic <djordje.todorovic@rt-rk.com>
59 * elf32-mips.c (elf32_mips_grok_psinfo): Extract core->pid.
60 * elf64-mips.c (elf64_mips_grok_psinfo): Likewise.
61 * elfn32-mips.c (elf32_mips_grok_psinfo): Likewise.
63 2017-11-08 Djordje Todorovic <djordje.todorovic@rt-rk.com>
65 * elf32-mips.c (elf32_mips_write_core_note): New function.
66 (elf_backend_write_core_note): New macro.
67 * elf64-mips.c (elf64_mips_write_core_note): New function.
68 (elf_backend_write_core_note): New macro.
69 * elfn32-mips.c (elf32_mips_write_core_note): New function.
70 (elf_backend_write_core_note): New macro.
72 2017-11-07 Alan Modra <amodra@gmail.com>
74 * elf64-ppc.c (ppc64_elf_build_stubs): Correct pluralization in
77 2017-11-07 Alan Modra <amodra@gmail.com>
79 * sysdep.h: Formatting, comment fixes.
80 (gettext, ngettext): Redefine when ENABLE_NLS.
81 (ngettext, dngettext, dcngettext): Define when !ENABLE_NLS.
82 (_): Define using gettext.
83 (textdomain, bindtextdomain): Use safer "do nothing".
84 * hosts/alphavms.h (textdomain, bindtextdomain): Likewise.
85 (ngettext, dngettext, dcngettext): Define when !ENABLE_NLS.
87 2017-11-05 Alan Modra <amodra@gmail.com>
90 * bfd.c (_bfd_doprnt_scan): Check args index before storing, not
93 2017-11-05 Alan Modra <amodra@gmail.com>
96 * bfd.c (union _bfd_doprnt_args): New.
97 (PRINT_TYPE): Add FIELD arg. Take value from args.
98 (_bfd_doprnt): Replace ap parameter with args. Adjust all
99 PRINT_TYPE invocations and reading of format args to suit.
100 Move "%%" handling out of switch handling args. Support
101 positional parameters.
102 (_bfd_doprnt_scan): New function.
103 (error_handler_internal): Call _bfd_doprnt_scan and read args.
105 2017-11-04 Alan Modra <amodra@gmail.com>
107 * elf32-ppc.c (got_entries_needed, got_relocs_needed): New functions.
108 (allocate_dynrelocs, ppc_elf_size_dynamic_sections): Use them here.
109 (ppc_elf_relocate_section): Don't output a dynamic relocation
110 for IE GOT entries in an executable.
111 * elf64-ppc.c (allocate_got): Trim unnecessary TPREL relocs.
112 (ppc64_elf_size_dynamic_sections): Likewise.
113 (ppc64_elf_relocate_section): Likewise.
115 2017-11-04 Alan Modra <amodra@gmail.com>
117 * elf32-ppc.c (readonly_dynrelocs): Delete info param. Update all
118 callers. Don't bother with SEC_ALLOC test. Return section pointer.
120 (maybe_set_textrel): ..here.
121 * elf64-ppc.c (readonly_dynrelocs): Return section pointer.
122 (maybe_set_textrel): Call minfo to print textrel warning to map file.
124 2017-11-04 Alan Modra <amodra@gmail.com>
126 * elf32-hppa.c (enum _tls_type): Move.
127 (struct elf32_hppa_link_hash_entry): Make tls_type a bitfield.
128 (elf32_hppa_check_relocs): Set DF_STATIC_TLS only for shared libraries.
129 Tidy tls_type handling. Set symbol tls_type for GOT_TLS_LDM too.
130 (got_entries_needed, got_relocs_needed): New functions.
131 (allocate_dynrelocs): Use them.
132 (elf32_hppa_size_dynamic_sections): Likewise.
133 (elf32_hppa_relocate_section): Delete bogus FIXME. Formatting.
134 Correct code emitting relocs on GD/IE got entries. Report an
135 error when a symbol has both normal and TLS GOT relocs.
137 2017-11-04 Alan Modra <amodra@gmail.com>
140 * elf32-hppa.c (elf32_hppa_check_relocs): Don't create dyn_relocs
141 for plabels when non-pic.
142 (maybe_set_textrel): New function.
143 (readonly_dynrelocs): Move and rewrite.
144 (elf32_hppa_adjust_dynamic_symbol): Use it. Don't create copy
145 relocs when def_regular or -z nocopyreloc. Handle non_got_ref
146 for functions. Expand non_got_ref comments.
147 (elf32_hppa_size_dynamic_sections): Use maybe_set_textrel.
149 2017-11-03 H.J. Lu <hongjiu.lu@intel.com>
151 * elf32-i386.c (elf_i386_check_relocs): Set plt.refcount to 1.
152 Don't use func_pointer_refcount. Don't set plt.refcount nor
153 non_got_ref for function pointer reference.
154 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
155 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Don't use
156 func_pointer_refcount.
157 (_bfd_x86_elf_copy_indirect_symbol): Don't copy
158 func_pointer_refcount.
159 (_bfd_x86_elf_hide_symbol): Don't use func_pointer_refcount.
160 * elfxx-x86.h (GENERATE_DYNAMIC_RELOCATION_P): Likewise.
161 (elf_x86_link_hash_entry): Remove func_pointer_refcount.
163 2017-11-03 Mingi Cho <mgcho.minic@gmail.com>
164 Nick Clifton <nickc@redhat.com>
167 * coffgen.c (_bfd_coff_get_external_symbols): Check for an
168 overlarge raw syment count.
169 (coff_get_normalized_symtab): Likewise.
171 2017-11-01 James Bowman <james.bowman@ftdichip.com>
173 * archures.c: Add bfd_mach_ft32b.
174 * cpu-ft32.c: Add arch_info_struct.
175 * elf32-ft32.c: Add R_FT32_RELAX, SC0, SC1,
177 (ft32_elf_relocate_section): Add clauses for R_FT32_SC0, SC1,
179 (ft32_reloc_shortable, elf32_ft32_is_diff_reloc)
180 (elf32_ft32_adjust_diff_reloc_value)
181 (elf32_ft32_adjust_reloc_if_spans_insn)
182 (elf32_ft32_relax_delete_bytes, elf32_ft32_relax_is_branch_target)
183 (ft32_elf_relax_section): New function.
184 * reloc.c: Add BFD_RELOC_FT32_RELAX, SC0, SC1, DIFF32.
185 * bfd-in2.h: Regenerate.
186 * libbfd.h: Regenerate.
188 2017-11-01 Nick Clifton <nickc@redhat.com>
191 * coffcode.h (coff_slurp_line_table): Check for an excessively
192 large line number count.
194 2017-11-01 Nick Clifton <nickc@redhat.com>
197 * peicode.h (pe_bfd_read_buildid): Revise check for invalid size
198 and offset in light of further possible bogus values.
200 2017-11-01 Alan Modra <amodra@gmail.com>
203 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't create a plt
204 entry when just a dynamic reloc can serve. Ensure no dynamic
205 relocations when UNDEFWEAK_NO_DYNAMIC_RELOC by setting non_got_ref.
206 Expand and move the non_got_ref comment.
207 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
209 2017-11-01 Nick Clifton <nickc@redhat.com>
212 * coffgen.c (_bfd_coff_free_symbols): Fail if called on a non-COFF
214 * cofflink.c (coff_link_check_archive_element): Skip non-COFF
215 members of an archive.
217 2017-10-31 Nick Clifton <nickc@redhat.com>
220 * peicode.h (pe_bfd_read_buildid): Check for invalid size and data
223 2017-10-30 Alan Modra <amodra@gmail.com>
225 * elf32-frv.c (ELF_TARGET_ID): Don't define for generic
228 * elflink.c (elf_gc_sweep): Test elf_object_id in addition to
230 (bfd_elf_gc_sections): Likewise.
232 2017-10-30 Alan Modra <amodra@gmail.com>
235 * elf32-hppa.c (elf32_hppa_check_relocs): Move SEC_ALLOC test to
236 ensure non_got_ref is not set due to debug references.
237 (elf32_hppa_adjust_dynamic_symbol): Tidy plabel handling. Use
238 SYMBOL_CALLS_LOCAL and UNDEFWEAK_NO_DYNAMIC_RELOC when determining
239 need for a plt entry.
240 (allocate_dynrelocs): Similarly for got entries. Tidy code discarding
241 dynamic relocs when pic. Remove bogus code attempting to handle
243 (elf32_hppa_relocate_section): Similarly. Delete resolved_to_zero
245 (elf32_hppa_finish_dynamic_symbol): Use UNDEFWEAK_NO_DYNAMIC_RELOC
246 and SYMBOL_REFERENCES_LOCAL in GOT handling.
248 2017-10-28 Alan Modra <amodra@gmail.com>
251 * elflink.c (_bfd_elf_merge_symbol): Remove relocs_compatible check.
252 * elf32-hppa.c (elf_backend_relocs_compatible): Define.
253 * elf32-ppc.c (elf_backend_relocs_compatible): Define.
254 * elf64-ppc.c (elf_backend_relocs_compatible): Define.
256 2017-10-25 Alan Modra <amodra@gmail.com>
258 * archive.c (_bfd_compute_and_write_armap): Match "__gnu_lto_slim"
259 optionally prefixed with "_".
260 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
262 2017-10-24 Andrew Waterman <andrew@sifive.com>
264 * elfnn-riscv.c (_bfd_riscv_relax_lui): Don't relax to c.lui
267 2017-10-24 Renlin Li <renlin.li@arm.com>
270 * elflink.c (_bfd_elf_merge_symbol): Handle multiple definition case.
272 2017-10-23 Nick Clifton <nickc@redhat.com>
275 * elflink.c (elf_link_output_extsym): Keep global undefined
276 symbols if they have been marked as needed.
278 2017-10-23 Maciej W. Rozycki <macro@imgtec.com>
280 * elfn32-mips.c (mips_elf_n32_mkobject): New prototype and
282 (bfd_elf32_mkobject): Use `mips_elf_n32_mkobject' rather than
283 `_bfd_mips_elf_mkobject'.
285 2017-10-22 Hans-Peter Nilsson <hp@axis.com>
288 * config.bfd (cris-*-* | crisv32-*-*): Require a 64-bit BFD.
290 2017-10-19 Palmer Dabbelt <palmer@dabbelt.com>
292 * elfnn-riscv.c (riscv_pcgp_hi_reloc): New structure.
293 (riscv_pcgp_lo_reloc): Likewise.
294 (riscv_pcgp_relocs): Likewise.
295 (riscv_init_pcgp_relocs): New function.
296 (riscv_free_pcgp_relocs): Likewise.
297 (riscv_record_pcgp_hi_reloc): Likewise.
298 (riscv_record_pcgp_lo_reloc): Likewise.
299 (riscv_delete_pcgp_hi_reloc): Likewise.
300 (riscv_use_pcgp_hi_reloc): Likewise.
301 (riscv_record_pcgp_lo_reloc): Likewise.
302 (riscv_find_pcgp_lo_reloc): Likewise.
303 (riscv_delete_pcgp_lo_reloc): Likewise.
304 (_bfd_riscv_relax_pc): Likewise.
305 (_bfd_riscv_relax_section): Handle R_RISCV_PCREL_* relocations
306 via the new functions above.
308 2017-10-19 Palmer Dabbelt <palmer@dabbelt.com>
310 * elfnn-riscv.c (R_RISCV_DELETE): New define.
311 (_bfd_riscv_relax_delete): New function.
312 (perform_relocation): Handle R_RISCV_DELETE.
313 (_bfd_riscv_relax_section): Likewise.
315 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
318 * elfxx-tilegx.c (tilegx_elf_tls_transition): Replace
319 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
320 bfd_link_executable for TLS check.
321 (tilegx_elf_check_relocs): Likewise.
322 (allocate_dynrelocs): Likewise.
323 (tilegx_elf_relocate_section): Likewise.
325 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
328 * elf32-tilepro.c (tilepro_elf_tls_transition): Replace
329 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
330 bfd_link_executable for TLS check.
331 (tilepro_elf_check_relocs): Likewise.
332 (allocate_dynrelocs): Likewise.
333 (tilepro_elf_relocate_section): Likewise.
335 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
338 * elfxx-sparc.c (sparc_elf_tls_transition): Replace
339 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
340 bfd_link_executable for TLS check.
341 (_bfd_sparc_elf_check_relocs): Likewise.
342 (allocate_dynrelocs): Likewise.
343 (_bfd_sparc_elf_relocate_section): Likewise.
345 2017-10-18 H.J. Lu <hongjiu.lu@intel.com>
347 * elf32-tilepro.c (tilepro_elf_gc_mark_hook): Call
348 _bfd_generic_link_add_one_symbol to mark __tls_get_addr.
349 * elfxx-tilegx.c (tilegx_elf_gc_mark_hook): Likewise.
351 2017-10-17 H.J. Lu <hongjiu.lu@intel.com>
353 * elf32-microblaze.c (microblaze_elf_check_relocs): Check for
354 indirect and warning symbols.
356 2017-10-17 Alan Modra <amodra@gmail.com>
359 * elf-properties.c (_bfd_elf_parse_gnu_properties): Compare datasz
360 against size left rather than comparing pointers. Reorganise loop.
362 2017-10-17 Alan Modra <amodra@gmail.com>
365 * aoutx.h (aout_get_external_symbols): Handle stringsize of zero,
366 and error for any other size that doesn't cover the header word.
368 2017-10-16 H.J. Lu <hongjiu.lu@intel.com>
370 * elf-bfd.h (elf_backend_data): Remove gc_sweep_hook.
371 * elf32-arm.c (elf32_arm_gc_sweep_hook): Removed.
372 (elf_backend_gc_sweep_hook): Likewise.
373 * elf32-bfin.c (bfin_gc_sweep_hook): Likewise.
374 (bfinfdpic_gc_sweep_hook): Likewise.
375 (elf_backend_gc_sweep_hook): Likewise.
376 * elf32-cr16.c (elf32_cr16_gc_sweep_hook): Likewise.
377 (elf_backend_gc_sweep_hook): Likewise.
378 * elf32-cris.c (cris_elf_gc_sweep_hook): Likewise.
379 (elf_backend_gc_sweep_hook): Likewise.
380 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Likewise.
381 (elf_backend_gc_sweep_hook): Likewise.
382 * elf32-lm32.c (lm32_elf_gc_sweep_hook): Likewise.
383 (elf_backend_gc_sweep_hook): Likewise.
384 * elf32-m32r.c (m32r_elf_gc_sweep_hook): Likewise.
385 (elf_backend_gc_sweep_hook): Likewise.
386 * elf32-m68k.c (elf_m68k_got_entry): Remove elf_m68k_gc_sweep_hook
388 (elf_m68k_remove_got_entry_type): Removed.
389 (elf_m68k_find_got_entry_ptr): Likewise.
390 (elf_m68k_remove_got_entry): Likewise.
391 (elf_m68k_gc_sweep_hook): Likewise.
392 (elf_backend_gc_sweep_hook): Likewise.
393 * elf32-mcore.c (mcore_elf_gc_sweep_hook): Likewise.
394 (elf_backend_gc_sweep_hook): Likewise.
395 * elf32-metag.c (elf_metag_gc_sweep_hook): Likewise.
396 (elf_backend_gc_sweep_hook): Likewise.
397 * elf32-microblaze.c (elf_backend_gc_sweep_hook): Likewise.
398 (elf_backend_gc_sweep_hook): Likewise.
399 * elf32-mips.c (elf_backend_gc_sweep_hook): Likewise.
400 (elf_backend_gc_sweep_hook): Likewise.
401 * elf32-nds32.c (nds32_elf_gc_sweep_hook): Likewise.
402 (elf_backend_gc_sweep_hook): Likewise.
403 * elf32-nios2.c (nios2_elf32_gc_sweep_hook): Likewise.
404 (elf_backend_gc_sweep_hook): Likewise.
405 * elf32-or1k.c (or1k_elf_gc_sweep_hook): Likewise.
406 (elf_backend_gc_sweep_hook): Likewise.
407 * elf32-ppc.c (ppc_elf_gc_sweep_hook): Likewise.
408 (elf_backend_gc_sweep_hook): Likewise.
409 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
410 (elf_backend_gc_sweep_hook): Likewise.
411 * elf32-sparc.c (elf_backend_gc_sweep_hook): Likewise.
412 * elf32-tic6x.c (elf32_tic6x_gc_sweep_hook): Likewise.
413 (elf_backend_gc_sweep_hook): Likewise.
414 * elf32-tilegx.c (elf_backend_gc_sweep_hook): Likewise.
415 * elf32-tilepro.c (tilepro_elf_gc_sweep_hook): Likewise.
416 (elf_backend_gc_sweep_hook): Likewise.
417 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
418 (elf_backend_gc_sweep_hook): Likewise.
419 * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Likewise.
420 (elf_backend_gc_sweep_hook): Likewise.
421 * elf64-alpha.c (elf64_alpha_gc_sweep_hook): Likewise.
422 (elf_backend_gc_sweep_hook): Likewise.
423 * elf64-mips.c (elf_backend_gc_sweep_hook): Likewise.
424 * elf64-mmix.c (mmix_elf_gc_sweep_hook): Likewise.
425 (elf_backend_gc_sweep_hook): Likewise.
426 * elf64-ppc.c (elf_backend_gc_sweep_hook): Likewise.
427 (ppc64_elf_gc_sweep_hook): Likewise.
428 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
429 (elf_backend_gc_sweep_hook): Likewise.
430 * elf64-sparc.c (elf_backend_gc_sweep_hook): Likewise.
431 * elf64-tilegx.c (elf_backend_gc_sweep_hook): Likewise.
432 * elflink.c (elf_link_add_object_symbols): Don't call
433 _bfd_elf_link_check_relocs here.
434 (gc_sweep_hook_fn): Removed.
435 (elf_gc_sweep): Remove gc_sweep_hook.
436 * elfnn-aarch64.c (elfNN_aarch64_gc_sweep_hook): Removed.
437 (elf_backend_gc_sweep_hook): Likewise.
438 * elfnn-riscv.c (riscv_elf_gc_sweep_hook): Likewise.
439 (elf_backend_gc_sweep_hook): Likewise.
440 * elfxx-mips.c (_bfd_mips_elf_gc_sweep_hook): Likewise.
441 * elfxx-mips.h (_bfd_mips_elf_gc_sweep_hook): Likewise.
442 (elf_backend_gc_sweep_hook): Likewise.
443 * elfxx-sparc.c (_bfd_sparc_elf_gc_sweep_hook): Likewise.
444 * elfxx-sparc.h (_bfd_sparc_elf_gc_sweep_hook): Likewise.
445 * elfxx-target.h (elf_backend_gc_sweep_hook): Likewise.
446 (elfNN_bed): Remove elf_backend_gc_sweep_hook.
447 * elfxx-tilegx.c (tilegx_elf_gc_sweep_hook): Removed.
448 * elfxx-tilegx.h (tilegx_elf_gc_sweep_hook): Likewise.
450 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
452 * elf32-i386.c (elf_i386_backend_data): Removed.
453 (get_elf_i386_backend_data): Likewise.
454 (elf_i386_arch_bed): Replace elf_i386_backend_data with
455 elf_x86_backend_data.
456 (elf_i386_get_synthetic_symtab): Likewise.
457 (elf_i386_nacl_arch_bed): Likewise.
458 (elf_i386_vxworks_arch_bed): Likewise.
459 (elf_i386_relocate_section): Check target_os instead of
461 (elf_i386_finish_dynamic_symbol): Likewise.
462 (elf_i386_finish_dynamic_sections): Use htab->plt0_pad_byte.
463 Check target_os instead of is_vxworks.
464 (elf_i386_link_setup_gnu_properties): Remove normal_target and
465 is_vxworks. Initialize plt0_pad_byte.
466 * elf64-x86-64.c (elf_x86_64_backend_data); Removed.
467 (get_elf_x86_64_arch_data): Likewise.
468 (get_elf_x86_64_backend_data): Likewise.
469 (elf_x86_64_arch_bed): Replace elf_x86_64_backend_data with
470 elf_x86_backend_data.
471 (elf_x86_64_get_synthetic_symtab): Likewise.
472 (elf_x86_64_nacl_arch_bed): Likewise.
473 (elf_x86_64_link_setup_gnu_properties): Remove is_vxworks and
474 normal_target. Initialize plt0_pad_byte.
475 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Check target_os
476 instead of is_vxworks.
477 (_bfd_x86_elf_size_dynamic_sections): Likewise.
478 (_bfd_x86_elf_finish_dynamic_sections): Likewise.
479 (_bfd_x86_elf_adjust_dynamic_symbol): Likewise.
480 (_bfd_x86_elf_link_hash_table_create): Initialize target_os.
481 (_bfd_x86_elf_link_setup_gnu_properties): Remove is_vxworks.
482 Update normal_target. Set up plt0_pad_byte. Check target_os
483 instead of is_vxworks.
484 * elfxx-x86.h (elf_x86_target_os): New.
485 (elf_x86_backend_data): Likewise.
486 (get_elf_x86_backend_data): Likewise.
487 (elf_x86_link_hash_table): Remove is_vxworks. Add plt0_pad_byte
489 (elf_x86_init_table): Remove normal_target and is_vxworks. Add
492 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
494 * elf32-i386.c (elf_i386_finish_dynamic_sections): Call
495 _bfd_x86_elf_finish_dynamic_sections.
496 * elf64-x86-64.c (elf_x86_64_finish_dynamic_sections): Likewise.
497 * elfxx-x86.c (_bfd_x86_elf_finish_dynamic_sections): New
499 * elfxx-x86.h (_bfd_x86_elf_finish_dynamic_sections): New
502 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
505 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
506 hide symbol which was forced to be dynamic.
508 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
511 * elf32-cris.c (cris_elf_relocate_section): Don't generate
512 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
513 (cris_elf_check_relocs): Don't allocate dynamic relocation
514 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
516 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
519 * elf32-sh.c (allocate_dynrelocs): Discard dynamic relocations
520 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
521 (sh_elf_relocate_section): Don't generate dynamic relocation if
522 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
524 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
527 * elf32-s390.c (allocate_dynrelocs): Discard dynamic
528 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
529 (elf_s390_relocate_section): Don't generate dynamic relocation
530 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
531 * elf64-s390.c (allocate_dynrelocs): Discard dynamic
532 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
533 (elf_s390_relocate_section): Don't generate dynamic relocation
534 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
536 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
539 * elf32-nios2.c (nios2_elf32_relocate_section): Don't generate
540 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
541 (allocate_dynrelocs): Discard dynamic relocations if
542 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
544 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
547 * elf32-microblaze.c (microblaze_elf_relocate_section): Don't
548 generate dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is
550 (allocate_dynrelocs): Discard dynamic relocations if
551 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
553 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
556 * elf32-m68k.c (elf_m68k_check_relocs): Don't allocate dynamic
557 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
558 (elf_m68k_adjust_dynamic_symbol): Don't make symbol dynamic if
559 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
560 (elf_m68k_relocate_section): Don't generate dynamic relocation
561 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
563 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
566 * elf32-hppa.c (ensure_undef_dynamic): Don't make undefined
567 symbol dynamic if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
568 (allocate_dynrelocs): Discard dynamic relocations if
569 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
570 (elf32_hppa_relocate_section): Don't generate dynamic
571 relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
573 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
576 * elfnn-ia64.c (elfNN_ia64_check_relocs): Don't allocate
577 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
578 (allocate_fptr): Don't allocate function pointer if
579 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
580 (allocate_dynrel_entries): Don't allocate dynamic relocation
581 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
582 (set_got_entry): Don't set GOT entry if
583 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
584 (set_pltoff_entry): Don't set PLTOFF entry if
585 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
586 (elfNN_ia64_relocate_section): Don't install dynamic relocation
587 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
589 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
592 * elfxx-mips.c (mips_elf_calculate_relocation): Don't generate
593 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
594 (allocate_dynrelocs): Don't allocate dynamic relocations if
595 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
597 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
600 * elf32-arm.c (elf32_arm_final_link_relocate): Don't generate
601 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
602 (allocate_dynrelocs_for_symbol): Discard dynamic relocations
603 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
605 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
608 * elf32-tilepro.c (allocate_dynrelocs): Discard dynamic
609 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
610 (tilepro_elf_relocate_section): Don't generate dynamic
611 relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
612 * elfxx-tilegx.c (allocate_dynrelocs): Discard dynamic
613 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
614 (tilegx_elf_relocate_section): Don't generate dynamic
615 relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
617 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
620 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Don't
621 generate dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is
623 (elfNN_aarch64_allocate_dynrelocs): Discard dynamic relocations
624 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
626 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
628 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Moved to ...
629 * elf-bfd.h (UNDEFWEAK_NO_DYNAMIC_RELOC): Here.
630 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Removed.
632 2017-10-12 James Bowman <james.bowman@ftdichip.com>
634 * bfd-in2.h: Regenerate.
635 * libbfd.h: Regenerate.
636 * elf32-ft32.c: Add HOWTO R_FT32_15.
637 * reloc.c: Add BFD_RELOC_FT32_15.
639 2017-10-12 Nick Clifton <nickc@redhat.com>
641 * reloc.c (enum bfd_reloc_status): Start values at 2.
642 * bfd-in2.h: Regenerate.
643 * elfnn-aarch64.c (aarch64_relocate): Invert sense of function, so
644 that a TRUE return indicates success. Compare the result of
645 calling _bfd_aarch64_elf_put_addend against bfd_reloc_ok.
646 (build_one_stub): Change sense of tests against aarch64_relocate
648 (elfNN_aarch64_tls_relax): Return bfd_reloc_notsupported, rather
649 than FALSE, when an error is detected.
650 (elfNN_aarch64_final_link_relocate): Likewise.
652 2017-10-12 H.J. Lu <hongjiu.lu@intel.com>
654 * elf32-i386.c (elf_backend_hide_symbol): New.
655 * elf64-x86-64.c (elf_backend_hide_symbol): Likewise.
656 * elfxx-x86.c (_bfd_x86_elf_hide_symbol): Likewise.
657 * elfxx-x86.h (_bfd_x86_elf_hide_symbol): Likewise.
659 2017-10-12 Alan Modra <amodra@gmail.com>
661 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Call
662 elf_backend_hide_symbol, not _bfd_elf_link_hash_hide_symbol.
663 (bfd_elf_define_start_stop): Likewise.
665 2017-10-12 Alan Modra <amodra@gmail.com>
667 * elf32-nds32.c (nds32_elf_size_dynamic_sections): Set .interp
668 when executable rather than non-PIC.
669 * elf32-score.c (s3_bfd_score_elf_size_dynamic_sections): Likewise.
670 * elf32-score7.c (s7_bfd_score_elf_size_dynamic_sections): Likewise.
672 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
674 * elf-bfd.h (elf_backend_data): Add `linux_prpsinfo64_ugid16'
676 * elf-linux-core.h (elf_external_linux_prpsinfo64): Rename to...
677 (elf_external_linux_prpsinfo64_ugid32): ... this.
678 (swap_linux_prpsinfo32_out): Rename to...
679 (swap_linux_prpsinfo32_ugid32_out): ... this.
680 (elf_external_linux_prpsinfo64_ugid16): New structure.
681 (swap_linux_prpsinfo64_ugid16_out): New function.
682 * elfxx-target.h [!elf_backend_linux_prpsinfo64_ugid16]
683 (elf_backend_linux_prpsinfo64_ugid16): Define.
684 (elfNN_bed): Initialize `linux_prpsinfo64_ugid16' member.
685 * elf.c (elfcore_write_linux_prpsinfo64): Handle both variants
686 of the 64-bit Linux core PRPSINFO note.
687 * elf64-sh64.c (elf_backend_linux_prpsinfo64_ugid16): Define.
689 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
691 * elf-bfd.h (elf_backend_data): Add `linux_prpsinfo32_ugid16'
693 (elfcore_write_ppc_linux_prpsinfo32): Remove prototype.
694 * elf32-ppc.c (elfcore_write_ppc_linux_prpsinfo32): Remove.
695 (elf_external_ppc_linux_prpsinfo32)
696 (swap_ppc_linux_prpsinfo32_out): Move to...
697 * elf-linux-core.h (elf_external_linux_prpsinfo32_ugid32)
698 (swap_linux_prpsinfo32_ugid32_out): ... these.
699 (elf_external_linux_prpsinfo32): Rename to...
700 (elf_external_linux_prpsinfo32_ugid16): ... this.
701 (swap_linux_prpsinfo32_out): Rename to...
702 (swap_linux_prpsinfo32_ugid16_out): ... this.
703 * elfxx-target.h [!elf_backend_linux_prpsinfo32_ugid16]
704 (elf_backend_linux_prpsinfo32_ugid16): Define.
705 (elfNN_bed): Initialize `linux_prpsinfo32_ugid16' member.
706 * elf.c (elfcore_write_linux_prpsinfo32): Handle both variants
707 of the 32-bit Linux core PRPSINFO note.
708 * elf32-am33lin.c (elf_backend_linux_prpsinfo32_ugid16): Define.
709 * elf32-arm.c (elf_backend_linux_prpsinfo32_ugid16): Define.
710 * elf32-cris.c (elf_backend_linux_prpsinfo32_ugid16): Define.
711 * elf32-frv.c (elf_backend_linux_prpsinfo32_ugid16): Define.
712 * elf32-i386.c (elf_backend_linux_prpsinfo32_ugid16): Define.
713 * elf32-m32r.c (elf_backend_linux_prpsinfo32_ugid16): Define.
714 * elf32-m68k.c (elf_backend_linux_prpsinfo32_ugid16): Define.
715 * elf32-s390.c (elf_backend_linux_prpsinfo32_ugid16): Define.
716 * elf32-sh.c (elf_backend_linux_prpsinfo32_ugid16): Define.
717 * elf32-sparc.c (elf_backend_linux_prpsinfo32_ugid16): Define.
719 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
721 * elf-linux-core.h (elf_external_linux_prpsinfo64): Move the
722 `gap' member ahead of `pr_flag'.
724 2017-10-11 Pedro Alves <palves@redhat.com>
726 * bfd.c (_doprnt): Rename to ...
727 (_bfd_doprnt): ... this.
728 (error_handler_internal): Adjust.
730 2017-10-10 H.J. Lu <hongjiu.lu@intel.com>
732 * elf32-i386.c (elf_i386_check_relocs): Set GOT refcount to 1
733 instead of incrementing it.
734 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
736 2017-10-10 Renlin Li <renlin.li@arm.com>
739 * elf32-arm.c (allocate_dynrelocs_for_symbol): Only make undefined weak
740 symbols into dynamic.
742 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
745 * elfnn-riscv.c (riscv_elf_link_hash_table): Add max_alignment.
746 (riscv_elf_link_hash_table_create): Initialize max_alignment to
748 (_bfd_riscv_relax_section): Cache the max alignment of output
749 sections if possible.
751 2017-10-10 Alan Modra <amodra@gmail.com>
753 * elf64-ppc.c (ppc64_elf_before_check_relocs): Set sec_type for
754 .opd whenever .opd is present and non-zero size. Move code
755 setting abiversion to/from output file earlier. Only set
756 u.opd.func_sec when --gc-sections. Read relocs and set up
757 u.opd.func_sec values here..
758 (ppc64_elf_check_relocs): ..rather than here. Simplify opd
760 (ppc64_elf_edit_opd): Don't set sec_type for .opd here.
762 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
764 * elf-m10300.c (mn10300_elf_check_relocs): Don't free cached
767 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
769 * elf32-bfin.c (bfin_size_dynamic_sections): Don't create the
770 .interp section with "ld --no-dynamic-linker".
772 2017-10-09 Alan Modra <amodra@gmail.com>
775 * dwarf2.c (_bfd_dwarf2_cleanup_debug_info): Free
776 funcinfo_hash_table and varinfo_hash_table.
778 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
780 * elf32-sh.c (readonly_dynrelocs): Dump dynamic relocation
781 in read-only section with minfo.
782 (sh_elf_size_dynamic_sections): Likewise.
784 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
786 * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Remove
789 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
791 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_sections): Set
792 this_hdr.sh_entsize only if section size > 0.
794 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
796 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Reformat.
798 2017-10-07 H.J. Lu <hongjiu.lu@intel.com>
800 * elfxx-sparc.c (readonly_dynrelocs): Dump dynamic relocation
801 in read-only section with minfo.
802 (_bfd_sparc_elf_size_dynamic_sections): Likewise.
804 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
806 * elfxx-x86.h (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Update
809 2017-10-06 John Baldwin <jhb@FreeBSD.org>
811 * elf-bfd.h (struct elf_backend_data): Add
812 `elf_backend_grok_freebsd_prstatus'.
813 * elf.c (elfcore_grok_freebsd_note): Call
814 `elf_backend_grok_freebsd_prstatus' to handle NT_PRSTATUS if
816 * elfn32-mips.c (elf_n32_mips_grok_freebsd_prstatus): New
818 (elf_backend_grok_freebsd_prstatus): Define.
819 * elfxx-target.h (elf_backend_grok_freebsd_prstatus): Define.
820 (elfNN_bed): Initialize `elf_backend_grok_freebsd_prstatus'.
822 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
824 * elf32-i386.c (elf_i386_check_relocs): Replace has_got_reloc
825 and has_non_got_reloc with zero_undefweak.
826 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
827 * elfxx-x86.c (_bfd_x86_elf_link_hash_newfunc): Initialize
829 (_bfd_x86_elf_copy_indirect_symbol): Replace has_got_reloc and
830 has_non_got_reloc with zero_undefweak.
831 * elfxx-x86.h (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Replace
832 has_got_reloc and has_non_got_reloc with zero_undefweak.
833 (elf_x86_link_hash_entry): Likewise.
835 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
837 * elfxx-x86.h (COPY_INPUT_RELOC_P): Add "do/while(0);".
838 (VERIFY_COPY_RELOC): Likewise.
840 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
842 * elfxx-x86.h (VERIFY_COPY_RELOC): New.
843 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Use it.
844 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
846 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
848 * elfxx-x86.h (VERIFY_PLT_ENTRY): New.
849 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Use it.
850 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
852 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
854 * elfxx-x86.h (COPY_INPUT_RELOC_P): New.
855 * elf32-i386.c (elf_i386_relocate_section): Use it.
856 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
858 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
860 * elf32-i386.c (X86_SIZE_TYPE_P): New.
861 (elf_i386_relocate_section): Use GENERATE_DYNAMIC_RELOCATION_P.
862 * elf64-x86-64.c (X86_SIZE_TYPE_P): New.
863 (elf_x86_64_relocate_section): Use GENERATE_DYNAMIC_RELOCATION_P.
864 * elfxx-x86.h (GENERATE_DYNAMIC_RELOCATION_P): New.
866 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
868 * elfxx-x86.h (POINTER_LOCAL_IFUNC_P): New.
869 (PLT_LOCAL_IFUNC_P): Likewise.
870 * elf32-i386.c (elf_i386_relocate_section): Use them.
871 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
873 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
875 * elfxx-x86.h (GENERATE_RELATIVE_RELOC_P): New.
876 * elf32-i386.c (elf_i386_relocate_section): Use it.
877 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
879 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
881 * elfxx-x86.h (RESOLVED_LOCALLY_P): New.
882 * elf32-i386.c (elf_i386_relocate_section): Use it.
883 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
885 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
887 * elf32-i386.c (X86_PCREL_TYPE_P): New.
888 (elf_i386_check_relocs): Use NEED_DYNAMIC_RELOCATION_P.
889 * elf64-x86-64.c (IS_X86_64_PCREL_TYPE): Renamed to ...
890 (X86_PCREL_TYPE_P): This.
891 (elf_x86_64_check_relocs): Use NEED_DYNAMIC_RELOCATION_P.
892 Replace IS_X86_64_PCREL_TYPE with X86_PCREL_TYPE_P.
893 (elf_x86_64_relocate_section): Replace IS_X86_64_PCREL_TYPE with
895 * elfxx-x86.h (NEED_DYNAMIC_RELOCATION_P): New.
897 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
899 * elfxx-x86.h (TLS_TRANSITION_IE_TO_LE_P): New.
900 * elf32-i386.c (elf_i386_tls_transition): Use it.
901 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
903 2017-10-05 H.J. Lu <hongjiu.lu@intel.com>
905 * elf32-ppc.c (readonly_dynrelocs): Add a link_info argument.
906 Dump dynamic relocation in read-only section with minfo if
908 (ppc_elf_adjust_dynamic_symbol): Pass NULL to readonly_dynrelocs.
909 (maybe_set_textrel): Likewise.
910 (ppc_elf_size_dynamic_sections): Dump dynamic relocation in
911 read-only section with minfo.
913 2017-10-05 John Baldwin <jhb@FreeBSD.org>
915 * elf.c (elfcore_grok_freebsd_note): Handle NT_ARM_VFP.
917 2017-10-05 H.J. Lu <hongjiu.lu@intel.com>
919 * elf32-tilepro.c (readonly_dynrelocs): Dump dynamic relocation
920 in read-only section with minfo.
921 (tilepro_elf_size_dynamic_sections): Likewise.
922 * elfxx-tilegx.c (readonly_dynrelocs): Likewise.
923 (tilegx_elf_size_dynamic_sections): Likewise.
925 2017-10-05 Pedro Alves <palves@redhat.com>
928 * bfd.c (bfd_set_error): Revert 2017-10-04 change. Remove
929 ellipsis parameter. Split out bfd_error_on_input code to..
930 (bfd_set_input_error): .. New function.
931 * archive.c (_bfd_write_archive_contents): Use bfd_set_input_error.
932 * vms-lib.c (_bfd_vms_lib_write_archive_contents): Likewise.
933 * bfd-in2.h: Regenerate.
935 2017-10-05 Alan Modra <amodra@gmail.com>
937 * elflink.c (elf_link_input_bfd): Correct ctor/dtor in init_array/
938 fini_array error value.
940 2017-10-05 Alan Modra <amodra@gmail.com>
943 * elf.c (_bfd_elf_setup_sections): Don't trim reloc sections from
945 (_bfd_elf_init_reloc_shdr): Pass sec_hdr, use it to copy SHF_GROUP
947 (elf_fake_sections): Adjust calls. Exit immediately on failure.
948 (bfd_elf_set_group_contents): Add associated reloc section indices
951 2017-10-04 Alan Modra <amodra@gmail.com>
953 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't sort or
954 classify symbols for ELFv2.
956 2017-10-04 Pavel I. Kryukov <kryukov@frtk.ru>
959 * bfd.c (bfd_set_error): Avoid UB on passing arg to va_start that
960 undergoes default promotion.
961 * bfd-in2.h: Regenerate.
963 2017-10-02 Alan Modra <amodra@gmail.com>
965 * elf32-ppc.c (ppc_elf_relocate_section): Fix comment typo.
966 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
968 2017-10-01 Alan Modra <amodra@gmail.com>
971 * dwarf2.c (new_line_sorts_after): Remove end_sequence comparison.
972 (add_line_info): Always put end_sequence last.
974 2017-10-01 Alan Modra <amodra@gmail.com>
977 * dwarf2.c (read_section): Allocate buffer with extra byte for
978 bfd_simple_get_relocated_section_contents rather than copying
981 2017-09-29 Alan Modra <amodra@gmail.com>
983 * merge.c (merge_strings): Return FALSE on malloc failure.
984 (_bfd_merge_sections): Return failures from record_section and
987 2017-09-28 Alan Modra <amodra@gmail.com>
990 * elflink.c (_bfd_elf_merge_symbol): Set non_ir_ref_dynamic in
991 a case where plugin_notice isn't called.
993 2017-09-27 Kuan-Lin Chen <kuanlinchentw@gmail.com>
995 * elf32-nds32.c (nds32_elf_relax_section): Fix a tautological
998 2017-09-26 H.J. Lu <hongjiu.lu@intel.com>
1001 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't pass
1002 output_bfd to info->callbacks->minfo.
1004 2017-09-26 Nick Clifton <nickc@redhat.com>
1007 * elf64-x86-64.c (elf_x86_64_info_to_howto): Do not trigger an
1008 assertion failure if elf_x86_64_rtype_to_howto has already issued
1011 2017-09-26 Alan Modra <amodra@gmail.com>
1014 * dwarf2.c (read_formatted_entries): Use read_attribute_value to
1017 2017-09-26 Nick Clifton <nickc@redhat.com>
1020 * dwarf2.c (read_formatted_entries): Fail early if we know that
1021 the loop parsing data entries will overflow the end of the
1024 2017-09-26 Alan Modra <amodra@gmail.com>
1027 * dwarf2.c (struct comp_unit): Delete sec_info_ptr field.
1028 (find_abstract_instance_name): Calculate DW_FORM_ref_addr relative
1029 to stash->info_ptr_memory, and check die_ref is within that memory.
1030 Set info_ptr_end correctly when another CU is refd. Check die_ref
1031 for DW_FORM_ref4 etc. is within CU.
1033 2017-09-26 Alan Modra <amodra@gmail.com>
1036 * dwarf2.c (concat_filename): Return "<unknown>" on NULL filename.
1037 (read_formatted_entries): Init "fe".
1038 (decode_line_info <DW_LNE_define_file>): Use line_info_add_file_name.
1040 2017-09-26 Alan Modra <amodra@gmail.com>
1043 * dwarf2.c (decode_line_info): Ensure line_ptr stays within
1044 bounds in inner loop.
1046 2017-09-25 Alan Modra <amodra@gmail.com>
1049 * dwarf1.c (parse_die): Sanity check pointer against section limit
1050 before dereferencing.
1051 (parse_line_table): Likewise.
1053 2017-09-25 Alan Modra <amodra@gmail.com>
1056 * dwarf2.c (scan_unit_for_symbols): Ignore DW_AT_name unless it
1058 (parse_comp_unit): Likewise.
1060 2017-09-25 Alan Modra <amodra@gmail.com>
1063 * dwarf2.c (read_formatted_entries): Error on format_count zero.
1065 2017-09-24 Alan Modra <amodra@gmail.com>
1068 * opncls.c (bfd_get_debug_link_info_1): Properly check that crc is
1069 within section bounds.
1071 2017-09-24 Alan Modra <amodra@gmail.com>
1074 * dwarf2.c (decode_line_info): Properly free line sequences on error.
1076 2017-09-24 Alan Modra <amodra@gmail.com>
1079 * dwarf2.c (find_abstract_instance_name): Add orig_info_ptr and
1080 pname param. Return status. Make name const. Don't abort,
1081 return an error. Formatting. Exit if current info_ptr matches
1082 orig_info_ptr. Update callers.
1083 (scan_unit_for_symbols): Start at nesting_level of zero. Make
1084 nested_funcs an array of structs for extensibility. Formatting.
1086 2017-09-24 Alan Modra <amodra@gmail.com>
1089 * dwarf2.c (decode_line_info): Fail on lh.line_range of zero
1090 rather than dividing by zero.
1092 2017-09-24 Alan Modra <amodra@gmail.com>
1095 * dwarf2.c (decode_line_info): Correct .debug_line unit_length check.
1097 2017-09-24 Alan Modra <amodra@gmail.com>
1100 * dwarf2.c (scan_unit_for_symbols): Check u.blk->data is non-NULL.
1102 2017-09-24 Alan Modra <amodra@gmail.com>
1105 * elf.c (_bfd_elf_slurp_version_tables): Test sh_info on
1106 SHT_GNU_verneed section for sanity. Don't zalloc memory for
1109 2017-09-22 H.J. Lu <hongjiu.lu@intel.com>
1112 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Guard against
1115 2017-09-22 H.J. Lu <hongjiu.lu@intel.com>
1118 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Also return
1119 -1 if bfd_canonicalize_dynamic_reloc returns 0.
1121 2017-09-22 Pedro Alves <palves@redhat.com>
1122 Alan Modra <amodra@gmail.com>
1124 * version.h: Add comment.
1126 2017-09-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1128 * elf.c (elfcore_grok_note): For the cases NT_S390_GS_CB and
1129 NT_S390_GS_BC, correct the previously swapped invocations of
1130 elfcore_grok_s390_gs_bc and elfcore_grok_s390_gs_cb.
1132 2017-09-19 Alan Modra <amodra@gmail.com>
1135 * elf64-ppc.c (ppc64_elf_build_stubs): Don't check glink_eh_frame
1138 2017-09-19 Alan Modra <amodra@gmail.com>
1141 * elflink.c (bfd_elf_size_dynamic_sections): Garbage collect
1142 symbols before calculating verrefs. Don't renumber dynsyms
1143 after gc. Exclude .gnu.version when zero or one dynsym.
1144 Localize some vars and reindent.
1146 2017-09-18 H.J. Lu <hongjiu.lu@intel.com>
1149 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Check error
1150 return from bfd_canonicalize_dynamic_reloc.
1152 2017-09-15 Alan Modra <amodra@gmail.com>
1155 * archive.c (bfd_ar_hdr_from_filesystem): Detect when status.st_size
1156 overflows bfd_size_type.
1158 2017-09-14 H.J. Lu <hongjiu.lu@intel.com>
1161 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument
1162 to indicate if conversion is performed.
1163 (elf_i386_check_relocs): Cache section contents and relocations
1164 if conversion is performed.
1165 * elf64-x86-64.c (elf_x86_64_check_relocs): Cache section
1166 contents and relocations if conversion is performed.
1168 2017-09-14 Nick Clifton <nickc@redhat.com>
1171 * peXXigen.c (pe_print_idata): Extend check for HintName vector
1174 2017-09-13 H.J. Lu <hongjiu.lu@intel.com>
1176 * elfxx-x86.h: Fix a typo in comments.
1178 2017-09-09 Kamil Rytarowski <n54@gmx.com>
1180 * elf32-nds32.c: Rename __BIT() to N32_BIT().
1182 2017-09-09 Alan Modra <amodra@gmail.com>
1184 * elf64-ppp.c (plt_stub_pad): Handle positive and negative
1187 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
1189 * elf32-i386.c (elf_i386_relocate_section): Update usage of
1190 UNDEFINED_WEAK_RESOLVED_TO_ZERO.
1191 (elf_i386_finish_dynamic_symbol): Likewise.
1192 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1193 (elf_x86_64_finish_dynamic_symbol): Likewise.
1194 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Likewise.
1195 (_bfd_x86_elf_fixup_symbol): Likewise.
1197 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
1199 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
1200 check has_non_got_reloc.
1202 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
1205 * elf32-i386.c (elf_i386_convert_load_reloc): Check linker_def.
1206 Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
1207 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Check
1208 linker_def. Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
1209 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Set local_ref
1210 and linker_def on __ehdr_start if it is referenced and not
1212 (_bfd_x86_elf_link_symbol_references_local): Also set local_ref
1213 and return TRUE when building executable, if a symbol has
1214 non-GOT/non-PLT relocations in text section or there is no
1216 * elfxx-x86.h (elf_x86_link_hash_entry): Add linker_def.
1218 2017-09-08 H.J. Lu <hongjiu.lu@intel.com>
1220 * elfxx-x86.h: Update comments.
1222 2017-09-08 H.J. Lu <hongjiu.lu@intel.com>
1224 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Replace
1225 elf_x86_plt_layout_table with elf_x86_init_table.
1226 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
1228 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties):
1230 * elfxx-x86.h (elf_x86_plt_layout_table): Renamed to ...
1231 (elf_x86_init_table): This.
1232 (_bfd_x86_elf_link_setup_gnu_properties): Replace
1233 elf_x86_plt_layout_table with elf_x86_init_table.
1235 2017-09-07 H.J. Lu <hongjiu.lu@intel.com>
1237 * configure.ac (bfd_backends): Don't add elf64-x86-64.lo nor
1238 elf64.lo together with elfxx-x86.lo for 64-bit BFD.
1239 * configure: Regenerated.
1240 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set r_info
1241 and r_sym fields of plt_layout.
1242 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
1244 * elfxx-x86.c (elf_x86_64_is_reloc_section): Remove BFD64 check.
1245 (_bfd_x86_elf_link_hash_table_create): Likewise. Don't set
1246 r_info nor r_sym fields.
1247 (_bfd_x86_elf_link_setup_gnu_properties): Set r_info and r_sym
1249 * elfxx-x86.h (elf_x86_plt_layout_table): Add r_info and r_sym.
1251 2017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
1253 * (_bfd_riscv_relax_align): Call bfd_set_error and
1254 print an error message when unable to relax a .align directive.
1256 2017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
1258 * elfnn-riscv.c (riscv_zero_pcrel_hi_reloc): New function.
1259 (riscv_record_pcrel_hi_reloc): Add absolute argument.
1260 (riscv_elf_relocate_section): Call riscv_zero_pcrel_hi_reloc for
1261 R_RISCV_PCREL_HI20 relocs, and pass the result to
1262 riscv_record_pcrel_hi_reloc.
1264 2017-09-07 H.J. Lu <hongjiu.lu@intel.com>
1266 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument,
1267 r_type_p. Remove the converted argument. Replace
1268 SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P. Return
1269 the new relocation type via r_type_p.
1270 (elf_i386_relocate_section): Likewise.
1271 (elf_i386_finish_dynamic_symbol): Likewise.
1272 (need_convert_load): Removed.
1273 (check_relocs_failed): Updated.
1274 (elf_i386_check_relocs): Call elf_i386_convert_load_reloc,
1275 instead of setting need_convert_load.
1276 (_bfd_i386_elf_convert_load): Removed.
1277 * elf64-x86-64.c (need_convert_load): Removed.
1278 (check_relocs_failed): Updated.
1279 (elf_x86_64_convert_load_reloc): Add an argument, r_type_p.
1280 Replace SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P.
1281 Return the new relocation type via r_type_p.
1282 (elf_x86_64_check_relocs): Call elf_x86_64_convert_load_reloc,
1283 instead of setting need_convert_load.
1284 (elf_x86_64_check_relocs): Don't check PIC if relocation has
1286 (_bfd_x86_64_elf_convert_load): Removed.
1287 (elf_x86_64_relocate_section): Replace SYMBOL_REFERENCES_LOCAL
1288 with SYMBOL_REFERENCES_LOCAL_P.
1289 (elf_x86_64_finish_dynamic_symbol): Likewise.
1290 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Don't
1292 (_bfd_x86_elf_size_dynamic_sections): Don't call convert_load.
1293 (_bfd_x86_elf_link_symbol_references_local): New function.
1294 * elfxx-x86.h (SYMBOL_REFERENCES_LOCAL_P): New.
1295 (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Replace elf.forced_local with
1296 SYMBOL_REFERENCES_LOCAL_P.
1297 (elf_x86_link_hash_entry): Add local_ref.
1298 (elf_x86_link_hash_table): Remove convert_load.
1299 (_bfd_i386_elf_convert_load): Removed.
1300 (_bfd_x86_64_elf_convert_load): Likewise.
1301 (_bfd_x86_elf_link_symbol_references_local): New.
1303 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
1305 * elf64-x86-64.c (R_X86_64_converted_reloc_bit): New.
1306 (elf_x86_64_info_to_howto): Get the real relocation type by
1307 masking out R_X86_64_converted_reloc_bit.
1308 (elf_x86_64_check_tls_transition): Get the real relocation type
1309 by masking out R_X86_64_converted_reloc_bit.
1310 (elf_x86_64_convert_load_reloc): Set R_X86_64_converted_reloc_bit
1311 instead of setting converted_reloc.
1312 (elf_x86_64_relocate_section): Check R_X86_64_converted_reloc_bit
1313 instead of converted_reloc. Get the real relocation type by
1314 masking out R_X86_64_converted_reloc_bit.
1315 (elf_x86_64_link_setup_gnu_properties): Verify that the value of
1316 R_X86_64_converted_reloc_bit is valid.
1317 * elfxx-x86.h (converted_reloc): Removed.
1319 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
1321 * elf32-i386.c (elf_i386_relocate_section): Don't change r_type
1322 when calling elf_i386_tls_transition. Don't use ELF32_R_TYPE
1323 to get the relocation type again.
1324 * elf64-x86-64.c (elf_x86_64_relocate_section): Don't change
1325 r_type when calling elf_x86_64_tls_transition. Don't use
1326 ELF32_R_TYPE to get the relocation type again.
1328 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
1330 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Properly set
1333 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
1335 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Remove the sec
1336 argument. Don't check relocation overflow. Avoid relocation
1337 overflow if --no-relax is used. Set converted_reloc on symbol
1338 if a GOTPCREL relocation is converted.
1339 (elf_x86_64_relocate_section): Issue a fatal error and suggest
1340 --no-relax if GOTPCREL relocation conversion leads to relocation
1342 * elfxx-x86.h (elf_x86_link_hash_entry): Add converted_reloc.
1344 2017-09-05 Alexander Fedotov <alexander.fedotov@nxp.com>
1345 Edmar Wienskoski <edmar.wienskoski@nxp.com
1347 * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_VLE_ADDR20.
1348 (ppc_elf_check_relocs): Handle it.
1349 (ppc_elf_vle_split20): New function.
1350 (ppc_elf_relocate_section): Handle R_PPC_VLE_ADDR20.
1352 2017-09-03 H.J. Lu <hongjiu.lu@intel.com>
1355 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Set tlsdesc_plt
1356 for x86-64 if GOT_TLS_GDESC_P is true.
1358 2017-09-03 Alan Modra <amodra@gmail.com>
1361 * elfxx-x86.h (elf_x86_hash_table): Check is_elf_hash_table first.
1363 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1365 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1366 tls_get_addr for x86-64 in one place.
1368 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1370 * configure.ac (bfd_backends): Add elf64-x86-64.lo together
1371 with elfxx-x86.lo for 64-bit BFD.
1372 * configure: Regenerated.
1374 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1376 * elf32-i386.c (elf_i386_convert_load): Renamed to ...
1377 (_bfd_i386_elf_convert_load): This. Remove static.
1378 (elf_i386_size_dynamic_sections): Removed.
1379 (elf_backend_size_dynamic_sections): Likewise.
1380 * elf64-x86-64.c (elf_x86_64_convert_load): Renamed to ...
1381 (_bfd_x86_64_elf_convert_load): This. Remove static.
1382 (elf_x86_64_size_dynamic_sections): Removed.
1383 (elf_backend_size_dynamic_sections): Likewise.
1384 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): Renamed to ...
1385 (elf_x86_allocate_dynrelocs): This. Make it static.
1386 (_bfd_x86_elf_allocate_local_dynrelocs): Renamed to ...
1387 (elf_x86_allocate_local_dynreloc): This. Make it static.
1388 (elf_i386_is_reloc_section): New function.
1389 (elf_x86_64_is_reloc_section): Likewise.
1390 (_bfd_x86_elf_link_hash_table_create): Initialize convert_load,
1391 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
1392 Rearrange got_entry_size initialization.
1393 (_bfd_x86_elf_size_dynamic_sections): New function.
1394 * elfxx-x86.h (elf_x86_link_hash_table): Add convert_load,
1395 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
1396 (_bfd_i386_elf_convert_load): New.
1397 (_bfd_x86_64_elf_convert_load): Likewise.
1398 (_bfd_x86_elf_size_dynamic_sections): Likewise.
1399 (elf_backend_size_dynamic_sections): Likewise.
1400 (_bfd_x86_elf_allocate_dynrelocs): Removed.
1401 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
1403 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1405 * elfxx-x86.h (elf_x86_link_hash_table): Rearrange fields and
1408 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1410 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
1411 sgotplt_jump_table_size with elf_x86_compute_jump_table_size.
1413 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1415 * elf32-i386.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
1416 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Moved to ...
1417 * elfxx-x86.h (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
1418 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Here.
1419 * elf64-x86-64.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
1420 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Removed.
1422 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1424 * elf32-i386.c (elf_i386_allocate_dynrelocs): Removed.
1425 (elf_i386_allocate_local_dynrelocs): Likewise.
1426 (elf_i386_size_dynamic_sections): Replace
1427 elf_i386_allocate_dynrelocs/elf_i386_allocate_local_dynrelocs
1428 with _bfd_x86_elf_allocate_dynrelocs and
1429 _bfd_x86_elf_allocate_local_dynrelocs.
1430 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Removed.
1431 (elf_x86_64_allocate_local_dynrelocs): Likewise.
1432 (elf_x86_64_size_dynamic_sections): Replace
1433 elf_x86_64_allocate_dynrelocs/elf_x86_64_allocate_local_dynrelocs
1434 with _bfd_x86_elf_allocate_dynrelocs and
1435 _bfd_x86_elf_allocate_local_dynrelocs.
1436 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): New function.
1437 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
1438 * elfxx-x86.h (_bfd_x86_elf_allocate_dynrelocs): New prototype.
1439 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
1441 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1443 * elf32-i386.c (is_i386_elf): Removed.
1444 (elf_i386_check_relocs): Replace is_i386_elf with is_x86_elf.
1445 (elf_i386_size_dynamic_sections): Likewise.
1446 (elf_i386_relocate_section): Likewise.
1447 * elf64-x86-64.c (is_x86_64_elf): Removed.
1448 (elf_x86_64_check_relocs): Replace is_x86_64_elf with
1450 (elf_x86_64_size_dynamic_sections): Likewise.
1451 (elf_x86_64_relocate_section): Likewise.
1452 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1454 * elfxx-x86.h (elf_x86_link_hash_table): Add target_id.
1457 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1459 * elf32-i386.c (elf_i386_compute_jump_table_size): Removed.
1460 (elf_i386_allocate_dynrelocs): Replace
1461 elf_i386_compute_jump_table_size with
1462 elf_x86_compute_jump_table_size.
1463 (elf_i386_size_dynamic_sections): Likewise.
1464 * elf64-x86-64.c (elf_x86_64_compute_jump_table_size): Removed.
1465 (elf_x86_64_allocate_dynrelocs): Replace
1466 elf_x86_64_compute_jump_table_size with
1467 elf_x86_compute_jump_table_size.
1468 (elf_x86_64_size_dynamic_sections): Likewise.
1469 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1471 * elfxx-x86.h (elf_x86_link_hash_table): Add got_entry_size.
1472 (elf_x86_compute_jump_table_size): New.
1474 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1476 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1478 (_bfd_x86_elf_adjust_dynamic_symbol): Use sizeof_reloc.
1479 * elfxx-x86.h (elf_x86_link_hash_table): Add sizeof_reloc.
1481 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1483 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check VxWorks
1484 with htab->is_vxworks.
1485 (elf_i386_size_dynamic_sections): Likewise.
1486 (elf_i386_relocate_section): Likewise.
1487 (elf_i386_finish_dynamic_symbol): Likewise.
1488 (elf_i386_finish_dynamic_sections): Likewise.
1490 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1492 * elf32-i386.c (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
1493 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
1494 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Moved to ...
1495 * elfxx-x86.h (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
1496 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
1497 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Here.
1498 * elf64-x86-64.c (GOT_TLS_IE, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
1499 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Removed.
1501 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1504 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Check
1505 ELF_COMMON_DEF_P for common symbols.
1507 2017-09-02 Alan Modra <amodra@gmail.com>
1509 * elf-eh-frame.c (offset_adjust): Avoid false positive gcc warning.
1510 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Likewise.
1511 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
1513 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1515 * elf32-i386.c (elf_i386_gc_mark_hook): Removed.
1516 (elf_backend_gc_mark_hook): Likewise.
1517 * elf64-x86-64.c (elf_x86_64_gc_mark_hook): Likewise.
1518 (elf_backend_gc_mark_hook): Likewise.
1519 * elfxx-x86.c (_bfd_x86_elf_gc_mark_hook): New function.
1520 * elfxx-x86.h (_bfd_x86_elf_gc_mark_hook): New.
1521 (elf_backend_gc_mark_hook): Likewise.
1523 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1525 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Removed.
1526 (elf_backend_adjust_dynamic_symbol): Likewise.
1527 * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise.
1528 (elf_backend_adjust_dynamic_symbol): Likewise.
1529 * elfxx-x86.c (_bfd_x86_elf_adjust_dynamic_symbol): New function.
1530 (_bfd_x86_elf_link_setup_gnu_properties): Copy is_vxworks.
1531 * elfxx-x86.h (elf_x86_link_hash_table): Add is_vxworks.
1532 (_bfd_x86_elf_adjust_dynamic_symbol): New.
1533 (elf_backend_adjust_dynamic_symbol): Likewise.
1535 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1537 * elfxx-x86.h (elf_x86_plt_layout_table): Fix a typo in
1540 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1542 * elf32-i386.c (elf_i386_mkobject): Removed.
1543 (bfd_elf32_mkobject): Likewise.
1544 * elf64-x86-64.c (elf_x86_64_mkobject): Likewise.
1545 (bfd_elf64_mkobject): Likewise.
1546 (bfd_elf32_mkobject): Likewise.
1547 * elfxx-x86.c (_bfd_x86_elf_mkobject): New function.
1548 * elfxx-x86.h (_bfd_x86_elf_mkobject): New.
1549 (bfd_elf64_mkobject): Likewise.
1550 (bfd_elf32_mkobject): Likewise.
1552 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1554 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Updated.
1555 Call _bfd_x86_elf_link_setup_gnu_properties.
1556 * elf64-x86-64.c (elf_x86_lazy_plt_layout): Initialize
1557 pic_plt0_entry and pic_plt_entry fields with the non-PIC PLT
1559 (elf_x86_64_non_lazy_plt): Likewise.
1560 (elf_x86_64_lazy_bnd_plt): Likewise.
1561 (elf_x86_64_non_lazy_bnd_plt): Likewise.
1562 (elf_x86_64_lazy_ibt_plt): Likewise.
1563 (elf_x32_lazy_ibt_plt): Likewise.
1564 (elf_x86_64_non_lazy_ibt_plt): Likewise.
1565 (elf_x32_non_lazy_ibt_plt): Likewise.
1566 (elf_x86_64_nacl_plt): Likewise.
1567 (elf_x86_64_link_setup_gnu_properties): Updated. Call
1568 _bfd_x86_elf_link_setup_gnu_properties.
1569 * elfxx-x86.c: Include elf-vxworks.h".
1570 (_bfd_x86_elf_link_setup_gnu_properties): New function.
1571 * elfxx-x86.h (elf_x86_lazy_plt_layout): Remove "for i386 only"
1572 comments for pic_plt0_entry and pic_plt_entry.
1573 (elf_x86_non_lazy_plt_layout): Likewise.
1574 (elf_x86_plt_layout_table): New.
1575 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
1577 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1580 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Create
1581 .eh_frame section for the second PLT.
1582 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Correct
1583 alignment of .eh_frame section for the second PLT.
1585 2017-09-01 Nick Clifton <nickc@redhat.com>
1588 * dwarf2.c (decode_line_info): Fix test for an overlong line info
1591 2017-09-01 Nick Clifton <nickc@redhat.com>
1594 * elf-attrs.c (_bfd_elf_parse_attributes): Ensure that the
1595 attribute buffer is NUL terminated.
1597 2017-08-31 Nick Clifton <nickc@redhat.com>
1600 * dwarf2.c (read_section): If necessary add a terminating NUL byte
1601 to dwarf string sections.
1603 2017-08-31 Alan Modra <amodra@gmail.com>
1605 * po/SRC-POTFILES.in: Regenerate.
1607 2017-08-31 Alan Modra <amodra@gmail.com>
1609 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Don't exit early
1610 for a section containing just a terminator. Allow multiple
1611 terminators at end of section.
1612 * elflink.c (bfd_elf_discard_info): Iterate over .eh_frame
1613 sections when not adding alignment. Assert on terminator in
1616 2017-08-31 Alan Modra <amodra@gmail.com>
1620 * elflink.c (bfd_elf_discard_info): Don't pad embedded zero
1623 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1625 * configure.ac (bfd_backends): Add elf64.lo together with
1626 elfxx-x86.lo for 64-bit BFD.
1627 * configure: Regenerated.
1629 2017-08-31 James Bowman <james.bowman@ftdichip.com>
1631 * elf32-ft32.c (ft32_elf_howto_table): Use complain_overflow_dont
1634 2017-08-31 Alan Modra <amodra@gmail.com>
1637 * opncls.c (bfd_close_all_done): Don't call bfd_cache_close
1638 before _close_and_cleanup. Call iovec->bclose after.
1639 (bfd_close): Remove code common to, and call, bfd_close_all_done.
1641 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1643 * elf32-i386.c (elf_i386_plt_type): Removed.
1644 (elf_i386_plt): Likewise.
1645 (elf_i386_get_synthetic_symtab): Updated. Call
1646 _bfd_x86_elf_get_synthetic_symtab.
1647 * elf64-x86-64.c (elf_x86_64_plt_type): Removed.
1648 (elf_x86_64_plt): Likewise.
1649 (elf_x86_64_get_synthetic_symtab): Updated. Call
1650 _bfd_x86_elf_get_synthetic_symtab.
1651 * elfxx-x86.c (elf_i386_get_plt_got_vma): New function.
1652 (elf_x86_64_get_plt_got_vma): Likewise.
1653 (elf_i386_valid_plt_reloc_p): Likewise.
1654 (elf_x86_64_valid_plt_reloc_p): Likewise.
1655 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
1656 * elfxx-x86.h (elf_x86_plt_type): New.
1657 (elf_x86_plt): Likewise.
1658 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
1660 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1662 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Check
1663 target_id instead of elf_machine_code.
1665 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1667 * elf32-i386.c (ELF_DYNAMIC_INTERPRETER): Removed.
1668 (elf_i386_lazy_plt_layout): Likewise.
1669 (elf_i386_non_lazy_plt_layout): Likewise.
1670 (elf_i386_plt_layout): Likewise.
1671 (elf_i386_link_hash_table): Likewise.
1672 (elf_i386_next_tls_desc_index): Likewise.
1673 (elf_i386_srelplt2): Likewise.
1674 (elf_i386_plt): Likewise.
1675 (elf_i386_lazy_plt): Likewise.
1676 (elf_i386_non_lazy_plt): Likewise.
1677 (elf_i386_link_hash_table_create): Likewise.
1678 (bfd_elf32_bfd_link_hash_table_create): Likewise.
1679 (elf_i386_lazy_plt): Updated.
1680 (elf_i386_non_lazy_plt): Likewise.
1681 (elf_i386_lazy_ibt_plt): Likewise.
1682 (elf_i386_non_lazy_ibt_plt): Likewise.
1683 (elf_i386_allocate_dynrelocs): Likewise.
1684 (elf_i386_size_dynamic_sections): Likewise.
1685 (elf_i386_relocate_section): Likewise.
1686 (elf_i386_finish_dynamic_symbol): Likewise.
1687 (elf_i386_finish_dynamic_sections): Likewise.
1688 (elf_i386_get_synthetic_symtab): Likewise.
1689 (elf_i386_link_setup_gnu_properties): Likewise.
1690 (elf_i386_nacl_plt): Likewise.
1691 * elf64-x86-64.c (ABI_64_P): Removed.
1692 (ELF64_DYNAMIC_INTERPRETER): Likewise.
1693 (ELF32_DYNAMIC_INTERPRETER): Likewise.
1694 (elf_x86_64_lazy_plt_layout): Likewise.
1695 (elf_x86_64_non_lazy_plt_layout): Likewise.
1696 (elf_x86_64_plt_layout): Likewise.
1697 (elf_x86_64_link_hash_table): Likewise.
1698 (elf_x86_64_plt): Likewise.
1699 (elf_x86_64_lazy_plt): Likewise.
1700 (elf_x86_64_non_lazy_plt): Likewise.
1701 (elf_x86_64_link_hash_table_create): Likewise.
1702 (bfd_elf64_bfd_link_hash_table_create): Likewise.
1703 (bfd_elf32_bfd_link_hash_table_create): Likewise.
1704 (elf_x86_64_lazy_plt): Updated.
1705 (elf_x86_64_non_lazy_plt): Likewise.
1706 (elf_x86_64_lazy_bnd_plt): Likewise.
1707 (elf_x86_64_non_lazy_bnd_plt): Likewise.
1708 (elf_x86_64_lazy_ibt_plt): Likewise.
1709 (elf_x32_lazy_ibt_plt): Likewise.
1710 (elf_x86_64_non_lazy_ibt_plt): Likewise.
1711 (elf_x32_non_lazy_ibt_plt): Likewise.
1712 (elf_x86_64_allocate_dynrelocs): Likewise.
1713 (elf_x86_64_size_dynamic_sections): Likewise.
1714 (elf_x86_64_relocate_section): Likewise.
1715 (elf_x86_64_finish_dynamic_symbol): Likewise.
1716 (elf_x86_64_finish_dynamic_sections): Likewise.
1717 (elf_x86_64_get_synthetic_symtab): Likewise.
1718 (elf_x86_64_link_setup_gnu_properties): Likewise.
1719 (elf_x86_64_nacl_plt): Likewise.
1720 * elfxx-x86.c: Include "objalloc.h", "elf/i386.h" and
1722 (ELF32_DYNAMIC_INTERPRETER): New.
1723 (ELF64_DYNAMIC_INTERPRETER): Likewise.
1724 (ELFX32_DYNAMIC_INTERPRETER): Likewise.
1725 (_bfd_x86_elf_link_hash_table_create): Likewise.
1726 (_bfd_x86_elf_link_hash_table_free): Renamed to ...
1727 (elf_x86_link_hash_table_free): This. Make it static.
1728 * elfxx-x86.h: Don't include "objalloc.h".
1730 (elf_x86_lazy_plt_layout): Likewise.
1731 (elf_x86_non_lazy_plt_layout): Likewise.
1732 (elf_x86_plt_layout): Likewise.
1733 (_bfd_x86_elf_link_hash_table_create): Likewise.
1734 (bfd_elf64_bfd_link_hash_table_create): Likewise.
1735 (bfd_elf32_bfd_link_hash_table_create): Likewise.
1736 (elf_x86_link_hash_table): Add plt, lazy_plt, non_lazy_plt,
1737 srelplt2 and next_tls_desc_index.
1738 (_bfd_x86_elf_link_hash_table_free): Removed.
1740 2017-08-30 Maciej W. Rozycki <macro@imgtec.com>
1742 * elfxx-mips.c (mips_elf_perform_relocation): Correct microMIPS
1743 branch offset interpretation.
1745 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1748 * opncls.c (bfd_close_all_done): Call _close_and_cleanup.
1750 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1752 * elf64-x86-64.c (elf_x86_64_next_tls_desc_index): Removed.
1753 (elf_x86_64_srelplt2): Likewise.
1755 2017-08-30 Alan Modra <amodra@gmail.com>
1757 * elf64-ppc.c (struct ppc_link_hash_table): Add do_tls_opt.
1758 (ppc64_elf_tls_optimize): Set it.
1759 (ppc64_elf_relocate_section): Nop addis on TPREL16_HA, and convert
1760 insn on TPREL16_LO and TPREL16_LO_DS relocs to use r13 when
1761 addis would add zero.
1762 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add do_tls_opt.
1763 (ppc_elf_tls_optimize): Set it.
1764 (ppc_elf_relocate_section): Nop addis on TPREL16_HA, and convert
1765 insn on TPREL16_LO relocs to use r2 when addis would add zero.
1767 2017-08-30 Alan Modra <amodra@gmail.com>
1769 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing
1770 __tls_get_addr call sequences to LE, don't move the addi down
1771 to the nop. Replace the bl with addi and leave the nop alone.
1773 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1775 * elf32-i386.c (elf_i386_pie_finish_undefweak_symbol):
1777 * elf64-x86-64.c (elf_x86_64_finish_local_dynamic_symbol):
1779 (elf_x86_64_pie_finish_undefweak_symbol): Likewise.
1781 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1783 * Makefile.am (BFD32_BACKENDS): Add elfxx-x86.lo.
1784 (BFD64_BACKENDS): Likewise.
1785 (BFD32_BACKENDS_CFILES): Add elfxx-x86.c.
1786 (BFD64_BACKENDS_CFILES): Likewise.
1787 * Makefile.in: Regenerated.
1788 * configure.ac (bfd_backends): Add elfxx-x86.lo together with
1789 elf32-i386.lo and elf64-x86-64.lo.
1790 * configure: Regenerated.
1791 * elf32-i386.c: Include "elfxx-x86.h" instead of "sysdep.h",
1792 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
1793 "objalloc.h" and "hashtab.h".
1794 (ELIMINATE_COPY_RELOCS): Removed.
1795 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
1796 (SYMBOL_NO_COPYRELOC): Likewise.
1797 (elf_i386_link_hash_entry): Likewise.
1798 (GOT_UNKNOWN): Likewise.
1799 (GOT_NORMAL): Likewise.
1800 (GOT_TLS_GD): Likewise.
1801 (elf_i386_hash_entry): Likewise.
1802 (elf_i386_obj_tdata): Likewise.
1803 (elf_i386_tdata): Likewise.
1804 (elf_i386_local_got_tls_type): Likewise.
1805 (elf_i386_local_tlsdesc_gotent): Likewise.
1806 (elf_i386_hash_table): Likewise.
1807 (elf_i386_link_hash_newfunc): Likewise.
1808 (elf_i386_local_htab_hash): Likewise.
1809 (elf_i386_local_htab_eq): Likewise.
1810 (elf_i386_get_local_sym_hash): Likewise.
1811 (elf_i386_link_hash_table_free): Likewise.
1812 (elf_i386_copy_indirect_symbol): Likewise.
1813 (elf_i386_fixup_symbol): Likewise.
1814 (elf_i386_readonly_dynrelocs): Likewise.
1815 (elf_i386_always_size_sections): Likewise.
1816 (elf_i386_set_tls_module_base): Likewise.
1817 (elf_i386_dtpoff_base): Likewise.
1818 (compare_relocs): Likewise.
1819 (elf_i386_hash_symbol): Likewise.
1820 (elf_i386_parse_gnu_properties): Likewise.
1821 (elf_i386_merge_gnu_properties): Likewise.
1822 (elf_i386_link_check_relocs): Likewise.
1823 (elf_i386_merge_symbol_attribute): Likewise.
1824 (bfd_elf32_bfd_link_check_relocs): Likewise.
1825 (elf_backend_copy_indirect_symbol): Likewise.
1826 (elf_backend_always_size_sections): Likewise.
1827 (elf_backend_omit_section_dynsym): Likewise.
1828 (elf_backend_hash_symbol): Likewise.
1829 (elf_backend_fixup_symbol): Likewise.
1830 (elf_backend_parse_gnu_properties): Likewise.
1831 (elf_backend_merge_gnu_properties): Likewise.
1832 (elf_backend_merge_symbol_attribute): Likewise.
1833 (elf_i386_mkobject): Updated.
1834 (elf_i386_link_hash_table_create): Likewise.
1835 (elf_i386_check_tls_transition): Likewise.
1836 (elf_i386_tls_transition): Likewise.
1837 (elf_i386_convert_load_reloc): Likewise.
1838 (elf_i386_check_relocs): Likewise.
1839 (elf_i386_adjust_dynamic_symbol): Likewise.
1840 (elf_i386_allocate_dynrelocs): Likewise.
1841 (elf_i386_convert_load): Likewise.
1842 (elf_i386_size_dynamic_sections): Likewise.
1843 (elf_i386_relocate_section): Likewise.
1844 (elf_i386_finish_dynamic_symbol ): Likewise.
1845 (elf_i386_finish_dynamic_sections): Likewise.
1846 (elf_i386_output_arch_local_syms): Likewise.
1847 (elf_i386_get_synthetic_symtab): Likewise.
1848 (elf_i386_link_setup_gnu_properties): Likewise.
1849 (elf_i386_link_hash_table): Use elf_x86_link_hash_table, instead
1850 of elf_link_hash_table, as base.
1851 (elf_i386_next_tls_desc_index): New.
1852 (elf_i386_srelplt2): Likewise.
1853 (elf_i386_plt): Likewise.
1854 (elf_i386_lazy_plt): Likewise.
1855 (elf_i386_non_lazy_plt): Likewise.
1856 * elf32-x86-64.c: Include "elfxx-x86.h" instead of "sysdep.h",
1857 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
1858 "objalloc.h" and "hashtab.h".
1859 (ELIMINATE_COPY_RELOCS): Removed.
1860 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
1861 (SYMBOL_NO_COPYRELOC): Likewise.
1862 (elf_x86_64_link_hash_entry): Likewise.
1863 (GOT_UNKNOWN): Likewise.
1864 (GOT_NORMAL): Likewise.
1865 (GOT_TLS_GD): Likewise.
1866 (elf_x86_64_hash_entry): Likewise.
1867 (elf_x86_64_obj_tdata): Likewise.
1868 (elf_x86_64_tdata): Likewise.
1869 (elf_x86_64_local_got_tls_type): Likewise.
1870 (elf_x86_64_local_tlsdesc_gotent): Likewise.
1871 (elf_x86_64_hash_table): Likewise.
1872 (elf_x86_64_link_hash_newfunc): Likewise.
1873 (elf_x86_64_local_htab_hash): Likewise.
1874 (elf_x86_64_local_htab_eq): Likewise.
1875 (elf_x86_64_get_local_sym_hash): Likewise.
1876 (elf_x86_64_link_hash_table_free): Likewise.
1877 (elf_x86_64_copy_indirect_symbol): Likewise.
1878 (elf_x86_64_fixup_symbol): Likewise.
1879 (elf_x86_64_readonly_dynrelocs): Likewise.
1880 (elf_x86_64_always_size_sections): Likewise.
1881 (elf_x86_64_set_tls_module_base): Likewise.
1882 (elf_x86_64_dtpoff_base): Likewise.
1883 (compare_relocs): Likewise.
1884 (elf_x86_64_merge_symbol_attribute): Likewise.
1885 (elf_x86_64_hash_symbol): Likewise.
1886 (elf_x86_64_parse_gnu_properties): Likewise.
1887 (elf_x86_64_merge_gnu_properties): Likewise.
1888 (elf_x86_64_link_check_relocs): Likewise.
1889 (elf_backend_copy_indirect_symbol): Likewise.
1890 (elf_backend_always_size_sections): Likewise.
1891 (bfd_elf64_bfd_link_check_relocs): Likewise.
1892 (elf_backend_merge_symbol_attribute): Likewise.
1893 (elf_backend_hash_symbol): Likewise.
1894 (elf_backend_omit_section_dynsym): Likewise.
1895 (elf_backend_fixup_symbol): Likewise.
1896 (elf_backend_parse_gnu_properties): Likewise.
1897 (elf_backend_merge_gnu_properties): Likewise.
1898 (bfd_elf32_bfd_link_check_relocs): Likewise.
1899 (elf_x86_64_mkobject): Updated.
1900 (elf_x86_64_link_hash_table_create): Likewise.
1901 (elf_x86_64_check_tls_transition): Likewise.
1902 (elf_x86_64_tls_transition): Likewise.
1903 (elf_x86_64_convert_load_reloc): Likewise.
1904 (elf_x86_64_check_relocs): Likewise.
1905 (elf_x86_64_adjust_dynamic_symbol): Likewise.
1906 (elf_x86_64_allocate_dynrelocs): Likewise.
1907 (elf_x86_64_convert_load): Likewise.
1908 (elf_x86_64_size_dynamic_sections): Likewise.
1909 (elf_x86_64_relocate_section): Likewise.
1910 (elf_x86_64_finish_dynamic_symbol ): Likewise.
1911 (elf_x86_64_finish_dynamic_sections): Likewise.
1912 (elf_x86_64_output_arch_local_syms): Likewise.
1913 (elf_x86_64_get_synthetic_symtab): Likewise.
1914 (elf_x86_64_link_setup_gnu_properties): Likewise.
1915 (elf_x86_64_link_hash_table): Use elf_x86_link_hash_table,
1916 instead of elf_link_hash_table, as base.
1917 (elf_x86_64_next_tls_desc_index): New.
1918 (elf_x86_64_srelplt2): Likewise.
1919 (elf_x86_64_plt): Likewise.
1920 (elf_x86_64_lazy_plt): Likewise.
1921 (elf_x86_64_non_lazy_plt): Likewise.
1922 * elfxx-x86.c: New file.
1923 * elfxx-x86.h: Likewise.
1925 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1927 * elf32-i386.c (elf_i386_get_synthetic_symtab): Simplify bad
1929 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1931 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1933 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check valid PLT
1934 sections before checking dynamic relocations and free invalid
1935 PLT section contents.
1936 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1938 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
1940 * elf-bfd.h (_bfd_elf_ifunc_get_synthetic_symtab): Removed.
1941 * elf-ifunc.c (_bfd_elf_ifunc_get_synthetic_symtab): Likewise.
1943 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
1946 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check for valid
1948 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1950 2017-08-27 H.J. Lu <hongjiu.lu@intel.com>
1952 * elf32-i386.c (elf_i386_link_hash_newfunc): Initialize
1954 * elf64-x86-64.c (elf_x86_64_link_hash_newfunc): Likewise.
1956 2017-08-26 H.J. Lu <hongjiu.lu@intel.com>
1959 * elf-bfd.h (elf_obj_tdata): Use ENUM_BITFIELD on object_id,
1960 dyn_lib_class and has_gnu_symbols. Change bad_symtab to bitfield.
1961 Add a has_no_copy_on_protected bitfield.
1962 (elf_has_no_copy_on_protected): New.
1963 * elf-properties.c (_bfd_elf_parse_gnu_properties): Set
1964 elf_has_no_copy_on_protected for GNU_PROPERTY_NO_COPY_ON_PROTECTED.
1965 (elf_merge_gnu_property_list): Likewise.
1966 (_bfd_elf_link_setup_gnu_properties): Set extern_protected_data
1967 to FALSE for elf_has_no_copy_on_protected.
1968 * elf32-i386.c (SYMBOL_NO_COPYRELOC): New.
1969 (elf_i386_link_hash_entry): Add def_protected.
1970 (elf_i386_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
1971 when checking info->nocopyreloc.
1972 (elf_i386_link_setup_gnu_properties): Don't set
1973 extern_protected_data here.
1974 (elf_i386_merge_symbol_attribute): New function.
1975 (elf_backend_merge_symbol_attribute): New.
1976 * elf64-x86-64.c (SYMBOL_NO_COPYRELOC): New.
1977 (elf_x86_64_link_hash_entry): Add def_protected.
1978 (elf_x86_64_need_pic): Report protected symbol for def_protected.
1979 (elf_x86_64_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
1980 when checking info->nocopyreloc.
1981 (elf_x86_64_relocate_section): Also check for R_X86_64_PC32
1982 relocation run-time overflow and unresolvable R_X86_64_32S
1983 relocation against protected data symbol defined in shared object
1984 with GNU_PROPERTY_NO_COPY_ON_PROTECTED.
1985 (elf_x86_64_link_setup_gnu_properties): Don't set
1986 extern_protected_data here.
1987 (elf_x86_64_merge_symbol_attribute): New function.
1988 (elf_backend_merge_symbol_attribute): New.
1990 2017-08-26 Alan Modra <amodra@gmail.com>
1992 * elf32-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
1993 (ppc_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
1994 (ppc_elf_relocate_section): Comment fix.
1995 * elf64-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
1996 (ppc64_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
1997 Support dynamic relocs for TPREL16 when non-pic too.
1998 (dec_dynrel_count): Adjust TPREL16 handling as per check_relocs.
1999 (ppc64_elf_relocate_section): Support dynamic relocs for TPREL16
2002 2017-08-25 H.J. Lu <hongjiu.lu@intel.com>
2004 * elf32-i386.c (elf_i386_link_hash_entry): Remove redundant
2005 "symbol" in comments.
2006 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Likewise.
2008 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
2011 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for
2012 R_X86_64_PC32 relocation run-time overflow and unresolvable
2013 R_X86_64_32S relocation with -z nocopyreloc.
2015 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
2017 * elf32-i386.c (elf_i386_check_relocs): Revert the last change.
2018 Undefined symbols may not have a type.
2019 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
2021 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
2023 * elf64-x86-64.c (elf_x86_64_need_pic): Add an argument for
2024 bfd_link_info. Report shared, PIE or PDE object based on
2026 (elf_x86_64_check_relocs): Update elf_x86_64_need_pic call.
2027 (elf_x86_64_relocate_section): Likewise.
2029 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
2031 * elf32-i386.c (elf_i386_check_relocs): Increment PLT count only
2032 for function symbols.
2033 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
2035 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
2037 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set
2038 extern_protected_data to FALSE if GNU_PROPERTY_NO_COPY_ON_PROTECTED
2039 is set on any input relocatable file.
2040 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
2042 2017-08-23 Alan Modra <amodra@gmail.com>
2045 * elf64-ppc.c (ensure_undef_dynamic): Rename from
2046 ensure_undefweak_dynamic. Handle undefined too.
2047 * elf32-ppc.c (ensure_undef_dynamic): Likewise.
2048 * elf32-hppa.c (ensure_undef_dynamic): Likewise.
2049 (allocate_dynrelocs): Discard undefined non-default visibility
2050 relocs first. Make undefined syms dynamic. Tidy goto.
2052 2017-08-21 Alan Modra <amodra@gmail.com>
2053 H.J. Lu <hongjiu.lu@intel.com>
2056 * elf-bfd.h (SYMBOLIC_BIND): Return TRUE for __start/__stop symbols.
2057 * elflink.c (bfd_elf_define_start_stop): Rewrite.
2059 2017-08-21 Hans-Peter Nilsson <hp@bitrange.com>
2062 * elf64-mmix.c (mmix_elf_relax_section): Correct handling of
2063 undefined weak symbols.
2065 2017-08-18 Nick Clifton <nickc@redhat.com>
2068 * tekhex.c (getsym): Fix check for source pointer walking off the
2069 end of the input buffer.
2071 2017-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
2074 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Skip IFUNC
2075 relocations in debug sections, change abort to _bfd_error_handler.
2077 2017-08-14 Nick Clifton <nickc@redhat.com>
2080 * elf.c (setup_group): Check for an empty or very small group
2082 * po/bfd.pot: Regenerate.
2084 2017-08-14 Alan Modra <amodra@gmail.com>
2087 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't add
2088 alignment padding here.
2089 * elflink.c (bfd_elf_discard_info): Add .eh_frame padding here
2090 in a reverse pass over sections.
2092 2017-08-11 H.J. Lu <hongjiu.lu@intel.com>
2095 * elf32-i386.c (elf_i386_get_synthetic_symtab): Allocate space
2096 for @plt suffixes first.
2097 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
2099 2017-08-08 Nick Clifton <nickc@redhat.com>
2102 * elf-attrs.c (_bfd_elf_parse_attributes): Complain about very
2103 small section lengths.
2104 * elf.c (_bfd_elf_setup_sections): Skip empty entries in the group
2106 (elfcore_grok_freebsd_prstatus): Add checks to make sure that
2107 there is enough data present in the note.
2109 2017-08-08 Alan Modra <amodra@gmail.com>
2112 * elf32-microblaze.c (microblaze_elf_check_relocs): Don't bump
2113 got.refcount for GOTOFF relocs, just create .got section.
2115 2017-08-07 H.J. Lu <hongjiu.lu@intel.com>
2117 * elflink.c (elf_link_add_object_symbols): Move common symbol
2118 check after bed->common_definition.
2120 2017-08-07 Alan Modra <amodra@gmail.com>
2123 * elflink.c (bfd_elf_final_link): Don't segfault when sections
2124 needed to define various dynamic tags have been discarded.
2126 2017-08-07 Nick Clifton <nickc@redhat.com>
2129 * elf32-i386.c (elf_i386_link_setup_gnu_properties): If the dynobj
2130 has not been set then use the bfd returned by
2131 _bfd_elf_link_setup_gnu_properties. If that is null then search
2132 through all the input bfds selecting the first normal, ELF format
2134 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
2136 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
2138 * elf32-i386.c (elf_i386_link_hash_entry): Change tls_get_addr
2140 (elf_i386_link_hash_newfunc): Initialize tls_get_addr to 0.
2141 (elf_i386_check_tls_transition): Check tls_get_addr directly.
2142 (elf_i386_convert_load_reloc): Update tls_get_addr check.
2143 (elf_i386_link_check_relocs): New function.
2144 (bfd_elf32_bfd_link_check_relocs): New.
2145 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Change tls_get_addr
2147 (elf_x86_64_link_hash_newfunc): Initialize tls_get_addr to 0.
2148 (elf_x86_64_check_tls_transition): Check tls_get_addr directly.
2149 (elf_x86_64_convert_load_reloc): Update tls_get_addr check.
2150 (elf_x86_64_link_check_relocs): New function.
2151 (bfd_elf64_bfd_link_check_relocs): New.
2152 (bfd_elf32_bfd_link_check_relocs): Likewise.
2154 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
2157 * elflink.c (elf_link_add_object_symbols): Treat common symbol
2158 as undefined for --no-define-common.
2160 2017-08-05 Alan Modra <amodra@gmail.com>
2162 * elf32-hppa.c (elf32_hppa_set_gp): Don't require an
2163 hppa_link_hash_table.
2165 2017-08-02 Max Filippov <jcmvbkbc@gmail.com>
2167 * xtensa-isa.c (xtensa_isa_init): Don't update lookup table
2168 entries for sysregs with negative indices.
2170 2017-08-01 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2172 * elf32-s390.c (elf_s390_finish_dynamic_sections): Skip if it
2173 isn't the S/390 specific elf data.
2174 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
2176 2017-07-31 Kuan-Lin Chen <rufus@andestech.com>
2178 * elfxx-riscv.c (riscv_elf_add_sub_reloc): New function.
2179 * (howto_table) [R_RISCV_ADD8]: Use riscv_elf_add_sub_reloc.
2180 [R_RISCV_ADD16]: Likewise.
2181 [R_RISCV_ADD32]: Likewise.
2182 [R_RISCV_ADD64]: Likewise.
2183 [R_RISCV_SUB6]: Likewise.
2184 [R_RISCV_SUB8]: Likewise.
2185 [R_RISCV_SUB16]: Likewise.
2186 [R_RISCV_SUB32]: Likewise.
2187 [R_RISCV_SUB64]: Likewise.
2189 2017-07-31 Alan Modra <amodra@gmail.com>
2191 * elf64-ppc.c (ppc64_elf_tls_setup): Warn on --plt-localentry
2192 without ld.so checks.
2194 2017-07-29 Alan Modra <amodra@gmail.com>
2197 * elf64-ppc.c (struct ppc_link_hash_entry): Add non_zero_localentry.
2198 (ppc64_elf_merge_symbol): Set non_zero_localentry.
2199 (is_elfv2_localentry0): Test non_zero_localentry.
2200 (ppc64_elf_tls_setup): Default to --no-plt-localentry.
2202 2017-07-28 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2204 * elf32-s390.c (elf_s390_finish_dynamic_sections): Add NULL
2205 pointer check for htab->elf.irelplt.
2206 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
2208 2017-07-27 Nick Clifton <nickc@redhat.com>
2211 * mach-o.c (bfd_mach_o_read_symtab_strtab): Fail if the symtab
2213 * nlmcode.h (nlm_swap_auxiliary_headers_in): Replace assertion
2215 * section.c (bfd_make_section_with_flags): Fail if the name or bfd
2217 * vms-alpha.c (bfd_make_section_with_flags): Correct computation
2219 (evax_bfd_print_emh): Check for invalid string lengths.
2221 2017-07-25 Nick Clifton <nickc@redhat.com>
2223 * po/fr.po: Updated French translation.
2225 2017-07-25 Benjamin Green <bengreen5mx@gmail.com>
2228 * elf32-msp430.c (msp430_elf_relax_section): Allow conversion of
2229 16-bit absolute branches into 10-bit pc-relative branches on the
2230 MSP430 as well as the MSP430X.
2232 2017-07-25 Alan Modra <amodra@gmail.com>
2234 * elf64-ppc.c (struct map_stub): Add tls_get_addr_opt_bctrl.
2235 (stub_eh_frame_size): New function.
2236 (ppc_size_one_stub): Set group tls_get_addr_opt_bctrl.
2237 (group_sections): Init group tls_get_addr_opt_bctrl.
2238 (ppc64_elf_size_stubs): Update sizing and initialization of
2239 .eh_frame. Iteration over stubs via group list.
2240 (ppc64_elf_build_stubs): Iterate over stubs via group list.
2241 (ppc64_elf_finish_dynamic_sections): Update finalization of
2244 2017-07-24 Nick Clifton <nickc@redhat.com>
2247 * mach-o.c (bfd_mach_o_canonicalize_relocs): Pass the base address
2248 of the relocs to the canonicalize_one_reloc routine.
2249 * mach-o.h (struct bfd_mach_o_backend_data): Update the prototype
2250 for the _bfd_mach_o_canonicalize_one_reloc field.
2251 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add
2252 res_base parameter. Use to check for corrupt pair relocs.
2253 * mach-o-aarch64.c (bfd_mach_o_arm64_canonicalize_one_reloc):
2255 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc):
2257 * mach-o-x86-64.c (bfd_mach_o_x86_64_canonicalize_one_reloc):
2260 * vms-alpha.c (_bfd_vms_slurp_eihd): Make sure that there is
2261 enough data in the record before attempting to parse it.
2262 (_bfd_vms_slurp_eeom): Likewise.
2264 (_bfd_vms_slurp_egsd): Check for an invalid section index.
2265 (image_set_ptr): Likewise.
2266 (alpha_vms_slurp_relocs): Likewise.
2268 (alpha_vms_object_p): Check for a truncated record.
2270 2017-07-24 Nick Clifton <nickc@redhat.com>
2273 * reloc.c (_bfd_unrecognized_reloc): New function. Reports
2274 an unrecognized reloc and sets the bfd_error value.
2275 * libbfd.h: Regenerate.
2276 * elf32-arm.c (elf32_arm_final_link_relocate): Use the new
2278 * elf32-i386.c (elf_i386_relocate_section): Likewise.
2279 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
2280 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
2281 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise.
2282 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
2284 2017-07-23 Alan Modra <amodra@gmail.com>
2286 * elf64-ppc.c (ppc64_elf_size_stubs): Correct advance to
2289 2017-07-19 Szabolcs Nagy <szabolcs.nagy@arm.com>
2292 * elfnn-aarch64.c (elfNN_aarch64_reloc_type_class): Return
2293 reloc_class_ifunc for ifunc symbols.
2295 2017-07-19 Nick Clifton <nickc@redhat.com>
2298 * archive.c (bfd_generic_archive_p): If the bfd does not have the
2299 correct magic bytes at the start, set the error to wrong format
2300 and clear the format selector before returning NULL.
2302 2017-07-19 Nick Clifton <nickc@redhat.com>
2305 * coff-rs6000.c (_bfd_strntol): New function.
2306 (_bfd_strntoll): New function.
2307 (GET_VALUE_IN_FIELD): New macro.
2308 (EQ_VALUE_IN_FIELD): new macro.
2309 (_bfd_xcoff_slurp_armap): Use new macros.
2310 (_bfd_xcoff_archive_p): Likewise.
2311 (_bfd_xcoff_read_ar_hdr): Likewise.
2312 (_bfd_xcoff_openr_next_archived_file): Likewise.
2313 (_bfd_xcoff_stat_arch_elt): Likewise.
2314 * coff64-rs6000.c (_bfd_strntol): New function.
2315 (_bfd_strntoll): New function.
2316 (GET_VALUE_IN_FIELD): New macro.
2317 (xcoff64_slurp_armap): Use new macros.
2319 2017-07-19 Claudiu Zissulescu <claziss@synopsys.com>
2320 John Eric Martin <John.Martin@emmicro-us.com>
2322 * bfd-in2.h: Regenerate.
2323 * libbfd.h: Regenerate.
2324 * elf32-arc.c (JLI): Define.
2325 * reloc.c: Add JLI relocations.
2327 2017-07-18 Nick Clifton <nickc@redhat.com>
2330 * coff-sh.c: Fix spelling typos.
2331 * compress.c: Likewise.
2332 * cpu-pdp11.c: Likewise.
2333 * ecofflink.c: Likewise.
2334 * elf-m10300.c: Likewise.
2336 * elf32-arm.c: Likewise.
2337 * elf32-m68k.c: Likewise.
2338 * elf32-nds32.c: Likewise.
2339 * elf32-ppc.c: Likewise.
2340 * elf32-sh.c: Likewise.
2341 * elf32-v850.c: Likewise.
2342 * elf64-ppc.c: Likewise.
2343 * elf64-x86-64.c: Likewise.
2344 * elflink.c: Likewise.
2345 * elfnn-aarch64.c: Likewise.
2346 * elfxx-mips.c: Likewise.
2348 * sunos.c: Likewise.
2349 * vms-alpha.c: Likewise.
2350 * xcofflink.c: Likewise.
2352 2017-07-18 Nick Clifton <nickc@redhat.com>
2355 * coffcode.h (handle_COMDAT): Replace abort with an error message
2358 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
2361 * elf64-x86-64.c (elf_x86_64_relocate_section): Limit PIC check
2364 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
2366 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
2368 2017-07-16 Alan Modra <amodra@gmail.com>
2370 * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimize
2371 __tls_index GOT entries when using __tls_get_addr_opt stub.
2372 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2374 2017-07-12 Alan Modra <amodra@gmail.com>
2376 * po/es.po: Update from translationproject.org/latest/bfd/.
2377 * po/fi.po: Likewise.
2378 * po/fr.po: Likewise.
2379 * po/id.po: Likewise.
2380 * po/ja.po: Likewise.
2381 * po/ro.po: Likewise.
2382 * po/ru.po: Likewise.
2383 * po/sr.po: Likewise.
2384 * po/sv.po: Likewise.
2385 * po/tr.po: Likewise.
2386 * po/uk.po: Likewise.
2387 * po/vi.po: Likewise.
2388 * po/zh_CN.po: Likewise.
2389 * po/hr.po: New file from translationproject.org.
2390 * configure.ac (ALL_LINGUAS): Add hr. Sort.
2391 * configure: Regenerate.
2393 2017-07-12 Nick Clifton <nickc@redhat.com>
2395 Fix compile time warnings using gcc 7.1.1.
2396 * elf32-xtensa.c (elf_xtensa_get_plt_section): Increase length of
2398 (elf_xtensa_get_gotplt_section): Increase length of got_name
2400 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add a
2401 default return of FALSE.
2402 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc): Add a
2403 default return of FALSE.
2405 2017-07-12 Alan Modra <amodra@gmail.com>
2407 * binary.c (binary_set_section_contents): Don't print filepos in
2409 (coff_write_object_contents): Cast size_t for error message.
2410 (coff_slurp_line_table): Don't use bfd_vma symndx.
2411 (coff_slurp_reloc_table): Remove unneeded cast.
2412 * dwarf2.c (read_section): Cast bfd_int64_t to long long for
2414 (find_abstract_instance_name): Likewise.
2415 * elf32-arm.c (arm_type_of_stub): Correct error arg order.
2416 (bfd_elf32_arm_stm32l4xx_erratum_scan): Don't cast error arg.
2417 (elf32_arm_check_relocs): Make r_symndx an int.
2418 * elf32-cris.c (cris_elf_check_relocs): Delete extraneous %s in
2420 * elf32-metag.c (elf_metag_relocate_section): Delete extra error
2422 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Rewrite bogus
2424 * elf32-i386.c (elf_i386_check_relocs): Make r_symndx an int.
2425 * elf32-s390.c (elf_s390_check_relocs): Likewise.
2426 * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
2427 * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
2428 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
2429 * elf64-s390.c (elf_s390_check_relocs): Likewise.
2430 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
2431 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Likewise.
2432 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
2433 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
2434 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
2435 * elf64-mmix.c (_bfd_mmix_after_linker_allocation): Cast size_t args
2436 and use %lu for error message.
2437 * elflink.c (elf_link_adjust_relocs): Delete extra error message arg.
2438 * mmo.c (mmo_scan): Make stab_loc a file_ptr. Cast expression for
2441 * elf32-arm.c (elf32_arm_tls_relax): Correct format string and args
2443 (elf32_arm_final_link_relocate): Likewise.
2444 * coff-arm.c (bfd_arm_process_before_allocation): Likewise.
2445 * coffcode.h (styp_to_sec_flags): Likewise.
2446 * cofflink.c (_bfd_coff_write_global_sym): Likewise.
2447 * ecoff.c (_bfd_ecoff_slurp_symbol_table): Likewise.
2448 * elf32-arc.c (arc_elf_merge_private_bfd_data): Likewise.
2449 * elf32-bfin.c (bfinfdpic_check_relocs): Likewise.
2450 (elf32_bfin_merge_private_bfd_data): Likewise.
2451 * elf32-cris.c (cris_elf_relocate_section): Likewise.
2452 * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
2453 * elf32-i370.c (i370_elf_merge_private_bfd_data): Likewise.
2454 (i370_elf_relocate_section): Likewise.
2455 * elf32-iq2000.c (iq2000_elf_merge_private_bfd_data): Likewise.
2456 * elf32-m32c.c (m32c_elf_merge_private_bfd_data): Likewise.
2457 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise.
2458 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
2459 * elf32-mep.c (mep_elf_merge_private_bfd_data): Likewise.
2460 * elf32-mt.c (mt_elf_merge_private_bfd_data): Likewise.
2461 * elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.
2462 * elfxx-mips.c (mips_elf_merge_obj_e_flags): Likewise.
2463 (_bfd_mips_elf_merge_private_bfd_data): Likewise.
2464 * ieee.c (ieee_write_id, read_id): Likewise.
2465 * mach-o.c (bfd_mach_o_write_contents): Likewise.
2466 (bfd_mach_o_layout_commands, bfd_mach_o_read_section_32): Likewise.
2467 (bfd_mach_o_read_section_64, bfd_mach_o_read_symtab_symbol): Likewise.
2468 (bfd_mach_o_read_command, bfd_mach_o_header_p): Likewise.
2469 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Likewise.
2470 * stabs.c (_bfd_link_section_stabs): Likewise.
2472 * coff-arm.c (coff_arm_relocate_section): Use L modifier in error
2474 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
2475 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
2476 * coff-rs6000.c (xcoff_reloc_type_toc): Likewise.
2477 * coff-sh.c (sh_relax_section): Likewise.
2478 (sh_relax_delete_bytes, sh_swap_insns): Likewise.
2479 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
2480 * coffcode.h (coff_slurp_reloc_table): Likewise.
2481 * coffgen.c (_bfd_coff_get_external_symbols): Likewise.
2482 (_bfd_coff_read_string_table): Likewise.
2483 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
2484 * compress.c (bfd_get_full_section_contents): Likewise.
2485 * dwarf2.c (read_formatted_entries, decode_line_info): Likewise.
2486 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
2487 * elf.c (bfd_elf_string_from_elf_section): Likewise.
2488 * elf32-arc.c (arc_special_overflow_checks): Likewise.
2489 * elf32-arm.c (elf32_arm_tls_relax): Likewise.
2490 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Likewise.
2491 (elf32_arm_write_section): Likewise.
2492 * elf32-bfin.c (bfin_relocate_section): Likewise.
2493 (bfinfdpic_relocate_section): Likewise.
2494 * elf32-hppa.c (hppa_build_one_stub): Likewise.
2495 (final_link_relocate, elf32_hppa_relocate_section): Likewise.
2496 * elf32-i386.c (elf_i386_tls_transition): Likewise.
2497 (elf_i386_relocate_section): Likewise.
2498 * elf32-ip2k.c (ip2k_final_link_relocate): Likewise.
2499 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise.
2500 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
2501 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
2502 * elf32-metag.c (elf_metag_relocate_section): Likewise.
2503 * elf32-nds32.c (unrecognized_reloc_msg): Likewise.
2504 (nds32_elf_relax_longcall1, nds32_elf_relax_longcall2): Likewise.
2505 (nds32_elf_relax_longcall3, nds32_elf_relax_longjump1): Likewise.
2506 (nds32_elf_relax_longjump2, nds32_elf_relax_longjump3): Likewise.
2507 (nds32_elf_relax_longcall4, nds32_elf_relax_longcall5): Likewise.
2508 (nds32_elf_relax_longcall6, nds32_elf_relax_longjump4): Likewise.
2509 (nds32_elf_relax_longjump5, nds32_elf_relax_longjump6): Likewise.
2510 (nds32_elf_relax_longjump7, nds32_elf_relax_loadstore): Likewise.
2511 (nds32_elf_relax_ptr, nds32_elf_ex9_build_hash_table): Likewise.
2512 * elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
2513 * elf32-rx.c (UNSAFE_FOR_PID): Likewise.
2514 * elf32-s390.c (invalid_tls_insn, elf_s390_relocate_section): Likewise.
2515 * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
2516 * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
2517 * elf32-sh.c (sh_elf_relax_section): Likewise.
2518 (sh_elf_relax_delete_bytes, sh_elf_swap_insns): Likewise.
2519 (sh_elf_relocate_section): Likewise.
2520 * elf32-sh64.c (shmedia_prepare_reloc): Likewise.
2521 * elf32-spu.c (spu_elf_relocate_section): Likewise.
2522 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
2523 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
2524 * elf32-v850.c (v850_elf_relax_section): Likewise.
2525 * elf32-vax.c (elf_vax_check_relocs): Likewise.
2526 (elf_vax_relocate_section): Likewise.
2527 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
2528 (extend_ebb_bounds_forward, extend_ebb_bounds_backward): Likewise.
2529 (compute_text_actions, compute_ebb_proposed_actions): Likewise.
2530 (do_fix_for_relocatable_link): Likewise.
2531 * elf64-alpha.c (elf64_alpha_relax_got_load): Likewise.
2532 (elf64_alpha_relax_with_lituse): Likewise.
2533 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Likewise.
2534 (elf_hppa_final_link_relocate): Likewise.
2535 * elf64-ia64-vms.c (elf64_ia64_relax_section): Likewise.
2536 (elf64_ia64_choose_gp, elf64_ia64_relocate_section): Likewise.
2537 (elf64_vms_link_add_object_symbols): Likewise.
2538 * elf64-mmix.c (mmix_elf_perform_relocation): Likewise.
2539 (mmix_final_link_relocate): Likewise.
2540 * elf64-s390.c (invalid_tls_insn): Likewise.
2541 (elf_s390_relocate_section): Likewise.
2542 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
2543 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
2544 (elf_x86_64_relocate_section): Likewise.
2545 * elfcode.h (elf_slurp_symbol_table): Likewise.
2546 * elfcore.h (elf_core_file_p): Likewise.
2547 * elflink.c (elf_link_read_relocs_from_section): Likewise.
2548 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
2549 (elfNN_aarch64_relocate_section): Likewise.
2550 * elfnn-ia64.c (elfNN_ia64_relax_section): Likewise.
2551 (elfNN_ia64_choose_gp, elfNN_ia64_relocate_section): Likewise.
2552 * elfnn-riscv.c (riscv_elf_relocate_section): Likewise.
2553 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
2554 (_bfd_mips_elf_relocate_section): Likewise.
2555 (_bfd_mips_elf_finish_dynamic_symbol, mips_finish_exec_plt): Likewise.
2556 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
2557 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
2558 * ieee.c (ieee_slurp_external_symbols): Likewise.
2559 * ihex.c (ihex_write_object_content): Likewise.
2560 * mach-o.c (bfd_mach_o_build_exec_seg_command): Likewise.
2561 * merge.c (_bfd_merged_section_offset): Likewise.
2562 * mmo.c (mmo_write_loc_chunk): Likewise.
2563 (mmo_write_object_contents): Likewise.
2564 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Likewise.
2565 * stabs.c (_bfd_link_section_stabs): Likewise.
2566 * xcofflink.c (xcoff_link_add_symbols, xcoff_find_tc0): Likewise.
2568 2017-07-11 Alan Modra <amodra@gmail.com>
2570 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo.
2572 2017-07-11 Alan Modra <amodra@gmail.com>
2574 * elf32-ppc.c (ppc_elf_relocate_section): Emit "unexpected
2575 instruction" error using _bfd_error_handler, not einfo.
2577 2017-07-10 Nick Clifton <nickc@redhat.com>
2579 * coffcode.h (coff_slurp_symbol_table): Do not include an entry
2580 for C_AIX_WEAKEXT if it has the same value as C_WEAKEXT.
2582 2017-07-07 John Baldwin <jhb@FreeBSD.org>
2584 * elf.c (elfcore_grok_freebsd_note): Handle NT_FREEBSD_PTLWPINFO.
2586 2017-07-07 Alan Modra <amodra@gmail.com>
2588 * coffcode.h (coff_slurp_symbol_table): Handle C_AIX_WEAKEXT.
2590 2017-07-07 Alan Modra <amodra@gmail.com>
2592 * bfd.c (_doprnt): Replace "L" with "ll" when printing bfd_vma
2593 as long long. Move code replacing "ll" with "I64", and simplify.
2595 2017-07-06 H.J. Lu <hongjiu.lu@intel.com>
2597 * bfd.c (_doprnt): Convert 'L' to 'l' when setting wide_width
2600 2017-07-05 H.J. Lu <hongjiu.lu@intel.com>
2602 * dwarf2.c (line_info_add_include_dir_stub): Replace time with
2604 (line_info_add_file_name): Likewise.
2605 (decode_line_info): Likewise.
2607 2017-07-04 Tristan Gingold <gingold@adacore.com>
2609 * version.m4: Bump version to 2.29.51
2610 * configure: Regenerate.
2612 2017-07-04 Jiong Wang <jiong.wang@arm.com>
2614 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Remove the
2615 sanity check at the head of this function.
2617 2017-07-04 Jan Kratochvil <jan.kratochvil@redhat.com>
2619 * dwarf2.c (struct dwarf2_debug): Add fields dwarf_line_str_buffer and
2620 dwarf_line_str_size.
2621 (struct attr_abbrev): Add field implicit_const.
2622 (dwarf_debug_sections): Add .debug_line_str.
2623 (enum dwarf_debug_section_enum): Add debug_line_str and debug_max.
2624 (dwarf_debug_section_assert): Add static assertion.
2625 (read_indirect_line_string): New.
2626 (read_abbrevs): Support DW_FORM_implicit_const.
2627 (is_str_attr): Support DW_FORM_line_strp.
2628 (read_attribute_value): Support DW_FORM_line_strp and
2629 DW_FORM_implicit_const.
2630 (read_attribute): Support DW_FORM_implicit_const.
2631 (line_info_add_include_dir, line_info_add_include_dir_stub):
2632 (line_info_add_file_name, read_formatted_entries): New.
2633 (decode_line_info, parse_comp_unit): Support DWARF 5.
2634 (_bfd_dwarf2_cleanup_debug_info): Free dwarf_line_str_buffer.
2636 2017-07-03 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
2638 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove the
2639 abort statement that was put for symbols that are not dynamic.
2641 2017-07-03 Tristan Gingold <gingold@adacore.com>
2643 * po/bfd.pot: Regenerate
2645 2017-07-03 Alan Modra <amodra@gmail.com>
2647 * bfd.c (_doprnt): Rewrite "ll" and "L" modifiers to "I64" for
2648 __MSVCRT__. Support "L" modifier for bfd_vma. Formatting.
2649 * elf.c (setup_group): Use "Lx" to print sh_size.
2650 (_bfd_elf_setup_sections): Remove unnecessary cast and print
2651 unknown section type in hex.
2652 (copy_special_section_fields): Style fix.
2653 (bfd_section_from_shdr): Correct format for sh_link. Use a
2654 common error message for all the variants of unrecognized
2656 (assign_file_positions_for_load_sections): Use "Lx" for lma
2657 adjust error message.
2658 (assign_file_positions_for_non_load_sections): Formatting.
2659 (rewrite_elf_program_header): Formatting. Use "Lx" for
2660 bfd_vma values in error messages.
2661 * elfcode.h (elf_slurp_reloc_table_from_section): Cast
2662 ELF_R_SYM value to type expected by format.
2663 * elflink.c (elf_link_read_relocs_from_section): Use "Lx"
2665 (elf_link_add_object_symbols): Use "Lu" for symbol sizes.
2666 (elf_link_input_bfd): Use "Lx" for r_info.
2667 (bfd_elf_gc_record_vtinherit): Use "Lx" for offset.
2669 2017-07-03 Alan Modra <amodra@gmail.com>
2671 * bfd.c (bfd_scan_vma): Don't use long long unless HAVE_LONG_LONG.
2672 * coff-rs6000.c (FMT20): Handle hosts with 64-bit long and
2673 Microsoft C library variant of long long format specifier.
2674 (PRINT20): Cast value to bfd_uint64_t not long long.
2675 * coffcode.h (coff_print_aux): Use BFD_VMA_FMT.
2676 * coff-x86_64.c (coff_amd64_reloc): Use bfd_uint64_t rather than
2677 long long. Don't cast to bfd_vma.
2678 * elf32-score.c (score3_bfd_getl48): Likewise.
2679 * vms-alpha.c (_bfd_vms_slurp_eisd): Likewise.
2681 2017-07-03 Alan Modra <amodra@gmail.com>
2683 * elf.c (_bfd_elf_print_private_bfd_data): Use BFD_VMA_FMT to
2685 (bfd_elf_print_symbol): Don't cast symbol->flags.
2686 (_bfd_elf_symbol_from_bfd_symbol): Likewise.
2687 * elf32-ppc.c (ppc_elf_begin_write_processing): Correct
2688 _bfd_error_handler argument order.
2689 (ppc_elf_merge_private_bfd_data): Don't cast flags.
2691 2017-07-03 Alan Modra <amodra@gmail.com>
2693 * configure.ac: Invoke AC_CHECK_TYPES for long long. Invoke
2694 AC_TYPE_LONG_DOUBLE.
2695 * configure: Regenerate.
2696 * config.in: Regenerate.
2698 2017-06-29 Andrew Waterman <andrew@sifive.com>
2700 * elfnn-riscv.c (riscv_elf_adjust_dynamic_symbol): Fix TLS copy
2703 2017-06-29 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
2705 * elfxx-sparc.c (allocate_dynrelocs): Don't make a symbol dynamic
2706 unless it is undefined weak.
2707 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Set the flag
2708 relative_reloc to direct non-dynamic symbols to R_SPARC_RELATIVE
2710 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): If symbol
2711 is not dynamic in PIC, abort.
2713 2017-06-29 Jiong Wang <jiong.wang@arm.com>
2716 * elfnn-aarch64.c (elfNN_aarch64_allocate_dynrelocs): Only make
2717 undefined weak symbols into dynamic.
2718 (elfNN_aarch64_final_link_relocate): Generate runtime RELATIVE
2719 relocation for non-dynamic symbols.
2720 (elfNN_aarch64_finish_dynamic_symbol): Add sanity check.
2722 2017-06-29 Jiong Wang <jiong.wang@arm.com>
2724 * elfnn-aarch64.c (aarch64_relocation_aginst_gp_p): New function.
2725 (elfNN_aarch64_final_link_relocate): Delete duplicated code for
2726 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15, BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC,
2727 BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
2728 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Optimize the
2731 2017-06-29 Andreas Arnez <arnez@linux.vnet.ibm.com>
2733 * elf-bfd.h (elfcore_write_s390_gs_cb): Add prototype.
2734 (elfcore_write_s390_gs_bc): Likewise.
2735 * elf.c (elfcore_grok_s390_gs_cb): New function.
2736 (elfcore_grok_s390_gs_bc): New function.
2737 (elfcore_grok_note): Call them.
2738 (elfcore_write_s390_gs_cb): New function.
2739 (elfcore_write_s390_gs_bc): New function.
2740 (elfcore_write_register_note): Call them.
2742 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
2744 * libbfd.c (_bfd_generic_get_section_contents): Don't call
2745 bfd_get_file_size. Check archive element size.
2746 (_bfd_generic_get_section_contents_in_window): Likewise.
2748 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
2750 * bfd-in2.h: Regenerated.
2751 * bfdio.c (bfd_get_size): Change return type to ufile_ptr.
2752 (bfd_get_file_size): Likewise.
2754 2017-06-28 Maciej W. Rozycki <macro@imgtec.com>
2755 Matthew Fortune <matthew.fortune@imgtec.com>
2757 * archures.c (bfd_mach_mips_interaptiv_mr2): New macro.
2758 * cpu-mips.c (I_interaptiv_mr2): New enum value.
2759 (arch_info_struct): Add "mips:interaptiv-mr2" entry.
2760 * elfxx-mips.c (_bfd_elf_mips_mach) <E_MIPS_MACH_IAMR2>: New
2762 (mips_set_isa_flags) <bfd_mach_mips_interaptiv_mr2>: Likewise.
2763 (bfd_mips_isa_ext) <bfd_mach_mips_interaptiv_mr2>: Likewise.
2764 (print_mips_isa_ext) <AFL_EXT_INTERAPTIV_MR2>: Likewise.
2765 (mips_mach_extensions): Add `bfd_mach_mipsisa32r3' and
2766 `bfd_mach_mips_interaptiv_mr2' entries.
2767 * bfd-in2.h: Regenerate.
2769 2017-06-27 Nick Clifton <nickc@redhat.com>
2771 * tekhex.c (pass_over): Revert accidental conversion of a local
2772 array to a static array.
2774 2017-06-27 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
2777 * elf32-avr.c (elf32_avr_adjust_diff_reloc_value): Adjust
2778 reloc addend if necessary. Adjust diff only if
2779 shrinked_insn_address < end_address.
2781 2017-06-27 Alan Modra <amodra@gmail.com>
2784 * libbfd.c (_bfd_generic_get_section_contents): Warning fix.
2785 (_bfd_generic_get_section_contents_in_window): Likewise.
2787 2017-06-26 Kuan-Lin Chen <rufus@andestech.com>
2789 * elfnn-riscv.c (perform_relocation): Support the new
2790 R_RISCV_32_PCREL relocation.
2791 (riscv_elf_relocate_section): Likewise.
2792 * elfxx-riscv.c (howto_table): Likewise.
2793 (riscv_reloc_map): Likewise.
2794 * bfd-in2.h (BFD_RELOC_RISCV_32_PCREL): New relocation.
2795 * libbfd.h: Regenerate.
2797 2017-06-27 Alan Modra <amodra@gmail.com>
2800 * libbfd.c (_bfd_generic_get_section_contents): Delete abort.
2801 Use unsigned file pointer type, and remove cast.
2802 * libbfd.c (_bfd_generic_get_section_contents_in_window): Likewise.
2803 Add "count", not "sz".
2805 2017-06-26 Pedro Alves <palves@redhat.com>
2808 * libbfd.c (_bfd_generic_get_section_contents): Add "count", not
2811 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
2814 * libbfd.c (_bfd_generic_get_section_contents_in_window): Add
2817 2017-06-26 Maciej W. Rozycki <macro@imgtec.com>
2819 * cpu-mips.c (arch_info_struct): Mark the 4010 32-bit.
2820 * elfxx-mips.c (mips_set_isa_flags) <bfd_mach_mips4010>: Set
2821 E_MIPS_ARCH_2 rather than E_MIPS_ARCH_3 in `e_flags'.
2822 (mips_mach_extensions): Mark `bfd_mach_mips4010' as extending
2823 `bfd_mach_mips6000' rather than `bfd_mach_mips4000'.
2825 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
2828 * compress.c (bfd_get_full_section_contents): Don't check the
2830 * libbfd.c (_bfd_generic_get_section_contents): Check for and
2831 reject a section whose size + offset is greater than the size
2833 (_bfd_generic_get_section_contents_in_window): Likewise.
2835 2017-06-26 Nick Clifton <nickc@redhat.com>
2838 * tekhex.c (getvalue): Check for the source pointer exceeding the
2839 end pointer before the first byte is read.
2841 2017-06-26 Nick Clifton <nickc@redhat.com>
2844 * opncls.c (get_build_id): Check that the section is big enough
2845 to contain the whole note.
2846 * compress.c (bfd_get_full_section_contents): Check for and reject
2847 a section whose size is greater than the size of the entire file.
2848 * elf32-v850.c (v850_elf_copy_notes): Allow for the ouput to not
2849 contain a notes section.
2851 2017-06-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2853 * elf64-s390.c (elf_s390_additional_program_headers): Add NULL
2855 (elf_s390_modify_segment_map): Likewise.
2856 (bfd_elf_s390_set_options): Lisewise.
2858 2017-06-26 Alan Modra <amodra@gmail.com>
2860 * elflink.c (_bfd_elf_link_create_dynstrtab): Don't make dynobj
2862 (_bfd_elf_size_group_sections): Skip --just-syms bfds.
2863 (bfd_elf_size_dynamic_sections): Ignore .note.GNU-stack and
2864 .preinit_array on --just-syms bfds.
2865 (_bfd_elf_gc_mark_extra_sections): Skip --just-syms bfds.
2866 (elf_gc_sweep, bfd_elf_parse_eh_frame_entries): Likewise.
2867 (bfd_elf_gc_sections, bfd_elf_discard_info): Likewise.
2869 2017-06-25 Sergei Trofimovich <slyfox@gentoo.org>
2871 * elf.c (find_link): Bounds check "hint".
2873 2017-06-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
2875 * elf32-arm.c (using_thumb_only): Update list of architectures in
2876 BFD_ASSERT for which the logic is valid.
2877 (using_thumb2_bl): Likewise.
2878 (using_thumb2): Likewise and return true for ARMv8-R.
2879 (arch_has_arm_nop): Likewise.
2880 (tag_cpu_arch_combine): New v8r table for ARMv8-R Tag_CPU_arch
2881 merging logic. Update commentis for value 15 of v8m_baseline,
2882 v8m_mainline and v4t_plus_v6_m arrays. Use v8r array to decide
2883 merging of value 15 of Tag_CPU_arch.
2885 2017-06-23 Jiong Wang <jiong.wang@arm.com>
2887 * reloc.c (BFD_RELOC_AARCH64_ADR_GOTPAGE): Rename to
2888 BFD_RELOC_AARCH64_ADR_GOT_PAGE
2889 * bfd-in2.h: Regenerate.
2891 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2893 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Move
2894 the error_alignment label forward. Properly align program
2895 property note section.
2897 2017-06-22 Eric Christopher <echristo@gmail.com>
2899 * elf32-arm.c (elf32_arm_final_link_relocate): Use labs rather than
2900 abs to fix a truncation warning.
2902 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2904 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Resolve
2905 local undefined weak symbol to 0.
2906 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Likewise.
2908 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2910 * elf32-i386.c (elf_i386_merge_gnu_properties): If info->shstk
2911 is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
2912 (elf_i386_link_setup_gnu_properties): If info->shstk is set,
2913 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
2914 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): If
2915 info->shstk is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
2916 (elf_x86_64_link_setup_gnu_properties): If info->shstk is set,
2917 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
2919 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2921 * elf32-i386.c (elf_i386_lazy_ibt_plt0_entry): New.
2922 (elf_i386_lazy_ibt_plt_entry): Likewise.
2923 (elf_i386_pic_lazy_ibt_plt0_entry): Likewise.
2924 (elf_i386_non_lazy_ibt_plt_entry): Likewise.
2925 (elf_i386_pic_non_lazy_ibt_plt_entry): Likewise.
2926 (elf_i386_eh_frame_lazy_ibt_plt): Likewise.
2927 (elf_i386_lazy_plt_layout): Likewise.
2928 (elf_i386_non_lazy_plt_layout): Likewise.
2929 (elf_i386_link_hash_entry): Add plt_second.
2930 (elf_i386_link_hash_table): Add plt_second and
2931 plt_second_eh_frame.
2932 (elf_i386_allocate_dynrelocs): Use the second PLT if needed.
2933 (elf_i386_size_dynamic_sections): Use .plt.got unwind info for
2934 the second PLT. Check the second PLT.
2935 (elf_i386_relocate_section): Use the second PLT to resolve
2936 PLT reference if needed.
2937 (elf_i386_finish_dynamic_symbol): Fill and use the second PLT if
2939 (elf_i386_finish_dynamic_sections): Set sh_entsize on the
2940 second PLT. Generate unwind info for the second PLT.
2941 (elf_i386_plt_type): Add plt_second.
2942 (elf_i386_get_synthetic_symtab): Support the second PLT.
2943 (elf_i386_parse_gnu_properties): Support
2944 GNU_PROPERTY_X86_FEATURE_1_AND.
2945 (elf_i386_merge_gnu_properties): Support
2946 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
2947 on GNU_PROPERTY_X86_FEATURE_1_IBT
2948 (elf_i386_link_setup_gnu_properties): If info->ibt is set,
2949 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
2950 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
2951 is set on all relocatable inputs.
2952 * elf64-x86-64.c (elf_x86_64_lazy_ibt_plt_entry): New.
2953 (elf_x32_lazy_ibt_plt_entry): Likewise.
2954 (elf_x86_64_non_lazy_ibt_plt_entry): Likewise.
2955 (elf_x32_non_lazy_ibt_plt_entry): Likewise.
2956 (elf_x86_64_eh_frame_lazy_ibt_plt): Likewise.
2957 (elf_x32_eh_frame_lazy_ibt_plt): Likewise.
2958 (elf_x86_64_lazy_ibt_plt): Likewise.
2959 (elf_x32_lazy_ibt_plt): Likewise.
2960 (elf_x86_64_non_lazy_ibt_plt): Likewise.
2961 (elf_x32_non_lazy_ibt_plt): Likewise.
2962 (elf_x86_64_get_synthetic_symtab): Support the second PLT.
2963 (elf_x86_64_parse_gnu_properties): Support
2964 GNU_PROPERTY_X86_FEATURE_1_AND.
2965 (elf_x86_64_merge_gnu_properties): Support
2966 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
2967 on GNU_PROPERTY_X86_FEATURE_1_IBT
2968 (elf_x86_64_link_setup_gnu_properties): If info->ibt is set,
2969 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
2970 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
2971 is set on all relocatable inputs.
2973 2017-06-22 Nick Clifton <nickc@redhat.com>
2976 * som.c (setup_sections): NUL terminate the space_strings buffer.
2977 Check that the space.name field does not index beyond the end of
2978 the space_strings buffer.
2980 2017-06-21 Nick Clifton <nickc@redhat.com>
2983 * coff-sh.c (sh_reloc): Check for an out of range reloc.
2985 2017-06-21 Nick Clifton <nickc@redhat.com>
2988 * vms-misc.c (_bfd_vms_save_sized_string): Use unsigned int as
2989 type of the size parameter.
2990 (_bfd_vms_save_counted_string): Add second parameter - the maximum
2991 length of the counted string.
2992 * vms.h (_bfd_vms_save_sized_string): Update prototype.
2993 (_bfd_vms_save_counted_string): Likewise.
2994 * vms-alpha.c (_bfd_vms_slurp_eisd): Update calls to
2995 _bfd_vms_save_counted_string.
2996 (_bfd_vms_slurp_ehdr): Likewise.
2997 (_bfd_vms_slurp_egsd): Likewise.
2998 (Parse_module): Likewise.
3000 2017-06-21 Alan Modra <amodra@gmail.com>
3002 * elf64-ppc.c (ppc64_elf_size_stubs): Test for localentry:0 plt
3003 calls before tocsave calls.
3004 (ppc64_elf_relocate_section): Allow localentry:0 plt calls without
3007 2017-06-21 Nick Clifton <nickc@redhat.com>
3010 * reloc.c (bfd_generic_get_relocated_section_contents): Fail if
3011 bfd_get_full_section_contents returns no contents.
3013 2017-06-21 Nick Clifton <nickc@redhat.com>
3016 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an undersized
3019 2017-06-21 Nick Clifton <nickc@redhat.com>
3022 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an empty section
3024 (image_set_ptr): Likewise.
3025 (alpha_vms_fix_sec_rel): Likewise.
3026 (alpha_vms_slurp_relocs): Likewise.
3028 2017-06-21 Nick Clifton <nickc@redhat.com>
3031 * ieee.c (ieee_slurp_sections): Check for a NULL return from
3033 (ieee_archive_p): Likewise.
3034 (ieee_object_p): Likewise.
3036 2017-06-21 Nick Clifton <nickc@redhat.com>
3039 * elf.c (setup_group): Zero the group section pointer list after
3040 allocation so that loops can be caught. Check for NULL pointers
3041 when processing a group list.
3043 2017-06-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
3045 * elf-s390.h: New file.
3046 * elf64-s390.c (struct elf_s390_link_hash_table): Add params
3048 (elf_s390_additional_program_headers): New function.
3049 (elf_s390_modify_segment_map): New function.
3050 (bfd_elf_s390_set_options): New function.
3051 (elf_backend_additional_program_headers)
3052 (elf_backend_modify_segment_map): Add macro definitions.
3054 2017-06-19 H.J. Lu <hongjiu.lu@intel.com>
3057 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Check
3058 the DYNAMIC bit instead of bfd_count_sections.
3060 2017-06-19 Nick Clifton <nickc@redhat.com>
3063 * vms-alpha.c (evax_bfd_print_emh): Check for insufficient record
3065 (evax_bfd_print_eeom): Likewise.
3066 (evax_bfd_print_egsd): Check for an overlarge record length.
3067 (evax_bfd_print_etir): Likewise.
3069 2017-06-19 Nick Clifton <nickc@redhat.com>
3072 * libieee.h (struct common_header_type): Add end_p field.
3073 * ieee.c (this_byte_and_next): Do not advance input_p beyond
3075 (read_id): Check for a length that exceeds the remaining bytes in
3077 (ieee_seek): Initialise end_p.
3078 (ieee_archive_p): Likewise.
3079 (ieee_object_p): Likewise.
3081 2017-06-19 Nick Clifton <nickc@redhat.com>
3084 * vms-alpha.c (_bfd_vms_slurp_eihs): Check for invalid offset
3085 before reading the EIHS structure entries.
3087 2017-06-19 Nick Clifton <nickc@redhat.com>
3090 * vms-alpha.c (_bfd_vms_slurp_egsd): Use unsigned int for
3091 gsd_size. Check that there are enough bytes remaining to read the
3092 type and size of the next egsd. Check that the size of the egsd
3093 does not exceed the size of the record.
3095 2017-06-19 Alan Modra <amodra@gmail.com>
3097 * config.bfd: Correct targ_underscore for cris.
3099 2017-06-18 Alan Modra <amodra@gmail.com>
3101 * config.bfd: Correct targ_underscore for epiphany, ip2k,
3102 m32c, mn10200, pru, rl78, rx, crisv32 and v850.
3104 2017-06-16 Nick Clifton <nickc@redhat.com>
3106 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Do not fail if the
3107 bucketlist is empty because there are no symbols to add to the
3110 2017-06-16 Alan Modra <amodra@gmail.com>
3116 * targets.c (struct bfd_target): Add _bfd_define_start_stop.
3117 (BFD_JUMP_TABLE_LINK): Likewise.
3118 * elf-bfd.h (bfd_elf_define_start_stop): Declare.
3119 * elflink.c (_bfd_elf_gc_mark_rsec): Update comment.
3120 (bfd_elf_define_start_stop): New function.
3121 * linker.c (bfd_generic_define_start_stop): New function.
3122 * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Init
3124 * aout-adobe.c (aout_32_bfd_define_start_stop): Define.
3125 * aout-target.h (MY_bfd_define_start_stop): Define.
3126 * aout-tic30.c (MY_bfd_define_start_stop): Define.
3127 * binary.c (binary_bfd_define_start_stop): Define.
3128 * bout.c (b_out_bfd_define_start_stop): Define.
3129 * coff-alpha.c (_bfd_ecoff_bfd_define_start_stop): Define.
3130 * coff-mips.c (_bfd_ecoff_bfd_define_start_stop): Define.
3131 * coff-rs6000.c (_bfd_xcoff_bfd_define_start_stop): Define.
3132 * coffcode.h (coff_bfd_define_start_stop): Define.
3133 * elfxx-target.h (bfd_elfNN_bfd_define_start_stop): Define.
3134 * i386msdos.c (msdos_bfd_define_start_stop): Define.
3135 * i386os9k.c (os9k_bfd_define_start_stop): Define.
3136 * ieee.c (ieee_bfd_define_start_stop): Define.
3137 * ihex.c (ihex_bfd_define_start_stop): Define.
3138 * libbfd-in.h (_bfd_nolink_bfd_define_start_stop): Define.
3139 * mach-o-target.c (bfd_mach_o_bfd_define_start_stop): Define.
3140 * mmo.c (mmo_bfd_define_start_stop): Define.
3141 * nlm-target.h (nlm_bfd_define_start_stop): Define.
3142 * oasys.c (oasys_bfd_define_start_stop): Define.
3143 * pef.c (bfd_pef_bfd_define_start_stop): Define.
3144 * plugin.c (bfd_plugin_bfd_define_start_stop): Define.
3145 * ppcboot.c (ppcboot_bfd_define_start_stop): Define.
3146 * som.c (som_bfd_define_start_stop): Define.
3147 * srec.c (srec_bfd_define_start_stop): Define.
3148 * tekhex.c (tekhex_bfd_define_start_stop): Define.
3149 * versados.c (versados_bfd_define_start_stop): Define.
3150 * vms-alpha.c (vms_bfd_define_start_stop): Define.
3151 (alpha_vms_bfd_define_start_stop): Define.
3152 * xsym.c (bfd_sym_bfd_define_start_stop): Define.
3153 * bfd-in2.h: Regenerate.
3154 * libbfd.h: Regenerate.
3156 2017-06-16 Jiong Wang <jiong.wang@arm.com>
3158 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use
3159 SYMBOL_REFERENCES_LOCAL.
3161 2017-06-15 Jiong Wang <jiong.wang@arm.com>
3164 * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
3165 (elfNN_aarch64_final_link_relocate): Also propagate relocations to
3166 runtime for if there needs copy relocation elimination.
3167 (need_copy_relocation_p): New function. Return true for symbol with
3168 pc-relative references and if it's against read-only sections.
3169 (elfNN_aarch64_adjust_dynamic_symbol): Use need_copy_relocation_p.
3170 (elfNN_aarch64_check_relocs): Allocate dynrelocs for relocation types
3171 that are related with accessing external objects.
3172 (elfNN_aarch64_gc_sweep_hook): Sync the relocation types with the change
3173 in elfNN_aarch64_check_relocs.
3175 2017-06-15 Nick Clifton <nickc@redhat.com>
3178 * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
3181 (ieee_archive_p): Likewise.
3183 2017-06-15 Nick Clifton <nickc@redhat.com>
3186 * vms-alpha.c (_bfd_vms_slurp_etir): Extend check of cmd_length.
3188 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
3190 * elf32-xtensa.c (elf_xtensa_be_plt_entry,
3191 elf_xtensa_le_plt_entry): Add dimension for the ABI to arrays,
3192 keep both windowed and call0 ABI PLT definitions.
3193 (elf_xtensa_create_plt_entry): Use selected ABI to choose upper
3194 elf_xtensa_*_plt_entry endex.
3195 (ELF_MAXPAGESIZE): Fix at minimal supported MMU page size.
3197 2017-06-14 Nick Clifton <nickc@redhat.com>
3200 * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid
3203 2017-06-14 Nick Clifton <nickc@redhat.com>
3206 * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the
3207 maximum value for the ascic pointer. Check that name processing
3208 does not read beyond this value.
3209 (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the
3212 2017-06-14 Nick Clifton <nickc@redhat.com>
3215 * versados.c (versados_mkobject): Zero the allocated tdata structure.
3216 (process_otr): Check for an invalid offset in the otr structure.
3218 2017-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
3220 * config.bfd (epiphany-*-elf): Accept epiphany-*-*.
3222 2017-06-13 H.J. Lu <hongjiu.lu@intel.com>
3228 * elf-bfd.h (elf_link_hash_entry): Add start_stop. Change the
3229 vtable field to a union.
3230 (_bfd_elf_is_start_stop): Removed.
3231 * elf32-i386.c (elf_i386_convert_load_reloc): Also check for
3232 __start_SECNAME and __stop_SECNAME symbols.
3233 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
3234 * elflink.c (_bfd_elf_is_start_stop): Removed.
3235 (_bfd_elf_gc_mark_rsec): Check start_stop instead of calling
3236 _bfd_elf_is_start_stop.
3237 (elf_gc_propagate_vtable_entries_used): Skip __start_SECNAME and
3238 __stop_SECNAME symbols. Updated.
3239 (elf_gc_smash_unused_vtentry_relocs): Likewise.
3240 (bfd_elf_gc_record_vtinherit): Likewise.
3241 (bfd_elf_gc_record_vtentry): Likewise.
3243 2017-06-13 Nick Clifton <nickc@redhat.com>
3246 * elflink.c (elf_link_adjust_relocs): Generate an error when
3247 encountering a reloc against a symbol removed by garbage
3250 2017-06-12 H.J. Lu <hongjiu.lu@intel.com>
3252 * elf-bfd.h (elf_backend_data): Add struct bfd_link_info *
3253 to merge_gnu_properties.
3254 * elf-properties.c (elf_merge_gnu_properties): Add struct
3255 bfd_link_info * and pass it to merge_gnu_properties.
3256 (elf_merge_gnu_property_list): Add struct bfd_link_info *
3257 and pass it to elf_merge_gnu_properties.
3258 (_bfd_elf_link_setup_gnu_properties): Pass info to
3259 elf_merge_gnu_property_list.
3260 * elf32-i386.c (elf_i386_merge_gnu_properties): Add struct
3262 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): Likewise.
3264 2017-06-11 Joe Zbiciak <joe.zbiciak@leftturnonly.info>
3267 * binary.c (binary_set_section_contents): Scale lma by octets
3268 per byte to set filepos.
3270 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3272 * elf32-arc.c (elf_arc_check_relocs): Fixed conditions to generate
3275 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3277 * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to
3280 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3282 * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to
3283 patched section contents for TLS IE reloc.
3284 * elf32-arc.c: Remove TCB_SIZE preprocessor macro.
3286 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3288 * elf32-arc.c (elf_arc_relocate_section): Added "call" to
3289 RELOC_FOR_GLOBAL_SYMBOL macro.
3291 2018-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3293 * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
3296 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3298 * config/tc-arc.c (md_undefined_symbol): Changed.
3299 * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed.
3301 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3303 * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
3306 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3308 * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
3309 warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
3311 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3313 * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
3316 2017-06-08 Richard Earnshaw <rearnsha@arm.com>
3318 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
3319 that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
3320 is non-zero. Add clarifying comments.
3322 2017-06-08 H.J. Lu <hongjiu.lu@intel.com>
3324 * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
3325 name. Use local IFUNC symbol name string to report unsupported
3326 non-PIC call to IFUNC function.
3327 (elf_i386_relocate_section): Dump local IFUNC name with minfo
3328 when generating R_386_IRELATIVE relocation.
3329 (elf_i386_finish_dynamic_symbol): Likewise.
3330 * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
3332 (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
3333 when generating R_X86_64_IRELATIVE relocation.
3334 (elf_x86_64_finish_dynamic_symbol): Likewise.
3336 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
3338 * elf.c (setup_group): Make sure BFD sections are created for all
3339 group sections in the input file when processing SHF_GROUP
3341 (bfd_section_from_shdr): Avoid duplicating logic already
3342 implemented in `setup_group'.
3344 2017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
3347 * peXXigen.c (pe_print_idata): Use the address of the first thunk
3348 if the hint address is zero.
3350 2017-06-06 James Clarke <jrtc27@jrtc27.com>
3353 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
3354 ELF_COMMON_DEF_P for common symbols.
3356 2017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
3358 * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
3359 SEC_GROUP sections as SEC_EXCLUDE.
3360 (bfd_elf_set_group_contents): Replace use of abort with an assert.
3361 (assign_section_numbers): Use resolve_section_groups flag instead
3362 of relocatable link type.
3363 (_bfd_elf_init_private_section_data): Use resolve_section_groups
3364 flag instead of checking the final_link flag for part of the
3365 checks in here. Fix white space as a result.
3366 * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
3367 instead of relocatable link type.
3368 (bfd_elf_final_link): Likewise.
3370 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
3372 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
3374 * elf32-score.c (score_elf_final_link_relocate): Likewise.
3375 (s3_bfd_score_elf_check_relocs): Likewise.
3376 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
3377 (score_elf_final_link_relocate): Likewise.
3378 (s7_bfd_score_elf_check_relocs): Likewise.
3380 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
3382 * elflink.c (init_reloc_cookie_rels): Remove unused variable
3385 2017-06-06 Maciej W. Rozycki <macro@imgtec.com>
3387 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
3388 from `reloc_count' rather than decrementing it.
3389 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
3390 `reloc_count' by `int_rels_per_ext_rel'.
3391 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
3392 `reloc_count' by `int_rels_per_ext_rel' for last relocation
3393 entry determination.
3394 (s3_bfd_score_elf_check_relocs): Likewise.
3395 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
3396 (s7_bfd_score_elf_relocate_section): Likewise.
3397 (s7_bfd_score_elf_check_relocs): Likewise.
3398 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
3399 prototype and function.
3400 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
3401 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
3402 triple rather than once the sum of REL and RELA relocation entry
3404 (bfd_elf64_get_reloc_upper_bound): Remove macro.
3405 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
3406 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
3407 storage allocation size determination.
3408 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
3409 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
3410 by `int_rels_per_ext_rel' for last relocation entry
3412 (bfd_elf_final_link): Do not multiply `reloc_count' by
3413 `int_rels_per_ext_rel' for internal relocation storage
3414 allocation size determination.
3415 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
3416 `int_rels_per_ext_rel' for last relocation entry determination.
3417 (elf_gc_smash_unused_vtentry_relocs): Likewise.
3418 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
3419 (_bfd_mips_elf_relocate_section): Likewise.
3421 2017-06-05 Alan Modra <amodra@gmail.com>
3424 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
3426 2017-06-01 John Baldwin <jhb@FreeBSD.org>
3428 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
3429 determine structure sizes.
3430 (elfcore_grok_freebsd_prstatus): Likewise.
3432 2017-06-01 Alan Modra <amodra@gmail.com>
3434 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
3435 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
3437 (is_elfv2_localentry0): New function.
3438 (ppc64_elf_tls_setup): Default params->plt_localentry0.
3439 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
3440 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
3441 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
3442 optimized localentry:0 stubs.
3443 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
3444 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
3446 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
3448 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
3450 2017-05-30 Casey Smith <clegg89@gmail.com>
3453 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
3454 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
3456 2017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
3458 * cpu-arc.c (arc_compatible): New function.
3460 2017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
3462 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
3464 2017-05-30 H.J. Lu <hongjiu.lu@intel.com>
3467 * bfdio.c (bfd_get_file_size): New function.
3468 * bfd-in2.h: Regenerated.
3470 2017-05-23 Dilian Palauzov <git-dpa@aegee.org>
3472 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
3475 2017-05-22 H.J. Lu <hongjiu.lu@intel.com>
3477 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
3478 dynobj instead of htab->elf.dynobj.
3480 2017-05-19 Maciej W. Rozycki <macro@imgtec.com>
3482 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
3484 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
3485 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
3486 actual number of internal relocations retrieved. Adjust
3487 function description.
3488 (bfd_elf64_canonicalize_reloc): Remove macro.
3489 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
3491 2017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
3493 * archures.c (bfd_mach_sparc_v9m8): Define.
3494 (bfd_mach_sparc_v8plusm8): Likewise.
3495 (bfd_mach_sparc_v9_p): Adjust to M8.
3496 (bfd_mach_sparc_64bit_p): Likewise.
3497 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
3498 bfd_mach_sparc_v8plusm8.
3499 * bfd-in2.h: Regenerated.
3500 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
3502 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
3503 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
3504 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
3506 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
3507 bfd_mach_sparc_v8plusm8.
3509 2017-05-19 Alan Modra <amodra@gmail.com>
3511 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
3512 debug and special sections when no non-note alloc sections in an
3515 2017-05-18 Alan Modra <amodra@gmail.com>
3517 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
3518 * elf-m10300.c: Likewise.
3520 * elf32-arc.c: Likewise.
3521 * elf32-bfin.c: Likewise.
3522 * elf32-m68k.c: Likewise.
3523 * elf32-nds32.c: Likewise.
3524 * elf32-tilepro.c: Likewise.
3525 * elflink.c: Likewise.
3526 * elfnn-aarch64.c: Likewise.
3527 * elfnn-riscv.c: Likewise.
3528 * elfxx-tilegx.c: Likewise.
3529 * mach-o.c: Likewise.
3530 * peXXigen.c: Likewise.
3531 * vms-alpha.c: Likewise.
3532 * vms-lib.c: Likewise.
3534 2017-05-17 H.J. Lu <hongjiu.lu@intel.com>
3537 * elflink.c (elf_gc_mark_debug_section): New function.
3538 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
3539 referenced by kept debug sections.
3541 2017-05-16 Alan Modra <amodra@gmail.com>
3543 * elf-m10300.c: Rename occurrences of non_ir_ref.
3544 * elf32-arm.c: Likewise.
3545 * elf32-bfin.c: Likewise.
3546 * elf32-cr16.c: Likewise.
3547 * elf32-cris.c: Likewise.
3548 * elf32-d10v.c: Likewise.
3549 * elf32-dlx.c: Likewise.
3550 * elf32-fr30.c: Likewise.
3551 * elf32-frv.c: Likewise.
3552 * elf32-hppa.c: Likewise.
3553 * elf32-i370.c: Likewise.
3554 * elf32-i386.c: Likewise.
3555 * elf32-iq2000.c: Likewise.
3556 * elf32-lm32.c: Likewise.
3557 * elf32-m32c.c: Likewise.
3558 * elf32-m32r.c: Likewise.
3559 * elf32-m68hc1x.c: Likewise.
3560 * elf32-m68k.c: Likewise.
3561 * elf32-mcore.c: Likewise.
3562 * elf32-metag.c: Likewise.
3563 * elf32-microblaze.c: Likewise.
3564 * elf32-moxie.c: Likewise.
3565 * elf32-msp430.c: Likewise.
3566 * elf32-mt.c: Likewise.
3567 * elf32-nios2.c: Likewise.
3568 * elf32-or1k.c: Likewise.
3569 * elf32-ppc.c: Likewise.
3570 * elf32-rl78.c: Likewise.
3571 * elf32-s390.c: Likewise.
3572 * elf32-score.c: Likewise.
3573 * elf32-score7.c: Likewise.
3574 * elf32-sh.c: Likewise.
3575 * elf32-tic6x.c: Likewise.
3576 * elf32-tilepro.c: Likewise.
3577 * elf32-v850.c: Likewise.
3578 * elf32-vax.c: Likewise.
3579 * elf32-xstormy16.c: Likewise.
3580 * elf32-xtensa.c: Likewise.
3581 * elf64-alpha.c: Likewise.
3582 * elf64-hppa.c: Likewise.
3583 * elf64-ia64-vms.c: Likewise.
3584 * elf64-mmix.c: Likewise.
3585 * elf64-ppc.c: Likewise.
3586 * elf64-s390.c: Likewise.
3587 * elf64-sh64.c: Likewise.
3588 * elf64-x86-64.c: Likewise.
3589 * elflink.c: Likewise.
3590 * elfnn-aarch64.c: Likewise.
3591 * elfnn-ia64.c: Likewise.
3592 * elfnn-riscv.c: Likewise.
3593 * elfxx-mips.c: Likewise.
3594 * elfxx-sparc.c: Likewise.
3595 * elfxx-tilegx.c: Likewise.
3596 * linker.c: Likewise.
3598 2017-05-16 Alan Modra <amodra@gmail.com>
3600 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
3601 * elflink.c (elf_link_add_object_symbols): Update to use
3603 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
3605 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
3607 2017-05-15 Maciej W. Rozycki <macro@imgtec.com>
3609 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
3611 2017-05-12 H.J. Lu <hongjiu.lu@intel.com>
3613 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
3614 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
3616 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
3618 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
3620 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
3622 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
3623 to plt_second/plt_second_eh_frame.
3624 (elf_x86_64_link_hash_newfunc): Updated.
3625 (elf_x86_64_allocate_dynrelocs): Likewise.
3626 (elf_x86_64_size_dynamic_sections): Likewise.
3627 (elf_x86_64_relocate_section): Likewise.
3628 (elf_x86_64_finish_dynamic_symbol): Likewise.
3629 (elf_x86_64_finish_dynamic_sections): Likewise.
3630 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
3631 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
3633 (elf_backend_setup_gnu_properties): Updated. Create the
3634 .plt.sec section instead of the .plt.sec section.
3636 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
3638 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
3639 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
3640 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
3642 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
3644 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
3645 (bfd_elf64_set_reloc): Define.
3646 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
3648 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
3650 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
3651 (struct bfd_target): New field _bfd_set_reloc.
3652 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
3653 * reloc.c (_bfd_generic_set_reloc): New function.
3654 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
3655 * nlm-target.h (nlm_set_reloc): Likewise.
3656 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
3657 * aout-tic30.c (MY_set_reloc): Likewise.
3658 * aout-target.h (MY_set_reloc): Likewise.
3659 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
3660 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
3661 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
3662 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
3663 * aout-adobe.c (aout_32_set_reloc): Likewise.
3664 * bout.c (b_out_set_reloc): Likewise.
3665 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
3666 * i386os9k.c (aout_32_set_reloc): Likewise.
3667 * ieee.c (ieee_set_reloc): Likewise.
3668 * oasys.c (oasys_set_reloc): Likewise.
3669 * som.c (som_set_reloc): Likewise.
3670 * versados.c (versados_set_reloc): Likewise.
3671 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
3672 _bfd_generic_set_reloc.
3673 (rs6000_xcoff64_aix_vec): LIkewise.
3674 * libbfd.c (_bfd_norelocs_set_reloc): New function.
3675 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
3676 * i386msdos.c (msdos_set_reloc): Define to
3677 _bfd_norelocs_set_reloc.
3678 * elfcode.h (elf_set_reloc): Define.
3679 * bfd-in2.h: Regenerated.
3681 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
3684 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
3685 for IFUNC function address.
3687 2017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
3689 * elf32-arc.c (FEATURE_LIST_NAME): Define.
3690 (CONFLICT_LIST): Likewise.
3691 (opcode/arc-attrs.h): Include.
3692 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
3693 (arc_extract_features): New file.
3694 (arc_stralloc): Likewise.
3695 (arc_elf_merge_attributes): Likewise.
3696 (arc_elf_merge_private_bfd_data): Use object attributes.
3697 (bfd_arc_get_mach_from_attributes): New function.
3698 (arc_elf_object_p): Use object attributes.
3699 (arc_elf_final_write_processing): Likewise.
3700 (elf32_arc_obj_attrs_arg_type): New function.
3701 (elf32_arc_obj_attrs_handle_unknown): Likewise.
3702 (elf32_arc_section_from_shdr): Likewise.
3703 (elf_backend_obj_attrs_vendor): Define.
3704 (elf_backend_obj_attrs_section): Likewise.
3705 (elf_backend_obj_attrs_arg_type): Likewise.
3706 (elf_backend_obj_attrs_section_type): Likewise.
3707 (elf_backend_obj_attrs_handle_unknown): Likewise.
3708 (elf_backend_section_from_shdr): Likewise.
3710 2017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
3713 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
3714 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
3715 and the destination is a Thumb symbol.
3717 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
3719 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
3720 initializer to silence GCC 4.2.
3721 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
3723 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
3725 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
3726 (LAZY_PLT_ENTRY_SIZE): This.
3727 (NON_LAZY_PLT_ENTRY_SIZE): New.
3728 (elf_x86_64_plt0_entry): Renamed to ...
3729 (elf_x86_64_lazy_plt0_entry): This.
3730 (elf_x86_64_plt_entry): Renamed to ...
3731 (elf_x86_64_lazy_plt_entry): This.
3732 (elf_x86_64_bnd_plt0_entry): Renamed to ...
3733 (elf_x86_64_lazy_bnd_plt0_entry): This.
3734 (elf_x86_64_legacy_plt_entry): Removed.
3735 (elf_x86_64_bnd_plt_entry): Renamed to ...
3736 (elf_x86_64_lazy_bnd_plt_entry): This.
3737 (elf_x86_64_legacy_plt2_entry): Renamed to ...
3738 (elf_x86_64_non_lazy_plt_entry): This.
3739 (elf_x86_64_bnd_plt2_entry): Renamed to ...
3740 (elf_x86_64_non_lazy_bnd_plt_entry): This.
3741 (elf_x86_64_eh_frame_plt): Renamed to ...
3742 (elf_x86_64_eh_frame_lazy_plt): This.
3743 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
3744 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
3745 (elf_x86_64_eh_frame_plt_got): Renamed to ...
3746 (elf_x86_64_eh_frame_non_lazy_plt): This.
3747 (elf_x86_64_lazy_plt_layout): New.
3748 (elf_x86_64_non_lazy_plt_layout): Likewise.
3749 (elf_x86_64_plt_layout): Likewise.
3750 (elf_x86_64_backend_data): Remove PLT layout information. Add
3751 os for target system.
3752 (GET_PLT_ENTRY_SIZE): Removed.
3753 (elf_x86_64_lazy_plt): New.
3754 (elf_x86_64_non_lazy_plt): Likewise.
3755 (elf_x86_64_lazy_bnd_plt): Likewise.
3756 (elf_x86_64_non_lazy_bnd_plt): Likewise.
3757 (elf_x86-64_arch_bed): Updated.
3758 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
3759 (elf_x86_64_create_dynamic_sections): Removed.
3760 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
3761 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
3762 (elf_x86-64_adjust_dynamic_symbol): Updated.
3763 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
3764 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
3765 size for PLT0 if there is no PLT0. Get plt_entry_size from
3766 non_lazy_plt for non-lazy PLT entries.
3767 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
3768 from non_lazy_plt for non-lazy PLT entries.
3769 (elf_x86-64_relocate_section): Updated. Properly get PLT index
3770 if there is no PLT0.
3771 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
3772 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
3773 entries with non-lazy PLT layout. Don't fill the second and third
3774 slots in the PLT entry if there is no PLT0.
3775 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
3776 if there is no PLT0. Set sh_entsize on the .plt.got section.
3777 (compare_relocs): New.
3778 (elf_x86_64_plt_type): Likewise.
3779 (elf_x86_64_plt): Likewise.
3780 (elf_x86_64_nacl_plt): New. Forward declaration.
3781 (elf_x86_64_get_plt_sym_val): Removed.
3782 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
3783 against all dynamic relocations.
3784 (elf_x86_64_link_setup_gnu_properties): New function.
3785 (elf_backend_create_dynamic_sections): Updated.
3786 (elf_backend_setup_gnu_properties): New.
3787 (elf_x86_64_nacl_plt): New.
3788 (elf_x86_64_nacl_arch_bed): Updated.
3790 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
3792 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
3793 (LAZY_PLT_ENTRY_SIZE): This.
3794 (NON_LAZY_PLT_ENTRY_SIZE): New.
3795 (elf_i386_plt0_entry): Renamed to ...
3796 (elf_i386_lazy_plt0_entry): This.
3797 (elf_i386_plt_entry): Renamed to ...
3798 (elf_i386_lazy_plt_entry): This.
3799 (elf_i386_pic_plt0_entry): Renamed to ...
3800 (elf_i386_pic_lazy_plt0_entry): This.
3801 (elf_i386_pic_plt_entry): Renamed to ...
3802 (elf_i386_pic_lazy_plt_entry): This.
3803 (elf_i386_got_plt_entry): Renamed to ...
3804 (elf_i386_non_lazy_plt_entry): This.
3805 (elf_i386_pic_got_plt_entry): Renamed to ...
3806 (elf_i386_pic_non_lazy_plt_entry): This.
3807 (elf_i386_eh_frame_plt): Renamed to ...
3808 (elf_i386_eh_frame_lazy_plt): This.
3809 (elf_i386_eh_frame_plt_got): Renamed to ...
3810 (elf_i386_eh_frame_non_lazy_plt): This.
3811 (elf_i386_plt_layout): Renamed to ...
3812 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
3813 eh_frame_plt_got_size.
3814 (elf_i386_non_lazy_plt_layout): New.
3815 (elf_i386_plt_layout): Likewise.
3816 (elf_i386_non_lazy_plt): Likewise.
3817 (GET_PLT_ENTRY_SIZE): Removed.
3818 (elf_i386_plt): Renamed to ...
3819 (elf_i386_lazy_plt): This.
3820 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
3821 (elf_i386_arch_bed): Updated.
3822 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
3823 (elf_i386_create_dynamic_sections): Removed.
3824 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
3825 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
3826 (elf_i386_adjust_dynamic_symbol): Updated.
3827 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
3828 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
3829 size for PLT0 if there is no PLT0.
3830 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
3831 output section is discarded only if GOT isn't empty.
3832 (elf_i386_relocate_section): Updated. Properly get PLT index
3833 if there is no PLT0.
3834 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
3835 second and third slots in the PLT entry if there is no PLT0.
3836 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
3837 if there is no PLT0. Set sh_entsize on the .plt.got section.
3838 (elf_i386_nacl_plt): Forward declaration.
3839 (elf_i386_get_plt_sym_val): Removed.
3840 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
3841 against all dynamic relocations.
3842 (elf_i386_link_setup_gnu_properties): New function.
3843 (elf_backend_create_dynamic_sections): Updated.
3844 (elf_backend_setup_gnu_properties): New.
3845 (elf_i386_nacl_plt): Updated.
3846 (elf_i386_nacl_arch_bed): Likewise.
3847 (elf_i386_vxworks_arch_bed): Likewise.
3849 2017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
3851 * elflink.c (elf_output_implib): Remove executable flag from import
3853 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
3854 library is a relocatable object file.
3856 2017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
3859 * elf32-avr.c (avr_should_move_sym): New function.
3860 (avr_should_reduce_sym_size): Likewise.
3861 (avr_should_increase_sym_size): Likewise.
3862 (elf32_avr_relax_delete_bytes): Adjust symbol values
3863 and sizes by calling new functions.
3865 2017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
3867 * config.bfd (riscv32-*): Enable rv64.
3869 2017-05-02 Alan Modra <amodra@gmail.com>
3872 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
3873 rather than h->root.type == bfd_link_hash_new.
3874 (bfd_elf_record_link_assignment): Similarly, call
3875 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
3877 2017-04-29 Alan Modra <amodra@gmail.com>
3880 * reloc.c (reloc_offset_in_range): New function.
3881 (bfd_perform_relocation, bfd_install_relocation): Use it.
3882 (_bfd_final_link_relocate): Likewise.
3884 2017-04-28 H.J. Lu <hongjiu.lu@intel.com>
3886 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
3887 before using .plt.got.
3888 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
3890 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3892 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
3893 instead of "+=" to update 0.
3895 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3897 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
3898 .plt.got section here.
3899 (elf_i386_check_relocs): Don't create the .plt.got section.
3900 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
3901 the .plt.got and .plt.bnd sections here.
3902 (elf_x86_64_check_relocs): Don't create the .plt.got nor
3905 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3907 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
3909 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
3910 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
3911 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
3912 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
3915 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3917 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
3919 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
3920 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
3921 the first relocatable ELF input with GNU properties.
3923 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3925 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
3926 VxWorks for non-PIC.
3928 2017-04-27 Alan Modra <amodra@gmail.com>
3930 * elf-bfd.h (struct elf_backend_data): Make asection param of
3931 elf_backend_eh_frame_address_size const.
3932 (_bfd_elf_eh_frame_address_size): Likewise.
3933 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
3934 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
3935 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
3936 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
3937 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
3938 (next_cie_fde_offset): Constify params.
3939 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
3941 2017-04-27 Alan Modra <amodra@gmail.com>
3943 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
3944 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
3945 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
3947 (offset_adjust): New function.
3948 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
3949 (adjust_eh_frame_local_symbols): Likewise.
3950 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
3951 after changing anything. Return true if anything changed.
3952 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
3953 _bfd_elf_adjust_eh_frame_global_symbol for globals.
3955 2017-04-27 Alan Modra <amodra@gmail.com>
3957 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
3960 2017-04-27 Alan Modra <amodra@gmail.com>
3962 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
3963 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
3964 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
3965 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
3966 for undef and undefweak dyn_relocs.
3967 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
3968 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
3969 (allocate_got, allocate_dynrelocs): Likewise.
3970 (ppc64_elf_relocate_section): Likewise.
3972 2017-04-26 H.J. Lu <hongjiu.lu@intel.com>
3974 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
3975 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
3976 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
3977 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
3979 2017-04-26 Nick Clifton <nickc@redhat.com>
3982 * reloc.c (bfd_perform_relocation): Check for a negative address
3985 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
3988 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
3990 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
3991 (elf_backend_always_renumber_dynsyms): Define.
3992 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
3993 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
3994 * elflink.c (bfd_elf_size_dynamic_sections): Also call
3995 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
3997 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
3999 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
4001 * elflink.c (bfd_elf_size_dynamic_sections): Only call
4002 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
4003 sections have been created.
4005 2017-04-26 Nick Clifton <nickc@redhat.com>
4008 * compress.c (bfd_init_section_compress_status): Check the return
4009 value from bfd_malloc.
4011 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
4013 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
4014 no_finish_dynamic_symbol.
4015 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
4017 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
4018 weak symbol, don't make it dynamic.
4019 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
4020 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
4021 relocation for GOT reference.
4022 (elf_x86_64_finish_dynamic_symbol): Abort if
4023 no_finish_dynamic_symbol isn't 0.
4025 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
4028 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
4029 undefined weak symbol, don't make it dynamic.
4030 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
4031 set no_finish_dynamic_symbol and generate R_386_RELATIVE
4032 relocation for R_386_GOT32.
4034 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
4037 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
4039 2017-04-23 Alan Modra <amodra@gmail.com>
4042 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
4043 * elf.c (lcomm_sym): New.
4044 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
4045 * bfd-in2.h: Regenerate.
4047 2017-04-23 Alan Modra <amodra@gmail.com>
4050 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
4051 parameters and comment.
4052 (_bfd_elf_get_reloc_section): Delete.
4053 (_bfd_elf_plt_get_reloc_section): Declare.
4054 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
4055 New functions. Don't blindly skip over assumed .rel/.rela prefix.
4057 (_bfd_elf_get_reloc_section): ..here. Delete.
4058 (assign_section_numbers): Call elf_get_reloc_section.
4059 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
4060 * elfxx-target.h (elf_backend_get_reloc_section): Update.
4062 2017-04-23 Alan Modra <amodra@gmail.com>
4065 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
4068 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
4071 * elf32-i386.c (elf_i386_link_hash_entry): Add
4072 no_finish_dynamic_symbol.
4073 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
4074 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
4075 symbol, don't make it dynamic in PIE.
4076 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
4077 set no_finish_dynamic_symbol and generate R_386_RELATIVE
4078 relocation for R_386_GOT32
4079 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
4082 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
4086 * elflink.c (elf_link_add_object_symbols): Require
4087 --no-dynamic-linker with -E/--dynamic-list when creating
4090 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
4092 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
4095 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
4097 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
4098 dynamic symbol sorting.
4100 2017-04-20 H.J. Lu <hongjiu.lu@intel.com>
4103 * elflink.c (elf_link_add_object_symbols): Preserve
4104 dynamic_ref_after_ir_def when restoring the symbol table for
4105 unneeded dynamic object.
4107 2017-04-19 H.J. Lu <hongjiu.lu@intel.com>
4110 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
4111 on on undefined IFUNC symbol in the second PLT.
4113 2017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
4115 * peXXigen.c (pe_print_reloc): Correct chunk_end.
4117 2017-04-19 Alan Modra <amodra@gmail.com>
4119 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
4120 or make dynamic for info->dynamic_undefined_weak 0 and 1.
4121 * elf32-ppc.c:Formatting.
4122 (ensure_undefweak_dynamic): Don't make dynamic when
4123 info->dynamic_undefined_weak is zero.
4124 (allocate_dynrelocs): Discard undefweak dyn_relocs for
4125 info->dynamic_undefined_weak. Discard undef dyn_relocs when
4126 not default visibility. Discard undef and undefweak
4128 (ppc_elf_relocate_section): Adjust to suit.
4129 * elf64-ppc.c: Formatting.
4130 (ensure_undefweak_dynamic): Don't make dynamic when
4131 info->dynamic_undefined_weak is zero.
4132 (allocate_dynrelocs): Discard undefweak dyn_relocs for
4133 info->dynamic_undefined_weak. Discard them earlier.
4135 2017-04-17 H.J. Lu <hongjiu.lu@intel.com>
4138 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
4139 before generating the version definition section.
4141 2017-04-17 Alan Modra <amodra@gmail.com>
4143 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
4144 state when a regular object file defines a symbol with
4145 incompatible type to that defined by an earlier shared lib.
4147 2017-04-13 Alan Modra <amodra@gmail.com>
4149 * coffcode.h: Wrap some overly long _bfd_error_handler args.
4151 * elf32-arm.c: Likewise.
4152 * elf32-i386.c: Likewise.
4153 * elf32-mep.c: Likewise.
4154 * elf64-ia64-vms.c: Likewise.
4155 * elf64-x86-64.c: Likewise.
4156 * elflink.c: Likewise.
4157 * elfnn-ia64.c: Likewise.
4158 * elfxx-mips.c: Likewise.
4160 2017-04-13 Alan Modra <amodra@gmail.com>
4162 * aoutx.h: Use %B and %A in error messages throughout file.
4163 * aout-cris.c: Likewise.
4164 * archive.c: Likewise.
4165 * binary.c: Likewise.
4166 * coff-rs6000.c: Likewise.
4167 * coff-tic4x.c: Likewise.
4168 * coffcode.h: Likewise.
4169 * coffgen.c: Likewise.
4170 * cofflink.c: Likewise.
4171 * coffswap.h: Likewise.
4172 * cpu-arm.c: Likewise.
4173 * elf-eh-frame.c: Likewise.
4174 * elf-m10300.c: Likewise.
4176 * elf32-arc.c: Likewise.
4177 * elf32-arm.c: Likewise.
4178 * elf32-bfin.c: Likewise.
4179 * elf32-frv.c: Likewise.
4180 * elf32-iq2000.c: Likewise.
4181 * elf32-m32c.c: Likewise.
4182 * elf32-microblaze.c: Likewise.
4183 * elf32-nds32.c: Likewise.
4184 * elf32-rl78.c: Likewise.
4185 * elf32-rx.c: Likewise.
4186 * elf32-score.c: Likewise.
4187 * elf32-score7.c: Likewise.
4188 * elf32-sh64.c: Likewise.
4189 * elf32-v850.c: Likewise.
4190 * elf32-vax.c: Likewise.
4191 * elf32-visium.c: Likewise.
4192 * elf64-ia64-vms.c: Likewise.
4193 * elf64-mmix.c: Likewise.
4194 * elf64-sh64.c: Likewise.
4195 * elfcode.h: Likewise.
4196 * elfnn-aarch64.c: Likewise.
4197 * elfnn-ia64.c: Likewise.
4198 * elfxx-mips.c: Likewise.
4199 * hpux-core.c: Likewise.
4202 * linker.c: Likewise.
4203 * merge.c: Likewise.
4205 * oasys.c: Likewise.
4206 * pdp11.c: Likewise.
4207 * peXXigen.c: Likewise.
4208 * rs6000-core.c: Likewise.
4209 * vms-alpha.c: Likewise.
4210 * xcofflink.c: Likewise.
4212 2017-04-13 Alan Modra <amodra@gmail.com>
4214 * bfd.c (PRINT_TYPE): Define.
4215 (_doprnt): New function.
4216 (error_handler_internal): Use _doprnt.
4217 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
4218 calls in their natural order, throughout file.
4219 * coff-mcore.c: Likewise.
4220 * coff-ppc.c: Likewise.
4221 * coff-tic80.c: Likewise.
4222 * cofflink.c: Likewise.
4223 * elf-s390-common.c: Likewise.
4225 * elf32-arm.c: Likewise.
4226 * elf32-i386.c: Likewise.
4227 * elf32-m32r.c: Likewise.
4228 * elf32-msp430.c: Likewise.
4229 * elf32-spu.c: Likewise.
4230 * elf64-ia64-vms.c: Likewise.
4231 * elf64-sparc.c: Likewise.
4232 * elf64-x86-64.c: Likewise.
4233 * elflink.c: Likewise.
4234 * elfnn-aarch64.c: Likewise.
4235 * elfnn-ia64.c: Likewise.
4236 * elfxx-mips.c: Likewise.
4238 2017-04-13 Alan Modra <amodra@gmail.com>
4240 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
4241 branch veneers" error. Fix double space and format message.
4242 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
4243 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
4245 2017-04-13 Alan Modra <amodra@gmail.com>
4247 * bfd-in2.h: Regenerate.
4249 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
4251 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
4252 extra `\n' in warning/error messages.
4253 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
4254 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
4256 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
4258 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
4259 processor-specific properties with generic ELF target vector.
4261 2017-04-10 Qing Zhao <qing.zhao@oracle.com>
4263 * elf32-sparc.c (elf_backend_fixup_symbol): New.
4264 * elf64-sparc.c (elf_backend_fixup_symbol): New.
4265 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
4266 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
4268 (link_hash_newfunc): Initialize has_got_reloc and
4270 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
4272 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
4274 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
4276 (_bfd_sparc_elf_fixup_symbol): New function.
4277 (allocate_dynrelocs): Don't allocate space for dynamic
4278 relocations and discard relocations against resolved undefined
4279 weak symbols in executable. Don't make resolved undefined weak
4280 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
4281 relocation against undefined weak symbols in PIE.
4282 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
4283 relocations against resolved undefined weak symbols in PIE
4284 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
4285 without ynamic PLT/GOT relocations for resolved undefined weak
4287 Don't generate dynamic relocation against resolved undefined
4288 weak symbol in executable.
4289 (pie_finish_undefweak_symbol): New function.
4290 (_bfd_sparc_elf_finish_dynamic_sections): Call
4291 pie_finish_undefweak_symbol on all symbols in PIE.
4292 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
4293 (_bfd_sparc_elf_fixup_symbol): New function.
4295 2017-04-10 Nick Clifton <nickc@redhat.com>
4297 * config.bfd: Remove ns32k from obsolete list.
4299 2017-04-10 Alan Modra <amodra@gmail.com>
4302 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
4303 (special_sections_i): Likewise for .init_array.
4304 (special_sections_p): Likewise for .preinit_array.
4306 2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
4310 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
4311 ELF_COMMON_DEF_P for common symbols.
4312 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
4313 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
4314 * elflink.c (_bfd_elf_merge_symbol): Revert commits
4315 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
4316 07492f668d2173da7a2bda3707ff0985e0f460b6.
4318 2017-04-07 Pedro Alves <palves@redhat.com>
4320 * opncls.c (bfd_get_debug_link_info): Rename to...
4321 (bfd_get_debug_link_info_1): ... this. Change type of second
4322 parameter to void pointer. Adjust.
4323 (bfd_get_debug_link_info): Reimplement on top of
4324 bfd_get_debug_link_info_1.
4325 (separate_debug_file_exists, separate_alt_debug_file_exists):
4326 Change type of second parameter to void pointer. Adjust.
4327 (get_func_type, check_func_type): Change type of second parameter
4329 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
4330 the callback functions instead of passing the address of a local.
4331 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
4332 find_separate_debug_file.
4333 (get_alt_debug_link_info_shim): Change type of second parameter to
4334 void pointer. Adjust.
4335 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
4336 find_separate_debug_file.
4337 (get_build_id_name, bfd_boolean check_build_id_file): Change type
4338 of second parameter to void pointer. Adjust.
4339 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
4340 pointer local to find_separate_debug_file.
4342 2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
4344 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
4345 external symbols with a definition.
4346 (_bfd_coff_gc_mark_extra_sections): Fix typo.
4348 2017-04-07 Alan Modra <amodra@gmail.com>
4350 * po/SRC-POTFILES.in: Regenerate.
4352 2017-04-05 Alan Modra <amodra@gmail.com>
4354 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
4357 2017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
4359 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
4360 numbers for DataDirectory entry indicies passed to
4363 2017-04-04 H.J. Lu <hongjiu.lu@intel.com>
4365 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
4366 each GNU_MBIND section and align GNU_MBIND section to page size.
4367 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
4368 segment for each GNU_MBIND section.
4369 (_bfd_elf_init_private_section_data): Copy sh_info from input
4370 for GNU_MBIND section.
4372 2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
4374 * elfnn-riscv.c (GP_NAME): Delete.
4375 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
4376 (_bfd_riscv_relax_lui): Likewise.
4378 2017-04-04 Nick Clifton <nickc@redhat.com>
4381 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
4383 (bfd_elf_final_link): Only initialize the extended symbol index
4384 section if there are extended symbol tables to list.
4386 2017-04-03 H.J. Lu <hongjiu.lu@intel.com>
4388 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
4389 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
4390 * configure.ac (elf): Add elf-properties.lo.
4391 * Makefile.in: Regenerated.
4392 * configure: Likewise.
4393 * elf-bfd.h (elf_property_kind): New.
4394 (elf_property): Likewise.
4395 (elf_property_list): Likewise.
4396 (elf_properties): Likewise.
4397 (_bfd_elf_parse_gnu_properties): Likewise.
4398 (_bfd_elf_get_property): Likewise.
4399 (_bfd_elf_link_setup_gnu_properties): Likewise.
4400 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
4401 and setup_gnu_properties.
4402 (elf_obj_tdata): Add properties.
4403 * elf-properties.c: New file.
4404 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
4405 (elf_i386_merge_gnu_properties): Likewise.
4406 (elf_backend_parse_gnu_properties): Likewise.
4407 (elf_backend_merge_gnu_properties): Likewise.
4408 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
4409 (elf_x86_64_merge_gnu_properties): Likewise.
4410 (elf_backend_parse_gnu_properties): Likewise.
4411 (elf_backend_merge_gnu_properties): Likewise.
4412 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
4413 (elf_backend_parse_gnu_properties): Likewise.
4414 (elf_backend_setup_gnu_properties): Likewise.
4415 (elfNN_bed): Add elf_backend_parse_gnu_properties,
4416 elf_backend_merge_gnu_properties and
4417 elf_backend_setup_gnu_properties.
4419 2017-03-30 Pip Cet <pipcet@gmail.com>
4421 * elf32-wasm32.c: Add relocation code, two relocs.
4422 * reloc.c: Add wasm32 relocations.
4423 * libbfd.h: Regenerate.
4424 * bfd-in2.h: Regenerate.
4425 * bfd/po/bfd.pot: Regenerate.
4427 2017-03-29 Nick Clifton <nickc@redhat.com>
4430 * coff-bfd.h (struct coff_section_data): Add new fields:
4431 saved_bias and bias.
4432 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
4433 computed for PE binaries.
4434 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
4437 2017-03-28 Hans-Peter Nilsson <hp@axis.com>
4440 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
4441 to handle a local symbol with a hash-symbol-entry; without PLT.
4442 Add BFD_ASSERT for an incidental case with GOT entry present.
4443 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
4444 isn't forced-or-set local.
4446 2017-03-27 Pip Cet <pipcet@gmail.com>
4448 * wasm-module.c: New file to support WebAssembly modules.
4449 * wasm-module.h: New file to support WebAssembly modules.
4450 * doc/webassembly.texi: Start documenting wasm-module.c.
4451 * config.bfd: Add wasm_vec.
4452 * targets.c: Likewise.
4453 * configure.ac: Likewise.
4454 * Makefile.am: Add entries for wasm-module.c.
4455 * Makefile.in: Regenerate.
4456 * configure: Regenerate.
4457 * po/SRC-POTFILES.in: Regenerate.
4459 2017-03-27 Pip Cet <pipcet@gmail.com>
4461 * cpu-wasm32.c: New file to support wasm32 architecture.
4462 * elf32-wasm32.c: New file to support wasm32 architecture.
4463 * Makefile.am: Add wasm32 architecture.
4464 * archures.c: Likewise.
4465 * config.bfd: Likewise.
4466 * configure.ac: Likewise.
4467 * targets.c: Likewise.
4468 * Makefile.in: Regenerate.
4469 * bfd-in2.h: Regenerate.
4470 * configure: Regenerate.
4471 * po/SRC-POTFILES.in: Regenerate.
4473 2017-03-20 Alan Modra <amodra@gmail.com>
4476 * elf64-ppc.c (compare_symbols): Stabilize sort.
4478 2017-03-18 Alan Modra <amodra@gmail.com>
4480 * elf64-ppc.c (struct ppc_link_hash_table): Add
4481 local_ifunc_resolver and maybe_local_ifunc_resolver.
4482 (ppc_build_one_stub): Set flags on emitting dynamic
4483 relocation to ifunc.
4484 (ppc64_elf_relocate_section): Likewise.
4485 (ppc64_elf_finish_dynamic_symbol): Likewise.
4486 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
4487 local dynamic relocs to ifuncs.
4488 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
4489 local_ifunc_resolver and maybe_local_ifunc_resolver.
4490 (ppc_elf_relocate_section): Set flag on emitting dynamic
4491 relocation to ifuncs.
4492 (ppc_elf_finish_dynamic_symbol): Likewise.
4493 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
4494 dynamic relocs to ifuncs.
4496 2017-03-13 Nick Clifton <nickc@redhat.com>
4499 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
4500 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
4501 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
4502 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
4503 * bfd-in2.h: Regenerate.
4504 * libbfd.h: Regenerate.
4505 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
4507 (IS_AARCH64_TLSDESC_RELOC): Likewise.
4508 (elfNN_aarch64_howto_table): Likewise.
4509 (aarch64_tls_transition_without_check): Likewise.
4510 (aarch64_reloc_got_type): Likewise.
4511 (elfNN_aarch64_final_link_relocate): Likewise.
4512 (elfNN_aarch64_tls_relax): Likewise.
4513 (elfNN_aarch64_relocate_section): Likewise.
4514 (elfNN_aarch64_gc_sweep_hook): Likewise.
4515 (elfNN_aarch64_check_relocs): Likewise.
4516 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
4517 (_bfd_aarch64_elf_resolve_relocation): Likewise.
4519 2017-03-11 Alan Modra <amodra@gmail.com>
4521 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
4522 parameter is in fact used. Whitespace fixes.
4523 * elf64-ppc.c: Likewise.
4525 2017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
4527 * rs6000-core.c (CORE_NEW): Simplify macro when
4528 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
4530 2017-03-07 Alan Modra <amodra@gmail.com>
4534 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
4537 2017-03-05 Alan Modra <amodra@gmail.com>
4539 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
4540 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
4541 (next_cie_fde_offset): New function.
4542 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
4543 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
4544 four bytes. Align CIEs to four or eight bytes depending on
4545 per_encoding_aligned8. Align FDEs according to their encoding.
4546 Pad last FDE to output section alignment.
4547 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
4549 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
4550 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
4551 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
4553 2017-03-02 Martin Bickel <binutils@ineranves.de>
4556 * elf.c (rewrite_elf_program_header): Do not issue a warning for
4557 empty segments which have a zero filesz, but a non-zero memsz.
4559 2017-03-02 Alan Modra <amodra@gmail.com>
4561 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
4563 2017-02-28 Alan Modra <amodra@gmail.com>
4565 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
4566 (ppc64_elf_relocate_section): Likewise.
4568 2017-02-28 Alan Modra <amodra@gmail.com>
4571 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
4572 rather than elf32_nios2_hash_table or elf_hash_table.
4573 (create_got_section): Likewise.
4574 (nios2_elf32_finish_dynamic_symbol): Likewise.
4575 (nios2_elf32_adjust_dynamic_symbol): Likewise.
4576 (nios2_elf32_size_dynamic_sections): Likewise.
4577 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
4578 vars. Use htab equivalents directly instead. Don't create
4579 all dynamic sections on needing just the GOT. Use a goto
4580 rather than a fall-through with reloc test. Ensure
4581 htab->dynobj is set when making dynamic sreloc section.
4582 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
4583 equivalent directly instead. Don't segfault on looking for
4584 .dynamic when dynamic sections have not been created. Don't
4585 segfault on .got.plt being discarded.
4586 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
4587 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
4588 fixme and another not so relevant comment.
4589 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
4590 already set, set hash table dynobj on creating .sbss.
4592 2017-02-28 Alan Modra <amodra@gmail.com>
4594 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
4595 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
4596 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
4597 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
4598 (ppc64_elf_relocate_section): Likewise.
4599 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
4600 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
4601 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
4602 * libbfd.h: Regenerate.
4603 * bfd-in2.h: Regenerate.
4605 2017-02-28 Alan Modra <amodra@gmail.com>
4607 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
4608 dynamic .data.rel.ro read-only.
4609 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
4610 rather than section flags when deciding where copy reloc goes.
4611 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
4612 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
4613 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
4614 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
4615 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
4616 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
4617 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
4618 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
4619 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
4620 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
4621 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
4622 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
4623 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
4624 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
4625 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
4626 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
4627 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
4628 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
4629 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
4631 2017-02-28 Maciej W. Rozycki <macro@imgtec.com>
4633 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
4634 `jalr $0, $25' instruction encoding.
4636 2017-02-27 Nick Clifton <nickc@redhat.com>
4639 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
4640 generating a seg-fault when encountering a symbol that has been
4641 deleted by garbage collection.
4643 2017-02-25 Alan Modra <amodra@gmail.com>
4645 * elf32-arc.c (struct dynamic_sections): Delete.
4646 (enum dyn_section_types): Delete.
4647 (dyn_section_names): Delete.
4648 (arc_create_dynamic_sections): Delete.
4649 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
4650 segfault on discarded .rela.plt section.
4651 (elf_arc_size_dynamic_sections): Formatting. Don't call
4652 arc_create_dynamic_sections. Don't allocate memory for sections
4653 handled by the generic linker. Correct code finding relocs in
4654 read-only sections. Set SEC_EXCLUDE on zero size .got,
4655 .got.plt, and .dynbss sections. Do set .interp for pies.
4657 2017-02-24 Andrew Waterman <andrew@sifive.com>
4659 * elfnn-riscv.c (GP_NAME): New macro.
4660 (riscv_global_pointer_value): Use it.
4661 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
4662 output section, consider only that section's alignment.
4664 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
4666 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
4667 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
4668 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
4669 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
4671 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
4673 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
4674 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
4677 2017-02-23 Alan Modra <amodra@gmail.com>
4680 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
4682 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
4683 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
4686 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
4689 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
4690 processing ahead of the call to `elf_gc_sweep_symbol'.
4692 2017-02-22 Nick Clifton <nickc@redhat.com>
4695 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
4696 created section 4-byte alignment.
4698 2017-02-22 Alan Modra <amodra@gmail.com>
4700 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
4701 on .got or .plt output section being discarded by script.
4702 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
4705 2017-02-21 Alan Modra <amodra@gmail.com>
4707 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
4708 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
4710 2017-02-20 Alan Modra <amodra@gmail.com>
4713 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
4714 if DT_RELSZ/DT_RELASZ is zero.
4716 2017-02-17 Nick Clifton <nickc@redhat.com>
4718 * compress.c (bfd_get_full_section_contents): Remember to reduce
4719 compressed size by the sizeof the compression header when
4720 decompressing the contents.
4722 2017-02-17 Pedro Alves <palves@redhat.com>
4724 * srec.c (Chunk): Rename to ...
4725 (_bfd_srec_len): ... this.
4726 (S3Forced): Rename to ...
4727 (_bfd_srec_forceS3): ... this.
4728 * objcopy.c: Adjust all references.
4730 2017-02-17 Pedro Alves <palves@redhat.com>
4732 * archive.c (bsd_write_armap): Rename to ...
4733 (_bfd_bsd_write_armap): ... this.
4734 (coff_write_armap): Rename to ...
4735 (_bfd_coff_write_armap): ... this.
4736 * libbfd-in.h (bsd_write_armap): Rename to ...
4737 (_bfd_bsd_write_armap): ... this.
4738 (coff_write_armap): Rename to ...
4739 (_bfd_coff_write_armap): ... this.
4740 * aout-target.h, aout-tic30.c: Adjust all users.
4741 * libbfd.h: Regenerate.
4743 2017-02-17 Pedro Alves <palves@redhat.com>
4745 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
4746 (warn_deprecated): Rename to ...
4747 (_bfd_warn_deprecated): ... this.
4748 * libbfd.c (warn_deprecated): Rename to ...
4749 (_bfd_warn_deprecated): ... this.
4750 * bfd-in2.h: Regenerate.
4752 2017-02-17 Pedro Alves <palves@redhat.com>
4754 * bfdio.c (real_ftell): Rename to ...
4755 (_bfd_real_ftell): ... this.
4756 (real_fseek): Rename to ...
4757 (_bfd_real_fseek): ... this.
4758 (real_fopen): Rename to ...
4759 (_bfd_real_fopen): ... this.
4760 * libbfd-in.h (real_ftell): Rename to ...
4761 (_bfd_real_ftell): ... this.
4762 (real_fseek): Rename to ...
4763 (_bfd_real_fseek): ... this.
4764 (real_fopen): Rename to ...
4765 (_bfd_real_fopen): ... this.
4766 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
4767 * libbfd.h: Regenerate.
4769 2017-02-17 Pedro Alves <palves@redhat.com>
4771 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
4772 * libbfd.c (read_unsigned_leb128): Rename to ...
4773 (_bfd_read_unsigned_leb128): ... this.
4774 (read_signed_leb128): Rename to ...
4775 (_bfd_read_signed_leb128): ... this.
4776 (safe_read_leb128): Rename to ...
4777 (_bfd_safe_read_leb128): ... this.
4778 * libbfd-in.h (read_unsigned_leb128): Rename to ...
4779 (_bfd_read_unsigned_leb128): ... this.
4780 (read_signed_leb128): Rename to ...
4781 (_bfd_read_signed_leb128): ... this.
4782 (safe_read_leb128): Rename to ...
4783 (_bfd_safe_read_leb128): ... this.
4784 * libbfd.h: Renegerate.
4786 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
4788 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
4789 before trying to fine matching file and line information.
4791 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
4793 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
4794 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
4795 not match current bfd, then reload debug information. Record bfd
4796 we're loading debug info for in the stash. If we have debug
4797 informatin in the cache then perform section placement before
4800 2017-02-16 Alan Modra <amodra@gmail.com>
4803 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
4804 * elfxx-target.h (elf_backend_no_page_alias): Define.
4805 (elfNN_bed): Init new field.
4806 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
4807 ensure PT_LOAD segment starts on a new page.
4808 * elf32-hppa.c (elf_backend_no_page_alias): Define.
4810 2017-02-16 Alan Modra <amodra@gmail.com>
4813 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
4816 2017-02-16 Jiong Wang <jiong.wang@arm.com>
4818 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
4819 * bfd-in2.h: Regenerated.
4821 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
4824 * elf32-i386.c (elf_i386_relocate_section): Allow
4825 "lea foo@GOT, %reg" in PIC.
4827 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
4830 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
4831 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
4832 error against local IFUNC symbol without a base register for
4835 2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
4837 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
4838 `%P: %H:' with `info->callbacks->einfo'.
4839 (ppc_elf_relocate_section): Likewise.
4840 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
4841 (ppc64_elf_edit_toc): Likewise.
4842 (ppc64_elf_relocate_section): Likewise.
4844 2017-02-14 Alan Modra <amodra@gmail.com>
4846 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
4847 --gc-keep-exported, and test versioned field of sym rather than
4848 looking for @ in name.
4850 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
4852 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
4855 2017-02-13 Nick Clifton <nickc@redhat.com>
4858 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
4861 2017-02-07 Andrew Waterman <andrew@sifive.com>
4863 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
4864 entry size if PLT header is written.
4866 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
4868 Fix sparc64 dynamic relocation processing to use the dynamic
4870 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
4871 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
4874 2017-02-03 Nick Clifton <nickc@redhat.com>
4877 * coffcode.h (coff_write_object_contents): Enlarge size of
4878 s_name_buf in order to avoid compile time warning about possible
4880 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
4881 32-bits of insn value before printing into buffer.
4883 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4885 * elfxx-mips.c (mips_elf_hash_sort_data): Add
4886 `max_local_dynindx'.
4887 (mips_elf_sort_hash_table): Handle it.
4888 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
4889 symbols bump up `max_local_dynindx' rather than
4890 `max_non_got_dynindx'.
4892 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4894 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
4895 `min_got_dynindx', `max_unref_got_dynindx' and
4896 `max_non_got_dynindx' members to the `bfd_size_type' data type.
4897 (mips_elf_sort_hash_table): Adjust accordingly.
4899 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4901 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
4902 to access the hash table.
4904 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4906 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
4907 non-NULL `htab' to the beginning.
4909 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4911 * elflink.c (elf_gc_sweep): Wrap overlong line.
4913 2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
4915 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
4916 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
4917 * elfxx-mips.c (mips_elf_link_hash_table): Add
4918 `ignore_branch_isa' member.
4919 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
4920 in branch relocation calculation as an error if
4921 `ignore_branch_isa' has been set.
4922 (_bfd_mips_elf_insn32): Rename to...
4923 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
4924 parameter to `insn32' and add an `ignore_branch_isa' parameter.
4925 Handle the new parameter.
4927 2017-01-27 Hans-Peter Nilsson <hp@axis.com>
4929 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
4930 local variable dynobj.
4933 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
4934 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
4935 executable from read-only sections into sdynrelro.
4936 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
4937 dynamic relocs in sdynrelro.
4938 (elf_backend_want_dynrelro): Define.
4940 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4942 * config.bfd (*-*-rtemsaout*): Mark as removed.
4944 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4946 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
4947 (arm-*-rtems*): Move to (arm*-*-eabi*).
4948 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
4949 (m68-*-rtems*): Move to (m68*-*-elf*).
4951 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4953 * config.bfd (*-*-rtemscoff*): Mark as removed.
4955 2017-01-24 Maciej W. Rozycki <macro@imgtec.com>
4958 * elflink.c (bfd_elf_record_link_assignment): Revert last
4959 change and don't ever clear `forced_local'. Set `mark'
4961 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
4963 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
4964 (bfd_elf_size_dynamic_sections): ... here.
4965 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
4966 and set `mark' instead in `__tls_get_addr_opt' processing.
4967 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
4969 2017-01-24 Alan Modra <amodra@gmail.com>
4971 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
4972 where dynamic relocs are preferable. Allow ifunc too.
4973 (ensure_undefweak_dynamic): New function.
4974 (allocate_dynrelocs): Use it here. Move plt handling last and
4975 don't make symbols dynamic, simplifying loop. Only make undef
4976 weak symbols with GOT entries dynamic. Correct condition
4977 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
4978 comments. Remove goto.
4979 (ppc_elf_relocate_section): Correct test for using dynamic
4980 symbol on GOT relocs. Rearrange test for emitting GOT relocs
4981 to suit. Set up explicit tls_index entries and implicit GOT
4982 tls_index entries resolvable at link time for
4983 __tls_get_addr_opt. Simplify test to clear mem for prelink.
4984 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
4985 (ensure_undefweak_dynamic): New function.
4986 (allocate_dynrelocs): Use it here. Only make undef weak symbols
4987 with GOT entries dynamic. Remove unnecessary test of
4988 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
4989 (ppc64_elf_relocate_section): Correct test for using dynamic
4990 symbol on GOT relocs. Rearrange test for emitting GOT relocs
4991 to suit. Set up explicit tls_index entries and implicit GOT
4992 tls_index entries resolvable at link time for __tls_get_addr_opt.
4993 Simplify expression to clear mem for prelink.
4995 2017-01-23 Yury Norov <ynorov@caviumnetworks.com>
4997 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
4999 2017-01-20 Jiong Wang <jiong.wang@arm.com>
5001 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
5002 (elf_backend_hash_symbol): Define.
5004 2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
5007 * elflink.c (bfd_elf_record_link_assignment): Clear any
5008 `forced_local' marking for DSO symbols that are not being
5011 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
5013 * elfnn-riscv.c (riscv_elf_object_p): New function.
5015 2017-01-12 H.J. Lu <hongjiu.lu@intel.com>
5018 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
5020 (elf_x86_64_check_relocs): Create .eh_frame section for the
5022 (elf_x86_64_size_dynamic_sections): Allocate and initialize
5023 .eh_frame section for the .plt.bnd section.
5024 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
5025 for the .plt.bnd section.
5027 2017-01-12 Nick Clifton <nickc@redhat.com>
5030 * opncls.c (find_separate_debug_file): Add include_dirs
5031 parameter. Only include the directory part of the bfd's filename
5032 in search paths if include_dirs is true. Add a couple of extra
5033 locations for looking for debug files.
5034 ( bfd_follow_gnu_debuglink): Update invocation of
5035 find_separate_debug_file.
5036 (bfd_follow_gnu_debugaltlink): Likewise.
5037 (get_build_id): New function: Finds the build-id of the given bfd.
5038 (get_build_id_name): New function: Computes the name of the
5039 separate debug info file for a bfd, based upon its build-id.
5040 (check_build_id_file): New function: Checks to see if a separate
5041 debug info file exists at the given location, and that its
5042 build-id matches that of the original bfd.
5043 (bfd_follow_build_id_debuglink): New function: Finds a separate
5044 debug info file for a given bfd by using the build-id method.
5045 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
5046 method of locating a separate debug info file before using the
5048 * bfd-in2.h: Regenerate.
5050 2017-01-11 H.J. Lu <hongjiu.lu@intel.com>
5053 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
5054 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
5055 elf_x86_64_eh_frame_plt_got.
5056 (elf_x86_64_size_dynamic_sections): Get unwind info from
5057 elf_x86_64_bnd_arch_bed for the BND PLT.
5059 2017-01-11 Jeremy Soller <jackpot51@gmail.com>
5061 * config.bfd: Add entries for i686-redox and x86_64-redox.
5063 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
5065 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
5067 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
5068 .eh_frame section to 4 bytes for x32.
5069 (elf_x86_64_check_relocs): Likewise.
5071 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
5074 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
5075 (PLT_GOT_FDE_LENGTH): Likewise.
5076 (elf_i386_plt_layout): Add eh_frame_plt_got and
5077 eh_frame_plt_got_size.
5078 (elf_i386_plt): Updated.
5079 (elf_i386_link_hash_table): Add plt_got_eh_frame.
5080 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
5081 (elf_i386_size_dynamic_sections): Allocate and initialize
5082 .eh_frame section for .plt.got.
5083 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
5085 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
5086 eh_frame_plt_got_size.
5087 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
5088 (PLT_GOT_FDE_LENGTH): Likewise.
5089 (elf_x86_64_backend_data): Add eh_frame_plt_got and
5090 eh_frame_plt_got_size.
5091 (elf_x86_64_arch_bed): Updated.
5092 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
5093 eh_frame_plt_got_size.
5094 (elf_x86_64_nacl_arch_bed): Likewise.
5095 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
5096 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
5097 (elf_x86_64_size_dynamic_sections): Allocate and initialize
5098 .eh_frame section for .plt.got.
5099 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
5102 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
5104 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
5105 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
5107 2017-01-09 Nick Clifton <nickc@redhat.com>
5109 * dwarf2.c (lookup_address_in_function_table): Return early if
5110 there are no functions in the given comp unit, or if the high
5111 address of the last function in the comp unit is less than the
5114 2017-01-09 Nick Clifton <nickc@redhat.com>
5117 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
5118 message if there are too many symbols to load.
5120 2017-01-04 James Clarke <jrtc27@jrtc27.com>
5122 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
5123 if relocs are cached.
5125 2017-01-03 Rich Felker <bugdal@aerifal.cx>
5128 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
5129 for R_MICROBLAZE_GOTOFF_64.
5131 2017-01-03 Nick Clifton <nickc@redhat.com>
5133 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
5134 warning about using a possibly uninitialised variable.
5136 2017-01-02 Alan Modra <amodra@gmail.com>
5138 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
5139 (allocate_plt_static, allocate_dynrelocs): Use it.
5141 2017-01-02 Alan Modra <amodra@gmail.com>
5143 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
5144 .PARISC.unwind section.
5146 2017-01-02 Alan Modra <amodra@gmail.com>
5149 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
5150 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
5151 indirect to GOT pointer relative code edit.
5153 2017-01-02 Alan Modra <amodra@gmail.com>
5155 Update year range in copyright notice of all files.
5157 For older changes see ChangeLog-2016
5159 Copyright (C) 2017 Free Software Foundation, Inc.
5161 Copying and distribution of this file, with or without modification,
5162 are permitted in any medium without royalty provided the copyright
5163 notice and this notice are preserved.
5169 version-control: never