1 2017-11-08 Djordje Todorovic <djordje.todorovic@rt-rk.com>
3 * elf32-mips.c (elf32_mips_write_core_note): New function.
4 (elf_backend_write_core_note): New macro.
5 * elf64-mips.c (elf64_mips_write_core_note): New function.
6 (elf_backend_write_core_note): New macro.
7 * elfn32-mips.c (elf32_mips_write_core_note): New function.
8 (elf_backend_write_core_note): New macro.
10 2017-11-07 Alan Modra <amodra@gmail.com>
12 * elf64-ppc.c (ppc64_elf_build_stubs): Correct pluralization in
15 2017-11-07 Alan Modra <amodra@gmail.com>
17 * sysdep.h: Formatting, comment fixes.
18 (gettext, ngettext): Redefine when ENABLE_NLS.
19 (ngettext, dngettext, dcngettext): Define when !ENABLE_NLS.
20 (_): Define using gettext.
21 (textdomain, bindtextdomain): Use safer "do nothing".
22 * hosts/alphavms.h (textdomain, bindtextdomain): Likewise.
23 (ngettext, dngettext, dcngettext): Define when !ENABLE_NLS.
25 2017-11-05 Alan Modra <amodra@gmail.com>
28 * bfd.c (_bfd_doprnt_scan): Check args index before storing, not
31 2017-11-05 Alan Modra <amodra@gmail.com>
34 * bfd.c (union _bfd_doprnt_args): New.
35 (PRINT_TYPE): Add FIELD arg. Take value from args.
36 (_bfd_doprnt): Replace ap parameter with args. Adjust all
37 PRINT_TYPE invocations and reading of format args to suit.
38 Move "%%" handling out of switch handling args. Support
39 positional parameters.
40 (_bfd_doprnt_scan): New function.
41 (error_handler_internal): Call _bfd_doprnt_scan and read args.
43 2017-11-04 Alan Modra <amodra@gmail.com>
45 * elf32-ppc.c (got_entries_needed, got_relocs_needed): New functions.
46 (allocate_dynrelocs, ppc_elf_size_dynamic_sections): Use them here.
47 (ppc_elf_relocate_section): Don't output a dynamic relocation
48 for IE GOT entries in an executable.
49 * elf64-ppc.c (allocate_got): Trim unnecessary TPREL relocs.
50 (ppc64_elf_size_dynamic_sections): Likewise.
51 (ppc64_elf_relocate_section): Likewise.
53 2017-11-04 Alan Modra <amodra@gmail.com>
55 * elf32-ppc.c (readonly_dynrelocs): Delete info param. Update all
56 callers. Don't bother with SEC_ALLOC test. Return section pointer.
58 (maybe_set_textrel): ..here.
59 * elf64-ppc.c (readonly_dynrelocs): Return section pointer.
60 (maybe_set_textrel): Call minfo to print textrel warning to map file.
62 2017-11-04 Alan Modra <amodra@gmail.com>
64 * elf32-hppa.c (enum _tls_type): Move.
65 (struct elf32_hppa_link_hash_entry): Make tls_type a bitfield.
66 (elf32_hppa_check_relocs): Set DF_STATIC_TLS only for shared libraries.
67 Tidy tls_type handling. Set symbol tls_type for GOT_TLS_LDM too.
68 (got_entries_needed, got_relocs_needed): New functions.
69 (allocate_dynrelocs): Use them.
70 (elf32_hppa_size_dynamic_sections): Likewise.
71 (elf32_hppa_relocate_section): Delete bogus FIXME. Formatting.
72 Correct code emitting relocs on GD/IE got entries. Report an
73 error when a symbol has both normal and TLS GOT relocs.
75 2017-11-04 Alan Modra <amodra@gmail.com>
78 * elf32-hppa.c (elf32_hppa_check_relocs): Don't create dyn_relocs
79 for plabels when non-pic.
80 (maybe_set_textrel): New function.
81 (readonly_dynrelocs): Move and rewrite.
82 (elf32_hppa_adjust_dynamic_symbol): Use it. Don't create copy
83 relocs when def_regular or -z nocopyreloc. Handle non_got_ref
84 for functions. Expand non_got_ref comments.
85 (elf32_hppa_size_dynamic_sections): Use maybe_set_textrel.
87 2017-11-03 H.J. Lu <hongjiu.lu@intel.com>
89 * elf32-i386.c (elf_i386_check_relocs): Set plt.refcount to 1.
90 Don't use func_pointer_refcount. Don't set plt.refcount nor
91 non_got_ref for function pointer reference.
92 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
93 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Don't use
94 func_pointer_refcount.
95 (_bfd_x86_elf_copy_indirect_symbol): Don't copy
96 func_pointer_refcount.
97 (_bfd_x86_elf_hide_symbol): Don't use func_pointer_refcount.
98 * elfxx-x86.h (GENERATE_DYNAMIC_RELOCATION_P): Likewise.
99 (elf_x86_link_hash_entry): Remove func_pointer_refcount.
101 2017-11-03 Mingi Cho <mgcho.minic@gmail.com>
102 Nick Clifton <nickc@redhat.com>
105 * coffgen.c (_bfd_coff_get_external_symbols): Check for an
106 overlarge raw syment count.
107 (coff_get_normalized_symtab): Likewise.
109 2017-11-01 James Bowman <james.bowman@ftdichip.com>
111 * archures.c: Add bfd_mach_ft32b.
112 * cpu-ft32.c: Add arch_info_struct.
113 * elf32-ft32.c: Add R_FT32_RELAX, SC0, SC1,
115 (ft32_elf_relocate_section): Add clauses for R_FT32_SC0, SC1,
117 (ft32_reloc_shortable, elf32_ft32_is_diff_reloc)
118 (elf32_ft32_adjust_diff_reloc_value)
119 (elf32_ft32_adjust_reloc_if_spans_insn)
120 (elf32_ft32_relax_delete_bytes, elf32_ft32_relax_is_branch_target)
121 (ft32_elf_relax_section): New function.
122 * reloc.c: Add BFD_RELOC_FT32_RELAX, SC0, SC1, DIFF32.
123 * bfd-in2.h: Regenerate.
124 * libbfd.h: Regenerate.
126 2017-11-01 Nick Clifton <nickc@redhat.com>
129 * coffcode.h (coff_slurp_line_table): Check for an excessively
130 large line number count.
132 2017-11-01 Nick Clifton <nickc@redhat.com>
135 * peicode.h (pe_bfd_read_buildid): Revise check for invalid size
136 and offset in light of further possible bogus values.
138 2017-11-01 Alan Modra <amodra@gmail.com>
141 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't create a plt
142 entry when just a dynamic reloc can serve. Ensure no dynamic
143 relocations when UNDEFWEAK_NO_DYNAMIC_RELOC by setting non_got_ref.
144 Expand and move the non_got_ref comment.
145 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
147 2017-11-01 Nick Clifton <nickc@redhat.com>
150 * coffgen.c (_bfd_coff_free_symbols): Fail if called on a non-COFF
152 * cofflink.c (coff_link_check_archive_element): Skip non-COFF
153 members of an archive.
155 2017-10-31 Nick Clifton <nickc@redhat.com>
158 * peicode.h (pe_bfd_read_buildid): Check for invalid size and data
161 2017-10-30 Alan Modra <amodra@gmail.com>
163 * elf32-frv.c (ELF_TARGET_ID): Don't define for generic
166 * elflink.c (elf_gc_sweep): Test elf_object_id in addition to
168 (bfd_elf_gc_sections): Likewise.
170 2017-10-30 Alan Modra <amodra@gmail.com>
173 * elf32-hppa.c (elf32_hppa_check_relocs): Move SEC_ALLOC test to
174 ensure non_got_ref is not set due to debug references.
175 (elf32_hppa_adjust_dynamic_symbol): Tidy plabel handling. Use
176 SYMBOL_CALLS_LOCAL and UNDEFWEAK_NO_DYNAMIC_RELOC when determining
177 need for a plt entry.
178 (allocate_dynrelocs): Similarly for got entries. Tidy code discarding
179 dynamic relocs when pic. Remove bogus code attempting to handle
181 (elf32_hppa_relocate_section): Similarly. Delete resolved_to_zero
183 (elf32_hppa_finish_dynamic_symbol): Use UNDEFWEAK_NO_DYNAMIC_RELOC
184 and SYMBOL_REFERENCES_LOCAL in GOT handling.
186 2017-10-28 Alan Modra <amodra@gmail.com>
189 * elflink.c (_bfd_elf_merge_symbol): Remove relocs_compatible check.
190 * elf32-hppa.c (elf_backend_relocs_compatible): Define.
191 * elf32-ppc.c (elf_backend_relocs_compatible): Define.
192 * elf64-ppc.c (elf_backend_relocs_compatible): Define.
194 2017-10-25 Alan Modra <amodra@gmail.com>
196 * archive.c (_bfd_compute_and_write_armap): Match "__gnu_lto_slim"
197 optionally prefixed with "_".
198 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
200 2017-10-24 Andrew Waterman <andrew@sifive.com>
202 * elfnn-riscv.c (_bfd_riscv_relax_lui): Don't relax to c.lui
205 2017-10-24 Renlin Li <renlin.li@arm.com>
208 * elflink.c (_bfd_elf_merge_symbol): Handle multiple definition case.
210 2017-10-23 Nick Clifton <nickc@redhat.com>
213 * elflink.c (elf_link_output_extsym): Keep global undefined
214 symbols if they have been marked as needed.
216 2017-10-23 Maciej W. Rozycki <macro@imgtec.com>
218 * elfn32-mips.c (mips_elf_n32_mkobject): New prototype and
220 (bfd_elf32_mkobject): Use `mips_elf_n32_mkobject' rather than
221 `_bfd_mips_elf_mkobject'.
223 2017-10-22 Hans-Peter Nilsson <hp@axis.com>
226 * config.bfd (cris-*-* | crisv32-*-*): Require a 64-bit BFD.
228 2017-10-19 Palmer Dabbelt <palmer@dabbelt.com>
230 * elfnn-riscv.c (riscv_pcgp_hi_reloc): New structure.
231 (riscv_pcgp_lo_reloc): Likewise.
232 (riscv_pcgp_relocs): Likewise.
233 (riscv_init_pcgp_relocs): New function.
234 (riscv_free_pcgp_relocs): Likewise.
235 (riscv_record_pcgp_hi_reloc): Likewise.
236 (riscv_record_pcgp_lo_reloc): Likewise.
237 (riscv_delete_pcgp_hi_reloc): Likewise.
238 (riscv_use_pcgp_hi_reloc): Likewise.
239 (riscv_record_pcgp_lo_reloc): Likewise.
240 (riscv_find_pcgp_lo_reloc): Likewise.
241 (riscv_delete_pcgp_lo_reloc): Likewise.
242 (_bfd_riscv_relax_pc): Likewise.
243 (_bfd_riscv_relax_section): Handle R_RISCV_PCREL_* relocations
244 via the new functions above.
246 2017-10-19 Palmer Dabbelt <palmer@dabbelt.com>
248 * elfnn-riscv.c (R_RISCV_DELETE): New define.
249 (_bfd_riscv_relax_delete): New function.
250 (perform_relocation): Handle R_RISCV_DELETE.
251 (_bfd_riscv_relax_section): Likewise.
253 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
256 * elfxx-tilegx.c (tilegx_elf_tls_transition): Replace
257 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
258 bfd_link_executable for TLS check.
259 (tilegx_elf_check_relocs): Likewise.
260 (allocate_dynrelocs): Likewise.
261 (tilegx_elf_relocate_section): Likewise.
263 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
266 * elf32-tilepro.c (tilepro_elf_tls_transition): Replace
267 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
268 bfd_link_executable for TLS check.
269 (tilepro_elf_check_relocs): Likewise.
270 (allocate_dynrelocs): Likewise.
271 (tilepro_elf_relocate_section): Likewise.
273 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
276 * elfxx-sparc.c (sparc_elf_tls_transition): Replace
277 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
278 bfd_link_executable for TLS check.
279 (_bfd_sparc_elf_check_relocs): Likewise.
280 (allocate_dynrelocs): Likewise.
281 (_bfd_sparc_elf_relocate_section): Likewise.
283 2017-10-18 H.J. Lu <hongjiu.lu@intel.com>
285 * elf32-tilepro.c (tilepro_elf_gc_mark_hook): Call
286 _bfd_generic_link_add_one_symbol to mark __tls_get_addr.
287 * elfxx-tilegx.c (tilegx_elf_gc_mark_hook): Likewise.
289 2017-10-17 H.J. Lu <hongjiu.lu@intel.com>
291 * elf32-microblaze.c (microblaze_elf_check_relocs): Check for
292 indirect and warning symbols.
294 2017-10-17 Alan Modra <amodra@gmail.com>
297 * elf-properties.c (_bfd_elf_parse_gnu_properties): Compare datasz
298 against size left rather than comparing pointers. Reorganise loop.
300 2017-10-17 Alan Modra <amodra@gmail.com>
303 * aoutx.h (aout_get_external_symbols): Handle stringsize of zero,
304 and error for any other size that doesn't cover the header word.
306 2017-10-16 H.J. Lu <hongjiu.lu@intel.com>
308 * elf-bfd.h (elf_backend_data): Remove gc_sweep_hook.
309 * elf32-arm.c (elf32_arm_gc_sweep_hook): Removed.
310 (elf_backend_gc_sweep_hook): Likewise.
311 * elf32-bfin.c (bfin_gc_sweep_hook): Likewise.
312 (bfinfdpic_gc_sweep_hook): Likewise.
313 (elf_backend_gc_sweep_hook): Likewise.
314 * elf32-cr16.c (elf32_cr16_gc_sweep_hook): Likewise.
315 (elf_backend_gc_sweep_hook): Likewise.
316 * elf32-cris.c (cris_elf_gc_sweep_hook): Likewise.
317 (elf_backend_gc_sweep_hook): Likewise.
318 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Likewise.
319 (elf_backend_gc_sweep_hook): Likewise.
320 * elf32-lm32.c (lm32_elf_gc_sweep_hook): Likewise.
321 (elf_backend_gc_sweep_hook): Likewise.
322 * elf32-m32r.c (m32r_elf_gc_sweep_hook): Likewise.
323 (elf_backend_gc_sweep_hook): Likewise.
324 * elf32-m68k.c (elf_m68k_got_entry): Remove elf_m68k_gc_sweep_hook
326 (elf_m68k_remove_got_entry_type): Removed.
327 (elf_m68k_find_got_entry_ptr): Likewise.
328 (elf_m68k_remove_got_entry): Likewise.
329 (elf_m68k_gc_sweep_hook): Likewise.
330 (elf_backend_gc_sweep_hook): Likewise.
331 * elf32-mcore.c (mcore_elf_gc_sweep_hook): Likewise.
332 (elf_backend_gc_sweep_hook): Likewise.
333 * elf32-metag.c (elf_metag_gc_sweep_hook): Likewise.
334 (elf_backend_gc_sweep_hook): Likewise.
335 * elf32-microblaze.c (elf_backend_gc_sweep_hook): Likewise.
336 (elf_backend_gc_sweep_hook): Likewise.
337 * elf32-mips.c (elf_backend_gc_sweep_hook): Likewise.
338 (elf_backend_gc_sweep_hook): Likewise.
339 * elf32-nds32.c (nds32_elf_gc_sweep_hook): Likewise.
340 (elf_backend_gc_sweep_hook): Likewise.
341 * elf32-nios2.c (nios2_elf32_gc_sweep_hook): Likewise.
342 (elf_backend_gc_sweep_hook): Likewise.
343 * elf32-or1k.c (or1k_elf_gc_sweep_hook): Likewise.
344 (elf_backend_gc_sweep_hook): Likewise.
345 * elf32-ppc.c (ppc_elf_gc_sweep_hook): Likewise.
346 (elf_backend_gc_sweep_hook): Likewise.
347 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
348 (elf_backend_gc_sweep_hook): Likewise.
349 * elf32-sparc.c (elf_backend_gc_sweep_hook): Likewise.
350 * elf32-tic6x.c (elf32_tic6x_gc_sweep_hook): Likewise.
351 (elf_backend_gc_sweep_hook): Likewise.
352 * elf32-tilegx.c (elf_backend_gc_sweep_hook): Likewise.
353 * elf32-tilepro.c (tilepro_elf_gc_sweep_hook): Likewise.
354 (elf_backend_gc_sweep_hook): Likewise.
355 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
356 (elf_backend_gc_sweep_hook): Likewise.
357 * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Likewise.
358 (elf_backend_gc_sweep_hook): Likewise.
359 * elf64-alpha.c (elf64_alpha_gc_sweep_hook): Likewise.
360 (elf_backend_gc_sweep_hook): Likewise.
361 * elf64-mips.c (elf_backend_gc_sweep_hook): Likewise.
362 * elf64-mmix.c (mmix_elf_gc_sweep_hook): Likewise.
363 (elf_backend_gc_sweep_hook): Likewise.
364 * elf64-ppc.c (elf_backend_gc_sweep_hook): Likewise.
365 (ppc64_elf_gc_sweep_hook): Likewise.
366 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
367 (elf_backend_gc_sweep_hook): Likewise.
368 * elf64-sparc.c (elf_backend_gc_sweep_hook): Likewise.
369 * elf64-tilegx.c (elf_backend_gc_sweep_hook): Likewise.
370 * elflink.c (elf_link_add_object_symbols): Don't call
371 _bfd_elf_link_check_relocs here.
372 (gc_sweep_hook_fn): Removed.
373 (elf_gc_sweep): Remove gc_sweep_hook.
374 * elfnn-aarch64.c (elfNN_aarch64_gc_sweep_hook): Removed.
375 (elf_backend_gc_sweep_hook): Likewise.
376 * elfnn-riscv.c (riscv_elf_gc_sweep_hook): Likewise.
377 (elf_backend_gc_sweep_hook): Likewise.
378 * elfxx-mips.c (_bfd_mips_elf_gc_sweep_hook): Likewise.
379 * elfxx-mips.h (_bfd_mips_elf_gc_sweep_hook): Likewise.
380 (elf_backend_gc_sweep_hook): Likewise.
381 * elfxx-sparc.c (_bfd_sparc_elf_gc_sweep_hook): Likewise.
382 * elfxx-sparc.h (_bfd_sparc_elf_gc_sweep_hook): Likewise.
383 * elfxx-target.h (elf_backend_gc_sweep_hook): Likewise.
384 (elfNN_bed): Remove elf_backend_gc_sweep_hook.
385 * elfxx-tilegx.c (tilegx_elf_gc_sweep_hook): Removed.
386 * elfxx-tilegx.h (tilegx_elf_gc_sweep_hook): Likewise.
388 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
390 * elf32-i386.c (elf_i386_backend_data): Removed.
391 (get_elf_i386_backend_data): Likewise.
392 (elf_i386_arch_bed): Replace elf_i386_backend_data with
393 elf_x86_backend_data.
394 (elf_i386_get_synthetic_symtab): Likewise.
395 (elf_i386_nacl_arch_bed): Likewise.
396 (elf_i386_vxworks_arch_bed): Likewise.
397 (elf_i386_relocate_section): Check target_os instead of
399 (elf_i386_finish_dynamic_symbol): Likewise.
400 (elf_i386_finish_dynamic_sections): Use htab->plt0_pad_byte.
401 Check target_os instead of is_vxworks.
402 (elf_i386_link_setup_gnu_properties): Remove normal_target and
403 is_vxworks. Initialize plt0_pad_byte.
404 * elf64-x86-64.c (elf_x86_64_backend_data); Removed.
405 (get_elf_x86_64_arch_data): Likewise.
406 (get_elf_x86_64_backend_data): Likewise.
407 (elf_x86_64_arch_bed): Replace elf_x86_64_backend_data with
408 elf_x86_backend_data.
409 (elf_x86_64_get_synthetic_symtab): Likewise.
410 (elf_x86_64_nacl_arch_bed): Likewise.
411 (elf_x86_64_link_setup_gnu_properties): Remove is_vxworks and
412 normal_target. Initialize plt0_pad_byte.
413 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Check target_os
414 instead of is_vxworks.
415 (_bfd_x86_elf_size_dynamic_sections): Likewise.
416 (_bfd_x86_elf_finish_dynamic_sections): Likewise.
417 (_bfd_x86_elf_adjust_dynamic_symbol): Likewise.
418 (_bfd_x86_elf_link_hash_table_create): Initialize target_os.
419 (_bfd_x86_elf_link_setup_gnu_properties): Remove is_vxworks.
420 Update normal_target. Set up plt0_pad_byte. Check target_os
421 instead of is_vxworks.
422 * elfxx-x86.h (elf_x86_target_os): New.
423 (elf_x86_backend_data): Likewise.
424 (get_elf_x86_backend_data): Likewise.
425 (elf_x86_link_hash_table): Remove is_vxworks. Add plt0_pad_byte
427 (elf_x86_init_table): Remove normal_target and is_vxworks. Add
430 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
432 * elf32-i386.c (elf_i386_finish_dynamic_sections): Call
433 _bfd_x86_elf_finish_dynamic_sections.
434 * elf64-x86-64.c (elf_x86_64_finish_dynamic_sections): Likewise.
435 * elfxx-x86.c (_bfd_x86_elf_finish_dynamic_sections): New
437 * elfxx-x86.h (_bfd_x86_elf_finish_dynamic_sections): New
440 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
443 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
444 hide symbol which was forced to be dynamic.
446 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
449 * elf32-cris.c (cris_elf_relocate_section): Don't generate
450 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
451 (cris_elf_check_relocs): Don't allocate dynamic relocation
452 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
454 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
457 * elf32-sh.c (allocate_dynrelocs): Discard dynamic relocations
458 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
459 (sh_elf_relocate_section): Don't generate dynamic relocation if
460 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
462 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
465 * elf32-s390.c (allocate_dynrelocs): Discard dynamic
466 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
467 (elf_s390_relocate_section): Don't generate dynamic relocation
468 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
469 * elf64-s390.c (allocate_dynrelocs): Discard dynamic
470 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
471 (elf_s390_relocate_section): Don't generate dynamic relocation
472 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
474 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
477 * elf32-nios2.c (nios2_elf32_relocate_section): Don't generate
478 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
479 (allocate_dynrelocs): Discard dynamic relocations if
480 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
482 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
485 * elf32-microblaze.c (microblaze_elf_relocate_section): Don't
486 generate dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is
488 (allocate_dynrelocs): Discard dynamic relocations if
489 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
491 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
494 * elf32-m68k.c (elf_m68k_check_relocs): Don't allocate dynamic
495 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
496 (elf_m68k_adjust_dynamic_symbol): Don't make symbol dynamic if
497 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
498 (elf_m68k_relocate_section): Don't generate dynamic relocation
499 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
501 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
504 * elf32-hppa.c (ensure_undef_dynamic): Don't make undefined
505 symbol dynamic if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
506 (allocate_dynrelocs): Discard dynamic relocations if
507 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
508 (elf32_hppa_relocate_section): Don't generate dynamic
509 relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
511 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
514 * elfnn-ia64.c (elfNN_ia64_check_relocs): Don't allocate
515 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
516 (allocate_fptr): Don't allocate function pointer if
517 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
518 (allocate_dynrel_entries): Don't allocate dynamic relocation
519 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
520 (set_got_entry): Don't set GOT entry if
521 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
522 (set_pltoff_entry): Don't set PLTOFF entry if
523 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
524 (elfNN_ia64_relocate_section): Don't install dynamic relocation
525 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
527 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
530 * elfxx-mips.c (mips_elf_calculate_relocation): Don't generate
531 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
532 (allocate_dynrelocs): Don't allocate dynamic relocations if
533 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
535 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
538 * elf32-arm.c (elf32_arm_final_link_relocate): Don't generate
539 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
540 (allocate_dynrelocs_for_symbol): Discard dynamic relocations
541 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
543 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
546 * elf32-tilepro.c (allocate_dynrelocs): Discard dynamic
547 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
548 (tilepro_elf_relocate_section): Don't generate dynamic
549 relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
550 * elfxx-tilegx.c (allocate_dynrelocs): Discard dynamic
551 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
552 (tilegx_elf_relocate_section): Don't generate dynamic
553 relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
555 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
558 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Don't
559 generate dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is
561 (elfNN_aarch64_allocate_dynrelocs): Discard dynamic relocations
562 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
564 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
566 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Moved to ...
567 * elf-bfd.h (UNDEFWEAK_NO_DYNAMIC_RELOC): Here.
568 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Removed.
570 2017-10-12 James Bowman <james.bowman@ftdichip.com>
572 * bfd-in2.h: Regenerate.
573 * libbfd.h: Regenerate.
574 * elf32-ft32.c: Add HOWTO R_FT32_15.
575 * reloc.c: Add BFD_RELOC_FT32_15.
577 2017-10-12 Nick Clifton <nickc@redhat.com>
579 * reloc.c (enum bfd_reloc_status): Start values at 2.
580 * bfd-in2.h: Regenerate.
581 * elfnn-aarch64.c (aarch64_relocate): Invert sense of function, so
582 that a TRUE return indicates success. Compare the result of
583 calling _bfd_aarch64_elf_put_addend against bfd_reloc_ok.
584 (build_one_stub): Change sense of tests against aarch64_relocate
586 (elfNN_aarch64_tls_relax): Return bfd_reloc_notsupported, rather
587 than FALSE, when an error is detected.
588 (elfNN_aarch64_final_link_relocate): Likewise.
590 2017-10-12 H.J. Lu <hongjiu.lu@intel.com>
592 * elf32-i386.c (elf_backend_hide_symbol): New.
593 * elf64-x86-64.c (elf_backend_hide_symbol): Likewise.
594 * elfxx-x86.c (_bfd_x86_elf_hide_symbol): Likewise.
595 * elfxx-x86.h (_bfd_x86_elf_hide_symbol): Likewise.
597 2017-10-12 Alan Modra <amodra@gmail.com>
599 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Call
600 elf_backend_hide_symbol, not _bfd_elf_link_hash_hide_symbol.
601 (bfd_elf_define_start_stop): Likewise.
603 2017-10-12 Alan Modra <amodra@gmail.com>
605 * elf32-nds32.c (nds32_elf_size_dynamic_sections): Set .interp
606 when executable rather than non-PIC.
607 * elf32-score.c (s3_bfd_score_elf_size_dynamic_sections): Likewise.
608 * elf32-score7.c (s7_bfd_score_elf_size_dynamic_sections): Likewise.
610 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
612 * elf-bfd.h (elf_backend_data): Add `linux_prpsinfo64_ugid16'
614 * elf-linux-core.h (elf_external_linux_prpsinfo64): Rename to...
615 (elf_external_linux_prpsinfo64_ugid32): ... this.
616 (swap_linux_prpsinfo32_out): Rename to...
617 (swap_linux_prpsinfo32_ugid32_out): ... this.
618 (elf_external_linux_prpsinfo64_ugid16): New structure.
619 (swap_linux_prpsinfo64_ugid16_out): New function.
620 * elfxx-target.h [!elf_backend_linux_prpsinfo64_ugid16]
621 (elf_backend_linux_prpsinfo64_ugid16): Define.
622 (elfNN_bed): Initialize `linux_prpsinfo64_ugid16' member.
623 * elf.c (elfcore_write_linux_prpsinfo64): Handle both variants
624 of the 64-bit Linux core PRPSINFO note.
625 * elf64-sh64.c (elf_backend_linux_prpsinfo64_ugid16): Define.
627 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
629 * elf-bfd.h (elf_backend_data): Add `linux_prpsinfo32_ugid16'
631 (elfcore_write_ppc_linux_prpsinfo32): Remove prototype.
632 * elf32-ppc.c (elfcore_write_ppc_linux_prpsinfo32): Remove.
633 (elf_external_ppc_linux_prpsinfo32)
634 (swap_ppc_linux_prpsinfo32_out): Move to...
635 * elf-linux-core.h (elf_external_linux_prpsinfo32_ugid32)
636 (swap_linux_prpsinfo32_ugid32_out): ... these.
637 (elf_external_linux_prpsinfo32): Rename to...
638 (elf_external_linux_prpsinfo32_ugid16): ... this.
639 (swap_linux_prpsinfo32_out): Rename to...
640 (swap_linux_prpsinfo32_ugid16_out): ... this.
641 * elfxx-target.h [!elf_backend_linux_prpsinfo32_ugid16]
642 (elf_backend_linux_prpsinfo32_ugid16): Define.
643 (elfNN_bed): Initialize `linux_prpsinfo32_ugid16' member.
644 * elf.c (elfcore_write_linux_prpsinfo32): Handle both variants
645 of the 32-bit Linux core PRPSINFO note.
646 * elf32-am33lin.c (elf_backend_linux_prpsinfo32_ugid16): Define.
647 * elf32-arm.c (elf_backend_linux_prpsinfo32_ugid16): Define.
648 * elf32-cris.c (elf_backend_linux_prpsinfo32_ugid16): Define.
649 * elf32-frv.c (elf_backend_linux_prpsinfo32_ugid16): Define.
650 * elf32-i386.c (elf_backend_linux_prpsinfo32_ugid16): Define.
651 * elf32-m32r.c (elf_backend_linux_prpsinfo32_ugid16): Define.
652 * elf32-m68k.c (elf_backend_linux_prpsinfo32_ugid16): Define.
653 * elf32-s390.c (elf_backend_linux_prpsinfo32_ugid16): Define.
654 * elf32-sh.c (elf_backend_linux_prpsinfo32_ugid16): Define.
655 * elf32-sparc.c (elf_backend_linux_prpsinfo32_ugid16): Define.
657 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
659 * elf-linux-core.h (elf_external_linux_prpsinfo64): Move the
660 `gap' member ahead of `pr_flag'.
662 2017-10-11 Pedro Alves <palves@redhat.com>
664 * bfd.c (_doprnt): Rename to ...
665 (_bfd_doprnt): ... this.
666 (error_handler_internal): Adjust.
668 2017-10-10 H.J. Lu <hongjiu.lu@intel.com>
670 * elf32-i386.c (elf_i386_check_relocs): Set GOT refcount to 1
671 instead of incrementing it.
672 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
674 2017-10-10 Renlin Li <renlin.li@arm.com>
677 * elf32-arm.c (allocate_dynrelocs_for_symbol): Only make undefined weak
678 symbols into dynamic.
680 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
683 * elfnn-riscv.c (riscv_elf_link_hash_table): Add max_alignment.
684 (riscv_elf_link_hash_table_create): Initialize max_alignment to
686 (_bfd_riscv_relax_section): Cache the max alignment of output
687 sections if possible.
689 2017-10-10 Alan Modra <amodra@gmail.com>
691 * elf64-ppc.c (ppc64_elf_before_check_relocs): Set sec_type for
692 .opd whenever .opd is present and non-zero size. Move code
693 setting abiversion to/from output file earlier. Only set
694 u.opd.func_sec when --gc-sections. Read relocs and set up
695 u.opd.func_sec values here..
696 (ppc64_elf_check_relocs): ..rather than here. Simplify opd
698 (ppc64_elf_edit_opd): Don't set sec_type for .opd here.
700 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
702 * elf-m10300.c (mn10300_elf_check_relocs): Don't free cached
705 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
707 * elf32-bfin.c (bfin_size_dynamic_sections): Don't create the
708 .interp section with "ld --no-dynamic-linker".
710 2017-10-09 Alan Modra <amodra@gmail.com>
713 * dwarf2.c (_bfd_dwarf2_cleanup_debug_info): Free
714 funcinfo_hash_table and varinfo_hash_table.
716 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
718 * elf32-sh.c (readonly_dynrelocs): Dump dynamic relocation
719 in read-only section with minfo.
720 (sh_elf_size_dynamic_sections): Likewise.
722 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
724 * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Remove
727 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
729 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_sections): Set
730 this_hdr.sh_entsize only if section size > 0.
732 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
734 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Reformat.
736 2017-10-07 H.J. Lu <hongjiu.lu@intel.com>
738 * elfxx-sparc.c (readonly_dynrelocs): Dump dynamic relocation
739 in read-only section with minfo.
740 (_bfd_sparc_elf_size_dynamic_sections): Likewise.
742 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
744 * elfxx-x86.h (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Update
747 2017-10-06 John Baldwin <jhb@FreeBSD.org>
749 * elf-bfd.h (struct elf_backend_data): Add
750 `elf_backend_grok_freebsd_prstatus'.
751 * elf.c (elfcore_grok_freebsd_note): Call
752 `elf_backend_grok_freebsd_prstatus' to handle NT_PRSTATUS if
754 * elfn32-mips.c (elf_n32_mips_grok_freebsd_prstatus): New
756 (elf_backend_grok_freebsd_prstatus): Define.
757 * elfxx-target.h (elf_backend_grok_freebsd_prstatus): Define.
758 (elfNN_bed): Initialize `elf_backend_grok_freebsd_prstatus'.
760 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
762 * elf32-i386.c (elf_i386_check_relocs): Replace has_got_reloc
763 and has_non_got_reloc with zero_undefweak.
764 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
765 * elfxx-x86.c (_bfd_x86_elf_link_hash_newfunc): Initialize
767 (_bfd_x86_elf_copy_indirect_symbol): Replace has_got_reloc and
768 has_non_got_reloc with zero_undefweak.
769 * elfxx-x86.h (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Replace
770 has_got_reloc and has_non_got_reloc with zero_undefweak.
771 (elf_x86_link_hash_entry): Likewise.
773 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
775 * elfxx-x86.h (COPY_INPUT_RELOC_P): Add "do/while(0);".
776 (VERIFY_COPY_RELOC): Likewise.
778 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
780 * elfxx-x86.h (VERIFY_COPY_RELOC): New.
781 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Use it.
782 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
784 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
786 * elfxx-x86.h (VERIFY_PLT_ENTRY): New.
787 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Use it.
788 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
790 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
792 * elfxx-x86.h (COPY_INPUT_RELOC_P): New.
793 * elf32-i386.c (elf_i386_relocate_section): Use it.
794 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
796 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
798 * elf32-i386.c (X86_SIZE_TYPE_P): New.
799 (elf_i386_relocate_section): Use GENERATE_DYNAMIC_RELOCATION_P.
800 * elf64-x86-64.c (X86_SIZE_TYPE_P): New.
801 (elf_x86_64_relocate_section): Use GENERATE_DYNAMIC_RELOCATION_P.
802 * elfxx-x86.h (GENERATE_DYNAMIC_RELOCATION_P): New.
804 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
806 * elfxx-x86.h (POINTER_LOCAL_IFUNC_P): New.
807 (PLT_LOCAL_IFUNC_P): Likewise.
808 * elf32-i386.c (elf_i386_relocate_section): Use them.
809 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
811 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
813 * elfxx-x86.h (GENERATE_RELATIVE_RELOC_P): New.
814 * elf32-i386.c (elf_i386_relocate_section): Use it.
815 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
817 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
819 * elfxx-x86.h (RESOLVED_LOCALLY_P): New.
820 * elf32-i386.c (elf_i386_relocate_section): Use it.
821 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
823 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
825 * elf32-i386.c (X86_PCREL_TYPE_P): New.
826 (elf_i386_check_relocs): Use NEED_DYNAMIC_RELOCATION_P.
827 * elf64-x86-64.c (IS_X86_64_PCREL_TYPE): Renamed to ...
828 (X86_PCREL_TYPE_P): This.
829 (elf_x86_64_check_relocs): Use NEED_DYNAMIC_RELOCATION_P.
830 Replace IS_X86_64_PCREL_TYPE with X86_PCREL_TYPE_P.
831 (elf_x86_64_relocate_section): Replace IS_X86_64_PCREL_TYPE with
833 * elfxx-x86.h (NEED_DYNAMIC_RELOCATION_P): New.
835 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
837 * elfxx-x86.h (TLS_TRANSITION_IE_TO_LE_P): New.
838 * elf32-i386.c (elf_i386_tls_transition): Use it.
839 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
841 2017-10-05 H.J. Lu <hongjiu.lu@intel.com>
843 * elf32-ppc.c (readonly_dynrelocs): Add a link_info argument.
844 Dump dynamic relocation in read-only section with minfo if
846 (ppc_elf_adjust_dynamic_symbol): Pass NULL to readonly_dynrelocs.
847 (maybe_set_textrel): Likewise.
848 (ppc_elf_size_dynamic_sections): Dump dynamic relocation in
849 read-only section with minfo.
851 2017-10-05 John Baldwin <jhb@FreeBSD.org>
853 * elf.c (elfcore_grok_freebsd_note): Handle NT_ARM_VFP.
855 2017-10-05 H.J. Lu <hongjiu.lu@intel.com>
857 * elf32-tilepro.c (readonly_dynrelocs): Dump dynamic relocation
858 in read-only section with minfo.
859 (tilepro_elf_size_dynamic_sections): Likewise.
860 * elfxx-tilegx.c (readonly_dynrelocs): Likewise.
861 (tilegx_elf_size_dynamic_sections): Likewise.
863 2017-10-05 Pedro Alves <palves@redhat.com>
866 * bfd.c (bfd_set_error): Revert 2017-10-04 change. Remove
867 ellipsis parameter. Split out bfd_error_on_input code to..
868 (bfd_set_input_error): .. New function.
869 * archive.c (_bfd_write_archive_contents): Use bfd_set_input_error.
870 * vms-lib.c (_bfd_vms_lib_write_archive_contents): Likewise.
871 * bfd-in2.h: Regenerate.
873 2017-10-05 Alan Modra <amodra@gmail.com>
875 * elflink.c (elf_link_input_bfd): Correct ctor/dtor in init_array/
876 fini_array error value.
878 2017-10-05 Alan Modra <amodra@gmail.com>
881 * elf.c (_bfd_elf_setup_sections): Don't trim reloc sections from
883 (_bfd_elf_init_reloc_shdr): Pass sec_hdr, use it to copy SHF_GROUP
885 (elf_fake_sections): Adjust calls. Exit immediately on failure.
886 (bfd_elf_set_group_contents): Add associated reloc section indices
889 2017-10-04 Alan Modra <amodra@gmail.com>
891 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't sort or
892 classify symbols for ELFv2.
894 2017-10-04 Pavel I. Kryukov <kryukov@frtk.ru>
897 * bfd.c (bfd_set_error): Avoid UB on passing arg to va_start that
898 undergoes default promotion.
899 * bfd-in2.h: Regenerate.
901 2017-10-02 Alan Modra <amodra@gmail.com>
903 * elf32-ppc.c (ppc_elf_relocate_section): Fix comment typo.
904 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
906 2017-10-01 Alan Modra <amodra@gmail.com>
909 * dwarf2.c (new_line_sorts_after): Remove end_sequence comparison.
910 (add_line_info): Always put end_sequence last.
912 2017-10-01 Alan Modra <amodra@gmail.com>
915 * dwarf2.c (read_section): Allocate buffer with extra byte for
916 bfd_simple_get_relocated_section_contents rather than copying
919 2017-09-29 Alan Modra <amodra@gmail.com>
921 * merge.c (merge_strings): Return FALSE on malloc failure.
922 (_bfd_merge_sections): Return failures from record_section and
925 2017-09-28 Alan Modra <amodra@gmail.com>
928 * elflink.c (_bfd_elf_merge_symbol): Set non_ir_ref_dynamic in
929 a case where plugin_notice isn't called.
931 2017-09-27 Kuan-Lin Chen <kuanlinchentw@gmail.com>
933 * elf32-nds32.c (nds32_elf_relax_section): Fix a tautological
936 2017-09-26 H.J. Lu <hongjiu.lu@intel.com>
939 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't pass
940 output_bfd to info->callbacks->minfo.
942 2017-09-26 Nick Clifton <nickc@redhat.com>
945 * elf64-x86-64.c (elf_x86_64_info_to_howto): Do not trigger an
946 assertion failure if elf_x86_64_rtype_to_howto has already issued
949 2017-09-26 Alan Modra <amodra@gmail.com>
952 * dwarf2.c (read_formatted_entries): Use read_attribute_value to
955 2017-09-26 Nick Clifton <nickc@redhat.com>
958 * dwarf2.c (read_formatted_entries): Fail early if we know that
959 the loop parsing data entries will overflow the end of the
962 2017-09-26 Alan Modra <amodra@gmail.com>
965 * dwarf2.c (struct comp_unit): Delete sec_info_ptr field.
966 (find_abstract_instance_name): Calculate DW_FORM_ref_addr relative
967 to stash->info_ptr_memory, and check die_ref is within that memory.
968 Set info_ptr_end correctly when another CU is refd. Check die_ref
969 for DW_FORM_ref4 etc. is within CU.
971 2017-09-26 Alan Modra <amodra@gmail.com>
974 * dwarf2.c (concat_filename): Return "<unknown>" on NULL filename.
975 (read_formatted_entries): Init "fe".
976 (decode_line_info <DW_LNE_define_file>): Use line_info_add_file_name.
978 2017-09-26 Alan Modra <amodra@gmail.com>
981 * dwarf2.c (decode_line_info): Ensure line_ptr stays within
982 bounds in inner loop.
984 2017-09-25 Alan Modra <amodra@gmail.com>
987 * dwarf1.c (parse_die): Sanity check pointer against section limit
988 before dereferencing.
989 (parse_line_table): Likewise.
991 2017-09-25 Alan Modra <amodra@gmail.com>
994 * dwarf2.c (scan_unit_for_symbols): Ignore DW_AT_name unless it
996 (parse_comp_unit): Likewise.
998 2017-09-25 Alan Modra <amodra@gmail.com>
1001 * dwarf2.c (read_formatted_entries): Error on format_count zero.
1003 2017-09-24 Alan Modra <amodra@gmail.com>
1006 * opncls.c (bfd_get_debug_link_info_1): Properly check that crc is
1007 within section bounds.
1009 2017-09-24 Alan Modra <amodra@gmail.com>
1012 * dwarf2.c (decode_line_info): Properly free line sequences on error.
1014 2017-09-24 Alan Modra <amodra@gmail.com>
1017 * dwarf2.c (find_abstract_instance_name): Add orig_info_ptr and
1018 pname param. Return status. Make name const. Don't abort,
1019 return an error. Formatting. Exit if current info_ptr matches
1020 orig_info_ptr. Update callers.
1021 (scan_unit_for_symbols): Start at nesting_level of zero. Make
1022 nested_funcs an array of structs for extensibility. Formatting.
1024 2017-09-24 Alan Modra <amodra@gmail.com>
1027 * dwarf2.c (decode_line_info): Fail on lh.line_range of zero
1028 rather than dividing by zero.
1030 2017-09-24 Alan Modra <amodra@gmail.com>
1033 * dwarf2.c (decode_line_info): Correct .debug_line unit_length check.
1035 2017-09-24 Alan Modra <amodra@gmail.com>
1038 * dwarf2.c (scan_unit_for_symbols): Check u.blk->data is non-NULL.
1040 2017-09-24 Alan Modra <amodra@gmail.com>
1043 * elf.c (_bfd_elf_slurp_version_tables): Test sh_info on
1044 SHT_GNU_verneed section for sanity. Don't zalloc memory for
1047 2017-09-22 H.J. Lu <hongjiu.lu@intel.com>
1050 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Guard against
1053 2017-09-22 H.J. Lu <hongjiu.lu@intel.com>
1056 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Also return
1057 -1 if bfd_canonicalize_dynamic_reloc returns 0.
1059 2017-09-22 Pedro Alves <palves@redhat.com>
1060 Alan Modra <amodra@gmail.com>
1062 * version.h: Add comment.
1064 2017-09-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1066 * elf.c (elfcore_grok_note): For the cases NT_S390_GS_CB and
1067 NT_S390_GS_BC, correct the previously swapped invocations of
1068 elfcore_grok_s390_gs_bc and elfcore_grok_s390_gs_cb.
1070 2017-09-19 Alan Modra <amodra@gmail.com>
1073 * elf64-ppc.c (ppc64_elf_build_stubs): Don't check glink_eh_frame
1076 2017-09-19 Alan Modra <amodra@gmail.com>
1079 * elflink.c (bfd_elf_size_dynamic_sections): Garbage collect
1080 symbols before calculating verrefs. Don't renumber dynsyms
1081 after gc. Exclude .gnu.version when zero or one dynsym.
1082 Localize some vars and reindent.
1084 2017-09-18 H.J. Lu <hongjiu.lu@intel.com>
1087 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Check error
1088 return from bfd_canonicalize_dynamic_reloc.
1090 2017-09-15 Alan Modra <amodra@gmail.com>
1093 * archive.c (bfd_ar_hdr_from_filesystem): Detect when status.st_size
1094 overflows bfd_size_type.
1096 2017-09-14 H.J. Lu <hongjiu.lu@intel.com>
1099 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument
1100 to indicate if conversion is performed.
1101 (elf_i386_check_relocs): Cache section contents and relocations
1102 if conversion is performed.
1103 * elf64-x86-64.c (elf_x86_64_check_relocs): Cache section
1104 contents and relocations if conversion is performed.
1106 2017-09-14 Nick Clifton <nickc@redhat.com>
1109 * peXXigen.c (pe_print_idata): Extend check for HintName vector
1112 2017-09-13 H.J. Lu <hongjiu.lu@intel.com>
1114 * elfxx-x86.h: Fix a typo in comments.
1116 2017-09-09 Kamil Rytarowski <n54@gmx.com>
1118 * elf32-nds32.c: Rename __BIT() to N32_BIT().
1120 2017-09-09 Alan Modra <amodra@gmail.com>
1122 * elf64-ppp.c (plt_stub_pad): Handle positive and negative
1125 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
1127 * elf32-i386.c (elf_i386_relocate_section): Update usage of
1128 UNDEFINED_WEAK_RESOLVED_TO_ZERO.
1129 (elf_i386_finish_dynamic_symbol): Likewise.
1130 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1131 (elf_x86_64_finish_dynamic_symbol): Likewise.
1132 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Likewise.
1133 (_bfd_x86_elf_fixup_symbol): Likewise.
1135 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
1137 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
1138 check has_non_got_reloc.
1140 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
1143 * elf32-i386.c (elf_i386_convert_load_reloc): Check linker_def.
1144 Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
1145 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Check
1146 linker_def. Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
1147 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Set local_ref
1148 and linker_def on __ehdr_start if it is referenced and not
1150 (_bfd_x86_elf_link_symbol_references_local): Also set local_ref
1151 and return TRUE when building executable, if a symbol has
1152 non-GOT/non-PLT relocations in text section or there is no
1154 * elfxx-x86.h (elf_x86_link_hash_entry): Add linker_def.
1156 2017-09-08 H.J. Lu <hongjiu.lu@intel.com>
1158 * elfxx-x86.h: Update comments.
1160 2017-09-08 H.J. Lu <hongjiu.lu@intel.com>
1162 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Replace
1163 elf_x86_plt_layout_table with elf_x86_init_table.
1164 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
1166 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties):
1168 * elfxx-x86.h (elf_x86_plt_layout_table): Renamed to ...
1169 (elf_x86_init_table): This.
1170 (_bfd_x86_elf_link_setup_gnu_properties): Replace
1171 elf_x86_plt_layout_table with elf_x86_init_table.
1173 2017-09-07 H.J. Lu <hongjiu.lu@intel.com>
1175 * configure.ac (bfd_backends): Don't add elf64-x86-64.lo nor
1176 elf64.lo together with elfxx-x86.lo for 64-bit BFD.
1177 * configure: Regenerated.
1178 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set r_info
1179 and r_sym fields of plt_layout.
1180 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
1182 * elfxx-x86.c (elf_x86_64_is_reloc_section): Remove BFD64 check.
1183 (_bfd_x86_elf_link_hash_table_create): Likewise. Don't set
1184 r_info nor r_sym fields.
1185 (_bfd_x86_elf_link_setup_gnu_properties): Set r_info and r_sym
1187 * elfxx-x86.h (elf_x86_plt_layout_table): Add r_info and r_sym.
1189 2017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
1191 * (_bfd_riscv_relax_align): Call bfd_set_error and
1192 print an error message when unable to relax a .align directive.
1194 2017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
1196 * elfnn-riscv.c (riscv_zero_pcrel_hi_reloc): New function.
1197 (riscv_record_pcrel_hi_reloc): Add absolute argument.
1198 (riscv_elf_relocate_section): Call riscv_zero_pcrel_hi_reloc for
1199 R_RISCV_PCREL_HI20 relocs, and pass the result to
1200 riscv_record_pcrel_hi_reloc.
1202 2017-09-07 H.J. Lu <hongjiu.lu@intel.com>
1204 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument,
1205 r_type_p. Remove the converted argument. Replace
1206 SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P. Return
1207 the new relocation type via r_type_p.
1208 (elf_i386_relocate_section): Likewise.
1209 (elf_i386_finish_dynamic_symbol): Likewise.
1210 (need_convert_load): Removed.
1211 (check_relocs_failed): Updated.
1212 (elf_i386_check_relocs): Call elf_i386_convert_load_reloc,
1213 instead of setting need_convert_load.
1214 (_bfd_i386_elf_convert_load): Removed.
1215 * elf64-x86-64.c (need_convert_load): Removed.
1216 (check_relocs_failed): Updated.
1217 (elf_x86_64_convert_load_reloc): Add an argument, r_type_p.
1218 Replace SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P.
1219 Return the new relocation type via r_type_p.
1220 (elf_x86_64_check_relocs): Call elf_x86_64_convert_load_reloc,
1221 instead of setting need_convert_load.
1222 (elf_x86_64_check_relocs): Don't check PIC if relocation has
1224 (_bfd_x86_64_elf_convert_load): Removed.
1225 (elf_x86_64_relocate_section): Replace SYMBOL_REFERENCES_LOCAL
1226 with SYMBOL_REFERENCES_LOCAL_P.
1227 (elf_x86_64_finish_dynamic_symbol): Likewise.
1228 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Don't
1230 (_bfd_x86_elf_size_dynamic_sections): Don't call convert_load.
1231 (_bfd_x86_elf_link_symbol_references_local): New function.
1232 * elfxx-x86.h (SYMBOL_REFERENCES_LOCAL_P): New.
1233 (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Replace elf.forced_local with
1234 SYMBOL_REFERENCES_LOCAL_P.
1235 (elf_x86_link_hash_entry): Add local_ref.
1236 (elf_x86_link_hash_table): Remove convert_load.
1237 (_bfd_i386_elf_convert_load): Removed.
1238 (_bfd_x86_64_elf_convert_load): Likewise.
1239 (_bfd_x86_elf_link_symbol_references_local): New.
1241 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
1243 * elf64-x86-64.c (R_X86_64_converted_reloc_bit): New.
1244 (elf_x86_64_info_to_howto): Get the real relocation type by
1245 masking out R_X86_64_converted_reloc_bit.
1246 (elf_x86_64_check_tls_transition): Get the real relocation type
1247 by masking out R_X86_64_converted_reloc_bit.
1248 (elf_x86_64_convert_load_reloc): Set R_X86_64_converted_reloc_bit
1249 instead of setting converted_reloc.
1250 (elf_x86_64_relocate_section): Check R_X86_64_converted_reloc_bit
1251 instead of converted_reloc. Get the real relocation type by
1252 masking out R_X86_64_converted_reloc_bit.
1253 (elf_x86_64_link_setup_gnu_properties): Verify that the value of
1254 R_X86_64_converted_reloc_bit is valid.
1255 * elfxx-x86.h (converted_reloc): Removed.
1257 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
1259 * elf32-i386.c (elf_i386_relocate_section): Don't change r_type
1260 when calling elf_i386_tls_transition. Don't use ELF32_R_TYPE
1261 to get the relocation type again.
1262 * elf64-x86-64.c (elf_x86_64_relocate_section): Don't change
1263 r_type when calling elf_x86_64_tls_transition. Don't use
1264 ELF32_R_TYPE to get the relocation type again.
1266 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
1268 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Properly set
1271 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
1273 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Remove the sec
1274 argument. Don't check relocation overflow. Avoid relocation
1275 overflow if --no-relax is used. Set converted_reloc on symbol
1276 if a GOTPCREL relocation is converted.
1277 (elf_x86_64_relocate_section): Issue a fatal error and suggest
1278 --no-relax if GOTPCREL relocation conversion leads to relocation
1280 * elfxx-x86.h (elf_x86_link_hash_entry): Add converted_reloc.
1282 2017-09-05 Alexander Fedotov <alexander.fedotov@nxp.com>
1283 Edmar Wienskoski <edmar.wienskoski@nxp.com
1285 * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_VLE_ADDR20.
1286 (ppc_elf_check_relocs): Handle it.
1287 (ppc_elf_vle_split20): New function.
1288 (ppc_elf_relocate_section): Handle R_PPC_VLE_ADDR20.
1290 2017-09-03 H.J. Lu <hongjiu.lu@intel.com>
1293 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Set tlsdesc_plt
1294 for x86-64 if GOT_TLS_GDESC_P is true.
1296 2017-09-03 Alan Modra <amodra@gmail.com>
1299 * elfxx-x86.h (elf_x86_hash_table): Check is_elf_hash_table first.
1301 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1303 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1304 tls_get_addr for x86-64 in one place.
1306 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1308 * configure.ac (bfd_backends): Add elf64-x86-64.lo together
1309 with elfxx-x86.lo for 64-bit BFD.
1310 * configure: Regenerated.
1312 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1314 * elf32-i386.c (elf_i386_convert_load): Renamed to ...
1315 (_bfd_i386_elf_convert_load): This. Remove static.
1316 (elf_i386_size_dynamic_sections): Removed.
1317 (elf_backend_size_dynamic_sections): Likewise.
1318 * elf64-x86-64.c (elf_x86_64_convert_load): Renamed to ...
1319 (_bfd_x86_64_elf_convert_load): This. Remove static.
1320 (elf_x86_64_size_dynamic_sections): Removed.
1321 (elf_backend_size_dynamic_sections): Likewise.
1322 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): Renamed to ...
1323 (elf_x86_allocate_dynrelocs): This. Make it static.
1324 (_bfd_x86_elf_allocate_local_dynrelocs): Renamed to ...
1325 (elf_x86_allocate_local_dynreloc): This. Make it static.
1326 (elf_i386_is_reloc_section): New function.
1327 (elf_x86_64_is_reloc_section): Likewise.
1328 (_bfd_x86_elf_link_hash_table_create): Initialize convert_load,
1329 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
1330 Rearrange got_entry_size initialization.
1331 (_bfd_x86_elf_size_dynamic_sections): New function.
1332 * elfxx-x86.h (elf_x86_link_hash_table): Add convert_load,
1333 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
1334 (_bfd_i386_elf_convert_load): New.
1335 (_bfd_x86_64_elf_convert_load): Likewise.
1336 (_bfd_x86_elf_size_dynamic_sections): Likewise.
1337 (elf_backend_size_dynamic_sections): Likewise.
1338 (_bfd_x86_elf_allocate_dynrelocs): Removed.
1339 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
1341 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1343 * elfxx-x86.h (elf_x86_link_hash_table): Rearrange fields and
1346 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1348 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
1349 sgotplt_jump_table_size with elf_x86_compute_jump_table_size.
1351 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1353 * elf32-i386.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
1354 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Moved to ...
1355 * elfxx-x86.h (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
1356 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Here.
1357 * elf64-x86-64.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
1358 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Removed.
1360 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1362 * elf32-i386.c (elf_i386_allocate_dynrelocs): Removed.
1363 (elf_i386_allocate_local_dynrelocs): Likewise.
1364 (elf_i386_size_dynamic_sections): Replace
1365 elf_i386_allocate_dynrelocs/elf_i386_allocate_local_dynrelocs
1366 with _bfd_x86_elf_allocate_dynrelocs and
1367 _bfd_x86_elf_allocate_local_dynrelocs.
1368 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Removed.
1369 (elf_x86_64_allocate_local_dynrelocs): Likewise.
1370 (elf_x86_64_size_dynamic_sections): Replace
1371 elf_x86_64_allocate_dynrelocs/elf_x86_64_allocate_local_dynrelocs
1372 with _bfd_x86_elf_allocate_dynrelocs and
1373 _bfd_x86_elf_allocate_local_dynrelocs.
1374 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): New function.
1375 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
1376 * elfxx-x86.h (_bfd_x86_elf_allocate_dynrelocs): New prototype.
1377 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
1379 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1381 * elf32-i386.c (is_i386_elf): Removed.
1382 (elf_i386_check_relocs): Replace is_i386_elf with is_x86_elf.
1383 (elf_i386_size_dynamic_sections): Likewise.
1384 (elf_i386_relocate_section): Likewise.
1385 * elf64-x86-64.c (is_x86_64_elf): Removed.
1386 (elf_x86_64_check_relocs): Replace is_x86_64_elf with
1388 (elf_x86_64_size_dynamic_sections): Likewise.
1389 (elf_x86_64_relocate_section): Likewise.
1390 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1392 * elfxx-x86.h (elf_x86_link_hash_table): Add target_id.
1395 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1397 * elf32-i386.c (elf_i386_compute_jump_table_size): Removed.
1398 (elf_i386_allocate_dynrelocs): Replace
1399 elf_i386_compute_jump_table_size with
1400 elf_x86_compute_jump_table_size.
1401 (elf_i386_size_dynamic_sections): Likewise.
1402 * elf64-x86-64.c (elf_x86_64_compute_jump_table_size): Removed.
1403 (elf_x86_64_allocate_dynrelocs): Replace
1404 elf_x86_64_compute_jump_table_size with
1405 elf_x86_compute_jump_table_size.
1406 (elf_x86_64_size_dynamic_sections): Likewise.
1407 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1409 * elfxx-x86.h (elf_x86_link_hash_table): Add got_entry_size.
1410 (elf_x86_compute_jump_table_size): New.
1412 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1414 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1416 (_bfd_x86_elf_adjust_dynamic_symbol): Use sizeof_reloc.
1417 * elfxx-x86.h (elf_x86_link_hash_table): Add sizeof_reloc.
1419 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1421 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check VxWorks
1422 with htab->is_vxworks.
1423 (elf_i386_size_dynamic_sections): Likewise.
1424 (elf_i386_relocate_section): Likewise.
1425 (elf_i386_finish_dynamic_symbol): Likewise.
1426 (elf_i386_finish_dynamic_sections): Likewise.
1428 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1430 * elf32-i386.c (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
1431 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
1432 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Moved to ...
1433 * elfxx-x86.h (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
1434 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
1435 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Here.
1436 * elf64-x86-64.c (GOT_TLS_IE, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
1437 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Removed.
1439 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1442 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Check
1443 ELF_COMMON_DEF_P for common symbols.
1445 2017-09-02 Alan Modra <amodra@gmail.com>
1447 * elf-eh-frame.c (offset_adjust): Avoid false positive gcc warning.
1448 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Likewise.
1449 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
1451 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1453 * elf32-i386.c (elf_i386_gc_mark_hook): Removed.
1454 (elf_backend_gc_mark_hook): Likewise.
1455 * elf64-x86-64.c (elf_x86_64_gc_mark_hook): Likewise.
1456 (elf_backend_gc_mark_hook): Likewise.
1457 * elfxx-x86.c (_bfd_x86_elf_gc_mark_hook): New function.
1458 * elfxx-x86.h (_bfd_x86_elf_gc_mark_hook): New.
1459 (elf_backend_gc_mark_hook): Likewise.
1461 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1463 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Removed.
1464 (elf_backend_adjust_dynamic_symbol): Likewise.
1465 * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise.
1466 (elf_backend_adjust_dynamic_symbol): Likewise.
1467 * elfxx-x86.c (_bfd_x86_elf_adjust_dynamic_symbol): New function.
1468 (_bfd_x86_elf_link_setup_gnu_properties): Copy is_vxworks.
1469 * elfxx-x86.h (elf_x86_link_hash_table): Add is_vxworks.
1470 (_bfd_x86_elf_adjust_dynamic_symbol): New.
1471 (elf_backend_adjust_dynamic_symbol): Likewise.
1473 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1475 * elfxx-x86.h (elf_x86_plt_layout_table): Fix a typo in
1478 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1480 * elf32-i386.c (elf_i386_mkobject): Removed.
1481 (bfd_elf32_mkobject): Likewise.
1482 * elf64-x86-64.c (elf_x86_64_mkobject): Likewise.
1483 (bfd_elf64_mkobject): Likewise.
1484 (bfd_elf32_mkobject): Likewise.
1485 * elfxx-x86.c (_bfd_x86_elf_mkobject): New function.
1486 * elfxx-x86.h (_bfd_x86_elf_mkobject): New.
1487 (bfd_elf64_mkobject): Likewise.
1488 (bfd_elf32_mkobject): Likewise.
1490 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1492 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Updated.
1493 Call _bfd_x86_elf_link_setup_gnu_properties.
1494 * elf64-x86-64.c (elf_x86_lazy_plt_layout): Initialize
1495 pic_plt0_entry and pic_plt_entry fields with the non-PIC PLT
1497 (elf_x86_64_non_lazy_plt): Likewise.
1498 (elf_x86_64_lazy_bnd_plt): Likewise.
1499 (elf_x86_64_non_lazy_bnd_plt): Likewise.
1500 (elf_x86_64_lazy_ibt_plt): Likewise.
1501 (elf_x32_lazy_ibt_plt): Likewise.
1502 (elf_x86_64_non_lazy_ibt_plt): Likewise.
1503 (elf_x32_non_lazy_ibt_plt): Likewise.
1504 (elf_x86_64_nacl_plt): Likewise.
1505 (elf_x86_64_link_setup_gnu_properties): Updated. Call
1506 _bfd_x86_elf_link_setup_gnu_properties.
1507 * elfxx-x86.c: Include elf-vxworks.h".
1508 (_bfd_x86_elf_link_setup_gnu_properties): New function.
1509 * elfxx-x86.h (elf_x86_lazy_plt_layout): Remove "for i386 only"
1510 comments for pic_plt0_entry and pic_plt_entry.
1511 (elf_x86_non_lazy_plt_layout): Likewise.
1512 (elf_x86_plt_layout_table): New.
1513 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
1515 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1518 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Create
1519 .eh_frame section for the second PLT.
1520 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Correct
1521 alignment of .eh_frame section for the second PLT.
1523 2017-09-01 Nick Clifton <nickc@redhat.com>
1526 * dwarf2.c (decode_line_info): Fix test for an overlong line info
1529 2017-09-01 Nick Clifton <nickc@redhat.com>
1532 * elf-attrs.c (_bfd_elf_parse_attributes): Ensure that the
1533 attribute buffer is NUL terminated.
1535 2017-08-31 Nick Clifton <nickc@redhat.com>
1538 * dwarf2.c (read_section): If necessary add a terminating NUL byte
1539 to dwarf string sections.
1541 2017-08-31 Alan Modra <amodra@gmail.com>
1543 * po/SRC-POTFILES.in: Regenerate.
1545 2017-08-31 Alan Modra <amodra@gmail.com>
1547 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Don't exit early
1548 for a section containing just a terminator. Allow multiple
1549 terminators at end of section.
1550 * elflink.c (bfd_elf_discard_info): Iterate over .eh_frame
1551 sections when not adding alignment. Assert on terminator in
1554 2017-08-31 Alan Modra <amodra@gmail.com>
1558 * elflink.c (bfd_elf_discard_info): Don't pad embedded zero
1561 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1563 * configure.ac (bfd_backends): Add elf64.lo together with
1564 elfxx-x86.lo for 64-bit BFD.
1565 * configure: Regenerated.
1567 2017-08-31 James Bowman <james.bowman@ftdichip.com>
1569 * elf32-ft32.c (ft32_elf_howto_table): Use complain_overflow_dont
1572 2017-08-31 Alan Modra <amodra@gmail.com>
1575 * opncls.c (bfd_close_all_done): Don't call bfd_cache_close
1576 before _close_and_cleanup. Call iovec->bclose after.
1577 (bfd_close): Remove code common to, and call, bfd_close_all_done.
1579 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1581 * elf32-i386.c (elf_i386_plt_type): Removed.
1582 (elf_i386_plt): Likewise.
1583 (elf_i386_get_synthetic_symtab): Updated. Call
1584 _bfd_x86_elf_get_synthetic_symtab.
1585 * elf64-x86-64.c (elf_x86_64_plt_type): Removed.
1586 (elf_x86_64_plt): Likewise.
1587 (elf_x86_64_get_synthetic_symtab): Updated. Call
1588 _bfd_x86_elf_get_synthetic_symtab.
1589 * elfxx-x86.c (elf_i386_get_plt_got_vma): New function.
1590 (elf_x86_64_get_plt_got_vma): Likewise.
1591 (elf_i386_valid_plt_reloc_p): Likewise.
1592 (elf_x86_64_valid_plt_reloc_p): Likewise.
1593 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
1594 * elfxx-x86.h (elf_x86_plt_type): New.
1595 (elf_x86_plt): Likewise.
1596 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
1598 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1600 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Check
1601 target_id instead of elf_machine_code.
1603 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1605 * elf32-i386.c (ELF_DYNAMIC_INTERPRETER): Removed.
1606 (elf_i386_lazy_plt_layout): Likewise.
1607 (elf_i386_non_lazy_plt_layout): Likewise.
1608 (elf_i386_plt_layout): Likewise.
1609 (elf_i386_link_hash_table): Likewise.
1610 (elf_i386_next_tls_desc_index): Likewise.
1611 (elf_i386_srelplt2): Likewise.
1612 (elf_i386_plt): Likewise.
1613 (elf_i386_lazy_plt): Likewise.
1614 (elf_i386_non_lazy_plt): Likewise.
1615 (elf_i386_link_hash_table_create): Likewise.
1616 (bfd_elf32_bfd_link_hash_table_create): Likewise.
1617 (elf_i386_lazy_plt): Updated.
1618 (elf_i386_non_lazy_plt): Likewise.
1619 (elf_i386_lazy_ibt_plt): Likewise.
1620 (elf_i386_non_lazy_ibt_plt): Likewise.
1621 (elf_i386_allocate_dynrelocs): Likewise.
1622 (elf_i386_size_dynamic_sections): Likewise.
1623 (elf_i386_relocate_section): Likewise.
1624 (elf_i386_finish_dynamic_symbol): Likewise.
1625 (elf_i386_finish_dynamic_sections): Likewise.
1626 (elf_i386_get_synthetic_symtab): Likewise.
1627 (elf_i386_link_setup_gnu_properties): Likewise.
1628 (elf_i386_nacl_plt): Likewise.
1629 * elf64-x86-64.c (ABI_64_P): Removed.
1630 (ELF64_DYNAMIC_INTERPRETER): Likewise.
1631 (ELF32_DYNAMIC_INTERPRETER): Likewise.
1632 (elf_x86_64_lazy_plt_layout): Likewise.
1633 (elf_x86_64_non_lazy_plt_layout): Likewise.
1634 (elf_x86_64_plt_layout): Likewise.
1635 (elf_x86_64_link_hash_table): Likewise.
1636 (elf_x86_64_plt): Likewise.
1637 (elf_x86_64_lazy_plt): Likewise.
1638 (elf_x86_64_non_lazy_plt): Likewise.
1639 (elf_x86_64_link_hash_table_create): Likewise.
1640 (bfd_elf64_bfd_link_hash_table_create): Likewise.
1641 (bfd_elf32_bfd_link_hash_table_create): Likewise.
1642 (elf_x86_64_lazy_plt): Updated.
1643 (elf_x86_64_non_lazy_plt): Likewise.
1644 (elf_x86_64_lazy_bnd_plt): Likewise.
1645 (elf_x86_64_non_lazy_bnd_plt): Likewise.
1646 (elf_x86_64_lazy_ibt_plt): Likewise.
1647 (elf_x32_lazy_ibt_plt): Likewise.
1648 (elf_x86_64_non_lazy_ibt_plt): Likewise.
1649 (elf_x32_non_lazy_ibt_plt): Likewise.
1650 (elf_x86_64_allocate_dynrelocs): Likewise.
1651 (elf_x86_64_size_dynamic_sections): Likewise.
1652 (elf_x86_64_relocate_section): Likewise.
1653 (elf_x86_64_finish_dynamic_symbol): Likewise.
1654 (elf_x86_64_finish_dynamic_sections): Likewise.
1655 (elf_x86_64_get_synthetic_symtab): Likewise.
1656 (elf_x86_64_link_setup_gnu_properties): Likewise.
1657 (elf_x86_64_nacl_plt): Likewise.
1658 * elfxx-x86.c: Include "objalloc.h", "elf/i386.h" and
1660 (ELF32_DYNAMIC_INTERPRETER): New.
1661 (ELF64_DYNAMIC_INTERPRETER): Likewise.
1662 (ELFX32_DYNAMIC_INTERPRETER): Likewise.
1663 (_bfd_x86_elf_link_hash_table_create): Likewise.
1664 (_bfd_x86_elf_link_hash_table_free): Renamed to ...
1665 (elf_x86_link_hash_table_free): This. Make it static.
1666 * elfxx-x86.h: Don't include "objalloc.h".
1668 (elf_x86_lazy_plt_layout): Likewise.
1669 (elf_x86_non_lazy_plt_layout): Likewise.
1670 (elf_x86_plt_layout): Likewise.
1671 (_bfd_x86_elf_link_hash_table_create): Likewise.
1672 (bfd_elf64_bfd_link_hash_table_create): Likewise.
1673 (bfd_elf32_bfd_link_hash_table_create): Likewise.
1674 (elf_x86_link_hash_table): Add plt, lazy_plt, non_lazy_plt,
1675 srelplt2 and next_tls_desc_index.
1676 (_bfd_x86_elf_link_hash_table_free): Removed.
1678 2017-08-30 Maciej W. Rozycki <macro@imgtec.com>
1680 * elfxx-mips.c (mips_elf_perform_relocation): Correct microMIPS
1681 branch offset interpretation.
1683 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1686 * opncls.c (bfd_close_all_done): Call _close_and_cleanup.
1688 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1690 * elf64-x86-64.c (elf_x86_64_next_tls_desc_index): Removed.
1691 (elf_x86_64_srelplt2): Likewise.
1693 2017-08-30 Alan Modra <amodra@gmail.com>
1695 * elf64-ppc.c (struct ppc_link_hash_table): Add do_tls_opt.
1696 (ppc64_elf_tls_optimize): Set it.
1697 (ppc64_elf_relocate_section): Nop addis on TPREL16_HA, and convert
1698 insn on TPREL16_LO and TPREL16_LO_DS relocs to use r13 when
1699 addis would add zero.
1700 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add do_tls_opt.
1701 (ppc_elf_tls_optimize): Set it.
1702 (ppc_elf_relocate_section): Nop addis on TPREL16_HA, and convert
1703 insn on TPREL16_LO relocs to use r2 when addis would add zero.
1705 2017-08-30 Alan Modra <amodra@gmail.com>
1707 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing
1708 __tls_get_addr call sequences to LE, don't move the addi down
1709 to the nop. Replace the bl with addi and leave the nop alone.
1711 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1713 * elf32-i386.c (elf_i386_pie_finish_undefweak_symbol):
1715 * elf64-x86-64.c (elf_x86_64_finish_local_dynamic_symbol):
1717 (elf_x86_64_pie_finish_undefweak_symbol): Likewise.
1719 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1721 * Makefile.am (BFD32_BACKENDS): Add elfxx-x86.lo.
1722 (BFD64_BACKENDS): Likewise.
1723 (BFD32_BACKENDS_CFILES): Add elfxx-x86.c.
1724 (BFD64_BACKENDS_CFILES): Likewise.
1725 * Makefile.in: Regenerated.
1726 * configure.ac (bfd_backends): Add elfxx-x86.lo together with
1727 elf32-i386.lo and elf64-x86-64.lo.
1728 * configure: Regenerated.
1729 * elf32-i386.c: Include "elfxx-x86.h" instead of "sysdep.h",
1730 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
1731 "objalloc.h" and "hashtab.h".
1732 (ELIMINATE_COPY_RELOCS): Removed.
1733 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
1734 (SYMBOL_NO_COPYRELOC): Likewise.
1735 (elf_i386_link_hash_entry): Likewise.
1736 (GOT_UNKNOWN): Likewise.
1737 (GOT_NORMAL): Likewise.
1738 (GOT_TLS_GD): Likewise.
1739 (elf_i386_hash_entry): Likewise.
1740 (elf_i386_obj_tdata): Likewise.
1741 (elf_i386_tdata): Likewise.
1742 (elf_i386_local_got_tls_type): Likewise.
1743 (elf_i386_local_tlsdesc_gotent): Likewise.
1744 (elf_i386_hash_table): Likewise.
1745 (elf_i386_link_hash_newfunc): Likewise.
1746 (elf_i386_local_htab_hash): Likewise.
1747 (elf_i386_local_htab_eq): Likewise.
1748 (elf_i386_get_local_sym_hash): Likewise.
1749 (elf_i386_link_hash_table_free): Likewise.
1750 (elf_i386_copy_indirect_symbol): Likewise.
1751 (elf_i386_fixup_symbol): Likewise.
1752 (elf_i386_readonly_dynrelocs): Likewise.
1753 (elf_i386_always_size_sections): Likewise.
1754 (elf_i386_set_tls_module_base): Likewise.
1755 (elf_i386_dtpoff_base): Likewise.
1756 (compare_relocs): Likewise.
1757 (elf_i386_hash_symbol): Likewise.
1758 (elf_i386_parse_gnu_properties): Likewise.
1759 (elf_i386_merge_gnu_properties): Likewise.
1760 (elf_i386_link_check_relocs): Likewise.
1761 (elf_i386_merge_symbol_attribute): Likewise.
1762 (bfd_elf32_bfd_link_check_relocs): Likewise.
1763 (elf_backend_copy_indirect_symbol): Likewise.
1764 (elf_backend_always_size_sections): Likewise.
1765 (elf_backend_omit_section_dynsym): Likewise.
1766 (elf_backend_hash_symbol): Likewise.
1767 (elf_backend_fixup_symbol): Likewise.
1768 (elf_backend_parse_gnu_properties): Likewise.
1769 (elf_backend_merge_gnu_properties): Likewise.
1770 (elf_backend_merge_symbol_attribute): Likewise.
1771 (elf_i386_mkobject): Updated.
1772 (elf_i386_link_hash_table_create): Likewise.
1773 (elf_i386_check_tls_transition): Likewise.
1774 (elf_i386_tls_transition): Likewise.
1775 (elf_i386_convert_load_reloc): Likewise.
1776 (elf_i386_check_relocs): Likewise.
1777 (elf_i386_adjust_dynamic_symbol): Likewise.
1778 (elf_i386_allocate_dynrelocs): Likewise.
1779 (elf_i386_convert_load): Likewise.
1780 (elf_i386_size_dynamic_sections): Likewise.
1781 (elf_i386_relocate_section): Likewise.
1782 (elf_i386_finish_dynamic_symbol ): Likewise.
1783 (elf_i386_finish_dynamic_sections): Likewise.
1784 (elf_i386_output_arch_local_syms): Likewise.
1785 (elf_i386_get_synthetic_symtab): Likewise.
1786 (elf_i386_link_setup_gnu_properties): Likewise.
1787 (elf_i386_link_hash_table): Use elf_x86_link_hash_table, instead
1788 of elf_link_hash_table, as base.
1789 (elf_i386_next_tls_desc_index): New.
1790 (elf_i386_srelplt2): Likewise.
1791 (elf_i386_plt): Likewise.
1792 (elf_i386_lazy_plt): Likewise.
1793 (elf_i386_non_lazy_plt): Likewise.
1794 * elf32-x86-64.c: Include "elfxx-x86.h" instead of "sysdep.h",
1795 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
1796 "objalloc.h" and "hashtab.h".
1797 (ELIMINATE_COPY_RELOCS): Removed.
1798 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
1799 (SYMBOL_NO_COPYRELOC): Likewise.
1800 (elf_x86_64_link_hash_entry): Likewise.
1801 (GOT_UNKNOWN): Likewise.
1802 (GOT_NORMAL): Likewise.
1803 (GOT_TLS_GD): Likewise.
1804 (elf_x86_64_hash_entry): Likewise.
1805 (elf_x86_64_obj_tdata): Likewise.
1806 (elf_x86_64_tdata): Likewise.
1807 (elf_x86_64_local_got_tls_type): Likewise.
1808 (elf_x86_64_local_tlsdesc_gotent): Likewise.
1809 (elf_x86_64_hash_table): Likewise.
1810 (elf_x86_64_link_hash_newfunc): Likewise.
1811 (elf_x86_64_local_htab_hash): Likewise.
1812 (elf_x86_64_local_htab_eq): Likewise.
1813 (elf_x86_64_get_local_sym_hash): Likewise.
1814 (elf_x86_64_link_hash_table_free): Likewise.
1815 (elf_x86_64_copy_indirect_symbol): Likewise.
1816 (elf_x86_64_fixup_symbol): Likewise.
1817 (elf_x86_64_readonly_dynrelocs): Likewise.
1818 (elf_x86_64_always_size_sections): Likewise.
1819 (elf_x86_64_set_tls_module_base): Likewise.
1820 (elf_x86_64_dtpoff_base): Likewise.
1821 (compare_relocs): Likewise.
1822 (elf_x86_64_merge_symbol_attribute): Likewise.
1823 (elf_x86_64_hash_symbol): Likewise.
1824 (elf_x86_64_parse_gnu_properties): Likewise.
1825 (elf_x86_64_merge_gnu_properties): Likewise.
1826 (elf_x86_64_link_check_relocs): Likewise.
1827 (elf_backend_copy_indirect_symbol): Likewise.
1828 (elf_backend_always_size_sections): Likewise.
1829 (bfd_elf64_bfd_link_check_relocs): Likewise.
1830 (elf_backend_merge_symbol_attribute): Likewise.
1831 (elf_backend_hash_symbol): Likewise.
1832 (elf_backend_omit_section_dynsym): Likewise.
1833 (elf_backend_fixup_symbol): Likewise.
1834 (elf_backend_parse_gnu_properties): Likewise.
1835 (elf_backend_merge_gnu_properties): Likewise.
1836 (bfd_elf32_bfd_link_check_relocs): Likewise.
1837 (elf_x86_64_mkobject): Updated.
1838 (elf_x86_64_link_hash_table_create): Likewise.
1839 (elf_x86_64_check_tls_transition): Likewise.
1840 (elf_x86_64_tls_transition): Likewise.
1841 (elf_x86_64_convert_load_reloc): Likewise.
1842 (elf_x86_64_check_relocs): Likewise.
1843 (elf_x86_64_adjust_dynamic_symbol): Likewise.
1844 (elf_x86_64_allocate_dynrelocs): Likewise.
1845 (elf_x86_64_convert_load): Likewise.
1846 (elf_x86_64_size_dynamic_sections): Likewise.
1847 (elf_x86_64_relocate_section): Likewise.
1848 (elf_x86_64_finish_dynamic_symbol ): Likewise.
1849 (elf_x86_64_finish_dynamic_sections): Likewise.
1850 (elf_x86_64_output_arch_local_syms): Likewise.
1851 (elf_x86_64_get_synthetic_symtab): Likewise.
1852 (elf_x86_64_link_setup_gnu_properties): Likewise.
1853 (elf_x86_64_link_hash_table): Use elf_x86_link_hash_table,
1854 instead of elf_link_hash_table, as base.
1855 (elf_x86_64_next_tls_desc_index): New.
1856 (elf_x86_64_srelplt2): Likewise.
1857 (elf_x86_64_plt): Likewise.
1858 (elf_x86_64_lazy_plt): Likewise.
1859 (elf_x86_64_non_lazy_plt): Likewise.
1860 * elfxx-x86.c: New file.
1861 * elfxx-x86.h: Likewise.
1863 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1865 * elf32-i386.c (elf_i386_get_synthetic_symtab): Simplify bad
1867 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1869 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1871 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check valid PLT
1872 sections before checking dynamic relocations and free invalid
1873 PLT section contents.
1874 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1876 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
1878 * elf-bfd.h (_bfd_elf_ifunc_get_synthetic_symtab): Removed.
1879 * elf-ifunc.c (_bfd_elf_ifunc_get_synthetic_symtab): Likewise.
1881 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
1884 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check for valid
1886 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1888 2017-08-27 H.J. Lu <hongjiu.lu@intel.com>
1890 * elf32-i386.c (elf_i386_link_hash_newfunc): Initialize
1892 * elf64-x86-64.c (elf_x86_64_link_hash_newfunc): Likewise.
1894 2017-08-26 H.J. Lu <hongjiu.lu@intel.com>
1897 * elf-bfd.h (elf_obj_tdata): Use ENUM_BITFIELD on object_id,
1898 dyn_lib_class and has_gnu_symbols. Change bad_symtab to bitfield.
1899 Add a has_no_copy_on_protected bitfield.
1900 (elf_has_no_copy_on_protected): New.
1901 * elf-properties.c (_bfd_elf_parse_gnu_properties): Set
1902 elf_has_no_copy_on_protected for GNU_PROPERTY_NO_COPY_ON_PROTECTED.
1903 (elf_merge_gnu_property_list): Likewise.
1904 (_bfd_elf_link_setup_gnu_properties): Set extern_protected_data
1905 to FALSE for elf_has_no_copy_on_protected.
1906 * elf32-i386.c (SYMBOL_NO_COPYRELOC): New.
1907 (elf_i386_link_hash_entry): Add def_protected.
1908 (elf_i386_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
1909 when checking info->nocopyreloc.
1910 (elf_i386_link_setup_gnu_properties): Don't set
1911 extern_protected_data here.
1912 (elf_i386_merge_symbol_attribute): New function.
1913 (elf_backend_merge_symbol_attribute): New.
1914 * elf64-x86-64.c (SYMBOL_NO_COPYRELOC): New.
1915 (elf_x86_64_link_hash_entry): Add def_protected.
1916 (elf_x86_64_need_pic): Report protected symbol for def_protected.
1917 (elf_x86_64_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
1918 when checking info->nocopyreloc.
1919 (elf_x86_64_relocate_section): Also check for R_X86_64_PC32
1920 relocation run-time overflow and unresolvable R_X86_64_32S
1921 relocation against protected data symbol defined in shared object
1922 with GNU_PROPERTY_NO_COPY_ON_PROTECTED.
1923 (elf_x86_64_link_setup_gnu_properties): Don't set
1924 extern_protected_data here.
1925 (elf_x86_64_merge_symbol_attribute): New function.
1926 (elf_backend_merge_symbol_attribute): New.
1928 2017-08-26 Alan Modra <amodra@gmail.com>
1930 * elf32-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
1931 (ppc_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
1932 (ppc_elf_relocate_section): Comment fix.
1933 * elf64-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
1934 (ppc64_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
1935 Support dynamic relocs for TPREL16 when non-pic too.
1936 (dec_dynrel_count): Adjust TPREL16 handling as per check_relocs.
1937 (ppc64_elf_relocate_section): Support dynamic relocs for TPREL16
1940 2017-08-25 H.J. Lu <hongjiu.lu@intel.com>
1942 * elf32-i386.c (elf_i386_link_hash_entry): Remove redundant
1943 "symbol" in comments.
1944 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Likewise.
1946 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
1949 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for
1950 R_X86_64_PC32 relocation run-time overflow and unresolvable
1951 R_X86_64_32S relocation with -z nocopyreloc.
1953 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
1955 * elf32-i386.c (elf_i386_check_relocs): Revert the last change.
1956 Undefined symbols may not have a type.
1957 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1959 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1961 * elf64-x86-64.c (elf_x86_64_need_pic): Add an argument for
1962 bfd_link_info. Report shared, PIE or PDE object based on
1964 (elf_x86_64_check_relocs): Update elf_x86_64_need_pic call.
1965 (elf_x86_64_relocate_section): Likewise.
1967 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1969 * elf32-i386.c (elf_i386_check_relocs): Increment PLT count only
1970 for function symbols.
1971 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1973 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1975 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set
1976 extern_protected_data to FALSE if GNU_PROPERTY_NO_COPY_ON_PROTECTED
1977 is set on any input relocatable file.
1978 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
1980 2017-08-23 Alan Modra <amodra@gmail.com>
1983 * elf64-ppc.c (ensure_undef_dynamic): Rename from
1984 ensure_undefweak_dynamic. Handle undefined too.
1985 * elf32-ppc.c (ensure_undef_dynamic): Likewise.
1986 * elf32-hppa.c (ensure_undef_dynamic): Likewise.
1987 (allocate_dynrelocs): Discard undefined non-default visibility
1988 relocs first. Make undefined syms dynamic. Tidy goto.
1990 2017-08-21 Alan Modra <amodra@gmail.com>
1991 H.J. Lu <hongjiu.lu@intel.com>
1994 * elf-bfd.h (SYMBOLIC_BIND): Return TRUE for __start/__stop symbols.
1995 * elflink.c (bfd_elf_define_start_stop): Rewrite.
1997 2017-08-21 Hans-Peter Nilsson <hp@bitrange.com>
2000 * elf64-mmix.c (mmix_elf_relax_section): Correct handling of
2001 undefined weak symbols.
2003 2017-08-18 Nick Clifton <nickc@redhat.com>
2006 * tekhex.c (getsym): Fix check for source pointer walking off the
2007 end of the input buffer.
2009 2017-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
2012 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Skip IFUNC
2013 relocations in debug sections, change abort to _bfd_error_handler.
2015 2017-08-14 Nick Clifton <nickc@redhat.com>
2018 * elf.c (setup_group): Check for an empty or very small group
2020 * po/bfd.pot: Regenerate.
2022 2017-08-14 Alan Modra <amodra@gmail.com>
2025 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't add
2026 alignment padding here.
2027 * elflink.c (bfd_elf_discard_info): Add .eh_frame padding here
2028 in a reverse pass over sections.
2030 2017-08-11 H.J. Lu <hongjiu.lu@intel.com>
2033 * elf32-i386.c (elf_i386_get_synthetic_symtab): Allocate space
2034 for @plt suffixes first.
2035 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
2037 2017-08-08 Nick Clifton <nickc@redhat.com>
2040 * elf-attrs.c (_bfd_elf_parse_attributes): Complain about very
2041 small section lengths.
2042 * elf.c (_bfd_elf_setup_sections): Skip empty entries in the group
2044 (elfcore_grok_freebsd_prstatus): Add checks to make sure that
2045 there is enough data present in the note.
2047 2017-08-08 Alan Modra <amodra@gmail.com>
2050 * elf32-microblaze.c (microblaze_elf_check_relocs): Don't bump
2051 got.refcount for GOTOFF relocs, just create .got section.
2053 2017-08-07 H.J. Lu <hongjiu.lu@intel.com>
2055 * elflink.c (elf_link_add_object_symbols): Move common symbol
2056 check after bed->common_definition.
2058 2017-08-07 Alan Modra <amodra@gmail.com>
2061 * elflink.c (bfd_elf_final_link): Don't segfault when sections
2062 needed to define various dynamic tags have been discarded.
2064 2017-08-07 Nick Clifton <nickc@redhat.com>
2067 * elf32-i386.c (elf_i386_link_setup_gnu_properties): If the dynobj
2068 has not been set then use the bfd returned by
2069 _bfd_elf_link_setup_gnu_properties. If that is null then search
2070 through all the input bfds selecting the first normal, ELF format
2072 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
2074 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
2076 * elf32-i386.c (elf_i386_link_hash_entry): Change tls_get_addr
2078 (elf_i386_link_hash_newfunc): Initialize tls_get_addr to 0.
2079 (elf_i386_check_tls_transition): Check tls_get_addr directly.
2080 (elf_i386_convert_load_reloc): Update tls_get_addr check.
2081 (elf_i386_link_check_relocs): New function.
2082 (bfd_elf32_bfd_link_check_relocs): New.
2083 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Change tls_get_addr
2085 (elf_x86_64_link_hash_newfunc): Initialize tls_get_addr to 0.
2086 (elf_x86_64_check_tls_transition): Check tls_get_addr directly.
2087 (elf_x86_64_convert_load_reloc): Update tls_get_addr check.
2088 (elf_x86_64_link_check_relocs): New function.
2089 (bfd_elf64_bfd_link_check_relocs): New.
2090 (bfd_elf32_bfd_link_check_relocs): Likewise.
2092 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
2095 * elflink.c (elf_link_add_object_symbols): Treat common symbol
2096 as undefined for --no-define-common.
2098 2017-08-05 Alan Modra <amodra@gmail.com>
2100 * elf32-hppa.c (elf32_hppa_set_gp): Don't require an
2101 hppa_link_hash_table.
2103 2017-08-02 Max Filippov <jcmvbkbc@gmail.com>
2105 * xtensa-isa.c (xtensa_isa_init): Don't update lookup table
2106 entries for sysregs with negative indices.
2108 2017-08-01 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2110 * elf32-s390.c (elf_s390_finish_dynamic_sections): Skip if it
2111 isn't the S/390 specific elf data.
2112 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
2114 2017-07-31 Kuan-Lin Chen <rufus@andestech.com>
2116 * elfxx-riscv.c (riscv_elf_add_sub_reloc): New function.
2117 * (howto_table) [R_RISCV_ADD8]: Use riscv_elf_add_sub_reloc.
2118 [R_RISCV_ADD16]: Likewise.
2119 [R_RISCV_ADD32]: Likewise.
2120 [R_RISCV_ADD64]: Likewise.
2121 [R_RISCV_SUB6]: Likewise.
2122 [R_RISCV_SUB8]: Likewise.
2123 [R_RISCV_SUB16]: Likewise.
2124 [R_RISCV_SUB32]: Likewise.
2125 [R_RISCV_SUB64]: Likewise.
2127 2017-07-31 Alan Modra <amodra@gmail.com>
2129 * elf64-ppc.c (ppc64_elf_tls_setup): Warn on --plt-localentry
2130 without ld.so checks.
2132 2017-07-29 Alan Modra <amodra@gmail.com>
2135 * elf64-ppc.c (struct ppc_link_hash_entry): Add non_zero_localentry.
2136 (ppc64_elf_merge_symbol): Set non_zero_localentry.
2137 (is_elfv2_localentry0): Test non_zero_localentry.
2138 (ppc64_elf_tls_setup): Default to --no-plt-localentry.
2140 2017-07-28 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2142 * elf32-s390.c (elf_s390_finish_dynamic_sections): Add NULL
2143 pointer check for htab->elf.irelplt.
2144 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
2146 2017-07-27 Nick Clifton <nickc@redhat.com>
2149 * mach-o.c (bfd_mach_o_read_symtab_strtab): Fail if the symtab
2151 * nlmcode.h (nlm_swap_auxiliary_headers_in): Replace assertion
2153 * section.c (bfd_make_section_with_flags): Fail if the name or bfd
2155 * vms-alpha.c (bfd_make_section_with_flags): Correct computation
2157 (evax_bfd_print_emh): Check for invalid string lengths.
2159 2017-07-25 Nick Clifton <nickc@redhat.com>
2161 * po/fr.po: Updated French translation.
2163 2017-07-25 Benjamin Green <bengreen5mx@gmail.com>
2166 * elf32-msp430.c (msp430_elf_relax_section): Allow conversion of
2167 16-bit absolute branches into 10-bit pc-relative branches on the
2168 MSP430 as well as the MSP430X.
2170 2017-07-25 Alan Modra <amodra@gmail.com>
2172 * elf64-ppc.c (struct map_stub): Add tls_get_addr_opt_bctrl.
2173 (stub_eh_frame_size): New function.
2174 (ppc_size_one_stub): Set group tls_get_addr_opt_bctrl.
2175 (group_sections): Init group tls_get_addr_opt_bctrl.
2176 (ppc64_elf_size_stubs): Update sizing and initialization of
2177 .eh_frame. Iteration over stubs via group list.
2178 (ppc64_elf_build_stubs): Iterate over stubs via group list.
2179 (ppc64_elf_finish_dynamic_sections): Update finalization of
2182 2017-07-24 Nick Clifton <nickc@redhat.com>
2185 * mach-o.c (bfd_mach_o_canonicalize_relocs): Pass the base address
2186 of the relocs to the canonicalize_one_reloc routine.
2187 * mach-o.h (struct bfd_mach_o_backend_data): Update the prototype
2188 for the _bfd_mach_o_canonicalize_one_reloc field.
2189 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add
2190 res_base parameter. Use to check for corrupt pair relocs.
2191 * mach-o-aarch64.c (bfd_mach_o_arm64_canonicalize_one_reloc):
2193 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc):
2195 * mach-o-x86-64.c (bfd_mach_o_x86_64_canonicalize_one_reloc):
2198 * vms-alpha.c (_bfd_vms_slurp_eihd): Make sure that there is
2199 enough data in the record before attempting to parse it.
2200 (_bfd_vms_slurp_eeom): Likewise.
2202 (_bfd_vms_slurp_egsd): Check for an invalid section index.
2203 (image_set_ptr): Likewise.
2204 (alpha_vms_slurp_relocs): Likewise.
2206 (alpha_vms_object_p): Check for a truncated record.
2208 2017-07-24 Nick Clifton <nickc@redhat.com>
2211 * reloc.c (_bfd_unrecognized_reloc): New function. Reports
2212 an unrecognized reloc and sets the bfd_error value.
2213 * libbfd.h: Regenerate.
2214 * elf32-arm.c (elf32_arm_final_link_relocate): Use the new
2216 * elf32-i386.c (elf_i386_relocate_section): Likewise.
2217 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
2218 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
2219 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise.
2220 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
2222 2017-07-23 Alan Modra <amodra@gmail.com>
2224 * elf64-ppc.c (ppc64_elf_size_stubs): Correct advance to
2227 2017-07-19 Szabolcs Nagy <szabolcs.nagy@arm.com>
2230 * elfnn-aarch64.c (elfNN_aarch64_reloc_type_class): Return
2231 reloc_class_ifunc for ifunc symbols.
2233 2017-07-19 Nick Clifton <nickc@redhat.com>
2236 * archive.c (bfd_generic_archive_p): If the bfd does not have the
2237 correct magic bytes at the start, set the error to wrong format
2238 and clear the format selector before returning NULL.
2240 2017-07-19 Nick Clifton <nickc@redhat.com>
2243 * coff-rs6000.c (_bfd_strntol): New function.
2244 (_bfd_strntoll): New function.
2245 (GET_VALUE_IN_FIELD): New macro.
2246 (EQ_VALUE_IN_FIELD): new macro.
2247 (_bfd_xcoff_slurp_armap): Use new macros.
2248 (_bfd_xcoff_archive_p): Likewise.
2249 (_bfd_xcoff_read_ar_hdr): Likewise.
2250 (_bfd_xcoff_openr_next_archived_file): Likewise.
2251 (_bfd_xcoff_stat_arch_elt): Likewise.
2252 * coff64-rs6000.c (_bfd_strntol): New function.
2253 (_bfd_strntoll): New function.
2254 (GET_VALUE_IN_FIELD): New macro.
2255 (xcoff64_slurp_armap): Use new macros.
2257 2017-07-19 Claudiu Zissulescu <claziss@synopsys.com>
2258 John Eric Martin <John.Martin@emmicro-us.com>
2260 * bfd-in2.h: Regenerate.
2261 * libbfd.h: Regenerate.
2262 * elf32-arc.c (JLI): Define.
2263 * reloc.c: Add JLI relocations.
2265 2017-07-18 Nick Clifton <nickc@redhat.com>
2268 * coff-sh.c: Fix spelling typos.
2269 * compress.c: Likewise.
2270 * cpu-pdp11.c: Likewise.
2271 * ecofflink.c: Likewise.
2272 * elf-m10300.c: Likewise.
2274 * elf32-arm.c: Likewise.
2275 * elf32-m68k.c: Likewise.
2276 * elf32-nds32.c: Likewise.
2277 * elf32-ppc.c: Likewise.
2278 * elf32-sh.c: Likewise.
2279 * elf32-v850.c: Likewise.
2280 * elf64-ppc.c: Likewise.
2281 * elf64-x86-64.c: Likewise.
2282 * elflink.c: Likewise.
2283 * elfnn-aarch64.c: Likewise.
2284 * elfxx-mips.c: Likewise.
2286 * sunos.c: Likewise.
2287 * vms-alpha.c: Likewise.
2288 * xcofflink.c: Likewise.
2290 2017-07-18 Nick Clifton <nickc@redhat.com>
2293 * coffcode.h (handle_COMDAT): Replace abort with an error message
2296 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
2299 * elf64-x86-64.c (elf_x86_64_relocate_section): Limit PIC check
2302 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
2304 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
2306 2017-07-16 Alan Modra <amodra@gmail.com>
2308 * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimize
2309 __tls_index GOT entries when using __tls_get_addr_opt stub.
2310 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2312 2017-07-12 Alan Modra <amodra@gmail.com>
2314 * po/es.po: Update from translationproject.org/latest/bfd/.
2315 * po/fi.po: Likewise.
2316 * po/fr.po: Likewise.
2317 * po/id.po: Likewise.
2318 * po/ja.po: Likewise.
2319 * po/ro.po: Likewise.
2320 * po/ru.po: Likewise.
2321 * po/sr.po: Likewise.
2322 * po/sv.po: Likewise.
2323 * po/tr.po: Likewise.
2324 * po/uk.po: Likewise.
2325 * po/vi.po: Likewise.
2326 * po/zh_CN.po: Likewise.
2327 * po/hr.po: New file from translationproject.org.
2328 * configure.ac (ALL_LINGUAS): Add hr. Sort.
2329 * configure: Regenerate.
2331 2017-07-12 Nick Clifton <nickc@redhat.com>
2333 Fix compile time warnings using gcc 7.1.1.
2334 * elf32-xtensa.c (elf_xtensa_get_plt_section): Increase length of
2336 (elf_xtensa_get_gotplt_section): Increase length of got_name
2338 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add a
2339 default return of FALSE.
2340 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc): Add a
2341 default return of FALSE.
2343 2017-07-12 Alan Modra <amodra@gmail.com>
2345 * binary.c (binary_set_section_contents): Don't print filepos in
2347 (coff_write_object_contents): Cast size_t for error message.
2348 (coff_slurp_line_table): Don't use bfd_vma symndx.
2349 (coff_slurp_reloc_table): Remove unneeded cast.
2350 * dwarf2.c (read_section): Cast bfd_int64_t to long long for
2352 (find_abstract_instance_name): Likewise.
2353 * elf32-arm.c (arm_type_of_stub): Correct error arg order.
2354 (bfd_elf32_arm_stm32l4xx_erratum_scan): Don't cast error arg.
2355 (elf32_arm_check_relocs): Make r_symndx an int.
2356 * elf32-cris.c (cris_elf_check_relocs): Delete extraneous %s in
2358 * elf32-metag.c (elf_metag_relocate_section): Delete extra error
2360 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Rewrite bogus
2362 * elf32-i386.c (elf_i386_check_relocs): Make r_symndx an int.
2363 * elf32-s390.c (elf_s390_check_relocs): Likewise.
2364 * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
2365 * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
2366 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
2367 * elf64-s390.c (elf_s390_check_relocs): Likewise.
2368 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
2369 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Likewise.
2370 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
2371 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
2372 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
2373 * elf64-mmix.c (_bfd_mmix_after_linker_allocation): Cast size_t args
2374 and use %lu for error message.
2375 * elflink.c (elf_link_adjust_relocs): Delete extra error message arg.
2376 * mmo.c (mmo_scan): Make stab_loc a file_ptr. Cast expression for
2379 * elf32-arm.c (elf32_arm_tls_relax): Correct format string and args
2381 (elf32_arm_final_link_relocate): Likewise.
2382 * coff-arm.c (bfd_arm_process_before_allocation): Likewise.
2383 * coffcode.h (styp_to_sec_flags): Likewise.
2384 * cofflink.c (_bfd_coff_write_global_sym): Likewise.
2385 * ecoff.c (_bfd_ecoff_slurp_symbol_table): Likewise.
2386 * elf32-arc.c (arc_elf_merge_private_bfd_data): Likewise.
2387 * elf32-bfin.c (bfinfdpic_check_relocs): Likewise.
2388 (elf32_bfin_merge_private_bfd_data): Likewise.
2389 * elf32-cris.c (cris_elf_relocate_section): Likewise.
2390 * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
2391 * elf32-i370.c (i370_elf_merge_private_bfd_data): Likewise.
2392 (i370_elf_relocate_section): Likewise.
2393 * elf32-iq2000.c (iq2000_elf_merge_private_bfd_data): Likewise.
2394 * elf32-m32c.c (m32c_elf_merge_private_bfd_data): Likewise.
2395 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise.
2396 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
2397 * elf32-mep.c (mep_elf_merge_private_bfd_data): Likewise.
2398 * elf32-mt.c (mt_elf_merge_private_bfd_data): Likewise.
2399 * elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.
2400 * elfxx-mips.c (mips_elf_merge_obj_e_flags): Likewise.
2401 (_bfd_mips_elf_merge_private_bfd_data): Likewise.
2402 * ieee.c (ieee_write_id, read_id): Likewise.
2403 * mach-o.c (bfd_mach_o_write_contents): Likewise.
2404 (bfd_mach_o_layout_commands, bfd_mach_o_read_section_32): Likewise.
2405 (bfd_mach_o_read_section_64, bfd_mach_o_read_symtab_symbol): Likewise.
2406 (bfd_mach_o_read_command, bfd_mach_o_header_p): Likewise.
2407 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Likewise.
2408 * stabs.c (_bfd_link_section_stabs): Likewise.
2410 * coff-arm.c (coff_arm_relocate_section): Use L modifier in error
2412 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
2413 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
2414 * coff-rs6000.c (xcoff_reloc_type_toc): Likewise.
2415 * coff-sh.c (sh_relax_section): Likewise.
2416 (sh_relax_delete_bytes, sh_swap_insns): Likewise.
2417 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
2418 * coffcode.h (coff_slurp_reloc_table): Likewise.
2419 * coffgen.c (_bfd_coff_get_external_symbols): Likewise.
2420 (_bfd_coff_read_string_table): Likewise.
2421 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
2422 * compress.c (bfd_get_full_section_contents): Likewise.
2423 * dwarf2.c (read_formatted_entries, decode_line_info): Likewise.
2424 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
2425 * elf.c (bfd_elf_string_from_elf_section): Likewise.
2426 * elf32-arc.c (arc_special_overflow_checks): Likewise.
2427 * elf32-arm.c (elf32_arm_tls_relax): Likewise.
2428 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Likewise.
2429 (elf32_arm_write_section): Likewise.
2430 * elf32-bfin.c (bfin_relocate_section): Likewise.
2431 (bfinfdpic_relocate_section): Likewise.
2432 * elf32-hppa.c (hppa_build_one_stub): Likewise.
2433 (final_link_relocate, elf32_hppa_relocate_section): Likewise.
2434 * elf32-i386.c (elf_i386_tls_transition): Likewise.
2435 (elf_i386_relocate_section): Likewise.
2436 * elf32-ip2k.c (ip2k_final_link_relocate): Likewise.
2437 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise.
2438 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
2439 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
2440 * elf32-metag.c (elf_metag_relocate_section): Likewise.
2441 * elf32-nds32.c (unrecognized_reloc_msg): Likewise.
2442 (nds32_elf_relax_longcall1, nds32_elf_relax_longcall2): Likewise.
2443 (nds32_elf_relax_longcall3, nds32_elf_relax_longjump1): Likewise.
2444 (nds32_elf_relax_longjump2, nds32_elf_relax_longjump3): Likewise.
2445 (nds32_elf_relax_longcall4, nds32_elf_relax_longcall5): Likewise.
2446 (nds32_elf_relax_longcall6, nds32_elf_relax_longjump4): Likewise.
2447 (nds32_elf_relax_longjump5, nds32_elf_relax_longjump6): Likewise.
2448 (nds32_elf_relax_longjump7, nds32_elf_relax_loadstore): Likewise.
2449 (nds32_elf_relax_ptr, nds32_elf_ex9_build_hash_table): Likewise.
2450 * elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
2451 * elf32-rx.c (UNSAFE_FOR_PID): Likewise.
2452 * elf32-s390.c (invalid_tls_insn, elf_s390_relocate_section): Likewise.
2453 * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
2454 * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
2455 * elf32-sh.c (sh_elf_relax_section): Likewise.
2456 (sh_elf_relax_delete_bytes, sh_elf_swap_insns): Likewise.
2457 (sh_elf_relocate_section): Likewise.
2458 * elf32-sh64.c (shmedia_prepare_reloc): Likewise.
2459 * elf32-spu.c (spu_elf_relocate_section): Likewise.
2460 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
2461 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
2462 * elf32-v850.c (v850_elf_relax_section): Likewise.
2463 * elf32-vax.c (elf_vax_check_relocs): Likewise.
2464 (elf_vax_relocate_section): Likewise.
2465 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
2466 (extend_ebb_bounds_forward, extend_ebb_bounds_backward): Likewise.
2467 (compute_text_actions, compute_ebb_proposed_actions): Likewise.
2468 (do_fix_for_relocatable_link): Likewise.
2469 * elf64-alpha.c (elf64_alpha_relax_got_load): Likewise.
2470 (elf64_alpha_relax_with_lituse): Likewise.
2471 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Likewise.
2472 (elf_hppa_final_link_relocate): Likewise.
2473 * elf64-ia64-vms.c (elf64_ia64_relax_section): Likewise.
2474 (elf64_ia64_choose_gp, elf64_ia64_relocate_section): Likewise.
2475 (elf64_vms_link_add_object_symbols): Likewise.
2476 * elf64-mmix.c (mmix_elf_perform_relocation): Likewise.
2477 (mmix_final_link_relocate): Likewise.
2478 * elf64-s390.c (invalid_tls_insn): Likewise.
2479 (elf_s390_relocate_section): Likewise.
2480 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
2481 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
2482 (elf_x86_64_relocate_section): Likewise.
2483 * elfcode.h (elf_slurp_symbol_table): Likewise.
2484 * elfcore.h (elf_core_file_p): Likewise.
2485 * elflink.c (elf_link_read_relocs_from_section): Likewise.
2486 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
2487 (elfNN_aarch64_relocate_section): Likewise.
2488 * elfnn-ia64.c (elfNN_ia64_relax_section): Likewise.
2489 (elfNN_ia64_choose_gp, elfNN_ia64_relocate_section): Likewise.
2490 * elfnn-riscv.c (riscv_elf_relocate_section): Likewise.
2491 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
2492 (_bfd_mips_elf_relocate_section): Likewise.
2493 (_bfd_mips_elf_finish_dynamic_symbol, mips_finish_exec_plt): Likewise.
2494 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
2495 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
2496 * ieee.c (ieee_slurp_external_symbols): Likewise.
2497 * ihex.c (ihex_write_object_content): Likewise.
2498 * mach-o.c (bfd_mach_o_build_exec_seg_command): Likewise.
2499 * merge.c (_bfd_merged_section_offset): Likewise.
2500 * mmo.c (mmo_write_loc_chunk): Likewise.
2501 (mmo_write_object_contents): Likewise.
2502 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Likewise.
2503 * stabs.c (_bfd_link_section_stabs): Likewise.
2504 * xcofflink.c (xcoff_link_add_symbols, xcoff_find_tc0): Likewise.
2506 2017-07-11 Alan Modra <amodra@gmail.com>
2508 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo.
2510 2017-07-11 Alan Modra <amodra@gmail.com>
2512 * elf32-ppc.c (ppc_elf_relocate_section): Emit "unexpected
2513 instruction" error using _bfd_error_handler, not einfo.
2515 2017-07-10 Nick Clifton <nickc@redhat.com>
2517 * coffcode.h (coff_slurp_symbol_table): Do not include an entry
2518 for C_AIX_WEAKEXT if it has the same value as C_WEAKEXT.
2520 2017-07-07 John Baldwin <jhb@FreeBSD.org>
2522 * elf.c (elfcore_grok_freebsd_note): Handle NT_FREEBSD_PTLWPINFO.
2524 2017-07-07 Alan Modra <amodra@gmail.com>
2526 * coffcode.h (coff_slurp_symbol_table): Handle C_AIX_WEAKEXT.
2528 2017-07-07 Alan Modra <amodra@gmail.com>
2530 * bfd.c (_doprnt): Replace "L" with "ll" when printing bfd_vma
2531 as long long. Move code replacing "ll" with "I64", and simplify.
2533 2017-07-06 H.J. Lu <hongjiu.lu@intel.com>
2535 * bfd.c (_doprnt): Convert 'L' to 'l' when setting wide_width
2538 2017-07-05 H.J. Lu <hongjiu.lu@intel.com>
2540 * dwarf2.c (line_info_add_include_dir_stub): Replace time with
2542 (line_info_add_file_name): Likewise.
2543 (decode_line_info): Likewise.
2545 2017-07-04 Tristan Gingold <gingold@adacore.com>
2547 * version.m4: Bump version to 2.29.51
2548 * configure: Regenerate.
2550 2017-07-04 Jiong Wang <jiong.wang@arm.com>
2552 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Remove the
2553 sanity check at the head of this function.
2555 2017-07-04 Jan Kratochvil <jan.kratochvil@redhat.com>
2557 * dwarf2.c (struct dwarf2_debug): Add fields dwarf_line_str_buffer and
2558 dwarf_line_str_size.
2559 (struct attr_abbrev): Add field implicit_const.
2560 (dwarf_debug_sections): Add .debug_line_str.
2561 (enum dwarf_debug_section_enum): Add debug_line_str and debug_max.
2562 (dwarf_debug_section_assert): Add static assertion.
2563 (read_indirect_line_string): New.
2564 (read_abbrevs): Support DW_FORM_implicit_const.
2565 (is_str_attr): Support DW_FORM_line_strp.
2566 (read_attribute_value): Support DW_FORM_line_strp and
2567 DW_FORM_implicit_const.
2568 (read_attribute): Support DW_FORM_implicit_const.
2569 (line_info_add_include_dir, line_info_add_include_dir_stub):
2570 (line_info_add_file_name, read_formatted_entries): New.
2571 (decode_line_info, parse_comp_unit): Support DWARF 5.
2572 (_bfd_dwarf2_cleanup_debug_info): Free dwarf_line_str_buffer.
2574 2017-07-03 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
2576 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove the
2577 abort statement that was put for symbols that are not dynamic.
2579 2017-07-03 Tristan Gingold <gingold@adacore.com>
2581 * po/bfd.pot: Regenerate
2583 2017-07-03 Alan Modra <amodra@gmail.com>
2585 * bfd.c (_doprnt): Rewrite "ll" and "L" modifiers to "I64" for
2586 __MSVCRT__. Support "L" modifier for bfd_vma. Formatting.
2587 * elf.c (setup_group): Use "Lx" to print sh_size.
2588 (_bfd_elf_setup_sections): Remove unnecessary cast and print
2589 unknown section type in hex.
2590 (copy_special_section_fields): Style fix.
2591 (bfd_section_from_shdr): Correct format for sh_link. Use a
2592 common error message for all the variants of unrecognized
2594 (assign_file_positions_for_load_sections): Use "Lx" for lma
2595 adjust error message.
2596 (assign_file_positions_for_non_load_sections): Formatting.
2597 (rewrite_elf_program_header): Formatting. Use "Lx" for
2598 bfd_vma values in error messages.
2599 * elfcode.h (elf_slurp_reloc_table_from_section): Cast
2600 ELF_R_SYM value to type expected by format.
2601 * elflink.c (elf_link_read_relocs_from_section): Use "Lx"
2603 (elf_link_add_object_symbols): Use "Lu" for symbol sizes.
2604 (elf_link_input_bfd): Use "Lx" for r_info.
2605 (bfd_elf_gc_record_vtinherit): Use "Lx" for offset.
2607 2017-07-03 Alan Modra <amodra@gmail.com>
2609 * bfd.c (bfd_scan_vma): Don't use long long unless HAVE_LONG_LONG.
2610 * coff-rs6000.c (FMT20): Handle hosts with 64-bit long and
2611 Microsoft C library variant of long long format specifier.
2612 (PRINT20): Cast value to bfd_uint64_t not long long.
2613 * coffcode.h (coff_print_aux): Use BFD_VMA_FMT.
2614 * coff-x86_64.c (coff_amd64_reloc): Use bfd_uint64_t rather than
2615 long long. Don't cast to bfd_vma.
2616 * elf32-score.c (score3_bfd_getl48): Likewise.
2617 * vms-alpha.c (_bfd_vms_slurp_eisd): Likewise.
2619 2017-07-03 Alan Modra <amodra@gmail.com>
2621 * elf.c (_bfd_elf_print_private_bfd_data): Use BFD_VMA_FMT to
2623 (bfd_elf_print_symbol): Don't cast symbol->flags.
2624 (_bfd_elf_symbol_from_bfd_symbol): Likewise.
2625 * elf32-ppc.c (ppc_elf_begin_write_processing): Correct
2626 _bfd_error_handler argument order.
2627 (ppc_elf_merge_private_bfd_data): Don't cast flags.
2629 2017-07-03 Alan Modra <amodra@gmail.com>
2631 * configure.ac: Invoke AC_CHECK_TYPES for long long. Invoke
2632 AC_TYPE_LONG_DOUBLE.
2633 * configure: Regenerate.
2634 * config.in: Regenerate.
2636 2017-06-29 Andrew Waterman <andrew@sifive.com>
2638 * elfnn-riscv.c (riscv_elf_adjust_dynamic_symbol): Fix TLS copy
2641 2017-06-29 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
2643 * elfxx-sparc.c (allocate_dynrelocs): Don't make a symbol dynamic
2644 unless it is undefined weak.
2645 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Set the flag
2646 relative_reloc to direct non-dynamic symbols to R_SPARC_RELATIVE
2648 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): If symbol
2649 is not dynamic in PIC, abort.
2651 2017-06-29 Jiong Wang <jiong.wang@arm.com>
2654 * elfnn-aarch64.c (elfNN_aarch64_allocate_dynrelocs): Only make
2655 undefined weak symbols into dynamic.
2656 (elfNN_aarch64_final_link_relocate): Generate runtime RELATIVE
2657 relocation for non-dynamic symbols.
2658 (elfNN_aarch64_finish_dynamic_symbol): Add sanity check.
2660 2017-06-29 Jiong Wang <jiong.wang@arm.com>
2662 * elfnn-aarch64.c (aarch64_relocation_aginst_gp_p): New function.
2663 (elfNN_aarch64_final_link_relocate): Delete duplicated code for
2664 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15, BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC,
2665 BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
2666 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Optimize the
2669 2017-06-29 Andreas Arnez <arnez@linux.vnet.ibm.com>
2671 * elf-bfd.h (elfcore_write_s390_gs_cb): Add prototype.
2672 (elfcore_write_s390_gs_bc): Likewise.
2673 * elf.c (elfcore_grok_s390_gs_cb): New function.
2674 (elfcore_grok_s390_gs_bc): New function.
2675 (elfcore_grok_note): Call them.
2676 (elfcore_write_s390_gs_cb): New function.
2677 (elfcore_write_s390_gs_bc): New function.
2678 (elfcore_write_register_note): Call them.
2680 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
2682 * libbfd.c (_bfd_generic_get_section_contents): Don't call
2683 bfd_get_file_size. Check archive element size.
2684 (_bfd_generic_get_section_contents_in_window): Likewise.
2686 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
2688 * bfd-in2.h: Regenerated.
2689 * bfdio.c (bfd_get_size): Change return type to ufile_ptr.
2690 (bfd_get_file_size): Likewise.
2692 2017-06-28 Maciej W. Rozycki <macro@imgtec.com>
2693 Matthew Fortune <matthew.fortune@imgtec.com>
2695 * archures.c (bfd_mach_mips_interaptiv_mr2): New macro.
2696 * cpu-mips.c (I_interaptiv_mr2): New enum value.
2697 (arch_info_struct): Add "mips:interaptiv-mr2" entry.
2698 * elfxx-mips.c (_bfd_elf_mips_mach) <E_MIPS_MACH_IAMR2>: New
2700 (mips_set_isa_flags) <bfd_mach_mips_interaptiv_mr2>: Likewise.
2701 (bfd_mips_isa_ext) <bfd_mach_mips_interaptiv_mr2>: Likewise.
2702 (print_mips_isa_ext) <AFL_EXT_INTERAPTIV_MR2>: Likewise.
2703 (mips_mach_extensions): Add `bfd_mach_mipsisa32r3' and
2704 `bfd_mach_mips_interaptiv_mr2' entries.
2705 * bfd-in2.h: Regenerate.
2707 2017-06-27 Nick Clifton <nickc@redhat.com>
2709 * tekhex.c (pass_over): Revert accidental conversion of a local
2710 array to a static array.
2712 2017-06-27 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
2715 * elf32-avr.c (elf32_avr_adjust_diff_reloc_value): Adjust
2716 reloc addend if necessary. Adjust diff only if
2717 shrinked_insn_address < end_address.
2719 2017-06-27 Alan Modra <amodra@gmail.com>
2722 * libbfd.c (_bfd_generic_get_section_contents): Warning fix.
2723 (_bfd_generic_get_section_contents_in_window): Likewise.
2725 2017-06-26 Kuan-Lin Chen <rufus@andestech.com>
2727 * elfnn-riscv.c (perform_relocation): Support the new
2728 R_RISCV_32_PCREL relocation.
2729 (riscv_elf_relocate_section): Likewise.
2730 * elfxx-riscv.c (howto_table): Likewise.
2731 (riscv_reloc_map): Likewise.
2732 * bfd-in2.h (BFD_RELOC_RISCV_32_PCREL): New relocation.
2733 * libbfd.h: Regenerate.
2735 2017-06-27 Alan Modra <amodra@gmail.com>
2738 * libbfd.c (_bfd_generic_get_section_contents): Delete abort.
2739 Use unsigned file pointer type, and remove cast.
2740 * libbfd.c (_bfd_generic_get_section_contents_in_window): Likewise.
2741 Add "count", not "sz".
2743 2017-06-26 Pedro Alves <palves@redhat.com>
2746 * libbfd.c (_bfd_generic_get_section_contents): Add "count", not
2749 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
2752 * libbfd.c (_bfd_generic_get_section_contents_in_window): Add
2755 2017-06-26 Maciej W. Rozycki <macro@imgtec.com>
2757 * cpu-mips.c (arch_info_struct): Mark the 4010 32-bit.
2758 * elfxx-mips.c (mips_set_isa_flags) <bfd_mach_mips4010>: Set
2759 E_MIPS_ARCH_2 rather than E_MIPS_ARCH_3 in `e_flags'.
2760 (mips_mach_extensions): Mark `bfd_mach_mips4010' as extending
2761 `bfd_mach_mips6000' rather than `bfd_mach_mips4000'.
2763 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
2766 * compress.c (bfd_get_full_section_contents): Don't check the
2768 * libbfd.c (_bfd_generic_get_section_contents): Check for and
2769 reject a section whose size + offset is greater than the size
2771 (_bfd_generic_get_section_contents_in_window): Likewise.
2773 2017-06-26 Nick Clifton <nickc@redhat.com>
2776 * tekhex.c (getvalue): Check for the source pointer exceeding the
2777 end pointer before the first byte is read.
2779 2017-06-26 Nick Clifton <nickc@redhat.com>
2782 * opncls.c (get_build_id): Check that the section is big enough
2783 to contain the whole note.
2784 * compress.c (bfd_get_full_section_contents): Check for and reject
2785 a section whose size is greater than the size of the entire file.
2786 * elf32-v850.c (v850_elf_copy_notes): Allow for the ouput to not
2787 contain a notes section.
2789 2017-06-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2791 * elf64-s390.c (elf_s390_additional_program_headers): Add NULL
2793 (elf_s390_modify_segment_map): Likewise.
2794 (bfd_elf_s390_set_options): Lisewise.
2796 2017-06-26 Alan Modra <amodra@gmail.com>
2798 * elflink.c (_bfd_elf_link_create_dynstrtab): Don't make dynobj
2800 (_bfd_elf_size_group_sections): Skip --just-syms bfds.
2801 (bfd_elf_size_dynamic_sections): Ignore .note.GNU-stack and
2802 .preinit_array on --just-syms bfds.
2803 (_bfd_elf_gc_mark_extra_sections): Skip --just-syms bfds.
2804 (elf_gc_sweep, bfd_elf_parse_eh_frame_entries): Likewise.
2805 (bfd_elf_gc_sections, bfd_elf_discard_info): Likewise.
2807 2017-06-25 Sergei Trofimovich <slyfox@gentoo.org>
2809 * elf.c (find_link): Bounds check "hint".
2811 2017-06-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
2813 * elf32-arm.c (using_thumb_only): Update list of architectures in
2814 BFD_ASSERT for which the logic is valid.
2815 (using_thumb2_bl): Likewise.
2816 (using_thumb2): Likewise and return true for ARMv8-R.
2817 (arch_has_arm_nop): Likewise.
2818 (tag_cpu_arch_combine): New v8r table for ARMv8-R Tag_CPU_arch
2819 merging logic. Update commentis for value 15 of v8m_baseline,
2820 v8m_mainline and v4t_plus_v6_m arrays. Use v8r array to decide
2821 merging of value 15 of Tag_CPU_arch.
2823 2017-06-23 Jiong Wang <jiong.wang@arm.com>
2825 * reloc.c (BFD_RELOC_AARCH64_ADR_GOTPAGE): Rename to
2826 BFD_RELOC_AARCH64_ADR_GOT_PAGE
2827 * bfd-in2.h: Regenerate.
2829 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2831 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Move
2832 the error_alignment label forward. Properly align program
2833 property note section.
2835 2017-06-22 Eric Christopher <echristo@gmail.com>
2837 * elf32-arm.c (elf32_arm_final_link_relocate): Use labs rather than
2838 abs to fix a truncation warning.
2840 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2842 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Resolve
2843 local undefined weak symbol to 0.
2844 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Likewise.
2846 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2848 * elf32-i386.c (elf_i386_merge_gnu_properties): If info->shstk
2849 is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
2850 (elf_i386_link_setup_gnu_properties): If info->shstk is set,
2851 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
2852 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): If
2853 info->shstk is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
2854 (elf_x86_64_link_setup_gnu_properties): If info->shstk is set,
2855 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
2857 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2859 * elf32-i386.c (elf_i386_lazy_ibt_plt0_entry): New.
2860 (elf_i386_lazy_ibt_plt_entry): Likewise.
2861 (elf_i386_pic_lazy_ibt_plt0_entry): Likewise.
2862 (elf_i386_non_lazy_ibt_plt_entry): Likewise.
2863 (elf_i386_pic_non_lazy_ibt_plt_entry): Likewise.
2864 (elf_i386_eh_frame_lazy_ibt_plt): Likewise.
2865 (elf_i386_lazy_plt_layout): Likewise.
2866 (elf_i386_non_lazy_plt_layout): Likewise.
2867 (elf_i386_link_hash_entry): Add plt_second.
2868 (elf_i386_link_hash_table): Add plt_second and
2869 plt_second_eh_frame.
2870 (elf_i386_allocate_dynrelocs): Use the second PLT if needed.
2871 (elf_i386_size_dynamic_sections): Use .plt.got unwind info for
2872 the second PLT. Check the second PLT.
2873 (elf_i386_relocate_section): Use the second PLT to resolve
2874 PLT reference if needed.
2875 (elf_i386_finish_dynamic_symbol): Fill and use the second PLT if
2877 (elf_i386_finish_dynamic_sections): Set sh_entsize on the
2878 second PLT. Generate unwind info for the second PLT.
2879 (elf_i386_plt_type): Add plt_second.
2880 (elf_i386_get_synthetic_symtab): Support the second PLT.
2881 (elf_i386_parse_gnu_properties): Support
2882 GNU_PROPERTY_X86_FEATURE_1_AND.
2883 (elf_i386_merge_gnu_properties): Support
2884 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
2885 on GNU_PROPERTY_X86_FEATURE_1_IBT
2886 (elf_i386_link_setup_gnu_properties): If info->ibt is set,
2887 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
2888 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
2889 is set on all relocatable inputs.
2890 * elf64-x86-64.c (elf_x86_64_lazy_ibt_plt_entry): New.
2891 (elf_x32_lazy_ibt_plt_entry): Likewise.
2892 (elf_x86_64_non_lazy_ibt_plt_entry): Likewise.
2893 (elf_x32_non_lazy_ibt_plt_entry): Likewise.
2894 (elf_x86_64_eh_frame_lazy_ibt_plt): Likewise.
2895 (elf_x32_eh_frame_lazy_ibt_plt): Likewise.
2896 (elf_x86_64_lazy_ibt_plt): Likewise.
2897 (elf_x32_lazy_ibt_plt): Likewise.
2898 (elf_x86_64_non_lazy_ibt_plt): Likewise.
2899 (elf_x32_non_lazy_ibt_plt): Likewise.
2900 (elf_x86_64_get_synthetic_symtab): Support the second PLT.
2901 (elf_x86_64_parse_gnu_properties): Support
2902 GNU_PROPERTY_X86_FEATURE_1_AND.
2903 (elf_x86_64_merge_gnu_properties): Support
2904 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
2905 on GNU_PROPERTY_X86_FEATURE_1_IBT
2906 (elf_x86_64_link_setup_gnu_properties): If info->ibt is set,
2907 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
2908 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
2909 is set on all relocatable inputs.
2911 2017-06-22 Nick Clifton <nickc@redhat.com>
2914 * som.c (setup_sections): NUL terminate the space_strings buffer.
2915 Check that the space.name field does not index beyond the end of
2916 the space_strings buffer.
2918 2017-06-21 Nick Clifton <nickc@redhat.com>
2921 * coff-sh.c (sh_reloc): Check for an out of range reloc.
2923 2017-06-21 Nick Clifton <nickc@redhat.com>
2926 * vms-misc.c (_bfd_vms_save_sized_string): Use unsigned int as
2927 type of the size parameter.
2928 (_bfd_vms_save_counted_string): Add second parameter - the maximum
2929 length of the counted string.
2930 * vms.h (_bfd_vms_save_sized_string): Update prototype.
2931 (_bfd_vms_save_counted_string): Likewise.
2932 * vms-alpha.c (_bfd_vms_slurp_eisd): Update calls to
2933 _bfd_vms_save_counted_string.
2934 (_bfd_vms_slurp_ehdr): Likewise.
2935 (_bfd_vms_slurp_egsd): Likewise.
2936 (Parse_module): Likewise.
2938 2017-06-21 Alan Modra <amodra@gmail.com>
2940 * elf64-ppc.c (ppc64_elf_size_stubs): Test for localentry:0 plt
2941 calls before tocsave calls.
2942 (ppc64_elf_relocate_section): Allow localentry:0 plt calls without
2945 2017-06-21 Nick Clifton <nickc@redhat.com>
2948 * reloc.c (bfd_generic_get_relocated_section_contents): Fail if
2949 bfd_get_full_section_contents returns no contents.
2951 2017-06-21 Nick Clifton <nickc@redhat.com>
2954 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an undersized
2957 2017-06-21 Nick Clifton <nickc@redhat.com>
2960 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an empty section
2962 (image_set_ptr): Likewise.
2963 (alpha_vms_fix_sec_rel): Likewise.
2964 (alpha_vms_slurp_relocs): Likewise.
2966 2017-06-21 Nick Clifton <nickc@redhat.com>
2969 * ieee.c (ieee_slurp_sections): Check for a NULL return from
2971 (ieee_archive_p): Likewise.
2972 (ieee_object_p): Likewise.
2974 2017-06-21 Nick Clifton <nickc@redhat.com>
2977 * elf.c (setup_group): Zero the group section pointer list after
2978 allocation so that loops can be caught. Check for NULL pointers
2979 when processing a group list.
2981 2017-06-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2983 * elf-s390.h: New file.
2984 * elf64-s390.c (struct elf_s390_link_hash_table): Add params
2986 (elf_s390_additional_program_headers): New function.
2987 (elf_s390_modify_segment_map): New function.
2988 (bfd_elf_s390_set_options): New function.
2989 (elf_backend_additional_program_headers)
2990 (elf_backend_modify_segment_map): Add macro definitions.
2992 2017-06-19 H.J. Lu <hongjiu.lu@intel.com>
2995 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Check
2996 the DYNAMIC bit instead of bfd_count_sections.
2998 2017-06-19 Nick Clifton <nickc@redhat.com>
3001 * vms-alpha.c (evax_bfd_print_emh): Check for insufficient record
3003 (evax_bfd_print_eeom): Likewise.
3004 (evax_bfd_print_egsd): Check for an overlarge record length.
3005 (evax_bfd_print_etir): Likewise.
3007 2017-06-19 Nick Clifton <nickc@redhat.com>
3010 * libieee.h (struct common_header_type): Add end_p field.
3011 * ieee.c (this_byte_and_next): Do not advance input_p beyond
3013 (read_id): Check for a length that exceeds the remaining bytes in
3015 (ieee_seek): Initialise end_p.
3016 (ieee_archive_p): Likewise.
3017 (ieee_object_p): Likewise.
3019 2017-06-19 Nick Clifton <nickc@redhat.com>
3022 * vms-alpha.c (_bfd_vms_slurp_eihs): Check for invalid offset
3023 before reading the EIHS structure entries.
3025 2017-06-19 Nick Clifton <nickc@redhat.com>
3028 * vms-alpha.c (_bfd_vms_slurp_egsd): Use unsigned int for
3029 gsd_size. Check that there are enough bytes remaining to read the
3030 type and size of the next egsd. Check that the size of the egsd
3031 does not exceed the size of the record.
3033 2017-06-19 Alan Modra <amodra@gmail.com>
3035 * config.bfd: Correct targ_underscore for cris.
3037 2017-06-18 Alan Modra <amodra@gmail.com>
3039 * config.bfd: Correct targ_underscore for epiphany, ip2k,
3040 m32c, mn10200, pru, rl78, rx, crisv32 and v850.
3042 2017-06-16 Nick Clifton <nickc@redhat.com>
3044 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Do not fail if the
3045 bucketlist is empty because there are no symbols to add to the
3048 2017-06-16 Alan Modra <amodra@gmail.com>
3054 * targets.c (struct bfd_target): Add _bfd_define_start_stop.
3055 (BFD_JUMP_TABLE_LINK): Likewise.
3056 * elf-bfd.h (bfd_elf_define_start_stop): Declare.
3057 * elflink.c (_bfd_elf_gc_mark_rsec): Update comment.
3058 (bfd_elf_define_start_stop): New function.
3059 * linker.c (bfd_generic_define_start_stop): New function.
3060 * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Init
3062 * aout-adobe.c (aout_32_bfd_define_start_stop): Define.
3063 * aout-target.h (MY_bfd_define_start_stop): Define.
3064 * aout-tic30.c (MY_bfd_define_start_stop): Define.
3065 * binary.c (binary_bfd_define_start_stop): Define.
3066 * bout.c (b_out_bfd_define_start_stop): Define.
3067 * coff-alpha.c (_bfd_ecoff_bfd_define_start_stop): Define.
3068 * coff-mips.c (_bfd_ecoff_bfd_define_start_stop): Define.
3069 * coff-rs6000.c (_bfd_xcoff_bfd_define_start_stop): Define.
3070 * coffcode.h (coff_bfd_define_start_stop): Define.
3071 * elfxx-target.h (bfd_elfNN_bfd_define_start_stop): Define.
3072 * i386msdos.c (msdos_bfd_define_start_stop): Define.
3073 * i386os9k.c (os9k_bfd_define_start_stop): Define.
3074 * ieee.c (ieee_bfd_define_start_stop): Define.
3075 * ihex.c (ihex_bfd_define_start_stop): Define.
3076 * libbfd-in.h (_bfd_nolink_bfd_define_start_stop): Define.
3077 * mach-o-target.c (bfd_mach_o_bfd_define_start_stop): Define.
3078 * mmo.c (mmo_bfd_define_start_stop): Define.
3079 * nlm-target.h (nlm_bfd_define_start_stop): Define.
3080 * oasys.c (oasys_bfd_define_start_stop): Define.
3081 * pef.c (bfd_pef_bfd_define_start_stop): Define.
3082 * plugin.c (bfd_plugin_bfd_define_start_stop): Define.
3083 * ppcboot.c (ppcboot_bfd_define_start_stop): Define.
3084 * som.c (som_bfd_define_start_stop): Define.
3085 * srec.c (srec_bfd_define_start_stop): Define.
3086 * tekhex.c (tekhex_bfd_define_start_stop): Define.
3087 * versados.c (versados_bfd_define_start_stop): Define.
3088 * vms-alpha.c (vms_bfd_define_start_stop): Define.
3089 (alpha_vms_bfd_define_start_stop): Define.
3090 * xsym.c (bfd_sym_bfd_define_start_stop): Define.
3091 * bfd-in2.h: Regenerate.
3092 * libbfd.h: Regenerate.
3094 2017-06-16 Jiong Wang <jiong.wang@arm.com>
3096 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use
3097 SYMBOL_REFERENCES_LOCAL.
3099 2017-06-15 Jiong Wang <jiong.wang@arm.com>
3102 * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
3103 (elfNN_aarch64_final_link_relocate): Also propagate relocations to
3104 runtime for if there needs copy relocation elimination.
3105 (need_copy_relocation_p): New function. Return true for symbol with
3106 pc-relative references and if it's against read-only sections.
3107 (elfNN_aarch64_adjust_dynamic_symbol): Use need_copy_relocation_p.
3108 (elfNN_aarch64_check_relocs): Allocate dynrelocs for relocation types
3109 that are related with accessing external objects.
3110 (elfNN_aarch64_gc_sweep_hook): Sync the relocation types with the change
3111 in elfNN_aarch64_check_relocs.
3113 2017-06-15 Nick Clifton <nickc@redhat.com>
3116 * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
3119 (ieee_archive_p): Likewise.
3121 2017-06-15 Nick Clifton <nickc@redhat.com>
3124 * vms-alpha.c (_bfd_vms_slurp_etir): Extend check of cmd_length.
3126 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
3128 * elf32-xtensa.c (elf_xtensa_be_plt_entry,
3129 elf_xtensa_le_plt_entry): Add dimension for the ABI to arrays,
3130 keep both windowed and call0 ABI PLT definitions.
3131 (elf_xtensa_create_plt_entry): Use selected ABI to choose upper
3132 elf_xtensa_*_plt_entry endex.
3133 (ELF_MAXPAGESIZE): Fix at minimal supported MMU page size.
3135 2017-06-14 Nick Clifton <nickc@redhat.com>
3138 * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid
3141 2017-06-14 Nick Clifton <nickc@redhat.com>
3144 * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the
3145 maximum value for the ascic pointer. Check that name processing
3146 does not read beyond this value.
3147 (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the
3150 2017-06-14 Nick Clifton <nickc@redhat.com>
3153 * versados.c (versados_mkobject): Zero the allocated tdata structure.
3154 (process_otr): Check for an invalid offset in the otr structure.
3156 2017-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
3158 * config.bfd (epiphany-*-elf): Accept epiphany-*-*.
3160 2017-06-13 H.J. Lu <hongjiu.lu@intel.com>
3166 * elf-bfd.h (elf_link_hash_entry): Add start_stop. Change the
3167 vtable field to a union.
3168 (_bfd_elf_is_start_stop): Removed.
3169 * elf32-i386.c (elf_i386_convert_load_reloc): Also check for
3170 __start_SECNAME and __stop_SECNAME symbols.
3171 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
3172 * elflink.c (_bfd_elf_is_start_stop): Removed.
3173 (_bfd_elf_gc_mark_rsec): Check start_stop instead of calling
3174 _bfd_elf_is_start_stop.
3175 (elf_gc_propagate_vtable_entries_used): Skip __start_SECNAME and
3176 __stop_SECNAME symbols. Updated.
3177 (elf_gc_smash_unused_vtentry_relocs): Likewise.
3178 (bfd_elf_gc_record_vtinherit): Likewise.
3179 (bfd_elf_gc_record_vtentry): Likewise.
3181 2017-06-13 Nick Clifton <nickc@redhat.com>
3184 * elflink.c (elf_link_adjust_relocs): Generate an error when
3185 encountering a reloc against a symbol removed by garbage
3188 2017-06-12 H.J. Lu <hongjiu.lu@intel.com>
3190 * elf-bfd.h (elf_backend_data): Add struct bfd_link_info *
3191 to merge_gnu_properties.
3192 * elf-properties.c (elf_merge_gnu_properties): Add struct
3193 bfd_link_info * and pass it to merge_gnu_properties.
3194 (elf_merge_gnu_property_list): Add struct bfd_link_info *
3195 and pass it to elf_merge_gnu_properties.
3196 (_bfd_elf_link_setup_gnu_properties): Pass info to
3197 elf_merge_gnu_property_list.
3198 * elf32-i386.c (elf_i386_merge_gnu_properties): Add struct
3200 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): Likewise.
3202 2017-06-11 Joe Zbiciak <joe.zbiciak@leftturnonly.info>
3205 * binary.c (binary_set_section_contents): Scale lma by octets
3206 per byte to set filepos.
3208 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3210 * elf32-arc.c (elf_arc_check_relocs): Fixed conditions to generate
3213 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3215 * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to
3218 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3220 * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to
3221 patched section contents for TLS IE reloc.
3222 * elf32-arc.c: Remove TCB_SIZE preprocessor macro.
3224 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3226 * elf32-arc.c (elf_arc_relocate_section): Added "call" to
3227 RELOC_FOR_GLOBAL_SYMBOL macro.
3229 2018-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3231 * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
3234 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3236 * config/tc-arc.c (md_undefined_symbol): Changed.
3237 * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed.
3239 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3241 * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
3244 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3246 * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
3247 warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
3249 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3251 * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
3254 2017-06-08 Richard Earnshaw <rearnsha@arm.com>
3256 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
3257 that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
3258 is non-zero. Add clarifying comments.
3260 2017-06-08 H.J. Lu <hongjiu.lu@intel.com>
3262 * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
3263 name. Use local IFUNC symbol name string to report unsupported
3264 non-PIC call to IFUNC function.
3265 (elf_i386_relocate_section): Dump local IFUNC name with minfo
3266 when generating R_386_IRELATIVE relocation.
3267 (elf_i386_finish_dynamic_symbol): Likewise.
3268 * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
3270 (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
3271 when generating R_X86_64_IRELATIVE relocation.
3272 (elf_x86_64_finish_dynamic_symbol): Likewise.
3274 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
3276 * elf.c (setup_group): Make sure BFD sections are created for all
3277 group sections in the input file when processing SHF_GROUP
3279 (bfd_section_from_shdr): Avoid duplicating logic already
3280 implemented in `setup_group'.
3282 2017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
3285 * peXXigen.c (pe_print_idata): Use the address of the first thunk
3286 if the hint address is zero.
3288 2017-06-06 James Clarke <jrtc27@jrtc27.com>
3291 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
3292 ELF_COMMON_DEF_P for common symbols.
3294 2017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
3296 * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
3297 SEC_GROUP sections as SEC_EXCLUDE.
3298 (bfd_elf_set_group_contents): Replace use of abort with an assert.
3299 (assign_section_numbers): Use resolve_section_groups flag instead
3300 of relocatable link type.
3301 (_bfd_elf_init_private_section_data): Use resolve_section_groups
3302 flag instead of checking the final_link flag for part of the
3303 checks in here. Fix white space as a result.
3304 * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
3305 instead of relocatable link type.
3306 (bfd_elf_final_link): Likewise.
3308 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
3310 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
3312 * elf32-score.c (score_elf_final_link_relocate): Likewise.
3313 (s3_bfd_score_elf_check_relocs): Likewise.
3314 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
3315 (score_elf_final_link_relocate): Likewise.
3316 (s7_bfd_score_elf_check_relocs): Likewise.
3318 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
3320 * elflink.c (init_reloc_cookie_rels): Remove unused variable
3323 2017-06-06 Maciej W. Rozycki <macro@imgtec.com>
3325 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
3326 from `reloc_count' rather than decrementing it.
3327 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
3328 `reloc_count' by `int_rels_per_ext_rel'.
3329 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
3330 `reloc_count' by `int_rels_per_ext_rel' for last relocation
3331 entry determination.
3332 (s3_bfd_score_elf_check_relocs): Likewise.
3333 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
3334 (s7_bfd_score_elf_relocate_section): Likewise.
3335 (s7_bfd_score_elf_check_relocs): Likewise.
3336 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
3337 prototype and function.
3338 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
3339 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
3340 triple rather than once the sum of REL and RELA relocation entry
3342 (bfd_elf64_get_reloc_upper_bound): Remove macro.
3343 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
3344 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
3345 storage allocation size determination.
3346 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
3347 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
3348 by `int_rels_per_ext_rel' for last relocation entry
3350 (bfd_elf_final_link): Do not multiply `reloc_count' by
3351 `int_rels_per_ext_rel' for internal relocation storage
3352 allocation size determination.
3353 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
3354 `int_rels_per_ext_rel' for last relocation entry determination.
3355 (elf_gc_smash_unused_vtentry_relocs): Likewise.
3356 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
3357 (_bfd_mips_elf_relocate_section): Likewise.
3359 2017-06-05 Alan Modra <amodra@gmail.com>
3362 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
3364 2017-06-01 John Baldwin <jhb@FreeBSD.org>
3366 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
3367 determine structure sizes.
3368 (elfcore_grok_freebsd_prstatus): Likewise.
3370 2017-06-01 Alan Modra <amodra@gmail.com>
3372 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
3373 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
3375 (is_elfv2_localentry0): New function.
3376 (ppc64_elf_tls_setup): Default params->plt_localentry0.
3377 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
3378 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
3379 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
3380 optimized localentry:0 stubs.
3381 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
3382 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
3384 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
3386 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
3388 2017-05-30 Casey Smith <clegg89@gmail.com>
3391 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
3392 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
3394 2017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
3396 * cpu-arc.c (arc_compatible): New function.
3398 2017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
3400 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
3402 2017-05-30 H.J. Lu <hongjiu.lu@intel.com>
3405 * bfdio.c (bfd_get_file_size): New function.
3406 * bfd-in2.h: Regenerated.
3408 2017-05-23 Dilian Palauzov <git-dpa@aegee.org>
3410 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
3413 2017-05-22 H.J. Lu <hongjiu.lu@intel.com>
3415 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
3416 dynobj instead of htab->elf.dynobj.
3418 2017-05-19 Maciej W. Rozycki <macro@imgtec.com>
3420 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
3422 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
3423 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
3424 actual number of internal relocations retrieved. Adjust
3425 function description.
3426 (bfd_elf64_canonicalize_reloc): Remove macro.
3427 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
3429 2017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
3431 * archures.c (bfd_mach_sparc_v9m8): Define.
3432 (bfd_mach_sparc_v8plusm8): Likewise.
3433 (bfd_mach_sparc_v9_p): Adjust to M8.
3434 (bfd_mach_sparc_64bit_p): Likewise.
3435 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
3436 bfd_mach_sparc_v8plusm8.
3437 * bfd-in2.h: Regenerated.
3438 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
3440 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
3441 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
3442 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
3444 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
3445 bfd_mach_sparc_v8plusm8.
3447 2017-05-19 Alan Modra <amodra@gmail.com>
3449 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
3450 debug and special sections when no non-note alloc sections in an
3453 2017-05-18 Alan Modra <amodra@gmail.com>
3455 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
3456 * elf-m10300.c: Likewise.
3458 * elf32-arc.c: Likewise.
3459 * elf32-bfin.c: Likewise.
3460 * elf32-m68k.c: Likewise.
3461 * elf32-nds32.c: Likewise.
3462 * elf32-tilepro.c: Likewise.
3463 * elflink.c: Likewise.
3464 * elfnn-aarch64.c: Likewise.
3465 * elfnn-riscv.c: Likewise.
3466 * elfxx-tilegx.c: Likewise.
3467 * mach-o.c: Likewise.
3468 * peXXigen.c: Likewise.
3469 * vms-alpha.c: Likewise.
3470 * vms-lib.c: Likewise.
3472 2017-05-17 H.J. Lu <hongjiu.lu@intel.com>
3475 * elflink.c (elf_gc_mark_debug_section): New function.
3476 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
3477 referenced by kept debug sections.
3479 2017-05-16 Alan Modra <amodra@gmail.com>
3481 * elf-m10300.c: Rename occurrences of non_ir_ref.
3482 * elf32-arm.c: Likewise.
3483 * elf32-bfin.c: Likewise.
3484 * elf32-cr16.c: Likewise.
3485 * elf32-cris.c: Likewise.
3486 * elf32-d10v.c: Likewise.
3487 * elf32-dlx.c: Likewise.
3488 * elf32-fr30.c: Likewise.
3489 * elf32-frv.c: Likewise.
3490 * elf32-hppa.c: Likewise.
3491 * elf32-i370.c: Likewise.
3492 * elf32-i386.c: Likewise.
3493 * elf32-iq2000.c: Likewise.
3494 * elf32-lm32.c: Likewise.
3495 * elf32-m32c.c: Likewise.
3496 * elf32-m32r.c: Likewise.
3497 * elf32-m68hc1x.c: Likewise.
3498 * elf32-m68k.c: Likewise.
3499 * elf32-mcore.c: Likewise.
3500 * elf32-metag.c: Likewise.
3501 * elf32-microblaze.c: Likewise.
3502 * elf32-moxie.c: Likewise.
3503 * elf32-msp430.c: Likewise.
3504 * elf32-mt.c: Likewise.
3505 * elf32-nios2.c: Likewise.
3506 * elf32-or1k.c: Likewise.
3507 * elf32-ppc.c: Likewise.
3508 * elf32-rl78.c: Likewise.
3509 * elf32-s390.c: Likewise.
3510 * elf32-score.c: Likewise.
3511 * elf32-score7.c: Likewise.
3512 * elf32-sh.c: Likewise.
3513 * elf32-tic6x.c: Likewise.
3514 * elf32-tilepro.c: Likewise.
3515 * elf32-v850.c: Likewise.
3516 * elf32-vax.c: Likewise.
3517 * elf32-xstormy16.c: Likewise.
3518 * elf32-xtensa.c: Likewise.
3519 * elf64-alpha.c: Likewise.
3520 * elf64-hppa.c: Likewise.
3521 * elf64-ia64-vms.c: Likewise.
3522 * elf64-mmix.c: Likewise.
3523 * elf64-ppc.c: Likewise.
3524 * elf64-s390.c: Likewise.
3525 * elf64-sh64.c: Likewise.
3526 * elf64-x86-64.c: Likewise.
3527 * elflink.c: Likewise.
3528 * elfnn-aarch64.c: Likewise.
3529 * elfnn-ia64.c: Likewise.
3530 * elfnn-riscv.c: Likewise.
3531 * elfxx-mips.c: Likewise.
3532 * elfxx-sparc.c: Likewise.
3533 * elfxx-tilegx.c: Likewise.
3534 * linker.c: Likewise.
3536 2017-05-16 Alan Modra <amodra@gmail.com>
3538 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
3539 * elflink.c (elf_link_add_object_symbols): Update to use
3541 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
3543 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
3545 2017-05-15 Maciej W. Rozycki <macro@imgtec.com>
3547 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
3549 2017-05-12 H.J. Lu <hongjiu.lu@intel.com>
3551 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
3552 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
3554 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
3556 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
3558 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
3560 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
3561 to plt_second/plt_second_eh_frame.
3562 (elf_x86_64_link_hash_newfunc): Updated.
3563 (elf_x86_64_allocate_dynrelocs): Likewise.
3564 (elf_x86_64_size_dynamic_sections): Likewise.
3565 (elf_x86_64_relocate_section): Likewise.
3566 (elf_x86_64_finish_dynamic_symbol): Likewise.
3567 (elf_x86_64_finish_dynamic_sections): Likewise.
3568 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
3569 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
3571 (elf_backend_setup_gnu_properties): Updated. Create the
3572 .plt.sec section instead of the .plt.sec section.
3574 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
3576 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
3577 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
3578 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
3580 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
3582 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
3583 (bfd_elf64_set_reloc): Define.
3584 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
3586 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
3588 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
3589 (struct bfd_target): New field _bfd_set_reloc.
3590 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
3591 * reloc.c (_bfd_generic_set_reloc): New function.
3592 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
3593 * nlm-target.h (nlm_set_reloc): Likewise.
3594 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
3595 * aout-tic30.c (MY_set_reloc): Likewise.
3596 * aout-target.h (MY_set_reloc): Likewise.
3597 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
3598 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
3599 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
3600 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
3601 * aout-adobe.c (aout_32_set_reloc): Likewise.
3602 * bout.c (b_out_set_reloc): Likewise.
3603 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
3604 * i386os9k.c (aout_32_set_reloc): Likewise.
3605 * ieee.c (ieee_set_reloc): Likewise.
3606 * oasys.c (oasys_set_reloc): Likewise.
3607 * som.c (som_set_reloc): Likewise.
3608 * versados.c (versados_set_reloc): Likewise.
3609 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
3610 _bfd_generic_set_reloc.
3611 (rs6000_xcoff64_aix_vec): LIkewise.
3612 * libbfd.c (_bfd_norelocs_set_reloc): New function.
3613 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
3614 * i386msdos.c (msdos_set_reloc): Define to
3615 _bfd_norelocs_set_reloc.
3616 * elfcode.h (elf_set_reloc): Define.
3617 * bfd-in2.h: Regenerated.
3619 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
3622 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
3623 for IFUNC function address.
3625 2017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
3627 * elf32-arc.c (FEATURE_LIST_NAME): Define.
3628 (CONFLICT_LIST): Likewise.
3629 (opcode/arc-attrs.h): Include.
3630 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
3631 (arc_extract_features): New file.
3632 (arc_stralloc): Likewise.
3633 (arc_elf_merge_attributes): Likewise.
3634 (arc_elf_merge_private_bfd_data): Use object attributes.
3635 (bfd_arc_get_mach_from_attributes): New function.
3636 (arc_elf_object_p): Use object attributes.
3637 (arc_elf_final_write_processing): Likewise.
3638 (elf32_arc_obj_attrs_arg_type): New function.
3639 (elf32_arc_obj_attrs_handle_unknown): Likewise.
3640 (elf32_arc_section_from_shdr): Likewise.
3641 (elf_backend_obj_attrs_vendor): Define.
3642 (elf_backend_obj_attrs_section): Likewise.
3643 (elf_backend_obj_attrs_arg_type): Likewise.
3644 (elf_backend_obj_attrs_section_type): Likewise.
3645 (elf_backend_obj_attrs_handle_unknown): Likewise.
3646 (elf_backend_section_from_shdr): Likewise.
3648 2017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
3651 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
3652 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
3653 and the destination is a Thumb symbol.
3655 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
3657 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
3658 initializer to silence GCC 4.2.
3659 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
3661 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
3663 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
3664 (LAZY_PLT_ENTRY_SIZE): This.
3665 (NON_LAZY_PLT_ENTRY_SIZE): New.
3666 (elf_x86_64_plt0_entry): Renamed to ...
3667 (elf_x86_64_lazy_plt0_entry): This.
3668 (elf_x86_64_plt_entry): Renamed to ...
3669 (elf_x86_64_lazy_plt_entry): This.
3670 (elf_x86_64_bnd_plt0_entry): Renamed to ...
3671 (elf_x86_64_lazy_bnd_plt0_entry): This.
3672 (elf_x86_64_legacy_plt_entry): Removed.
3673 (elf_x86_64_bnd_plt_entry): Renamed to ...
3674 (elf_x86_64_lazy_bnd_plt_entry): This.
3675 (elf_x86_64_legacy_plt2_entry): Renamed to ...
3676 (elf_x86_64_non_lazy_plt_entry): This.
3677 (elf_x86_64_bnd_plt2_entry): Renamed to ...
3678 (elf_x86_64_non_lazy_bnd_plt_entry): This.
3679 (elf_x86_64_eh_frame_plt): Renamed to ...
3680 (elf_x86_64_eh_frame_lazy_plt): This.
3681 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
3682 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
3683 (elf_x86_64_eh_frame_plt_got): Renamed to ...
3684 (elf_x86_64_eh_frame_non_lazy_plt): This.
3685 (elf_x86_64_lazy_plt_layout): New.
3686 (elf_x86_64_non_lazy_plt_layout): Likewise.
3687 (elf_x86_64_plt_layout): Likewise.
3688 (elf_x86_64_backend_data): Remove PLT layout information. Add
3689 os for target system.
3690 (GET_PLT_ENTRY_SIZE): Removed.
3691 (elf_x86_64_lazy_plt): New.
3692 (elf_x86_64_non_lazy_plt): Likewise.
3693 (elf_x86_64_lazy_bnd_plt): Likewise.
3694 (elf_x86_64_non_lazy_bnd_plt): Likewise.
3695 (elf_x86-64_arch_bed): Updated.
3696 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
3697 (elf_x86_64_create_dynamic_sections): Removed.
3698 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
3699 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
3700 (elf_x86-64_adjust_dynamic_symbol): Updated.
3701 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
3702 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
3703 size for PLT0 if there is no PLT0. Get plt_entry_size from
3704 non_lazy_plt for non-lazy PLT entries.
3705 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
3706 from non_lazy_plt for non-lazy PLT entries.
3707 (elf_x86-64_relocate_section): Updated. Properly get PLT index
3708 if there is no PLT0.
3709 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
3710 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
3711 entries with non-lazy PLT layout. Don't fill the second and third
3712 slots in the PLT entry if there is no PLT0.
3713 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
3714 if there is no PLT0. Set sh_entsize on the .plt.got section.
3715 (compare_relocs): New.
3716 (elf_x86_64_plt_type): Likewise.
3717 (elf_x86_64_plt): Likewise.
3718 (elf_x86_64_nacl_plt): New. Forward declaration.
3719 (elf_x86_64_get_plt_sym_val): Removed.
3720 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
3721 against all dynamic relocations.
3722 (elf_x86_64_link_setup_gnu_properties): New function.
3723 (elf_backend_create_dynamic_sections): Updated.
3724 (elf_backend_setup_gnu_properties): New.
3725 (elf_x86_64_nacl_plt): New.
3726 (elf_x86_64_nacl_arch_bed): Updated.
3728 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
3730 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
3731 (LAZY_PLT_ENTRY_SIZE): This.
3732 (NON_LAZY_PLT_ENTRY_SIZE): New.
3733 (elf_i386_plt0_entry): Renamed to ...
3734 (elf_i386_lazy_plt0_entry): This.
3735 (elf_i386_plt_entry): Renamed to ...
3736 (elf_i386_lazy_plt_entry): This.
3737 (elf_i386_pic_plt0_entry): Renamed to ...
3738 (elf_i386_pic_lazy_plt0_entry): This.
3739 (elf_i386_pic_plt_entry): Renamed to ...
3740 (elf_i386_pic_lazy_plt_entry): This.
3741 (elf_i386_got_plt_entry): Renamed to ...
3742 (elf_i386_non_lazy_plt_entry): This.
3743 (elf_i386_pic_got_plt_entry): Renamed to ...
3744 (elf_i386_pic_non_lazy_plt_entry): This.
3745 (elf_i386_eh_frame_plt): Renamed to ...
3746 (elf_i386_eh_frame_lazy_plt): This.
3747 (elf_i386_eh_frame_plt_got): Renamed to ...
3748 (elf_i386_eh_frame_non_lazy_plt): This.
3749 (elf_i386_plt_layout): Renamed to ...
3750 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
3751 eh_frame_plt_got_size.
3752 (elf_i386_non_lazy_plt_layout): New.
3753 (elf_i386_plt_layout): Likewise.
3754 (elf_i386_non_lazy_plt): Likewise.
3755 (GET_PLT_ENTRY_SIZE): Removed.
3756 (elf_i386_plt): Renamed to ...
3757 (elf_i386_lazy_plt): This.
3758 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
3759 (elf_i386_arch_bed): Updated.
3760 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
3761 (elf_i386_create_dynamic_sections): Removed.
3762 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
3763 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
3764 (elf_i386_adjust_dynamic_symbol): Updated.
3765 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
3766 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
3767 size for PLT0 if there is no PLT0.
3768 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
3769 output section is discarded only if GOT isn't empty.
3770 (elf_i386_relocate_section): Updated. Properly get PLT index
3771 if there is no PLT0.
3772 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
3773 second and third slots in the PLT entry if there is no PLT0.
3774 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
3775 if there is no PLT0. Set sh_entsize on the .plt.got section.
3776 (elf_i386_nacl_plt): Forward declaration.
3777 (elf_i386_get_plt_sym_val): Removed.
3778 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
3779 against all dynamic relocations.
3780 (elf_i386_link_setup_gnu_properties): New function.
3781 (elf_backend_create_dynamic_sections): Updated.
3782 (elf_backend_setup_gnu_properties): New.
3783 (elf_i386_nacl_plt): Updated.
3784 (elf_i386_nacl_arch_bed): Likewise.
3785 (elf_i386_vxworks_arch_bed): Likewise.
3787 2017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
3789 * elflink.c (elf_output_implib): Remove executable flag from import
3791 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
3792 library is a relocatable object file.
3794 2017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
3797 * elf32-avr.c (avr_should_move_sym): New function.
3798 (avr_should_reduce_sym_size): Likewise.
3799 (avr_should_increase_sym_size): Likewise.
3800 (elf32_avr_relax_delete_bytes): Adjust symbol values
3801 and sizes by calling new functions.
3803 2017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
3805 * config.bfd (riscv32-*): Enable rv64.
3807 2017-05-02 Alan Modra <amodra@gmail.com>
3810 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
3811 rather than h->root.type == bfd_link_hash_new.
3812 (bfd_elf_record_link_assignment): Similarly, call
3813 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
3815 2017-04-29 Alan Modra <amodra@gmail.com>
3818 * reloc.c (reloc_offset_in_range): New function.
3819 (bfd_perform_relocation, bfd_install_relocation): Use it.
3820 (_bfd_final_link_relocate): Likewise.
3822 2017-04-28 H.J. Lu <hongjiu.lu@intel.com>
3824 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
3825 before using .plt.got.
3826 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
3828 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3830 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
3831 instead of "+=" to update 0.
3833 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3835 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
3836 .plt.got section here.
3837 (elf_i386_check_relocs): Don't create the .plt.got section.
3838 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
3839 the .plt.got and .plt.bnd sections here.
3840 (elf_x86_64_check_relocs): Don't create the .plt.got nor
3843 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3845 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
3847 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
3848 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
3849 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
3850 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
3853 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3855 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
3857 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
3858 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
3859 the first relocatable ELF input with GNU properties.
3861 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3863 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
3864 VxWorks for non-PIC.
3866 2017-04-27 Alan Modra <amodra@gmail.com>
3868 * elf-bfd.h (struct elf_backend_data): Make asection param of
3869 elf_backend_eh_frame_address_size const.
3870 (_bfd_elf_eh_frame_address_size): Likewise.
3871 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
3872 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
3873 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
3874 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
3875 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
3876 (next_cie_fde_offset): Constify params.
3877 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
3879 2017-04-27 Alan Modra <amodra@gmail.com>
3881 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
3882 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
3883 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
3885 (offset_adjust): New function.
3886 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
3887 (adjust_eh_frame_local_symbols): Likewise.
3888 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
3889 after changing anything. Return true if anything changed.
3890 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
3891 _bfd_elf_adjust_eh_frame_global_symbol for globals.
3893 2017-04-27 Alan Modra <amodra@gmail.com>
3895 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
3898 2017-04-27 Alan Modra <amodra@gmail.com>
3900 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
3901 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
3902 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
3903 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
3904 for undef and undefweak dyn_relocs.
3905 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
3906 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
3907 (allocate_got, allocate_dynrelocs): Likewise.
3908 (ppc64_elf_relocate_section): Likewise.
3910 2017-04-26 H.J. Lu <hongjiu.lu@intel.com>
3912 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
3913 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
3914 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
3915 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
3917 2017-04-26 Nick Clifton <nickc@redhat.com>
3920 * reloc.c (bfd_perform_relocation): Check for a negative address
3923 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
3926 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
3928 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
3929 (elf_backend_always_renumber_dynsyms): Define.
3930 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
3931 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
3932 * elflink.c (bfd_elf_size_dynamic_sections): Also call
3933 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
3935 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
3937 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
3939 * elflink.c (bfd_elf_size_dynamic_sections): Only call
3940 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
3941 sections have been created.
3943 2017-04-26 Nick Clifton <nickc@redhat.com>
3946 * compress.c (bfd_init_section_compress_status): Check the return
3947 value from bfd_malloc.
3949 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3951 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
3952 no_finish_dynamic_symbol.
3953 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
3955 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
3956 weak symbol, don't make it dynamic.
3957 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
3958 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
3959 relocation for GOT reference.
3960 (elf_x86_64_finish_dynamic_symbol): Abort if
3961 no_finish_dynamic_symbol isn't 0.
3963 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3966 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
3967 undefined weak symbol, don't make it dynamic.
3968 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
3969 set no_finish_dynamic_symbol and generate R_386_RELATIVE
3970 relocation for R_386_GOT32.
3972 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3975 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
3977 2017-04-23 Alan Modra <amodra@gmail.com>
3980 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
3981 * elf.c (lcomm_sym): New.
3982 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
3983 * bfd-in2.h: Regenerate.
3985 2017-04-23 Alan Modra <amodra@gmail.com>
3988 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
3989 parameters and comment.
3990 (_bfd_elf_get_reloc_section): Delete.
3991 (_bfd_elf_plt_get_reloc_section): Declare.
3992 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
3993 New functions. Don't blindly skip over assumed .rel/.rela prefix.
3995 (_bfd_elf_get_reloc_section): ..here. Delete.
3996 (assign_section_numbers): Call elf_get_reloc_section.
3997 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
3998 * elfxx-target.h (elf_backend_get_reloc_section): Update.
4000 2017-04-23 Alan Modra <amodra@gmail.com>
4003 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
4006 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
4009 * elf32-i386.c (elf_i386_link_hash_entry): Add
4010 no_finish_dynamic_symbol.
4011 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
4012 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
4013 symbol, don't make it dynamic in PIE.
4014 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
4015 set no_finish_dynamic_symbol and generate R_386_RELATIVE
4016 relocation for R_386_GOT32
4017 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
4020 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
4024 * elflink.c (elf_link_add_object_symbols): Require
4025 --no-dynamic-linker with -E/--dynamic-list when creating
4028 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
4030 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
4033 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
4035 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
4036 dynamic symbol sorting.
4038 2017-04-20 H.J. Lu <hongjiu.lu@intel.com>
4041 * elflink.c (elf_link_add_object_symbols): Preserve
4042 dynamic_ref_after_ir_def when restoring the symbol table for
4043 unneeded dynamic object.
4045 2017-04-19 H.J. Lu <hongjiu.lu@intel.com>
4048 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
4049 on on undefined IFUNC symbol in the second PLT.
4051 2017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
4053 * peXXigen.c (pe_print_reloc): Correct chunk_end.
4055 2017-04-19 Alan Modra <amodra@gmail.com>
4057 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
4058 or make dynamic for info->dynamic_undefined_weak 0 and 1.
4059 * elf32-ppc.c:Formatting.
4060 (ensure_undefweak_dynamic): Don't make dynamic when
4061 info->dynamic_undefined_weak is zero.
4062 (allocate_dynrelocs): Discard undefweak dyn_relocs for
4063 info->dynamic_undefined_weak. Discard undef dyn_relocs when
4064 not default visibility. Discard undef and undefweak
4066 (ppc_elf_relocate_section): Adjust to suit.
4067 * elf64-ppc.c: Formatting.
4068 (ensure_undefweak_dynamic): Don't make dynamic when
4069 info->dynamic_undefined_weak is zero.
4070 (allocate_dynrelocs): Discard undefweak dyn_relocs for
4071 info->dynamic_undefined_weak. Discard them earlier.
4073 2017-04-17 H.J. Lu <hongjiu.lu@intel.com>
4076 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
4077 before generating the version definition section.
4079 2017-04-17 Alan Modra <amodra@gmail.com>
4081 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
4082 state when a regular object file defines a symbol with
4083 incompatible type to that defined by an earlier shared lib.
4085 2017-04-13 Alan Modra <amodra@gmail.com>
4087 * coffcode.h: Wrap some overly long _bfd_error_handler args.
4089 * elf32-arm.c: Likewise.
4090 * elf32-i386.c: Likewise.
4091 * elf32-mep.c: Likewise.
4092 * elf64-ia64-vms.c: Likewise.
4093 * elf64-x86-64.c: Likewise.
4094 * elflink.c: Likewise.
4095 * elfnn-ia64.c: Likewise.
4096 * elfxx-mips.c: Likewise.
4098 2017-04-13 Alan Modra <amodra@gmail.com>
4100 * aoutx.h: Use %B and %A in error messages throughout file.
4101 * aout-cris.c: Likewise.
4102 * archive.c: Likewise.
4103 * binary.c: Likewise.
4104 * coff-rs6000.c: Likewise.
4105 * coff-tic4x.c: Likewise.
4106 * coffcode.h: Likewise.
4107 * coffgen.c: Likewise.
4108 * cofflink.c: Likewise.
4109 * coffswap.h: Likewise.
4110 * cpu-arm.c: Likewise.
4111 * elf-eh-frame.c: Likewise.
4112 * elf-m10300.c: Likewise.
4114 * elf32-arc.c: Likewise.
4115 * elf32-arm.c: Likewise.
4116 * elf32-bfin.c: Likewise.
4117 * elf32-frv.c: Likewise.
4118 * elf32-iq2000.c: Likewise.
4119 * elf32-m32c.c: Likewise.
4120 * elf32-microblaze.c: Likewise.
4121 * elf32-nds32.c: Likewise.
4122 * elf32-rl78.c: Likewise.
4123 * elf32-rx.c: Likewise.
4124 * elf32-score.c: Likewise.
4125 * elf32-score7.c: Likewise.
4126 * elf32-sh64.c: Likewise.
4127 * elf32-v850.c: Likewise.
4128 * elf32-vax.c: Likewise.
4129 * elf32-visium.c: Likewise.
4130 * elf64-ia64-vms.c: Likewise.
4131 * elf64-mmix.c: Likewise.
4132 * elf64-sh64.c: Likewise.
4133 * elfcode.h: Likewise.
4134 * elfnn-aarch64.c: Likewise.
4135 * elfnn-ia64.c: Likewise.
4136 * elfxx-mips.c: Likewise.
4137 * hpux-core.c: Likewise.
4140 * linker.c: Likewise.
4141 * merge.c: Likewise.
4143 * oasys.c: Likewise.
4144 * pdp11.c: Likewise.
4145 * peXXigen.c: Likewise.
4146 * rs6000-core.c: Likewise.
4147 * vms-alpha.c: Likewise.
4148 * xcofflink.c: Likewise.
4150 2017-04-13 Alan Modra <amodra@gmail.com>
4152 * bfd.c (PRINT_TYPE): Define.
4153 (_doprnt): New function.
4154 (error_handler_internal): Use _doprnt.
4155 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
4156 calls in their natural order, throughout file.
4157 * coff-mcore.c: Likewise.
4158 * coff-ppc.c: Likewise.
4159 * coff-tic80.c: Likewise.
4160 * cofflink.c: Likewise.
4161 * elf-s390-common.c: Likewise.
4163 * elf32-arm.c: Likewise.
4164 * elf32-i386.c: Likewise.
4165 * elf32-m32r.c: Likewise.
4166 * elf32-msp430.c: Likewise.
4167 * elf32-spu.c: Likewise.
4168 * elf64-ia64-vms.c: Likewise.
4169 * elf64-sparc.c: Likewise.
4170 * elf64-x86-64.c: Likewise.
4171 * elflink.c: Likewise.
4172 * elfnn-aarch64.c: Likewise.
4173 * elfnn-ia64.c: Likewise.
4174 * elfxx-mips.c: Likewise.
4176 2017-04-13 Alan Modra <amodra@gmail.com>
4178 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
4179 branch veneers" error. Fix double space and format message.
4180 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
4181 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
4183 2017-04-13 Alan Modra <amodra@gmail.com>
4185 * bfd-in2.h: Regenerate.
4187 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
4189 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
4190 extra `\n' in warning/error messages.
4191 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
4192 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
4194 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
4196 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
4197 processor-specific properties with generic ELF target vector.
4199 2017-04-10 Qing Zhao <qing.zhao@oracle.com>
4201 * elf32-sparc.c (elf_backend_fixup_symbol): New.
4202 * elf64-sparc.c (elf_backend_fixup_symbol): New.
4203 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
4204 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
4206 (link_hash_newfunc): Initialize has_got_reloc and
4208 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
4210 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
4212 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
4214 (_bfd_sparc_elf_fixup_symbol): New function.
4215 (allocate_dynrelocs): Don't allocate space for dynamic
4216 relocations and discard relocations against resolved undefined
4217 weak symbols in executable. Don't make resolved undefined weak
4218 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
4219 relocation against undefined weak symbols in PIE.
4220 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
4221 relocations against resolved undefined weak symbols in PIE
4222 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
4223 without ynamic PLT/GOT relocations for resolved undefined weak
4225 Don't generate dynamic relocation against resolved undefined
4226 weak symbol in executable.
4227 (pie_finish_undefweak_symbol): New function.
4228 (_bfd_sparc_elf_finish_dynamic_sections): Call
4229 pie_finish_undefweak_symbol on all symbols in PIE.
4230 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
4231 (_bfd_sparc_elf_fixup_symbol): New function.
4233 2017-04-10 Nick Clifton <nickc@redhat.com>
4235 * config.bfd: Remove ns32k from obsolete list.
4237 2017-04-10 Alan Modra <amodra@gmail.com>
4240 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
4241 (special_sections_i): Likewise for .init_array.
4242 (special_sections_p): Likewise for .preinit_array.
4244 2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
4248 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
4249 ELF_COMMON_DEF_P for common symbols.
4250 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
4251 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
4252 * elflink.c (_bfd_elf_merge_symbol): Revert commits
4253 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
4254 07492f668d2173da7a2bda3707ff0985e0f460b6.
4256 2017-04-07 Pedro Alves <palves@redhat.com>
4258 * opncls.c (bfd_get_debug_link_info): Rename to...
4259 (bfd_get_debug_link_info_1): ... this. Change type of second
4260 parameter to void pointer. Adjust.
4261 (bfd_get_debug_link_info): Reimplement on top of
4262 bfd_get_debug_link_info_1.
4263 (separate_debug_file_exists, separate_alt_debug_file_exists):
4264 Change type of second parameter to void pointer. Adjust.
4265 (get_func_type, check_func_type): Change type of second parameter
4267 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
4268 the callback functions instead of passing the address of a local.
4269 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
4270 find_separate_debug_file.
4271 (get_alt_debug_link_info_shim): Change type of second parameter to
4272 void pointer. Adjust.
4273 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
4274 find_separate_debug_file.
4275 (get_build_id_name, bfd_boolean check_build_id_file): Change type
4276 of second parameter to void pointer. Adjust.
4277 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
4278 pointer local to find_separate_debug_file.
4280 2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
4282 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
4283 external symbols with a definition.
4284 (_bfd_coff_gc_mark_extra_sections): Fix typo.
4286 2017-04-07 Alan Modra <amodra@gmail.com>
4288 * po/SRC-POTFILES.in: Regenerate.
4290 2017-04-05 Alan Modra <amodra@gmail.com>
4292 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
4295 2017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
4297 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
4298 numbers for DataDirectory entry indicies passed to
4301 2017-04-04 H.J. Lu <hongjiu.lu@intel.com>
4303 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
4304 each GNU_MBIND section and align GNU_MBIND section to page size.
4305 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
4306 segment for each GNU_MBIND section.
4307 (_bfd_elf_init_private_section_data): Copy sh_info from input
4308 for GNU_MBIND section.
4310 2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
4312 * elfnn-riscv.c (GP_NAME): Delete.
4313 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
4314 (_bfd_riscv_relax_lui): Likewise.
4316 2017-04-04 Nick Clifton <nickc@redhat.com>
4319 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
4321 (bfd_elf_final_link): Only initialize the extended symbol index
4322 section if there are extended symbol tables to list.
4324 2017-04-03 H.J. Lu <hongjiu.lu@intel.com>
4326 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
4327 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
4328 * configure.ac (elf): Add elf-properties.lo.
4329 * Makefile.in: Regenerated.
4330 * configure: Likewise.
4331 * elf-bfd.h (elf_property_kind): New.
4332 (elf_property): Likewise.
4333 (elf_property_list): Likewise.
4334 (elf_properties): Likewise.
4335 (_bfd_elf_parse_gnu_properties): Likewise.
4336 (_bfd_elf_get_property): Likewise.
4337 (_bfd_elf_link_setup_gnu_properties): Likewise.
4338 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
4339 and setup_gnu_properties.
4340 (elf_obj_tdata): Add properties.
4341 * elf-properties.c: New file.
4342 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
4343 (elf_i386_merge_gnu_properties): Likewise.
4344 (elf_backend_parse_gnu_properties): Likewise.
4345 (elf_backend_merge_gnu_properties): Likewise.
4346 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
4347 (elf_x86_64_merge_gnu_properties): Likewise.
4348 (elf_backend_parse_gnu_properties): Likewise.
4349 (elf_backend_merge_gnu_properties): Likewise.
4350 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
4351 (elf_backend_parse_gnu_properties): Likewise.
4352 (elf_backend_setup_gnu_properties): Likewise.
4353 (elfNN_bed): Add elf_backend_parse_gnu_properties,
4354 elf_backend_merge_gnu_properties and
4355 elf_backend_setup_gnu_properties.
4357 2017-03-30 Pip Cet <pipcet@gmail.com>
4359 * elf32-wasm32.c: Add relocation code, two relocs.
4360 * reloc.c: Add wasm32 relocations.
4361 * libbfd.h: Regenerate.
4362 * bfd-in2.h: Regenerate.
4363 * bfd/po/bfd.pot: Regenerate.
4365 2017-03-29 Nick Clifton <nickc@redhat.com>
4368 * coff-bfd.h (struct coff_section_data): Add new fields:
4369 saved_bias and bias.
4370 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
4371 computed for PE binaries.
4372 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
4375 2017-03-28 Hans-Peter Nilsson <hp@axis.com>
4378 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
4379 to handle a local symbol with a hash-symbol-entry; without PLT.
4380 Add BFD_ASSERT for an incidental case with GOT entry present.
4381 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
4382 isn't forced-or-set local.
4384 2017-03-27 Pip Cet <pipcet@gmail.com>
4386 * wasm-module.c: New file to support WebAssembly modules.
4387 * wasm-module.h: New file to support WebAssembly modules.
4388 * doc/webassembly.texi: Start documenting wasm-module.c.
4389 * config.bfd: Add wasm_vec.
4390 * targets.c: Likewise.
4391 * configure.ac: Likewise.
4392 * Makefile.am: Add entries for wasm-module.c.
4393 * Makefile.in: Regenerate.
4394 * configure: Regenerate.
4395 * po/SRC-POTFILES.in: Regenerate.
4397 2017-03-27 Pip Cet <pipcet@gmail.com>
4399 * cpu-wasm32.c: New file to support wasm32 architecture.
4400 * elf32-wasm32.c: New file to support wasm32 architecture.
4401 * Makefile.am: Add wasm32 architecture.
4402 * archures.c: Likewise.
4403 * config.bfd: Likewise.
4404 * configure.ac: Likewise.
4405 * targets.c: Likewise.
4406 * Makefile.in: Regenerate.
4407 * bfd-in2.h: Regenerate.
4408 * configure: Regenerate.
4409 * po/SRC-POTFILES.in: Regenerate.
4411 2017-03-20 Alan Modra <amodra@gmail.com>
4414 * elf64-ppc.c (compare_symbols): Stabilize sort.
4416 2017-03-18 Alan Modra <amodra@gmail.com>
4418 * elf64-ppc.c (struct ppc_link_hash_table): Add
4419 local_ifunc_resolver and maybe_local_ifunc_resolver.
4420 (ppc_build_one_stub): Set flags on emitting dynamic
4421 relocation to ifunc.
4422 (ppc64_elf_relocate_section): Likewise.
4423 (ppc64_elf_finish_dynamic_symbol): Likewise.
4424 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
4425 local dynamic relocs to ifuncs.
4426 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
4427 local_ifunc_resolver and maybe_local_ifunc_resolver.
4428 (ppc_elf_relocate_section): Set flag on emitting dynamic
4429 relocation to ifuncs.
4430 (ppc_elf_finish_dynamic_symbol): Likewise.
4431 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
4432 dynamic relocs to ifuncs.
4434 2017-03-13 Nick Clifton <nickc@redhat.com>
4437 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
4438 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
4439 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
4440 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
4441 * bfd-in2.h: Regenerate.
4442 * libbfd.h: Regenerate.
4443 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
4445 (IS_AARCH64_TLSDESC_RELOC): Likewise.
4446 (elfNN_aarch64_howto_table): Likewise.
4447 (aarch64_tls_transition_without_check): Likewise.
4448 (aarch64_reloc_got_type): Likewise.
4449 (elfNN_aarch64_final_link_relocate): Likewise.
4450 (elfNN_aarch64_tls_relax): Likewise.
4451 (elfNN_aarch64_relocate_section): Likewise.
4452 (elfNN_aarch64_gc_sweep_hook): Likewise.
4453 (elfNN_aarch64_check_relocs): Likewise.
4454 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
4455 (_bfd_aarch64_elf_resolve_relocation): Likewise.
4457 2017-03-11 Alan Modra <amodra@gmail.com>
4459 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
4460 parameter is in fact used. Whitespace fixes.
4461 * elf64-ppc.c: Likewise.
4463 2017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
4465 * rs6000-core.c (CORE_NEW): Simplify macro when
4466 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
4468 2017-03-07 Alan Modra <amodra@gmail.com>
4472 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
4475 2017-03-05 Alan Modra <amodra@gmail.com>
4477 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
4478 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
4479 (next_cie_fde_offset): New function.
4480 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
4481 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
4482 four bytes. Align CIEs to four or eight bytes depending on
4483 per_encoding_aligned8. Align FDEs according to their encoding.
4484 Pad last FDE to output section alignment.
4485 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
4487 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
4488 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
4489 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
4491 2017-03-02 Martin Bickel <binutils@ineranves.de>
4494 * elf.c (rewrite_elf_program_header): Do not issue a warning for
4495 empty segments which have a zero filesz, but a non-zero memsz.
4497 2017-03-02 Alan Modra <amodra@gmail.com>
4499 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
4501 2017-02-28 Alan Modra <amodra@gmail.com>
4503 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
4504 (ppc64_elf_relocate_section): Likewise.
4506 2017-02-28 Alan Modra <amodra@gmail.com>
4509 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
4510 rather than elf32_nios2_hash_table or elf_hash_table.
4511 (create_got_section): Likewise.
4512 (nios2_elf32_finish_dynamic_symbol): Likewise.
4513 (nios2_elf32_adjust_dynamic_symbol): Likewise.
4514 (nios2_elf32_size_dynamic_sections): Likewise.
4515 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
4516 vars. Use htab equivalents directly instead. Don't create
4517 all dynamic sections on needing just the GOT. Use a goto
4518 rather than a fall-through with reloc test. Ensure
4519 htab->dynobj is set when making dynamic sreloc section.
4520 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
4521 equivalent directly instead. Don't segfault on looking for
4522 .dynamic when dynamic sections have not been created. Don't
4523 segfault on .got.plt being discarded.
4524 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
4525 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
4526 fixme and another not so relevant comment.
4527 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
4528 already set, set hash table dynobj on creating .sbss.
4530 2017-02-28 Alan Modra <amodra@gmail.com>
4532 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
4533 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
4534 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
4535 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
4536 (ppc64_elf_relocate_section): Likewise.
4537 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
4538 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
4539 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
4540 * libbfd.h: Regenerate.
4541 * bfd-in2.h: Regenerate.
4543 2017-02-28 Alan Modra <amodra@gmail.com>
4545 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
4546 dynamic .data.rel.ro read-only.
4547 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
4548 rather than section flags when deciding where copy reloc goes.
4549 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
4550 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
4551 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
4552 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
4553 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
4554 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
4555 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
4556 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
4557 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
4558 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
4559 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
4560 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
4561 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
4562 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
4563 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
4564 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
4565 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
4566 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
4567 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
4569 2017-02-28 Maciej W. Rozycki <macro@imgtec.com>
4571 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
4572 `jalr $0, $25' instruction encoding.
4574 2017-02-27 Nick Clifton <nickc@redhat.com>
4577 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
4578 generating a seg-fault when encountering a symbol that has been
4579 deleted by garbage collection.
4581 2017-02-25 Alan Modra <amodra@gmail.com>
4583 * elf32-arc.c (struct dynamic_sections): Delete.
4584 (enum dyn_section_types): Delete.
4585 (dyn_section_names): Delete.
4586 (arc_create_dynamic_sections): Delete.
4587 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
4588 segfault on discarded .rela.plt section.
4589 (elf_arc_size_dynamic_sections): Formatting. Don't call
4590 arc_create_dynamic_sections. Don't allocate memory for sections
4591 handled by the generic linker. Correct code finding relocs in
4592 read-only sections. Set SEC_EXCLUDE on zero size .got,
4593 .got.plt, and .dynbss sections. Do set .interp for pies.
4595 2017-02-24 Andrew Waterman <andrew@sifive.com>
4597 * elfnn-riscv.c (GP_NAME): New macro.
4598 (riscv_global_pointer_value): Use it.
4599 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
4600 output section, consider only that section's alignment.
4602 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
4604 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
4605 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
4606 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
4607 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
4609 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
4611 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
4612 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
4615 2017-02-23 Alan Modra <amodra@gmail.com>
4618 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
4620 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
4621 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
4624 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
4627 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
4628 processing ahead of the call to `elf_gc_sweep_symbol'.
4630 2017-02-22 Nick Clifton <nickc@redhat.com>
4633 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
4634 created section 4-byte alignment.
4636 2017-02-22 Alan Modra <amodra@gmail.com>
4638 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
4639 on .got or .plt output section being discarded by script.
4640 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
4643 2017-02-21 Alan Modra <amodra@gmail.com>
4645 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
4646 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
4648 2017-02-20 Alan Modra <amodra@gmail.com>
4651 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
4652 if DT_RELSZ/DT_RELASZ is zero.
4654 2017-02-17 Nick Clifton <nickc@redhat.com>
4656 * compress.c (bfd_get_full_section_contents): Remember to reduce
4657 compressed size by the sizeof the compression header when
4658 decompressing the contents.
4660 2017-02-17 Pedro Alves <palves@redhat.com>
4662 * srec.c (Chunk): Rename to ...
4663 (_bfd_srec_len): ... this.
4664 (S3Forced): Rename to ...
4665 (_bfd_srec_forceS3): ... this.
4666 * objcopy.c: Adjust all references.
4668 2017-02-17 Pedro Alves <palves@redhat.com>
4670 * archive.c (bsd_write_armap): Rename to ...
4671 (_bfd_bsd_write_armap): ... this.
4672 (coff_write_armap): Rename to ...
4673 (_bfd_coff_write_armap): ... this.
4674 * libbfd-in.h (bsd_write_armap): Rename to ...
4675 (_bfd_bsd_write_armap): ... this.
4676 (coff_write_armap): Rename to ...
4677 (_bfd_coff_write_armap): ... this.
4678 * aout-target.h, aout-tic30.c: Adjust all users.
4679 * libbfd.h: Regenerate.
4681 2017-02-17 Pedro Alves <palves@redhat.com>
4683 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
4684 (warn_deprecated): Rename to ...
4685 (_bfd_warn_deprecated): ... this.
4686 * libbfd.c (warn_deprecated): Rename to ...
4687 (_bfd_warn_deprecated): ... this.
4688 * bfd-in2.h: Regenerate.
4690 2017-02-17 Pedro Alves <palves@redhat.com>
4692 * bfdio.c (real_ftell): Rename to ...
4693 (_bfd_real_ftell): ... this.
4694 (real_fseek): Rename to ...
4695 (_bfd_real_fseek): ... this.
4696 (real_fopen): Rename to ...
4697 (_bfd_real_fopen): ... this.
4698 * libbfd-in.h (real_ftell): Rename to ...
4699 (_bfd_real_ftell): ... this.
4700 (real_fseek): Rename to ...
4701 (_bfd_real_fseek): ... this.
4702 (real_fopen): Rename to ...
4703 (_bfd_real_fopen): ... this.
4704 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
4705 * libbfd.h: Regenerate.
4707 2017-02-17 Pedro Alves <palves@redhat.com>
4709 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
4710 * libbfd.c (read_unsigned_leb128): Rename to ...
4711 (_bfd_read_unsigned_leb128): ... this.
4712 (read_signed_leb128): Rename to ...
4713 (_bfd_read_signed_leb128): ... this.
4714 (safe_read_leb128): Rename to ...
4715 (_bfd_safe_read_leb128): ... this.
4716 * libbfd-in.h (read_unsigned_leb128): Rename to ...
4717 (_bfd_read_unsigned_leb128): ... this.
4718 (read_signed_leb128): Rename to ...
4719 (_bfd_read_signed_leb128): ... this.
4720 (safe_read_leb128): Rename to ...
4721 (_bfd_safe_read_leb128): ... this.
4722 * libbfd.h: Renegerate.
4724 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
4726 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
4727 before trying to fine matching file and line information.
4729 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
4731 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
4732 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
4733 not match current bfd, then reload debug information. Record bfd
4734 we're loading debug info for in the stash. If we have debug
4735 informatin in the cache then perform section placement before
4738 2017-02-16 Alan Modra <amodra@gmail.com>
4741 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
4742 * elfxx-target.h (elf_backend_no_page_alias): Define.
4743 (elfNN_bed): Init new field.
4744 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
4745 ensure PT_LOAD segment starts on a new page.
4746 * elf32-hppa.c (elf_backend_no_page_alias): Define.
4748 2017-02-16 Alan Modra <amodra@gmail.com>
4751 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
4754 2017-02-16 Jiong Wang <jiong.wang@arm.com>
4756 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
4757 * bfd-in2.h: Regenerated.
4759 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
4762 * elf32-i386.c (elf_i386_relocate_section): Allow
4763 "lea foo@GOT, %reg" in PIC.
4765 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
4768 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
4769 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
4770 error against local IFUNC symbol without a base register for
4773 2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
4775 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
4776 `%P: %H:' with `info->callbacks->einfo'.
4777 (ppc_elf_relocate_section): Likewise.
4778 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
4779 (ppc64_elf_edit_toc): Likewise.
4780 (ppc64_elf_relocate_section): Likewise.
4782 2017-02-14 Alan Modra <amodra@gmail.com>
4784 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
4785 --gc-keep-exported, and test versioned field of sym rather than
4786 looking for @ in name.
4788 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
4790 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
4793 2017-02-13 Nick Clifton <nickc@redhat.com>
4796 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
4799 2017-02-07 Andrew Waterman <andrew@sifive.com>
4801 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
4802 entry size if PLT header is written.
4804 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
4806 Fix sparc64 dynamic relocation processing to use the dynamic
4808 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
4809 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
4812 2017-02-03 Nick Clifton <nickc@redhat.com>
4815 * coffcode.h (coff_write_object_contents): Enlarge size of
4816 s_name_buf in order to avoid compile time warning about possible
4818 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
4819 32-bits of insn value before printing into buffer.
4821 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4823 * elfxx-mips.c (mips_elf_hash_sort_data): Add
4824 `max_local_dynindx'.
4825 (mips_elf_sort_hash_table): Handle it.
4826 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
4827 symbols bump up `max_local_dynindx' rather than
4828 `max_non_got_dynindx'.
4830 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4832 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
4833 `min_got_dynindx', `max_unref_got_dynindx' and
4834 `max_non_got_dynindx' members to the `bfd_size_type' data type.
4835 (mips_elf_sort_hash_table): Adjust accordingly.
4837 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4839 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
4840 to access the hash table.
4842 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4844 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
4845 non-NULL `htab' to the beginning.
4847 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4849 * elflink.c (elf_gc_sweep): Wrap overlong line.
4851 2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
4853 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
4854 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
4855 * elfxx-mips.c (mips_elf_link_hash_table): Add
4856 `ignore_branch_isa' member.
4857 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
4858 in branch relocation calculation as an error if
4859 `ignore_branch_isa' has been set.
4860 (_bfd_mips_elf_insn32): Rename to...
4861 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
4862 parameter to `insn32' and add an `ignore_branch_isa' parameter.
4863 Handle the new parameter.
4865 2017-01-27 Hans-Peter Nilsson <hp@axis.com>
4867 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
4868 local variable dynobj.
4871 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
4872 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
4873 executable from read-only sections into sdynrelro.
4874 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
4875 dynamic relocs in sdynrelro.
4876 (elf_backend_want_dynrelro): Define.
4878 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4880 * config.bfd (*-*-rtemsaout*): Mark as removed.
4882 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4884 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
4885 (arm-*-rtems*): Move to (arm*-*-eabi*).
4886 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
4887 (m68-*-rtems*): Move to (m68*-*-elf*).
4889 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4891 * config.bfd (*-*-rtemscoff*): Mark as removed.
4893 2017-01-24 Maciej W. Rozycki <macro@imgtec.com>
4896 * elflink.c (bfd_elf_record_link_assignment): Revert last
4897 change and don't ever clear `forced_local'. Set `mark'
4899 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
4901 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
4902 (bfd_elf_size_dynamic_sections): ... here.
4903 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
4904 and set `mark' instead in `__tls_get_addr_opt' processing.
4905 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
4907 2017-01-24 Alan Modra <amodra@gmail.com>
4909 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
4910 where dynamic relocs are preferable. Allow ifunc too.
4911 (ensure_undefweak_dynamic): New function.
4912 (allocate_dynrelocs): Use it here. Move plt handling last and
4913 don't make symbols dynamic, simplifying loop. Only make undef
4914 weak symbols with GOT entries dynamic. Correct condition
4915 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
4916 comments. Remove goto.
4917 (ppc_elf_relocate_section): Correct test for using dynamic
4918 symbol on GOT relocs. Rearrange test for emitting GOT relocs
4919 to suit. Set up explicit tls_index entries and implicit GOT
4920 tls_index entries resolvable at link time for
4921 __tls_get_addr_opt. Simplify test to clear mem for prelink.
4922 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
4923 (ensure_undefweak_dynamic): New function.
4924 (allocate_dynrelocs): Use it here. Only make undef weak symbols
4925 with GOT entries dynamic. Remove unnecessary test of
4926 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
4927 (ppc64_elf_relocate_section): Correct test for using dynamic
4928 symbol on GOT relocs. Rearrange test for emitting GOT relocs
4929 to suit. Set up explicit tls_index entries and implicit GOT
4930 tls_index entries resolvable at link time for __tls_get_addr_opt.
4931 Simplify expression to clear mem for prelink.
4933 2017-01-23 Yury Norov <ynorov@caviumnetworks.com>
4935 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
4937 2017-01-20 Jiong Wang <jiong.wang@arm.com>
4939 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
4940 (elf_backend_hash_symbol): Define.
4942 2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
4945 * elflink.c (bfd_elf_record_link_assignment): Clear any
4946 `forced_local' marking for DSO symbols that are not being
4949 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
4951 * elfnn-riscv.c (riscv_elf_object_p): New function.
4953 2017-01-12 H.J. Lu <hongjiu.lu@intel.com>
4956 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
4958 (elf_x86_64_check_relocs): Create .eh_frame section for the
4960 (elf_x86_64_size_dynamic_sections): Allocate and initialize
4961 .eh_frame section for the .plt.bnd section.
4962 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
4963 for the .plt.bnd section.
4965 2017-01-12 Nick Clifton <nickc@redhat.com>
4968 * opncls.c (find_separate_debug_file): Add include_dirs
4969 parameter. Only include the directory part of the bfd's filename
4970 in search paths if include_dirs is true. Add a couple of extra
4971 locations for looking for debug files.
4972 ( bfd_follow_gnu_debuglink): Update invocation of
4973 find_separate_debug_file.
4974 (bfd_follow_gnu_debugaltlink): Likewise.
4975 (get_build_id): New function: Finds the build-id of the given bfd.
4976 (get_build_id_name): New function: Computes the name of the
4977 separate debug info file for a bfd, based upon its build-id.
4978 (check_build_id_file): New function: Checks to see if a separate
4979 debug info file exists at the given location, and that its
4980 build-id matches that of the original bfd.
4981 (bfd_follow_build_id_debuglink): New function: Finds a separate
4982 debug info file for a given bfd by using the build-id method.
4983 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
4984 method of locating a separate debug info file before using the
4986 * bfd-in2.h: Regenerate.
4988 2017-01-11 H.J. Lu <hongjiu.lu@intel.com>
4991 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
4992 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
4993 elf_x86_64_eh_frame_plt_got.
4994 (elf_x86_64_size_dynamic_sections): Get unwind info from
4995 elf_x86_64_bnd_arch_bed for the BND PLT.
4997 2017-01-11 Jeremy Soller <jackpot51@gmail.com>
4999 * config.bfd: Add entries for i686-redox and x86_64-redox.
5001 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
5003 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
5005 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
5006 .eh_frame section to 4 bytes for x32.
5007 (elf_x86_64_check_relocs): Likewise.
5009 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
5012 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
5013 (PLT_GOT_FDE_LENGTH): Likewise.
5014 (elf_i386_plt_layout): Add eh_frame_plt_got and
5015 eh_frame_plt_got_size.
5016 (elf_i386_plt): Updated.
5017 (elf_i386_link_hash_table): Add plt_got_eh_frame.
5018 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
5019 (elf_i386_size_dynamic_sections): Allocate and initialize
5020 .eh_frame section for .plt.got.
5021 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
5023 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
5024 eh_frame_plt_got_size.
5025 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
5026 (PLT_GOT_FDE_LENGTH): Likewise.
5027 (elf_x86_64_backend_data): Add eh_frame_plt_got and
5028 eh_frame_plt_got_size.
5029 (elf_x86_64_arch_bed): Updated.
5030 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
5031 eh_frame_plt_got_size.
5032 (elf_x86_64_nacl_arch_bed): Likewise.
5033 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
5034 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
5035 (elf_x86_64_size_dynamic_sections): Allocate and initialize
5036 .eh_frame section for .plt.got.
5037 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
5040 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
5042 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
5043 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
5045 2017-01-09 Nick Clifton <nickc@redhat.com>
5047 * dwarf2.c (lookup_address_in_function_table): Return early if
5048 there are no functions in the given comp unit, or if the high
5049 address of the last function in the comp unit is less than the
5052 2017-01-09 Nick Clifton <nickc@redhat.com>
5055 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
5056 message if there are too many symbols to load.
5058 2017-01-04 James Clarke <jrtc27@jrtc27.com>
5060 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
5061 if relocs are cached.
5063 2017-01-03 Rich Felker <bugdal@aerifal.cx>
5066 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
5067 for R_MICROBLAZE_GOTOFF_64.
5069 2017-01-03 Nick Clifton <nickc@redhat.com>
5071 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
5072 warning about using a possibly uninitialised variable.
5074 2017-01-02 Alan Modra <amodra@gmail.com>
5076 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
5077 (allocate_plt_static, allocate_dynrelocs): Use it.
5079 2017-01-02 Alan Modra <amodra@gmail.com>
5081 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
5082 .PARISC.unwind section.
5084 2017-01-02 Alan Modra <amodra@gmail.com>
5087 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
5088 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
5089 indirect to GOT pointer relative code edit.
5091 2017-01-02 Alan Modra <amodra@gmail.com>
5093 Update year range in copyright notice of all files.
5095 For older changes see ChangeLog-2016
5097 Copyright (C) 2017 Free Software Foundation, Inc.
5099 Copying and distribution of this file, with or without modification,
5100 are permitted in any medium without royalty provided the copyright
5101 notice and this notice are preserved.
5107 version-control: never