1 2017-11-16 Nick Clifton <nickc@redhat.com>
3 * merge.c (sec_merge_emit): Always create padding buffer. Add
4 asserts to make sure that the buffer is long enough.
6 2017-11-15 Alan Modra <amodra@gmail.com>
8 * bfd.c (union _bfd_doprnt_args): Add "Bad".
9 (_bfd_doprnt): Handle more flags.
10 (_bfd_doprnt_scan): Likewise. Tidy setting of args array.
11 (error_handler_internal): Init args type to Bad.
13 2017-11-14 Alan Modra <amodra@gmail.com>
16 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Warn on discarding
17 non-empty dynamic section.
18 (ppc_build_one_stub): Take elf_gp from output bfd, not output
20 (ppc_size_one_stub, ppc64_elf_next_toc_section): Likewise.
22 2017-11-14 Alan Modra <amodra@gmail.com>
24 * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for user
27 2017-11-13 Jan Beulich <jbeulich@suse.com>
29 * coff-tic80.c (COFF_ENCODE_ALIGNMENT, COFF_DECODE_ALIGNMENT):
31 * coffcode.h (coff_set_alignment_hook): Drop tic80 special case.
32 (coff_write_object_contents): Likewise. Issue diagnostic for too
35 2017-11-12 H.J. Lu <hongjiu.lu@intel.com>
38 * elf.c (_bfd_elf_map_sections_to_segments): Remove PF_X from
41 2017-11-12 Alan Modra <amodra@gmail.com>
43 * elflink.c (elf_link_add_object_symbols): Ignore anything but
44 defined and defweak symbols when setting up weakdefs.
46 2017-11-12 Alan Modra <amodra@gmail.com>
48 * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Set non_got_ref
49 to keep dyn_relocs, clear to discard. Comment.
50 (allocate_dynrelocs): Always clear non_got_ref when clearing
51 dyn_relocs in non-pic case. Invert non_got_ref test. Also test
52 dynamic_adjusted and ELF_COMMON_DEF_P. Move code deleting
53 dyn_relocs on undefined syms to handle for non-pic too.
54 (elf32_hppa_relocate_section): Simplify test for non-pic dyn relocs.
55 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Set non_got_ref
56 to keep dyn_relocs, clear to discard. Comment.
57 (allocate_dynrelocs): Always clear non_got_ref when clearing
58 dyn_relocs in non-pic case. Invert non_got_ref test. Also test
59 dynamic_adjusted and ELF_COMMON_DEF_P. Move code deleting
60 dyn_relocs on undefined syms to handle for non-pic too.
61 (ppc_elf_relocate_section): Simplify test for non-pic dyn relocs.
62 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Discard
63 dyn_relocs here. Don't bother setting non_got_ref. Comment.
64 (allocate_dynrelocs): Delete special handling of non-pic ELFv2
65 ifuncs. Move code deleting dyn_relocs on undefined symbols to
66 handle for non-pic too. Don't test non_got_ref. Do test
67 dynamic_adjusted and ELF_COMMON_DEF_P.
69 2017-11-08 Djordje Todorovic <djordje.todorovic@rt-rk.com>
71 * elf32-mips.c (elf32_mips_grok_psinfo): Extract core->pid.
72 * elf64-mips.c (elf64_mips_grok_psinfo): Likewise.
73 * elfn32-mips.c (elf32_mips_grok_psinfo): Likewise.
75 2017-11-08 Djordje Todorovic <djordje.todorovic@rt-rk.com>
77 * elf32-mips.c (elf32_mips_write_core_note): New function.
78 (elf_backend_write_core_note): New macro.
79 * elf64-mips.c (elf64_mips_write_core_note): New function.
80 (elf_backend_write_core_note): New macro.
81 * elfn32-mips.c (elf32_mips_write_core_note): New function.
82 (elf_backend_write_core_note): New macro.
84 2017-11-07 Alan Modra <amodra@gmail.com>
86 * elf64-ppc.c (ppc64_elf_build_stubs): Correct pluralization in
89 2017-11-07 Alan Modra <amodra@gmail.com>
91 * sysdep.h: Formatting, comment fixes.
92 (gettext, ngettext): Redefine when ENABLE_NLS.
93 (ngettext, dngettext, dcngettext): Define when !ENABLE_NLS.
94 (_): Define using gettext.
95 (textdomain, bindtextdomain): Use safer "do nothing".
96 * hosts/alphavms.h (textdomain, bindtextdomain): Likewise.
97 (ngettext, dngettext, dcngettext): Define when !ENABLE_NLS.
99 2017-11-05 Alan Modra <amodra@gmail.com>
102 * bfd.c (_bfd_doprnt_scan): Check args index before storing, not
105 2017-11-05 Alan Modra <amodra@gmail.com>
108 * bfd.c (union _bfd_doprnt_args): New.
109 (PRINT_TYPE): Add FIELD arg. Take value from args.
110 (_bfd_doprnt): Replace ap parameter with args. Adjust all
111 PRINT_TYPE invocations and reading of format args to suit.
112 Move "%%" handling out of switch handling args. Support
113 positional parameters.
114 (_bfd_doprnt_scan): New function.
115 (error_handler_internal): Call _bfd_doprnt_scan and read args.
117 2017-11-04 Alan Modra <amodra@gmail.com>
119 * elf32-ppc.c (got_entries_needed, got_relocs_needed): New functions.
120 (allocate_dynrelocs, ppc_elf_size_dynamic_sections): Use them here.
121 (ppc_elf_relocate_section): Don't output a dynamic relocation
122 for IE GOT entries in an executable.
123 * elf64-ppc.c (allocate_got): Trim unnecessary TPREL relocs.
124 (ppc64_elf_size_dynamic_sections): Likewise.
125 (ppc64_elf_relocate_section): Likewise.
127 2017-11-04 Alan Modra <amodra@gmail.com>
129 * elf32-ppc.c (readonly_dynrelocs): Delete info param. Update all
130 callers. Don't bother with SEC_ALLOC test. Return section pointer.
132 (maybe_set_textrel): ..here.
133 * elf64-ppc.c (readonly_dynrelocs): Return section pointer.
134 (maybe_set_textrel): Call minfo to print textrel warning to map file.
136 2017-11-04 Alan Modra <amodra@gmail.com>
138 * elf32-hppa.c (enum _tls_type): Move.
139 (struct elf32_hppa_link_hash_entry): Make tls_type a bitfield.
140 (elf32_hppa_check_relocs): Set DF_STATIC_TLS only for shared libraries.
141 Tidy tls_type handling. Set symbol tls_type for GOT_TLS_LDM too.
142 (got_entries_needed, got_relocs_needed): New functions.
143 (allocate_dynrelocs): Use them.
144 (elf32_hppa_size_dynamic_sections): Likewise.
145 (elf32_hppa_relocate_section): Delete bogus FIXME. Formatting.
146 Correct code emitting relocs on GD/IE got entries. Report an
147 error when a symbol has both normal and TLS GOT relocs.
149 2017-11-04 Alan Modra <amodra@gmail.com>
152 * elf32-hppa.c (elf32_hppa_check_relocs): Don't create dyn_relocs
153 for plabels when non-pic.
154 (maybe_set_textrel): New function.
155 (readonly_dynrelocs): Move and rewrite.
156 (elf32_hppa_adjust_dynamic_symbol): Use it. Don't create copy
157 relocs when def_regular or -z nocopyreloc. Handle non_got_ref
158 for functions. Expand non_got_ref comments.
159 (elf32_hppa_size_dynamic_sections): Use maybe_set_textrel.
161 2017-11-03 H.J. Lu <hongjiu.lu@intel.com>
163 * elf32-i386.c (elf_i386_check_relocs): Set plt.refcount to 1.
164 Don't use func_pointer_refcount. Don't set plt.refcount nor
165 non_got_ref for function pointer reference.
166 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
167 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Don't use
168 func_pointer_refcount.
169 (_bfd_x86_elf_copy_indirect_symbol): Don't copy
170 func_pointer_refcount.
171 (_bfd_x86_elf_hide_symbol): Don't use func_pointer_refcount.
172 * elfxx-x86.h (GENERATE_DYNAMIC_RELOCATION_P): Likewise.
173 (elf_x86_link_hash_entry): Remove func_pointer_refcount.
175 2017-11-03 Mingi Cho <mgcho.minic@gmail.com>
176 Nick Clifton <nickc@redhat.com>
179 * coffgen.c (_bfd_coff_get_external_symbols): Check for an
180 overlarge raw syment count.
181 (coff_get_normalized_symtab): Likewise.
183 2017-11-01 James Bowman <james.bowman@ftdichip.com>
185 * archures.c: Add bfd_mach_ft32b.
186 * cpu-ft32.c: Add arch_info_struct.
187 * elf32-ft32.c: Add R_FT32_RELAX, SC0, SC1,
189 (ft32_elf_relocate_section): Add clauses for R_FT32_SC0, SC1,
191 (ft32_reloc_shortable, elf32_ft32_is_diff_reloc)
192 (elf32_ft32_adjust_diff_reloc_value)
193 (elf32_ft32_adjust_reloc_if_spans_insn)
194 (elf32_ft32_relax_delete_bytes, elf32_ft32_relax_is_branch_target)
195 (ft32_elf_relax_section): New function.
196 * reloc.c: Add BFD_RELOC_FT32_RELAX, SC0, SC1, DIFF32.
197 * bfd-in2.h: Regenerate.
198 * libbfd.h: Regenerate.
200 2017-11-01 Nick Clifton <nickc@redhat.com>
203 * coffcode.h (coff_slurp_line_table): Check for an excessively
204 large line number count.
206 2017-11-01 Nick Clifton <nickc@redhat.com>
209 * peicode.h (pe_bfd_read_buildid): Revise check for invalid size
210 and offset in light of further possible bogus values.
212 2017-11-01 Alan Modra <amodra@gmail.com>
215 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't create a plt
216 entry when just a dynamic reloc can serve. Ensure no dynamic
217 relocations when UNDEFWEAK_NO_DYNAMIC_RELOC by setting non_got_ref.
218 Expand and move the non_got_ref comment.
219 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
221 2017-11-01 Nick Clifton <nickc@redhat.com>
224 * coffgen.c (_bfd_coff_free_symbols): Fail if called on a non-COFF
226 * cofflink.c (coff_link_check_archive_element): Skip non-COFF
227 members of an archive.
229 2017-10-31 Nick Clifton <nickc@redhat.com>
232 * peicode.h (pe_bfd_read_buildid): Check for invalid size and data
235 2017-10-30 Alan Modra <amodra@gmail.com>
237 * elf32-frv.c (ELF_TARGET_ID): Don't define for generic
240 * elflink.c (elf_gc_sweep): Test elf_object_id in addition to
242 (bfd_elf_gc_sections): Likewise.
244 2017-10-30 Alan Modra <amodra@gmail.com>
247 * elf32-hppa.c (elf32_hppa_check_relocs): Move SEC_ALLOC test to
248 ensure non_got_ref is not set due to debug references.
249 (elf32_hppa_adjust_dynamic_symbol): Tidy plabel handling. Use
250 SYMBOL_CALLS_LOCAL and UNDEFWEAK_NO_DYNAMIC_RELOC when determining
251 need for a plt entry.
252 (allocate_dynrelocs): Similarly for got entries. Tidy code discarding
253 dynamic relocs when pic. Remove bogus code attempting to handle
255 (elf32_hppa_relocate_section): Similarly. Delete resolved_to_zero
257 (elf32_hppa_finish_dynamic_symbol): Use UNDEFWEAK_NO_DYNAMIC_RELOC
258 and SYMBOL_REFERENCES_LOCAL in GOT handling.
260 2017-10-28 Alan Modra <amodra@gmail.com>
263 * elflink.c (_bfd_elf_merge_symbol): Remove relocs_compatible check.
264 * elf32-hppa.c (elf_backend_relocs_compatible): Define.
265 * elf32-ppc.c (elf_backend_relocs_compatible): Define.
266 * elf64-ppc.c (elf_backend_relocs_compatible): Define.
268 2017-10-25 Alan Modra <amodra@gmail.com>
270 * archive.c (_bfd_compute_and_write_armap): Match "__gnu_lto_slim"
271 optionally prefixed with "_".
272 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
274 2017-10-24 Andrew Waterman <andrew@sifive.com>
276 * elfnn-riscv.c (_bfd_riscv_relax_lui): Don't relax to c.lui
279 2017-10-24 Renlin Li <renlin.li@arm.com>
282 * elflink.c (_bfd_elf_merge_symbol): Handle multiple definition case.
284 2017-10-23 Nick Clifton <nickc@redhat.com>
287 * elflink.c (elf_link_output_extsym): Keep global undefined
288 symbols if they have been marked as needed.
290 2017-10-23 Maciej W. Rozycki <macro@imgtec.com>
292 * elfn32-mips.c (mips_elf_n32_mkobject): New prototype and
294 (bfd_elf32_mkobject): Use `mips_elf_n32_mkobject' rather than
295 `_bfd_mips_elf_mkobject'.
297 2017-10-22 Hans-Peter Nilsson <hp@axis.com>
300 * config.bfd (cris-*-* | crisv32-*-*): Require a 64-bit BFD.
302 2017-10-19 Palmer Dabbelt <palmer@dabbelt.com>
304 * elfnn-riscv.c (riscv_pcgp_hi_reloc): New structure.
305 (riscv_pcgp_lo_reloc): Likewise.
306 (riscv_pcgp_relocs): Likewise.
307 (riscv_init_pcgp_relocs): New function.
308 (riscv_free_pcgp_relocs): Likewise.
309 (riscv_record_pcgp_hi_reloc): Likewise.
310 (riscv_record_pcgp_lo_reloc): Likewise.
311 (riscv_delete_pcgp_hi_reloc): Likewise.
312 (riscv_use_pcgp_hi_reloc): Likewise.
313 (riscv_record_pcgp_lo_reloc): Likewise.
314 (riscv_find_pcgp_lo_reloc): Likewise.
315 (riscv_delete_pcgp_lo_reloc): Likewise.
316 (_bfd_riscv_relax_pc): Likewise.
317 (_bfd_riscv_relax_section): Handle R_RISCV_PCREL_* relocations
318 via the new functions above.
320 2017-10-19 Palmer Dabbelt <palmer@dabbelt.com>
322 * elfnn-riscv.c (R_RISCV_DELETE): New define.
323 (_bfd_riscv_relax_delete): New function.
324 (perform_relocation): Handle R_RISCV_DELETE.
325 (_bfd_riscv_relax_section): Likewise.
327 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
330 * elfxx-tilegx.c (tilegx_elf_tls_transition): Replace
331 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
332 bfd_link_executable for TLS check.
333 (tilegx_elf_check_relocs): Likewise.
334 (allocate_dynrelocs): Likewise.
335 (tilegx_elf_relocate_section): Likewise.
337 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
340 * elf32-tilepro.c (tilepro_elf_tls_transition): Replace
341 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
342 bfd_link_executable for TLS check.
343 (tilepro_elf_check_relocs): Likewise.
344 (allocate_dynrelocs): Likewise.
345 (tilepro_elf_relocate_section): Likewise.
347 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
350 * elfxx-sparc.c (sparc_elf_tls_transition): Replace
351 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
352 bfd_link_executable for TLS check.
353 (_bfd_sparc_elf_check_relocs): Likewise.
354 (allocate_dynrelocs): Likewise.
355 (_bfd_sparc_elf_relocate_section): Likewise.
357 2017-10-18 H.J. Lu <hongjiu.lu@intel.com>
359 * elf32-tilepro.c (tilepro_elf_gc_mark_hook): Call
360 _bfd_generic_link_add_one_symbol to mark __tls_get_addr.
361 * elfxx-tilegx.c (tilegx_elf_gc_mark_hook): Likewise.
363 2017-10-17 H.J. Lu <hongjiu.lu@intel.com>
365 * elf32-microblaze.c (microblaze_elf_check_relocs): Check for
366 indirect and warning symbols.
368 2017-10-17 Alan Modra <amodra@gmail.com>
371 * elf-properties.c (_bfd_elf_parse_gnu_properties): Compare datasz
372 against size left rather than comparing pointers. Reorganise loop.
374 2017-10-17 Alan Modra <amodra@gmail.com>
377 * aoutx.h (aout_get_external_symbols): Handle stringsize of zero,
378 and error for any other size that doesn't cover the header word.
380 2017-10-16 H.J. Lu <hongjiu.lu@intel.com>
382 * elf-bfd.h (elf_backend_data): Remove gc_sweep_hook.
383 * elf32-arm.c (elf32_arm_gc_sweep_hook): Removed.
384 (elf_backend_gc_sweep_hook): Likewise.
385 * elf32-bfin.c (bfin_gc_sweep_hook): Likewise.
386 (bfinfdpic_gc_sweep_hook): Likewise.
387 (elf_backend_gc_sweep_hook): Likewise.
388 * elf32-cr16.c (elf32_cr16_gc_sweep_hook): Likewise.
389 (elf_backend_gc_sweep_hook): Likewise.
390 * elf32-cris.c (cris_elf_gc_sweep_hook): Likewise.
391 (elf_backend_gc_sweep_hook): Likewise.
392 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Likewise.
393 (elf_backend_gc_sweep_hook): Likewise.
394 * elf32-lm32.c (lm32_elf_gc_sweep_hook): Likewise.
395 (elf_backend_gc_sweep_hook): Likewise.
396 * elf32-m32r.c (m32r_elf_gc_sweep_hook): Likewise.
397 (elf_backend_gc_sweep_hook): Likewise.
398 * elf32-m68k.c (elf_m68k_got_entry): Remove elf_m68k_gc_sweep_hook
400 (elf_m68k_remove_got_entry_type): Removed.
401 (elf_m68k_find_got_entry_ptr): Likewise.
402 (elf_m68k_remove_got_entry): Likewise.
403 (elf_m68k_gc_sweep_hook): Likewise.
404 (elf_backend_gc_sweep_hook): Likewise.
405 * elf32-mcore.c (mcore_elf_gc_sweep_hook): Likewise.
406 (elf_backend_gc_sweep_hook): Likewise.
407 * elf32-metag.c (elf_metag_gc_sweep_hook): Likewise.
408 (elf_backend_gc_sweep_hook): Likewise.
409 * elf32-microblaze.c (elf_backend_gc_sweep_hook): Likewise.
410 (elf_backend_gc_sweep_hook): Likewise.
411 * elf32-mips.c (elf_backend_gc_sweep_hook): Likewise.
412 (elf_backend_gc_sweep_hook): Likewise.
413 * elf32-nds32.c (nds32_elf_gc_sweep_hook): Likewise.
414 (elf_backend_gc_sweep_hook): Likewise.
415 * elf32-nios2.c (nios2_elf32_gc_sweep_hook): Likewise.
416 (elf_backend_gc_sweep_hook): Likewise.
417 * elf32-or1k.c (or1k_elf_gc_sweep_hook): Likewise.
418 (elf_backend_gc_sweep_hook): Likewise.
419 * elf32-ppc.c (ppc_elf_gc_sweep_hook): Likewise.
420 (elf_backend_gc_sweep_hook): Likewise.
421 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
422 (elf_backend_gc_sweep_hook): Likewise.
423 * elf32-sparc.c (elf_backend_gc_sweep_hook): Likewise.
424 * elf32-tic6x.c (elf32_tic6x_gc_sweep_hook): Likewise.
425 (elf_backend_gc_sweep_hook): Likewise.
426 * elf32-tilegx.c (elf_backend_gc_sweep_hook): Likewise.
427 * elf32-tilepro.c (tilepro_elf_gc_sweep_hook): Likewise.
428 (elf_backend_gc_sweep_hook): Likewise.
429 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
430 (elf_backend_gc_sweep_hook): Likewise.
431 * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Likewise.
432 (elf_backend_gc_sweep_hook): Likewise.
433 * elf64-alpha.c (elf64_alpha_gc_sweep_hook): Likewise.
434 (elf_backend_gc_sweep_hook): Likewise.
435 * elf64-mips.c (elf_backend_gc_sweep_hook): Likewise.
436 * elf64-mmix.c (mmix_elf_gc_sweep_hook): Likewise.
437 (elf_backend_gc_sweep_hook): Likewise.
438 * elf64-ppc.c (elf_backend_gc_sweep_hook): Likewise.
439 (ppc64_elf_gc_sweep_hook): Likewise.
440 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
441 (elf_backend_gc_sweep_hook): Likewise.
442 * elf64-sparc.c (elf_backend_gc_sweep_hook): Likewise.
443 * elf64-tilegx.c (elf_backend_gc_sweep_hook): Likewise.
444 * elflink.c (elf_link_add_object_symbols): Don't call
445 _bfd_elf_link_check_relocs here.
446 (gc_sweep_hook_fn): Removed.
447 (elf_gc_sweep): Remove gc_sweep_hook.
448 * elfnn-aarch64.c (elfNN_aarch64_gc_sweep_hook): Removed.
449 (elf_backend_gc_sweep_hook): Likewise.
450 * elfnn-riscv.c (riscv_elf_gc_sweep_hook): Likewise.
451 (elf_backend_gc_sweep_hook): Likewise.
452 * elfxx-mips.c (_bfd_mips_elf_gc_sweep_hook): Likewise.
453 * elfxx-mips.h (_bfd_mips_elf_gc_sweep_hook): Likewise.
454 (elf_backend_gc_sweep_hook): Likewise.
455 * elfxx-sparc.c (_bfd_sparc_elf_gc_sweep_hook): Likewise.
456 * elfxx-sparc.h (_bfd_sparc_elf_gc_sweep_hook): Likewise.
457 * elfxx-target.h (elf_backend_gc_sweep_hook): Likewise.
458 (elfNN_bed): Remove elf_backend_gc_sweep_hook.
459 * elfxx-tilegx.c (tilegx_elf_gc_sweep_hook): Removed.
460 * elfxx-tilegx.h (tilegx_elf_gc_sweep_hook): Likewise.
462 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
464 * elf32-i386.c (elf_i386_backend_data): Removed.
465 (get_elf_i386_backend_data): Likewise.
466 (elf_i386_arch_bed): Replace elf_i386_backend_data with
467 elf_x86_backend_data.
468 (elf_i386_get_synthetic_symtab): Likewise.
469 (elf_i386_nacl_arch_bed): Likewise.
470 (elf_i386_vxworks_arch_bed): Likewise.
471 (elf_i386_relocate_section): Check target_os instead of
473 (elf_i386_finish_dynamic_symbol): Likewise.
474 (elf_i386_finish_dynamic_sections): Use htab->plt0_pad_byte.
475 Check target_os instead of is_vxworks.
476 (elf_i386_link_setup_gnu_properties): Remove normal_target and
477 is_vxworks. Initialize plt0_pad_byte.
478 * elf64-x86-64.c (elf_x86_64_backend_data); Removed.
479 (get_elf_x86_64_arch_data): Likewise.
480 (get_elf_x86_64_backend_data): Likewise.
481 (elf_x86_64_arch_bed): Replace elf_x86_64_backend_data with
482 elf_x86_backend_data.
483 (elf_x86_64_get_synthetic_symtab): Likewise.
484 (elf_x86_64_nacl_arch_bed): Likewise.
485 (elf_x86_64_link_setup_gnu_properties): Remove is_vxworks and
486 normal_target. Initialize plt0_pad_byte.
487 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Check target_os
488 instead of is_vxworks.
489 (_bfd_x86_elf_size_dynamic_sections): Likewise.
490 (_bfd_x86_elf_finish_dynamic_sections): Likewise.
491 (_bfd_x86_elf_adjust_dynamic_symbol): Likewise.
492 (_bfd_x86_elf_link_hash_table_create): Initialize target_os.
493 (_bfd_x86_elf_link_setup_gnu_properties): Remove is_vxworks.
494 Update normal_target. Set up plt0_pad_byte. Check target_os
495 instead of is_vxworks.
496 * elfxx-x86.h (elf_x86_target_os): New.
497 (elf_x86_backend_data): Likewise.
498 (get_elf_x86_backend_data): Likewise.
499 (elf_x86_link_hash_table): Remove is_vxworks. Add plt0_pad_byte
501 (elf_x86_init_table): Remove normal_target and is_vxworks. Add
504 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
506 * elf32-i386.c (elf_i386_finish_dynamic_sections): Call
507 _bfd_x86_elf_finish_dynamic_sections.
508 * elf64-x86-64.c (elf_x86_64_finish_dynamic_sections): Likewise.
509 * elfxx-x86.c (_bfd_x86_elf_finish_dynamic_sections): New
511 * elfxx-x86.h (_bfd_x86_elf_finish_dynamic_sections): New
514 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
517 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
518 hide symbol which was forced to be dynamic.
520 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
523 * elf32-cris.c (cris_elf_relocate_section): Don't generate
524 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
525 (cris_elf_check_relocs): Don't allocate dynamic relocation
526 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
528 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
531 * elf32-sh.c (allocate_dynrelocs): Discard dynamic relocations
532 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
533 (sh_elf_relocate_section): Don't generate dynamic relocation if
534 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
536 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
539 * elf32-s390.c (allocate_dynrelocs): Discard dynamic
540 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
541 (elf_s390_relocate_section): Don't generate dynamic relocation
542 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
543 * elf64-s390.c (allocate_dynrelocs): Discard dynamic
544 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
545 (elf_s390_relocate_section): Don't generate dynamic relocation
546 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
548 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
551 * elf32-nios2.c (nios2_elf32_relocate_section): Don't generate
552 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
553 (allocate_dynrelocs): Discard dynamic relocations if
554 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
556 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
559 * elf32-microblaze.c (microblaze_elf_relocate_section): Don't
560 generate dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is
562 (allocate_dynrelocs): Discard dynamic relocations if
563 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
565 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
568 * elf32-m68k.c (elf_m68k_check_relocs): Don't allocate dynamic
569 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
570 (elf_m68k_adjust_dynamic_symbol): Don't make symbol dynamic if
571 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
572 (elf_m68k_relocate_section): Don't generate dynamic relocation
573 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
575 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
578 * elf32-hppa.c (ensure_undef_dynamic): Don't make undefined
579 symbol dynamic if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
580 (allocate_dynrelocs): Discard dynamic relocations if
581 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
582 (elf32_hppa_relocate_section): Don't generate dynamic
583 relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
585 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
588 * elfnn-ia64.c (elfNN_ia64_check_relocs): Don't allocate
589 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
590 (allocate_fptr): Don't allocate function pointer if
591 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
592 (allocate_dynrel_entries): Don't allocate dynamic relocation
593 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
594 (set_got_entry): Don't set GOT entry if
595 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
596 (set_pltoff_entry): Don't set PLTOFF entry if
597 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
598 (elfNN_ia64_relocate_section): Don't install dynamic relocation
599 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
601 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
604 * elfxx-mips.c (mips_elf_calculate_relocation): Don't generate
605 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
606 (allocate_dynrelocs): Don't allocate dynamic relocations if
607 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
609 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
612 * elf32-arm.c (elf32_arm_final_link_relocate): Don't generate
613 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
614 (allocate_dynrelocs_for_symbol): Discard dynamic relocations
615 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
617 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
620 * elf32-tilepro.c (allocate_dynrelocs): Discard dynamic
621 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
622 (tilepro_elf_relocate_section): Don't generate dynamic
623 relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
624 * elfxx-tilegx.c (allocate_dynrelocs): Discard dynamic
625 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
626 (tilegx_elf_relocate_section): Don't generate dynamic
627 relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
629 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
632 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Don't
633 generate dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is
635 (elfNN_aarch64_allocate_dynrelocs): Discard dynamic relocations
636 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
638 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
640 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Moved to ...
641 * elf-bfd.h (UNDEFWEAK_NO_DYNAMIC_RELOC): Here.
642 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Removed.
644 2017-10-12 James Bowman <james.bowman@ftdichip.com>
646 * bfd-in2.h: Regenerate.
647 * libbfd.h: Regenerate.
648 * elf32-ft32.c: Add HOWTO R_FT32_15.
649 * reloc.c: Add BFD_RELOC_FT32_15.
651 2017-10-12 Nick Clifton <nickc@redhat.com>
653 * reloc.c (enum bfd_reloc_status): Start values at 2.
654 * bfd-in2.h: Regenerate.
655 * elfnn-aarch64.c (aarch64_relocate): Invert sense of function, so
656 that a TRUE return indicates success. Compare the result of
657 calling _bfd_aarch64_elf_put_addend against bfd_reloc_ok.
658 (build_one_stub): Change sense of tests against aarch64_relocate
660 (elfNN_aarch64_tls_relax): Return bfd_reloc_notsupported, rather
661 than FALSE, when an error is detected.
662 (elfNN_aarch64_final_link_relocate): Likewise.
664 2017-10-12 H.J. Lu <hongjiu.lu@intel.com>
666 * elf32-i386.c (elf_backend_hide_symbol): New.
667 * elf64-x86-64.c (elf_backend_hide_symbol): Likewise.
668 * elfxx-x86.c (_bfd_x86_elf_hide_symbol): Likewise.
669 * elfxx-x86.h (_bfd_x86_elf_hide_symbol): Likewise.
671 2017-10-12 Alan Modra <amodra@gmail.com>
673 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Call
674 elf_backend_hide_symbol, not _bfd_elf_link_hash_hide_symbol.
675 (bfd_elf_define_start_stop): Likewise.
677 2017-10-12 Alan Modra <amodra@gmail.com>
679 * elf32-nds32.c (nds32_elf_size_dynamic_sections): Set .interp
680 when executable rather than non-PIC.
681 * elf32-score.c (s3_bfd_score_elf_size_dynamic_sections): Likewise.
682 * elf32-score7.c (s7_bfd_score_elf_size_dynamic_sections): Likewise.
684 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
686 * elf-bfd.h (elf_backend_data): Add `linux_prpsinfo64_ugid16'
688 * elf-linux-core.h (elf_external_linux_prpsinfo64): Rename to...
689 (elf_external_linux_prpsinfo64_ugid32): ... this.
690 (swap_linux_prpsinfo32_out): Rename to...
691 (swap_linux_prpsinfo32_ugid32_out): ... this.
692 (elf_external_linux_prpsinfo64_ugid16): New structure.
693 (swap_linux_prpsinfo64_ugid16_out): New function.
694 * elfxx-target.h [!elf_backend_linux_prpsinfo64_ugid16]
695 (elf_backend_linux_prpsinfo64_ugid16): Define.
696 (elfNN_bed): Initialize `linux_prpsinfo64_ugid16' member.
697 * elf.c (elfcore_write_linux_prpsinfo64): Handle both variants
698 of the 64-bit Linux core PRPSINFO note.
699 * elf64-sh64.c (elf_backend_linux_prpsinfo64_ugid16): Define.
701 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
703 * elf-bfd.h (elf_backend_data): Add `linux_prpsinfo32_ugid16'
705 (elfcore_write_ppc_linux_prpsinfo32): Remove prototype.
706 * elf32-ppc.c (elfcore_write_ppc_linux_prpsinfo32): Remove.
707 (elf_external_ppc_linux_prpsinfo32)
708 (swap_ppc_linux_prpsinfo32_out): Move to...
709 * elf-linux-core.h (elf_external_linux_prpsinfo32_ugid32)
710 (swap_linux_prpsinfo32_ugid32_out): ... these.
711 (elf_external_linux_prpsinfo32): Rename to...
712 (elf_external_linux_prpsinfo32_ugid16): ... this.
713 (swap_linux_prpsinfo32_out): Rename to...
714 (swap_linux_prpsinfo32_ugid16_out): ... this.
715 * elfxx-target.h [!elf_backend_linux_prpsinfo32_ugid16]
716 (elf_backend_linux_prpsinfo32_ugid16): Define.
717 (elfNN_bed): Initialize `linux_prpsinfo32_ugid16' member.
718 * elf.c (elfcore_write_linux_prpsinfo32): Handle both variants
719 of the 32-bit Linux core PRPSINFO note.
720 * elf32-am33lin.c (elf_backend_linux_prpsinfo32_ugid16): Define.
721 * elf32-arm.c (elf_backend_linux_prpsinfo32_ugid16): Define.
722 * elf32-cris.c (elf_backend_linux_prpsinfo32_ugid16): Define.
723 * elf32-frv.c (elf_backend_linux_prpsinfo32_ugid16): Define.
724 * elf32-i386.c (elf_backend_linux_prpsinfo32_ugid16): Define.
725 * elf32-m32r.c (elf_backend_linux_prpsinfo32_ugid16): Define.
726 * elf32-m68k.c (elf_backend_linux_prpsinfo32_ugid16): Define.
727 * elf32-s390.c (elf_backend_linux_prpsinfo32_ugid16): Define.
728 * elf32-sh.c (elf_backend_linux_prpsinfo32_ugid16): Define.
729 * elf32-sparc.c (elf_backend_linux_prpsinfo32_ugid16): Define.
731 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
733 * elf-linux-core.h (elf_external_linux_prpsinfo64): Move the
734 `gap' member ahead of `pr_flag'.
736 2017-10-11 Pedro Alves <palves@redhat.com>
738 * bfd.c (_doprnt): Rename to ...
739 (_bfd_doprnt): ... this.
740 (error_handler_internal): Adjust.
742 2017-10-10 H.J. Lu <hongjiu.lu@intel.com>
744 * elf32-i386.c (elf_i386_check_relocs): Set GOT refcount to 1
745 instead of incrementing it.
746 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
748 2017-10-10 Renlin Li <renlin.li@arm.com>
751 * elf32-arm.c (allocate_dynrelocs_for_symbol): Only make undefined weak
752 symbols into dynamic.
754 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
757 * elfnn-riscv.c (riscv_elf_link_hash_table): Add max_alignment.
758 (riscv_elf_link_hash_table_create): Initialize max_alignment to
760 (_bfd_riscv_relax_section): Cache the max alignment of output
761 sections if possible.
763 2017-10-10 Alan Modra <amodra@gmail.com>
765 * elf64-ppc.c (ppc64_elf_before_check_relocs): Set sec_type for
766 .opd whenever .opd is present and non-zero size. Move code
767 setting abiversion to/from output file earlier. Only set
768 u.opd.func_sec when --gc-sections. Read relocs and set up
769 u.opd.func_sec values here..
770 (ppc64_elf_check_relocs): ..rather than here. Simplify opd
772 (ppc64_elf_edit_opd): Don't set sec_type for .opd here.
774 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
776 * elf-m10300.c (mn10300_elf_check_relocs): Don't free cached
779 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
781 * elf32-bfin.c (bfin_size_dynamic_sections): Don't create the
782 .interp section with "ld --no-dynamic-linker".
784 2017-10-09 Alan Modra <amodra@gmail.com>
787 * dwarf2.c (_bfd_dwarf2_cleanup_debug_info): Free
788 funcinfo_hash_table and varinfo_hash_table.
790 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
792 * elf32-sh.c (readonly_dynrelocs): Dump dynamic relocation
793 in read-only section with minfo.
794 (sh_elf_size_dynamic_sections): Likewise.
796 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
798 * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Remove
801 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
803 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_sections): Set
804 this_hdr.sh_entsize only if section size > 0.
806 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
808 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Reformat.
810 2017-10-07 H.J. Lu <hongjiu.lu@intel.com>
812 * elfxx-sparc.c (readonly_dynrelocs): Dump dynamic relocation
813 in read-only section with minfo.
814 (_bfd_sparc_elf_size_dynamic_sections): Likewise.
816 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
818 * elfxx-x86.h (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Update
821 2017-10-06 John Baldwin <jhb@FreeBSD.org>
823 * elf-bfd.h (struct elf_backend_data): Add
824 `elf_backend_grok_freebsd_prstatus'.
825 * elf.c (elfcore_grok_freebsd_note): Call
826 `elf_backend_grok_freebsd_prstatus' to handle NT_PRSTATUS if
828 * elfn32-mips.c (elf_n32_mips_grok_freebsd_prstatus): New
830 (elf_backend_grok_freebsd_prstatus): Define.
831 * elfxx-target.h (elf_backend_grok_freebsd_prstatus): Define.
832 (elfNN_bed): Initialize `elf_backend_grok_freebsd_prstatus'.
834 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
836 * elf32-i386.c (elf_i386_check_relocs): Replace has_got_reloc
837 and has_non_got_reloc with zero_undefweak.
838 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
839 * elfxx-x86.c (_bfd_x86_elf_link_hash_newfunc): Initialize
841 (_bfd_x86_elf_copy_indirect_symbol): Replace has_got_reloc and
842 has_non_got_reloc with zero_undefweak.
843 * elfxx-x86.h (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Replace
844 has_got_reloc and has_non_got_reloc with zero_undefweak.
845 (elf_x86_link_hash_entry): Likewise.
847 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
849 * elfxx-x86.h (COPY_INPUT_RELOC_P): Add "do/while(0);".
850 (VERIFY_COPY_RELOC): Likewise.
852 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
854 * elfxx-x86.h (VERIFY_COPY_RELOC): New.
855 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Use it.
856 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
858 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
860 * elfxx-x86.h (VERIFY_PLT_ENTRY): New.
861 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Use it.
862 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
864 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
866 * elfxx-x86.h (COPY_INPUT_RELOC_P): New.
867 * elf32-i386.c (elf_i386_relocate_section): Use it.
868 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
870 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
872 * elf32-i386.c (X86_SIZE_TYPE_P): New.
873 (elf_i386_relocate_section): Use GENERATE_DYNAMIC_RELOCATION_P.
874 * elf64-x86-64.c (X86_SIZE_TYPE_P): New.
875 (elf_x86_64_relocate_section): Use GENERATE_DYNAMIC_RELOCATION_P.
876 * elfxx-x86.h (GENERATE_DYNAMIC_RELOCATION_P): New.
878 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
880 * elfxx-x86.h (POINTER_LOCAL_IFUNC_P): New.
881 (PLT_LOCAL_IFUNC_P): Likewise.
882 * elf32-i386.c (elf_i386_relocate_section): Use them.
883 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
885 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
887 * elfxx-x86.h (GENERATE_RELATIVE_RELOC_P): New.
888 * elf32-i386.c (elf_i386_relocate_section): Use it.
889 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
891 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
893 * elfxx-x86.h (RESOLVED_LOCALLY_P): New.
894 * elf32-i386.c (elf_i386_relocate_section): Use it.
895 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
897 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
899 * elf32-i386.c (X86_PCREL_TYPE_P): New.
900 (elf_i386_check_relocs): Use NEED_DYNAMIC_RELOCATION_P.
901 * elf64-x86-64.c (IS_X86_64_PCREL_TYPE): Renamed to ...
902 (X86_PCREL_TYPE_P): This.
903 (elf_x86_64_check_relocs): Use NEED_DYNAMIC_RELOCATION_P.
904 Replace IS_X86_64_PCREL_TYPE with X86_PCREL_TYPE_P.
905 (elf_x86_64_relocate_section): Replace IS_X86_64_PCREL_TYPE with
907 * elfxx-x86.h (NEED_DYNAMIC_RELOCATION_P): New.
909 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
911 * elfxx-x86.h (TLS_TRANSITION_IE_TO_LE_P): New.
912 * elf32-i386.c (elf_i386_tls_transition): Use it.
913 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
915 2017-10-05 H.J. Lu <hongjiu.lu@intel.com>
917 * elf32-ppc.c (readonly_dynrelocs): Add a link_info argument.
918 Dump dynamic relocation in read-only section with minfo if
920 (ppc_elf_adjust_dynamic_symbol): Pass NULL to readonly_dynrelocs.
921 (maybe_set_textrel): Likewise.
922 (ppc_elf_size_dynamic_sections): Dump dynamic relocation in
923 read-only section with minfo.
925 2017-10-05 John Baldwin <jhb@FreeBSD.org>
927 * elf.c (elfcore_grok_freebsd_note): Handle NT_ARM_VFP.
929 2017-10-05 H.J. Lu <hongjiu.lu@intel.com>
931 * elf32-tilepro.c (readonly_dynrelocs): Dump dynamic relocation
932 in read-only section with minfo.
933 (tilepro_elf_size_dynamic_sections): Likewise.
934 * elfxx-tilegx.c (readonly_dynrelocs): Likewise.
935 (tilegx_elf_size_dynamic_sections): Likewise.
937 2017-10-05 Pedro Alves <palves@redhat.com>
940 * bfd.c (bfd_set_error): Revert 2017-10-04 change. Remove
941 ellipsis parameter. Split out bfd_error_on_input code to..
942 (bfd_set_input_error): .. New function.
943 * archive.c (_bfd_write_archive_contents): Use bfd_set_input_error.
944 * vms-lib.c (_bfd_vms_lib_write_archive_contents): Likewise.
945 * bfd-in2.h: Regenerate.
947 2017-10-05 Alan Modra <amodra@gmail.com>
949 * elflink.c (elf_link_input_bfd): Correct ctor/dtor in init_array/
950 fini_array error value.
952 2017-10-05 Alan Modra <amodra@gmail.com>
955 * elf.c (_bfd_elf_setup_sections): Don't trim reloc sections from
957 (_bfd_elf_init_reloc_shdr): Pass sec_hdr, use it to copy SHF_GROUP
959 (elf_fake_sections): Adjust calls. Exit immediately on failure.
960 (bfd_elf_set_group_contents): Add associated reloc section indices
963 2017-10-04 Alan Modra <amodra@gmail.com>
965 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't sort or
966 classify symbols for ELFv2.
968 2017-10-04 Pavel I. Kryukov <kryukov@frtk.ru>
971 * bfd.c (bfd_set_error): Avoid UB on passing arg to va_start that
972 undergoes default promotion.
973 * bfd-in2.h: Regenerate.
975 2017-10-02 Alan Modra <amodra@gmail.com>
977 * elf32-ppc.c (ppc_elf_relocate_section): Fix comment typo.
978 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
980 2017-10-01 Alan Modra <amodra@gmail.com>
983 * dwarf2.c (new_line_sorts_after): Remove end_sequence comparison.
984 (add_line_info): Always put end_sequence last.
986 2017-10-01 Alan Modra <amodra@gmail.com>
989 * dwarf2.c (read_section): Allocate buffer with extra byte for
990 bfd_simple_get_relocated_section_contents rather than copying
993 2017-09-29 Alan Modra <amodra@gmail.com>
995 * merge.c (merge_strings): Return FALSE on malloc failure.
996 (_bfd_merge_sections): Return failures from record_section and
999 2017-09-28 Alan Modra <amodra@gmail.com>
1002 * elflink.c (_bfd_elf_merge_symbol): Set non_ir_ref_dynamic in
1003 a case where plugin_notice isn't called.
1005 2017-09-27 Kuan-Lin Chen <kuanlinchentw@gmail.com>
1007 * elf32-nds32.c (nds32_elf_relax_section): Fix a tautological
1010 2017-09-26 H.J. Lu <hongjiu.lu@intel.com>
1013 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't pass
1014 output_bfd to info->callbacks->minfo.
1016 2017-09-26 Nick Clifton <nickc@redhat.com>
1019 * elf64-x86-64.c (elf_x86_64_info_to_howto): Do not trigger an
1020 assertion failure if elf_x86_64_rtype_to_howto has already issued
1023 2017-09-26 Alan Modra <amodra@gmail.com>
1026 * dwarf2.c (read_formatted_entries): Use read_attribute_value to
1029 2017-09-26 Nick Clifton <nickc@redhat.com>
1032 * dwarf2.c (read_formatted_entries): Fail early if we know that
1033 the loop parsing data entries will overflow the end of the
1036 2017-09-26 Alan Modra <amodra@gmail.com>
1039 * dwarf2.c (struct comp_unit): Delete sec_info_ptr field.
1040 (find_abstract_instance_name): Calculate DW_FORM_ref_addr relative
1041 to stash->info_ptr_memory, and check die_ref is within that memory.
1042 Set info_ptr_end correctly when another CU is refd. Check die_ref
1043 for DW_FORM_ref4 etc. is within CU.
1045 2017-09-26 Alan Modra <amodra@gmail.com>
1048 * dwarf2.c (concat_filename): Return "<unknown>" on NULL filename.
1049 (read_formatted_entries): Init "fe".
1050 (decode_line_info <DW_LNE_define_file>): Use line_info_add_file_name.
1052 2017-09-26 Alan Modra <amodra@gmail.com>
1055 * dwarf2.c (decode_line_info): Ensure line_ptr stays within
1056 bounds in inner loop.
1058 2017-09-25 Alan Modra <amodra@gmail.com>
1061 * dwarf1.c (parse_die): Sanity check pointer against section limit
1062 before dereferencing.
1063 (parse_line_table): Likewise.
1065 2017-09-25 Alan Modra <amodra@gmail.com>
1068 * dwarf2.c (scan_unit_for_symbols): Ignore DW_AT_name unless it
1070 (parse_comp_unit): Likewise.
1072 2017-09-25 Alan Modra <amodra@gmail.com>
1075 * dwarf2.c (read_formatted_entries): Error on format_count zero.
1077 2017-09-24 Alan Modra <amodra@gmail.com>
1080 * opncls.c (bfd_get_debug_link_info_1): Properly check that crc is
1081 within section bounds.
1083 2017-09-24 Alan Modra <amodra@gmail.com>
1086 * dwarf2.c (decode_line_info): Properly free line sequences on error.
1088 2017-09-24 Alan Modra <amodra@gmail.com>
1091 * dwarf2.c (find_abstract_instance_name): Add orig_info_ptr and
1092 pname param. Return status. Make name const. Don't abort,
1093 return an error. Formatting. Exit if current info_ptr matches
1094 orig_info_ptr. Update callers.
1095 (scan_unit_for_symbols): Start at nesting_level of zero. Make
1096 nested_funcs an array of structs for extensibility. Formatting.
1098 2017-09-24 Alan Modra <amodra@gmail.com>
1101 * dwarf2.c (decode_line_info): Fail on lh.line_range of zero
1102 rather than dividing by zero.
1104 2017-09-24 Alan Modra <amodra@gmail.com>
1107 * dwarf2.c (decode_line_info): Correct .debug_line unit_length check.
1109 2017-09-24 Alan Modra <amodra@gmail.com>
1112 * dwarf2.c (scan_unit_for_symbols): Check u.blk->data is non-NULL.
1114 2017-09-24 Alan Modra <amodra@gmail.com>
1117 * elf.c (_bfd_elf_slurp_version_tables): Test sh_info on
1118 SHT_GNU_verneed section for sanity. Don't zalloc memory for
1121 2017-09-22 H.J. Lu <hongjiu.lu@intel.com>
1124 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Guard against
1127 2017-09-22 H.J. Lu <hongjiu.lu@intel.com>
1130 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Also return
1131 -1 if bfd_canonicalize_dynamic_reloc returns 0.
1133 2017-09-22 Pedro Alves <palves@redhat.com>
1134 Alan Modra <amodra@gmail.com>
1136 * version.h: Add comment.
1138 2017-09-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1140 * elf.c (elfcore_grok_note): For the cases NT_S390_GS_CB and
1141 NT_S390_GS_BC, correct the previously swapped invocations of
1142 elfcore_grok_s390_gs_bc and elfcore_grok_s390_gs_cb.
1144 2017-09-19 Alan Modra <amodra@gmail.com>
1147 * elf64-ppc.c (ppc64_elf_build_stubs): Don't check glink_eh_frame
1150 2017-09-19 Alan Modra <amodra@gmail.com>
1153 * elflink.c (bfd_elf_size_dynamic_sections): Garbage collect
1154 symbols before calculating verrefs. Don't renumber dynsyms
1155 after gc. Exclude .gnu.version when zero or one dynsym.
1156 Localize some vars and reindent.
1158 2017-09-18 H.J. Lu <hongjiu.lu@intel.com>
1161 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Check error
1162 return from bfd_canonicalize_dynamic_reloc.
1164 2017-09-15 Alan Modra <amodra@gmail.com>
1167 * archive.c (bfd_ar_hdr_from_filesystem): Detect when status.st_size
1168 overflows bfd_size_type.
1170 2017-09-14 H.J. Lu <hongjiu.lu@intel.com>
1173 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument
1174 to indicate if conversion is performed.
1175 (elf_i386_check_relocs): Cache section contents and relocations
1176 if conversion is performed.
1177 * elf64-x86-64.c (elf_x86_64_check_relocs): Cache section
1178 contents and relocations if conversion is performed.
1180 2017-09-14 Nick Clifton <nickc@redhat.com>
1183 * peXXigen.c (pe_print_idata): Extend check for HintName vector
1186 2017-09-13 H.J. Lu <hongjiu.lu@intel.com>
1188 * elfxx-x86.h: Fix a typo in comments.
1190 2017-09-09 Kamil Rytarowski <n54@gmx.com>
1192 * elf32-nds32.c: Rename __BIT() to N32_BIT().
1194 2017-09-09 Alan Modra <amodra@gmail.com>
1196 * elf64-ppp.c (plt_stub_pad): Handle positive and negative
1199 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
1201 * elf32-i386.c (elf_i386_relocate_section): Update usage of
1202 UNDEFINED_WEAK_RESOLVED_TO_ZERO.
1203 (elf_i386_finish_dynamic_symbol): Likewise.
1204 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1205 (elf_x86_64_finish_dynamic_symbol): Likewise.
1206 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Likewise.
1207 (_bfd_x86_elf_fixup_symbol): Likewise.
1209 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
1211 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
1212 check has_non_got_reloc.
1214 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
1217 * elf32-i386.c (elf_i386_convert_load_reloc): Check linker_def.
1218 Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
1219 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Check
1220 linker_def. Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
1221 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Set local_ref
1222 and linker_def on __ehdr_start if it is referenced and not
1224 (_bfd_x86_elf_link_symbol_references_local): Also set local_ref
1225 and return TRUE when building executable, if a symbol has
1226 non-GOT/non-PLT relocations in text section or there is no
1228 * elfxx-x86.h (elf_x86_link_hash_entry): Add linker_def.
1230 2017-09-08 H.J. Lu <hongjiu.lu@intel.com>
1232 * elfxx-x86.h: Update comments.
1234 2017-09-08 H.J. Lu <hongjiu.lu@intel.com>
1236 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Replace
1237 elf_x86_plt_layout_table with elf_x86_init_table.
1238 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
1240 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties):
1242 * elfxx-x86.h (elf_x86_plt_layout_table): Renamed to ...
1243 (elf_x86_init_table): This.
1244 (_bfd_x86_elf_link_setup_gnu_properties): Replace
1245 elf_x86_plt_layout_table with elf_x86_init_table.
1247 2017-09-07 H.J. Lu <hongjiu.lu@intel.com>
1249 * configure.ac (bfd_backends): Don't add elf64-x86-64.lo nor
1250 elf64.lo together with elfxx-x86.lo for 64-bit BFD.
1251 * configure: Regenerated.
1252 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set r_info
1253 and r_sym fields of plt_layout.
1254 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
1256 * elfxx-x86.c (elf_x86_64_is_reloc_section): Remove BFD64 check.
1257 (_bfd_x86_elf_link_hash_table_create): Likewise. Don't set
1258 r_info nor r_sym fields.
1259 (_bfd_x86_elf_link_setup_gnu_properties): Set r_info and r_sym
1261 * elfxx-x86.h (elf_x86_plt_layout_table): Add r_info and r_sym.
1263 2017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
1265 * (_bfd_riscv_relax_align): Call bfd_set_error and
1266 print an error message when unable to relax a .align directive.
1268 2017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
1270 * elfnn-riscv.c (riscv_zero_pcrel_hi_reloc): New function.
1271 (riscv_record_pcrel_hi_reloc): Add absolute argument.
1272 (riscv_elf_relocate_section): Call riscv_zero_pcrel_hi_reloc for
1273 R_RISCV_PCREL_HI20 relocs, and pass the result to
1274 riscv_record_pcrel_hi_reloc.
1276 2017-09-07 H.J. Lu <hongjiu.lu@intel.com>
1278 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument,
1279 r_type_p. Remove the converted argument. Replace
1280 SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P. Return
1281 the new relocation type via r_type_p.
1282 (elf_i386_relocate_section): Likewise.
1283 (elf_i386_finish_dynamic_symbol): Likewise.
1284 (need_convert_load): Removed.
1285 (check_relocs_failed): Updated.
1286 (elf_i386_check_relocs): Call elf_i386_convert_load_reloc,
1287 instead of setting need_convert_load.
1288 (_bfd_i386_elf_convert_load): Removed.
1289 * elf64-x86-64.c (need_convert_load): Removed.
1290 (check_relocs_failed): Updated.
1291 (elf_x86_64_convert_load_reloc): Add an argument, r_type_p.
1292 Replace SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P.
1293 Return the new relocation type via r_type_p.
1294 (elf_x86_64_check_relocs): Call elf_x86_64_convert_load_reloc,
1295 instead of setting need_convert_load.
1296 (elf_x86_64_check_relocs): Don't check PIC if relocation has
1298 (_bfd_x86_64_elf_convert_load): Removed.
1299 (elf_x86_64_relocate_section): Replace SYMBOL_REFERENCES_LOCAL
1300 with SYMBOL_REFERENCES_LOCAL_P.
1301 (elf_x86_64_finish_dynamic_symbol): Likewise.
1302 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Don't
1304 (_bfd_x86_elf_size_dynamic_sections): Don't call convert_load.
1305 (_bfd_x86_elf_link_symbol_references_local): New function.
1306 * elfxx-x86.h (SYMBOL_REFERENCES_LOCAL_P): New.
1307 (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Replace elf.forced_local with
1308 SYMBOL_REFERENCES_LOCAL_P.
1309 (elf_x86_link_hash_entry): Add local_ref.
1310 (elf_x86_link_hash_table): Remove convert_load.
1311 (_bfd_i386_elf_convert_load): Removed.
1312 (_bfd_x86_64_elf_convert_load): Likewise.
1313 (_bfd_x86_elf_link_symbol_references_local): New.
1315 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
1317 * elf64-x86-64.c (R_X86_64_converted_reloc_bit): New.
1318 (elf_x86_64_info_to_howto): Get the real relocation type by
1319 masking out R_X86_64_converted_reloc_bit.
1320 (elf_x86_64_check_tls_transition): Get the real relocation type
1321 by masking out R_X86_64_converted_reloc_bit.
1322 (elf_x86_64_convert_load_reloc): Set R_X86_64_converted_reloc_bit
1323 instead of setting converted_reloc.
1324 (elf_x86_64_relocate_section): Check R_X86_64_converted_reloc_bit
1325 instead of converted_reloc. Get the real relocation type by
1326 masking out R_X86_64_converted_reloc_bit.
1327 (elf_x86_64_link_setup_gnu_properties): Verify that the value of
1328 R_X86_64_converted_reloc_bit is valid.
1329 * elfxx-x86.h (converted_reloc): Removed.
1331 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
1333 * elf32-i386.c (elf_i386_relocate_section): Don't change r_type
1334 when calling elf_i386_tls_transition. Don't use ELF32_R_TYPE
1335 to get the relocation type again.
1336 * elf64-x86-64.c (elf_x86_64_relocate_section): Don't change
1337 r_type when calling elf_x86_64_tls_transition. Don't use
1338 ELF32_R_TYPE to get the relocation type again.
1340 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
1342 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Properly set
1345 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
1347 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Remove the sec
1348 argument. Don't check relocation overflow. Avoid relocation
1349 overflow if --no-relax is used. Set converted_reloc on symbol
1350 if a GOTPCREL relocation is converted.
1351 (elf_x86_64_relocate_section): Issue a fatal error and suggest
1352 --no-relax if GOTPCREL relocation conversion leads to relocation
1354 * elfxx-x86.h (elf_x86_link_hash_entry): Add converted_reloc.
1356 2017-09-05 Alexander Fedotov <alexander.fedotov@nxp.com>
1357 Edmar Wienskoski <edmar.wienskoski@nxp.com
1359 * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_VLE_ADDR20.
1360 (ppc_elf_check_relocs): Handle it.
1361 (ppc_elf_vle_split20): New function.
1362 (ppc_elf_relocate_section): Handle R_PPC_VLE_ADDR20.
1364 2017-09-03 H.J. Lu <hongjiu.lu@intel.com>
1367 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Set tlsdesc_plt
1368 for x86-64 if GOT_TLS_GDESC_P is true.
1370 2017-09-03 Alan Modra <amodra@gmail.com>
1373 * elfxx-x86.h (elf_x86_hash_table): Check is_elf_hash_table first.
1375 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1377 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1378 tls_get_addr for x86-64 in one place.
1380 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1382 * configure.ac (bfd_backends): Add elf64-x86-64.lo together
1383 with elfxx-x86.lo for 64-bit BFD.
1384 * configure: Regenerated.
1386 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1388 * elf32-i386.c (elf_i386_convert_load): Renamed to ...
1389 (_bfd_i386_elf_convert_load): This. Remove static.
1390 (elf_i386_size_dynamic_sections): Removed.
1391 (elf_backend_size_dynamic_sections): Likewise.
1392 * elf64-x86-64.c (elf_x86_64_convert_load): Renamed to ...
1393 (_bfd_x86_64_elf_convert_load): This. Remove static.
1394 (elf_x86_64_size_dynamic_sections): Removed.
1395 (elf_backend_size_dynamic_sections): Likewise.
1396 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): Renamed to ...
1397 (elf_x86_allocate_dynrelocs): This. Make it static.
1398 (_bfd_x86_elf_allocate_local_dynrelocs): Renamed to ...
1399 (elf_x86_allocate_local_dynreloc): This. Make it static.
1400 (elf_i386_is_reloc_section): New function.
1401 (elf_x86_64_is_reloc_section): Likewise.
1402 (_bfd_x86_elf_link_hash_table_create): Initialize convert_load,
1403 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
1404 Rearrange got_entry_size initialization.
1405 (_bfd_x86_elf_size_dynamic_sections): New function.
1406 * elfxx-x86.h (elf_x86_link_hash_table): Add convert_load,
1407 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
1408 (_bfd_i386_elf_convert_load): New.
1409 (_bfd_x86_64_elf_convert_load): Likewise.
1410 (_bfd_x86_elf_size_dynamic_sections): Likewise.
1411 (elf_backend_size_dynamic_sections): Likewise.
1412 (_bfd_x86_elf_allocate_dynrelocs): Removed.
1413 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
1415 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1417 * elfxx-x86.h (elf_x86_link_hash_table): Rearrange fields and
1420 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1422 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
1423 sgotplt_jump_table_size with elf_x86_compute_jump_table_size.
1425 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1427 * elf32-i386.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
1428 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Moved to ...
1429 * elfxx-x86.h (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
1430 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Here.
1431 * elf64-x86-64.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
1432 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Removed.
1434 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1436 * elf32-i386.c (elf_i386_allocate_dynrelocs): Removed.
1437 (elf_i386_allocate_local_dynrelocs): Likewise.
1438 (elf_i386_size_dynamic_sections): Replace
1439 elf_i386_allocate_dynrelocs/elf_i386_allocate_local_dynrelocs
1440 with _bfd_x86_elf_allocate_dynrelocs and
1441 _bfd_x86_elf_allocate_local_dynrelocs.
1442 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Removed.
1443 (elf_x86_64_allocate_local_dynrelocs): Likewise.
1444 (elf_x86_64_size_dynamic_sections): Replace
1445 elf_x86_64_allocate_dynrelocs/elf_x86_64_allocate_local_dynrelocs
1446 with _bfd_x86_elf_allocate_dynrelocs and
1447 _bfd_x86_elf_allocate_local_dynrelocs.
1448 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): New function.
1449 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
1450 * elfxx-x86.h (_bfd_x86_elf_allocate_dynrelocs): New prototype.
1451 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
1453 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1455 * elf32-i386.c (is_i386_elf): Removed.
1456 (elf_i386_check_relocs): Replace is_i386_elf with is_x86_elf.
1457 (elf_i386_size_dynamic_sections): Likewise.
1458 (elf_i386_relocate_section): Likewise.
1459 * elf64-x86-64.c (is_x86_64_elf): Removed.
1460 (elf_x86_64_check_relocs): Replace is_x86_64_elf with
1462 (elf_x86_64_size_dynamic_sections): Likewise.
1463 (elf_x86_64_relocate_section): Likewise.
1464 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1466 * elfxx-x86.h (elf_x86_link_hash_table): Add target_id.
1469 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1471 * elf32-i386.c (elf_i386_compute_jump_table_size): Removed.
1472 (elf_i386_allocate_dynrelocs): Replace
1473 elf_i386_compute_jump_table_size with
1474 elf_x86_compute_jump_table_size.
1475 (elf_i386_size_dynamic_sections): Likewise.
1476 * elf64-x86-64.c (elf_x86_64_compute_jump_table_size): Removed.
1477 (elf_x86_64_allocate_dynrelocs): Replace
1478 elf_x86_64_compute_jump_table_size with
1479 elf_x86_compute_jump_table_size.
1480 (elf_x86_64_size_dynamic_sections): Likewise.
1481 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1483 * elfxx-x86.h (elf_x86_link_hash_table): Add got_entry_size.
1484 (elf_x86_compute_jump_table_size): New.
1486 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1488 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1490 (_bfd_x86_elf_adjust_dynamic_symbol): Use sizeof_reloc.
1491 * elfxx-x86.h (elf_x86_link_hash_table): Add sizeof_reloc.
1493 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1495 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check VxWorks
1496 with htab->is_vxworks.
1497 (elf_i386_size_dynamic_sections): Likewise.
1498 (elf_i386_relocate_section): Likewise.
1499 (elf_i386_finish_dynamic_symbol): Likewise.
1500 (elf_i386_finish_dynamic_sections): Likewise.
1502 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1504 * elf32-i386.c (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
1505 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
1506 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Moved to ...
1507 * elfxx-x86.h (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
1508 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
1509 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Here.
1510 * elf64-x86-64.c (GOT_TLS_IE, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
1511 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Removed.
1513 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1516 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Check
1517 ELF_COMMON_DEF_P for common symbols.
1519 2017-09-02 Alan Modra <amodra@gmail.com>
1521 * elf-eh-frame.c (offset_adjust): Avoid false positive gcc warning.
1522 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Likewise.
1523 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
1525 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1527 * elf32-i386.c (elf_i386_gc_mark_hook): Removed.
1528 (elf_backend_gc_mark_hook): Likewise.
1529 * elf64-x86-64.c (elf_x86_64_gc_mark_hook): Likewise.
1530 (elf_backend_gc_mark_hook): Likewise.
1531 * elfxx-x86.c (_bfd_x86_elf_gc_mark_hook): New function.
1532 * elfxx-x86.h (_bfd_x86_elf_gc_mark_hook): New.
1533 (elf_backend_gc_mark_hook): Likewise.
1535 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1537 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Removed.
1538 (elf_backend_adjust_dynamic_symbol): Likewise.
1539 * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise.
1540 (elf_backend_adjust_dynamic_symbol): Likewise.
1541 * elfxx-x86.c (_bfd_x86_elf_adjust_dynamic_symbol): New function.
1542 (_bfd_x86_elf_link_setup_gnu_properties): Copy is_vxworks.
1543 * elfxx-x86.h (elf_x86_link_hash_table): Add is_vxworks.
1544 (_bfd_x86_elf_adjust_dynamic_symbol): New.
1545 (elf_backend_adjust_dynamic_symbol): Likewise.
1547 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1549 * elfxx-x86.h (elf_x86_plt_layout_table): Fix a typo in
1552 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1554 * elf32-i386.c (elf_i386_mkobject): Removed.
1555 (bfd_elf32_mkobject): Likewise.
1556 * elf64-x86-64.c (elf_x86_64_mkobject): Likewise.
1557 (bfd_elf64_mkobject): Likewise.
1558 (bfd_elf32_mkobject): Likewise.
1559 * elfxx-x86.c (_bfd_x86_elf_mkobject): New function.
1560 * elfxx-x86.h (_bfd_x86_elf_mkobject): New.
1561 (bfd_elf64_mkobject): Likewise.
1562 (bfd_elf32_mkobject): Likewise.
1564 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1566 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Updated.
1567 Call _bfd_x86_elf_link_setup_gnu_properties.
1568 * elf64-x86-64.c (elf_x86_lazy_plt_layout): Initialize
1569 pic_plt0_entry and pic_plt_entry fields with the non-PIC PLT
1571 (elf_x86_64_non_lazy_plt): Likewise.
1572 (elf_x86_64_lazy_bnd_plt): Likewise.
1573 (elf_x86_64_non_lazy_bnd_plt): Likewise.
1574 (elf_x86_64_lazy_ibt_plt): Likewise.
1575 (elf_x32_lazy_ibt_plt): Likewise.
1576 (elf_x86_64_non_lazy_ibt_plt): Likewise.
1577 (elf_x32_non_lazy_ibt_plt): Likewise.
1578 (elf_x86_64_nacl_plt): Likewise.
1579 (elf_x86_64_link_setup_gnu_properties): Updated. Call
1580 _bfd_x86_elf_link_setup_gnu_properties.
1581 * elfxx-x86.c: Include elf-vxworks.h".
1582 (_bfd_x86_elf_link_setup_gnu_properties): New function.
1583 * elfxx-x86.h (elf_x86_lazy_plt_layout): Remove "for i386 only"
1584 comments for pic_plt0_entry and pic_plt_entry.
1585 (elf_x86_non_lazy_plt_layout): Likewise.
1586 (elf_x86_plt_layout_table): New.
1587 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
1589 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1592 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Create
1593 .eh_frame section for the second PLT.
1594 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Correct
1595 alignment of .eh_frame section for the second PLT.
1597 2017-09-01 Nick Clifton <nickc@redhat.com>
1600 * dwarf2.c (decode_line_info): Fix test for an overlong line info
1603 2017-09-01 Nick Clifton <nickc@redhat.com>
1606 * elf-attrs.c (_bfd_elf_parse_attributes): Ensure that the
1607 attribute buffer is NUL terminated.
1609 2017-08-31 Nick Clifton <nickc@redhat.com>
1612 * dwarf2.c (read_section): If necessary add a terminating NUL byte
1613 to dwarf string sections.
1615 2017-08-31 Alan Modra <amodra@gmail.com>
1617 * po/SRC-POTFILES.in: Regenerate.
1619 2017-08-31 Alan Modra <amodra@gmail.com>
1621 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Don't exit early
1622 for a section containing just a terminator. Allow multiple
1623 terminators at end of section.
1624 * elflink.c (bfd_elf_discard_info): Iterate over .eh_frame
1625 sections when not adding alignment. Assert on terminator in
1628 2017-08-31 Alan Modra <amodra@gmail.com>
1632 * elflink.c (bfd_elf_discard_info): Don't pad embedded zero
1635 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1637 * configure.ac (bfd_backends): Add elf64.lo together with
1638 elfxx-x86.lo for 64-bit BFD.
1639 * configure: Regenerated.
1641 2017-08-31 James Bowman <james.bowman@ftdichip.com>
1643 * elf32-ft32.c (ft32_elf_howto_table): Use complain_overflow_dont
1646 2017-08-31 Alan Modra <amodra@gmail.com>
1649 * opncls.c (bfd_close_all_done): Don't call bfd_cache_close
1650 before _close_and_cleanup. Call iovec->bclose after.
1651 (bfd_close): Remove code common to, and call, bfd_close_all_done.
1653 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1655 * elf32-i386.c (elf_i386_plt_type): Removed.
1656 (elf_i386_plt): Likewise.
1657 (elf_i386_get_synthetic_symtab): Updated. Call
1658 _bfd_x86_elf_get_synthetic_symtab.
1659 * elf64-x86-64.c (elf_x86_64_plt_type): Removed.
1660 (elf_x86_64_plt): Likewise.
1661 (elf_x86_64_get_synthetic_symtab): Updated. Call
1662 _bfd_x86_elf_get_synthetic_symtab.
1663 * elfxx-x86.c (elf_i386_get_plt_got_vma): New function.
1664 (elf_x86_64_get_plt_got_vma): Likewise.
1665 (elf_i386_valid_plt_reloc_p): Likewise.
1666 (elf_x86_64_valid_plt_reloc_p): Likewise.
1667 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
1668 * elfxx-x86.h (elf_x86_plt_type): New.
1669 (elf_x86_plt): Likewise.
1670 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
1672 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1674 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Check
1675 target_id instead of elf_machine_code.
1677 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1679 * elf32-i386.c (ELF_DYNAMIC_INTERPRETER): Removed.
1680 (elf_i386_lazy_plt_layout): Likewise.
1681 (elf_i386_non_lazy_plt_layout): Likewise.
1682 (elf_i386_plt_layout): Likewise.
1683 (elf_i386_link_hash_table): Likewise.
1684 (elf_i386_next_tls_desc_index): Likewise.
1685 (elf_i386_srelplt2): Likewise.
1686 (elf_i386_plt): Likewise.
1687 (elf_i386_lazy_plt): Likewise.
1688 (elf_i386_non_lazy_plt): Likewise.
1689 (elf_i386_link_hash_table_create): Likewise.
1690 (bfd_elf32_bfd_link_hash_table_create): Likewise.
1691 (elf_i386_lazy_plt): Updated.
1692 (elf_i386_non_lazy_plt): Likewise.
1693 (elf_i386_lazy_ibt_plt): Likewise.
1694 (elf_i386_non_lazy_ibt_plt): Likewise.
1695 (elf_i386_allocate_dynrelocs): Likewise.
1696 (elf_i386_size_dynamic_sections): Likewise.
1697 (elf_i386_relocate_section): Likewise.
1698 (elf_i386_finish_dynamic_symbol): Likewise.
1699 (elf_i386_finish_dynamic_sections): Likewise.
1700 (elf_i386_get_synthetic_symtab): Likewise.
1701 (elf_i386_link_setup_gnu_properties): Likewise.
1702 (elf_i386_nacl_plt): Likewise.
1703 * elf64-x86-64.c (ABI_64_P): Removed.
1704 (ELF64_DYNAMIC_INTERPRETER): Likewise.
1705 (ELF32_DYNAMIC_INTERPRETER): Likewise.
1706 (elf_x86_64_lazy_plt_layout): Likewise.
1707 (elf_x86_64_non_lazy_plt_layout): Likewise.
1708 (elf_x86_64_plt_layout): Likewise.
1709 (elf_x86_64_link_hash_table): Likewise.
1710 (elf_x86_64_plt): Likewise.
1711 (elf_x86_64_lazy_plt): Likewise.
1712 (elf_x86_64_non_lazy_plt): Likewise.
1713 (elf_x86_64_link_hash_table_create): Likewise.
1714 (bfd_elf64_bfd_link_hash_table_create): Likewise.
1715 (bfd_elf32_bfd_link_hash_table_create): Likewise.
1716 (elf_x86_64_lazy_plt): Updated.
1717 (elf_x86_64_non_lazy_plt): Likewise.
1718 (elf_x86_64_lazy_bnd_plt): Likewise.
1719 (elf_x86_64_non_lazy_bnd_plt): Likewise.
1720 (elf_x86_64_lazy_ibt_plt): Likewise.
1721 (elf_x32_lazy_ibt_plt): Likewise.
1722 (elf_x86_64_non_lazy_ibt_plt): Likewise.
1723 (elf_x32_non_lazy_ibt_plt): Likewise.
1724 (elf_x86_64_allocate_dynrelocs): Likewise.
1725 (elf_x86_64_size_dynamic_sections): Likewise.
1726 (elf_x86_64_relocate_section): Likewise.
1727 (elf_x86_64_finish_dynamic_symbol): Likewise.
1728 (elf_x86_64_finish_dynamic_sections): Likewise.
1729 (elf_x86_64_get_synthetic_symtab): Likewise.
1730 (elf_x86_64_link_setup_gnu_properties): Likewise.
1731 (elf_x86_64_nacl_plt): Likewise.
1732 * elfxx-x86.c: Include "objalloc.h", "elf/i386.h" and
1734 (ELF32_DYNAMIC_INTERPRETER): New.
1735 (ELF64_DYNAMIC_INTERPRETER): Likewise.
1736 (ELFX32_DYNAMIC_INTERPRETER): Likewise.
1737 (_bfd_x86_elf_link_hash_table_create): Likewise.
1738 (_bfd_x86_elf_link_hash_table_free): Renamed to ...
1739 (elf_x86_link_hash_table_free): This. Make it static.
1740 * elfxx-x86.h: Don't include "objalloc.h".
1742 (elf_x86_lazy_plt_layout): Likewise.
1743 (elf_x86_non_lazy_plt_layout): Likewise.
1744 (elf_x86_plt_layout): Likewise.
1745 (_bfd_x86_elf_link_hash_table_create): Likewise.
1746 (bfd_elf64_bfd_link_hash_table_create): Likewise.
1747 (bfd_elf32_bfd_link_hash_table_create): Likewise.
1748 (elf_x86_link_hash_table): Add plt, lazy_plt, non_lazy_plt,
1749 srelplt2 and next_tls_desc_index.
1750 (_bfd_x86_elf_link_hash_table_free): Removed.
1752 2017-08-30 Maciej W. Rozycki <macro@imgtec.com>
1754 * elfxx-mips.c (mips_elf_perform_relocation): Correct microMIPS
1755 branch offset interpretation.
1757 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1760 * opncls.c (bfd_close_all_done): Call _close_and_cleanup.
1762 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1764 * elf64-x86-64.c (elf_x86_64_next_tls_desc_index): Removed.
1765 (elf_x86_64_srelplt2): Likewise.
1767 2017-08-30 Alan Modra <amodra@gmail.com>
1769 * elf64-ppc.c (struct ppc_link_hash_table): Add do_tls_opt.
1770 (ppc64_elf_tls_optimize): Set it.
1771 (ppc64_elf_relocate_section): Nop addis on TPREL16_HA, and convert
1772 insn on TPREL16_LO and TPREL16_LO_DS relocs to use r13 when
1773 addis would add zero.
1774 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add do_tls_opt.
1775 (ppc_elf_tls_optimize): Set it.
1776 (ppc_elf_relocate_section): Nop addis on TPREL16_HA, and convert
1777 insn on TPREL16_LO relocs to use r2 when addis would add zero.
1779 2017-08-30 Alan Modra <amodra@gmail.com>
1781 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing
1782 __tls_get_addr call sequences to LE, don't move the addi down
1783 to the nop. Replace the bl with addi and leave the nop alone.
1785 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1787 * elf32-i386.c (elf_i386_pie_finish_undefweak_symbol):
1789 * elf64-x86-64.c (elf_x86_64_finish_local_dynamic_symbol):
1791 (elf_x86_64_pie_finish_undefweak_symbol): Likewise.
1793 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1795 * Makefile.am (BFD32_BACKENDS): Add elfxx-x86.lo.
1796 (BFD64_BACKENDS): Likewise.
1797 (BFD32_BACKENDS_CFILES): Add elfxx-x86.c.
1798 (BFD64_BACKENDS_CFILES): Likewise.
1799 * Makefile.in: Regenerated.
1800 * configure.ac (bfd_backends): Add elfxx-x86.lo together with
1801 elf32-i386.lo and elf64-x86-64.lo.
1802 * configure: Regenerated.
1803 * elf32-i386.c: Include "elfxx-x86.h" instead of "sysdep.h",
1804 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
1805 "objalloc.h" and "hashtab.h".
1806 (ELIMINATE_COPY_RELOCS): Removed.
1807 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
1808 (SYMBOL_NO_COPYRELOC): Likewise.
1809 (elf_i386_link_hash_entry): Likewise.
1810 (GOT_UNKNOWN): Likewise.
1811 (GOT_NORMAL): Likewise.
1812 (GOT_TLS_GD): Likewise.
1813 (elf_i386_hash_entry): Likewise.
1814 (elf_i386_obj_tdata): Likewise.
1815 (elf_i386_tdata): Likewise.
1816 (elf_i386_local_got_tls_type): Likewise.
1817 (elf_i386_local_tlsdesc_gotent): Likewise.
1818 (elf_i386_hash_table): Likewise.
1819 (elf_i386_link_hash_newfunc): Likewise.
1820 (elf_i386_local_htab_hash): Likewise.
1821 (elf_i386_local_htab_eq): Likewise.
1822 (elf_i386_get_local_sym_hash): Likewise.
1823 (elf_i386_link_hash_table_free): Likewise.
1824 (elf_i386_copy_indirect_symbol): Likewise.
1825 (elf_i386_fixup_symbol): Likewise.
1826 (elf_i386_readonly_dynrelocs): Likewise.
1827 (elf_i386_always_size_sections): Likewise.
1828 (elf_i386_set_tls_module_base): Likewise.
1829 (elf_i386_dtpoff_base): Likewise.
1830 (compare_relocs): Likewise.
1831 (elf_i386_hash_symbol): Likewise.
1832 (elf_i386_parse_gnu_properties): Likewise.
1833 (elf_i386_merge_gnu_properties): Likewise.
1834 (elf_i386_link_check_relocs): Likewise.
1835 (elf_i386_merge_symbol_attribute): Likewise.
1836 (bfd_elf32_bfd_link_check_relocs): Likewise.
1837 (elf_backend_copy_indirect_symbol): Likewise.
1838 (elf_backend_always_size_sections): Likewise.
1839 (elf_backend_omit_section_dynsym): Likewise.
1840 (elf_backend_hash_symbol): Likewise.
1841 (elf_backend_fixup_symbol): Likewise.
1842 (elf_backend_parse_gnu_properties): Likewise.
1843 (elf_backend_merge_gnu_properties): Likewise.
1844 (elf_backend_merge_symbol_attribute): Likewise.
1845 (elf_i386_mkobject): Updated.
1846 (elf_i386_link_hash_table_create): Likewise.
1847 (elf_i386_check_tls_transition): Likewise.
1848 (elf_i386_tls_transition): Likewise.
1849 (elf_i386_convert_load_reloc): Likewise.
1850 (elf_i386_check_relocs): Likewise.
1851 (elf_i386_adjust_dynamic_symbol): Likewise.
1852 (elf_i386_allocate_dynrelocs): Likewise.
1853 (elf_i386_convert_load): Likewise.
1854 (elf_i386_size_dynamic_sections): Likewise.
1855 (elf_i386_relocate_section): Likewise.
1856 (elf_i386_finish_dynamic_symbol ): Likewise.
1857 (elf_i386_finish_dynamic_sections): Likewise.
1858 (elf_i386_output_arch_local_syms): Likewise.
1859 (elf_i386_get_synthetic_symtab): Likewise.
1860 (elf_i386_link_setup_gnu_properties): Likewise.
1861 (elf_i386_link_hash_table): Use elf_x86_link_hash_table, instead
1862 of elf_link_hash_table, as base.
1863 (elf_i386_next_tls_desc_index): New.
1864 (elf_i386_srelplt2): Likewise.
1865 (elf_i386_plt): Likewise.
1866 (elf_i386_lazy_plt): Likewise.
1867 (elf_i386_non_lazy_plt): Likewise.
1868 * elf32-x86-64.c: Include "elfxx-x86.h" instead of "sysdep.h",
1869 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
1870 "objalloc.h" and "hashtab.h".
1871 (ELIMINATE_COPY_RELOCS): Removed.
1872 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
1873 (SYMBOL_NO_COPYRELOC): Likewise.
1874 (elf_x86_64_link_hash_entry): Likewise.
1875 (GOT_UNKNOWN): Likewise.
1876 (GOT_NORMAL): Likewise.
1877 (GOT_TLS_GD): Likewise.
1878 (elf_x86_64_hash_entry): Likewise.
1879 (elf_x86_64_obj_tdata): Likewise.
1880 (elf_x86_64_tdata): Likewise.
1881 (elf_x86_64_local_got_tls_type): Likewise.
1882 (elf_x86_64_local_tlsdesc_gotent): Likewise.
1883 (elf_x86_64_hash_table): Likewise.
1884 (elf_x86_64_link_hash_newfunc): Likewise.
1885 (elf_x86_64_local_htab_hash): Likewise.
1886 (elf_x86_64_local_htab_eq): Likewise.
1887 (elf_x86_64_get_local_sym_hash): Likewise.
1888 (elf_x86_64_link_hash_table_free): Likewise.
1889 (elf_x86_64_copy_indirect_symbol): Likewise.
1890 (elf_x86_64_fixup_symbol): Likewise.
1891 (elf_x86_64_readonly_dynrelocs): Likewise.
1892 (elf_x86_64_always_size_sections): Likewise.
1893 (elf_x86_64_set_tls_module_base): Likewise.
1894 (elf_x86_64_dtpoff_base): Likewise.
1895 (compare_relocs): Likewise.
1896 (elf_x86_64_merge_symbol_attribute): Likewise.
1897 (elf_x86_64_hash_symbol): Likewise.
1898 (elf_x86_64_parse_gnu_properties): Likewise.
1899 (elf_x86_64_merge_gnu_properties): Likewise.
1900 (elf_x86_64_link_check_relocs): Likewise.
1901 (elf_backend_copy_indirect_symbol): Likewise.
1902 (elf_backend_always_size_sections): Likewise.
1903 (bfd_elf64_bfd_link_check_relocs): Likewise.
1904 (elf_backend_merge_symbol_attribute): Likewise.
1905 (elf_backend_hash_symbol): Likewise.
1906 (elf_backend_omit_section_dynsym): Likewise.
1907 (elf_backend_fixup_symbol): Likewise.
1908 (elf_backend_parse_gnu_properties): Likewise.
1909 (elf_backend_merge_gnu_properties): Likewise.
1910 (bfd_elf32_bfd_link_check_relocs): Likewise.
1911 (elf_x86_64_mkobject): Updated.
1912 (elf_x86_64_link_hash_table_create): Likewise.
1913 (elf_x86_64_check_tls_transition): Likewise.
1914 (elf_x86_64_tls_transition): Likewise.
1915 (elf_x86_64_convert_load_reloc): Likewise.
1916 (elf_x86_64_check_relocs): Likewise.
1917 (elf_x86_64_adjust_dynamic_symbol): Likewise.
1918 (elf_x86_64_allocate_dynrelocs): Likewise.
1919 (elf_x86_64_convert_load): Likewise.
1920 (elf_x86_64_size_dynamic_sections): Likewise.
1921 (elf_x86_64_relocate_section): Likewise.
1922 (elf_x86_64_finish_dynamic_symbol ): Likewise.
1923 (elf_x86_64_finish_dynamic_sections): Likewise.
1924 (elf_x86_64_output_arch_local_syms): Likewise.
1925 (elf_x86_64_get_synthetic_symtab): Likewise.
1926 (elf_x86_64_link_setup_gnu_properties): Likewise.
1927 (elf_x86_64_link_hash_table): Use elf_x86_link_hash_table,
1928 instead of elf_link_hash_table, as base.
1929 (elf_x86_64_next_tls_desc_index): New.
1930 (elf_x86_64_srelplt2): Likewise.
1931 (elf_x86_64_plt): Likewise.
1932 (elf_x86_64_lazy_plt): Likewise.
1933 (elf_x86_64_non_lazy_plt): Likewise.
1934 * elfxx-x86.c: New file.
1935 * elfxx-x86.h: Likewise.
1937 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1939 * elf32-i386.c (elf_i386_get_synthetic_symtab): Simplify bad
1941 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1943 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1945 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check valid PLT
1946 sections before checking dynamic relocations and free invalid
1947 PLT section contents.
1948 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1950 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
1952 * elf-bfd.h (_bfd_elf_ifunc_get_synthetic_symtab): Removed.
1953 * elf-ifunc.c (_bfd_elf_ifunc_get_synthetic_symtab): Likewise.
1955 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
1958 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check for valid
1960 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1962 2017-08-27 H.J. Lu <hongjiu.lu@intel.com>
1964 * elf32-i386.c (elf_i386_link_hash_newfunc): Initialize
1966 * elf64-x86-64.c (elf_x86_64_link_hash_newfunc): Likewise.
1968 2017-08-26 H.J. Lu <hongjiu.lu@intel.com>
1971 * elf-bfd.h (elf_obj_tdata): Use ENUM_BITFIELD on object_id,
1972 dyn_lib_class and has_gnu_symbols. Change bad_symtab to bitfield.
1973 Add a has_no_copy_on_protected bitfield.
1974 (elf_has_no_copy_on_protected): New.
1975 * elf-properties.c (_bfd_elf_parse_gnu_properties): Set
1976 elf_has_no_copy_on_protected for GNU_PROPERTY_NO_COPY_ON_PROTECTED.
1977 (elf_merge_gnu_property_list): Likewise.
1978 (_bfd_elf_link_setup_gnu_properties): Set extern_protected_data
1979 to FALSE for elf_has_no_copy_on_protected.
1980 * elf32-i386.c (SYMBOL_NO_COPYRELOC): New.
1981 (elf_i386_link_hash_entry): Add def_protected.
1982 (elf_i386_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
1983 when checking info->nocopyreloc.
1984 (elf_i386_link_setup_gnu_properties): Don't set
1985 extern_protected_data here.
1986 (elf_i386_merge_symbol_attribute): New function.
1987 (elf_backend_merge_symbol_attribute): New.
1988 * elf64-x86-64.c (SYMBOL_NO_COPYRELOC): New.
1989 (elf_x86_64_link_hash_entry): Add def_protected.
1990 (elf_x86_64_need_pic): Report protected symbol for def_protected.
1991 (elf_x86_64_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
1992 when checking info->nocopyreloc.
1993 (elf_x86_64_relocate_section): Also check for R_X86_64_PC32
1994 relocation run-time overflow and unresolvable R_X86_64_32S
1995 relocation against protected data symbol defined in shared object
1996 with GNU_PROPERTY_NO_COPY_ON_PROTECTED.
1997 (elf_x86_64_link_setup_gnu_properties): Don't set
1998 extern_protected_data here.
1999 (elf_x86_64_merge_symbol_attribute): New function.
2000 (elf_backend_merge_symbol_attribute): New.
2002 2017-08-26 Alan Modra <amodra@gmail.com>
2004 * elf32-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
2005 (ppc_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
2006 (ppc_elf_relocate_section): Comment fix.
2007 * elf64-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
2008 (ppc64_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
2009 Support dynamic relocs for TPREL16 when non-pic too.
2010 (dec_dynrel_count): Adjust TPREL16 handling as per check_relocs.
2011 (ppc64_elf_relocate_section): Support dynamic relocs for TPREL16
2014 2017-08-25 H.J. Lu <hongjiu.lu@intel.com>
2016 * elf32-i386.c (elf_i386_link_hash_entry): Remove redundant
2017 "symbol" in comments.
2018 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Likewise.
2020 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
2023 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for
2024 R_X86_64_PC32 relocation run-time overflow and unresolvable
2025 R_X86_64_32S relocation with -z nocopyreloc.
2027 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
2029 * elf32-i386.c (elf_i386_check_relocs): Revert the last change.
2030 Undefined symbols may not have a type.
2031 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
2033 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
2035 * elf64-x86-64.c (elf_x86_64_need_pic): Add an argument for
2036 bfd_link_info. Report shared, PIE or PDE object based on
2038 (elf_x86_64_check_relocs): Update elf_x86_64_need_pic call.
2039 (elf_x86_64_relocate_section): Likewise.
2041 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
2043 * elf32-i386.c (elf_i386_check_relocs): Increment PLT count only
2044 for function symbols.
2045 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
2047 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
2049 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set
2050 extern_protected_data to FALSE if GNU_PROPERTY_NO_COPY_ON_PROTECTED
2051 is set on any input relocatable file.
2052 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
2054 2017-08-23 Alan Modra <amodra@gmail.com>
2057 * elf64-ppc.c (ensure_undef_dynamic): Rename from
2058 ensure_undefweak_dynamic. Handle undefined too.
2059 * elf32-ppc.c (ensure_undef_dynamic): Likewise.
2060 * elf32-hppa.c (ensure_undef_dynamic): Likewise.
2061 (allocate_dynrelocs): Discard undefined non-default visibility
2062 relocs first. Make undefined syms dynamic. Tidy goto.
2064 2017-08-21 Alan Modra <amodra@gmail.com>
2065 H.J. Lu <hongjiu.lu@intel.com>
2068 * elf-bfd.h (SYMBOLIC_BIND): Return TRUE for __start/__stop symbols.
2069 * elflink.c (bfd_elf_define_start_stop): Rewrite.
2071 2017-08-21 Hans-Peter Nilsson <hp@bitrange.com>
2074 * elf64-mmix.c (mmix_elf_relax_section): Correct handling of
2075 undefined weak symbols.
2077 2017-08-18 Nick Clifton <nickc@redhat.com>
2080 * tekhex.c (getsym): Fix check for source pointer walking off the
2081 end of the input buffer.
2083 2017-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
2086 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Skip IFUNC
2087 relocations in debug sections, change abort to _bfd_error_handler.
2089 2017-08-14 Nick Clifton <nickc@redhat.com>
2092 * elf.c (setup_group): Check for an empty or very small group
2094 * po/bfd.pot: Regenerate.
2096 2017-08-14 Alan Modra <amodra@gmail.com>
2099 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't add
2100 alignment padding here.
2101 * elflink.c (bfd_elf_discard_info): Add .eh_frame padding here
2102 in a reverse pass over sections.
2104 2017-08-11 H.J. Lu <hongjiu.lu@intel.com>
2107 * elf32-i386.c (elf_i386_get_synthetic_symtab): Allocate space
2108 for @plt suffixes first.
2109 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
2111 2017-08-08 Nick Clifton <nickc@redhat.com>
2114 * elf-attrs.c (_bfd_elf_parse_attributes): Complain about very
2115 small section lengths.
2116 * elf.c (_bfd_elf_setup_sections): Skip empty entries in the group
2118 (elfcore_grok_freebsd_prstatus): Add checks to make sure that
2119 there is enough data present in the note.
2121 2017-08-08 Alan Modra <amodra@gmail.com>
2124 * elf32-microblaze.c (microblaze_elf_check_relocs): Don't bump
2125 got.refcount for GOTOFF relocs, just create .got section.
2127 2017-08-07 H.J. Lu <hongjiu.lu@intel.com>
2129 * elflink.c (elf_link_add_object_symbols): Move common symbol
2130 check after bed->common_definition.
2132 2017-08-07 Alan Modra <amodra@gmail.com>
2135 * elflink.c (bfd_elf_final_link): Don't segfault when sections
2136 needed to define various dynamic tags have been discarded.
2138 2017-08-07 Nick Clifton <nickc@redhat.com>
2141 * elf32-i386.c (elf_i386_link_setup_gnu_properties): If the dynobj
2142 has not been set then use the bfd returned by
2143 _bfd_elf_link_setup_gnu_properties. If that is null then search
2144 through all the input bfds selecting the first normal, ELF format
2146 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
2148 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
2150 * elf32-i386.c (elf_i386_link_hash_entry): Change tls_get_addr
2152 (elf_i386_link_hash_newfunc): Initialize tls_get_addr to 0.
2153 (elf_i386_check_tls_transition): Check tls_get_addr directly.
2154 (elf_i386_convert_load_reloc): Update tls_get_addr check.
2155 (elf_i386_link_check_relocs): New function.
2156 (bfd_elf32_bfd_link_check_relocs): New.
2157 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Change tls_get_addr
2159 (elf_x86_64_link_hash_newfunc): Initialize tls_get_addr to 0.
2160 (elf_x86_64_check_tls_transition): Check tls_get_addr directly.
2161 (elf_x86_64_convert_load_reloc): Update tls_get_addr check.
2162 (elf_x86_64_link_check_relocs): New function.
2163 (bfd_elf64_bfd_link_check_relocs): New.
2164 (bfd_elf32_bfd_link_check_relocs): Likewise.
2166 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
2169 * elflink.c (elf_link_add_object_symbols): Treat common symbol
2170 as undefined for --no-define-common.
2172 2017-08-05 Alan Modra <amodra@gmail.com>
2174 * elf32-hppa.c (elf32_hppa_set_gp): Don't require an
2175 hppa_link_hash_table.
2177 2017-08-02 Max Filippov <jcmvbkbc@gmail.com>
2179 * xtensa-isa.c (xtensa_isa_init): Don't update lookup table
2180 entries for sysregs with negative indices.
2182 2017-08-01 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2184 * elf32-s390.c (elf_s390_finish_dynamic_sections): Skip if it
2185 isn't the S/390 specific elf data.
2186 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
2188 2017-07-31 Kuan-Lin Chen <rufus@andestech.com>
2190 * elfxx-riscv.c (riscv_elf_add_sub_reloc): New function.
2191 * (howto_table) [R_RISCV_ADD8]: Use riscv_elf_add_sub_reloc.
2192 [R_RISCV_ADD16]: Likewise.
2193 [R_RISCV_ADD32]: Likewise.
2194 [R_RISCV_ADD64]: Likewise.
2195 [R_RISCV_SUB6]: Likewise.
2196 [R_RISCV_SUB8]: Likewise.
2197 [R_RISCV_SUB16]: Likewise.
2198 [R_RISCV_SUB32]: Likewise.
2199 [R_RISCV_SUB64]: Likewise.
2201 2017-07-31 Alan Modra <amodra@gmail.com>
2203 * elf64-ppc.c (ppc64_elf_tls_setup): Warn on --plt-localentry
2204 without ld.so checks.
2206 2017-07-29 Alan Modra <amodra@gmail.com>
2209 * elf64-ppc.c (struct ppc_link_hash_entry): Add non_zero_localentry.
2210 (ppc64_elf_merge_symbol): Set non_zero_localentry.
2211 (is_elfv2_localentry0): Test non_zero_localentry.
2212 (ppc64_elf_tls_setup): Default to --no-plt-localentry.
2214 2017-07-28 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2216 * elf32-s390.c (elf_s390_finish_dynamic_sections): Add NULL
2217 pointer check for htab->elf.irelplt.
2218 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
2220 2017-07-27 Nick Clifton <nickc@redhat.com>
2223 * mach-o.c (bfd_mach_o_read_symtab_strtab): Fail if the symtab
2225 * nlmcode.h (nlm_swap_auxiliary_headers_in): Replace assertion
2227 * section.c (bfd_make_section_with_flags): Fail if the name or bfd
2229 * vms-alpha.c (bfd_make_section_with_flags): Correct computation
2231 (evax_bfd_print_emh): Check for invalid string lengths.
2233 2017-07-25 Nick Clifton <nickc@redhat.com>
2235 * po/fr.po: Updated French translation.
2237 2017-07-25 Benjamin Green <bengreen5mx@gmail.com>
2240 * elf32-msp430.c (msp430_elf_relax_section): Allow conversion of
2241 16-bit absolute branches into 10-bit pc-relative branches on the
2242 MSP430 as well as the MSP430X.
2244 2017-07-25 Alan Modra <amodra@gmail.com>
2246 * elf64-ppc.c (struct map_stub): Add tls_get_addr_opt_bctrl.
2247 (stub_eh_frame_size): New function.
2248 (ppc_size_one_stub): Set group tls_get_addr_opt_bctrl.
2249 (group_sections): Init group tls_get_addr_opt_bctrl.
2250 (ppc64_elf_size_stubs): Update sizing and initialization of
2251 .eh_frame. Iteration over stubs via group list.
2252 (ppc64_elf_build_stubs): Iterate over stubs via group list.
2253 (ppc64_elf_finish_dynamic_sections): Update finalization of
2256 2017-07-24 Nick Clifton <nickc@redhat.com>
2259 * mach-o.c (bfd_mach_o_canonicalize_relocs): Pass the base address
2260 of the relocs to the canonicalize_one_reloc routine.
2261 * mach-o.h (struct bfd_mach_o_backend_data): Update the prototype
2262 for the _bfd_mach_o_canonicalize_one_reloc field.
2263 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add
2264 res_base parameter. Use to check for corrupt pair relocs.
2265 * mach-o-aarch64.c (bfd_mach_o_arm64_canonicalize_one_reloc):
2267 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc):
2269 * mach-o-x86-64.c (bfd_mach_o_x86_64_canonicalize_one_reloc):
2272 * vms-alpha.c (_bfd_vms_slurp_eihd): Make sure that there is
2273 enough data in the record before attempting to parse it.
2274 (_bfd_vms_slurp_eeom): Likewise.
2276 (_bfd_vms_slurp_egsd): Check for an invalid section index.
2277 (image_set_ptr): Likewise.
2278 (alpha_vms_slurp_relocs): Likewise.
2280 (alpha_vms_object_p): Check for a truncated record.
2282 2017-07-24 Nick Clifton <nickc@redhat.com>
2285 * reloc.c (_bfd_unrecognized_reloc): New function. Reports
2286 an unrecognized reloc and sets the bfd_error value.
2287 * libbfd.h: Regenerate.
2288 * elf32-arm.c (elf32_arm_final_link_relocate): Use the new
2290 * elf32-i386.c (elf_i386_relocate_section): Likewise.
2291 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
2292 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
2293 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise.
2294 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
2296 2017-07-23 Alan Modra <amodra@gmail.com>
2298 * elf64-ppc.c (ppc64_elf_size_stubs): Correct advance to
2301 2017-07-19 Szabolcs Nagy <szabolcs.nagy@arm.com>
2304 * elfnn-aarch64.c (elfNN_aarch64_reloc_type_class): Return
2305 reloc_class_ifunc for ifunc symbols.
2307 2017-07-19 Nick Clifton <nickc@redhat.com>
2310 * archive.c (bfd_generic_archive_p): If the bfd does not have the
2311 correct magic bytes at the start, set the error to wrong format
2312 and clear the format selector before returning NULL.
2314 2017-07-19 Nick Clifton <nickc@redhat.com>
2317 * coff-rs6000.c (_bfd_strntol): New function.
2318 (_bfd_strntoll): New function.
2319 (GET_VALUE_IN_FIELD): New macro.
2320 (EQ_VALUE_IN_FIELD): new macro.
2321 (_bfd_xcoff_slurp_armap): Use new macros.
2322 (_bfd_xcoff_archive_p): Likewise.
2323 (_bfd_xcoff_read_ar_hdr): Likewise.
2324 (_bfd_xcoff_openr_next_archived_file): Likewise.
2325 (_bfd_xcoff_stat_arch_elt): Likewise.
2326 * coff64-rs6000.c (_bfd_strntol): New function.
2327 (_bfd_strntoll): New function.
2328 (GET_VALUE_IN_FIELD): New macro.
2329 (xcoff64_slurp_armap): Use new macros.
2331 2017-07-19 Claudiu Zissulescu <claziss@synopsys.com>
2332 John Eric Martin <John.Martin@emmicro-us.com>
2334 * bfd-in2.h: Regenerate.
2335 * libbfd.h: Regenerate.
2336 * elf32-arc.c (JLI): Define.
2337 * reloc.c: Add JLI relocations.
2339 2017-07-18 Nick Clifton <nickc@redhat.com>
2342 * coff-sh.c: Fix spelling typos.
2343 * compress.c: Likewise.
2344 * cpu-pdp11.c: Likewise.
2345 * ecofflink.c: Likewise.
2346 * elf-m10300.c: Likewise.
2348 * elf32-arm.c: Likewise.
2349 * elf32-m68k.c: Likewise.
2350 * elf32-nds32.c: Likewise.
2351 * elf32-ppc.c: Likewise.
2352 * elf32-sh.c: Likewise.
2353 * elf32-v850.c: Likewise.
2354 * elf64-ppc.c: Likewise.
2355 * elf64-x86-64.c: Likewise.
2356 * elflink.c: Likewise.
2357 * elfnn-aarch64.c: Likewise.
2358 * elfxx-mips.c: Likewise.
2360 * sunos.c: Likewise.
2361 * vms-alpha.c: Likewise.
2362 * xcofflink.c: Likewise.
2364 2017-07-18 Nick Clifton <nickc@redhat.com>
2367 * coffcode.h (handle_COMDAT): Replace abort with an error message
2370 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
2373 * elf64-x86-64.c (elf_x86_64_relocate_section): Limit PIC check
2376 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
2378 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
2380 2017-07-16 Alan Modra <amodra@gmail.com>
2382 * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimize
2383 __tls_index GOT entries when using __tls_get_addr_opt stub.
2384 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2386 2017-07-12 Alan Modra <amodra@gmail.com>
2388 * po/es.po: Update from translationproject.org/latest/bfd/.
2389 * po/fi.po: Likewise.
2390 * po/fr.po: Likewise.
2391 * po/id.po: Likewise.
2392 * po/ja.po: Likewise.
2393 * po/ro.po: Likewise.
2394 * po/ru.po: Likewise.
2395 * po/sr.po: Likewise.
2396 * po/sv.po: Likewise.
2397 * po/tr.po: Likewise.
2398 * po/uk.po: Likewise.
2399 * po/vi.po: Likewise.
2400 * po/zh_CN.po: Likewise.
2401 * po/hr.po: New file from translationproject.org.
2402 * configure.ac (ALL_LINGUAS): Add hr. Sort.
2403 * configure: Regenerate.
2405 2017-07-12 Nick Clifton <nickc@redhat.com>
2407 Fix compile time warnings using gcc 7.1.1.
2408 * elf32-xtensa.c (elf_xtensa_get_plt_section): Increase length of
2410 (elf_xtensa_get_gotplt_section): Increase length of got_name
2412 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add a
2413 default return of FALSE.
2414 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc): Add a
2415 default return of FALSE.
2417 2017-07-12 Alan Modra <amodra@gmail.com>
2419 * binary.c (binary_set_section_contents): Don't print filepos in
2421 (coff_write_object_contents): Cast size_t for error message.
2422 (coff_slurp_line_table): Don't use bfd_vma symndx.
2423 (coff_slurp_reloc_table): Remove unneeded cast.
2424 * dwarf2.c (read_section): Cast bfd_int64_t to long long for
2426 (find_abstract_instance_name): Likewise.
2427 * elf32-arm.c (arm_type_of_stub): Correct error arg order.
2428 (bfd_elf32_arm_stm32l4xx_erratum_scan): Don't cast error arg.
2429 (elf32_arm_check_relocs): Make r_symndx an int.
2430 * elf32-cris.c (cris_elf_check_relocs): Delete extraneous %s in
2432 * elf32-metag.c (elf_metag_relocate_section): Delete extra error
2434 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Rewrite bogus
2436 * elf32-i386.c (elf_i386_check_relocs): Make r_symndx an int.
2437 * elf32-s390.c (elf_s390_check_relocs): Likewise.
2438 * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
2439 * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
2440 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
2441 * elf64-s390.c (elf_s390_check_relocs): Likewise.
2442 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
2443 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Likewise.
2444 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
2445 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
2446 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
2447 * elf64-mmix.c (_bfd_mmix_after_linker_allocation): Cast size_t args
2448 and use %lu for error message.
2449 * elflink.c (elf_link_adjust_relocs): Delete extra error message arg.
2450 * mmo.c (mmo_scan): Make stab_loc a file_ptr. Cast expression for
2453 * elf32-arm.c (elf32_arm_tls_relax): Correct format string and args
2455 (elf32_arm_final_link_relocate): Likewise.
2456 * coff-arm.c (bfd_arm_process_before_allocation): Likewise.
2457 * coffcode.h (styp_to_sec_flags): Likewise.
2458 * cofflink.c (_bfd_coff_write_global_sym): Likewise.
2459 * ecoff.c (_bfd_ecoff_slurp_symbol_table): Likewise.
2460 * elf32-arc.c (arc_elf_merge_private_bfd_data): Likewise.
2461 * elf32-bfin.c (bfinfdpic_check_relocs): Likewise.
2462 (elf32_bfin_merge_private_bfd_data): Likewise.
2463 * elf32-cris.c (cris_elf_relocate_section): Likewise.
2464 * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
2465 * elf32-i370.c (i370_elf_merge_private_bfd_data): Likewise.
2466 (i370_elf_relocate_section): Likewise.
2467 * elf32-iq2000.c (iq2000_elf_merge_private_bfd_data): Likewise.
2468 * elf32-m32c.c (m32c_elf_merge_private_bfd_data): Likewise.
2469 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise.
2470 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
2471 * elf32-mep.c (mep_elf_merge_private_bfd_data): Likewise.
2472 * elf32-mt.c (mt_elf_merge_private_bfd_data): Likewise.
2473 * elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.
2474 * elfxx-mips.c (mips_elf_merge_obj_e_flags): Likewise.
2475 (_bfd_mips_elf_merge_private_bfd_data): Likewise.
2476 * ieee.c (ieee_write_id, read_id): Likewise.
2477 * mach-o.c (bfd_mach_o_write_contents): Likewise.
2478 (bfd_mach_o_layout_commands, bfd_mach_o_read_section_32): Likewise.
2479 (bfd_mach_o_read_section_64, bfd_mach_o_read_symtab_symbol): Likewise.
2480 (bfd_mach_o_read_command, bfd_mach_o_header_p): Likewise.
2481 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Likewise.
2482 * stabs.c (_bfd_link_section_stabs): Likewise.
2484 * coff-arm.c (coff_arm_relocate_section): Use L modifier in error
2486 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
2487 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
2488 * coff-rs6000.c (xcoff_reloc_type_toc): Likewise.
2489 * coff-sh.c (sh_relax_section): Likewise.
2490 (sh_relax_delete_bytes, sh_swap_insns): Likewise.
2491 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
2492 * coffcode.h (coff_slurp_reloc_table): Likewise.
2493 * coffgen.c (_bfd_coff_get_external_symbols): Likewise.
2494 (_bfd_coff_read_string_table): Likewise.
2495 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
2496 * compress.c (bfd_get_full_section_contents): Likewise.
2497 * dwarf2.c (read_formatted_entries, decode_line_info): Likewise.
2498 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
2499 * elf.c (bfd_elf_string_from_elf_section): Likewise.
2500 * elf32-arc.c (arc_special_overflow_checks): Likewise.
2501 * elf32-arm.c (elf32_arm_tls_relax): Likewise.
2502 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Likewise.
2503 (elf32_arm_write_section): Likewise.
2504 * elf32-bfin.c (bfin_relocate_section): Likewise.
2505 (bfinfdpic_relocate_section): Likewise.
2506 * elf32-hppa.c (hppa_build_one_stub): Likewise.
2507 (final_link_relocate, elf32_hppa_relocate_section): Likewise.
2508 * elf32-i386.c (elf_i386_tls_transition): Likewise.
2509 (elf_i386_relocate_section): Likewise.
2510 * elf32-ip2k.c (ip2k_final_link_relocate): Likewise.
2511 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise.
2512 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
2513 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
2514 * elf32-metag.c (elf_metag_relocate_section): Likewise.
2515 * elf32-nds32.c (unrecognized_reloc_msg): Likewise.
2516 (nds32_elf_relax_longcall1, nds32_elf_relax_longcall2): Likewise.
2517 (nds32_elf_relax_longcall3, nds32_elf_relax_longjump1): Likewise.
2518 (nds32_elf_relax_longjump2, nds32_elf_relax_longjump3): Likewise.
2519 (nds32_elf_relax_longcall4, nds32_elf_relax_longcall5): Likewise.
2520 (nds32_elf_relax_longcall6, nds32_elf_relax_longjump4): Likewise.
2521 (nds32_elf_relax_longjump5, nds32_elf_relax_longjump6): Likewise.
2522 (nds32_elf_relax_longjump7, nds32_elf_relax_loadstore): Likewise.
2523 (nds32_elf_relax_ptr, nds32_elf_ex9_build_hash_table): Likewise.
2524 * elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
2525 * elf32-rx.c (UNSAFE_FOR_PID): Likewise.
2526 * elf32-s390.c (invalid_tls_insn, elf_s390_relocate_section): Likewise.
2527 * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
2528 * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
2529 * elf32-sh.c (sh_elf_relax_section): Likewise.
2530 (sh_elf_relax_delete_bytes, sh_elf_swap_insns): Likewise.
2531 (sh_elf_relocate_section): Likewise.
2532 * elf32-sh64.c (shmedia_prepare_reloc): Likewise.
2533 * elf32-spu.c (spu_elf_relocate_section): Likewise.
2534 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
2535 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
2536 * elf32-v850.c (v850_elf_relax_section): Likewise.
2537 * elf32-vax.c (elf_vax_check_relocs): Likewise.
2538 (elf_vax_relocate_section): Likewise.
2539 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
2540 (extend_ebb_bounds_forward, extend_ebb_bounds_backward): Likewise.
2541 (compute_text_actions, compute_ebb_proposed_actions): Likewise.
2542 (do_fix_for_relocatable_link): Likewise.
2543 * elf64-alpha.c (elf64_alpha_relax_got_load): Likewise.
2544 (elf64_alpha_relax_with_lituse): Likewise.
2545 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Likewise.
2546 (elf_hppa_final_link_relocate): Likewise.
2547 * elf64-ia64-vms.c (elf64_ia64_relax_section): Likewise.
2548 (elf64_ia64_choose_gp, elf64_ia64_relocate_section): Likewise.
2549 (elf64_vms_link_add_object_symbols): Likewise.
2550 * elf64-mmix.c (mmix_elf_perform_relocation): Likewise.
2551 (mmix_final_link_relocate): Likewise.
2552 * elf64-s390.c (invalid_tls_insn): Likewise.
2553 (elf_s390_relocate_section): Likewise.
2554 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
2555 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
2556 (elf_x86_64_relocate_section): Likewise.
2557 * elfcode.h (elf_slurp_symbol_table): Likewise.
2558 * elfcore.h (elf_core_file_p): Likewise.
2559 * elflink.c (elf_link_read_relocs_from_section): Likewise.
2560 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
2561 (elfNN_aarch64_relocate_section): Likewise.
2562 * elfnn-ia64.c (elfNN_ia64_relax_section): Likewise.
2563 (elfNN_ia64_choose_gp, elfNN_ia64_relocate_section): Likewise.
2564 * elfnn-riscv.c (riscv_elf_relocate_section): Likewise.
2565 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
2566 (_bfd_mips_elf_relocate_section): Likewise.
2567 (_bfd_mips_elf_finish_dynamic_symbol, mips_finish_exec_plt): Likewise.
2568 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
2569 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
2570 * ieee.c (ieee_slurp_external_symbols): Likewise.
2571 * ihex.c (ihex_write_object_content): Likewise.
2572 * mach-o.c (bfd_mach_o_build_exec_seg_command): Likewise.
2573 * merge.c (_bfd_merged_section_offset): Likewise.
2574 * mmo.c (mmo_write_loc_chunk): Likewise.
2575 (mmo_write_object_contents): Likewise.
2576 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Likewise.
2577 * stabs.c (_bfd_link_section_stabs): Likewise.
2578 * xcofflink.c (xcoff_link_add_symbols, xcoff_find_tc0): Likewise.
2580 2017-07-11 Alan Modra <amodra@gmail.com>
2582 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo.
2584 2017-07-11 Alan Modra <amodra@gmail.com>
2586 * elf32-ppc.c (ppc_elf_relocate_section): Emit "unexpected
2587 instruction" error using _bfd_error_handler, not einfo.
2589 2017-07-10 Nick Clifton <nickc@redhat.com>
2591 * coffcode.h (coff_slurp_symbol_table): Do not include an entry
2592 for C_AIX_WEAKEXT if it has the same value as C_WEAKEXT.
2594 2017-07-07 John Baldwin <jhb@FreeBSD.org>
2596 * elf.c (elfcore_grok_freebsd_note): Handle NT_FREEBSD_PTLWPINFO.
2598 2017-07-07 Alan Modra <amodra@gmail.com>
2600 * coffcode.h (coff_slurp_symbol_table): Handle C_AIX_WEAKEXT.
2602 2017-07-07 Alan Modra <amodra@gmail.com>
2604 * bfd.c (_doprnt): Replace "L" with "ll" when printing bfd_vma
2605 as long long. Move code replacing "ll" with "I64", and simplify.
2607 2017-07-06 H.J. Lu <hongjiu.lu@intel.com>
2609 * bfd.c (_doprnt): Convert 'L' to 'l' when setting wide_width
2612 2017-07-05 H.J. Lu <hongjiu.lu@intel.com>
2614 * dwarf2.c (line_info_add_include_dir_stub): Replace time with
2616 (line_info_add_file_name): Likewise.
2617 (decode_line_info): Likewise.
2619 2017-07-04 Tristan Gingold <gingold@adacore.com>
2621 * version.m4: Bump version to 2.29.51
2622 * configure: Regenerate.
2624 2017-07-04 Jiong Wang <jiong.wang@arm.com>
2626 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Remove the
2627 sanity check at the head of this function.
2629 2017-07-04 Jan Kratochvil <jan.kratochvil@redhat.com>
2631 * dwarf2.c (struct dwarf2_debug): Add fields dwarf_line_str_buffer and
2632 dwarf_line_str_size.
2633 (struct attr_abbrev): Add field implicit_const.
2634 (dwarf_debug_sections): Add .debug_line_str.
2635 (enum dwarf_debug_section_enum): Add debug_line_str and debug_max.
2636 (dwarf_debug_section_assert): Add static assertion.
2637 (read_indirect_line_string): New.
2638 (read_abbrevs): Support DW_FORM_implicit_const.
2639 (is_str_attr): Support DW_FORM_line_strp.
2640 (read_attribute_value): Support DW_FORM_line_strp and
2641 DW_FORM_implicit_const.
2642 (read_attribute): Support DW_FORM_implicit_const.
2643 (line_info_add_include_dir, line_info_add_include_dir_stub):
2644 (line_info_add_file_name, read_formatted_entries): New.
2645 (decode_line_info, parse_comp_unit): Support DWARF 5.
2646 (_bfd_dwarf2_cleanup_debug_info): Free dwarf_line_str_buffer.
2648 2017-07-03 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
2650 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove the
2651 abort statement that was put for symbols that are not dynamic.
2653 2017-07-03 Tristan Gingold <gingold@adacore.com>
2655 * po/bfd.pot: Regenerate
2657 2017-07-03 Alan Modra <amodra@gmail.com>
2659 * bfd.c (_doprnt): Rewrite "ll" and "L" modifiers to "I64" for
2660 __MSVCRT__. Support "L" modifier for bfd_vma. Formatting.
2661 * elf.c (setup_group): Use "Lx" to print sh_size.
2662 (_bfd_elf_setup_sections): Remove unnecessary cast and print
2663 unknown section type in hex.
2664 (copy_special_section_fields): Style fix.
2665 (bfd_section_from_shdr): Correct format for sh_link. Use a
2666 common error message for all the variants of unrecognized
2668 (assign_file_positions_for_load_sections): Use "Lx" for lma
2669 adjust error message.
2670 (assign_file_positions_for_non_load_sections): Formatting.
2671 (rewrite_elf_program_header): Formatting. Use "Lx" for
2672 bfd_vma values in error messages.
2673 * elfcode.h (elf_slurp_reloc_table_from_section): Cast
2674 ELF_R_SYM value to type expected by format.
2675 * elflink.c (elf_link_read_relocs_from_section): Use "Lx"
2677 (elf_link_add_object_symbols): Use "Lu" for symbol sizes.
2678 (elf_link_input_bfd): Use "Lx" for r_info.
2679 (bfd_elf_gc_record_vtinherit): Use "Lx" for offset.
2681 2017-07-03 Alan Modra <amodra@gmail.com>
2683 * bfd.c (bfd_scan_vma): Don't use long long unless HAVE_LONG_LONG.
2684 * coff-rs6000.c (FMT20): Handle hosts with 64-bit long and
2685 Microsoft C library variant of long long format specifier.
2686 (PRINT20): Cast value to bfd_uint64_t not long long.
2687 * coffcode.h (coff_print_aux): Use BFD_VMA_FMT.
2688 * coff-x86_64.c (coff_amd64_reloc): Use bfd_uint64_t rather than
2689 long long. Don't cast to bfd_vma.
2690 * elf32-score.c (score3_bfd_getl48): Likewise.
2691 * vms-alpha.c (_bfd_vms_slurp_eisd): Likewise.
2693 2017-07-03 Alan Modra <amodra@gmail.com>
2695 * elf.c (_bfd_elf_print_private_bfd_data): Use BFD_VMA_FMT to
2697 (bfd_elf_print_symbol): Don't cast symbol->flags.
2698 (_bfd_elf_symbol_from_bfd_symbol): Likewise.
2699 * elf32-ppc.c (ppc_elf_begin_write_processing): Correct
2700 _bfd_error_handler argument order.
2701 (ppc_elf_merge_private_bfd_data): Don't cast flags.
2703 2017-07-03 Alan Modra <amodra@gmail.com>
2705 * configure.ac: Invoke AC_CHECK_TYPES for long long. Invoke
2706 AC_TYPE_LONG_DOUBLE.
2707 * configure: Regenerate.
2708 * config.in: Regenerate.
2710 2017-06-29 Andrew Waterman <andrew@sifive.com>
2712 * elfnn-riscv.c (riscv_elf_adjust_dynamic_symbol): Fix TLS copy
2715 2017-06-29 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
2717 * elfxx-sparc.c (allocate_dynrelocs): Don't make a symbol dynamic
2718 unless it is undefined weak.
2719 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Set the flag
2720 relative_reloc to direct non-dynamic symbols to R_SPARC_RELATIVE
2722 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): If symbol
2723 is not dynamic in PIC, abort.
2725 2017-06-29 Jiong Wang <jiong.wang@arm.com>
2728 * elfnn-aarch64.c (elfNN_aarch64_allocate_dynrelocs): Only make
2729 undefined weak symbols into dynamic.
2730 (elfNN_aarch64_final_link_relocate): Generate runtime RELATIVE
2731 relocation for non-dynamic symbols.
2732 (elfNN_aarch64_finish_dynamic_symbol): Add sanity check.
2734 2017-06-29 Jiong Wang <jiong.wang@arm.com>
2736 * elfnn-aarch64.c (aarch64_relocation_aginst_gp_p): New function.
2737 (elfNN_aarch64_final_link_relocate): Delete duplicated code for
2738 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15, BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC,
2739 BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
2740 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Optimize the
2743 2017-06-29 Andreas Arnez <arnez@linux.vnet.ibm.com>
2745 * elf-bfd.h (elfcore_write_s390_gs_cb): Add prototype.
2746 (elfcore_write_s390_gs_bc): Likewise.
2747 * elf.c (elfcore_grok_s390_gs_cb): New function.
2748 (elfcore_grok_s390_gs_bc): New function.
2749 (elfcore_grok_note): Call them.
2750 (elfcore_write_s390_gs_cb): New function.
2751 (elfcore_write_s390_gs_bc): New function.
2752 (elfcore_write_register_note): Call them.
2754 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
2756 * libbfd.c (_bfd_generic_get_section_contents): Don't call
2757 bfd_get_file_size. Check archive element size.
2758 (_bfd_generic_get_section_contents_in_window): Likewise.
2760 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
2762 * bfd-in2.h: Regenerated.
2763 * bfdio.c (bfd_get_size): Change return type to ufile_ptr.
2764 (bfd_get_file_size): Likewise.
2766 2017-06-28 Maciej W. Rozycki <macro@imgtec.com>
2767 Matthew Fortune <matthew.fortune@imgtec.com>
2769 * archures.c (bfd_mach_mips_interaptiv_mr2): New macro.
2770 * cpu-mips.c (I_interaptiv_mr2): New enum value.
2771 (arch_info_struct): Add "mips:interaptiv-mr2" entry.
2772 * elfxx-mips.c (_bfd_elf_mips_mach) <E_MIPS_MACH_IAMR2>: New
2774 (mips_set_isa_flags) <bfd_mach_mips_interaptiv_mr2>: Likewise.
2775 (bfd_mips_isa_ext) <bfd_mach_mips_interaptiv_mr2>: Likewise.
2776 (print_mips_isa_ext) <AFL_EXT_INTERAPTIV_MR2>: Likewise.
2777 (mips_mach_extensions): Add `bfd_mach_mipsisa32r3' and
2778 `bfd_mach_mips_interaptiv_mr2' entries.
2779 * bfd-in2.h: Regenerate.
2781 2017-06-27 Nick Clifton <nickc@redhat.com>
2783 * tekhex.c (pass_over): Revert accidental conversion of a local
2784 array to a static array.
2786 2017-06-27 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
2789 * elf32-avr.c (elf32_avr_adjust_diff_reloc_value): Adjust
2790 reloc addend if necessary. Adjust diff only if
2791 shrinked_insn_address < end_address.
2793 2017-06-27 Alan Modra <amodra@gmail.com>
2796 * libbfd.c (_bfd_generic_get_section_contents): Warning fix.
2797 (_bfd_generic_get_section_contents_in_window): Likewise.
2799 2017-06-26 Kuan-Lin Chen <rufus@andestech.com>
2801 * elfnn-riscv.c (perform_relocation): Support the new
2802 R_RISCV_32_PCREL relocation.
2803 (riscv_elf_relocate_section): Likewise.
2804 * elfxx-riscv.c (howto_table): Likewise.
2805 (riscv_reloc_map): Likewise.
2806 * bfd-in2.h (BFD_RELOC_RISCV_32_PCREL): New relocation.
2807 * libbfd.h: Regenerate.
2809 2017-06-27 Alan Modra <amodra@gmail.com>
2812 * libbfd.c (_bfd_generic_get_section_contents): Delete abort.
2813 Use unsigned file pointer type, and remove cast.
2814 * libbfd.c (_bfd_generic_get_section_contents_in_window): Likewise.
2815 Add "count", not "sz".
2817 2017-06-26 Pedro Alves <palves@redhat.com>
2820 * libbfd.c (_bfd_generic_get_section_contents): Add "count", not
2823 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
2826 * libbfd.c (_bfd_generic_get_section_contents_in_window): Add
2829 2017-06-26 Maciej W. Rozycki <macro@imgtec.com>
2831 * cpu-mips.c (arch_info_struct): Mark the 4010 32-bit.
2832 * elfxx-mips.c (mips_set_isa_flags) <bfd_mach_mips4010>: Set
2833 E_MIPS_ARCH_2 rather than E_MIPS_ARCH_3 in `e_flags'.
2834 (mips_mach_extensions): Mark `bfd_mach_mips4010' as extending
2835 `bfd_mach_mips6000' rather than `bfd_mach_mips4000'.
2837 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
2840 * compress.c (bfd_get_full_section_contents): Don't check the
2842 * libbfd.c (_bfd_generic_get_section_contents): Check for and
2843 reject a section whose size + offset is greater than the size
2845 (_bfd_generic_get_section_contents_in_window): Likewise.
2847 2017-06-26 Nick Clifton <nickc@redhat.com>
2850 * tekhex.c (getvalue): Check for the source pointer exceeding the
2851 end pointer before the first byte is read.
2853 2017-06-26 Nick Clifton <nickc@redhat.com>
2856 * opncls.c (get_build_id): Check that the section is big enough
2857 to contain the whole note.
2858 * compress.c (bfd_get_full_section_contents): Check for and reject
2859 a section whose size is greater than the size of the entire file.
2860 * elf32-v850.c (v850_elf_copy_notes): Allow for the ouput to not
2861 contain a notes section.
2863 2017-06-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2865 * elf64-s390.c (elf_s390_additional_program_headers): Add NULL
2867 (elf_s390_modify_segment_map): Likewise.
2868 (bfd_elf_s390_set_options): Lisewise.
2870 2017-06-26 Alan Modra <amodra@gmail.com>
2872 * elflink.c (_bfd_elf_link_create_dynstrtab): Don't make dynobj
2874 (_bfd_elf_size_group_sections): Skip --just-syms bfds.
2875 (bfd_elf_size_dynamic_sections): Ignore .note.GNU-stack and
2876 .preinit_array on --just-syms bfds.
2877 (_bfd_elf_gc_mark_extra_sections): Skip --just-syms bfds.
2878 (elf_gc_sweep, bfd_elf_parse_eh_frame_entries): Likewise.
2879 (bfd_elf_gc_sections, bfd_elf_discard_info): Likewise.
2881 2017-06-25 Sergei Trofimovich <slyfox@gentoo.org>
2883 * elf.c (find_link): Bounds check "hint".
2885 2017-06-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
2887 * elf32-arm.c (using_thumb_only): Update list of architectures in
2888 BFD_ASSERT for which the logic is valid.
2889 (using_thumb2_bl): Likewise.
2890 (using_thumb2): Likewise and return true for ARMv8-R.
2891 (arch_has_arm_nop): Likewise.
2892 (tag_cpu_arch_combine): New v8r table for ARMv8-R Tag_CPU_arch
2893 merging logic. Update commentis for value 15 of v8m_baseline,
2894 v8m_mainline and v4t_plus_v6_m arrays. Use v8r array to decide
2895 merging of value 15 of Tag_CPU_arch.
2897 2017-06-23 Jiong Wang <jiong.wang@arm.com>
2899 * reloc.c (BFD_RELOC_AARCH64_ADR_GOTPAGE): Rename to
2900 BFD_RELOC_AARCH64_ADR_GOT_PAGE
2901 * bfd-in2.h: Regenerate.
2903 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2905 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Move
2906 the error_alignment label forward. Properly align program
2907 property note section.
2909 2017-06-22 Eric Christopher <echristo@gmail.com>
2911 * elf32-arm.c (elf32_arm_final_link_relocate): Use labs rather than
2912 abs to fix a truncation warning.
2914 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2916 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Resolve
2917 local undefined weak symbol to 0.
2918 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Likewise.
2920 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2922 * elf32-i386.c (elf_i386_merge_gnu_properties): If info->shstk
2923 is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
2924 (elf_i386_link_setup_gnu_properties): If info->shstk is set,
2925 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
2926 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): If
2927 info->shstk is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
2928 (elf_x86_64_link_setup_gnu_properties): If info->shstk is set,
2929 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
2931 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2933 * elf32-i386.c (elf_i386_lazy_ibt_plt0_entry): New.
2934 (elf_i386_lazy_ibt_plt_entry): Likewise.
2935 (elf_i386_pic_lazy_ibt_plt0_entry): Likewise.
2936 (elf_i386_non_lazy_ibt_plt_entry): Likewise.
2937 (elf_i386_pic_non_lazy_ibt_plt_entry): Likewise.
2938 (elf_i386_eh_frame_lazy_ibt_plt): Likewise.
2939 (elf_i386_lazy_plt_layout): Likewise.
2940 (elf_i386_non_lazy_plt_layout): Likewise.
2941 (elf_i386_link_hash_entry): Add plt_second.
2942 (elf_i386_link_hash_table): Add plt_second and
2943 plt_second_eh_frame.
2944 (elf_i386_allocate_dynrelocs): Use the second PLT if needed.
2945 (elf_i386_size_dynamic_sections): Use .plt.got unwind info for
2946 the second PLT. Check the second PLT.
2947 (elf_i386_relocate_section): Use the second PLT to resolve
2948 PLT reference if needed.
2949 (elf_i386_finish_dynamic_symbol): Fill and use the second PLT if
2951 (elf_i386_finish_dynamic_sections): Set sh_entsize on the
2952 second PLT. Generate unwind info for the second PLT.
2953 (elf_i386_plt_type): Add plt_second.
2954 (elf_i386_get_synthetic_symtab): Support the second PLT.
2955 (elf_i386_parse_gnu_properties): Support
2956 GNU_PROPERTY_X86_FEATURE_1_AND.
2957 (elf_i386_merge_gnu_properties): Support
2958 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
2959 on GNU_PROPERTY_X86_FEATURE_1_IBT
2960 (elf_i386_link_setup_gnu_properties): If info->ibt is set,
2961 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
2962 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
2963 is set on all relocatable inputs.
2964 * elf64-x86-64.c (elf_x86_64_lazy_ibt_plt_entry): New.
2965 (elf_x32_lazy_ibt_plt_entry): Likewise.
2966 (elf_x86_64_non_lazy_ibt_plt_entry): Likewise.
2967 (elf_x32_non_lazy_ibt_plt_entry): Likewise.
2968 (elf_x86_64_eh_frame_lazy_ibt_plt): Likewise.
2969 (elf_x32_eh_frame_lazy_ibt_plt): Likewise.
2970 (elf_x86_64_lazy_ibt_plt): Likewise.
2971 (elf_x32_lazy_ibt_plt): Likewise.
2972 (elf_x86_64_non_lazy_ibt_plt): Likewise.
2973 (elf_x32_non_lazy_ibt_plt): Likewise.
2974 (elf_x86_64_get_synthetic_symtab): Support the second PLT.
2975 (elf_x86_64_parse_gnu_properties): Support
2976 GNU_PROPERTY_X86_FEATURE_1_AND.
2977 (elf_x86_64_merge_gnu_properties): Support
2978 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
2979 on GNU_PROPERTY_X86_FEATURE_1_IBT
2980 (elf_x86_64_link_setup_gnu_properties): If info->ibt is set,
2981 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
2982 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
2983 is set on all relocatable inputs.
2985 2017-06-22 Nick Clifton <nickc@redhat.com>
2988 * som.c (setup_sections): NUL terminate the space_strings buffer.
2989 Check that the space.name field does not index beyond the end of
2990 the space_strings buffer.
2992 2017-06-21 Nick Clifton <nickc@redhat.com>
2995 * coff-sh.c (sh_reloc): Check for an out of range reloc.
2997 2017-06-21 Nick Clifton <nickc@redhat.com>
3000 * vms-misc.c (_bfd_vms_save_sized_string): Use unsigned int as
3001 type of the size parameter.
3002 (_bfd_vms_save_counted_string): Add second parameter - the maximum
3003 length of the counted string.
3004 * vms.h (_bfd_vms_save_sized_string): Update prototype.
3005 (_bfd_vms_save_counted_string): Likewise.
3006 * vms-alpha.c (_bfd_vms_slurp_eisd): Update calls to
3007 _bfd_vms_save_counted_string.
3008 (_bfd_vms_slurp_ehdr): Likewise.
3009 (_bfd_vms_slurp_egsd): Likewise.
3010 (Parse_module): Likewise.
3012 2017-06-21 Alan Modra <amodra@gmail.com>
3014 * elf64-ppc.c (ppc64_elf_size_stubs): Test for localentry:0 plt
3015 calls before tocsave calls.
3016 (ppc64_elf_relocate_section): Allow localentry:0 plt calls without
3019 2017-06-21 Nick Clifton <nickc@redhat.com>
3022 * reloc.c (bfd_generic_get_relocated_section_contents): Fail if
3023 bfd_get_full_section_contents returns no contents.
3025 2017-06-21 Nick Clifton <nickc@redhat.com>
3028 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an undersized
3031 2017-06-21 Nick Clifton <nickc@redhat.com>
3034 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an empty section
3036 (image_set_ptr): Likewise.
3037 (alpha_vms_fix_sec_rel): Likewise.
3038 (alpha_vms_slurp_relocs): Likewise.
3040 2017-06-21 Nick Clifton <nickc@redhat.com>
3043 * ieee.c (ieee_slurp_sections): Check for a NULL return from
3045 (ieee_archive_p): Likewise.
3046 (ieee_object_p): Likewise.
3048 2017-06-21 Nick Clifton <nickc@redhat.com>
3051 * elf.c (setup_group): Zero the group section pointer list after
3052 allocation so that loops can be caught. Check for NULL pointers
3053 when processing a group list.
3055 2017-06-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
3057 * elf-s390.h: New file.
3058 * elf64-s390.c (struct elf_s390_link_hash_table): Add params
3060 (elf_s390_additional_program_headers): New function.
3061 (elf_s390_modify_segment_map): New function.
3062 (bfd_elf_s390_set_options): New function.
3063 (elf_backend_additional_program_headers)
3064 (elf_backend_modify_segment_map): Add macro definitions.
3066 2017-06-19 H.J. Lu <hongjiu.lu@intel.com>
3069 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Check
3070 the DYNAMIC bit instead of bfd_count_sections.
3072 2017-06-19 Nick Clifton <nickc@redhat.com>
3075 * vms-alpha.c (evax_bfd_print_emh): Check for insufficient record
3077 (evax_bfd_print_eeom): Likewise.
3078 (evax_bfd_print_egsd): Check for an overlarge record length.
3079 (evax_bfd_print_etir): Likewise.
3081 2017-06-19 Nick Clifton <nickc@redhat.com>
3084 * libieee.h (struct common_header_type): Add end_p field.
3085 * ieee.c (this_byte_and_next): Do not advance input_p beyond
3087 (read_id): Check for a length that exceeds the remaining bytes in
3089 (ieee_seek): Initialise end_p.
3090 (ieee_archive_p): Likewise.
3091 (ieee_object_p): Likewise.
3093 2017-06-19 Nick Clifton <nickc@redhat.com>
3096 * vms-alpha.c (_bfd_vms_slurp_eihs): Check for invalid offset
3097 before reading the EIHS structure entries.
3099 2017-06-19 Nick Clifton <nickc@redhat.com>
3102 * vms-alpha.c (_bfd_vms_slurp_egsd): Use unsigned int for
3103 gsd_size. Check that there are enough bytes remaining to read the
3104 type and size of the next egsd. Check that the size of the egsd
3105 does not exceed the size of the record.
3107 2017-06-19 Alan Modra <amodra@gmail.com>
3109 * config.bfd: Correct targ_underscore for cris.
3111 2017-06-18 Alan Modra <amodra@gmail.com>
3113 * config.bfd: Correct targ_underscore for epiphany, ip2k,
3114 m32c, mn10200, pru, rl78, rx, crisv32 and v850.
3116 2017-06-16 Nick Clifton <nickc@redhat.com>
3118 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Do not fail if the
3119 bucketlist is empty because there are no symbols to add to the
3122 2017-06-16 Alan Modra <amodra@gmail.com>
3128 * targets.c (struct bfd_target): Add _bfd_define_start_stop.
3129 (BFD_JUMP_TABLE_LINK): Likewise.
3130 * elf-bfd.h (bfd_elf_define_start_stop): Declare.
3131 * elflink.c (_bfd_elf_gc_mark_rsec): Update comment.
3132 (bfd_elf_define_start_stop): New function.
3133 * linker.c (bfd_generic_define_start_stop): New function.
3134 * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Init
3136 * aout-adobe.c (aout_32_bfd_define_start_stop): Define.
3137 * aout-target.h (MY_bfd_define_start_stop): Define.
3138 * aout-tic30.c (MY_bfd_define_start_stop): Define.
3139 * binary.c (binary_bfd_define_start_stop): Define.
3140 * bout.c (b_out_bfd_define_start_stop): Define.
3141 * coff-alpha.c (_bfd_ecoff_bfd_define_start_stop): Define.
3142 * coff-mips.c (_bfd_ecoff_bfd_define_start_stop): Define.
3143 * coff-rs6000.c (_bfd_xcoff_bfd_define_start_stop): Define.
3144 * coffcode.h (coff_bfd_define_start_stop): Define.
3145 * elfxx-target.h (bfd_elfNN_bfd_define_start_stop): Define.
3146 * i386msdos.c (msdos_bfd_define_start_stop): Define.
3147 * i386os9k.c (os9k_bfd_define_start_stop): Define.
3148 * ieee.c (ieee_bfd_define_start_stop): Define.
3149 * ihex.c (ihex_bfd_define_start_stop): Define.
3150 * libbfd-in.h (_bfd_nolink_bfd_define_start_stop): Define.
3151 * mach-o-target.c (bfd_mach_o_bfd_define_start_stop): Define.
3152 * mmo.c (mmo_bfd_define_start_stop): Define.
3153 * nlm-target.h (nlm_bfd_define_start_stop): Define.
3154 * oasys.c (oasys_bfd_define_start_stop): Define.
3155 * pef.c (bfd_pef_bfd_define_start_stop): Define.
3156 * plugin.c (bfd_plugin_bfd_define_start_stop): Define.
3157 * ppcboot.c (ppcboot_bfd_define_start_stop): Define.
3158 * som.c (som_bfd_define_start_stop): Define.
3159 * srec.c (srec_bfd_define_start_stop): Define.
3160 * tekhex.c (tekhex_bfd_define_start_stop): Define.
3161 * versados.c (versados_bfd_define_start_stop): Define.
3162 * vms-alpha.c (vms_bfd_define_start_stop): Define.
3163 (alpha_vms_bfd_define_start_stop): Define.
3164 * xsym.c (bfd_sym_bfd_define_start_stop): Define.
3165 * bfd-in2.h: Regenerate.
3166 * libbfd.h: Regenerate.
3168 2017-06-16 Jiong Wang <jiong.wang@arm.com>
3170 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use
3171 SYMBOL_REFERENCES_LOCAL.
3173 2017-06-15 Jiong Wang <jiong.wang@arm.com>
3176 * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
3177 (elfNN_aarch64_final_link_relocate): Also propagate relocations to
3178 runtime for if there needs copy relocation elimination.
3179 (need_copy_relocation_p): New function. Return true for symbol with
3180 pc-relative references and if it's against read-only sections.
3181 (elfNN_aarch64_adjust_dynamic_symbol): Use need_copy_relocation_p.
3182 (elfNN_aarch64_check_relocs): Allocate dynrelocs for relocation types
3183 that are related with accessing external objects.
3184 (elfNN_aarch64_gc_sweep_hook): Sync the relocation types with the change
3185 in elfNN_aarch64_check_relocs.
3187 2017-06-15 Nick Clifton <nickc@redhat.com>
3190 * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
3193 (ieee_archive_p): Likewise.
3195 2017-06-15 Nick Clifton <nickc@redhat.com>
3198 * vms-alpha.c (_bfd_vms_slurp_etir): Extend check of cmd_length.
3200 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
3202 * elf32-xtensa.c (elf_xtensa_be_plt_entry,
3203 elf_xtensa_le_plt_entry): Add dimension for the ABI to arrays,
3204 keep both windowed and call0 ABI PLT definitions.
3205 (elf_xtensa_create_plt_entry): Use selected ABI to choose upper
3206 elf_xtensa_*_plt_entry endex.
3207 (ELF_MAXPAGESIZE): Fix at minimal supported MMU page size.
3209 2017-06-14 Nick Clifton <nickc@redhat.com>
3212 * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid
3215 2017-06-14 Nick Clifton <nickc@redhat.com>
3218 * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the
3219 maximum value for the ascic pointer. Check that name processing
3220 does not read beyond this value.
3221 (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the
3224 2017-06-14 Nick Clifton <nickc@redhat.com>
3227 * versados.c (versados_mkobject): Zero the allocated tdata structure.
3228 (process_otr): Check for an invalid offset in the otr structure.
3230 2017-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
3232 * config.bfd (epiphany-*-elf): Accept epiphany-*-*.
3234 2017-06-13 H.J. Lu <hongjiu.lu@intel.com>
3240 * elf-bfd.h (elf_link_hash_entry): Add start_stop. Change the
3241 vtable field to a union.
3242 (_bfd_elf_is_start_stop): Removed.
3243 * elf32-i386.c (elf_i386_convert_load_reloc): Also check for
3244 __start_SECNAME and __stop_SECNAME symbols.
3245 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
3246 * elflink.c (_bfd_elf_is_start_stop): Removed.
3247 (_bfd_elf_gc_mark_rsec): Check start_stop instead of calling
3248 _bfd_elf_is_start_stop.
3249 (elf_gc_propagate_vtable_entries_used): Skip __start_SECNAME and
3250 __stop_SECNAME symbols. Updated.
3251 (elf_gc_smash_unused_vtentry_relocs): Likewise.
3252 (bfd_elf_gc_record_vtinherit): Likewise.
3253 (bfd_elf_gc_record_vtentry): Likewise.
3255 2017-06-13 Nick Clifton <nickc@redhat.com>
3258 * elflink.c (elf_link_adjust_relocs): Generate an error when
3259 encountering a reloc against a symbol removed by garbage
3262 2017-06-12 H.J. Lu <hongjiu.lu@intel.com>
3264 * elf-bfd.h (elf_backend_data): Add struct bfd_link_info *
3265 to merge_gnu_properties.
3266 * elf-properties.c (elf_merge_gnu_properties): Add struct
3267 bfd_link_info * and pass it to merge_gnu_properties.
3268 (elf_merge_gnu_property_list): Add struct bfd_link_info *
3269 and pass it to elf_merge_gnu_properties.
3270 (_bfd_elf_link_setup_gnu_properties): Pass info to
3271 elf_merge_gnu_property_list.
3272 * elf32-i386.c (elf_i386_merge_gnu_properties): Add struct
3274 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): Likewise.
3276 2017-06-11 Joe Zbiciak <joe.zbiciak@leftturnonly.info>
3279 * binary.c (binary_set_section_contents): Scale lma by octets
3280 per byte to set filepos.
3282 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3284 * elf32-arc.c (elf_arc_check_relocs): Fixed conditions to generate
3287 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3289 * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to
3292 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3294 * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to
3295 patched section contents for TLS IE reloc.
3296 * elf32-arc.c: Remove TCB_SIZE preprocessor macro.
3298 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3300 * elf32-arc.c (elf_arc_relocate_section): Added "call" to
3301 RELOC_FOR_GLOBAL_SYMBOL macro.
3303 2018-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3305 * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
3308 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3310 * config/tc-arc.c (md_undefined_symbol): Changed.
3311 * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed.
3313 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3315 * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
3318 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3320 * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
3321 warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
3323 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3325 * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
3328 2017-06-08 Richard Earnshaw <rearnsha@arm.com>
3330 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
3331 that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
3332 is non-zero. Add clarifying comments.
3334 2017-06-08 H.J. Lu <hongjiu.lu@intel.com>
3336 * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
3337 name. Use local IFUNC symbol name string to report unsupported
3338 non-PIC call to IFUNC function.
3339 (elf_i386_relocate_section): Dump local IFUNC name with minfo
3340 when generating R_386_IRELATIVE relocation.
3341 (elf_i386_finish_dynamic_symbol): Likewise.
3342 * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
3344 (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
3345 when generating R_X86_64_IRELATIVE relocation.
3346 (elf_x86_64_finish_dynamic_symbol): Likewise.
3348 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
3350 * elf.c (setup_group): Make sure BFD sections are created for all
3351 group sections in the input file when processing SHF_GROUP
3353 (bfd_section_from_shdr): Avoid duplicating logic already
3354 implemented in `setup_group'.
3356 2017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
3359 * peXXigen.c (pe_print_idata): Use the address of the first thunk
3360 if the hint address is zero.
3362 2017-06-06 James Clarke <jrtc27@jrtc27.com>
3365 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
3366 ELF_COMMON_DEF_P for common symbols.
3368 2017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
3370 * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
3371 SEC_GROUP sections as SEC_EXCLUDE.
3372 (bfd_elf_set_group_contents): Replace use of abort with an assert.
3373 (assign_section_numbers): Use resolve_section_groups flag instead
3374 of relocatable link type.
3375 (_bfd_elf_init_private_section_data): Use resolve_section_groups
3376 flag instead of checking the final_link flag for part of the
3377 checks in here. Fix white space as a result.
3378 * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
3379 instead of relocatable link type.
3380 (bfd_elf_final_link): Likewise.
3382 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
3384 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
3386 * elf32-score.c (score_elf_final_link_relocate): Likewise.
3387 (s3_bfd_score_elf_check_relocs): Likewise.
3388 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
3389 (score_elf_final_link_relocate): Likewise.
3390 (s7_bfd_score_elf_check_relocs): Likewise.
3392 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
3394 * elflink.c (init_reloc_cookie_rels): Remove unused variable
3397 2017-06-06 Maciej W. Rozycki <macro@imgtec.com>
3399 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
3400 from `reloc_count' rather than decrementing it.
3401 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
3402 `reloc_count' by `int_rels_per_ext_rel'.
3403 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
3404 `reloc_count' by `int_rels_per_ext_rel' for last relocation
3405 entry determination.
3406 (s3_bfd_score_elf_check_relocs): Likewise.
3407 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
3408 (s7_bfd_score_elf_relocate_section): Likewise.
3409 (s7_bfd_score_elf_check_relocs): Likewise.
3410 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
3411 prototype and function.
3412 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
3413 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
3414 triple rather than once the sum of REL and RELA relocation entry
3416 (bfd_elf64_get_reloc_upper_bound): Remove macro.
3417 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
3418 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
3419 storage allocation size determination.
3420 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
3421 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
3422 by `int_rels_per_ext_rel' for last relocation entry
3424 (bfd_elf_final_link): Do not multiply `reloc_count' by
3425 `int_rels_per_ext_rel' for internal relocation storage
3426 allocation size determination.
3427 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
3428 `int_rels_per_ext_rel' for last relocation entry determination.
3429 (elf_gc_smash_unused_vtentry_relocs): Likewise.
3430 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
3431 (_bfd_mips_elf_relocate_section): Likewise.
3433 2017-06-05 Alan Modra <amodra@gmail.com>
3436 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
3438 2017-06-01 John Baldwin <jhb@FreeBSD.org>
3440 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
3441 determine structure sizes.
3442 (elfcore_grok_freebsd_prstatus): Likewise.
3444 2017-06-01 Alan Modra <amodra@gmail.com>
3446 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
3447 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
3449 (is_elfv2_localentry0): New function.
3450 (ppc64_elf_tls_setup): Default params->plt_localentry0.
3451 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
3452 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
3453 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
3454 optimized localentry:0 stubs.
3455 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
3456 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
3458 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
3460 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
3462 2017-05-30 Casey Smith <clegg89@gmail.com>
3465 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
3466 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
3468 2017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
3470 * cpu-arc.c (arc_compatible): New function.
3472 2017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
3474 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
3476 2017-05-30 H.J. Lu <hongjiu.lu@intel.com>
3479 * bfdio.c (bfd_get_file_size): New function.
3480 * bfd-in2.h: Regenerated.
3482 2017-05-23 Dilian Palauzov <git-dpa@aegee.org>
3484 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
3487 2017-05-22 H.J. Lu <hongjiu.lu@intel.com>
3489 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
3490 dynobj instead of htab->elf.dynobj.
3492 2017-05-19 Maciej W. Rozycki <macro@imgtec.com>
3494 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
3496 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
3497 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
3498 actual number of internal relocations retrieved. Adjust
3499 function description.
3500 (bfd_elf64_canonicalize_reloc): Remove macro.
3501 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
3503 2017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
3505 * archures.c (bfd_mach_sparc_v9m8): Define.
3506 (bfd_mach_sparc_v8plusm8): Likewise.
3507 (bfd_mach_sparc_v9_p): Adjust to M8.
3508 (bfd_mach_sparc_64bit_p): Likewise.
3509 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
3510 bfd_mach_sparc_v8plusm8.
3511 * bfd-in2.h: Regenerated.
3512 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
3514 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
3515 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
3516 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
3518 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
3519 bfd_mach_sparc_v8plusm8.
3521 2017-05-19 Alan Modra <amodra@gmail.com>
3523 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
3524 debug and special sections when no non-note alloc sections in an
3527 2017-05-18 Alan Modra <amodra@gmail.com>
3529 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
3530 * elf-m10300.c: Likewise.
3532 * elf32-arc.c: Likewise.
3533 * elf32-bfin.c: Likewise.
3534 * elf32-m68k.c: Likewise.
3535 * elf32-nds32.c: Likewise.
3536 * elf32-tilepro.c: Likewise.
3537 * elflink.c: Likewise.
3538 * elfnn-aarch64.c: Likewise.
3539 * elfnn-riscv.c: Likewise.
3540 * elfxx-tilegx.c: Likewise.
3541 * mach-o.c: Likewise.
3542 * peXXigen.c: Likewise.
3543 * vms-alpha.c: Likewise.
3544 * vms-lib.c: Likewise.
3546 2017-05-17 H.J. Lu <hongjiu.lu@intel.com>
3549 * elflink.c (elf_gc_mark_debug_section): New function.
3550 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
3551 referenced by kept debug sections.
3553 2017-05-16 Alan Modra <amodra@gmail.com>
3555 * elf-m10300.c: Rename occurrences of non_ir_ref.
3556 * elf32-arm.c: Likewise.
3557 * elf32-bfin.c: Likewise.
3558 * elf32-cr16.c: Likewise.
3559 * elf32-cris.c: Likewise.
3560 * elf32-d10v.c: Likewise.
3561 * elf32-dlx.c: Likewise.
3562 * elf32-fr30.c: Likewise.
3563 * elf32-frv.c: Likewise.
3564 * elf32-hppa.c: Likewise.
3565 * elf32-i370.c: Likewise.
3566 * elf32-i386.c: Likewise.
3567 * elf32-iq2000.c: Likewise.
3568 * elf32-lm32.c: Likewise.
3569 * elf32-m32c.c: Likewise.
3570 * elf32-m32r.c: Likewise.
3571 * elf32-m68hc1x.c: Likewise.
3572 * elf32-m68k.c: Likewise.
3573 * elf32-mcore.c: Likewise.
3574 * elf32-metag.c: Likewise.
3575 * elf32-microblaze.c: Likewise.
3576 * elf32-moxie.c: Likewise.
3577 * elf32-msp430.c: Likewise.
3578 * elf32-mt.c: Likewise.
3579 * elf32-nios2.c: Likewise.
3580 * elf32-or1k.c: Likewise.
3581 * elf32-ppc.c: Likewise.
3582 * elf32-rl78.c: Likewise.
3583 * elf32-s390.c: Likewise.
3584 * elf32-score.c: Likewise.
3585 * elf32-score7.c: Likewise.
3586 * elf32-sh.c: Likewise.
3587 * elf32-tic6x.c: Likewise.
3588 * elf32-tilepro.c: Likewise.
3589 * elf32-v850.c: Likewise.
3590 * elf32-vax.c: Likewise.
3591 * elf32-xstormy16.c: Likewise.
3592 * elf32-xtensa.c: Likewise.
3593 * elf64-alpha.c: Likewise.
3594 * elf64-hppa.c: Likewise.
3595 * elf64-ia64-vms.c: Likewise.
3596 * elf64-mmix.c: Likewise.
3597 * elf64-ppc.c: Likewise.
3598 * elf64-s390.c: Likewise.
3599 * elf64-sh64.c: Likewise.
3600 * elf64-x86-64.c: Likewise.
3601 * elflink.c: Likewise.
3602 * elfnn-aarch64.c: Likewise.
3603 * elfnn-ia64.c: Likewise.
3604 * elfnn-riscv.c: Likewise.
3605 * elfxx-mips.c: Likewise.
3606 * elfxx-sparc.c: Likewise.
3607 * elfxx-tilegx.c: Likewise.
3608 * linker.c: Likewise.
3610 2017-05-16 Alan Modra <amodra@gmail.com>
3612 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
3613 * elflink.c (elf_link_add_object_symbols): Update to use
3615 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
3617 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
3619 2017-05-15 Maciej W. Rozycki <macro@imgtec.com>
3621 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
3623 2017-05-12 H.J. Lu <hongjiu.lu@intel.com>
3625 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
3626 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
3628 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
3630 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
3632 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
3634 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
3635 to plt_second/plt_second_eh_frame.
3636 (elf_x86_64_link_hash_newfunc): Updated.
3637 (elf_x86_64_allocate_dynrelocs): Likewise.
3638 (elf_x86_64_size_dynamic_sections): Likewise.
3639 (elf_x86_64_relocate_section): Likewise.
3640 (elf_x86_64_finish_dynamic_symbol): Likewise.
3641 (elf_x86_64_finish_dynamic_sections): Likewise.
3642 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
3643 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
3645 (elf_backend_setup_gnu_properties): Updated. Create the
3646 .plt.sec section instead of the .plt.sec section.
3648 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
3650 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
3651 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
3652 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
3654 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
3656 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
3657 (bfd_elf64_set_reloc): Define.
3658 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
3660 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
3662 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
3663 (struct bfd_target): New field _bfd_set_reloc.
3664 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
3665 * reloc.c (_bfd_generic_set_reloc): New function.
3666 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
3667 * nlm-target.h (nlm_set_reloc): Likewise.
3668 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
3669 * aout-tic30.c (MY_set_reloc): Likewise.
3670 * aout-target.h (MY_set_reloc): Likewise.
3671 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
3672 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
3673 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
3674 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
3675 * aout-adobe.c (aout_32_set_reloc): Likewise.
3676 * bout.c (b_out_set_reloc): Likewise.
3677 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
3678 * i386os9k.c (aout_32_set_reloc): Likewise.
3679 * ieee.c (ieee_set_reloc): Likewise.
3680 * oasys.c (oasys_set_reloc): Likewise.
3681 * som.c (som_set_reloc): Likewise.
3682 * versados.c (versados_set_reloc): Likewise.
3683 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
3684 _bfd_generic_set_reloc.
3685 (rs6000_xcoff64_aix_vec): LIkewise.
3686 * libbfd.c (_bfd_norelocs_set_reloc): New function.
3687 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
3688 * i386msdos.c (msdos_set_reloc): Define to
3689 _bfd_norelocs_set_reloc.
3690 * elfcode.h (elf_set_reloc): Define.
3691 * bfd-in2.h: Regenerated.
3693 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
3696 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
3697 for IFUNC function address.
3699 2017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
3701 * elf32-arc.c (FEATURE_LIST_NAME): Define.
3702 (CONFLICT_LIST): Likewise.
3703 (opcode/arc-attrs.h): Include.
3704 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
3705 (arc_extract_features): New file.
3706 (arc_stralloc): Likewise.
3707 (arc_elf_merge_attributes): Likewise.
3708 (arc_elf_merge_private_bfd_data): Use object attributes.
3709 (bfd_arc_get_mach_from_attributes): New function.
3710 (arc_elf_object_p): Use object attributes.
3711 (arc_elf_final_write_processing): Likewise.
3712 (elf32_arc_obj_attrs_arg_type): New function.
3713 (elf32_arc_obj_attrs_handle_unknown): Likewise.
3714 (elf32_arc_section_from_shdr): Likewise.
3715 (elf_backend_obj_attrs_vendor): Define.
3716 (elf_backend_obj_attrs_section): Likewise.
3717 (elf_backend_obj_attrs_arg_type): Likewise.
3718 (elf_backend_obj_attrs_section_type): Likewise.
3719 (elf_backend_obj_attrs_handle_unknown): Likewise.
3720 (elf_backend_section_from_shdr): Likewise.
3722 2017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
3725 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
3726 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
3727 and the destination is a Thumb symbol.
3729 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
3731 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
3732 initializer to silence GCC 4.2.
3733 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
3735 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
3737 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
3738 (LAZY_PLT_ENTRY_SIZE): This.
3739 (NON_LAZY_PLT_ENTRY_SIZE): New.
3740 (elf_x86_64_plt0_entry): Renamed to ...
3741 (elf_x86_64_lazy_plt0_entry): This.
3742 (elf_x86_64_plt_entry): Renamed to ...
3743 (elf_x86_64_lazy_plt_entry): This.
3744 (elf_x86_64_bnd_plt0_entry): Renamed to ...
3745 (elf_x86_64_lazy_bnd_plt0_entry): This.
3746 (elf_x86_64_legacy_plt_entry): Removed.
3747 (elf_x86_64_bnd_plt_entry): Renamed to ...
3748 (elf_x86_64_lazy_bnd_plt_entry): This.
3749 (elf_x86_64_legacy_plt2_entry): Renamed to ...
3750 (elf_x86_64_non_lazy_plt_entry): This.
3751 (elf_x86_64_bnd_plt2_entry): Renamed to ...
3752 (elf_x86_64_non_lazy_bnd_plt_entry): This.
3753 (elf_x86_64_eh_frame_plt): Renamed to ...
3754 (elf_x86_64_eh_frame_lazy_plt): This.
3755 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
3756 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
3757 (elf_x86_64_eh_frame_plt_got): Renamed to ...
3758 (elf_x86_64_eh_frame_non_lazy_plt): This.
3759 (elf_x86_64_lazy_plt_layout): New.
3760 (elf_x86_64_non_lazy_plt_layout): Likewise.
3761 (elf_x86_64_plt_layout): Likewise.
3762 (elf_x86_64_backend_data): Remove PLT layout information. Add
3763 os for target system.
3764 (GET_PLT_ENTRY_SIZE): Removed.
3765 (elf_x86_64_lazy_plt): New.
3766 (elf_x86_64_non_lazy_plt): Likewise.
3767 (elf_x86_64_lazy_bnd_plt): Likewise.
3768 (elf_x86_64_non_lazy_bnd_plt): Likewise.
3769 (elf_x86-64_arch_bed): Updated.
3770 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
3771 (elf_x86_64_create_dynamic_sections): Removed.
3772 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
3773 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
3774 (elf_x86-64_adjust_dynamic_symbol): Updated.
3775 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
3776 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
3777 size for PLT0 if there is no PLT0. Get plt_entry_size from
3778 non_lazy_plt for non-lazy PLT entries.
3779 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
3780 from non_lazy_plt for non-lazy PLT entries.
3781 (elf_x86-64_relocate_section): Updated. Properly get PLT index
3782 if there is no PLT0.
3783 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
3784 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
3785 entries with non-lazy PLT layout. Don't fill the second and third
3786 slots in the PLT entry if there is no PLT0.
3787 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
3788 if there is no PLT0. Set sh_entsize on the .plt.got section.
3789 (compare_relocs): New.
3790 (elf_x86_64_plt_type): Likewise.
3791 (elf_x86_64_plt): Likewise.
3792 (elf_x86_64_nacl_plt): New. Forward declaration.
3793 (elf_x86_64_get_plt_sym_val): Removed.
3794 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
3795 against all dynamic relocations.
3796 (elf_x86_64_link_setup_gnu_properties): New function.
3797 (elf_backend_create_dynamic_sections): Updated.
3798 (elf_backend_setup_gnu_properties): New.
3799 (elf_x86_64_nacl_plt): New.
3800 (elf_x86_64_nacl_arch_bed): Updated.
3802 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
3804 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
3805 (LAZY_PLT_ENTRY_SIZE): This.
3806 (NON_LAZY_PLT_ENTRY_SIZE): New.
3807 (elf_i386_plt0_entry): Renamed to ...
3808 (elf_i386_lazy_plt0_entry): This.
3809 (elf_i386_plt_entry): Renamed to ...
3810 (elf_i386_lazy_plt_entry): This.
3811 (elf_i386_pic_plt0_entry): Renamed to ...
3812 (elf_i386_pic_lazy_plt0_entry): This.
3813 (elf_i386_pic_plt_entry): Renamed to ...
3814 (elf_i386_pic_lazy_plt_entry): This.
3815 (elf_i386_got_plt_entry): Renamed to ...
3816 (elf_i386_non_lazy_plt_entry): This.
3817 (elf_i386_pic_got_plt_entry): Renamed to ...
3818 (elf_i386_pic_non_lazy_plt_entry): This.
3819 (elf_i386_eh_frame_plt): Renamed to ...
3820 (elf_i386_eh_frame_lazy_plt): This.
3821 (elf_i386_eh_frame_plt_got): Renamed to ...
3822 (elf_i386_eh_frame_non_lazy_plt): This.
3823 (elf_i386_plt_layout): Renamed to ...
3824 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
3825 eh_frame_plt_got_size.
3826 (elf_i386_non_lazy_plt_layout): New.
3827 (elf_i386_plt_layout): Likewise.
3828 (elf_i386_non_lazy_plt): Likewise.
3829 (GET_PLT_ENTRY_SIZE): Removed.
3830 (elf_i386_plt): Renamed to ...
3831 (elf_i386_lazy_plt): This.
3832 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
3833 (elf_i386_arch_bed): Updated.
3834 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
3835 (elf_i386_create_dynamic_sections): Removed.
3836 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
3837 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
3838 (elf_i386_adjust_dynamic_symbol): Updated.
3839 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
3840 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
3841 size for PLT0 if there is no PLT0.
3842 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
3843 output section is discarded only if GOT isn't empty.
3844 (elf_i386_relocate_section): Updated. Properly get PLT index
3845 if there is no PLT0.
3846 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
3847 second and third slots in the PLT entry if there is no PLT0.
3848 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
3849 if there is no PLT0. Set sh_entsize on the .plt.got section.
3850 (elf_i386_nacl_plt): Forward declaration.
3851 (elf_i386_get_plt_sym_val): Removed.
3852 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
3853 against all dynamic relocations.
3854 (elf_i386_link_setup_gnu_properties): New function.
3855 (elf_backend_create_dynamic_sections): Updated.
3856 (elf_backend_setup_gnu_properties): New.
3857 (elf_i386_nacl_plt): Updated.
3858 (elf_i386_nacl_arch_bed): Likewise.
3859 (elf_i386_vxworks_arch_bed): Likewise.
3861 2017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
3863 * elflink.c (elf_output_implib): Remove executable flag from import
3865 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
3866 library is a relocatable object file.
3868 2017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
3871 * elf32-avr.c (avr_should_move_sym): New function.
3872 (avr_should_reduce_sym_size): Likewise.
3873 (avr_should_increase_sym_size): Likewise.
3874 (elf32_avr_relax_delete_bytes): Adjust symbol values
3875 and sizes by calling new functions.
3877 2017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
3879 * config.bfd (riscv32-*): Enable rv64.
3881 2017-05-02 Alan Modra <amodra@gmail.com>
3884 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
3885 rather than h->root.type == bfd_link_hash_new.
3886 (bfd_elf_record_link_assignment): Similarly, call
3887 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
3889 2017-04-29 Alan Modra <amodra@gmail.com>
3892 * reloc.c (reloc_offset_in_range): New function.
3893 (bfd_perform_relocation, bfd_install_relocation): Use it.
3894 (_bfd_final_link_relocate): Likewise.
3896 2017-04-28 H.J. Lu <hongjiu.lu@intel.com>
3898 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
3899 before using .plt.got.
3900 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
3902 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3904 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
3905 instead of "+=" to update 0.
3907 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3909 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
3910 .plt.got section here.
3911 (elf_i386_check_relocs): Don't create the .plt.got section.
3912 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
3913 the .plt.got and .plt.bnd sections here.
3914 (elf_x86_64_check_relocs): Don't create the .plt.got nor
3917 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3919 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
3921 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
3922 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
3923 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
3924 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
3927 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3929 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
3931 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
3932 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
3933 the first relocatable ELF input with GNU properties.
3935 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3937 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
3938 VxWorks for non-PIC.
3940 2017-04-27 Alan Modra <amodra@gmail.com>
3942 * elf-bfd.h (struct elf_backend_data): Make asection param of
3943 elf_backend_eh_frame_address_size const.
3944 (_bfd_elf_eh_frame_address_size): Likewise.
3945 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
3946 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
3947 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
3948 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
3949 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
3950 (next_cie_fde_offset): Constify params.
3951 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
3953 2017-04-27 Alan Modra <amodra@gmail.com>
3955 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
3956 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
3957 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
3959 (offset_adjust): New function.
3960 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
3961 (adjust_eh_frame_local_symbols): Likewise.
3962 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
3963 after changing anything. Return true if anything changed.
3964 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
3965 _bfd_elf_adjust_eh_frame_global_symbol for globals.
3967 2017-04-27 Alan Modra <amodra@gmail.com>
3969 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
3972 2017-04-27 Alan Modra <amodra@gmail.com>
3974 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
3975 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
3976 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
3977 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
3978 for undef and undefweak dyn_relocs.
3979 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
3980 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
3981 (allocate_got, allocate_dynrelocs): Likewise.
3982 (ppc64_elf_relocate_section): Likewise.
3984 2017-04-26 H.J. Lu <hongjiu.lu@intel.com>
3986 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
3987 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
3988 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
3989 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
3991 2017-04-26 Nick Clifton <nickc@redhat.com>
3994 * reloc.c (bfd_perform_relocation): Check for a negative address
3997 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
4000 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
4002 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
4003 (elf_backend_always_renumber_dynsyms): Define.
4004 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
4005 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
4006 * elflink.c (bfd_elf_size_dynamic_sections): Also call
4007 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
4009 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
4011 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
4013 * elflink.c (bfd_elf_size_dynamic_sections): Only call
4014 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
4015 sections have been created.
4017 2017-04-26 Nick Clifton <nickc@redhat.com>
4020 * compress.c (bfd_init_section_compress_status): Check the return
4021 value from bfd_malloc.
4023 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
4025 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
4026 no_finish_dynamic_symbol.
4027 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
4029 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
4030 weak symbol, don't make it dynamic.
4031 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
4032 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
4033 relocation for GOT reference.
4034 (elf_x86_64_finish_dynamic_symbol): Abort if
4035 no_finish_dynamic_symbol isn't 0.
4037 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
4040 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
4041 undefined weak symbol, don't make it dynamic.
4042 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
4043 set no_finish_dynamic_symbol and generate R_386_RELATIVE
4044 relocation for R_386_GOT32.
4046 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
4049 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
4051 2017-04-23 Alan Modra <amodra@gmail.com>
4054 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
4055 * elf.c (lcomm_sym): New.
4056 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
4057 * bfd-in2.h: Regenerate.
4059 2017-04-23 Alan Modra <amodra@gmail.com>
4062 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
4063 parameters and comment.
4064 (_bfd_elf_get_reloc_section): Delete.
4065 (_bfd_elf_plt_get_reloc_section): Declare.
4066 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
4067 New functions. Don't blindly skip over assumed .rel/.rela prefix.
4069 (_bfd_elf_get_reloc_section): ..here. Delete.
4070 (assign_section_numbers): Call elf_get_reloc_section.
4071 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
4072 * elfxx-target.h (elf_backend_get_reloc_section): Update.
4074 2017-04-23 Alan Modra <amodra@gmail.com>
4077 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
4080 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
4083 * elf32-i386.c (elf_i386_link_hash_entry): Add
4084 no_finish_dynamic_symbol.
4085 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
4086 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
4087 symbol, don't make it dynamic in PIE.
4088 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
4089 set no_finish_dynamic_symbol and generate R_386_RELATIVE
4090 relocation for R_386_GOT32
4091 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
4094 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
4098 * elflink.c (elf_link_add_object_symbols): Require
4099 --no-dynamic-linker with -E/--dynamic-list when creating
4102 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
4104 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
4107 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
4109 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
4110 dynamic symbol sorting.
4112 2017-04-20 H.J. Lu <hongjiu.lu@intel.com>
4115 * elflink.c (elf_link_add_object_symbols): Preserve
4116 dynamic_ref_after_ir_def when restoring the symbol table for
4117 unneeded dynamic object.
4119 2017-04-19 H.J. Lu <hongjiu.lu@intel.com>
4122 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
4123 on on undefined IFUNC symbol in the second PLT.
4125 2017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
4127 * peXXigen.c (pe_print_reloc): Correct chunk_end.
4129 2017-04-19 Alan Modra <amodra@gmail.com>
4131 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
4132 or make dynamic for info->dynamic_undefined_weak 0 and 1.
4133 * elf32-ppc.c:Formatting.
4134 (ensure_undefweak_dynamic): Don't make dynamic when
4135 info->dynamic_undefined_weak is zero.
4136 (allocate_dynrelocs): Discard undefweak dyn_relocs for
4137 info->dynamic_undefined_weak. Discard undef dyn_relocs when
4138 not default visibility. Discard undef and undefweak
4140 (ppc_elf_relocate_section): Adjust to suit.
4141 * elf64-ppc.c: Formatting.
4142 (ensure_undefweak_dynamic): Don't make dynamic when
4143 info->dynamic_undefined_weak is zero.
4144 (allocate_dynrelocs): Discard undefweak dyn_relocs for
4145 info->dynamic_undefined_weak. Discard them earlier.
4147 2017-04-17 H.J. Lu <hongjiu.lu@intel.com>
4150 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
4151 before generating the version definition section.
4153 2017-04-17 Alan Modra <amodra@gmail.com>
4155 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
4156 state when a regular object file defines a symbol with
4157 incompatible type to that defined by an earlier shared lib.
4159 2017-04-13 Alan Modra <amodra@gmail.com>
4161 * coffcode.h: Wrap some overly long _bfd_error_handler args.
4163 * elf32-arm.c: Likewise.
4164 * elf32-i386.c: Likewise.
4165 * elf32-mep.c: Likewise.
4166 * elf64-ia64-vms.c: Likewise.
4167 * elf64-x86-64.c: Likewise.
4168 * elflink.c: Likewise.
4169 * elfnn-ia64.c: Likewise.
4170 * elfxx-mips.c: Likewise.
4172 2017-04-13 Alan Modra <amodra@gmail.com>
4174 * aoutx.h: Use %B and %A in error messages throughout file.
4175 * aout-cris.c: Likewise.
4176 * archive.c: Likewise.
4177 * binary.c: Likewise.
4178 * coff-rs6000.c: Likewise.
4179 * coff-tic4x.c: Likewise.
4180 * coffcode.h: Likewise.
4181 * coffgen.c: Likewise.
4182 * cofflink.c: Likewise.
4183 * coffswap.h: Likewise.
4184 * cpu-arm.c: Likewise.
4185 * elf-eh-frame.c: Likewise.
4186 * elf-m10300.c: Likewise.
4188 * elf32-arc.c: Likewise.
4189 * elf32-arm.c: Likewise.
4190 * elf32-bfin.c: Likewise.
4191 * elf32-frv.c: Likewise.
4192 * elf32-iq2000.c: Likewise.
4193 * elf32-m32c.c: Likewise.
4194 * elf32-microblaze.c: Likewise.
4195 * elf32-nds32.c: Likewise.
4196 * elf32-rl78.c: Likewise.
4197 * elf32-rx.c: Likewise.
4198 * elf32-score.c: Likewise.
4199 * elf32-score7.c: Likewise.
4200 * elf32-sh64.c: Likewise.
4201 * elf32-v850.c: Likewise.
4202 * elf32-vax.c: Likewise.
4203 * elf32-visium.c: Likewise.
4204 * elf64-ia64-vms.c: Likewise.
4205 * elf64-mmix.c: Likewise.
4206 * elf64-sh64.c: Likewise.
4207 * elfcode.h: Likewise.
4208 * elfnn-aarch64.c: Likewise.
4209 * elfnn-ia64.c: Likewise.
4210 * elfxx-mips.c: Likewise.
4211 * hpux-core.c: Likewise.
4214 * linker.c: Likewise.
4215 * merge.c: Likewise.
4217 * oasys.c: Likewise.
4218 * pdp11.c: Likewise.
4219 * peXXigen.c: Likewise.
4220 * rs6000-core.c: Likewise.
4221 * vms-alpha.c: Likewise.
4222 * xcofflink.c: Likewise.
4224 2017-04-13 Alan Modra <amodra@gmail.com>
4226 * bfd.c (PRINT_TYPE): Define.
4227 (_doprnt): New function.
4228 (error_handler_internal): Use _doprnt.
4229 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
4230 calls in their natural order, throughout file.
4231 * coff-mcore.c: Likewise.
4232 * coff-ppc.c: Likewise.
4233 * coff-tic80.c: Likewise.
4234 * cofflink.c: Likewise.
4235 * elf-s390-common.c: Likewise.
4237 * elf32-arm.c: Likewise.
4238 * elf32-i386.c: Likewise.
4239 * elf32-m32r.c: Likewise.
4240 * elf32-msp430.c: Likewise.
4241 * elf32-spu.c: Likewise.
4242 * elf64-ia64-vms.c: Likewise.
4243 * elf64-sparc.c: Likewise.
4244 * elf64-x86-64.c: Likewise.
4245 * elflink.c: Likewise.
4246 * elfnn-aarch64.c: Likewise.
4247 * elfnn-ia64.c: Likewise.
4248 * elfxx-mips.c: Likewise.
4250 2017-04-13 Alan Modra <amodra@gmail.com>
4252 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
4253 branch veneers" error. Fix double space and format message.
4254 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
4255 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
4257 2017-04-13 Alan Modra <amodra@gmail.com>
4259 * bfd-in2.h: Regenerate.
4261 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
4263 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
4264 extra `\n' in warning/error messages.
4265 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
4266 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
4268 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
4270 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
4271 processor-specific properties with generic ELF target vector.
4273 2017-04-10 Qing Zhao <qing.zhao@oracle.com>
4275 * elf32-sparc.c (elf_backend_fixup_symbol): New.
4276 * elf64-sparc.c (elf_backend_fixup_symbol): New.
4277 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
4278 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
4280 (link_hash_newfunc): Initialize has_got_reloc and
4282 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
4284 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
4286 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
4288 (_bfd_sparc_elf_fixup_symbol): New function.
4289 (allocate_dynrelocs): Don't allocate space for dynamic
4290 relocations and discard relocations against resolved undefined
4291 weak symbols in executable. Don't make resolved undefined weak
4292 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
4293 relocation against undefined weak symbols in PIE.
4294 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
4295 relocations against resolved undefined weak symbols in PIE
4296 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
4297 without ynamic PLT/GOT relocations for resolved undefined weak
4299 Don't generate dynamic relocation against resolved undefined
4300 weak symbol in executable.
4301 (pie_finish_undefweak_symbol): New function.
4302 (_bfd_sparc_elf_finish_dynamic_sections): Call
4303 pie_finish_undefweak_symbol on all symbols in PIE.
4304 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
4305 (_bfd_sparc_elf_fixup_symbol): New function.
4307 2017-04-10 Nick Clifton <nickc@redhat.com>
4309 * config.bfd: Remove ns32k from obsolete list.
4311 2017-04-10 Alan Modra <amodra@gmail.com>
4314 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
4315 (special_sections_i): Likewise for .init_array.
4316 (special_sections_p): Likewise for .preinit_array.
4318 2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
4322 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
4323 ELF_COMMON_DEF_P for common symbols.
4324 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
4325 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
4326 * elflink.c (_bfd_elf_merge_symbol): Revert commits
4327 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
4328 07492f668d2173da7a2bda3707ff0985e0f460b6.
4330 2017-04-07 Pedro Alves <palves@redhat.com>
4332 * opncls.c (bfd_get_debug_link_info): Rename to...
4333 (bfd_get_debug_link_info_1): ... this. Change type of second
4334 parameter to void pointer. Adjust.
4335 (bfd_get_debug_link_info): Reimplement on top of
4336 bfd_get_debug_link_info_1.
4337 (separate_debug_file_exists, separate_alt_debug_file_exists):
4338 Change type of second parameter to void pointer. Adjust.
4339 (get_func_type, check_func_type): Change type of second parameter
4341 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
4342 the callback functions instead of passing the address of a local.
4343 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
4344 find_separate_debug_file.
4345 (get_alt_debug_link_info_shim): Change type of second parameter to
4346 void pointer. Adjust.
4347 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
4348 find_separate_debug_file.
4349 (get_build_id_name, bfd_boolean check_build_id_file): Change type
4350 of second parameter to void pointer. Adjust.
4351 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
4352 pointer local to find_separate_debug_file.
4354 2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
4356 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
4357 external symbols with a definition.
4358 (_bfd_coff_gc_mark_extra_sections): Fix typo.
4360 2017-04-07 Alan Modra <amodra@gmail.com>
4362 * po/SRC-POTFILES.in: Regenerate.
4364 2017-04-05 Alan Modra <amodra@gmail.com>
4366 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
4369 2017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
4371 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
4372 numbers for DataDirectory entry indicies passed to
4375 2017-04-04 H.J. Lu <hongjiu.lu@intel.com>
4377 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
4378 each GNU_MBIND section and align GNU_MBIND section to page size.
4379 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
4380 segment for each GNU_MBIND section.
4381 (_bfd_elf_init_private_section_data): Copy sh_info from input
4382 for GNU_MBIND section.
4384 2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
4386 * elfnn-riscv.c (GP_NAME): Delete.
4387 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
4388 (_bfd_riscv_relax_lui): Likewise.
4390 2017-04-04 Nick Clifton <nickc@redhat.com>
4393 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
4395 (bfd_elf_final_link): Only initialize the extended symbol index
4396 section if there are extended symbol tables to list.
4398 2017-04-03 H.J. Lu <hongjiu.lu@intel.com>
4400 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
4401 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
4402 * configure.ac (elf): Add elf-properties.lo.
4403 * Makefile.in: Regenerated.
4404 * configure: Likewise.
4405 * elf-bfd.h (elf_property_kind): New.
4406 (elf_property): Likewise.
4407 (elf_property_list): Likewise.
4408 (elf_properties): Likewise.
4409 (_bfd_elf_parse_gnu_properties): Likewise.
4410 (_bfd_elf_get_property): Likewise.
4411 (_bfd_elf_link_setup_gnu_properties): Likewise.
4412 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
4413 and setup_gnu_properties.
4414 (elf_obj_tdata): Add properties.
4415 * elf-properties.c: New file.
4416 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
4417 (elf_i386_merge_gnu_properties): Likewise.
4418 (elf_backend_parse_gnu_properties): Likewise.
4419 (elf_backend_merge_gnu_properties): Likewise.
4420 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
4421 (elf_x86_64_merge_gnu_properties): Likewise.
4422 (elf_backend_parse_gnu_properties): Likewise.
4423 (elf_backend_merge_gnu_properties): Likewise.
4424 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
4425 (elf_backend_parse_gnu_properties): Likewise.
4426 (elf_backend_setup_gnu_properties): Likewise.
4427 (elfNN_bed): Add elf_backend_parse_gnu_properties,
4428 elf_backend_merge_gnu_properties and
4429 elf_backend_setup_gnu_properties.
4431 2017-03-30 Pip Cet <pipcet@gmail.com>
4433 * elf32-wasm32.c: Add relocation code, two relocs.
4434 * reloc.c: Add wasm32 relocations.
4435 * libbfd.h: Regenerate.
4436 * bfd-in2.h: Regenerate.
4437 * bfd/po/bfd.pot: Regenerate.
4439 2017-03-29 Nick Clifton <nickc@redhat.com>
4442 * coff-bfd.h (struct coff_section_data): Add new fields:
4443 saved_bias and bias.
4444 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
4445 computed for PE binaries.
4446 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
4449 2017-03-28 Hans-Peter Nilsson <hp@axis.com>
4452 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
4453 to handle a local symbol with a hash-symbol-entry; without PLT.
4454 Add BFD_ASSERT for an incidental case with GOT entry present.
4455 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
4456 isn't forced-or-set local.
4458 2017-03-27 Pip Cet <pipcet@gmail.com>
4460 * wasm-module.c: New file to support WebAssembly modules.
4461 * wasm-module.h: New file to support WebAssembly modules.
4462 * doc/webassembly.texi: Start documenting wasm-module.c.
4463 * config.bfd: Add wasm_vec.
4464 * targets.c: Likewise.
4465 * configure.ac: Likewise.
4466 * Makefile.am: Add entries for wasm-module.c.
4467 * Makefile.in: Regenerate.
4468 * configure: Regenerate.
4469 * po/SRC-POTFILES.in: Regenerate.
4471 2017-03-27 Pip Cet <pipcet@gmail.com>
4473 * cpu-wasm32.c: New file to support wasm32 architecture.
4474 * elf32-wasm32.c: New file to support wasm32 architecture.
4475 * Makefile.am: Add wasm32 architecture.
4476 * archures.c: Likewise.
4477 * config.bfd: Likewise.
4478 * configure.ac: Likewise.
4479 * targets.c: Likewise.
4480 * Makefile.in: Regenerate.
4481 * bfd-in2.h: Regenerate.
4482 * configure: Regenerate.
4483 * po/SRC-POTFILES.in: Regenerate.
4485 2017-03-20 Alan Modra <amodra@gmail.com>
4488 * elf64-ppc.c (compare_symbols): Stabilize sort.
4490 2017-03-18 Alan Modra <amodra@gmail.com>
4492 * elf64-ppc.c (struct ppc_link_hash_table): Add
4493 local_ifunc_resolver and maybe_local_ifunc_resolver.
4494 (ppc_build_one_stub): Set flags on emitting dynamic
4495 relocation to ifunc.
4496 (ppc64_elf_relocate_section): Likewise.
4497 (ppc64_elf_finish_dynamic_symbol): Likewise.
4498 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
4499 local dynamic relocs to ifuncs.
4500 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
4501 local_ifunc_resolver and maybe_local_ifunc_resolver.
4502 (ppc_elf_relocate_section): Set flag on emitting dynamic
4503 relocation to ifuncs.
4504 (ppc_elf_finish_dynamic_symbol): Likewise.
4505 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
4506 dynamic relocs to ifuncs.
4508 2017-03-13 Nick Clifton <nickc@redhat.com>
4511 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
4512 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
4513 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
4514 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
4515 * bfd-in2.h: Regenerate.
4516 * libbfd.h: Regenerate.
4517 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
4519 (IS_AARCH64_TLSDESC_RELOC): Likewise.
4520 (elfNN_aarch64_howto_table): Likewise.
4521 (aarch64_tls_transition_without_check): Likewise.
4522 (aarch64_reloc_got_type): Likewise.
4523 (elfNN_aarch64_final_link_relocate): Likewise.
4524 (elfNN_aarch64_tls_relax): Likewise.
4525 (elfNN_aarch64_relocate_section): Likewise.
4526 (elfNN_aarch64_gc_sweep_hook): Likewise.
4527 (elfNN_aarch64_check_relocs): Likewise.
4528 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
4529 (_bfd_aarch64_elf_resolve_relocation): Likewise.
4531 2017-03-11 Alan Modra <amodra@gmail.com>
4533 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
4534 parameter is in fact used. Whitespace fixes.
4535 * elf64-ppc.c: Likewise.
4537 2017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
4539 * rs6000-core.c (CORE_NEW): Simplify macro when
4540 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
4542 2017-03-07 Alan Modra <amodra@gmail.com>
4546 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
4549 2017-03-05 Alan Modra <amodra@gmail.com>
4551 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
4552 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
4553 (next_cie_fde_offset): New function.
4554 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
4555 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
4556 four bytes. Align CIEs to four or eight bytes depending on
4557 per_encoding_aligned8. Align FDEs according to their encoding.
4558 Pad last FDE to output section alignment.
4559 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
4561 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
4562 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
4563 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
4565 2017-03-02 Martin Bickel <binutils@ineranves.de>
4568 * elf.c (rewrite_elf_program_header): Do not issue a warning for
4569 empty segments which have a zero filesz, but a non-zero memsz.
4571 2017-03-02 Alan Modra <amodra@gmail.com>
4573 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
4575 2017-02-28 Alan Modra <amodra@gmail.com>
4577 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
4578 (ppc64_elf_relocate_section): Likewise.
4580 2017-02-28 Alan Modra <amodra@gmail.com>
4583 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
4584 rather than elf32_nios2_hash_table or elf_hash_table.
4585 (create_got_section): Likewise.
4586 (nios2_elf32_finish_dynamic_symbol): Likewise.
4587 (nios2_elf32_adjust_dynamic_symbol): Likewise.
4588 (nios2_elf32_size_dynamic_sections): Likewise.
4589 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
4590 vars. Use htab equivalents directly instead. Don't create
4591 all dynamic sections on needing just the GOT. Use a goto
4592 rather than a fall-through with reloc test. Ensure
4593 htab->dynobj is set when making dynamic sreloc section.
4594 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
4595 equivalent directly instead. Don't segfault on looking for
4596 .dynamic when dynamic sections have not been created. Don't
4597 segfault on .got.plt being discarded.
4598 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
4599 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
4600 fixme and another not so relevant comment.
4601 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
4602 already set, set hash table dynobj on creating .sbss.
4604 2017-02-28 Alan Modra <amodra@gmail.com>
4606 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
4607 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
4608 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
4609 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
4610 (ppc64_elf_relocate_section): Likewise.
4611 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
4612 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
4613 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
4614 * libbfd.h: Regenerate.
4615 * bfd-in2.h: Regenerate.
4617 2017-02-28 Alan Modra <amodra@gmail.com>
4619 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
4620 dynamic .data.rel.ro read-only.
4621 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
4622 rather than section flags when deciding where copy reloc goes.
4623 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
4624 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
4625 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
4626 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
4627 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
4628 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
4629 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
4630 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
4631 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
4632 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
4633 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
4634 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
4635 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
4636 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
4637 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
4638 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
4639 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
4640 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
4641 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
4643 2017-02-28 Maciej W. Rozycki <macro@imgtec.com>
4645 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
4646 `jalr $0, $25' instruction encoding.
4648 2017-02-27 Nick Clifton <nickc@redhat.com>
4651 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
4652 generating a seg-fault when encountering a symbol that has been
4653 deleted by garbage collection.
4655 2017-02-25 Alan Modra <amodra@gmail.com>
4657 * elf32-arc.c (struct dynamic_sections): Delete.
4658 (enum dyn_section_types): Delete.
4659 (dyn_section_names): Delete.
4660 (arc_create_dynamic_sections): Delete.
4661 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
4662 segfault on discarded .rela.plt section.
4663 (elf_arc_size_dynamic_sections): Formatting. Don't call
4664 arc_create_dynamic_sections. Don't allocate memory for sections
4665 handled by the generic linker. Correct code finding relocs in
4666 read-only sections. Set SEC_EXCLUDE on zero size .got,
4667 .got.plt, and .dynbss sections. Do set .interp for pies.
4669 2017-02-24 Andrew Waterman <andrew@sifive.com>
4671 * elfnn-riscv.c (GP_NAME): New macro.
4672 (riscv_global_pointer_value): Use it.
4673 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
4674 output section, consider only that section's alignment.
4676 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
4678 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
4679 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
4680 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
4681 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
4683 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
4685 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
4686 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
4689 2017-02-23 Alan Modra <amodra@gmail.com>
4692 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
4694 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
4695 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
4698 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
4701 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
4702 processing ahead of the call to `elf_gc_sweep_symbol'.
4704 2017-02-22 Nick Clifton <nickc@redhat.com>
4707 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
4708 created section 4-byte alignment.
4710 2017-02-22 Alan Modra <amodra@gmail.com>
4712 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
4713 on .got or .plt output section being discarded by script.
4714 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
4717 2017-02-21 Alan Modra <amodra@gmail.com>
4719 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
4720 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
4722 2017-02-20 Alan Modra <amodra@gmail.com>
4725 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
4726 if DT_RELSZ/DT_RELASZ is zero.
4728 2017-02-17 Nick Clifton <nickc@redhat.com>
4730 * compress.c (bfd_get_full_section_contents): Remember to reduce
4731 compressed size by the sizeof the compression header when
4732 decompressing the contents.
4734 2017-02-17 Pedro Alves <palves@redhat.com>
4736 * srec.c (Chunk): Rename to ...
4737 (_bfd_srec_len): ... this.
4738 (S3Forced): Rename to ...
4739 (_bfd_srec_forceS3): ... this.
4740 * objcopy.c: Adjust all references.
4742 2017-02-17 Pedro Alves <palves@redhat.com>
4744 * archive.c (bsd_write_armap): Rename to ...
4745 (_bfd_bsd_write_armap): ... this.
4746 (coff_write_armap): Rename to ...
4747 (_bfd_coff_write_armap): ... this.
4748 * libbfd-in.h (bsd_write_armap): Rename to ...
4749 (_bfd_bsd_write_armap): ... this.
4750 (coff_write_armap): Rename to ...
4751 (_bfd_coff_write_armap): ... this.
4752 * aout-target.h, aout-tic30.c: Adjust all users.
4753 * libbfd.h: Regenerate.
4755 2017-02-17 Pedro Alves <palves@redhat.com>
4757 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
4758 (warn_deprecated): Rename to ...
4759 (_bfd_warn_deprecated): ... this.
4760 * libbfd.c (warn_deprecated): Rename to ...
4761 (_bfd_warn_deprecated): ... this.
4762 * bfd-in2.h: Regenerate.
4764 2017-02-17 Pedro Alves <palves@redhat.com>
4766 * bfdio.c (real_ftell): Rename to ...
4767 (_bfd_real_ftell): ... this.
4768 (real_fseek): Rename to ...
4769 (_bfd_real_fseek): ... this.
4770 (real_fopen): Rename to ...
4771 (_bfd_real_fopen): ... this.
4772 * libbfd-in.h (real_ftell): Rename to ...
4773 (_bfd_real_ftell): ... this.
4774 (real_fseek): Rename to ...
4775 (_bfd_real_fseek): ... this.
4776 (real_fopen): Rename to ...
4777 (_bfd_real_fopen): ... this.
4778 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
4779 * libbfd.h: Regenerate.
4781 2017-02-17 Pedro Alves <palves@redhat.com>
4783 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
4784 * libbfd.c (read_unsigned_leb128): Rename to ...
4785 (_bfd_read_unsigned_leb128): ... this.
4786 (read_signed_leb128): Rename to ...
4787 (_bfd_read_signed_leb128): ... this.
4788 (safe_read_leb128): Rename to ...
4789 (_bfd_safe_read_leb128): ... this.
4790 * libbfd-in.h (read_unsigned_leb128): Rename to ...
4791 (_bfd_read_unsigned_leb128): ... this.
4792 (read_signed_leb128): Rename to ...
4793 (_bfd_read_signed_leb128): ... this.
4794 (safe_read_leb128): Rename to ...
4795 (_bfd_safe_read_leb128): ... this.
4796 * libbfd.h: Renegerate.
4798 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
4800 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
4801 before trying to fine matching file and line information.
4803 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
4805 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
4806 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
4807 not match current bfd, then reload debug information. Record bfd
4808 we're loading debug info for in the stash. If we have debug
4809 informatin in the cache then perform section placement before
4812 2017-02-16 Alan Modra <amodra@gmail.com>
4815 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
4816 * elfxx-target.h (elf_backend_no_page_alias): Define.
4817 (elfNN_bed): Init new field.
4818 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
4819 ensure PT_LOAD segment starts on a new page.
4820 * elf32-hppa.c (elf_backend_no_page_alias): Define.
4822 2017-02-16 Alan Modra <amodra@gmail.com>
4825 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
4828 2017-02-16 Jiong Wang <jiong.wang@arm.com>
4830 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
4831 * bfd-in2.h: Regenerated.
4833 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
4836 * elf32-i386.c (elf_i386_relocate_section): Allow
4837 "lea foo@GOT, %reg" in PIC.
4839 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
4842 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
4843 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
4844 error against local IFUNC symbol without a base register for
4847 2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
4849 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
4850 `%P: %H:' with `info->callbacks->einfo'.
4851 (ppc_elf_relocate_section): Likewise.
4852 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
4853 (ppc64_elf_edit_toc): Likewise.
4854 (ppc64_elf_relocate_section): Likewise.
4856 2017-02-14 Alan Modra <amodra@gmail.com>
4858 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
4859 --gc-keep-exported, and test versioned field of sym rather than
4860 looking for @ in name.
4862 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
4864 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
4867 2017-02-13 Nick Clifton <nickc@redhat.com>
4870 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
4873 2017-02-07 Andrew Waterman <andrew@sifive.com>
4875 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
4876 entry size if PLT header is written.
4878 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
4880 Fix sparc64 dynamic relocation processing to use the dynamic
4882 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
4883 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
4886 2017-02-03 Nick Clifton <nickc@redhat.com>
4889 * coffcode.h (coff_write_object_contents): Enlarge size of
4890 s_name_buf in order to avoid compile time warning about possible
4892 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
4893 32-bits of insn value before printing into buffer.
4895 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4897 * elfxx-mips.c (mips_elf_hash_sort_data): Add
4898 `max_local_dynindx'.
4899 (mips_elf_sort_hash_table): Handle it.
4900 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
4901 symbols bump up `max_local_dynindx' rather than
4902 `max_non_got_dynindx'.
4904 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4906 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
4907 `min_got_dynindx', `max_unref_got_dynindx' and
4908 `max_non_got_dynindx' members to the `bfd_size_type' data type.
4909 (mips_elf_sort_hash_table): Adjust accordingly.
4911 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4913 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
4914 to access the hash table.
4916 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4918 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
4919 non-NULL `htab' to the beginning.
4921 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4923 * elflink.c (elf_gc_sweep): Wrap overlong line.
4925 2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
4927 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
4928 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
4929 * elfxx-mips.c (mips_elf_link_hash_table): Add
4930 `ignore_branch_isa' member.
4931 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
4932 in branch relocation calculation as an error if
4933 `ignore_branch_isa' has been set.
4934 (_bfd_mips_elf_insn32): Rename to...
4935 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
4936 parameter to `insn32' and add an `ignore_branch_isa' parameter.
4937 Handle the new parameter.
4939 2017-01-27 Hans-Peter Nilsson <hp@axis.com>
4941 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
4942 local variable dynobj.
4945 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
4946 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
4947 executable from read-only sections into sdynrelro.
4948 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
4949 dynamic relocs in sdynrelro.
4950 (elf_backend_want_dynrelro): Define.
4952 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4954 * config.bfd (*-*-rtemsaout*): Mark as removed.
4956 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4958 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
4959 (arm-*-rtems*): Move to (arm*-*-eabi*).
4960 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
4961 (m68-*-rtems*): Move to (m68*-*-elf*).
4963 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4965 * config.bfd (*-*-rtemscoff*): Mark as removed.
4967 2017-01-24 Maciej W. Rozycki <macro@imgtec.com>
4970 * elflink.c (bfd_elf_record_link_assignment): Revert last
4971 change and don't ever clear `forced_local'. Set `mark'
4973 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
4975 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
4976 (bfd_elf_size_dynamic_sections): ... here.
4977 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
4978 and set `mark' instead in `__tls_get_addr_opt' processing.
4979 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
4981 2017-01-24 Alan Modra <amodra@gmail.com>
4983 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
4984 where dynamic relocs are preferable. Allow ifunc too.
4985 (ensure_undefweak_dynamic): New function.
4986 (allocate_dynrelocs): Use it here. Move plt handling last and
4987 don't make symbols dynamic, simplifying loop. Only make undef
4988 weak symbols with GOT entries dynamic. Correct condition
4989 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
4990 comments. Remove goto.
4991 (ppc_elf_relocate_section): Correct test for using dynamic
4992 symbol on GOT relocs. Rearrange test for emitting GOT relocs
4993 to suit. Set up explicit tls_index entries and implicit GOT
4994 tls_index entries resolvable at link time for
4995 __tls_get_addr_opt. Simplify test to clear mem for prelink.
4996 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
4997 (ensure_undefweak_dynamic): New function.
4998 (allocate_dynrelocs): Use it here. Only make undef weak symbols
4999 with GOT entries dynamic. Remove unnecessary test of
5000 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
5001 (ppc64_elf_relocate_section): Correct test for using dynamic
5002 symbol on GOT relocs. Rearrange test for emitting GOT relocs
5003 to suit. Set up explicit tls_index entries and implicit GOT
5004 tls_index entries resolvable at link time for __tls_get_addr_opt.
5005 Simplify expression to clear mem for prelink.
5007 2017-01-23 Yury Norov <ynorov@caviumnetworks.com>
5009 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
5011 2017-01-20 Jiong Wang <jiong.wang@arm.com>
5013 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
5014 (elf_backend_hash_symbol): Define.
5016 2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
5019 * elflink.c (bfd_elf_record_link_assignment): Clear any
5020 `forced_local' marking for DSO symbols that are not being
5023 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
5025 * elfnn-riscv.c (riscv_elf_object_p): New function.
5027 2017-01-12 H.J. Lu <hongjiu.lu@intel.com>
5030 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
5032 (elf_x86_64_check_relocs): Create .eh_frame section for the
5034 (elf_x86_64_size_dynamic_sections): Allocate and initialize
5035 .eh_frame section for the .plt.bnd section.
5036 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
5037 for the .plt.bnd section.
5039 2017-01-12 Nick Clifton <nickc@redhat.com>
5042 * opncls.c (find_separate_debug_file): Add include_dirs
5043 parameter. Only include the directory part of the bfd's filename
5044 in search paths if include_dirs is true. Add a couple of extra
5045 locations for looking for debug files.
5046 ( bfd_follow_gnu_debuglink): Update invocation of
5047 find_separate_debug_file.
5048 (bfd_follow_gnu_debugaltlink): Likewise.
5049 (get_build_id): New function: Finds the build-id of the given bfd.
5050 (get_build_id_name): New function: Computes the name of the
5051 separate debug info file for a bfd, based upon its build-id.
5052 (check_build_id_file): New function: Checks to see if a separate
5053 debug info file exists at the given location, and that its
5054 build-id matches that of the original bfd.
5055 (bfd_follow_build_id_debuglink): New function: Finds a separate
5056 debug info file for a given bfd by using the build-id method.
5057 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
5058 method of locating a separate debug info file before using the
5060 * bfd-in2.h: Regenerate.
5062 2017-01-11 H.J. Lu <hongjiu.lu@intel.com>
5065 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
5066 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
5067 elf_x86_64_eh_frame_plt_got.
5068 (elf_x86_64_size_dynamic_sections): Get unwind info from
5069 elf_x86_64_bnd_arch_bed for the BND PLT.
5071 2017-01-11 Jeremy Soller <jackpot51@gmail.com>
5073 * config.bfd: Add entries for i686-redox and x86_64-redox.
5075 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
5077 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
5079 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
5080 .eh_frame section to 4 bytes for x32.
5081 (elf_x86_64_check_relocs): Likewise.
5083 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
5086 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
5087 (PLT_GOT_FDE_LENGTH): Likewise.
5088 (elf_i386_plt_layout): Add eh_frame_plt_got and
5089 eh_frame_plt_got_size.
5090 (elf_i386_plt): Updated.
5091 (elf_i386_link_hash_table): Add plt_got_eh_frame.
5092 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
5093 (elf_i386_size_dynamic_sections): Allocate and initialize
5094 .eh_frame section for .plt.got.
5095 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
5097 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
5098 eh_frame_plt_got_size.
5099 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
5100 (PLT_GOT_FDE_LENGTH): Likewise.
5101 (elf_x86_64_backend_data): Add eh_frame_plt_got and
5102 eh_frame_plt_got_size.
5103 (elf_x86_64_arch_bed): Updated.
5104 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
5105 eh_frame_plt_got_size.
5106 (elf_x86_64_nacl_arch_bed): Likewise.
5107 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
5108 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
5109 (elf_x86_64_size_dynamic_sections): Allocate and initialize
5110 .eh_frame section for .plt.got.
5111 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
5114 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
5116 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
5117 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
5119 2017-01-09 Nick Clifton <nickc@redhat.com>
5121 * dwarf2.c (lookup_address_in_function_table): Return early if
5122 there are no functions in the given comp unit, or if the high
5123 address of the last function in the comp unit is less than the
5126 2017-01-09 Nick Clifton <nickc@redhat.com>
5129 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
5130 message if there are too many symbols to load.
5132 2017-01-04 James Clarke <jrtc27@jrtc27.com>
5134 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
5135 if relocs are cached.
5137 2017-01-03 Rich Felker <bugdal@aerifal.cx>
5140 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
5141 for R_MICROBLAZE_GOTOFF_64.
5143 2017-01-03 Nick Clifton <nickc@redhat.com>
5145 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
5146 warning about using a possibly uninitialised variable.
5148 2017-01-02 Alan Modra <amodra@gmail.com>
5150 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
5151 (allocate_plt_static, allocate_dynrelocs): Use it.
5153 2017-01-02 Alan Modra <amodra@gmail.com>
5155 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
5156 .PARISC.unwind section.
5158 2017-01-02 Alan Modra <amodra@gmail.com>
5161 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
5162 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
5163 indirect to GOT pointer relative code edit.
5165 2017-01-02 Alan Modra <amodra@gmail.com>
5167 Update year range in copyright notice of all files.
5169 For older changes see ChangeLog-2016
5171 Copyright (C) 2017 Free Software Foundation, Inc.
5173 Copying and distribution of this file, with or without modification,
5174 are permitted in any medium without royalty provided the copyright
5175 notice and this notice are preserved.
5181 version-control: never