1 2017-11-13 Jan Beulich <jbeulich@suse.com>
3 * coff-tic80.c (COFF_ENCODE_ALIGNMENT, COFF_DECODE_ALIGNMENT):
5 * coffcode.h (coff_set_alignment_hook): Drop tic80 special case.
6 (coff_write_object_contents): Likewise. Issue diagnostic for too
9 2017-11-12 H.J. Lu <hongjiu.lu@intel.com>
12 * elf.c (_bfd_elf_map_sections_to_segments): Remove PF_X from
15 2017-11-12 Alan Modra <amodra@gmail.com>
17 * elflink.c (elf_link_add_object_symbols): Ignore anything but
18 defined and defweak symbols when setting up weakdefs.
20 2017-11-12 Alan Modra <amodra@gmail.com>
22 * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Set non_got_ref
23 to keep dyn_relocs, clear to discard. Comment.
24 (allocate_dynrelocs): Always clear non_got_ref when clearing
25 dyn_relocs in non-pic case. Invert non_got_ref test. Also test
26 dynamic_adjusted and ELF_COMMON_DEF_P. Move code deleting
27 dyn_relocs on undefined syms to handle for non-pic too.
28 (elf32_hppa_relocate_section): Simplify test for non-pic dyn relocs.
29 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Set non_got_ref
30 to keep dyn_relocs, clear to discard. Comment.
31 (allocate_dynrelocs): Always clear non_got_ref when clearing
32 dyn_relocs in non-pic case. Invert non_got_ref test. Also test
33 dynamic_adjusted and ELF_COMMON_DEF_P. Move code deleting
34 dyn_relocs on undefined syms to handle for non-pic too.
35 (ppc_elf_relocate_section): Simplify test for non-pic dyn relocs.
36 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Discard
37 dyn_relocs here. Don't bother setting non_got_ref. Comment.
38 (allocate_dynrelocs): Delete special handling of non-pic ELFv2
39 ifuncs. Move code deleting dyn_relocs on undefined symbols to
40 handle for non-pic too. Don't test non_got_ref. Do test
41 dynamic_adjusted and ELF_COMMON_DEF_P.
43 2017-11-08 Djordje Todorovic <djordje.todorovic@rt-rk.com>
45 * elf32-mips.c (elf32_mips_grok_psinfo): Extract core->pid.
46 * elf64-mips.c (elf64_mips_grok_psinfo): Likewise.
47 * elfn32-mips.c (elf32_mips_grok_psinfo): Likewise.
49 2017-11-08 Djordje Todorovic <djordje.todorovic@rt-rk.com>
51 * elf32-mips.c (elf32_mips_write_core_note): New function.
52 (elf_backend_write_core_note): New macro.
53 * elf64-mips.c (elf64_mips_write_core_note): New function.
54 (elf_backend_write_core_note): New macro.
55 * elfn32-mips.c (elf32_mips_write_core_note): New function.
56 (elf_backend_write_core_note): New macro.
58 2017-11-07 Alan Modra <amodra@gmail.com>
60 * elf64-ppc.c (ppc64_elf_build_stubs): Correct pluralization in
63 2017-11-07 Alan Modra <amodra@gmail.com>
65 * sysdep.h: Formatting, comment fixes.
66 (gettext, ngettext): Redefine when ENABLE_NLS.
67 (ngettext, dngettext, dcngettext): Define when !ENABLE_NLS.
68 (_): Define using gettext.
69 (textdomain, bindtextdomain): Use safer "do nothing".
70 * hosts/alphavms.h (textdomain, bindtextdomain): Likewise.
71 (ngettext, dngettext, dcngettext): Define when !ENABLE_NLS.
73 2017-11-05 Alan Modra <amodra@gmail.com>
76 * bfd.c (_bfd_doprnt_scan): Check args index before storing, not
79 2017-11-05 Alan Modra <amodra@gmail.com>
82 * bfd.c (union _bfd_doprnt_args): New.
83 (PRINT_TYPE): Add FIELD arg. Take value from args.
84 (_bfd_doprnt): Replace ap parameter with args. Adjust all
85 PRINT_TYPE invocations and reading of format args to suit.
86 Move "%%" handling out of switch handling args. Support
87 positional parameters.
88 (_bfd_doprnt_scan): New function.
89 (error_handler_internal): Call _bfd_doprnt_scan and read args.
91 2017-11-04 Alan Modra <amodra@gmail.com>
93 * elf32-ppc.c (got_entries_needed, got_relocs_needed): New functions.
94 (allocate_dynrelocs, ppc_elf_size_dynamic_sections): Use them here.
95 (ppc_elf_relocate_section): Don't output a dynamic relocation
96 for IE GOT entries in an executable.
97 * elf64-ppc.c (allocate_got): Trim unnecessary TPREL relocs.
98 (ppc64_elf_size_dynamic_sections): Likewise.
99 (ppc64_elf_relocate_section): Likewise.
101 2017-11-04 Alan Modra <amodra@gmail.com>
103 * elf32-ppc.c (readonly_dynrelocs): Delete info param. Update all
104 callers. Don't bother with SEC_ALLOC test. Return section pointer.
106 (maybe_set_textrel): ..here.
107 * elf64-ppc.c (readonly_dynrelocs): Return section pointer.
108 (maybe_set_textrel): Call minfo to print textrel warning to map file.
110 2017-11-04 Alan Modra <amodra@gmail.com>
112 * elf32-hppa.c (enum _tls_type): Move.
113 (struct elf32_hppa_link_hash_entry): Make tls_type a bitfield.
114 (elf32_hppa_check_relocs): Set DF_STATIC_TLS only for shared libraries.
115 Tidy tls_type handling. Set symbol tls_type for GOT_TLS_LDM too.
116 (got_entries_needed, got_relocs_needed): New functions.
117 (allocate_dynrelocs): Use them.
118 (elf32_hppa_size_dynamic_sections): Likewise.
119 (elf32_hppa_relocate_section): Delete bogus FIXME. Formatting.
120 Correct code emitting relocs on GD/IE got entries. Report an
121 error when a symbol has both normal and TLS GOT relocs.
123 2017-11-04 Alan Modra <amodra@gmail.com>
126 * elf32-hppa.c (elf32_hppa_check_relocs): Don't create dyn_relocs
127 for plabels when non-pic.
128 (maybe_set_textrel): New function.
129 (readonly_dynrelocs): Move and rewrite.
130 (elf32_hppa_adjust_dynamic_symbol): Use it. Don't create copy
131 relocs when def_regular or -z nocopyreloc. Handle non_got_ref
132 for functions. Expand non_got_ref comments.
133 (elf32_hppa_size_dynamic_sections): Use maybe_set_textrel.
135 2017-11-03 H.J. Lu <hongjiu.lu@intel.com>
137 * elf32-i386.c (elf_i386_check_relocs): Set plt.refcount to 1.
138 Don't use func_pointer_refcount. Don't set plt.refcount nor
139 non_got_ref for function pointer reference.
140 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
141 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Don't use
142 func_pointer_refcount.
143 (_bfd_x86_elf_copy_indirect_symbol): Don't copy
144 func_pointer_refcount.
145 (_bfd_x86_elf_hide_symbol): Don't use func_pointer_refcount.
146 * elfxx-x86.h (GENERATE_DYNAMIC_RELOCATION_P): Likewise.
147 (elf_x86_link_hash_entry): Remove func_pointer_refcount.
149 2017-11-03 Mingi Cho <mgcho.minic@gmail.com>
150 Nick Clifton <nickc@redhat.com>
153 * coffgen.c (_bfd_coff_get_external_symbols): Check for an
154 overlarge raw syment count.
155 (coff_get_normalized_symtab): Likewise.
157 2017-11-01 James Bowman <james.bowman@ftdichip.com>
159 * archures.c: Add bfd_mach_ft32b.
160 * cpu-ft32.c: Add arch_info_struct.
161 * elf32-ft32.c: Add R_FT32_RELAX, SC0, SC1,
163 (ft32_elf_relocate_section): Add clauses for R_FT32_SC0, SC1,
165 (ft32_reloc_shortable, elf32_ft32_is_diff_reloc)
166 (elf32_ft32_adjust_diff_reloc_value)
167 (elf32_ft32_adjust_reloc_if_spans_insn)
168 (elf32_ft32_relax_delete_bytes, elf32_ft32_relax_is_branch_target)
169 (ft32_elf_relax_section): New function.
170 * reloc.c: Add BFD_RELOC_FT32_RELAX, SC0, SC1, DIFF32.
171 * bfd-in2.h: Regenerate.
172 * libbfd.h: Regenerate.
174 2017-11-01 Nick Clifton <nickc@redhat.com>
177 * coffcode.h (coff_slurp_line_table): Check for an excessively
178 large line number count.
180 2017-11-01 Nick Clifton <nickc@redhat.com>
183 * peicode.h (pe_bfd_read_buildid): Revise check for invalid size
184 and offset in light of further possible bogus values.
186 2017-11-01 Alan Modra <amodra@gmail.com>
189 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't create a plt
190 entry when just a dynamic reloc can serve. Ensure no dynamic
191 relocations when UNDEFWEAK_NO_DYNAMIC_RELOC by setting non_got_ref.
192 Expand and move the non_got_ref comment.
193 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
195 2017-11-01 Nick Clifton <nickc@redhat.com>
198 * coffgen.c (_bfd_coff_free_symbols): Fail if called on a non-COFF
200 * cofflink.c (coff_link_check_archive_element): Skip non-COFF
201 members of an archive.
203 2017-10-31 Nick Clifton <nickc@redhat.com>
206 * peicode.h (pe_bfd_read_buildid): Check for invalid size and data
209 2017-10-30 Alan Modra <amodra@gmail.com>
211 * elf32-frv.c (ELF_TARGET_ID): Don't define for generic
214 * elflink.c (elf_gc_sweep): Test elf_object_id in addition to
216 (bfd_elf_gc_sections): Likewise.
218 2017-10-30 Alan Modra <amodra@gmail.com>
221 * elf32-hppa.c (elf32_hppa_check_relocs): Move SEC_ALLOC test to
222 ensure non_got_ref is not set due to debug references.
223 (elf32_hppa_adjust_dynamic_symbol): Tidy plabel handling. Use
224 SYMBOL_CALLS_LOCAL and UNDEFWEAK_NO_DYNAMIC_RELOC when determining
225 need for a plt entry.
226 (allocate_dynrelocs): Similarly for got entries. Tidy code discarding
227 dynamic relocs when pic. Remove bogus code attempting to handle
229 (elf32_hppa_relocate_section): Similarly. Delete resolved_to_zero
231 (elf32_hppa_finish_dynamic_symbol): Use UNDEFWEAK_NO_DYNAMIC_RELOC
232 and SYMBOL_REFERENCES_LOCAL in GOT handling.
234 2017-10-28 Alan Modra <amodra@gmail.com>
237 * elflink.c (_bfd_elf_merge_symbol): Remove relocs_compatible check.
238 * elf32-hppa.c (elf_backend_relocs_compatible): Define.
239 * elf32-ppc.c (elf_backend_relocs_compatible): Define.
240 * elf64-ppc.c (elf_backend_relocs_compatible): Define.
242 2017-10-25 Alan Modra <amodra@gmail.com>
244 * archive.c (_bfd_compute_and_write_armap): Match "__gnu_lto_slim"
245 optionally prefixed with "_".
246 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
248 2017-10-24 Andrew Waterman <andrew@sifive.com>
250 * elfnn-riscv.c (_bfd_riscv_relax_lui): Don't relax to c.lui
253 2017-10-24 Renlin Li <renlin.li@arm.com>
256 * elflink.c (_bfd_elf_merge_symbol): Handle multiple definition case.
258 2017-10-23 Nick Clifton <nickc@redhat.com>
261 * elflink.c (elf_link_output_extsym): Keep global undefined
262 symbols if they have been marked as needed.
264 2017-10-23 Maciej W. Rozycki <macro@imgtec.com>
266 * elfn32-mips.c (mips_elf_n32_mkobject): New prototype and
268 (bfd_elf32_mkobject): Use `mips_elf_n32_mkobject' rather than
269 `_bfd_mips_elf_mkobject'.
271 2017-10-22 Hans-Peter Nilsson <hp@axis.com>
274 * config.bfd (cris-*-* | crisv32-*-*): Require a 64-bit BFD.
276 2017-10-19 Palmer Dabbelt <palmer@dabbelt.com>
278 * elfnn-riscv.c (riscv_pcgp_hi_reloc): New structure.
279 (riscv_pcgp_lo_reloc): Likewise.
280 (riscv_pcgp_relocs): Likewise.
281 (riscv_init_pcgp_relocs): New function.
282 (riscv_free_pcgp_relocs): Likewise.
283 (riscv_record_pcgp_hi_reloc): Likewise.
284 (riscv_record_pcgp_lo_reloc): Likewise.
285 (riscv_delete_pcgp_hi_reloc): Likewise.
286 (riscv_use_pcgp_hi_reloc): Likewise.
287 (riscv_record_pcgp_lo_reloc): Likewise.
288 (riscv_find_pcgp_lo_reloc): Likewise.
289 (riscv_delete_pcgp_lo_reloc): Likewise.
290 (_bfd_riscv_relax_pc): Likewise.
291 (_bfd_riscv_relax_section): Handle R_RISCV_PCREL_* relocations
292 via the new functions above.
294 2017-10-19 Palmer Dabbelt <palmer@dabbelt.com>
296 * elfnn-riscv.c (R_RISCV_DELETE): New define.
297 (_bfd_riscv_relax_delete): New function.
298 (perform_relocation): Handle R_RISCV_DELETE.
299 (_bfd_riscv_relax_section): Likewise.
301 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
304 * elfxx-tilegx.c (tilegx_elf_tls_transition): Replace
305 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
306 bfd_link_executable for TLS check.
307 (tilegx_elf_check_relocs): Likewise.
308 (allocate_dynrelocs): Likewise.
309 (tilegx_elf_relocate_section): Likewise.
311 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
314 * elf32-tilepro.c (tilepro_elf_tls_transition): Replace
315 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
316 bfd_link_executable for TLS check.
317 (tilepro_elf_check_relocs): Likewise.
318 (allocate_dynrelocs): Likewise.
319 (tilepro_elf_relocate_section): Likewise.
321 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
324 * elfxx-sparc.c (sparc_elf_tls_transition): Replace
325 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
326 bfd_link_executable for TLS check.
327 (_bfd_sparc_elf_check_relocs): Likewise.
328 (allocate_dynrelocs): Likewise.
329 (_bfd_sparc_elf_relocate_section): Likewise.
331 2017-10-18 H.J. Lu <hongjiu.lu@intel.com>
333 * elf32-tilepro.c (tilepro_elf_gc_mark_hook): Call
334 _bfd_generic_link_add_one_symbol to mark __tls_get_addr.
335 * elfxx-tilegx.c (tilegx_elf_gc_mark_hook): Likewise.
337 2017-10-17 H.J. Lu <hongjiu.lu@intel.com>
339 * elf32-microblaze.c (microblaze_elf_check_relocs): Check for
340 indirect and warning symbols.
342 2017-10-17 Alan Modra <amodra@gmail.com>
345 * elf-properties.c (_bfd_elf_parse_gnu_properties): Compare datasz
346 against size left rather than comparing pointers. Reorganise loop.
348 2017-10-17 Alan Modra <amodra@gmail.com>
351 * aoutx.h (aout_get_external_symbols): Handle stringsize of zero,
352 and error for any other size that doesn't cover the header word.
354 2017-10-16 H.J. Lu <hongjiu.lu@intel.com>
356 * elf-bfd.h (elf_backend_data): Remove gc_sweep_hook.
357 * elf32-arm.c (elf32_arm_gc_sweep_hook): Removed.
358 (elf_backend_gc_sweep_hook): Likewise.
359 * elf32-bfin.c (bfin_gc_sweep_hook): Likewise.
360 (bfinfdpic_gc_sweep_hook): Likewise.
361 (elf_backend_gc_sweep_hook): Likewise.
362 * elf32-cr16.c (elf32_cr16_gc_sweep_hook): Likewise.
363 (elf_backend_gc_sweep_hook): Likewise.
364 * elf32-cris.c (cris_elf_gc_sweep_hook): Likewise.
365 (elf_backend_gc_sweep_hook): Likewise.
366 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Likewise.
367 (elf_backend_gc_sweep_hook): Likewise.
368 * elf32-lm32.c (lm32_elf_gc_sweep_hook): Likewise.
369 (elf_backend_gc_sweep_hook): Likewise.
370 * elf32-m32r.c (m32r_elf_gc_sweep_hook): Likewise.
371 (elf_backend_gc_sweep_hook): Likewise.
372 * elf32-m68k.c (elf_m68k_got_entry): Remove elf_m68k_gc_sweep_hook
374 (elf_m68k_remove_got_entry_type): Removed.
375 (elf_m68k_find_got_entry_ptr): Likewise.
376 (elf_m68k_remove_got_entry): Likewise.
377 (elf_m68k_gc_sweep_hook): Likewise.
378 (elf_backend_gc_sweep_hook): Likewise.
379 * elf32-mcore.c (mcore_elf_gc_sweep_hook): Likewise.
380 (elf_backend_gc_sweep_hook): Likewise.
381 * elf32-metag.c (elf_metag_gc_sweep_hook): Likewise.
382 (elf_backend_gc_sweep_hook): Likewise.
383 * elf32-microblaze.c (elf_backend_gc_sweep_hook): Likewise.
384 (elf_backend_gc_sweep_hook): Likewise.
385 * elf32-mips.c (elf_backend_gc_sweep_hook): Likewise.
386 (elf_backend_gc_sweep_hook): Likewise.
387 * elf32-nds32.c (nds32_elf_gc_sweep_hook): Likewise.
388 (elf_backend_gc_sweep_hook): Likewise.
389 * elf32-nios2.c (nios2_elf32_gc_sweep_hook): Likewise.
390 (elf_backend_gc_sweep_hook): Likewise.
391 * elf32-or1k.c (or1k_elf_gc_sweep_hook): Likewise.
392 (elf_backend_gc_sweep_hook): Likewise.
393 * elf32-ppc.c (ppc_elf_gc_sweep_hook): Likewise.
394 (elf_backend_gc_sweep_hook): Likewise.
395 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
396 (elf_backend_gc_sweep_hook): Likewise.
397 * elf32-sparc.c (elf_backend_gc_sweep_hook): Likewise.
398 * elf32-tic6x.c (elf32_tic6x_gc_sweep_hook): Likewise.
399 (elf_backend_gc_sweep_hook): Likewise.
400 * elf32-tilegx.c (elf_backend_gc_sweep_hook): Likewise.
401 * elf32-tilepro.c (tilepro_elf_gc_sweep_hook): Likewise.
402 (elf_backend_gc_sweep_hook): Likewise.
403 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
404 (elf_backend_gc_sweep_hook): Likewise.
405 * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Likewise.
406 (elf_backend_gc_sweep_hook): Likewise.
407 * elf64-alpha.c (elf64_alpha_gc_sweep_hook): Likewise.
408 (elf_backend_gc_sweep_hook): Likewise.
409 * elf64-mips.c (elf_backend_gc_sweep_hook): Likewise.
410 * elf64-mmix.c (mmix_elf_gc_sweep_hook): Likewise.
411 (elf_backend_gc_sweep_hook): Likewise.
412 * elf64-ppc.c (elf_backend_gc_sweep_hook): Likewise.
413 (ppc64_elf_gc_sweep_hook): Likewise.
414 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
415 (elf_backend_gc_sweep_hook): Likewise.
416 * elf64-sparc.c (elf_backend_gc_sweep_hook): Likewise.
417 * elf64-tilegx.c (elf_backend_gc_sweep_hook): Likewise.
418 * elflink.c (elf_link_add_object_symbols): Don't call
419 _bfd_elf_link_check_relocs here.
420 (gc_sweep_hook_fn): Removed.
421 (elf_gc_sweep): Remove gc_sweep_hook.
422 * elfnn-aarch64.c (elfNN_aarch64_gc_sweep_hook): Removed.
423 (elf_backend_gc_sweep_hook): Likewise.
424 * elfnn-riscv.c (riscv_elf_gc_sweep_hook): Likewise.
425 (elf_backend_gc_sweep_hook): Likewise.
426 * elfxx-mips.c (_bfd_mips_elf_gc_sweep_hook): Likewise.
427 * elfxx-mips.h (_bfd_mips_elf_gc_sweep_hook): Likewise.
428 (elf_backend_gc_sweep_hook): Likewise.
429 * elfxx-sparc.c (_bfd_sparc_elf_gc_sweep_hook): Likewise.
430 * elfxx-sparc.h (_bfd_sparc_elf_gc_sweep_hook): Likewise.
431 * elfxx-target.h (elf_backend_gc_sweep_hook): Likewise.
432 (elfNN_bed): Remove elf_backend_gc_sweep_hook.
433 * elfxx-tilegx.c (tilegx_elf_gc_sweep_hook): Removed.
434 * elfxx-tilegx.h (tilegx_elf_gc_sweep_hook): Likewise.
436 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
438 * elf32-i386.c (elf_i386_backend_data): Removed.
439 (get_elf_i386_backend_data): Likewise.
440 (elf_i386_arch_bed): Replace elf_i386_backend_data with
441 elf_x86_backend_data.
442 (elf_i386_get_synthetic_symtab): Likewise.
443 (elf_i386_nacl_arch_bed): Likewise.
444 (elf_i386_vxworks_arch_bed): Likewise.
445 (elf_i386_relocate_section): Check target_os instead of
447 (elf_i386_finish_dynamic_symbol): Likewise.
448 (elf_i386_finish_dynamic_sections): Use htab->plt0_pad_byte.
449 Check target_os instead of is_vxworks.
450 (elf_i386_link_setup_gnu_properties): Remove normal_target and
451 is_vxworks. Initialize plt0_pad_byte.
452 * elf64-x86-64.c (elf_x86_64_backend_data); Removed.
453 (get_elf_x86_64_arch_data): Likewise.
454 (get_elf_x86_64_backend_data): Likewise.
455 (elf_x86_64_arch_bed): Replace elf_x86_64_backend_data with
456 elf_x86_backend_data.
457 (elf_x86_64_get_synthetic_symtab): Likewise.
458 (elf_x86_64_nacl_arch_bed): Likewise.
459 (elf_x86_64_link_setup_gnu_properties): Remove is_vxworks and
460 normal_target. Initialize plt0_pad_byte.
461 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Check target_os
462 instead of is_vxworks.
463 (_bfd_x86_elf_size_dynamic_sections): Likewise.
464 (_bfd_x86_elf_finish_dynamic_sections): Likewise.
465 (_bfd_x86_elf_adjust_dynamic_symbol): Likewise.
466 (_bfd_x86_elf_link_hash_table_create): Initialize target_os.
467 (_bfd_x86_elf_link_setup_gnu_properties): Remove is_vxworks.
468 Update normal_target. Set up plt0_pad_byte. Check target_os
469 instead of is_vxworks.
470 * elfxx-x86.h (elf_x86_target_os): New.
471 (elf_x86_backend_data): Likewise.
472 (get_elf_x86_backend_data): Likewise.
473 (elf_x86_link_hash_table): Remove is_vxworks. Add plt0_pad_byte
475 (elf_x86_init_table): Remove normal_target and is_vxworks. Add
478 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
480 * elf32-i386.c (elf_i386_finish_dynamic_sections): Call
481 _bfd_x86_elf_finish_dynamic_sections.
482 * elf64-x86-64.c (elf_x86_64_finish_dynamic_sections): Likewise.
483 * elfxx-x86.c (_bfd_x86_elf_finish_dynamic_sections): New
485 * elfxx-x86.h (_bfd_x86_elf_finish_dynamic_sections): New
488 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
491 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
492 hide symbol which was forced to be dynamic.
494 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
497 * elf32-cris.c (cris_elf_relocate_section): Don't generate
498 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
499 (cris_elf_check_relocs): Don't allocate dynamic relocation
500 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
502 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
505 * elf32-sh.c (allocate_dynrelocs): Discard dynamic relocations
506 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
507 (sh_elf_relocate_section): Don't generate dynamic relocation if
508 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
510 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
513 * elf32-s390.c (allocate_dynrelocs): Discard dynamic
514 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
515 (elf_s390_relocate_section): Don't generate dynamic relocation
516 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
517 * elf64-s390.c (allocate_dynrelocs): Discard dynamic
518 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
519 (elf_s390_relocate_section): Don't generate dynamic relocation
520 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
522 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
525 * elf32-nios2.c (nios2_elf32_relocate_section): Don't generate
526 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
527 (allocate_dynrelocs): Discard dynamic relocations if
528 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
530 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
533 * elf32-microblaze.c (microblaze_elf_relocate_section): Don't
534 generate dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is
536 (allocate_dynrelocs): Discard dynamic relocations if
537 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
539 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
542 * elf32-m68k.c (elf_m68k_check_relocs): Don't allocate dynamic
543 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
544 (elf_m68k_adjust_dynamic_symbol): Don't make symbol dynamic if
545 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
546 (elf_m68k_relocate_section): Don't generate dynamic relocation
547 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
549 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
552 * elf32-hppa.c (ensure_undef_dynamic): Don't make undefined
553 symbol dynamic if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
554 (allocate_dynrelocs): Discard dynamic relocations if
555 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
556 (elf32_hppa_relocate_section): Don't generate dynamic
557 relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
559 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
562 * elfnn-ia64.c (elfNN_ia64_check_relocs): Don't allocate
563 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
564 (allocate_fptr): Don't allocate function pointer if
565 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
566 (allocate_dynrel_entries): Don't allocate dynamic relocation
567 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
568 (set_got_entry): Don't set GOT entry if
569 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
570 (set_pltoff_entry): Don't set PLTOFF entry if
571 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
572 (elfNN_ia64_relocate_section): Don't install dynamic relocation
573 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
575 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
578 * elfxx-mips.c (mips_elf_calculate_relocation): Don't generate
579 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
580 (allocate_dynrelocs): Don't allocate dynamic relocations if
581 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
583 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
586 * elf32-arm.c (elf32_arm_final_link_relocate): Don't generate
587 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
588 (allocate_dynrelocs_for_symbol): Discard dynamic relocations
589 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
591 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
594 * elf32-tilepro.c (allocate_dynrelocs): Discard dynamic
595 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
596 (tilepro_elf_relocate_section): Don't generate dynamic
597 relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
598 * elfxx-tilegx.c (allocate_dynrelocs): Discard dynamic
599 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
600 (tilegx_elf_relocate_section): Don't generate dynamic
601 relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
603 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
606 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Don't
607 generate dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is
609 (elfNN_aarch64_allocate_dynrelocs): Discard dynamic relocations
610 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
612 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
614 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Moved to ...
615 * elf-bfd.h (UNDEFWEAK_NO_DYNAMIC_RELOC): Here.
616 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Removed.
618 2017-10-12 James Bowman <james.bowman@ftdichip.com>
620 * bfd-in2.h: Regenerate.
621 * libbfd.h: Regenerate.
622 * elf32-ft32.c: Add HOWTO R_FT32_15.
623 * reloc.c: Add BFD_RELOC_FT32_15.
625 2017-10-12 Nick Clifton <nickc@redhat.com>
627 * reloc.c (enum bfd_reloc_status): Start values at 2.
628 * bfd-in2.h: Regenerate.
629 * elfnn-aarch64.c (aarch64_relocate): Invert sense of function, so
630 that a TRUE return indicates success. Compare the result of
631 calling _bfd_aarch64_elf_put_addend against bfd_reloc_ok.
632 (build_one_stub): Change sense of tests against aarch64_relocate
634 (elfNN_aarch64_tls_relax): Return bfd_reloc_notsupported, rather
635 than FALSE, when an error is detected.
636 (elfNN_aarch64_final_link_relocate): Likewise.
638 2017-10-12 H.J. Lu <hongjiu.lu@intel.com>
640 * elf32-i386.c (elf_backend_hide_symbol): New.
641 * elf64-x86-64.c (elf_backend_hide_symbol): Likewise.
642 * elfxx-x86.c (_bfd_x86_elf_hide_symbol): Likewise.
643 * elfxx-x86.h (_bfd_x86_elf_hide_symbol): Likewise.
645 2017-10-12 Alan Modra <amodra@gmail.com>
647 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Call
648 elf_backend_hide_symbol, not _bfd_elf_link_hash_hide_symbol.
649 (bfd_elf_define_start_stop): Likewise.
651 2017-10-12 Alan Modra <amodra@gmail.com>
653 * elf32-nds32.c (nds32_elf_size_dynamic_sections): Set .interp
654 when executable rather than non-PIC.
655 * elf32-score.c (s3_bfd_score_elf_size_dynamic_sections): Likewise.
656 * elf32-score7.c (s7_bfd_score_elf_size_dynamic_sections): Likewise.
658 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
660 * elf-bfd.h (elf_backend_data): Add `linux_prpsinfo64_ugid16'
662 * elf-linux-core.h (elf_external_linux_prpsinfo64): Rename to...
663 (elf_external_linux_prpsinfo64_ugid32): ... this.
664 (swap_linux_prpsinfo32_out): Rename to...
665 (swap_linux_prpsinfo32_ugid32_out): ... this.
666 (elf_external_linux_prpsinfo64_ugid16): New structure.
667 (swap_linux_prpsinfo64_ugid16_out): New function.
668 * elfxx-target.h [!elf_backend_linux_prpsinfo64_ugid16]
669 (elf_backend_linux_prpsinfo64_ugid16): Define.
670 (elfNN_bed): Initialize `linux_prpsinfo64_ugid16' member.
671 * elf.c (elfcore_write_linux_prpsinfo64): Handle both variants
672 of the 64-bit Linux core PRPSINFO note.
673 * elf64-sh64.c (elf_backend_linux_prpsinfo64_ugid16): Define.
675 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
677 * elf-bfd.h (elf_backend_data): Add `linux_prpsinfo32_ugid16'
679 (elfcore_write_ppc_linux_prpsinfo32): Remove prototype.
680 * elf32-ppc.c (elfcore_write_ppc_linux_prpsinfo32): Remove.
681 (elf_external_ppc_linux_prpsinfo32)
682 (swap_ppc_linux_prpsinfo32_out): Move to...
683 * elf-linux-core.h (elf_external_linux_prpsinfo32_ugid32)
684 (swap_linux_prpsinfo32_ugid32_out): ... these.
685 (elf_external_linux_prpsinfo32): Rename to...
686 (elf_external_linux_prpsinfo32_ugid16): ... this.
687 (swap_linux_prpsinfo32_out): Rename to...
688 (swap_linux_prpsinfo32_ugid16_out): ... this.
689 * elfxx-target.h [!elf_backend_linux_prpsinfo32_ugid16]
690 (elf_backend_linux_prpsinfo32_ugid16): Define.
691 (elfNN_bed): Initialize `linux_prpsinfo32_ugid16' member.
692 * elf.c (elfcore_write_linux_prpsinfo32): Handle both variants
693 of the 32-bit Linux core PRPSINFO note.
694 * elf32-am33lin.c (elf_backend_linux_prpsinfo32_ugid16): Define.
695 * elf32-arm.c (elf_backend_linux_prpsinfo32_ugid16): Define.
696 * elf32-cris.c (elf_backend_linux_prpsinfo32_ugid16): Define.
697 * elf32-frv.c (elf_backend_linux_prpsinfo32_ugid16): Define.
698 * elf32-i386.c (elf_backend_linux_prpsinfo32_ugid16): Define.
699 * elf32-m32r.c (elf_backend_linux_prpsinfo32_ugid16): Define.
700 * elf32-m68k.c (elf_backend_linux_prpsinfo32_ugid16): Define.
701 * elf32-s390.c (elf_backend_linux_prpsinfo32_ugid16): Define.
702 * elf32-sh.c (elf_backend_linux_prpsinfo32_ugid16): Define.
703 * elf32-sparc.c (elf_backend_linux_prpsinfo32_ugid16): Define.
705 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
707 * elf-linux-core.h (elf_external_linux_prpsinfo64): Move the
708 `gap' member ahead of `pr_flag'.
710 2017-10-11 Pedro Alves <palves@redhat.com>
712 * bfd.c (_doprnt): Rename to ...
713 (_bfd_doprnt): ... this.
714 (error_handler_internal): Adjust.
716 2017-10-10 H.J. Lu <hongjiu.lu@intel.com>
718 * elf32-i386.c (elf_i386_check_relocs): Set GOT refcount to 1
719 instead of incrementing it.
720 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
722 2017-10-10 Renlin Li <renlin.li@arm.com>
725 * elf32-arm.c (allocate_dynrelocs_for_symbol): Only make undefined weak
726 symbols into dynamic.
728 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
731 * elfnn-riscv.c (riscv_elf_link_hash_table): Add max_alignment.
732 (riscv_elf_link_hash_table_create): Initialize max_alignment to
734 (_bfd_riscv_relax_section): Cache the max alignment of output
735 sections if possible.
737 2017-10-10 Alan Modra <amodra@gmail.com>
739 * elf64-ppc.c (ppc64_elf_before_check_relocs): Set sec_type for
740 .opd whenever .opd is present and non-zero size. Move code
741 setting abiversion to/from output file earlier. Only set
742 u.opd.func_sec when --gc-sections. Read relocs and set up
743 u.opd.func_sec values here..
744 (ppc64_elf_check_relocs): ..rather than here. Simplify opd
746 (ppc64_elf_edit_opd): Don't set sec_type for .opd here.
748 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
750 * elf-m10300.c (mn10300_elf_check_relocs): Don't free cached
753 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
755 * elf32-bfin.c (bfin_size_dynamic_sections): Don't create the
756 .interp section with "ld --no-dynamic-linker".
758 2017-10-09 Alan Modra <amodra@gmail.com>
761 * dwarf2.c (_bfd_dwarf2_cleanup_debug_info): Free
762 funcinfo_hash_table and varinfo_hash_table.
764 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
766 * elf32-sh.c (readonly_dynrelocs): Dump dynamic relocation
767 in read-only section with minfo.
768 (sh_elf_size_dynamic_sections): Likewise.
770 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
772 * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Remove
775 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
777 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_sections): Set
778 this_hdr.sh_entsize only if section size > 0.
780 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
782 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Reformat.
784 2017-10-07 H.J. Lu <hongjiu.lu@intel.com>
786 * elfxx-sparc.c (readonly_dynrelocs): Dump dynamic relocation
787 in read-only section with minfo.
788 (_bfd_sparc_elf_size_dynamic_sections): Likewise.
790 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
792 * elfxx-x86.h (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Update
795 2017-10-06 John Baldwin <jhb@FreeBSD.org>
797 * elf-bfd.h (struct elf_backend_data): Add
798 `elf_backend_grok_freebsd_prstatus'.
799 * elf.c (elfcore_grok_freebsd_note): Call
800 `elf_backend_grok_freebsd_prstatus' to handle NT_PRSTATUS if
802 * elfn32-mips.c (elf_n32_mips_grok_freebsd_prstatus): New
804 (elf_backend_grok_freebsd_prstatus): Define.
805 * elfxx-target.h (elf_backend_grok_freebsd_prstatus): Define.
806 (elfNN_bed): Initialize `elf_backend_grok_freebsd_prstatus'.
808 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
810 * elf32-i386.c (elf_i386_check_relocs): Replace has_got_reloc
811 and has_non_got_reloc with zero_undefweak.
812 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
813 * elfxx-x86.c (_bfd_x86_elf_link_hash_newfunc): Initialize
815 (_bfd_x86_elf_copy_indirect_symbol): Replace has_got_reloc and
816 has_non_got_reloc with zero_undefweak.
817 * elfxx-x86.h (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Replace
818 has_got_reloc and has_non_got_reloc with zero_undefweak.
819 (elf_x86_link_hash_entry): Likewise.
821 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
823 * elfxx-x86.h (COPY_INPUT_RELOC_P): Add "do/while(0);".
824 (VERIFY_COPY_RELOC): Likewise.
826 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
828 * elfxx-x86.h (VERIFY_COPY_RELOC): New.
829 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Use it.
830 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
832 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
834 * elfxx-x86.h (VERIFY_PLT_ENTRY): New.
835 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Use it.
836 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
838 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
840 * elfxx-x86.h (COPY_INPUT_RELOC_P): New.
841 * elf32-i386.c (elf_i386_relocate_section): Use it.
842 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
844 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
846 * elf32-i386.c (X86_SIZE_TYPE_P): New.
847 (elf_i386_relocate_section): Use GENERATE_DYNAMIC_RELOCATION_P.
848 * elf64-x86-64.c (X86_SIZE_TYPE_P): New.
849 (elf_x86_64_relocate_section): Use GENERATE_DYNAMIC_RELOCATION_P.
850 * elfxx-x86.h (GENERATE_DYNAMIC_RELOCATION_P): New.
852 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
854 * elfxx-x86.h (POINTER_LOCAL_IFUNC_P): New.
855 (PLT_LOCAL_IFUNC_P): Likewise.
856 * elf32-i386.c (elf_i386_relocate_section): Use them.
857 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
859 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
861 * elfxx-x86.h (GENERATE_RELATIVE_RELOC_P): New.
862 * elf32-i386.c (elf_i386_relocate_section): Use it.
863 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
865 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
867 * elfxx-x86.h (RESOLVED_LOCALLY_P): New.
868 * elf32-i386.c (elf_i386_relocate_section): Use it.
869 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
871 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
873 * elf32-i386.c (X86_PCREL_TYPE_P): New.
874 (elf_i386_check_relocs): Use NEED_DYNAMIC_RELOCATION_P.
875 * elf64-x86-64.c (IS_X86_64_PCREL_TYPE): Renamed to ...
876 (X86_PCREL_TYPE_P): This.
877 (elf_x86_64_check_relocs): Use NEED_DYNAMIC_RELOCATION_P.
878 Replace IS_X86_64_PCREL_TYPE with X86_PCREL_TYPE_P.
879 (elf_x86_64_relocate_section): Replace IS_X86_64_PCREL_TYPE with
881 * elfxx-x86.h (NEED_DYNAMIC_RELOCATION_P): New.
883 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
885 * elfxx-x86.h (TLS_TRANSITION_IE_TO_LE_P): New.
886 * elf32-i386.c (elf_i386_tls_transition): Use it.
887 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
889 2017-10-05 H.J. Lu <hongjiu.lu@intel.com>
891 * elf32-ppc.c (readonly_dynrelocs): Add a link_info argument.
892 Dump dynamic relocation in read-only section with minfo if
894 (ppc_elf_adjust_dynamic_symbol): Pass NULL to readonly_dynrelocs.
895 (maybe_set_textrel): Likewise.
896 (ppc_elf_size_dynamic_sections): Dump dynamic relocation in
897 read-only section with minfo.
899 2017-10-05 John Baldwin <jhb@FreeBSD.org>
901 * elf.c (elfcore_grok_freebsd_note): Handle NT_ARM_VFP.
903 2017-10-05 H.J. Lu <hongjiu.lu@intel.com>
905 * elf32-tilepro.c (readonly_dynrelocs): Dump dynamic relocation
906 in read-only section with minfo.
907 (tilepro_elf_size_dynamic_sections): Likewise.
908 * elfxx-tilegx.c (readonly_dynrelocs): Likewise.
909 (tilegx_elf_size_dynamic_sections): Likewise.
911 2017-10-05 Pedro Alves <palves@redhat.com>
914 * bfd.c (bfd_set_error): Revert 2017-10-04 change. Remove
915 ellipsis parameter. Split out bfd_error_on_input code to..
916 (bfd_set_input_error): .. New function.
917 * archive.c (_bfd_write_archive_contents): Use bfd_set_input_error.
918 * vms-lib.c (_bfd_vms_lib_write_archive_contents): Likewise.
919 * bfd-in2.h: Regenerate.
921 2017-10-05 Alan Modra <amodra@gmail.com>
923 * elflink.c (elf_link_input_bfd): Correct ctor/dtor in init_array/
924 fini_array error value.
926 2017-10-05 Alan Modra <amodra@gmail.com>
929 * elf.c (_bfd_elf_setup_sections): Don't trim reloc sections from
931 (_bfd_elf_init_reloc_shdr): Pass sec_hdr, use it to copy SHF_GROUP
933 (elf_fake_sections): Adjust calls. Exit immediately on failure.
934 (bfd_elf_set_group_contents): Add associated reloc section indices
937 2017-10-04 Alan Modra <amodra@gmail.com>
939 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't sort or
940 classify symbols for ELFv2.
942 2017-10-04 Pavel I. Kryukov <kryukov@frtk.ru>
945 * bfd.c (bfd_set_error): Avoid UB on passing arg to va_start that
946 undergoes default promotion.
947 * bfd-in2.h: Regenerate.
949 2017-10-02 Alan Modra <amodra@gmail.com>
951 * elf32-ppc.c (ppc_elf_relocate_section): Fix comment typo.
952 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
954 2017-10-01 Alan Modra <amodra@gmail.com>
957 * dwarf2.c (new_line_sorts_after): Remove end_sequence comparison.
958 (add_line_info): Always put end_sequence last.
960 2017-10-01 Alan Modra <amodra@gmail.com>
963 * dwarf2.c (read_section): Allocate buffer with extra byte for
964 bfd_simple_get_relocated_section_contents rather than copying
967 2017-09-29 Alan Modra <amodra@gmail.com>
969 * merge.c (merge_strings): Return FALSE on malloc failure.
970 (_bfd_merge_sections): Return failures from record_section and
973 2017-09-28 Alan Modra <amodra@gmail.com>
976 * elflink.c (_bfd_elf_merge_symbol): Set non_ir_ref_dynamic in
977 a case where plugin_notice isn't called.
979 2017-09-27 Kuan-Lin Chen <kuanlinchentw@gmail.com>
981 * elf32-nds32.c (nds32_elf_relax_section): Fix a tautological
984 2017-09-26 H.J. Lu <hongjiu.lu@intel.com>
987 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't pass
988 output_bfd to info->callbacks->minfo.
990 2017-09-26 Nick Clifton <nickc@redhat.com>
993 * elf64-x86-64.c (elf_x86_64_info_to_howto): Do not trigger an
994 assertion failure if elf_x86_64_rtype_to_howto has already issued
997 2017-09-26 Alan Modra <amodra@gmail.com>
1000 * dwarf2.c (read_formatted_entries): Use read_attribute_value to
1003 2017-09-26 Nick Clifton <nickc@redhat.com>
1006 * dwarf2.c (read_formatted_entries): Fail early if we know that
1007 the loop parsing data entries will overflow the end of the
1010 2017-09-26 Alan Modra <amodra@gmail.com>
1013 * dwarf2.c (struct comp_unit): Delete sec_info_ptr field.
1014 (find_abstract_instance_name): Calculate DW_FORM_ref_addr relative
1015 to stash->info_ptr_memory, and check die_ref is within that memory.
1016 Set info_ptr_end correctly when another CU is refd. Check die_ref
1017 for DW_FORM_ref4 etc. is within CU.
1019 2017-09-26 Alan Modra <amodra@gmail.com>
1022 * dwarf2.c (concat_filename): Return "<unknown>" on NULL filename.
1023 (read_formatted_entries): Init "fe".
1024 (decode_line_info <DW_LNE_define_file>): Use line_info_add_file_name.
1026 2017-09-26 Alan Modra <amodra@gmail.com>
1029 * dwarf2.c (decode_line_info): Ensure line_ptr stays within
1030 bounds in inner loop.
1032 2017-09-25 Alan Modra <amodra@gmail.com>
1035 * dwarf1.c (parse_die): Sanity check pointer against section limit
1036 before dereferencing.
1037 (parse_line_table): Likewise.
1039 2017-09-25 Alan Modra <amodra@gmail.com>
1042 * dwarf2.c (scan_unit_for_symbols): Ignore DW_AT_name unless it
1044 (parse_comp_unit): Likewise.
1046 2017-09-25 Alan Modra <amodra@gmail.com>
1049 * dwarf2.c (read_formatted_entries): Error on format_count zero.
1051 2017-09-24 Alan Modra <amodra@gmail.com>
1054 * opncls.c (bfd_get_debug_link_info_1): Properly check that crc is
1055 within section bounds.
1057 2017-09-24 Alan Modra <amodra@gmail.com>
1060 * dwarf2.c (decode_line_info): Properly free line sequences on error.
1062 2017-09-24 Alan Modra <amodra@gmail.com>
1065 * dwarf2.c (find_abstract_instance_name): Add orig_info_ptr and
1066 pname param. Return status. Make name const. Don't abort,
1067 return an error. Formatting. Exit if current info_ptr matches
1068 orig_info_ptr. Update callers.
1069 (scan_unit_for_symbols): Start at nesting_level of zero. Make
1070 nested_funcs an array of structs for extensibility. Formatting.
1072 2017-09-24 Alan Modra <amodra@gmail.com>
1075 * dwarf2.c (decode_line_info): Fail on lh.line_range of zero
1076 rather than dividing by zero.
1078 2017-09-24 Alan Modra <amodra@gmail.com>
1081 * dwarf2.c (decode_line_info): Correct .debug_line unit_length check.
1083 2017-09-24 Alan Modra <amodra@gmail.com>
1086 * dwarf2.c (scan_unit_for_symbols): Check u.blk->data is non-NULL.
1088 2017-09-24 Alan Modra <amodra@gmail.com>
1091 * elf.c (_bfd_elf_slurp_version_tables): Test sh_info on
1092 SHT_GNU_verneed section for sanity. Don't zalloc memory for
1095 2017-09-22 H.J. Lu <hongjiu.lu@intel.com>
1098 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Guard against
1101 2017-09-22 H.J. Lu <hongjiu.lu@intel.com>
1104 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Also return
1105 -1 if bfd_canonicalize_dynamic_reloc returns 0.
1107 2017-09-22 Pedro Alves <palves@redhat.com>
1108 Alan Modra <amodra@gmail.com>
1110 * version.h: Add comment.
1112 2017-09-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1114 * elf.c (elfcore_grok_note): For the cases NT_S390_GS_CB and
1115 NT_S390_GS_BC, correct the previously swapped invocations of
1116 elfcore_grok_s390_gs_bc and elfcore_grok_s390_gs_cb.
1118 2017-09-19 Alan Modra <amodra@gmail.com>
1121 * elf64-ppc.c (ppc64_elf_build_stubs): Don't check glink_eh_frame
1124 2017-09-19 Alan Modra <amodra@gmail.com>
1127 * elflink.c (bfd_elf_size_dynamic_sections): Garbage collect
1128 symbols before calculating verrefs. Don't renumber dynsyms
1129 after gc. Exclude .gnu.version when zero or one dynsym.
1130 Localize some vars and reindent.
1132 2017-09-18 H.J. Lu <hongjiu.lu@intel.com>
1135 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Check error
1136 return from bfd_canonicalize_dynamic_reloc.
1138 2017-09-15 Alan Modra <amodra@gmail.com>
1141 * archive.c (bfd_ar_hdr_from_filesystem): Detect when status.st_size
1142 overflows bfd_size_type.
1144 2017-09-14 H.J. Lu <hongjiu.lu@intel.com>
1147 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument
1148 to indicate if conversion is performed.
1149 (elf_i386_check_relocs): Cache section contents and relocations
1150 if conversion is performed.
1151 * elf64-x86-64.c (elf_x86_64_check_relocs): Cache section
1152 contents and relocations if conversion is performed.
1154 2017-09-14 Nick Clifton <nickc@redhat.com>
1157 * peXXigen.c (pe_print_idata): Extend check for HintName vector
1160 2017-09-13 H.J. Lu <hongjiu.lu@intel.com>
1162 * elfxx-x86.h: Fix a typo in comments.
1164 2017-09-09 Kamil Rytarowski <n54@gmx.com>
1166 * elf32-nds32.c: Rename __BIT() to N32_BIT().
1168 2017-09-09 Alan Modra <amodra@gmail.com>
1170 * elf64-ppp.c (plt_stub_pad): Handle positive and negative
1173 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
1175 * elf32-i386.c (elf_i386_relocate_section): Update usage of
1176 UNDEFINED_WEAK_RESOLVED_TO_ZERO.
1177 (elf_i386_finish_dynamic_symbol): Likewise.
1178 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1179 (elf_x86_64_finish_dynamic_symbol): Likewise.
1180 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Likewise.
1181 (_bfd_x86_elf_fixup_symbol): Likewise.
1183 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
1185 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
1186 check has_non_got_reloc.
1188 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
1191 * elf32-i386.c (elf_i386_convert_load_reloc): Check linker_def.
1192 Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
1193 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Check
1194 linker_def. Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
1195 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Set local_ref
1196 and linker_def on __ehdr_start if it is referenced and not
1198 (_bfd_x86_elf_link_symbol_references_local): Also set local_ref
1199 and return TRUE when building executable, if a symbol has
1200 non-GOT/non-PLT relocations in text section or there is no
1202 * elfxx-x86.h (elf_x86_link_hash_entry): Add linker_def.
1204 2017-09-08 H.J. Lu <hongjiu.lu@intel.com>
1206 * elfxx-x86.h: Update comments.
1208 2017-09-08 H.J. Lu <hongjiu.lu@intel.com>
1210 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Replace
1211 elf_x86_plt_layout_table with elf_x86_init_table.
1212 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
1214 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties):
1216 * elfxx-x86.h (elf_x86_plt_layout_table): Renamed to ...
1217 (elf_x86_init_table): This.
1218 (_bfd_x86_elf_link_setup_gnu_properties): Replace
1219 elf_x86_plt_layout_table with elf_x86_init_table.
1221 2017-09-07 H.J. Lu <hongjiu.lu@intel.com>
1223 * configure.ac (bfd_backends): Don't add elf64-x86-64.lo nor
1224 elf64.lo together with elfxx-x86.lo for 64-bit BFD.
1225 * configure: Regenerated.
1226 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set r_info
1227 and r_sym fields of plt_layout.
1228 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
1230 * elfxx-x86.c (elf_x86_64_is_reloc_section): Remove BFD64 check.
1231 (_bfd_x86_elf_link_hash_table_create): Likewise. Don't set
1232 r_info nor r_sym fields.
1233 (_bfd_x86_elf_link_setup_gnu_properties): Set r_info and r_sym
1235 * elfxx-x86.h (elf_x86_plt_layout_table): Add r_info and r_sym.
1237 2017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
1239 * (_bfd_riscv_relax_align): Call bfd_set_error and
1240 print an error message when unable to relax a .align directive.
1242 2017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
1244 * elfnn-riscv.c (riscv_zero_pcrel_hi_reloc): New function.
1245 (riscv_record_pcrel_hi_reloc): Add absolute argument.
1246 (riscv_elf_relocate_section): Call riscv_zero_pcrel_hi_reloc for
1247 R_RISCV_PCREL_HI20 relocs, and pass the result to
1248 riscv_record_pcrel_hi_reloc.
1250 2017-09-07 H.J. Lu <hongjiu.lu@intel.com>
1252 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument,
1253 r_type_p. Remove the converted argument. Replace
1254 SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P. Return
1255 the new relocation type via r_type_p.
1256 (elf_i386_relocate_section): Likewise.
1257 (elf_i386_finish_dynamic_symbol): Likewise.
1258 (need_convert_load): Removed.
1259 (check_relocs_failed): Updated.
1260 (elf_i386_check_relocs): Call elf_i386_convert_load_reloc,
1261 instead of setting need_convert_load.
1262 (_bfd_i386_elf_convert_load): Removed.
1263 * elf64-x86-64.c (need_convert_load): Removed.
1264 (check_relocs_failed): Updated.
1265 (elf_x86_64_convert_load_reloc): Add an argument, r_type_p.
1266 Replace SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P.
1267 Return the new relocation type via r_type_p.
1268 (elf_x86_64_check_relocs): Call elf_x86_64_convert_load_reloc,
1269 instead of setting need_convert_load.
1270 (elf_x86_64_check_relocs): Don't check PIC if relocation has
1272 (_bfd_x86_64_elf_convert_load): Removed.
1273 (elf_x86_64_relocate_section): Replace SYMBOL_REFERENCES_LOCAL
1274 with SYMBOL_REFERENCES_LOCAL_P.
1275 (elf_x86_64_finish_dynamic_symbol): Likewise.
1276 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Don't
1278 (_bfd_x86_elf_size_dynamic_sections): Don't call convert_load.
1279 (_bfd_x86_elf_link_symbol_references_local): New function.
1280 * elfxx-x86.h (SYMBOL_REFERENCES_LOCAL_P): New.
1281 (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Replace elf.forced_local with
1282 SYMBOL_REFERENCES_LOCAL_P.
1283 (elf_x86_link_hash_entry): Add local_ref.
1284 (elf_x86_link_hash_table): Remove convert_load.
1285 (_bfd_i386_elf_convert_load): Removed.
1286 (_bfd_x86_64_elf_convert_load): Likewise.
1287 (_bfd_x86_elf_link_symbol_references_local): New.
1289 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
1291 * elf64-x86-64.c (R_X86_64_converted_reloc_bit): New.
1292 (elf_x86_64_info_to_howto): Get the real relocation type by
1293 masking out R_X86_64_converted_reloc_bit.
1294 (elf_x86_64_check_tls_transition): Get the real relocation type
1295 by masking out R_X86_64_converted_reloc_bit.
1296 (elf_x86_64_convert_load_reloc): Set R_X86_64_converted_reloc_bit
1297 instead of setting converted_reloc.
1298 (elf_x86_64_relocate_section): Check R_X86_64_converted_reloc_bit
1299 instead of converted_reloc. Get the real relocation type by
1300 masking out R_X86_64_converted_reloc_bit.
1301 (elf_x86_64_link_setup_gnu_properties): Verify that the value of
1302 R_X86_64_converted_reloc_bit is valid.
1303 * elfxx-x86.h (converted_reloc): Removed.
1305 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
1307 * elf32-i386.c (elf_i386_relocate_section): Don't change r_type
1308 when calling elf_i386_tls_transition. Don't use ELF32_R_TYPE
1309 to get the relocation type again.
1310 * elf64-x86-64.c (elf_x86_64_relocate_section): Don't change
1311 r_type when calling elf_x86_64_tls_transition. Don't use
1312 ELF32_R_TYPE to get the relocation type again.
1314 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
1316 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Properly set
1319 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
1321 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Remove the sec
1322 argument. Don't check relocation overflow. Avoid relocation
1323 overflow if --no-relax is used. Set converted_reloc on symbol
1324 if a GOTPCREL relocation is converted.
1325 (elf_x86_64_relocate_section): Issue a fatal error and suggest
1326 --no-relax if GOTPCREL relocation conversion leads to relocation
1328 * elfxx-x86.h (elf_x86_link_hash_entry): Add converted_reloc.
1330 2017-09-05 Alexander Fedotov <alexander.fedotov@nxp.com>
1331 Edmar Wienskoski <edmar.wienskoski@nxp.com
1333 * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_VLE_ADDR20.
1334 (ppc_elf_check_relocs): Handle it.
1335 (ppc_elf_vle_split20): New function.
1336 (ppc_elf_relocate_section): Handle R_PPC_VLE_ADDR20.
1338 2017-09-03 H.J. Lu <hongjiu.lu@intel.com>
1341 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Set tlsdesc_plt
1342 for x86-64 if GOT_TLS_GDESC_P is true.
1344 2017-09-03 Alan Modra <amodra@gmail.com>
1347 * elfxx-x86.h (elf_x86_hash_table): Check is_elf_hash_table first.
1349 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1351 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1352 tls_get_addr for x86-64 in one place.
1354 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1356 * configure.ac (bfd_backends): Add elf64-x86-64.lo together
1357 with elfxx-x86.lo for 64-bit BFD.
1358 * configure: Regenerated.
1360 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1362 * elf32-i386.c (elf_i386_convert_load): Renamed to ...
1363 (_bfd_i386_elf_convert_load): This. Remove static.
1364 (elf_i386_size_dynamic_sections): Removed.
1365 (elf_backend_size_dynamic_sections): Likewise.
1366 * elf64-x86-64.c (elf_x86_64_convert_load): Renamed to ...
1367 (_bfd_x86_64_elf_convert_load): This. Remove static.
1368 (elf_x86_64_size_dynamic_sections): Removed.
1369 (elf_backend_size_dynamic_sections): Likewise.
1370 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): Renamed to ...
1371 (elf_x86_allocate_dynrelocs): This. Make it static.
1372 (_bfd_x86_elf_allocate_local_dynrelocs): Renamed to ...
1373 (elf_x86_allocate_local_dynreloc): This. Make it static.
1374 (elf_i386_is_reloc_section): New function.
1375 (elf_x86_64_is_reloc_section): Likewise.
1376 (_bfd_x86_elf_link_hash_table_create): Initialize convert_load,
1377 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
1378 Rearrange got_entry_size initialization.
1379 (_bfd_x86_elf_size_dynamic_sections): New function.
1380 * elfxx-x86.h (elf_x86_link_hash_table): Add convert_load,
1381 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
1382 (_bfd_i386_elf_convert_load): New.
1383 (_bfd_x86_64_elf_convert_load): Likewise.
1384 (_bfd_x86_elf_size_dynamic_sections): Likewise.
1385 (elf_backend_size_dynamic_sections): Likewise.
1386 (_bfd_x86_elf_allocate_dynrelocs): Removed.
1387 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
1389 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1391 * elfxx-x86.h (elf_x86_link_hash_table): Rearrange fields and
1394 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1396 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
1397 sgotplt_jump_table_size with elf_x86_compute_jump_table_size.
1399 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1401 * elf32-i386.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
1402 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Moved to ...
1403 * elfxx-x86.h (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
1404 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Here.
1405 * elf64-x86-64.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
1406 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Removed.
1408 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1410 * elf32-i386.c (elf_i386_allocate_dynrelocs): Removed.
1411 (elf_i386_allocate_local_dynrelocs): Likewise.
1412 (elf_i386_size_dynamic_sections): Replace
1413 elf_i386_allocate_dynrelocs/elf_i386_allocate_local_dynrelocs
1414 with _bfd_x86_elf_allocate_dynrelocs and
1415 _bfd_x86_elf_allocate_local_dynrelocs.
1416 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Removed.
1417 (elf_x86_64_allocate_local_dynrelocs): Likewise.
1418 (elf_x86_64_size_dynamic_sections): Replace
1419 elf_x86_64_allocate_dynrelocs/elf_x86_64_allocate_local_dynrelocs
1420 with _bfd_x86_elf_allocate_dynrelocs and
1421 _bfd_x86_elf_allocate_local_dynrelocs.
1422 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): New function.
1423 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
1424 * elfxx-x86.h (_bfd_x86_elf_allocate_dynrelocs): New prototype.
1425 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
1427 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1429 * elf32-i386.c (is_i386_elf): Removed.
1430 (elf_i386_check_relocs): Replace is_i386_elf with is_x86_elf.
1431 (elf_i386_size_dynamic_sections): Likewise.
1432 (elf_i386_relocate_section): Likewise.
1433 * elf64-x86-64.c (is_x86_64_elf): Removed.
1434 (elf_x86_64_check_relocs): Replace is_x86_64_elf with
1436 (elf_x86_64_size_dynamic_sections): Likewise.
1437 (elf_x86_64_relocate_section): Likewise.
1438 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1440 * elfxx-x86.h (elf_x86_link_hash_table): Add target_id.
1443 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1445 * elf32-i386.c (elf_i386_compute_jump_table_size): Removed.
1446 (elf_i386_allocate_dynrelocs): Replace
1447 elf_i386_compute_jump_table_size with
1448 elf_x86_compute_jump_table_size.
1449 (elf_i386_size_dynamic_sections): Likewise.
1450 * elf64-x86-64.c (elf_x86_64_compute_jump_table_size): Removed.
1451 (elf_x86_64_allocate_dynrelocs): Replace
1452 elf_x86_64_compute_jump_table_size with
1453 elf_x86_compute_jump_table_size.
1454 (elf_x86_64_size_dynamic_sections): Likewise.
1455 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1457 * elfxx-x86.h (elf_x86_link_hash_table): Add got_entry_size.
1458 (elf_x86_compute_jump_table_size): New.
1460 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1462 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1464 (_bfd_x86_elf_adjust_dynamic_symbol): Use sizeof_reloc.
1465 * elfxx-x86.h (elf_x86_link_hash_table): Add sizeof_reloc.
1467 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1469 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check VxWorks
1470 with htab->is_vxworks.
1471 (elf_i386_size_dynamic_sections): Likewise.
1472 (elf_i386_relocate_section): Likewise.
1473 (elf_i386_finish_dynamic_symbol): Likewise.
1474 (elf_i386_finish_dynamic_sections): Likewise.
1476 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1478 * elf32-i386.c (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
1479 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
1480 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Moved to ...
1481 * elfxx-x86.h (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
1482 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
1483 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Here.
1484 * elf64-x86-64.c (GOT_TLS_IE, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
1485 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Removed.
1487 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1490 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Check
1491 ELF_COMMON_DEF_P for common symbols.
1493 2017-09-02 Alan Modra <amodra@gmail.com>
1495 * elf-eh-frame.c (offset_adjust): Avoid false positive gcc warning.
1496 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Likewise.
1497 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
1499 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1501 * elf32-i386.c (elf_i386_gc_mark_hook): Removed.
1502 (elf_backend_gc_mark_hook): Likewise.
1503 * elf64-x86-64.c (elf_x86_64_gc_mark_hook): Likewise.
1504 (elf_backend_gc_mark_hook): Likewise.
1505 * elfxx-x86.c (_bfd_x86_elf_gc_mark_hook): New function.
1506 * elfxx-x86.h (_bfd_x86_elf_gc_mark_hook): New.
1507 (elf_backend_gc_mark_hook): Likewise.
1509 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1511 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Removed.
1512 (elf_backend_adjust_dynamic_symbol): Likewise.
1513 * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise.
1514 (elf_backend_adjust_dynamic_symbol): Likewise.
1515 * elfxx-x86.c (_bfd_x86_elf_adjust_dynamic_symbol): New function.
1516 (_bfd_x86_elf_link_setup_gnu_properties): Copy is_vxworks.
1517 * elfxx-x86.h (elf_x86_link_hash_table): Add is_vxworks.
1518 (_bfd_x86_elf_adjust_dynamic_symbol): New.
1519 (elf_backend_adjust_dynamic_symbol): Likewise.
1521 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1523 * elfxx-x86.h (elf_x86_plt_layout_table): Fix a typo in
1526 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1528 * elf32-i386.c (elf_i386_mkobject): Removed.
1529 (bfd_elf32_mkobject): Likewise.
1530 * elf64-x86-64.c (elf_x86_64_mkobject): Likewise.
1531 (bfd_elf64_mkobject): Likewise.
1532 (bfd_elf32_mkobject): Likewise.
1533 * elfxx-x86.c (_bfd_x86_elf_mkobject): New function.
1534 * elfxx-x86.h (_bfd_x86_elf_mkobject): New.
1535 (bfd_elf64_mkobject): Likewise.
1536 (bfd_elf32_mkobject): Likewise.
1538 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1540 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Updated.
1541 Call _bfd_x86_elf_link_setup_gnu_properties.
1542 * elf64-x86-64.c (elf_x86_lazy_plt_layout): Initialize
1543 pic_plt0_entry and pic_plt_entry fields with the non-PIC PLT
1545 (elf_x86_64_non_lazy_plt): Likewise.
1546 (elf_x86_64_lazy_bnd_plt): Likewise.
1547 (elf_x86_64_non_lazy_bnd_plt): Likewise.
1548 (elf_x86_64_lazy_ibt_plt): Likewise.
1549 (elf_x32_lazy_ibt_plt): Likewise.
1550 (elf_x86_64_non_lazy_ibt_plt): Likewise.
1551 (elf_x32_non_lazy_ibt_plt): Likewise.
1552 (elf_x86_64_nacl_plt): Likewise.
1553 (elf_x86_64_link_setup_gnu_properties): Updated. Call
1554 _bfd_x86_elf_link_setup_gnu_properties.
1555 * elfxx-x86.c: Include elf-vxworks.h".
1556 (_bfd_x86_elf_link_setup_gnu_properties): New function.
1557 * elfxx-x86.h (elf_x86_lazy_plt_layout): Remove "for i386 only"
1558 comments for pic_plt0_entry and pic_plt_entry.
1559 (elf_x86_non_lazy_plt_layout): Likewise.
1560 (elf_x86_plt_layout_table): New.
1561 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
1563 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1566 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Create
1567 .eh_frame section for the second PLT.
1568 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Correct
1569 alignment of .eh_frame section for the second PLT.
1571 2017-09-01 Nick Clifton <nickc@redhat.com>
1574 * dwarf2.c (decode_line_info): Fix test for an overlong line info
1577 2017-09-01 Nick Clifton <nickc@redhat.com>
1580 * elf-attrs.c (_bfd_elf_parse_attributes): Ensure that the
1581 attribute buffer is NUL terminated.
1583 2017-08-31 Nick Clifton <nickc@redhat.com>
1586 * dwarf2.c (read_section): If necessary add a terminating NUL byte
1587 to dwarf string sections.
1589 2017-08-31 Alan Modra <amodra@gmail.com>
1591 * po/SRC-POTFILES.in: Regenerate.
1593 2017-08-31 Alan Modra <amodra@gmail.com>
1595 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Don't exit early
1596 for a section containing just a terminator. Allow multiple
1597 terminators at end of section.
1598 * elflink.c (bfd_elf_discard_info): Iterate over .eh_frame
1599 sections when not adding alignment. Assert on terminator in
1602 2017-08-31 Alan Modra <amodra@gmail.com>
1606 * elflink.c (bfd_elf_discard_info): Don't pad embedded zero
1609 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1611 * configure.ac (bfd_backends): Add elf64.lo together with
1612 elfxx-x86.lo for 64-bit BFD.
1613 * configure: Regenerated.
1615 2017-08-31 James Bowman <james.bowman@ftdichip.com>
1617 * elf32-ft32.c (ft32_elf_howto_table): Use complain_overflow_dont
1620 2017-08-31 Alan Modra <amodra@gmail.com>
1623 * opncls.c (bfd_close_all_done): Don't call bfd_cache_close
1624 before _close_and_cleanup. Call iovec->bclose after.
1625 (bfd_close): Remove code common to, and call, bfd_close_all_done.
1627 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1629 * elf32-i386.c (elf_i386_plt_type): Removed.
1630 (elf_i386_plt): Likewise.
1631 (elf_i386_get_synthetic_symtab): Updated. Call
1632 _bfd_x86_elf_get_synthetic_symtab.
1633 * elf64-x86-64.c (elf_x86_64_plt_type): Removed.
1634 (elf_x86_64_plt): Likewise.
1635 (elf_x86_64_get_synthetic_symtab): Updated. Call
1636 _bfd_x86_elf_get_synthetic_symtab.
1637 * elfxx-x86.c (elf_i386_get_plt_got_vma): New function.
1638 (elf_x86_64_get_plt_got_vma): Likewise.
1639 (elf_i386_valid_plt_reloc_p): Likewise.
1640 (elf_x86_64_valid_plt_reloc_p): Likewise.
1641 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
1642 * elfxx-x86.h (elf_x86_plt_type): New.
1643 (elf_x86_plt): Likewise.
1644 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
1646 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1648 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Check
1649 target_id instead of elf_machine_code.
1651 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1653 * elf32-i386.c (ELF_DYNAMIC_INTERPRETER): Removed.
1654 (elf_i386_lazy_plt_layout): Likewise.
1655 (elf_i386_non_lazy_plt_layout): Likewise.
1656 (elf_i386_plt_layout): Likewise.
1657 (elf_i386_link_hash_table): Likewise.
1658 (elf_i386_next_tls_desc_index): Likewise.
1659 (elf_i386_srelplt2): Likewise.
1660 (elf_i386_plt): Likewise.
1661 (elf_i386_lazy_plt): Likewise.
1662 (elf_i386_non_lazy_plt): Likewise.
1663 (elf_i386_link_hash_table_create): Likewise.
1664 (bfd_elf32_bfd_link_hash_table_create): Likewise.
1665 (elf_i386_lazy_plt): Updated.
1666 (elf_i386_non_lazy_plt): Likewise.
1667 (elf_i386_lazy_ibt_plt): Likewise.
1668 (elf_i386_non_lazy_ibt_plt): Likewise.
1669 (elf_i386_allocate_dynrelocs): Likewise.
1670 (elf_i386_size_dynamic_sections): Likewise.
1671 (elf_i386_relocate_section): Likewise.
1672 (elf_i386_finish_dynamic_symbol): Likewise.
1673 (elf_i386_finish_dynamic_sections): Likewise.
1674 (elf_i386_get_synthetic_symtab): Likewise.
1675 (elf_i386_link_setup_gnu_properties): Likewise.
1676 (elf_i386_nacl_plt): Likewise.
1677 * elf64-x86-64.c (ABI_64_P): Removed.
1678 (ELF64_DYNAMIC_INTERPRETER): Likewise.
1679 (ELF32_DYNAMIC_INTERPRETER): Likewise.
1680 (elf_x86_64_lazy_plt_layout): Likewise.
1681 (elf_x86_64_non_lazy_plt_layout): Likewise.
1682 (elf_x86_64_plt_layout): Likewise.
1683 (elf_x86_64_link_hash_table): Likewise.
1684 (elf_x86_64_plt): Likewise.
1685 (elf_x86_64_lazy_plt): Likewise.
1686 (elf_x86_64_non_lazy_plt): Likewise.
1687 (elf_x86_64_link_hash_table_create): Likewise.
1688 (bfd_elf64_bfd_link_hash_table_create): Likewise.
1689 (bfd_elf32_bfd_link_hash_table_create): Likewise.
1690 (elf_x86_64_lazy_plt): Updated.
1691 (elf_x86_64_non_lazy_plt): Likewise.
1692 (elf_x86_64_lazy_bnd_plt): Likewise.
1693 (elf_x86_64_non_lazy_bnd_plt): Likewise.
1694 (elf_x86_64_lazy_ibt_plt): Likewise.
1695 (elf_x32_lazy_ibt_plt): Likewise.
1696 (elf_x86_64_non_lazy_ibt_plt): Likewise.
1697 (elf_x32_non_lazy_ibt_plt): Likewise.
1698 (elf_x86_64_allocate_dynrelocs): Likewise.
1699 (elf_x86_64_size_dynamic_sections): Likewise.
1700 (elf_x86_64_relocate_section): Likewise.
1701 (elf_x86_64_finish_dynamic_symbol): Likewise.
1702 (elf_x86_64_finish_dynamic_sections): Likewise.
1703 (elf_x86_64_get_synthetic_symtab): Likewise.
1704 (elf_x86_64_link_setup_gnu_properties): Likewise.
1705 (elf_x86_64_nacl_plt): Likewise.
1706 * elfxx-x86.c: Include "objalloc.h", "elf/i386.h" and
1708 (ELF32_DYNAMIC_INTERPRETER): New.
1709 (ELF64_DYNAMIC_INTERPRETER): Likewise.
1710 (ELFX32_DYNAMIC_INTERPRETER): Likewise.
1711 (_bfd_x86_elf_link_hash_table_create): Likewise.
1712 (_bfd_x86_elf_link_hash_table_free): Renamed to ...
1713 (elf_x86_link_hash_table_free): This. Make it static.
1714 * elfxx-x86.h: Don't include "objalloc.h".
1716 (elf_x86_lazy_plt_layout): Likewise.
1717 (elf_x86_non_lazy_plt_layout): Likewise.
1718 (elf_x86_plt_layout): Likewise.
1719 (_bfd_x86_elf_link_hash_table_create): Likewise.
1720 (bfd_elf64_bfd_link_hash_table_create): Likewise.
1721 (bfd_elf32_bfd_link_hash_table_create): Likewise.
1722 (elf_x86_link_hash_table): Add plt, lazy_plt, non_lazy_plt,
1723 srelplt2 and next_tls_desc_index.
1724 (_bfd_x86_elf_link_hash_table_free): Removed.
1726 2017-08-30 Maciej W. Rozycki <macro@imgtec.com>
1728 * elfxx-mips.c (mips_elf_perform_relocation): Correct microMIPS
1729 branch offset interpretation.
1731 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1734 * opncls.c (bfd_close_all_done): Call _close_and_cleanup.
1736 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1738 * elf64-x86-64.c (elf_x86_64_next_tls_desc_index): Removed.
1739 (elf_x86_64_srelplt2): Likewise.
1741 2017-08-30 Alan Modra <amodra@gmail.com>
1743 * elf64-ppc.c (struct ppc_link_hash_table): Add do_tls_opt.
1744 (ppc64_elf_tls_optimize): Set it.
1745 (ppc64_elf_relocate_section): Nop addis on TPREL16_HA, and convert
1746 insn on TPREL16_LO and TPREL16_LO_DS relocs to use r13 when
1747 addis would add zero.
1748 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add do_tls_opt.
1749 (ppc_elf_tls_optimize): Set it.
1750 (ppc_elf_relocate_section): Nop addis on TPREL16_HA, and convert
1751 insn on TPREL16_LO relocs to use r2 when addis would add zero.
1753 2017-08-30 Alan Modra <amodra@gmail.com>
1755 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing
1756 __tls_get_addr call sequences to LE, don't move the addi down
1757 to the nop. Replace the bl with addi and leave the nop alone.
1759 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1761 * elf32-i386.c (elf_i386_pie_finish_undefweak_symbol):
1763 * elf64-x86-64.c (elf_x86_64_finish_local_dynamic_symbol):
1765 (elf_x86_64_pie_finish_undefweak_symbol): Likewise.
1767 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1769 * Makefile.am (BFD32_BACKENDS): Add elfxx-x86.lo.
1770 (BFD64_BACKENDS): Likewise.
1771 (BFD32_BACKENDS_CFILES): Add elfxx-x86.c.
1772 (BFD64_BACKENDS_CFILES): Likewise.
1773 * Makefile.in: Regenerated.
1774 * configure.ac (bfd_backends): Add elfxx-x86.lo together with
1775 elf32-i386.lo and elf64-x86-64.lo.
1776 * configure: Regenerated.
1777 * elf32-i386.c: Include "elfxx-x86.h" instead of "sysdep.h",
1778 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
1779 "objalloc.h" and "hashtab.h".
1780 (ELIMINATE_COPY_RELOCS): Removed.
1781 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
1782 (SYMBOL_NO_COPYRELOC): Likewise.
1783 (elf_i386_link_hash_entry): Likewise.
1784 (GOT_UNKNOWN): Likewise.
1785 (GOT_NORMAL): Likewise.
1786 (GOT_TLS_GD): Likewise.
1787 (elf_i386_hash_entry): Likewise.
1788 (elf_i386_obj_tdata): Likewise.
1789 (elf_i386_tdata): Likewise.
1790 (elf_i386_local_got_tls_type): Likewise.
1791 (elf_i386_local_tlsdesc_gotent): Likewise.
1792 (elf_i386_hash_table): Likewise.
1793 (elf_i386_link_hash_newfunc): Likewise.
1794 (elf_i386_local_htab_hash): Likewise.
1795 (elf_i386_local_htab_eq): Likewise.
1796 (elf_i386_get_local_sym_hash): Likewise.
1797 (elf_i386_link_hash_table_free): Likewise.
1798 (elf_i386_copy_indirect_symbol): Likewise.
1799 (elf_i386_fixup_symbol): Likewise.
1800 (elf_i386_readonly_dynrelocs): Likewise.
1801 (elf_i386_always_size_sections): Likewise.
1802 (elf_i386_set_tls_module_base): Likewise.
1803 (elf_i386_dtpoff_base): Likewise.
1804 (compare_relocs): Likewise.
1805 (elf_i386_hash_symbol): Likewise.
1806 (elf_i386_parse_gnu_properties): Likewise.
1807 (elf_i386_merge_gnu_properties): Likewise.
1808 (elf_i386_link_check_relocs): Likewise.
1809 (elf_i386_merge_symbol_attribute): Likewise.
1810 (bfd_elf32_bfd_link_check_relocs): Likewise.
1811 (elf_backend_copy_indirect_symbol): Likewise.
1812 (elf_backend_always_size_sections): Likewise.
1813 (elf_backend_omit_section_dynsym): Likewise.
1814 (elf_backend_hash_symbol): Likewise.
1815 (elf_backend_fixup_symbol): Likewise.
1816 (elf_backend_parse_gnu_properties): Likewise.
1817 (elf_backend_merge_gnu_properties): Likewise.
1818 (elf_backend_merge_symbol_attribute): Likewise.
1819 (elf_i386_mkobject): Updated.
1820 (elf_i386_link_hash_table_create): Likewise.
1821 (elf_i386_check_tls_transition): Likewise.
1822 (elf_i386_tls_transition): Likewise.
1823 (elf_i386_convert_load_reloc): Likewise.
1824 (elf_i386_check_relocs): Likewise.
1825 (elf_i386_adjust_dynamic_symbol): Likewise.
1826 (elf_i386_allocate_dynrelocs): Likewise.
1827 (elf_i386_convert_load): Likewise.
1828 (elf_i386_size_dynamic_sections): Likewise.
1829 (elf_i386_relocate_section): Likewise.
1830 (elf_i386_finish_dynamic_symbol ): Likewise.
1831 (elf_i386_finish_dynamic_sections): Likewise.
1832 (elf_i386_output_arch_local_syms): Likewise.
1833 (elf_i386_get_synthetic_symtab): Likewise.
1834 (elf_i386_link_setup_gnu_properties): Likewise.
1835 (elf_i386_link_hash_table): Use elf_x86_link_hash_table, instead
1836 of elf_link_hash_table, as base.
1837 (elf_i386_next_tls_desc_index): New.
1838 (elf_i386_srelplt2): Likewise.
1839 (elf_i386_plt): Likewise.
1840 (elf_i386_lazy_plt): Likewise.
1841 (elf_i386_non_lazy_plt): Likewise.
1842 * elf32-x86-64.c: Include "elfxx-x86.h" instead of "sysdep.h",
1843 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
1844 "objalloc.h" and "hashtab.h".
1845 (ELIMINATE_COPY_RELOCS): Removed.
1846 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
1847 (SYMBOL_NO_COPYRELOC): Likewise.
1848 (elf_x86_64_link_hash_entry): Likewise.
1849 (GOT_UNKNOWN): Likewise.
1850 (GOT_NORMAL): Likewise.
1851 (GOT_TLS_GD): Likewise.
1852 (elf_x86_64_hash_entry): Likewise.
1853 (elf_x86_64_obj_tdata): Likewise.
1854 (elf_x86_64_tdata): Likewise.
1855 (elf_x86_64_local_got_tls_type): Likewise.
1856 (elf_x86_64_local_tlsdesc_gotent): Likewise.
1857 (elf_x86_64_hash_table): Likewise.
1858 (elf_x86_64_link_hash_newfunc): Likewise.
1859 (elf_x86_64_local_htab_hash): Likewise.
1860 (elf_x86_64_local_htab_eq): Likewise.
1861 (elf_x86_64_get_local_sym_hash): Likewise.
1862 (elf_x86_64_link_hash_table_free): Likewise.
1863 (elf_x86_64_copy_indirect_symbol): Likewise.
1864 (elf_x86_64_fixup_symbol): Likewise.
1865 (elf_x86_64_readonly_dynrelocs): Likewise.
1866 (elf_x86_64_always_size_sections): Likewise.
1867 (elf_x86_64_set_tls_module_base): Likewise.
1868 (elf_x86_64_dtpoff_base): Likewise.
1869 (compare_relocs): Likewise.
1870 (elf_x86_64_merge_symbol_attribute): Likewise.
1871 (elf_x86_64_hash_symbol): Likewise.
1872 (elf_x86_64_parse_gnu_properties): Likewise.
1873 (elf_x86_64_merge_gnu_properties): Likewise.
1874 (elf_x86_64_link_check_relocs): Likewise.
1875 (elf_backend_copy_indirect_symbol): Likewise.
1876 (elf_backend_always_size_sections): Likewise.
1877 (bfd_elf64_bfd_link_check_relocs): Likewise.
1878 (elf_backend_merge_symbol_attribute): Likewise.
1879 (elf_backend_hash_symbol): Likewise.
1880 (elf_backend_omit_section_dynsym): Likewise.
1881 (elf_backend_fixup_symbol): Likewise.
1882 (elf_backend_parse_gnu_properties): Likewise.
1883 (elf_backend_merge_gnu_properties): Likewise.
1884 (bfd_elf32_bfd_link_check_relocs): Likewise.
1885 (elf_x86_64_mkobject): Updated.
1886 (elf_x86_64_link_hash_table_create): Likewise.
1887 (elf_x86_64_check_tls_transition): Likewise.
1888 (elf_x86_64_tls_transition): Likewise.
1889 (elf_x86_64_convert_load_reloc): Likewise.
1890 (elf_x86_64_check_relocs): Likewise.
1891 (elf_x86_64_adjust_dynamic_symbol): Likewise.
1892 (elf_x86_64_allocate_dynrelocs): Likewise.
1893 (elf_x86_64_convert_load): Likewise.
1894 (elf_x86_64_size_dynamic_sections): Likewise.
1895 (elf_x86_64_relocate_section): Likewise.
1896 (elf_x86_64_finish_dynamic_symbol ): Likewise.
1897 (elf_x86_64_finish_dynamic_sections): Likewise.
1898 (elf_x86_64_output_arch_local_syms): Likewise.
1899 (elf_x86_64_get_synthetic_symtab): Likewise.
1900 (elf_x86_64_link_setup_gnu_properties): Likewise.
1901 (elf_x86_64_link_hash_table): Use elf_x86_link_hash_table,
1902 instead of elf_link_hash_table, as base.
1903 (elf_x86_64_next_tls_desc_index): New.
1904 (elf_x86_64_srelplt2): Likewise.
1905 (elf_x86_64_plt): Likewise.
1906 (elf_x86_64_lazy_plt): Likewise.
1907 (elf_x86_64_non_lazy_plt): Likewise.
1908 * elfxx-x86.c: New file.
1909 * elfxx-x86.h: Likewise.
1911 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1913 * elf32-i386.c (elf_i386_get_synthetic_symtab): Simplify bad
1915 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1917 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1919 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check valid PLT
1920 sections before checking dynamic relocations and free invalid
1921 PLT section contents.
1922 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1924 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
1926 * elf-bfd.h (_bfd_elf_ifunc_get_synthetic_symtab): Removed.
1927 * elf-ifunc.c (_bfd_elf_ifunc_get_synthetic_symtab): Likewise.
1929 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
1932 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check for valid
1934 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1936 2017-08-27 H.J. Lu <hongjiu.lu@intel.com>
1938 * elf32-i386.c (elf_i386_link_hash_newfunc): Initialize
1940 * elf64-x86-64.c (elf_x86_64_link_hash_newfunc): Likewise.
1942 2017-08-26 H.J. Lu <hongjiu.lu@intel.com>
1945 * elf-bfd.h (elf_obj_tdata): Use ENUM_BITFIELD on object_id,
1946 dyn_lib_class and has_gnu_symbols. Change bad_symtab to bitfield.
1947 Add a has_no_copy_on_protected bitfield.
1948 (elf_has_no_copy_on_protected): New.
1949 * elf-properties.c (_bfd_elf_parse_gnu_properties): Set
1950 elf_has_no_copy_on_protected for GNU_PROPERTY_NO_COPY_ON_PROTECTED.
1951 (elf_merge_gnu_property_list): Likewise.
1952 (_bfd_elf_link_setup_gnu_properties): Set extern_protected_data
1953 to FALSE for elf_has_no_copy_on_protected.
1954 * elf32-i386.c (SYMBOL_NO_COPYRELOC): New.
1955 (elf_i386_link_hash_entry): Add def_protected.
1956 (elf_i386_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
1957 when checking info->nocopyreloc.
1958 (elf_i386_link_setup_gnu_properties): Don't set
1959 extern_protected_data here.
1960 (elf_i386_merge_symbol_attribute): New function.
1961 (elf_backend_merge_symbol_attribute): New.
1962 * elf64-x86-64.c (SYMBOL_NO_COPYRELOC): New.
1963 (elf_x86_64_link_hash_entry): Add def_protected.
1964 (elf_x86_64_need_pic): Report protected symbol for def_protected.
1965 (elf_x86_64_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
1966 when checking info->nocopyreloc.
1967 (elf_x86_64_relocate_section): Also check for R_X86_64_PC32
1968 relocation run-time overflow and unresolvable R_X86_64_32S
1969 relocation against protected data symbol defined in shared object
1970 with GNU_PROPERTY_NO_COPY_ON_PROTECTED.
1971 (elf_x86_64_link_setup_gnu_properties): Don't set
1972 extern_protected_data here.
1973 (elf_x86_64_merge_symbol_attribute): New function.
1974 (elf_backend_merge_symbol_attribute): New.
1976 2017-08-26 Alan Modra <amodra@gmail.com>
1978 * elf32-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
1979 (ppc_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
1980 (ppc_elf_relocate_section): Comment fix.
1981 * elf64-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
1982 (ppc64_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
1983 Support dynamic relocs for TPREL16 when non-pic too.
1984 (dec_dynrel_count): Adjust TPREL16 handling as per check_relocs.
1985 (ppc64_elf_relocate_section): Support dynamic relocs for TPREL16
1988 2017-08-25 H.J. Lu <hongjiu.lu@intel.com>
1990 * elf32-i386.c (elf_i386_link_hash_entry): Remove redundant
1991 "symbol" in comments.
1992 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Likewise.
1994 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
1997 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for
1998 R_X86_64_PC32 relocation run-time overflow and unresolvable
1999 R_X86_64_32S relocation with -z nocopyreloc.
2001 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
2003 * elf32-i386.c (elf_i386_check_relocs): Revert the last change.
2004 Undefined symbols may not have a type.
2005 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
2007 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
2009 * elf64-x86-64.c (elf_x86_64_need_pic): Add an argument for
2010 bfd_link_info. Report shared, PIE or PDE object based on
2012 (elf_x86_64_check_relocs): Update elf_x86_64_need_pic call.
2013 (elf_x86_64_relocate_section): Likewise.
2015 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
2017 * elf32-i386.c (elf_i386_check_relocs): Increment PLT count only
2018 for function symbols.
2019 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
2021 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
2023 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set
2024 extern_protected_data to FALSE if GNU_PROPERTY_NO_COPY_ON_PROTECTED
2025 is set on any input relocatable file.
2026 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
2028 2017-08-23 Alan Modra <amodra@gmail.com>
2031 * elf64-ppc.c (ensure_undef_dynamic): Rename from
2032 ensure_undefweak_dynamic. Handle undefined too.
2033 * elf32-ppc.c (ensure_undef_dynamic): Likewise.
2034 * elf32-hppa.c (ensure_undef_dynamic): Likewise.
2035 (allocate_dynrelocs): Discard undefined non-default visibility
2036 relocs first. Make undefined syms dynamic. Tidy goto.
2038 2017-08-21 Alan Modra <amodra@gmail.com>
2039 H.J. Lu <hongjiu.lu@intel.com>
2042 * elf-bfd.h (SYMBOLIC_BIND): Return TRUE for __start/__stop symbols.
2043 * elflink.c (bfd_elf_define_start_stop): Rewrite.
2045 2017-08-21 Hans-Peter Nilsson <hp@bitrange.com>
2048 * elf64-mmix.c (mmix_elf_relax_section): Correct handling of
2049 undefined weak symbols.
2051 2017-08-18 Nick Clifton <nickc@redhat.com>
2054 * tekhex.c (getsym): Fix check for source pointer walking off the
2055 end of the input buffer.
2057 2017-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
2060 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Skip IFUNC
2061 relocations in debug sections, change abort to _bfd_error_handler.
2063 2017-08-14 Nick Clifton <nickc@redhat.com>
2066 * elf.c (setup_group): Check for an empty or very small group
2068 * po/bfd.pot: Regenerate.
2070 2017-08-14 Alan Modra <amodra@gmail.com>
2073 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't add
2074 alignment padding here.
2075 * elflink.c (bfd_elf_discard_info): Add .eh_frame padding here
2076 in a reverse pass over sections.
2078 2017-08-11 H.J. Lu <hongjiu.lu@intel.com>
2081 * elf32-i386.c (elf_i386_get_synthetic_symtab): Allocate space
2082 for @plt suffixes first.
2083 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
2085 2017-08-08 Nick Clifton <nickc@redhat.com>
2088 * elf-attrs.c (_bfd_elf_parse_attributes): Complain about very
2089 small section lengths.
2090 * elf.c (_bfd_elf_setup_sections): Skip empty entries in the group
2092 (elfcore_grok_freebsd_prstatus): Add checks to make sure that
2093 there is enough data present in the note.
2095 2017-08-08 Alan Modra <amodra@gmail.com>
2098 * elf32-microblaze.c (microblaze_elf_check_relocs): Don't bump
2099 got.refcount for GOTOFF relocs, just create .got section.
2101 2017-08-07 H.J. Lu <hongjiu.lu@intel.com>
2103 * elflink.c (elf_link_add_object_symbols): Move common symbol
2104 check after bed->common_definition.
2106 2017-08-07 Alan Modra <amodra@gmail.com>
2109 * elflink.c (bfd_elf_final_link): Don't segfault when sections
2110 needed to define various dynamic tags have been discarded.
2112 2017-08-07 Nick Clifton <nickc@redhat.com>
2115 * elf32-i386.c (elf_i386_link_setup_gnu_properties): If the dynobj
2116 has not been set then use the bfd returned by
2117 _bfd_elf_link_setup_gnu_properties. If that is null then search
2118 through all the input bfds selecting the first normal, ELF format
2120 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
2122 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
2124 * elf32-i386.c (elf_i386_link_hash_entry): Change tls_get_addr
2126 (elf_i386_link_hash_newfunc): Initialize tls_get_addr to 0.
2127 (elf_i386_check_tls_transition): Check tls_get_addr directly.
2128 (elf_i386_convert_load_reloc): Update tls_get_addr check.
2129 (elf_i386_link_check_relocs): New function.
2130 (bfd_elf32_bfd_link_check_relocs): New.
2131 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Change tls_get_addr
2133 (elf_x86_64_link_hash_newfunc): Initialize tls_get_addr to 0.
2134 (elf_x86_64_check_tls_transition): Check tls_get_addr directly.
2135 (elf_x86_64_convert_load_reloc): Update tls_get_addr check.
2136 (elf_x86_64_link_check_relocs): New function.
2137 (bfd_elf64_bfd_link_check_relocs): New.
2138 (bfd_elf32_bfd_link_check_relocs): Likewise.
2140 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
2143 * elflink.c (elf_link_add_object_symbols): Treat common symbol
2144 as undefined for --no-define-common.
2146 2017-08-05 Alan Modra <amodra@gmail.com>
2148 * elf32-hppa.c (elf32_hppa_set_gp): Don't require an
2149 hppa_link_hash_table.
2151 2017-08-02 Max Filippov <jcmvbkbc@gmail.com>
2153 * xtensa-isa.c (xtensa_isa_init): Don't update lookup table
2154 entries for sysregs with negative indices.
2156 2017-08-01 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2158 * elf32-s390.c (elf_s390_finish_dynamic_sections): Skip if it
2159 isn't the S/390 specific elf data.
2160 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
2162 2017-07-31 Kuan-Lin Chen <rufus@andestech.com>
2164 * elfxx-riscv.c (riscv_elf_add_sub_reloc): New function.
2165 * (howto_table) [R_RISCV_ADD8]: Use riscv_elf_add_sub_reloc.
2166 [R_RISCV_ADD16]: Likewise.
2167 [R_RISCV_ADD32]: Likewise.
2168 [R_RISCV_ADD64]: Likewise.
2169 [R_RISCV_SUB6]: Likewise.
2170 [R_RISCV_SUB8]: Likewise.
2171 [R_RISCV_SUB16]: Likewise.
2172 [R_RISCV_SUB32]: Likewise.
2173 [R_RISCV_SUB64]: Likewise.
2175 2017-07-31 Alan Modra <amodra@gmail.com>
2177 * elf64-ppc.c (ppc64_elf_tls_setup): Warn on --plt-localentry
2178 without ld.so checks.
2180 2017-07-29 Alan Modra <amodra@gmail.com>
2183 * elf64-ppc.c (struct ppc_link_hash_entry): Add non_zero_localentry.
2184 (ppc64_elf_merge_symbol): Set non_zero_localentry.
2185 (is_elfv2_localentry0): Test non_zero_localentry.
2186 (ppc64_elf_tls_setup): Default to --no-plt-localentry.
2188 2017-07-28 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2190 * elf32-s390.c (elf_s390_finish_dynamic_sections): Add NULL
2191 pointer check for htab->elf.irelplt.
2192 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
2194 2017-07-27 Nick Clifton <nickc@redhat.com>
2197 * mach-o.c (bfd_mach_o_read_symtab_strtab): Fail if the symtab
2199 * nlmcode.h (nlm_swap_auxiliary_headers_in): Replace assertion
2201 * section.c (bfd_make_section_with_flags): Fail if the name or bfd
2203 * vms-alpha.c (bfd_make_section_with_flags): Correct computation
2205 (evax_bfd_print_emh): Check for invalid string lengths.
2207 2017-07-25 Nick Clifton <nickc@redhat.com>
2209 * po/fr.po: Updated French translation.
2211 2017-07-25 Benjamin Green <bengreen5mx@gmail.com>
2214 * elf32-msp430.c (msp430_elf_relax_section): Allow conversion of
2215 16-bit absolute branches into 10-bit pc-relative branches on the
2216 MSP430 as well as the MSP430X.
2218 2017-07-25 Alan Modra <amodra@gmail.com>
2220 * elf64-ppc.c (struct map_stub): Add tls_get_addr_opt_bctrl.
2221 (stub_eh_frame_size): New function.
2222 (ppc_size_one_stub): Set group tls_get_addr_opt_bctrl.
2223 (group_sections): Init group tls_get_addr_opt_bctrl.
2224 (ppc64_elf_size_stubs): Update sizing and initialization of
2225 .eh_frame. Iteration over stubs via group list.
2226 (ppc64_elf_build_stubs): Iterate over stubs via group list.
2227 (ppc64_elf_finish_dynamic_sections): Update finalization of
2230 2017-07-24 Nick Clifton <nickc@redhat.com>
2233 * mach-o.c (bfd_mach_o_canonicalize_relocs): Pass the base address
2234 of the relocs to the canonicalize_one_reloc routine.
2235 * mach-o.h (struct bfd_mach_o_backend_data): Update the prototype
2236 for the _bfd_mach_o_canonicalize_one_reloc field.
2237 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add
2238 res_base parameter. Use to check for corrupt pair relocs.
2239 * mach-o-aarch64.c (bfd_mach_o_arm64_canonicalize_one_reloc):
2241 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc):
2243 * mach-o-x86-64.c (bfd_mach_o_x86_64_canonicalize_one_reloc):
2246 * vms-alpha.c (_bfd_vms_slurp_eihd): Make sure that there is
2247 enough data in the record before attempting to parse it.
2248 (_bfd_vms_slurp_eeom): Likewise.
2250 (_bfd_vms_slurp_egsd): Check for an invalid section index.
2251 (image_set_ptr): Likewise.
2252 (alpha_vms_slurp_relocs): Likewise.
2254 (alpha_vms_object_p): Check for a truncated record.
2256 2017-07-24 Nick Clifton <nickc@redhat.com>
2259 * reloc.c (_bfd_unrecognized_reloc): New function. Reports
2260 an unrecognized reloc and sets the bfd_error value.
2261 * libbfd.h: Regenerate.
2262 * elf32-arm.c (elf32_arm_final_link_relocate): Use the new
2264 * elf32-i386.c (elf_i386_relocate_section): Likewise.
2265 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
2266 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
2267 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise.
2268 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
2270 2017-07-23 Alan Modra <amodra@gmail.com>
2272 * elf64-ppc.c (ppc64_elf_size_stubs): Correct advance to
2275 2017-07-19 Szabolcs Nagy <szabolcs.nagy@arm.com>
2278 * elfnn-aarch64.c (elfNN_aarch64_reloc_type_class): Return
2279 reloc_class_ifunc for ifunc symbols.
2281 2017-07-19 Nick Clifton <nickc@redhat.com>
2284 * archive.c (bfd_generic_archive_p): If the bfd does not have the
2285 correct magic bytes at the start, set the error to wrong format
2286 and clear the format selector before returning NULL.
2288 2017-07-19 Nick Clifton <nickc@redhat.com>
2291 * coff-rs6000.c (_bfd_strntol): New function.
2292 (_bfd_strntoll): New function.
2293 (GET_VALUE_IN_FIELD): New macro.
2294 (EQ_VALUE_IN_FIELD): new macro.
2295 (_bfd_xcoff_slurp_armap): Use new macros.
2296 (_bfd_xcoff_archive_p): Likewise.
2297 (_bfd_xcoff_read_ar_hdr): Likewise.
2298 (_bfd_xcoff_openr_next_archived_file): Likewise.
2299 (_bfd_xcoff_stat_arch_elt): Likewise.
2300 * coff64-rs6000.c (_bfd_strntol): New function.
2301 (_bfd_strntoll): New function.
2302 (GET_VALUE_IN_FIELD): New macro.
2303 (xcoff64_slurp_armap): Use new macros.
2305 2017-07-19 Claudiu Zissulescu <claziss@synopsys.com>
2306 John Eric Martin <John.Martin@emmicro-us.com>
2308 * bfd-in2.h: Regenerate.
2309 * libbfd.h: Regenerate.
2310 * elf32-arc.c (JLI): Define.
2311 * reloc.c: Add JLI relocations.
2313 2017-07-18 Nick Clifton <nickc@redhat.com>
2316 * coff-sh.c: Fix spelling typos.
2317 * compress.c: Likewise.
2318 * cpu-pdp11.c: Likewise.
2319 * ecofflink.c: Likewise.
2320 * elf-m10300.c: Likewise.
2322 * elf32-arm.c: Likewise.
2323 * elf32-m68k.c: Likewise.
2324 * elf32-nds32.c: Likewise.
2325 * elf32-ppc.c: Likewise.
2326 * elf32-sh.c: Likewise.
2327 * elf32-v850.c: Likewise.
2328 * elf64-ppc.c: Likewise.
2329 * elf64-x86-64.c: Likewise.
2330 * elflink.c: Likewise.
2331 * elfnn-aarch64.c: Likewise.
2332 * elfxx-mips.c: Likewise.
2334 * sunos.c: Likewise.
2335 * vms-alpha.c: Likewise.
2336 * xcofflink.c: Likewise.
2338 2017-07-18 Nick Clifton <nickc@redhat.com>
2341 * coffcode.h (handle_COMDAT): Replace abort with an error message
2344 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
2347 * elf64-x86-64.c (elf_x86_64_relocate_section): Limit PIC check
2350 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
2352 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
2354 2017-07-16 Alan Modra <amodra@gmail.com>
2356 * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimize
2357 __tls_index GOT entries when using __tls_get_addr_opt stub.
2358 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2360 2017-07-12 Alan Modra <amodra@gmail.com>
2362 * po/es.po: Update from translationproject.org/latest/bfd/.
2363 * po/fi.po: Likewise.
2364 * po/fr.po: Likewise.
2365 * po/id.po: Likewise.
2366 * po/ja.po: Likewise.
2367 * po/ro.po: Likewise.
2368 * po/ru.po: Likewise.
2369 * po/sr.po: Likewise.
2370 * po/sv.po: Likewise.
2371 * po/tr.po: Likewise.
2372 * po/uk.po: Likewise.
2373 * po/vi.po: Likewise.
2374 * po/zh_CN.po: Likewise.
2375 * po/hr.po: New file from translationproject.org.
2376 * configure.ac (ALL_LINGUAS): Add hr. Sort.
2377 * configure: Regenerate.
2379 2017-07-12 Nick Clifton <nickc@redhat.com>
2381 Fix compile time warnings using gcc 7.1.1.
2382 * elf32-xtensa.c (elf_xtensa_get_plt_section): Increase length of
2384 (elf_xtensa_get_gotplt_section): Increase length of got_name
2386 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add a
2387 default return of FALSE.
2388 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc): Add a
2389 default return of FALSE.
2391 2017-07-12 Alan Modra <amodra@gmail.com>
2393 * binary.c (binary_set_section_contents): Don't print filepos in
2395 (coff_write_object_contents): Cast size_t for error message.
2396 (coff_slurp_line_table): Don't use bfd_vma symndx.
2397 (coff_slurp_reloc_table): Remove unneeded cast.
2398 * dwarf2.c (read_section): Cast bfd_int64_t to long long for
2400 (find_abstract_instance_name): Likewise.
2401 * elf32-arm.c (arm_type_of_stub): Correct error arg order.
2402 (bfd_elf32_arm_stm32l4xx_erratum_scan): Don't cast error arg.
2403 (elf32_arm_check_relocs): Make r_symndx an int.
2404 * elf32-cris.c (cris_elf_check_relocs): Delete extraneous %s in
2406 * elf32-metag.c (elf_metag_relocate_section): Delete extra error
2408 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Rewrite bogus
2410 * elf32-i386.c (elf_i386_check_relocs): Make r_symndx an int.
2411 * elf32-s390.c (elf_s390_check_relocs): Likewise.
2412 * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
2413 * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
2414 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
2415 * elf64-s390.c (elf_s390_check_relocs): Likewise.
2416 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
2417 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Likewise.
2418 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
2419 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
2420 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
2421 * elf64-mmix.c (_bfd_mmix_after_linker_allocation): Cast size_t args
2422 and use %lu for error message.
2423 * elflink.c (elf_link_adjust_relocs): Delete extra error message arg.
2424 * mmo.c (mmo_scan): Make stab_loc a file_ptr. Cast expression for
2427 * elf32-arm.c (elf32_arm_tls_relax): Correct format string and args
2429 (elf32_arm_final_link_relocate): Likewise.
2430 * coff-arm.c (bfd_arm_process_before_allocation): Likewise.
2431 * coffcode.h (styp_to_sec_flags): Likewise.
2432 * cofflink.c (_bfd_coff_write_global_sym): Likewise.
2433 * ecoff.c (_bfd_ecoff_slurp_symbol_table): Likewise.
2434 * elf32-arc.c (arc_elf_merge_private_bfd_data): Likewise.
2435 * elf32-bfin.c (bfinfdpic_check_relocs): Likewise.
2436 (elf32_bfin_merge_private_bfd_data): Likewise.
2437 * elf32-cris.c (cris_elf_relocate_section): Likewise.
2438 * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
2439 * elf32-i370.c (i370_elf_merge_private_bfd_data): Likewise.
2440 (i370_elf_relocate_section): Likewise.
2441 * elf32-iq2000.c (iq2000_elf_merge_private_bfd_data): Likewise.
2442 * elf32-m32c.c (m32c_elf_merge_private_bfd_data): Likewise.
2443 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise.
2444 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
2445 * elf32-mep.c (mep_elf_merge_private_bfd_data): Likewise.
2446 * elf32-mt.c (mt_elf_merge_private_bfd_data): Likewise.
2447 * elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.
2448 * elfxx-mips.c (mips_elf_merge_obj_e_flags): Likewise.
2449 (_bfd_mips_elf_merge_private_bfd_data): Likewise.
2450 * ieee.c (ieee_write_id, read_id): Likewise.
2451 * mach-o.c (bfd_mach_o_write_contents): Likewise.
2452 (bfd_mach_o_layout_commands, bfd_mach_o_read_section_32): Likewise.
2453 (bfd_mach_o_read_section_64, bfd_mach_o_read_symtab_symbol): Likewise.
2454 (bfd_mach_o_read_command, bfd_mach_o_header_p): Likewise.
2455 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Likewise.
2456 * stabs.c (_bfd_link_section_stabs): Likewise.
2458 * coff-arm.c (coff_arm_relocate_section): Use L modifier in error
2460 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
2461 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
2462 * coff-rs6000.c (xcoff_reloc_type_toc): Likewise.
2463 * coff-sh.c (sh_relax_section): Likewise.
2464 (sh_relax_delete_bytes, sh_swap_insns): Likewise.
2465 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
2466 * coffcode.h (coff_slurp_reloc_table): Likewise.
2467 * coffgen.c (_bfd_coff_get_external_symbols): Likewise.
2468 (_bfd_coff_read_string_table): Likewise.
2469 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
2470 * compress.c (bfd_get_full_section_contents): Likewise.
2471 * dwarf2.c (read_formatted_entries, decode_line_info): Likewise.
2472 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
2473 * elf.c (bfd_elf_string_from_elf_section): Likewise.
2474 * elf32-arc.c (arc_special_overflow_checks): Likewise.
2475 * elf32-arm.c (elf32_arm_tls_relax): Likewise.
2476 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Likewise.
2477 (elf32_arm_write_section): Likewise.
2478 * elf32-bfin.c (bfin_relocate_section): Likewise.
2479 (bfinfdpic_relocate_section): Likewise.
2480 * elf32-hppa.c (hppa_build_one_stub): Likewise.
2481 (final_link_relocate, elf32_hppa_relocate_section): Likewise.
2482 * elf32-i386.c (elf_i386_tls_transition): Likewise.
2483 (elf_i386_relocate_section): Likewise.
2484 * elf32-ip2k.c (ip2k_final_link_relocate): Likewise.
2485 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise.
2486 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
2487 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
2488 * elf32-metag.c (elf_metag_relocate_section): Likewise.
2489 * elf32-nds32.c (unrecognized_reloc_msg): Likewise.
2490 (nds32_elf_relax_longcall1, nds32_elf_relax_longcall2): Likewise.
2491 (nds32_elf_relax_longcall3, nds32_elf_relax_longjump1): Likewise.
2492 (nds32_elf_relax_longjump2, nds32_elf_relax_longjump3): Likewise.
2493 (nds32_elf_relax_longcall4, nds32_elf_relax_longcall5): Likewise.
2494 (nds32_elf_relax_longcall6, nds32_elf_relax_longjump4): Likewise.
2495 (nds32_elf_relax_longjump5, nds32_elf_relax_longjump6): Likewise.
2496 (nds32_elf_relax_longjump7, nds32_elf_relax_loadstore): Likewise.
2497 (nds32_elf_relax_ptr, nds32_elf_ex9_build_hash_table): Likewise.
2498 * elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
2499 * elf32-rx.c (UNSAFE_FOR_PID): Likewise.
2500 * elf32-s390.c (invalid_tls_insn, elf_s390_relocate_section): Likewise.
2501 * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
2502 * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
2503 * elf32-sh.c (sh_elf_relax_section): Likewise.
2504 (sh_elf_relax_delete_bytes, sh_elf_swap_insns): Likewise.
2505 (sh_elf_relocate_section): Likewise.
2506 * elf32-sh64.c (shmedia_prepare_reloc): Likewise.
2507 * elf32-spu.c (spu_elf_relocate_section): Likewise.
2508 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
2509 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
2510 * elf32-v850.c (v850_elf_relax_section): Likewise.
2511 * elf32-vax.c (elf_vax_check_relocs): Likewise.
2512 (elf_vax_relocate_section): Likewise.
2513 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
2514 (extend_ebb_bounds_forward, extend_ebb_bounds_backward): Likewise.
2515 (compute_text_actions, compute_ebb_proposed_actions): Likewise.
2516 (do_fix_for_relocatable_link): Likewise.
2517 * elf64-alpha.c (elf64_alpha_relax_got_load): Likewise.
2518 (elf64_alpha_relax_with_lituse): Likewise.
2519 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Likewise.
2520 (elf_hppa_final_link_relocate): Likewise.
2521 * elf64-ia64-vms.c (elf64_ia64_relax_section): Likewise.
2522 (elf64_ia64_choose_gp, elf64_ia64_relocate_section): Likewise.
2523 (elf64_vms_link_add_object_symbols): Likewise.
2524 * elf64-mmix.c (mmix_elf_perform_relocation): Likewise.
2525 (mmix_final_link_relocate): Likewise.
2526 * elf64-s390.c (invalid_tls_insn): Likewise.
2527 (elf_s390_relocate_section): Likewise.
2528 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
2529 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
2530 (elf_x86_64_relocate_section): Likewise.
2531 * elfcode.h (elf_slurp_symbol_table): Likewise.
2532 * elfcore.h (elf_core_file_p): Likewise.
2533 * elflink.c (elf_link_read_relocs_from_section): Likewise.
2534 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
2535 (elfNN_aarch64_relocate_section): Likewise.
2536 * elfnn-ia64.c (elfNN_ia64_relax_section): Likewise.
2537 (elfNN_ia64_choose_gp, elfNN_ia64_relocate_section): Likewise.
2538 * elfnn-riscv.c (riscv_elf_relocate_section): Likewise.
2539 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
2540 (_bfd_mips_elf_relocate_section): Likewise.
2541 (_bfd_mips_elf_finish_dynamic_symbol, mips_finish_exec_plt): Likewise.
2542 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
2543 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
2544 * ieee.c (ieee_slurp_external_symbols): Likewise.
2545 * ihex.c (ihex_write_object_content): Likewise.
2546 * mach-o.c (bfd_mach_o_build_exec_seg_command): Likewise.
2547 * merge.c (_bfd_merged_section_offset): Likewise.
2548 * mmo.c (mmo_write_loc_chunk): Likewise.
2549 (mmo_write_object_contents): Likewise.
2550 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Likewise.
2551 * stabs.c (_bfd_link_section_stabs): Likewise.
2552 * xcofflink.c (xcoff_link_add_symbols, xcoff_find_tc0): Likewise.
2554 2017-07-11 Alan Modra <amodra@gmail.com>
2556 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo.
2558 2017-07-11 Alan Modra <amodra@gmail.com>
2560 * elf32-ppc.c (ppc_elf_relocate_section): Emit "unexpected
2561 instruction" error using _bfd_error_handler, not einfo.
2563 2017-07-10 Nick Clifton <nickc@redhat.com>
2565 * coffcode.h (coff_slurp_symbol_table): Do not include an entry
2566 for C_AIX_WEAKEXT if it has the same value as C_WEAKEXT.
2568 2017-07-07 John Baldwin <jhb@FreeBSD.org>
2570 * elf.c (elfcore_grok_freebsd_note): Handle NT_FREEBSD_PTLWPINFO.
2572 2017-07-07 Alan Modra <amodra@gmail.com>
2574 * coffcode.h (coff_slurp_symbol_table): Handle C_AIX_WEAKEXT.
2576 2017-07-07 Alan Modra <amodra@gmail.com>
2578 * bfd.c (_doprnt): Replace "L" with "ll" when printing bfd_vma
2579 as long long. Move code replacing "ll" with "I64", and simplify.
2581 2017-07-06 H.J. Lu <hongjiu.lu@intel.com>
2583 * bfd.c (_doprnt): Convert 'L' to 'l' when setting wide_width
2586 2017-07-05 H.J. Lu <hongjiu.lu@intel.com>
2588 * dwarf2.c (line_info_add_include_dir_stub): Replace time with
2590 (line_info_add_file_name): Likewise.
2591 (decode_line_info): Likewise.
2593 2017-07-04 Tristan Gingold <gingold@adacore.com>
2595 * version.m4: Bump version to 2.29.51
2596 * configure: Regenerate.
2598 2017-07-04 Jiong Wang <jiong.wang@arm.com>
2600 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Remove the
2601 sanity check at the head of this function.
2603 2017-07-04 Jan Kratochvil <jan.kratochvil@redhat.com>
2605 * dwarf2.c (struct dwarf2_debug): Add fields dwarf_line_str_buffer and
2606 dwarf_line_str_size.
2607 (struct attr_abbrev): Add field implicit_const.
2608 (dwarf_debug_sections): Add .debug_line_str.
2609 (enum dwarf_debug_section_enum): Add debug_line_str and debug_max.
2610 (dwarf_debug_section_assert): Add static assertion.
2611 (read_indirect_line_string): New.
2612 (read_abbrevs): Support DW_FORM_implicit_const.
2613 (is_str_attr): Support DW_FORM_line_strp.
2614 (read_attribute_value): Support DW_FORM_line_strp and
2615 DW_FORM_implicit_const.
2616 (read_attribute): Support DW_FORM_implicit_const.
2617 (line_info_add_include_dir, line_info_add_include_dir_stub):
2618 (line_info_add_file_name, read_formatted_entries): New.
2619 (decode_line_info, parse_comp_unit): Support DWARF 5.
2620 (_bfd_dwarf2_cleanup_debug_info): Free dwarf_line_str_buffer.
2622 2017-07-03 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
2624 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove the
2625 abort statement that was put for symbols that are not dynamic.
2627 2017-07-03 Tristan Gingold <gingold@adacore.com>
2629 * po/bfd.pot: Regenerate
2631 2017-07-03 Alan Modra <amodra@gmail.com>
2633 * bfd.c (_doprnt): Rewrite "ll" and "L" modifiers to "I64" for
2634 __MSVCRT__. Support "L" modifier for bfd_vma. Formatting.
2635 * elf.c (setup_group): Use "Lx" to print sh_size.
2636 (_bfd_elf_setup_sections): Remove unnecessary cast and print
2637 unknown section type in hex.
2638 (copy_special_section_fields): Style fix.
2639 (bfd_section_from_shdr): Correct format for sh_link. Use a
2640 common error message for all the variants of unrecognized
2642 (assign_file_positions_for_load_sections): Use "Lx" for lma
2643 adjust error message.
2644 (assign_file_positions_for_non_load_sections): Formatting.
2645 (rewrite_elf_program_header): Formatting. Use "Lx" for
2646 bfd_vma values in error messages.
2647 * elfcode.h (elf_slurp_reloc_table_from_section): Cast
2648 ELF_R_SYM value to type expected by format.
2649 * elflink.c (elf_link_read_relocs_from_section): Use "Lx"
2651 (elf_link_add_object_symbols): Use "Lu" for symbol sizes.
2652 (elf_link_input_bfd): Use "Lx" for r_info.
2653 (bfd_elf_gc_record_vtinherit): Use "Lx" for offset.
2655 2017-07-03 Alan Modra <amodra@gmail.com>
2657 * bfd.c (bfd_scan_vma): Don't use long long unless HAVE_LONG_LONG.
2658 * coff-rs6000.c (FMT20): Handle hosts with 64-bit long and
2659 Microsoft C library variant of long long format specifier.
2660 (PRINT20): Cast value to bfd_uint64_t not long long.
2661 * coffcode.h (coff_print_aux): Use BFD_VMA_FMT.
2662 * coff-x86_64.c (coff_amd64_reloc): Use bfd_uint64_t rather than
2663 long long. Don't cast to bfd_vma.
2664 * elf32-score.c (score3_bfd_getl48): Likewise.
2665 * vms-alpha.c (_bfd_vms_slurp_eisd): Likewise.
2667 2017-07-03 Alan Modra <amodra@gmail.com>
2669 * elf.c (_bfd_elf_print_private_bfd_data): Use BFD_VMA_FMT to
2671 (bfd_elf_print_symbol): Don't cast symbol->flags.
2672 (_bfd_elf_symbol_from_bfd_symbol): Likewise.
2673 * elf32-ppc.c (ppc_elf_begin_write_processing): Correct
2674 _bfd_error_handler argument order.
2675 (ppc_elf_merge_private_bfd_data): Don't cast flags.
2677 2017-07-03 Alan Modra <amodra@gmail.com>
2679 * configure.ac: Invoke AC_CHECK_TYPES for long long. Invoke
2680 AC_TYPE_LONG_DOUBLE.
2681 * configure: Regenerate.
2682 * config.in: Regenerate.
2684 2017-06-29 Andrew Waterman <andrew@sifive.com>
2686 * elfnn-riscv.c (riscv_elf_adjust_dynamic_symbol): Fix TLS copy
2689 2017-06-29 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
2691 * elfxx-sparc.c (allocate_dynrelocs): Don't make a symbol dynamic
2692 unless it is undefined weak.
2693 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Set the flag
2694 relative_reloc to direct non-dynamic symbols to R_SPARC_RELATIVE
2696 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): If symbol
2697 is not dynamic in PIC, abort.
2699 2017-06-29 Jiong Wang <jiong.wang@arm.com>
2702 * elfnn-aarch64.c (elfNN_aarch64_allocate_dynrelocs): Only make
2703 undefined weak symbols into dynamic.
2704 (elfNN_aarch64_final_link_relocate): Generate runtime RELATIVE
2705 relocation for non-dynamic symbols.
2706 (elfNN_aarch64_finish_dynamic_symbol): Add sanity check.
2708 2017-06-29 Jiong Wang <jiong.wang@arm.com>
2710 * elfnn-aarch64.c (aarch64_relocation_aginst_gp_p): New function.
2711 (elfNN_aarch64_final_link_relocate): Delete duplicated code for
2712 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15, BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC,
2713 BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
2714 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Optimize the
2717 2017-06-29 Andreas Arnez <arnez@linux.vnet.ibm.com>
2719 * elf-bfd.h (elfcore_write_s390_gs_cb): Add prototype.
2720 (elfcore_write_s390_gs_bc): Likewise.
2721 * elf.c (elfcore_grok_s390_gs_cb): New function.
2722 (elfcore_grok_s390_gs_bc): New function.
2723 (elfcore_grok_note): Call them.
2724 (elfcore_write_s390_gs_cb): New function.
2725 (elfcore_write_s390_gs_bc): New function.
2726 (elfcore_write_register_note): Call them.
2728 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
2730 * libbfd.c (_bfd_generic_get_section_contents): Don't call
2731 bfd_get_file_size. Check archive element size.
2732 (_bfd_generic_get_section_contents_in_window): Likewise.
2734 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
2736 * bfd-in2.h: Regenerated.
2737 * bfdio.c (bfd_get_size): Change return type to ufile_ptr.
2738 (bfd_get_file_size): Likewise.
2740 2017-06-28 Maciej W. Rozycki <macro@imgtec.com>
2741 Matthew Fortune <matthew.fortune@imgtec.com>
2743 * archures.c (bfd_mach_mips_interaptiv_mr2): New macro.
2744 * cpu-mips.c (I_interaptiv_mr2): New enum value.
2745 (arch_info_struct): Add "mips:interaptiv-mr2" entry.
2746 * elfxx-mips.c (_bfd_elf_mips_mach) <E_MIPS_MACH_IAMR2>: New
2748 (mips_set_isa_flags) <bfd_mach_mips_interaptiv_mr2>: Likewise.
2749 (bfd_mips_isa_ext) <bfd_mach_mips_interaptiv_mr2>: Likewise.
2750 (print_mips_isa_ext) <AFL_EXT_INTERAPTIV_MR2>: Likewise.
2751 (mips_mach_extensions): Add `bfd_mach_mipsisa32r3' and
2752 `bfd_mach_mips_interaptiv_mr2' entries.
2753 * bfd-in2.h: Regenerate.
2755 2017-06-27 Nick Clifton <nickc@redhat.com>
2757 * tekhex.c (pass_over): Revert accidental conversion of a local
2758 array to a static array.
2760 2017-06-27 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
2763 * elf32-avr.c (elf32_avr_adjust_diff_reloc_value): Adjust
2764 reloc addend if necessary. Adjust diff only if
2765 shrinked_insn_address < end_address.
2767 2017-06-27 Alan Modra <amodra@gmail.com>
2770 * libbfd.c (_bfd_generic_get_section_contents): Warning fix.
2771 (_bfd_generic_get_section_contents_in_window): Likewise.
2773 2017-06-26 Kuan-Lin Chen <rufus@andestech.com>
2775 * elfnn-riscv.c (perform_relocation): Support the new
2776 R_RISCV_32_PCREL relocation.
2777 (riscv_elf_relocate_section): Likewise.
2778 * elfxx-riscv.c (howto_table): Likewise.
2779 (riscv_reloc_map): Likewise.
2780 * bfd-in2.h (BFD_RELOC_RISCV_32_PCREL): New relocation.
2781 * libbfd.h: Regenerate.
2783 2017-06-27 Alan Modra <amodra@gmail.com>
2786 * libbfd.c (_bfd_generic_get_section_contents): Delete abort.
2787 Use unsigned file pointer type, and remove cast.
2788 * libbfd.c (_bfd_generic_get_section_contents_in_window): Likewise.
2789 Add "count", not "sz".
2791 2017-06-26 Pedro Alves <palves@redhat.com>
2794 * libbfd.c (_bfd_generic_get_section_contents): Add "count", not
2797 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
2800 * libbfd.c (_bfd_generic_get_section_contents_in_window): Add
2803 2017-06-26 Maciej W. Rozycki <macro@imgtec.com>
2805 * cpu-mips.c (arch_info_struct): Mark the 4010 32-bit.
2806 * elfxx-mips.c (mips_set_isa_flags) <bfd_mach_mips4010>: Set
2807 E_MIPS_ARCH_2 rather than E_MIPS_ARCH_3 in `e_flags'.
2808 (mips_mach_extensions): Mark `bfd_mach_mips4010' as extending
2809 `bfd_mach_mips6000' rather than `bfd_mach_mips4000'.
2811 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
2814 * compress.c (bfd_get_full_section_contents): Don't check the
2816 * libbfd.c (_bfd_generic_get_section_contents): Check for and
2817 reject a section whose size + offset is greater than the size
2819 (_bfd_generic_get_section_contents_in_window): Likewise.
2821 2017-06-26 Nick Clifton <nickc@redhat.com>
2824 * tekhex.c (getvalue): Check for the source pointer exceeding the
2825 end pointer before the first byte is read.
2827 2017-06-26 Nick Clifton <nickc@redhat.com>
2830 * opncls.c (get_build_id): Check that the section is big enough
2831 to contain the whole note.
2832 * compress.c (bfd_get_full_section_contents): Check for and reject
2833 a section whose size is greater than the size of the entire file.
2834 * elf32-v850.c (v850_elf_copy_notes): Allow for the ouput to not
2835 contain a notes section.
2837 2017-06-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2839 * elf64-s390.c (elf_s390_additional_program_headers): Add NULL
2841 (elf_s390_modify_segment_map): Likewise.
2842 (bfd_elf_s390_set_options): Lisewise.
2844 2017-06-26 Alan Modra <amodra@gmail.com>
2846 * elflink.c (_bfd_elf_link_create_dynstrtab): Don't make dynobj
2848 (_bfd_elf_size_group_sections): Skip --just-syms bfds.
2849 (bfd_elf_size_dynamic_sections): Ignore .note.GNU-stack and
2850 .preinit_array on --just-syms bfds.
2851 (_bfd_elf_gc_mark_extra_sections): Skip --just-syms bfds.
2852 (elf_gc_sweep, bfd_elf_parse_eh_frame_entries): Likewise.
2853 (bfd_elf_gc_sections, bfd_elf_discard_info): Likewise.
2855 2017-06-25 Sergei Trofimovich <slyfox@gentoo.org>
2857 * elf.c (find_link): Bounds check "hint".
2859 2017-06-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
2861 * elf32-arm.c (using_thumb_only): Update list of architectures in
2862 BFD_ASSERT for which the logic is valid.
2863 (using_thumb2_bl): Likewise.
2864 (using_thumb2): Likewise and return true for ARMv8-R.
2865 (arch_has_arm_nop): Likewise.
2866 (tag_cpu_arch_combine): New v8r table for ARMv8-R Tag_CPU_arch
2867 merging logic. Update commentis for value 15 of v8m_baseline,
2868 v8m_mainline and v4t_plus_v6_m arrays. Use v8r array to decide
2869 merging of value 15 of Tag_CPU_arch.
2871 2017-06-23 Jiong Wang <jiong.wang@arm.com>
2873 * reloc.c (BFD_RELOC_AARCH64_ADR_GOTPAGE): Rename to
2874 BFD_RELOC_AARCH64_ADR_GOT_PAGE
2875 * bfd-in2.h: Regenerate.
2877 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2879 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Move
2880 the error_alignment label forward. Properly align program
2881 property note section.
2883 2017-06-22 Eric Christopher <echristo@gmail.com>
2885 * elf32-arm.c (elf32_arm_final_link_relocate): Use labs rather than
2886 abs to fix a truncation warning.
2888 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2890 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Resolve
2891 local undefined weak symbol to 0.
2892 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Likewise.
2894 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2896 * elf32-i386.c (elf_i386_merge_gnu_properties): If info->shstk
2897 is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
2898 (elf_i386_link_setup_gnu_properties): If info->shstk is set,
2899 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
2900 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): If
2901 info->shstk is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
2902 (elf_x86_64_link_setup_gnu_properties): If info->shstk is set,
2903 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
2905 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2907 * elf32-i386.c (elf_i386_lazy_ibt_plt0_entry): New.
2908 (elf_i386_lazy_ibt_plt_entry): Likewise.
2909 (elf_i386_pic_lazy_ibt_plt0_entry): Likewise.
2910 (elf_i386_non_lazy_ibt_plt_entry): Likewise.
2911 (elf_i386_pic_non_lazy_ibt_plt_entry): Likewise.
2912 (elf_i386_eh_frame_lazy_ibt_plt): Likewise.
2913 (elf_i386_lazy_plt_layout): Likewise.
2914 (elf_i386_non_lazy_plt_layout): Likewise.
2915 (elf_i386_link_hash_entry): Add plt_second.
2916 (elf_i386_link_hash_table): Add plt_second and
2917 plt_second_eh_frame.
2918 (elf_i386_allocate_dynrelocs): Use the second PLT if needed.
2919 (elf_i386_size_dynamic_sections): Use .plt.got unwind info for
2920 the second PLT. Check the second PLT.
2921 (elf_i386_relocate_section): Use the second PLT to resolve
2922 PLT reference if needed.
2923 (elf_i386_finish_dynamic_symbol): Fill and use the second PLT if
2925 (elf_i386_finish_dynamic_sections): Set sh_entsize on the
2926 second PLT. Generate unwind info for the second PLT.
2927 (elf_i386_plt_type): Add plt_second.
2928 (elf_i386_get_synthetic_symtab): Support the second PLT.
2929 (elf_i386_parse_gnu_properties): Support
2930 GNU_PROPERTY_X86_FEATURE_1_AND.
2931 (elf_i386_merge_gnu_properties): Support
2932 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
2933 on GNU_PROPERTY_X86_FEATURE_1_IBT
2934 (elf_i386_link_setup_gnu_properties): If info->ibt is set,
2935 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
2936 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
2937 is set on all relocatable inputs.
2938 * elf64-x86-64.c (elf_x86_64_lazy_ibt_plt_entry): New.
2939 (elf_x32_lazy_ibt_plt_entry): Likewise.
2940 (elf_x86_64_non_lazy_ibt_plt_entry): Likewise.
2941 (elf_x32_non_lazy_ibt_plt_entry): Likewise.
2942 (elf_x86_64_eh_frame_lazy_ibt_plt): Likewise.
2943 (elf_x32_eh_frame_lazy_ibt_plt): Likewise.
2944 (elf_x86_64_lazy_ibt_plt): Likewise.
2945 (elf_x32_lazy_ibt_plt): Likewise.
2946 (elf_x86_64_non_lazy_ibt_plt): Likewise.
2947 (elf_x32_non_lazy_ibt_plt): Likewise.
2948 (elf_x86_64_get_synthetic_symtab): Support the second PLT.
2949 (elf_x86_64_parse_gnu_properties): Support
2950 GNU_PROPERTY_X86_FEATURE_1_AND.
2951 (elf_x86_64_merge_gnu_properties): Support
2952 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
2953 on GNU_PROPERTY_X86_FEATURE_1_IBT
2954 (elf_x86_64_link_setup_gnu_properties): If info->ibt is set,
2955 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
2956 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
2957 is set on all relocatable inputs.
2959 2017-06-22 Nick Clifton <nickc@redhat.com>
2962 * som.c (setup_sections): NUL terminate the space_strings buffer.
2963 Check that the space.name field does not index beyond the end of
2964 the space_strings buffer.
2966 2017-06-21 Nick Clifton <nickc@redhat.com>
2969 * coff-sh.c (sh_reloc): Check for an out of range reloc.
2971 2017-06-21 Nick Clifton <nickc@redhat.com>
2974 * vms-misc.c (_bfd_vms_save_sized_string): Use unsigned int as
2975 type of the size parameter.
2976 (_bfd_vms_save_counted_string): Add second parameter - the maximum
2977 length of the counted string.
2978 * vms.h (_bfd_vms_save_sized_string): Update prototype.
2979 (_bfd_vms_save_counted_string): Likewise.
2980 * vms-alpha.c (_bfd_vms_slurp_eisd): Update calls to
2981 _bfd_vms_save_counted_string.
2982 (_bfd_vms_slurp_ehdr): Likewise.
2983 (_bfd_vms_slurp_egsd): Likewise.
2984 (Parse_module): Likewise.
2986 2017-06-21 Alan Modra <amodra@gmail.com>
2988 * elf64-ppc.c (ppc64_elf_size_stubs): Test for localentry:0 plt
2989 calls before tocsave calls.
2990 (ppc64_elf_relocate_section): Allow localentry:0 plt calls without
2993 2017-06-21 Nick Clifton <nickc@redhat.com>
2996 * reloc.c (bfd_generic_get_relocated_section_contents): Fail if
2997 bfd_get_full_section_contents returns no contents.
2999 2017-06-21 Nick Clifton <nickc@redhat.com>
3002 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an undersized
3005 2017-06-21 Nick Clifton <nickc@redhat.com>
3008 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an empty section
3010 (image_set_ptr): Likewise.
3011 (alpha_vms_fix_sec_rel): Likewise.
3012 (alpha_vms_slurp_relocs): Likewise.
3014 2017-06-21 Nick Clifton <nickc@redhat.com>
3017 * ieee.c (ieee_slurp_sections): Check for a NULL return from
3019 (ieee_archive_p): Likewise.
3020 (ieee_object_p): Likewise.
3022 2017-06-21 Nick Clifton <nickc@redhat.com>
3025 * elf.c (setup_group): Zero the group section pointer list after
3026 allocation so that loops can be caught. Check for NULL pointers
3027 when processing a group list.
3029 2017-06-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
3031 * elf-s390.h: New file.
3032 * elf64-s390.c (struct elf_s390_link_hash_table): Add params
3034 (elf_s390_additional_program_headers): New function.
3035 (elf_s390_modify_segment_map): New function.
3036 (bfd_elf_s390_set_options): New function.
3037 (elf_backend_additional_program_headers)
3038 (elf_backend_modify_segment_map): Add macro definitions.
3040 2017-06-19 H.J. Lu <hongjiu.lu@intel.com>
3043 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Check
3044 the DYNAMIC bit instead of bfd_count_sections.
3046 2017-06-19 Nick Clifton <nickc@redhat.com>
3049 * vms-alpha.c (evax_bfd_print_emh): Check for insufficient record
3051 (evax_bfd_print_eeom): Likewise.
3052 (evax_bfd_print_egsd): Check for an overlarge record length.
3053 (evax_bfd_print_etir): Likewise.
3055 2017-06-19 Nick Clifton <nickc@redhat.com>
3058 * libieee.h (struct common_header_type): Add end_p field.
3059 * ieee.c (this_byte_and_next): Do not advance input_p beyond
3061 (read_id): Check for a length that exceeds the remaining bytes in
3063 (ieee_seek): Initialise end_p.
3064 (ieee_archive_p): Likewise.
3065 (ieee_object_p): Likewise.
3067 2017-06-19 Nick Clifton <nickc@redhat.com>
3070 * vms-alpha.c (_bfd_vms_slurp_eihs): Check for invalid offset
3071 before reading the EIHS structure entries.
3073 2017-06-19 Nick Clifton <nickc@redhat.com>
3076 * vms-alpha.c (_bfd_vms_slurp_egsd): Use unsigned int for
3077 gsd_size. Check that there are enough bytes remaining to read the
3078 type and size of the next egsd. Check that the size of the egsd
3079 does not exceed the size of the record.
3081 2017-06-19 Alan Modra <amodra@gmail.com>
3083 * config.bfd: Correct targ_underscore for cris.
3085 2017-06-18 Alan Modra <amodra@gmail.com>
3087 * config.bfd: Correct targ_underscore for epiphany, ip2k,
3088 m32c, mn10200, pru, rl78, rx, crisv32 and v850.
3090 2017-06-16 Nick Clifton <nickc@redhat.com>
3092 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Do not fail if the
3093 bucketlist is empty because there are no symbols to add to the
3096 2017-06-16 Alan Modra <amodra@gmail.com>
3102 * targets.c (struct bfd_target): Add _bfd_define_start_stop.
3103 (BFD_JUMP_TABLE_LINK): Likewise.
3104 * elf-bfd.h (bfd_elf_define_start_stop): Declare.
3105 * elflink.c (_bfd_elf_gc_mark_rsec): Update comment.
3106 (bfd_elf_define_start_stop): New function.
3107 * linker.c (bfd_generic_define_start_stop): New function.
3108 * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Init
3110 * aout-adobe.c (aout_32_bfd_define_start_stop): Define.
3111 * aout-target.h (MY_bfd_define_start_stop): Define.
3112 * aout-tic30.c (MY_bfd_define_start_stop): Define.
3113 * binary.c (binary_bfd_define_start_stop): Define.
3114 * bout.c (b_out_bfd_define_start_stop): Define.
3115 * coff-alpha.c (_bfd_ecoff_bfd_define_start_stop): Define.
3116 * coff-mips.c (_bfd_ecoff_bfd_define_start_stop): Define.
3117 * coff-rs6000.c (_bfd_xcoff_bfd_define_start_stop): Define.
3118 * coffcode.h (coff_bfd_define_start_stop): Define.
3119 * elfxx-target.h (bfd_elfNN_bfd_define_start_stop): Define.
3120 * i386msdos.c (msdos_bfd_define_start_stop): Define.
3121 * i386os9k.c (os9k_bfd_define_start_stop): Define.
3122 * ieee.c (ieee_bfd_define_start_stop): Define.
3123 * ihex.c (ihex_bfd_define_start_stop): Define.
3124 * libbfd-in.h (_bfd_nolink_bfd_define_start_stop): Define.
3125 * mach-o-target.c (bfd_mach_o_bfd_define_start_stop): Define.
3126 * mmo.c (mmo_bfd_define_start_stop): Define.
3127 * nlm-target.h (nlm_bfd_define_start_stop): Define.
3128 * oasys.c (oasys_bfd_define_start_stop): Define.
3129 * pef.c (bfd_pef_bfd_define_start_stop): Define.
3130 * plugin.c (bfd_plugin_bfd_define_start_stop): Define.
3131 * ppcboot.c (ppcboot_bfd_define_start_stop): Define.
3132 * som.c (som_bfd_define_start_stop): Define.
3133 * srec.c (srec_bfd_define_start_stop): Define.
3134 * tekhex.c (tekhex_bfd_define_start_stop): Define.
3135 * versados.c (versados_bfd_define_start_stop): Define.
3136 * vms-alpha.c (vms_bfd_define_start_stop): Define.
3137 (alpha_vms_bfd_define_start_stop): Define.
3138 * xsym.c (bfd_sym_bfd_define_start_stop): Define.
3139 * bfd-in2.h: Regenerate.
3140 * libbfd.h: Regenerate.
3142 2017-06-16 Jiong Wang <jiong.wang@arm.com>
3144 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use
3145 SYMBOL_REFERENCES_LOCAL.
3147 2017-06-15 Jiong Wang <jiong.wang@arm.com>
3150 * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
3151 (elfNN_aarch64_final_link_relocate): Also propagate relocations to
3152 runtime for if there needs copy relocation elimination.
3153 (need_copy_relocation_p): New function. Return true for symbol with
3154 pc-relative references and if it's against read-only sections.
3155 (elfNN_aarch64_adjust_dynamic_symbol): Use need_copy_relocation_p.
3156 (elfNN_aarch64_check_relocs): Allocate dynrelocs for relocation types
3157 that are related with accessing external objects.
3158 (elfNN_aarch64_gc_sweep_hook): Sync the relocation types with the change
3159 in elfNN_aarch64_check_relocs.
3161 2017-06-15 Nick Clifton <nickc@redhat.com>
3164 * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
3167 (ieee_archive_p): Likewise.
3169 2017-06-15 Nick Clifton <nickc@redhat.com>
3172 * vms-alpha.c (_bfd_vms_slurp_etir): Extend check of cmd_length.
3174 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
3176 * elf32-xtensa.c (elf_xtensa_be_plt_entry,
3177 elf_xtensa_le_plt_entry): Add dimension for the ABI to arrays,
3178 keep both windowed and call0 ABI PLT definitions.
3179 (elf_xtensa_create_plt_entry): Use selected ABI to choose upper
3180 elf_xtensa_*_plt_entry endex.
3181 (ELF_MAXPAGESIZE): Fix at minimal supported MMU page size.
3183 2017-06-14 Nick Clifton <nickc@redhat.com>
3186 * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid
3189 2017-06-14 Nick Clifton <nickc@redhat.com>
3192 * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the
3193 maximum value for the ascic pointer. Check that name processing
3194 does not read beyond this value.
3195 (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the
3198 2017-06-14 Nick Clifton <nickc@redhat.com>
3201 * versados.c (versados_mkobject): Zero the allocated tdata structure.
3202 (process_otr): Check for an invalid offset in the otr structure.
3204 2017-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
3206 * config.bfd (epiphany-*-elf): Accept epiphany-*-*.
3208 2017-06-13 H.J. Lu <hongjiu.lu@intel.com>
3214 * elf-bfd.h (elf_link_hash_entry): Add start_stop. Change the
3215 vtable field to a union.
3216 (_bfd_elf_is_start_stop): Removed.
3217 * elf32-i386.c (elf_i386_convert_load_reloc): Also check for
3218 __start_SECNAME and __stop_SECNAME symbols.
3219 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
3220 * elflink.c (_bfd_elf_is_start_stop): Removed.
3221 (_bfd_elf_gc_mark_rsec): Check start_stop instead of calling
3222 _bfd_elf_is_start_stop.
3223 (elf_gc_propagate_vtable_entries_used): Skip __start_SECNAME and
3224 __stop_SECNAME symbols. Updated.
3225 (elf_gc_smash_unused_vtentry_relocs): Likewise.
3226 (bfd_elf_gc_record_vtinherit): Likewise.
3227 (bfd_elf_gc_record_vtentry): Likewise.
3229 2017-06-13 Nick Clifton <nickc@redhat.com>
3232 * elflink.c (elf_link_adjust_relocs): Generate an error when
3233 encountering a reloc against a symbol removed by garbage
3236 2017-06-12 H.J. Lu <hongjiu.lu@intel.com>
3238 * elf-bfd.h (elf_backend_data): Add struct bfd_link_info *
3239 to merge_gnu_properties.
3240 * elf-properties.c (elf_merge_gnu_properties): Add struct
3241 bfd_link_info * and pass it to merge_gnu_properties.
3242 (elf_merge_gnu_property_list): Add struct bfd_link_info *
3243 and pass it to elf_merge_gnu_properties.
3244 (_bfd_elf_link_setup_gnu_properties): Pass info to
3245 elf_merge_gnu_property_list.
3246 * elf32-i386.c (elf_i386_merge_gnu_properties): Add struct
3248 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): Likewise.
3250 2017-06-11 Joe Zbiciak <joe.zbiciak@leftturnonly.info>
3253 * binary.c (binary_set_section_contents): Scale lma by octets
3254 per byte to set filepos.
3256 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3258 * elf32-arc.c (elf_arc_check_relocs): Fixed conditions to generate
3261 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3263 * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to
3266 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3268 * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to
3269 patched section contents for TLS IE reloc.
3270 * elf32-arc.c: Remove TCB_SIZE preprocessor macro.
3272 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3274 * elf32-arc.c (elf_arc_relocate_section): Added "call" to
3275 RELOC_FOR_GLOBAL_SYMBOL macro.
3277 2018-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3279 * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
3282 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3284 * config/tc-arc.c (md_undefined_symbol): Changed.
3285 * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed.
3287 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3289 * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
3292 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3294 * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
3295 warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
3297 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3299 * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
3302 2017-06-08 Richard Earnshaw <rearnsha@arm.com>
3304 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
3305 that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
3306 is non-zero. Add clarifying comments.
3308 2017-06-08 H.J. Lu <hongjiu.lu@intel.com>
3310 * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
3311 name. Use local IFUNC symbol name string to report unsupported
3312 non-PIC call to IFUNC function.
3313 (elf_i386_relocate_section): Dump local IFUNC name with minfo
3314 when generating R_386_IRELATIVE relocation.
3315 (elf_i386_finish_dynamic_symbol): Likewise.
3316 * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
3318 (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
3319 when generating R_X86_64_IRELATIVE relocation.
3320 (elf_x86_64_finish_dynamic_symbol): Likewise.
3322 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
3324 * elf.c (setup_group): Make sure BFD sections are created for all
3325 group sections in the input file when processing SHF_GROUP
3327 (bfd_section_from_shdr): Avoid duplicating logic already
3328 implemented in `setup_group'.
3330 2017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
3333 * peXXigen.c (pe_print_idata): Use the address of the first thunk
3334 if the hint address is zero.
3336 2017-06-06 James Clarke <jrtc27@jrtc27.com>
3339 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
3340 ELF_COMMON_DEF_P for common symbols.
3342 2017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
3344 * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
3345 SEC_GROUP sections as SEC_EXCLUDE.
3346 (bfd_elf_set_group_contents): Replace use of abort with an assert.
3347 (assign_section_numbers): Use resolve_section_groups flag instead
3348 of relocatable link type.
3349 (_bfd_elf_init_private_section_data): Use resolve_section_groups
3350 flag instead of checking the final_link flag for part of the
3351 checks in here. Fix white space as a result.
3352 * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
3353 instead of relocatable link type.
3354 (bfd_elf_final_link): Likewise.
3356 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
3358 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
3360 * elf32-score.c (score_elf_final_link_relocate): Likewise.
3361 (s3_bfd_score_elf_check_relocs): Likewise.
3362 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
3363 (score_elf_final_link_relocate): Likewise.
3364 (s7_bfd_score_elf_check_relocs): Likewise.
3366 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
3368 * elflink.c (init_reloc_cookie_rels): Remove unused variable
3371 2017-06-06 Maciej W. Rozycki <macro@imgtec.com>
3373 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
3374 from `reloc_count' rather than decrementing it.
3375 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
3376 `reloc_count' by `int_rels_per_ext_rel'.
3377 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
3378 `reloc_count' by `int_rels_per_ext_rel' for last relocation
3379 entry determination.
3380 (s3_bfd_score_elf_check_relocs): Likewise.
3381 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
3382 (s7_bfd_score_elf_relocate_section): Likewise.
3383 (s7_bfd_score_elf_check_relocs): Likewise.
3384 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
3385 prototype and function.
3386 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
3387 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
3388 triple rather than once the sum of REL and RELA relocation entry
3390 (bfd_elf64_get_reloc_upper_bound): Remove macro.
3391 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
3392 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
3393 storage allocation size determination.
3394 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
3395 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
3396 by `int_rels_per_ext_rel' for last relocation entry
3398 (bfd_elf_final_link): Do not multiply `reloc_count' by
3399 `int_rels_per_ext_rel' for internal relocation storage
3400 allocation size determination.
3401 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
3402 `int_rels_per_ext_rel' for last relocation entry determination.
3403 (elf_gc_smash_unused_vtentry_relocs): Likewise.
3404 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
3405 (_bfd_mips_elf_relocate_section): Likewise.
3407 2017-06-05 Alan Modra <amodra@gmail.com>
3410 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
3412 2017-06-01 John Baldwin <jhb@FreeBSD.org>
3414 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
3415 determine structure sizes.
3416 (elfcore_grok_freebsd_prstatus): Likewise.
3418 2017-06-01 Alan Modra <amodra@gmail.com>
3420 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
3421 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
3423 (is_elfv2_localentry0): New function.
3424 (ppc64_elf_tls_setup): Default params->plt_localentry0.
3425 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
3426 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
3427 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
3428 optimized localentry:0 stubs.
3429 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
3430 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
3432 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
3434 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
3436 2017-05-30 Casey Smith <clegg89@gmail.com>
3439 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
3440 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
3442 2017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
3444 * cpu-arc.c (arc_compatible): New function.
3446 2017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
3448 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
3450 2017-05-30 H.J. Lu <hongjiu.lu@intel.com>
3453 * bfdio.c (bfd_get_file_size): New function.
3454 * bfd-in2.h: Regenerated.
3456 2017-05-23 Dilian Palauzov <git-dpa@aegee.org>
3458 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
3461 2017-05-22 H.J. Lu <hongjiu.lu@intel.com>
3463 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
3464 dynobj instead of htab->elf.dynobj.
3466 2017-05-19 Maciej W. Rozycki <macro@imgtec.com>
3468 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
3470 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
3471 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
3472 actual number of internal relocations retrieved. Adjust
3473 function description.
3474 (bfd_elf64_canonicalize_reloc): Remove macro.
3475 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
3477 2017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
3479 * archures.c (bfd_mach_sparc_v9m8): Define.
3480 (bfd_mach_sparc_v8plusm8): Likewise.
3481 (bfd_mach_sparc_v9_p): Adjust to M8.
3482 (bfd_mach_sparc_64bit_p): Likewise.
3483 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
3484 bfd_mach_sparc_v8plusm8.
3485 * bfd-in2.h: Regenerated.
3486 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
3488 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
3489 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
3490 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
3492 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
3493 bfd_mach_sparc_v8plusm8.
3495 2017-05-19 Alan Modra <amodra@gmail.com>
3497 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
3498 debug and special sections when no non-note alloc sections in an
3501 2017-05-18 Alan Modra <amodra@gmail.com>
3503 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
3504 * elf-m10300.c: Likewise.
3506 * elf32-arc.c: Likewise.
3507 * elf32-bfin.c: Likewise.
3508 * elf32-m68k.c: Likewise.
3509 * elf32-nds32.c: Likewise.
3510 * elf32-tilepro.c: Likewise.
3511 * elflink.c: Likewise.
3512 * elfnn-aarch64.c: Likewise.
3513 * elfnn-riscv.c: Likewise.
3514 * elfxx-tilegx.c: Likewise.
3515 * mach-o.c: Likewise.
3516 * peXXigen.c: Likewise.
3517 * vms-alpha.c: Likewise.
3518 * vms-lib.c: Likewise.
3520 2017-05-17 H.J. Lu <hongjiu.lu@intel.com>
3523 * elflink.c (elf_gc_mark_debug_section): New function.
3524 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
3525 referenced by kept debug sections.
3527 2017-05-16 Alan Modra <amodra@gmail.com>
3529 * elf-m10300.c: Rename occurrences of non_ir_ref.
3530 * elf32-arm.c: Likewise.
3531 * elf32-bfin.c: Likewise.
3532 * elf32-cr16.c: Likewise.
3533 * elf32-cris.c: Likewise.
3534 * elf32-d10v.c: Likewise.
3535 * elf32-dlx.c: Likewise.
3536 * elf32-fr30.c: Likewise.
3537 * elf32-frv.c: Likewise.
3538 * elf32-hppa.c: Likewise.
3539 * elf32-i370.c: Likewise.
3540 * elf32-i386.c: Likewise.
3541 * elf32-iq2000.c: Likewise.
3542 * elf32-lm32.c: Likewise.
3543 * elf32-m32c.c: Likewise.
3544 * elf32-m32r.c: Likewise.
3545 * elf32-m68hc1x.c: Likewise.
3546 * elf32-m68k.c: Likewise.
3547 * elf32-mcore.c: Likewise.
3548 * elf32-metag.c: Likewise.
3549 * elf32-microblaze.c: Likewise.
3550 * elf32-moxie.c: Likewise.
3551 * elf32-msp430.c: Likewise.
3552 * elf32-mt.c: Likewise.
3553 * elf32-nios2.c: Likewise.
3554 * elf32-or1k.c: Likewise.
3555 * elf32-ppc.c: Likewise.
3556 * elf32-rl78.c: Likewise.
3557 * elf32-s390.c: Likewise.
3558 * elf32-score.c: Likewise.
3559 * elf32-score7.c: Likewise.
3560 * elf32-sh.c: Likewise.
3561 * elf32-tic6x.c: Likewise.
3562 * elf32-tilepro.c: Likewise.
3563 * elf32-v850.c: Likewise.
3564 * elf32-vax.c: Likewise.
3565 * elf32-xstormy16.c: Likewise.
3566 * elf32-xtensa.c: Likewise.
3567 * elf64-alpha.c: Likewise.
3568 * elf64-hppa.c: Likewise.
3569 * elf64-ia64-vms.c: Likewise.
3570 * elf64-mmix.c: Likewise.
3571 * elf64-ppc.c: Likewise.
3572 * elf64-s390.c: Likewise.
3573 * elf64-sh64.c: Likewise.
3574 * elf64-x86-64.c: Likewise.
3575 * elflink.c: Likewise.
3576 * elfnn-aarch64.c: Likewise.
3577 * elfnn-ia64.c: Likewise.
3578 * elfnn-riscv.c: Likewise.
3579 * elfxx-mips.c: Likewise.
3580 * elfxx-sparc.c: Likewise.
3581 * elfxx-tilegx.c: Likewise.
3582 * linker.c: Likewise.
3584 2017-05-16 Alan Modra <amodra@gmail.com>
3586 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
3587 * elflink.c (elf_link_add_object_symbols): Update to use
3589 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
3591 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
3593 2017-05-15 Maciej W. Rozycki <macro@imgtec.com>
3595 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
3597 2017-05-12 H.J. Lu <hongjiu.lu@intel.com>
3599 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
3600 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
3602 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
3604 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
3606 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
3608 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
3609 to plt_second/plt_second_eh_frame.
3610 (elf_x86_64_link_hash_newfunc): Updated.
3611 (elf_x86_64_allocate_dynrelocs): Likewise.
3612 (elf_x86_64_size_dynamic_sections): Likewise.
3613 (elf_x86_64_relocate_section): Likewise.
3614 (elf_x86_64_finish_dynamic_symbol): Likewise.
3615 (elf_x86_64_finish_dynamic_sections): Likewise.
3616 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
3617 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
3619 (elf_backend_setup_gnu_properties): Updated. Create the
3620 .plt.sec section instead of the .plt.sec section.
3622 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
3624 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
3625 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
3626 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
3628 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
3630 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
3631 (bfd_elf64_set_reloc): Define.
3632 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
3634 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
3636 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
3637 (struct bfd_target): New field _bfd_set_reloc.
3638 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
3639 * reloc.c (_bfd_generic_set_reloc): New function.
3640 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
3641 * nlm-target.h (nlm_set_reloc): Likewise.
3642 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
3643 * aout-tic30.c (MY_set_reloc): Likewise.
3644 * aout-target.h (MY_set_reloc): Likewise.
3645 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
3646 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
3647 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
3648 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
3649 * aout-adobe.c (aout_32_set_reloc): Likewise.
3650 * bout.c (b_out_set_reloc): Likewise.
3651 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
3652 * i386os9k.c (aout_32_set_reloc): Likewise.
3653 * ieee.c (ieee_set_reloc): Likewise.
3654 * oasys.c (oasys_set_reloc): Likewise.
3655 * som.c (som_set_reloc): Likewise.
3656 * versados.c (versados_set_reloc): Likewise.
3657 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
3658 _bfd_generic_set_reloc.
3659 (rs6000_xcoff64_aix_vec): LIkewise.
3660 * libbfd.c (_bfd_norelocs_set_reloc): New function.
3661 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
3662 * i386msdos.c (msdos_set_reloc): Define to
3663 _bfd_norelocs_set_reloc.
3664 * elfcode.h (elf_set_reloc): Define.
3665 * bfd-in2.h: Regenerated.
3667 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
3670 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
3671 for IFUNC function address.
3673 2017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
3675 * elf32-arc.c (FEATURE_LIST_NAME): Define.
3676 (CONFLICT_LIST): Likewise.
3677 (opcode/arc-attrs.h): Include.
3678 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
3679 (arc_extract_features): New file.
3680 (arc_stralloc): Likewise.
3681 (arc_elf_merge_attributes): Likewise.
3682 (arc_elf_merge_private_bfd_data): Use object attributes.
3683 (bfd_arc_get_mach_from_attributes): New function.
3684 (arc_elf_object_p): Use object attributes.
3685 (arc_elf_final_write_processing): Likewise.
3686 (elf32_arc_obj_attrs_arg_type): New function.
3687 (elf32_arc_obj_attrs_handle_unknown): Likewise.
3688 (elf32_arc_section_from_shdr): Likewise.
3689 (elf_backend_obj_attrs_vendor): Define.
3690 (elf_backend_obj_attrs_section): Likewise.
3691 (elf_backend_obj_attrs_arg_type): Likewise.
3692 (elf_backend_obj_attrs_section_type): Likewise.
3693 (elf_backend_obj_attrs_handle_unknown): Likewise.
3694 (elf_backend_section_from_shdr): Likewise.
3696 2017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
3699 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
3700 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
3701 and the destination is a Thumb symbol.
3703 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
3705 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
3706 initializer to silence GCC 4.2.
3707 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
3709 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
3711 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
3712 (LAZY_PLT_ENTRY_SIZE): This.
3713 (NON_LAZY_PLT_ENTRY_SIZE): New.
3714 (elf_x86_64_plt0_entry): Renamed to ...
3715 (elf_x86_64_lazy_plt0_entry): This.
3716 (elf_x86_64_plt_entry): Renamed to ...
3717 (elf_x86_64_lazy_plt_entry): This.
3718 (elf_x86_64_bnd_plt0_entry): Renamed to ...
3719 (elf_x86_64_lazy_bnd_plt0_entry): This.
3720 (elf_x86_64_legacy_plt_entry): Removed.
3721 (elf_x86_64_bnd_plt_entry): Renamed to ...
3722 (elf_x86_64_lazy_bnd_plt_entry): This.
3723 (elf_x86_64_legacy_plt2_entry): Renamed to ...
3724 (elf_x86_64_non_lazy_plt_entry): This.
3725 (elf_x86_64_bnd_plt2_entry): Renamed to ...
3726 (elf_x86_64_non_lazy_bnd_plt_entry): This.
3727 (elf_x86_64_eh_frame_plt): Renamed to ...
3728 (elf_x86_64_eh_frame_lazy_plt): This.
3729 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
3730 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
3731 (elf_x86_64_eh_frame_plt_got): Renamed to ...
3732 (elf_x86_64_eh_frame_non_lazy_plt): This.
3733 (elf_x86_64_lazy_plt_layout): New.
3734 (elf_x86_64_non_lazy_plt_layout): Likewise.
3735 (elf_x86_64_plt_layout): Likewise.
3736 (elf_x86_64_backend_data): Remove PLT layout information. Add
3737 os for target system.
3738 (GET_PLT_ENTRY_SIZE): Removed.
3739 (elf_x86_64_lazy_plt): New.
3740 (elf_x86_64_non_lazy_plt): Likewise.
3741 (elf_x86_64_lazy_bnd_plt): Likewise.
3742 (elf_x86_64_non_lazy_bnd_plt): Likewise.
3743 (elf_x86-64_arch_bed): Updated.
3744 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
3745 (elf_x86_64_create_dynamic_sections): Removed.
3746 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
3747 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
3748 (elf_x86-64_adjust_dynamic_symbol): Updated.
3749 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
3750 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
3751 size for PLT0 if there is no PLT0. Get plt_entry_size from
3752 non_lazy_plt for non-lazy PLT entries.
3753 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
3754 from non_lazy_plt for non-lazy PLT entries.
3755 (elf_x86-64_relocate_section): Updated. Properly get PLT index
3756 if there is no PLT0.
3757 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
3758 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
3759 entries with non-lazy PLT layout. Don't fill the second and third
3760 slots in the PLT entry if there is no PLT0.
3761 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
3762 if there is no PLT0. Set sh_entsize on the .plt.got section.
3763 (compare_relocs): New.
3764 (elf_x86_64_plt_type): Likewise.
3765 (elf_x86_64_plt): Likewise.
3766 (elf_x86_64_nacl_plt): New. Forward declaration.
3767 (elf_x86_64_get_plt_sym_val): Removed.
3768 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
3769 against all dynamic relocations.
3770 (elf_x86_64_link_setup_gnu_properties): New function.
3771 (elf_backend_create_dynamic_sections): Updated.
3772 (elf_backend_setup_gnu_properties): New.
3773 (elf_x86_64_nacl_plt): New.
3774 (elf_x86_64_nacl_arch_bed): Updated.
3776 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
3778 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
3779 (LAZY_PLT_ENTRY_SIZE): This.
3780 (NON_LAZY_PLT_ENTRY_SIZE): New.
3781 (elf_i386_plt0_entry): Renamed to ...
3782 (elf_i386_lazy_plt0_entry): This.
3783 (elf_i386_plt_entry): Renamed to ...
3784 (elf_i386_lazy_plt_entry): This.
3785 (elf_i386_pic_plt0_entry): Renamed to ...
3786 (elf_i386_pic_lazy_plt0_entry): This.
3787 (elf_i386_pic_plt_entry): Renamed to ...
3788 (elf_i386_pic_lazy_plt_entry): This.
3789 (elf_i386_got_plt_entry): Renamed to ...
3790 (elf_i386_non_lazy_plt_entry): This.
3791 (elf_i386_pic_got_plt_entry): Renamed to ...
3792 (elf_i386_pic_non_lazy_plt_entry): This.
3793 (elf_i386_eh_frame_plt): Renamed to ...
3794 (elf_i386_eh_frame_lazy_plt): This.
3795 (elf_i386_eh_frame_plt_got): Renamed to ...
3796 (elf_i386_eh_frame_non_lazy_plt): This.
3797 (elf_i386_plt_layout): Renamed to ...
3798 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
3799 eh_frame_plt_got_size.
3800 (elf_i386_non_lazy_plt_layout): New.
3801 (elf_i386_plt_layout): Likewise.
3802 (elf_i386_non_lazy_plt): Likewise.
3803 (GET_PLT_ENTRY_SIZE): Removed.
3804 (elf_i386_plt): Renamed to ...
3805 (elf_i386_lazy_plt): This.
3806 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
3807 (elf_i386_arch_bed): Updated.
3808 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
3809 (elf_i386_create_dynamic_sections): Removed.
3810 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
3811 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
3812 (elf_i386_adjust_dynamic_symbol): Updated.
3813 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
3814 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
3815 size for PLT0 if there is no PLT0.
3816 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
3817 output section is discarded only if GOT isn't empty.
3818 (elf_i386_relocate_section): Updated. Properly get PLT index
3819 if there is no PLT0.
3820 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
3821 second and third slots in the PLT entry if there is no PLT0.
3822 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
3823 if there is no PLT0. Set sh_entsize on the .plt.got section.
3824 (elf_i386_nacl_plt): Forward declaration.
3825 (elf_i386_get_plt_sym_val): Removed.
3826 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
3827 against all dynamic relocations.
3828 (elf_i386_link_setup_gnu_properties): New function.
3829 (elf_backend_create_dynamic_sections): Updated.
3830 (elf_backend_setup_gnu_properties): New.
3831 (elf_i386_nacl_plt): Updated.
3832 (elf_i386_nacl_arch_bed): Likewise.
3833 (elf_i386_vxworks_arch_bed): Likewise.
3835 2017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
3837 * elflink.c (elf_output_implib): Remove executable flag from import
3839 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
3840 library is a relocatable object file.
3842 2017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
3845 * elf32-avr.c (avr_should_move_sym): New function.
3846 (avr_should_reduce_sym_size): Likewise.
3847 (avr_should_increase_sym_size): Likewise.
3848 (elf32_avr_relax_delete_bytes): Adjust symbol values
3849 and sizes by calling new functions.
3851 2017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
3853 * config.bfd (riscv32-*): Enable rv64.
3855 2017-05-02 Alan Modra <amodra@gmail.com>
3858 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
3859 rather than h->root.type == bfd_link_hash_new.
3860 (bfd_elf_record_link_assignment): Similarly, call
3861 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
3863 2017-04-29 Alan Modra <amodra@gmail.com>
3866 * reloc.c (reloc_offset_in_range): New function.
3867 (bfd_perform_relocation, bfd_install_relocation): Use it.
3868 (_bfd_final_link_relocate): Likewise.
3870 2017-04-28 H.J. Lu <hongjiu.lu@intel.com>
3872 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
3873 before using .plt.got.
3874 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
3876 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3878 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
3879 instead of "+=" to update 0.
3881 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3883 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
3884 .plt.got section here.
3885 (elf_i386_check_relocs): Don't create the .plt.got section.
3886 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
3887 the .plt.got and .plt.bnd sections here.
3888 (elf_x86_64_check_relocs): Don't create the .plt.got nor
3891 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3893 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
3895 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
3896 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
3897 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
3898 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
3901 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3903 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
3905 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
3906 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
3907 the first relocatable ELF input with GNU properties.
3909 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3911 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
3912 VxWorks for non-PIC.
3914 2017-04-27 Alan Modra <amodra@gmail.com>
3916 * elf-bfd.h (struct elf_backend_data): Make asection param of
3917 elf_backend_eh_frame_address_size const.
3918 (_bfd_elf_eh_frame_address_size): Likewise.
3919 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
3920 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
3921 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
3922 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
3923 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
3924 (next_cie_fde_offset): Constify params.
3925 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
3927 2017-04-27 Alan Modra <amodra@gmail.com>
3929 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
3930 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
3931 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
3933 (offset_adjust): New function.
3934 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
3935 (adjust_eh_frame_local_symbols): Likewise.
3936 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
3937 after changing anything. Return true if anything changed.
3938 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
3939 _bfd_elf_adjust_eh_frame_global_symbol for globals.
3941 2017-04-27 Alan Modra <amodra@gmail.com>
3943 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
3946 2017-04-27 Alan Modra <amodra@gmail.com>
3948 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
3949 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
3950 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
3951 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
3952 for undef and undefweak dyn_relocs.
3953 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
3954 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
3955 (allocate_got, allocate_dynrelocs): Likewise.
3956 (ppc64_elf_relocate_section): Likewise.
3958 2017-04-26 H.J. Lu <hongjiu.lu@intel.com>
3960 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
3961 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
3962 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
3963 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
3965 2017-04-26 Nick Clifton <nickc@redhat.com>
3968 * reloc.c (bfd_perform_relocation): Check for a negative address
3971 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
3974 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
3976 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
3977 (elf_backend_always_renumber_dynsyms): Define.
3978 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
3979 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
3980 * elflink.c (bfd_elf_size_dynamic_sections): Also call
3981 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
3983 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
3985 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
3987 * elflink.c (bfd_elf_size_dynamic_sections): Only call
3988 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
3989 sections have been created.
3991 2017-04-26 Nick Clifton <nickc@redhat.com>
3994 * compress.c (bfd_init_section_compress_status): Check the return
3995 value from bfd_malloc.
3997 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3999 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
4000 no_finish_dynamic_symbol.
4001 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
4003 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
4004 weak symbol, don't make it dynamic.
4005 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
4006 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
4007 relocation for GOT reference.
4008 (elf_x86_64_finish_dynamic_symbol): Abort if
4009 no_finish_dynamic_symbol isn't 0.
4011 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
4014 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
4015 undefined weak symbol, don't make it dynamic.
4016 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
4017 set no_finish_dynamic_symbol and generate R_386_RELATIVE
4018 relocation for R_386_GOT32.
4020 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
4023 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
4025 2017-04-23 Alan Modra <amodra@gmail.com>
4028 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
4029 * elf.c (lcomm_sym): New.
4030 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
4031 * bfd-in2.h: Regenerate.
4033 2017-04-23 Alan Modra <amodra@gmail.com>
4036 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
4037 parameters and comment.
4038 (_bfd_elf_get_reloc_section): Delete.
4039 (_bfd_elf_plt_get_reloc_section): Declare.
4040 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
4041 New functions. Don't blindly skip over assumed .rel/.rela prefix.
4043 (_bfd_elf_get_reloc_section): ..here. Delete.
4044 (assign_section_numbers): Call elf_get_reloc_section.
4045 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
4046 * elfxx-target.h (elf_backend_get_reloc_section): Update.
4048 2017-04-23 Alan Modra <amodra@gmail.com>
4051 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
4054 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
4057 * elf32-i386.c (elf_i386_link_hash_entry): Add
4058 no_finish_dynamic_symbol.
4059 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
4060 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
4061 symbol, don't make it dynamic in PIE.
4062 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
4063 set no_finish_dynamic_symbol and generate R_386_RELATIVE
4064 relocation for R_386_GOT32
4065 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
4068 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
4072 * elflink.c (elf_link_add_object_symbols): Require
4073 --no-dynamic-linker with -E/--dynamic-list when creating
4076 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
4078 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
4081 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
4083 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
4084 dynamic symbol sorting.
4086 2017-04-20 H.J. Lu <hongjiu.lu@intel.com>
4089 * elflink.c (elf_link_add_object_symbols): Preserve
4090 dynamic_ref_after_ir_def when restoring the symbol table for
4091 unneeded dynamic object.
4093 2017-04-19 H.J. Lu <hongjiu.lu@intel.com>
4096 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
4097 on on undefined IFUNC symbol in the second PLT.
4099 2017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
4101 * peXXigen.c (pe_print_reloc): Correct chunk_end.
4103 2017-04-19 Alan Modra <amodra@gmail.com>
4105 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
4106 or make dynamic for info->dynamic_undefined_weak 0 and 1.
4107 * elf32-ppc.c:Formatting.
4108 (ensure_undefweak_dynamic): Don't make dynamic when
4109 info->dynamic_undefined_weak is zero.
4110 (allocate_dynrelocs): Discard undefweak dyn_relocs for
4111 info->dynamic_undefined_weak. Discard undef dyn_relocs when
4112 not default visibility. Discard undef and undefweak
4114 (ppc_elf_relocate_section): Adjust to suit.
4115 * elf64-ppc.c: Formatting.
4116 (ensure_undefweak_dynamic): Don't make dynamic when
4117 info->dynamic_undefined_weak is zero.
4118 (allocate_dynrelocs): Discard undefweak dyn_relocs for
4119 info->dynamic_undefined_weak. Discard them earlier.
4121 2017-04-17 H.J. Lu <hongjiu.lu@intel.com>
4124 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
4125 before generating the version definition section.
4127 2017-04-17 Alan Modra <amodra@gmail.com>
4129 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
4130 state when a regular object file defines a symbol with
4131 incompatible type to that defined by an earlier shared lib.
4133 2017-04-13 Alan Modra <amodra@gmail.com>
4135 * coffcode.h: Wrap some overly long _bfd_error_handler args.
4137 * elf32-arm.c: Likewise.
4138 * elf32-i386.c: Likewise.
4139 * elf32-mep.c: Likewise.
4140 * elf64-ia64-vms.c: Likewise.
4141 * elf64-x86-64.c: Likewise.
4142 * elflink.c: Likewise.
4143 * elfnn-ia64.c: Likewise.
4144 * elfxx-mips.c: Likewise.
4146 2017-04-13 Alan Modra <amodra@gmail.com>
4148 * aoutx.h: Use %B and %A in error messages throughout file.
4149 * aout-cris.c: Likewise.
4150 * archive.c: Likewise.
4151 * binary.c: Likewise.
4152 * coff-rs6000.c: Likewise.
4153 * coff-tic4x.c: Likewise.
4154 * coffcode.h: Likewise.
4155 * coffgen.c: Likewise.
4156 * cofflink.c: Likewise.
4157 * coffswap.h: Likewise.
4158 * cpu-arm.c: Likewise.
4159 * elf-eh-frame.c: Likewise.
4160 * elf-m10300.c: Likewise.
4162 * elf32-arc.c: Likewise.
4163 * elf32-arm.c: Likewise.
4164 * elf32-bfin.c: Likewise.
4165 * elf32-frv.c: Likewise.
4166 * elf32-iq2000.c: Likewise.
4167 * elf32-m32c.c: Likewise.
4168 * elf32-microblaze.c: Likewise.
4169 * elf32-nds32.c: Likewise.
4170 * elf32-rl78.c: Likewise.
4171 * elf32-rx.c: Likewise.
4172 * elf32-score.c: Likewise.
4173 * elf32-score7.c: Likewise.
4174 * elf32-sh64.c: Likewise.
4175 * elf32-v850.c: Likewise.
4176 * elf32-vax.c: Likewise.
4177 * elf32-visium.c: Likewise.
4178 * elf64-ia64-vms.c: Likewise.
4179 * elf64-mmix.c: Likewise.
4180 * elf64-sh64.c: Likewise.
4181 * elfcode.h: Likewise.
4182 * elfnn-aarch64.c: Likewise.
4183 * elfnn-ia64.c: Likewise.
4184 * elfxx-mips.c: Likewise.
4185 * hpux-core.c: Likewise.
4188 * linker.c: Likewise.
4189 * merge.c: Likewise.
4191 * oasys.c: Likewise.
4192 * pdp11.c: Likewise.
4193 * peXXigen.c: Likewise.
4194 * rs6000-core.c: Likewise.
4195 * vms-alpha.c: Likewise.
4196 * xcofflink.c: Likewise.
4198 2017-04-13 Alan Modra <amodra@gmail.com>
4200 * bfd.c (PRINT_TYPE): Define.
4201 (_doprnt): New function.
4202 (error_handler_internal): Use _doprnt.
4203 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
4204 calls in their natural order, throughout file.
4205 * coff-mcore.c: Likewise.
4206 * coff-ppc.c: Likewise.
4207 * coff-tic80.c: Likewise.
4208 * cofflink.c: Likewise.
4209 * elf-s390-common.c: Likewise.
4211 * elf32-arm.c: Likewise.
4212 * elf32-i386.c: Likewise.
4213 * elf32-m32r.c: Likewise.
4214 * elf32-msp430.c: Likewise.
4215 * elf32-spu.c: Likewise.
4216 * elf64-ia64-vms.c: Likewise.
4217 * elf64-sparc.c: Likewise.
4218 * elf64-x86-64.c: Likewise.
4219 * elflink.c: Likewise.
4220 * elfnn-aarch64.c: Likewise.
4221 * elfnn-ia64.c: Likewise.
4222 * elfxx-mips.c: Likewise.
4224 2017-04-13 Alan Modra <amodra@gmail.com>
4226 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
4227 branch veneers" error. Fix double space and format message.
4228 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
4229 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
4231 2017-04-13 Alan Modra <amodra@gmail.com>
4233 * bfd-in2.h: Regenerate.
4235 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
4237 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
4238 extra `\n' in warning/error messages.
4239 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
4240 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
4242 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
4244 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
4245 processor-specific properties with generic ELF target vector.
4247 2017-04-10 Qing Zhao <qing.zhao@oracle.com>
4249 * elf32-sparc.c (elf_backend_fixup_symbol): New.
4250 * elf64-sparc.c (elf_backend_fixup_symbol): New.
4251 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
4252 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
4254 (link_hash_newfunc): Initialize has_got_reloc and
4256 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
4258 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
4260 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
4262 (_bfd_sparc_elf_fixup_symbol): New function.
4263 (allocate_dynrelocs): Don't allocate space for dynamic
4264 relocations and discard relocations against resolved undefined
4265 weak symbols in executable. Don't make resolved undefined weak
4266 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
4267 relocation against undefined weak symbols in PIE.
4268 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
4269 relocations against resolved undefined weak symbols in PIE
4270 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
4271 without ynamic PLT/GOT relocations for resolved undefined weak
4273 Don't generate dynamic relocation against resolved undefined
4274 weak symbol in executable.
4275 (pie_finish_undefweak_symbol): New function.
4276 (_bfd_sparc_elf_finish_dynamic_sections): Call
4277 pie_finish_undefweak_symbol on all symbols in PIE.
4278 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
4279 (_bfd_sparc_elf_fixup_symbol): New function.
4281 2017-04-10 Nick Clifton <nickc@redhat.com>
4283 * config.bfd: Remove ns32k from obsolete list.
4285 2017-04-10 Alan Modra <amodra@gmail.com>
4288 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
4289 (special_sections_i): Likewise for .init_array.
4290 (special_sections_p): Likewise for .preinit_array.
4292 2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
4296 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
4297 ELF_COMMON_DEF_P for common symbols.
4298 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
4299 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
4300 * elflink.c (_bfd_elf_merge_symbol): Revert commits
4301 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
4302 07492f668d2173da7a2bda3707ff0985e0f460b6.
4304 2017-04-07 Pedro Alves <palves@redhat.com>
4306 * opncls.c (bfd_get_debug_link_info): Rename to...
4307 (bfd_get_debug_link_info_1): ... this. Change type of second
4308 parameter to void pointer. Adjust.
4309 (bfd_get_debug_link_info): Reimplement on top of
4310 bfd_get_debug_link_info_1.
4311 (separate_debug_file_exists, separate_alt_debug_file_exists):
4312 Change type of second parameter to void pointer. Adjust.
4313 (get_func_type, check_func_type): Change type of second parameter
4315 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
4316 the callback functions instead of passing the address of a local.
4317 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
4318 find_separate_debug_file.
4319 (get_alt_debug_link_info_shim): Change type of second parameter to
4320 void pointer. Adjust.
4321 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
4322 find_separate_debug_file.
4323 (get_build_id_name, bfd_boolean check_build_id_file): Change type
4324 of second parameter to void pointer. Adjust.
4325 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
4326 pointer local to find_separate_debug_file.
4328 2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
4330 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
4331 external symbols with a definition.
4332 (_bfd_coff_gc_mark_extra_sections): Fix typo.
4334 2017-04-07 Alan Modra <amodra@gmail.com>
4336 * po/SRC-POTFILES.in: Regenerate.
4338 2017-04-05 Alan Modra <amodra@gmail.com>
4340 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
4343 2017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
4345 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
4346 numbers for DataDirectory entry indicies passed to
4349 2017-04-04 H.J. Lu <hongjiu.lu@intel.com>
4351 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
4352 each GNU_MBIND section and align GNU_MBIND section to page size.
4353 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
4354 segment for each GNU_MBIND section.
4355 (_bfd_elf_init_private_section_data): Copy sh_info from input
4356 for GNU_MBIND section.
4358 2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
4360 * elfnn-riscv.c (GP_NAME): Delete.
4361 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
4362 (_bfd_riscv_relax_lui): Likewise.
4364 2017-04-04 Nick Clifton <nickc@redhat.com>
4367 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
4369 (bfd_elf_final_link): Only initialize the extended symbol index
4370 section if there are extended symbol tables to list.
4372 2017-04-03 H.J. Lu <hongjiu.lu@intel.com>
4374 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
4375 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
4376 * configure.ac (elf): Add elf-properties.lo.
4377 * Makefile.in: Regenerated.
4378 * configure: Likewise.
4379 * elf-bfd.h (elf_property_kind): New.
4380 (elf_property): Likewise.
4381 (elf_property_list): Likewise.
4382 (elf_properties): Likewise.
4383 (_bfd_elf_parse_gnu_properties): Likewise.
4384 (_bfd_elf_get_property): Likewise.
4385 (_bfd_elf_link_setup_gnu_properties): Likewise.
4386 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
4387 and setup_gnu_properties.
4388 (elf_obj_tdata): Add properties.
4389 * elf-properties.c: New file.
4390 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
4391 (elf_i386_merge_gnu_properties): Likewise.
4392 (elf_backend_parse_gnu_properties): Likewise.
4393 (elf_backend_merge_gnu_properties): Likewise.
4394 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
4395 (elf_x86_64_merge_gnu_properties): Likewise.
4396 (elf_backend_parse_gnu_properties): Likewise.
4397 (elf_backend_merge_gnu_properties): Likewise.
4398 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
4399 (elf_backend_parse_gnu_properties): Likewise.
4400 (elf_backend_setup_gnu_properties): Likewise.
4401 (elfNN_bed): Add elf_backend_parse_gnu_properties,
4402 elf_backend_merge_gnu_properties and
4403 elf_backend_setup_gnu_properties.
4405 2017-03-30 Pip Cet <pipcet@gmail.com>
4407 * elf32-wasm32.c: Add relocation code, two relocs.
4408 * reloc.c: Add wasm32 relocations.
4409 * libbfd.h: Regenerate.
4410 * bfd-in2.h: Regenerate.
4411 * bfd/po/bfd.pot: Regenerate.
4413 2017-03-29 Nick Clifton <nickc@redhat.com>
4416 * coff-bfd.h (struct coff_section_data): Add new fields:
4417 saved_bias and bias.
4418 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
4419 computed for PE binaries.
4420 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
4423 2017-03-28 Hans-Peter Nilsson <hp@axis.com>
4426 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
4427 to handle a local symbol with a hash-symbol-entry; without PLT.
4428 Add BFD_ASSERT for an incidental case with GOT entry present.
4429 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
4430 isn't forced-or-set local.
4432 2017-03-27 Pip Cet <pipcet@gmail.com>
4434 * wasm-module.c: New file to support WebAssembly modules.
4435 * wasm-module.h: New file to support WebAssembly modules.
4436 * doc/webassembly.texi: Start documenting wasm-module.c.
4437 * config.bfd: Add wasm_vec.
4438 * targets.c: Likewise.
4439 * configure.ac: Likewise.
4440 * Makefile.am: Add entries for wasm-module.c.
4441 * Makefile.in: Regenerate.
4442 * configure: Regenerate.
4443 * po/SRC-POTFILES.in: Regenerate.
4445 2017-03-27 Pip Cet <pipcet@gmail.com>
4447 * cpu-wasm32.c: New file to support wasm32 architecture.
4448 * elf32-wasm32.c: New file to support wasm32 architecture.
4449 * Makefile.am: Add wasm32 architecture.
4450 * archures.c: Likewise.
4451 * config.bfd: Likewise.
4452 * configure.ac: Likewise.
4453 * targets.c: Likewise.
4454 * Makefile.in: Regenerate.
4455 * bfd-in2.h: Regenerate.
4456 * configure: Regenerate.
4457 * po/SRC-POTFILES.in: Regenerate.
4459 2017-03-20 Alan Modra <amodra@gmail.com>
4462 * elf64-ppc.c (compare_symbols): Stabilize sort.
4464 2017-03-18 Alan Modra <amodra@gmail.com>
4466 * elf64-ppc.c (struct ppc_link_hash_table): Add
4467 local_ifunc_resolver and maybe_local_ifunc_resolver.
4468 (ppc_build_one_stub): Set flags on emitting dynamic
4469 relocation to ifunc.
4470 (ppc64_elf_relocate_section): Likewise.
4471 (ppc64_elf_finish_dynamic_symbol): Likewise.
4472 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
4473 local dynamic relocs to ifuncs.
4474 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
4475 local_ifunc_resolver and maybe_local_ifunc_resolver.
4476 (ppc_elf_relocate_section): Set flag on emitting dynamic
4477 relocation to ifuncs.
4478 (ppc_elf_finish_dynamic_symbol): Likewise.
4479 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
4480 dynamic relocs to ifuncs.
4482 2017-03-13 Nick Clifton <nickc@redhat.com>
4485 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
4486 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
4487 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
4488 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
4489 * bfd-in2.h: Regenerate.
4490 * libbfd.h: Regenerate.
4491 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
4493 (IS_AARCH64_TLSDESC_RELOC): Likewise.
4494 (elfNN_aarch64_howto_table): Likewise.
4495 (aarch64_tls_transition_without_check): Likewise.
4496 (aarch64_reloc_got_type): Likewise.
4497 (elfNN_aarch64_final_link_relocate): Likewise.
4498 (elfNN_aarch64_tls_relax): Likewise.
4499 (elfNN_aarch64_relocate_section): Likewise.
4500 (elfNN_aarch64_gc_sweep_hook): Likewise.
4501 (elfNN_aarch64_check_relocs): Likewise.
4502 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
4503 (_bfd_aarch64_elf_resolve_relocation): Likewise.
4505 2017-03-11 Alan Modra <amodra@gmail.com>
4507 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
4508 parameter is in fact used. Whitespace fixes.
4509 * elf64-ppc.c: Likewise.
4511 2017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
4513 * rs6000-core.c (CORE_NEW): Simplify macro when
4514 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
4516 2017-03-07 Alan Modra <amodra@gmail.com>
4520 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
4523 2017-03-05 Alan Modra <amodra@gmail.com>
4525 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
4526 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
4527 (next_cie_fde_offset): New function.
4528 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
4529 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
4530 four bytes. Align CIEs to four or eight bytes depending on
4531 per_encoding_aligned8. Align FDEs according to their encoding.
4532 Pad last FDE to output section alignment.
4533 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
4535 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
4536 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
4537 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
4539 2017-03-02 Martin Bickel <binutils@ineranves.de>
4542 * elf.c (rewrite_elf_program_header): Do not issue a warning for
4543 empty segments which have a zero filesz, but a non-zero memsz.
4545 2017-03-02 Alan Modra <amodra@gmail.com>
4547 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
4549 2017-02-28 Alan Modra <amodra@gmail.com>
4551 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
4552 (ppc64_elf_relocate_section): Likewise.
4554 2017-02-28 Alan Modra <amodra@gmail.com>
4557 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
4558 rather than elf32_nios2_hash_table or elf_hash_table.
4559 (create_got_section): Likewise.
4560 (nios2_elf32_finish_dynamic_symbol): Likewise.
4561 (nios2_elf32_adjust_dynamic_symbol): Likewise.
4562 (nios2_elf32_size_dynamic_sections): Likewise.
4563 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
4564 vars. Use htab equivalents directly instead. Don't create
4565 all dynamic sections on needing just the GOT. Use a goto
4566 rather than a fall-through with reloc test. Ensure
4567 htab->dynobj is set when making dynamic sreloc section.
4568 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
4569 equivalent directly instead. Don't segfault on looking for
4570 .dynamic when dynamic sections have not been created. Don't
4571 segfault on .got.plt being discarded.
4572 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
4573 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
4574 fixme and another not so relevant comment.
4575 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
4576 already set, set hash table dynobj on creating .sbss.
4578 2017-02-28 Alan Modra <amodra@gmail.com>
4580 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
4581 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
4582 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
4583 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
4584 (ppc64_elf_relocate_section): Likewise.
4585 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
4586 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
4587 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
4588 * libbfd.h: Regenerate.
4589 * bfd-in2.h: Regenerate.
4591 2017-02-28 Alan Modra <amodra@gmail.com>
4593 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
4594 dynamic .data.rel.ro read-only.
4595 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
4596 rather than section flags when deciding where copy reloc goes.
4597 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
4598 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
4599 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
4600 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
4601 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
4602 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
4603 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
4604 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
4605 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
4606 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
4607 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
4608 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
4609 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
4610 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
4611 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
4612 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
4613 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
4614 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
4615 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
4617 2017-02-28 Maciej W. Rozycki <macro@imgtec.com>
4619 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
4620 `jalr $0, $25' instruction encoding.
4622 2017-02-27 Nick Clifton <nickc@redhat.com>
4625 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
4626 generating a seg-fault when encountering a symbol that has been
4627 deleted by garbage collection.
4629 2017-02-25 Alan Modra <amodra@gmail.com>
4631 * elf32-arc.c (struct dynamic_sections): Delete.
4632 (enum dyn_section_types): Delete.
4633 (dyn_section_names): Delete.
4634 (arc_create_dynamic_sections): Delete.
4635 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
4636 segfault on discarded .rela.plt section.
4637 (elf_arc_size_dynamic_sections): Formatting. Don't call
4638 arc_create_dynamic_sections. Don't allocate memory for sections
4639 handled by the generic linker. Correct code finding relocs in
4640 read-only sections. Set SEC_EXCLUDE on zero size .got,
4641 .got.plt, and .dynbss sections. Do set .interp for pies.
4643 2017-02-24 Andrew Waterman <andrew@sifive.com>
4645 * elfnn-riscv.c (GP_NAME): New macro.
4646 (riscv_global_pointer_value): Use it.
4647 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
4648 output section, consider only that section's alignment.
4650 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
4652 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
4653 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
4654 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
4655 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
4657 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
4659 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
4660 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
4663 2017-02-23 Alan Modra <amodra@gmail.com>
4666 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
4668 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
4669 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
4672 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
4675 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
4676 processing ahead of the call to `elf_gc_sweep_symbol'.
4678 2017-02-22 Nick Clifton <nickc@redhat.com>
4681 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
4682 created section 4-byte alignment.
4684 2017-02-22 Alan Modra <amodra@gmail.com>
4686 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
4687 on .got or .plt output section being discarded by script.
4688 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
4691 2017-02-21 Alan Modra <amodra@gmail.com>
4693 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
4694 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
4696 2017-02-20 Alan Modra <amodra@gmail.com>
4699 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
4700 if DT_RELSZ/DT_RELASZ is zero.
4702 2017-02-17 Nick Clifton <nickc@redhat.com>
4704 * compress.c (bfd_get_full_section_contents): Remember to reduce
4705 compressed size by the sizeof the compression header when
4706 decompressing the contents.
4708 2017-02-17 Pedro Alves <palves@redhat.com>
4710 * srec.c (Chunk): Rename to ...
4711 (_bfd_srec_len): ... this.
4712 (S3Forced): Rename to ...
4713 (_bfd_srec_forceS3): ... this.
4714 * objcopy.c: Adjust all references.
4716 2017-02-17 Pedro Alves <palves@redhat.com>
4718 * archive.c (bsd_write_armap): Rename to ...
4719 (_bfd_bsd_write_armap): ... this.
4720 (coff_write_armap): Rename to ...
4721 (_bfd_coff_write_armap): ... this.
4722 * libbfd-in.h (bsd_write_armap): Rename to ...
4723 (_bfd_bsd_write_armap): ... this.
4724 (coff_write_armap): Rename to ...
4725 (_bfd_coff_write_armap): ... this.
4726 * aout-target.h, aout-tic30.c: Adjust all users.
4727 * libbfd.h: Regenerate.
4729 2017-02-17 Pedro Alves <palves@redhat.com>
4731 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
4732 (warn_deprecated): Rename to ...
4733 (_bfd_warn_deprecated): ... this.
4734 * libbfd.c (warn_deprecated): Rename to ...
4735 (_bfd_warn_deprecated): ... this.
4736 * bfd-in2.h: Regenerate.
4738 2017-02-17 Pedro Alves <palves@redhat.com>
4740 * bfdio.c (real_ftell): Rename to ...
4741 (_bfd_real_ftell): ... this.
4742 (real_fseek): Rename to ...
4743 (_bfd_real_fseek): ... this.
4744 (real_fopen): Rename to ...
4745 (_bfd_real_fopen): ... this.
4746 * libbfd-in.h (real_ftell): Rename to ...
4747 (_bfd_real_ftell): ... this.
4748 (real_fseek): Rename to ...
4749 (_bfd_real_fseek): ... this.
4750 (real_fopen): Rename to ...
4751 (_bfd_real_fopen): ... this.
4752 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
4753 * libbfd.h: Regenerate.
4755 2017-02-17 Pedro Alves <palves@redhat.com>
4757 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
4758 * libbfd.c (read_unsigned_leb128): Rename to ...
4759 (_bfd_read_unsigned_leb128): ... this.
4760 (read_signed_leb128): Rename to ...
4761 (_bfd_read_signed_leb128): ... this.
4762 (safe_read_leb128): Rename to ...
4763 (_bfd_safe_read_leb128): ... this.
4764 * libbfd-in.h (read_unsigned_leb128): Rename to ...
4765 (_bfd_read_unsigned_leb128): ... this.
4766 (read_signed_leb128): Rename to ...
4767 (_bfd_read_signed_leb128): ... this.
4768 (safe_read_leb128): Rename to ...
4769 (_bfd_safe_read_leb128): ... this.
4770 * libbfd.h: Renegerate.
4772 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
4774 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
4775 before trying to fine matching file and line information.
4777 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
4779 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
4780 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
4781 not match current bfd, then reload debug information. Record bfd
4782 we're loading debug info for in the stash. If we have debug
4783 informatin in the cache then perform section placement before
4786 2017-02-16 Alan Modra <amodra@gmail.com>
4789 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
4790 * elfxx-target.h (elf_backend_no_page_alias): Define.
4791 (elfNN_bed): Init new field.
4792 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
4793 ensure PT_LOAD segment starts on a new page.
4794 * elf32-hppa.c (elf_backend_no_page_alias): Define.
4796 2017-02-16 Alan Modra <amodra@gmail.com>
4799 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
4802 2017-02-16 Jiong Wang <jiong.wang@arm.com>
4804 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
4805 * bfd-in2.h: Regenerated.
4807 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
4810 * elf32-i386.c (elf_i386_relocate_section): Allow
4811 "lea foo@GOT, %reg" in PIC.
4813 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
4816 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
4817 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
4818 error against local IFUNC symbol without a base register for
4821 2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
4823 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
4824 `%P: %H:' with `info->callbacks->einfo'.
4825 (ppc_elf_relocate_section): Likewise.
4826 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
4827 (ppc64_elf_edit_toc): Likewise.
4828 (ppc64_elf_relocate_section): Likewise.
4830 2017-02-14 Alan Modra <amodra@gmail.com>
4832 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
4833 --gc-keep-exported, and test versioned field of sym rather than
4834 looking for @ in name.
4836 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
4838 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
4841 2017-02-13 Nick Clifton <nickc@redhat.com>
4844 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
4847 2017-02-07 Andrew Waterman <andrew@sifive.com>
4849 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
4850 entry size if PLT header is written.
4852 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
4854 Fix sparc64 dynamic relocation processing to use the dynamic
4856 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
4857 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
4860 2017-02-03 Nick Clifton <nickc@redhat.com>
4863 * coffcode.h (coff_write_object_contents): Enlarge size of
4864 s_name_buf in order to avoid compile time warning about possible
4866 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
4867 32-bits of insn value before printing into buffer.
4869 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4871 * elfxx-mips.c (mips_elf_hash_sort_data): Add
4872 `max_local_dynindx'.
4873 (mips_elf_sort_hash_table): Handle it.
4874 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
4875 symbols bump up `max_local_dynindx' rather than
4876 `max_non_got_dynindx'.
4878 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4880 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
4881 `min_got_dynindx', `max_unref_got_dynindx' and
4882 `max_non_got_dynindx' members to the `bfd_size_type' data type.
4883 (mips_elf_sort_hash_table): Adjust accordingly.
4885 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4887 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
4888 to access the hash table.
4890 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4892 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
4893 non-NULL `htab' to the beginning.
4895 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4897 * elflink.c (elf_gc_sweep): Wrap overlong line.
4899 2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
4901 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
4902 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
4903 * elfxx-mips.c (mips_elf_link_hash_table): Add
4904 `ignore_branch_isa' member.
4905 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
4906 in branch relocation calculation as an error if
4907 `ignore_branch_isa' has been set.
4908 (_bfd_mips_elf_insn32): Rename to...
4909 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
4910 parameter to `insn32' and add an `ignore_branch_isa' parameter.
4911 Handle the new parameter.
4913 2017-01-27 Hans-Peter Nilsson <hp@axis.com>
4915 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
4916 local variable dynobj.
4919 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
4920 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
4921 executable from read-only sections into sdynrelro.
4922 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
4923 dynamic relocs in sdynrelro.
4924 (elf_backend_want_dynrelro): Define.
4926 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4928 * config.bfd (*-*-rtemsaout*): Mark as removed.
4930 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4932 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
4933 (arm-*-rtems*): Move to (arm*-*-eabi*).
4934 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
4935 (m68-*-rtems*): Move to (m68*-*-elf*).
4937 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4939 * config.bfd (*-*-rtemscoff*): Mark as removed.
4941 2017-01-24 Maciej W. Rozycki <macro@imgtec.com>
4944 * elflink.c (bfd_elf_record_link_assignment): Revert last
4945 change and don't ever clear `forced_local'. Set `mark'
4947 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
4949 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
4950 (bfd_elf_size_dynamic_sections): ... here.
4951 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
4952 and set `mark' instead in `__tls_get_addr_opt' processing.
4953 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
4955 2017-01-24 Alan Modra <amodra@gmail.com>
4957 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
4958 where dynamic relocs are preferable. Allow ifunc too.
4959 (ensure_undefweak_dynamic): New function.
4960 (allocate_dynrelocs): Use it here. Move plt handling last and
4961 don't make symbols dynamic, simplifying loop. Only make undef
4962 weak symbols with GOT entries dynamic. Correct condition
4963 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
4964 comments. Remove goto.
4965 (ppc_elf_relocate_section): Correct test for using dynamic
4966 symbol on GOT relocs. Rearrange test for emitting GOT relocs
4967 to suit. Set up explicit tls_index entries and implicit GOT
4968 tls_index entries resolvable at link time for
4969 __tls_get_addr_opt. Simplify test to clear mem for prelink.
4970 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
4971 (ensure_undefweak_dynamic): New function.
4972 (allocate_dynrelocs): Use it here. Only make undef weak symbols
4973 with GOT entries dynamic. Remove unnecessary test of
4974 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
4975 (ppc64_elf_relocate_section): Correct test for using dynamic
4976 symbol on GOT relocs. Rearrange test for emitting GOT relocs
4977 to suit. Set up explicit tls_index entries and implicit GOT
4978 tls_index entries resolvable at link time for __tls_get_addr_opt.
4979 Simplify expression to clear mem for prelink.
4981 2017-01-23 Yury Norov <ynorov@caviumnetworks.com>
4983 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
4985 2017-01-20 Jiong Wang <jiong.wang@arm.com>
4987 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
4988 (elf_backend_hash_symbol): Define.
4990 2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
4993 * elflink.c (bfd_elf_record_link_assignment): Clear any
4994 `forced_local' marking for DSO symbols that are not being
4997 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
4999 * elfnn-riscv.c (riscv_elf_object_p): New function.
5001 2017-01-12 H.J. Lu <hongjiu.lu@intel.com>
5004 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
5006 (elf_x86_64_check_relocs): Create .eh_frame section for the
5008 (elf_x86_64_size_dynamic_sections): Allocate and initialize
5009 .eh_frame section for the .plt.bnd section.
5010 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
5011 for the .plt.bnd section.
5013 2017-01-12 Nick Clifton <nickc@redhat.com>
5016 * opncls.c (find_separate_debug_file): Add include_dirs
5017 parameter. Only include the directory part of the bfd's filename
5018 in search paths if include_dirs is true. Add a couple of extra
5019 locations for looking for debug files.
5020 ( bfd_follow_gnu_debuglink): Update invocation of
5021 find_separate_debug_file.
5022 (bfd_follow_gnu_debugaltlink): Likewise.
5023 (get_build_id): New function: Finds the build-id of the given bfd.
5024 (get_build_id_name): New function: Computes the name of the
5025 separate debug info file for a bfd, based upon its build-id.
5026 (check_build_id_file): New function: Checks to see if a separate
5027 debug info file exists at the given location, and that its
5028 build-id matches that of the original bfd.
5029 (bfd_follow_build_id_debuglink): New function: Finds a separate
5030 debug info file for a given bfd by using the build-id method.
5031 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
5032 method of locating a separate debug info file before using the
5034 * bfd-in2.h: Regenerate.
5036 2017-01-11 H.J. Lu <hongjiu.lu@intel.com>
5039 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
5040 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
5041 elf_x86_64_eh_frame_plt_got.
5042 (elf_x86_64_size_dynamic_sections): Get unwind info from
5043 elf_x86_64_bnd_arch_bed for the BND PLT.
5045 2017-01-11 Jeremy Soller <jackpot51@gmail.com>
5047 * config.bfd: Add entries for i686-redox and x86_64-redox.
5049 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
5051 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
5053 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
5054 .eh_frame section to 4 bytes for x32.
5055 (elf_x86_64_check_relocs): Likewise.
5057 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
5060 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
5061 (PLT_GOT_FDE_LENGTH): Likewise.
5062 (elf_i386_plt_layout): Add eh_frame_plt_got and
5063 eh_frame_plt_got_size.
5064 (elf_i386_plt): Updated.
5065 (elf_i386_link_hash_table): Add plt_got_eh_frame.
5066 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
5067 (elf_i386_size_dynamic_sections): Allocate and initialize
5068 .eh_frame section for .plt.got.
5069 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
5071 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
5072 eh_frame_plt_got_size.
5073 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
5074 (PLT_GOT_FDE_LENGTH): Likewise.
5075 (elf_x86_64_backend_data): Add eh_frame_plt_got and
5076 eh_frame_plt_got_size.
5077 (elf_x86_64_arch_bed): Updated.
5078 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
5079 eh_frame_plt_got_size.
5080 (elf_x86_64_nacl_arch_bed): Likewise.
5081 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
5082 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
5083 (elf_x86_64_size_dynamic_sections): Allocate and initialize
5084 .eh_frame section for .plt.got.
5085 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
5088 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
5090 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
5091 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
5093 2017-01-09 Nick Clifton <nickc@redhat.com>
5095 * dwarf2.c (lookup_address_in_function_table): Return early if
5096 there are no functions in the given comp unit, or if the high
5097 address of the last function in the comp unit is less than the
5100 2017-01-09 Nick Clifton <nickc@redhat.com>
5103 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
5104 message if there are too many symbols to load.
5106 2017-01-04 James Clarke <jrtc27@jrtc27.com>
5108 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
5109 if relocs are cached.
5111 2017-01-03 Rich Felker <bugdal@aerifal.cx>
5114 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
5115 for R_MICROBLAZE_GOTOFF_64.
5117 2017-01-03 Nick Clifton <nickc@redhat.com>
5119 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
5120 warning about using a possibly uninitialised variable.
5122 2017-01-02 Alan Modra <amodra@gmail.com>
5124 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
5125 (allocate_plt_static, allocate_dynrelocs): Use it.
5127 2017-01-02 Alan Modra <amodra@gmail.com>
5129 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
5130 .PARISC.unwind section.
5132 2017-01-02 Alan Modra <amodra@gmail.com>
5135 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
5136 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
5137 indirect to GOT pointer relative code edit.
5139 2017-01-02 Alan Modra <amodra@gmail.com>
5141 Update year range in copyright notice of all files.
5143 For older changes see ChangeLog-2016
5145 Copyright (C) 2017 Free Software Foundation, Inc.
5147 Copying and distribution of this file, with or without modification,
5148 are permitted in any medium without royalty provided the copyright
5149 notice and this notice are preserved.
5155 version-control: never