1 2017-11-12 Alan Modra <amodra@gmail.com>
3 * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Set non_got_ref
4 to keep dyn_relocs, clear to discard. Comment.
5 (allocate_dynrelocs): Always clear non_got_ref when clearing
6 dyn_relocs in non-pic case. Invert non_got_ref test. Also test
7 dynamic_adjusted and ELF_COMMON_DEF_P. Move code deleting
8 dyn_relocs on undefined syms to handle for non-pic too.
9 (elf32_hppa_relocate_section): Simplify test for non-pic dyn relocs.
10 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Set non_got_ref
11 to keep dyn_relocs, clear to discard. Comment.
12 (allocate_dynrelocs): Always clear non_got_ref when clearing
13 dyn_relocs in non-pic case. Invert non_got_ref test. Also test
14 dynamic_adjusted and ELF_COMMON_DEF_P. Move code deleting
15 dyn_relocs on undefined syms to handle for non-pic too.
16 (ppc_elf_relocate_section): Simplify test for non-pic dyn relocs.
17 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Discard
18 dyn_relocs here. Don't bother setting non_got_ref. Comment.
19 (allocate_dynrelocs): Delete special handling of non-pic ELFv2
20 ifuncs. Move code deleting dyn_relocs on undefined symbols to
21 handle for non-pic too. Don't test non_got_ref. Do test
22 dynamic_adjusted and ELF_COMMON_DEF_P.
24 2017-11-08 Djordje Todorovic <djordje.todorovic@rt-rk.com>
26 * elf32-mips.c (elf32_mips_grok_psinfo): Extract core->pid.
27 * elf64-mips.c (elf64_mips_grok_psinfo): Likewise.
28 * elfn32-mips.c (elf32_mips_grok_psinfo): Likewise.
30 2017-11-08 Djordje Todorovic <djordje.todorovic@rt-rk.com>
32 * elf32-mips.c (elf32_mips_write_core_note): New function.
33 (elf_backend_write_core_note): New macro.
34 * elf64-mips.c (elf64_mips_write_core_note): New function.
35 (elf_backend_write_core_note): New macro.
36 * elfn32-mips.c (elf32_mips_write_core_note): New function.
37 (elf_backend_write_core_note): New macro.
39 2017-11-07 Alan Modra <amodra@gmail.com>
41 * elf64-ppc.c (ppc64_elf_build_stubs): Correct pluralization in
44 2017-11-07 Alan Modra <amodra@gmail.com>
46 * sysdep.h: Formatting, comment fixes.
47 (gettext, ngettext): Redefine when ENABLE_NLS.
48 (ngettext, dngettext, dcngettext): Define when !ENABLE_NLS.
49 (_): Define using gettext.
50 (textdomain, bindtextdomain): Use safer "do nothing".
51 * hosts/alphavms.h (textdomain, bindtextdomain): Likewise.
52 (ngettext, dngettext, dcngettext): Define when !ENABLE_NLS.
54 2017-11-05 Alan Modra <amodra@gmail.com>
57 * bfd.c (_bfd_doprnt_scan): Check args index before storing, not
60 2017-11-05 Alan Modra <amodra@gmail.com>
63 * bfd.c (union _bfd_doprnt_args): New.
64 (PRINT_TYPE): Add FIELD arg. Take value from args.
65 (_bfd_doprnt): Replace ap parameter with args. Adjust all
66 PRINT_TYPE invocations and reading of format args to suit.
67 Move "%%" handling out of switch handling args. Support
68 positional parameters.
69 (_bfd_doprnt_scan): New function.
70 (error_handler_internal): Call _bfd_doprnt_scan and read args.
72 2017-11-04 Alan Modra <amodra@gmail.com>
74 * elf32-ppc.c (got_entries_needed, got_relocs_needed): New functions.
75 (allocate_dynrelocs, ppc_elf_size_dynamic_sections): Use them here.
76 (ppc_elf_relocate_section): Don't output a dynamic relocation
77 for IE GOT entries in an executable.
78 * elf64-ppc.c (allocate_got): Trim unnecessary TPREL relocs.
79 (ppc64_elf_size_dynamic_sections): Likewise.
80 (ppc64_elf_relocate_section): Likewise.
82 2017-11-04 Alan Modra <amodra@gmail.com>
84 * elf32-ppc.c (readonly_dynrelocs): Delete info param. Update all
85 callers. Don't bother with SEC_ALLOC test. Return section pointer.
87 (maybe_set_textrel): ..here.
88 * elf64-ppc.c (readonly_dynrelocs): Return section pointer.
89 (maybe_set_textrel): Call minfo to print textrel warning to map file.
91 2017-11-04 Alan Modra <amodra@gmail.com>
93 * elf32-hppa.c (enum _tls_type): Move.
94 (struct elf32_hppa_link_hash_entry): Make tls_type a bitfield.
95 (elf32_hppa_check_relocs): Set DF_STATIC_TLS only for shared libraries.
96 Tidy tls_type handling. Set symbol tls_type for GOT_TLS_LDM too.
97 (got_entries_needed, got_relocs_needed): New functions.
98 (allocate_dynrelocs): Use them.
99 (elf32_hppa_size_dynamic_sections): Likewise.
100 (elf32_hppa_relocate_section): Delete bogus FIXME. Formatting.
101 Correct code emitting relocs on GD/IE got entries. Report an
102 error when a symbol has both normal and TLS GOT relocs.
104 2017-11-04 Alan Modra <amodra@gmail.com>
107 * elf32-hppa.c (elf32_hppa_check_relocs): Don't create dyn_relocs
108 for plabels when non-pic.
109 (maybe_set_textrel): New function.
110 (readonly_dynrelocs): Move and rewrite.
111 (elf32_hppa_adjust_dynamic_symbol): Use it. Don't create copy
112 relocs when def_regular or -z nocopyreloc. Handle non_got_ref
113 for functions. Expand non_got_ref comments.
114 (elf32_hppa_size_dynamic_sections): Use maybe_set_textrel.
116 2017-11-03 H.J. Lu <hongjiu.lu@intel.com>
118 * elf32-i386.c (elf_i386_check_relocs): Set plt.refcount to 1.
119 Don't use func_pointer_refcount. Don't set plt.refcount nor
120 non_got_ref for function pointer reference.
121 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
122 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Don't use
123 func_pointer_refcount.
124 (_bfd_x86_elf_copy_indirect_symbol): Don't copy
125 func_pointer_refcount.
126 (_bfd_x86_elf_hide_symbol): Don't use func_pointer_refcount.
127 * elfxx-x86.h (GENERATE_DYNAMIC_RELOCATION_P): Likewise.
128 (elf_x86_link_hash_entry): Remove func_pointer_refcount.
130 2017-11-03 Mingi Cho <mgcho.minic@gmail.com>
131 Nick Clifton <nickc@redhat.com>
134 * coffgen.c (_bfd_coff_get_external_symbols): Check for an
135 overlarge raw syment count.
136 (coff_get_normalized_symtab): Likewise.
138 2017-11-01 James Bowman <james.bowman@ftdichip.com>
140 * archures.c: Add bfd_mach_ft32b.
141 * cpu-ft32.c: Add arch_info_struct.
142 * elf32-ft32.c: Add R_FT32_RELAX, SC0, SC1,
144 (ft32_elf_relocate_section): Add clauses for R_FT32_SC0, SC1,
146 (ft32_reloc_shortable, elf32_ft32_is_diff_reloc)
147 (elf32_ft32_adjust_diff_reloc_value)
148 (elf32_ft32_adjust_reloc_if_spans_insn)
149 (elf32_ft32_relax_delete_bytes, elf32_ft32_relax_is_branch_target)
150 (ft32_elf_relax_section): New function.
151 * reloc.c: Add BFD_RELOC_FT32_RELAX, SC0, SC1, DIFF32.
152 * bfd-in2.h: Regenerate.
153 * libbfd.h: Regenerate.
155 2017-11-01 Nick Clifton <nickc@redhat.com>
158 * coffcode.h (coff_slurp_line_table): Check for an excessively
159 large line number count.
161 2017-11-01 Nick Clifton <nickc@redhat.com>
164 * peicode.h (pe_bfd_read_buildid): Revise check for invalid size
165 and offset in light of further possible bogus values.
167 2017-11-01 Alan Modra <amodra@gmail.com>
170 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't create a plt
171 entry when just a dynamic reloc can serve. Ensure no dynamic
172 relocations when UNDEFWEAK_NO_DYNAMIC_RELOC by setting non_got_ref.
173 Expand and move the non_got_ref comment.
174 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
176 2017-11-01 Nick Clifton <nickc@redhat.com>
179 * coffgen.c (_bfd_coff_free_symbols): Fail if called on a non-COFF
181 * cofflink.c (coff_link_check_archive_element): Skip non-COFF
182 members of an archive.
184 2017-10-31 Nick Clifton <nickc@redhat.com>
187 * peicode.h (pe_bfd_read_buildid): Check for invalid size and data
190 2017-10-30 Alan Modra <amodra@gmail.com>
192 * elf32-frv.c (ELF_TARGET_ID): Don't define for generic
195 * elflink.c (elf_gc_sweep): Test elf_object_id in addition to
197 (bfd_elf_gc_sections): Likewise.
199 2017-10-30 Alan Modra <amodra@gmail.com>
202 * elf32-hppa.c (elf32_hppa_check_relocs): Move SEC_ALLOC test to
203 ensure non_got_ref is not set due to debug references.
204 (elf32_hppa_adjust_dynamic_symbol): Tidy plabel handling. Use
205 SYMBOL_CALLS_LOCAL and UNDEFWEAK_NO_DYNAMIC_RELOC when determining
206 need for a plt entry.
207 (allocate_dynrelocs): Similarly for got entries. Tidy code discarding
208 dynamic relocs when pic. Remove bogus code attempting to handle
210 (elf32_hppa_relocate_section): Similarly. Delete resolved_to_zero
212 (elf32_hppa_finish_dynamic_symbol): Use UNDEFWEAK_NO_DYNAMIC_RELOC
213 and SYMBOL_REFERENCES_LOCAL in GOT handling.
215 2017-10-28 Alan Modra <amodra@gmail.com>
218 * elflink.c (_bfd_elf_merge_symbol): Remove relocs_compatible check.
219 * elf32-hppa.c (elf_backend_relocs_compatible): Define.
220 * elf32-ppc.c (elf_backend_relocs_compatible): Define.
221 * elf64-ppc.c (elf_backend_relocs_compatible): Define.
223 2017-10-25 Alan Modra <amodra@gmail.com>
225 * archive.c (_bfd_compute_and_write_armap): Match "__gnu_lto_slim"
226 optionally prefixed with "_".
227 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
229 2017-10-24 Andrew Waterman <andrew@sifive.com>
231 * elfnn-riscv.c (_bfd_riscv_relax_lui): Don't relax to c.lui
234 2017-10-24 Renlin Li <renlin.li@arm.com>
237 * elflink.c (_bfd_elf_merge_symbol): Handle multiple definition case.
239 2017-10-23 Nick Clifton <nickc@redhat.com>
242 * elflink.c (elf_link_output_extsym): Keep global undefined
243 symbols if they have been marked as needed.
245 2017-10-23 Maciej W. Rozycki <macro@imgtec.com>
247 * elfn32-mips.c (mips_elf_n32_mkobject): New prototype and
249 (bfd_elf32_mkobject): Use `mips_elf_n32_mkobject' rather than
250 `_bfd_mips_elf_mkobject'.
252 2017-10-22 Hans-Peter Nilsson <hp@axis.com>
255 * config.bfd (cris-*-* | crisv32-*-*): Require a 64-bit BFD.
257 2017-10-19 Palmer Dabbelt <palmer@dabbelt.com>
259 * elfnn-riscv.c (riscv_pcgp_hi_reloc): New structure.
260 (riscv_pcgp_lo_reloc): Likewise.
261 (riscv_pcgp_relocs): Likewise.
262 (riscv_init_pcgp_relocs): New function.
263 (riscv_free_pcgp_relocs): Likewise.
264 (riscv_record_pcgp_hi_reloc): Likewise.
265 (riscv_record_pcgp_lo_reloc): Likewise.
266 (riscv_delete_pcgp_hi_reloc): Likewise.
267 (riscv_use_pcgp_hi_reloc): Likewise.
268 (riscv_record_pcgp_lo_reloc): Likewise.
269 (riscv_find_pcgp_lo_reloc): Likewise.
270 (riscv_delete_pcgp_lo_reloc): Likewise.
271 (_bfd_riscv_relax_pc): Likewise.
272 (_bfd_riscv_relax_section): Handle R_RISCV_PCREL_* relocations
273 via the new functions above.
275 2017-10-19 Palmer Dabbelt <palmer@dabbelt.com>
277 * elfnn-riscv.c (R_RISCV_DELETE): New define.
278 (_bfd_riscv_relax_delete): New function.
279 (perform_relocation): Handle R_RISCV_DELETE.
280 (_bfd_riscv_relax_section): Likewise.
282 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
285 * elfxx-tilegx.c (tilegx_elf_tls_transition): Replace
286 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
287 bfd_link_executable for TLS check.
288 (tilegx_elf_check_relocs): Likewise.
289 (allocate_dynrelocs): Likewise.
290 (tilegx_elf_relocate_section): Likewise.
292 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
295 * elf32-tilepro.c (tilepro_elf_tls_transition): Replace
296 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
297 bfd_link_executable for TLS check.
298 (tilepro_elf_check_relocs): Likewise.
299 (allocate_dynrelocs): Likewise.
300 (tilepro_elf_relocate_section): Likewise.
302 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
305 * elfxx-sparc.c (sparc_elf_tls_transition): Replace
306 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
307 bfd_link_executable for TLS check.
308 (_bfd_sparc_elf_check_relocs): Likewise.
309 (allocate_dynrelocs): Likewise.
310 (_bfd_sparc_elf_relocate_section): Likewise.
312 2017-10-18 H.J. Lu <hongjiu.lu@intel.com>
314 * elf32-tilepro.c (tilepro_elf_gc_mark_hook): Call
315 _bfd_generic_link_add_one_symbol to mark __tls_get_addr.
316 * elfxx-tilegx.c (tilegx_elf_gc_mark_hook): Likewise.
318 2017-10-17 H.J. Lu <hongjiu.lu@intel.com>
320 * elf32-microblaze.c (microblaze_elf_check_relocs): Check for
321 indirect and warning symbols.
323 2017-10-17 Alan Modra <amodra@gmail.com>
326 * elf-properties.c (_bfd_elf_parse_gnu_properties): Compare datasz
327 against size left rather than comparing pointers. Reorganise loop.
329 2017-10-17 Alan Modra <amodra@gmail.com>
332 * aoutx.h (aout_get_external_symbols): Handle stringsize of zero,
333 and error for any other size that doesn't cover the header word.
335 2017-10-16 H.J. Lu <hongjiu.lu@intel.com>
337 * elf-bfd.h (elf_backend_data): Remove gc_sweep_hook.
338 * elf32-arm.c (elf32_arm_gc_sweep_hook): Removed.
339 (elf_backend_gc_sweep_hook): Likewise.
340 * elf32-bfin.c (bfin_gc_sweep_hook): Likewise.
341 (bfinfdpic_gc_sweep_hook): Likewise.
342 (elf_backend_gc_sweep_hook): Likewise.
343 * elf32-cr16.c (elf32_cr16_gc_sweep_hook): Likewise.
344 (elf_backend_gc_sweep_hook): Likewise.
345 * elf32-cris.c (cris_elf_gc_sweep_hook): Likewise.
346 (elf_backend_gc_sweep_hook): Likewise.
347 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Likewise.
348 (elf_backend_gc_sweep_hook): Likewise.
349 * elf32-lm32.c (lm32_elf_gc_sweep_hook): Likewise.
350 (elf_backend_gc_sweep_hook): Likewise.
351 * elf32-m32r.c (m32r_elf_gc_sweep_hook): Likewise.
352 (elf_backend_gc_sweep_hook): Likewise.
353 * elf32-m68k.c (elf_m68k_got_entry): Remove elf_m68k_gc_sweep_hook
355 (elf_m68k_remove_got_entry_type): Removed.
356 (elf_m68k_find_got_entry_ptr): Likewise.
357 (elf_m68k_remove_got_entry): Likewise.
358 (elf_m68k_gc_sweep_hook): Likewise.
359 (elf_backend_gc_sweep_hook): Likewise.
360 * elf32-mcore.c (mcore_elf_gc_sweep_hook): Likewise.
361 (elf_backend_gc_sweep_hook): Likewise.
362 * elf32-metag.c (elf_metag_gc_sweep_hook): Likewise.
363 (elf_backend_gc_sweep_hook): Likewise.
364 * elf32-microblaze.c (elf_backend_gc_sweep_hook): Likewise.
365 (elf_backend_gc_sweep_hook): Likewise.
366 * elf32-mips.c (elf_backend_gc_sweep_hook): Likewise.
367 (elf_backend_gc_sweep_hook): Likewise.
368 * elf32-nds32.c (nds32_elf_gc_sweep_hook): Likewise.
369 (elf_backend_gc_sweep_hook): Likewise.
370 * elf32-nios2.c (nios2_elf32_gc_sweep_hook): Likewise.
371 (elf_backend_gc_sweep_hook): Likewise.
372 * elf32-or1k.c (or1k_elf_gc_sweep_hook): Likewise.
373 (elf_backend_gc_sweep_hook): Likewise.
374 * elf32-ppc.c (ppc_elf_gc_sweep_hook): Likewise.
375 (elf_backend_gc_sweep_hook): Likewise.
376 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
377 (elf_backend_gc_sweep_hook): Likewise.
378 * elf32-sparc.c (elf_backend_gc_sweep_hook): Likewise.
379 * elf32-tic6x.c (elf32_tic6x_gc_sweep_hook): Likewise.
380 (elf_backend_gc_sweep_hook): Likewise.
381 * elf32-tilegx.c (elf_backend_gc_sweep_hook): Likewise.
382 * elf32-tilepro.c (tilepro_elf_gc_sweep_hook): Likewise.
383 (elf_backend_gc_sweep_hook): Likewise.
384 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
385 (elf_backend_gc_sweep_hook): Likewise.
386 * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Likewise.
387 (elf_backend_gc_sweep_hook): Likewise.
388 * elf64-alpha.c (elf64_alpha_gc_sweep_hook): Likewise.
389 (elf_backend_gc_sweep_hook): Likewise.
390 * elf64-mips.c (elf_backend_gc_sweep_hook): Likewise.
391 * elf64-mmix.c (mmix_elf_gc_sweep_hook): Likewise.
392 (elf_backend_gc_sweep_hook): Likewise.
393 * elf64-ppc.c (elf_backend_gc_sweep_hook): Likewise.
394 (ppc64_elf_gc_sweep_hook): Likewise.
395 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
396 (elf_backend_gc_sweep_hook): Likewise.
397 * elf64-sparc.c (elf_backend_gc_sweep_hook): Likewise.
398 * elf64-tilegx.c (elf_backend_gc_sweep_hook): Likewise.
399 * elflink.c (elf_link_add_object_symbols): Don't call
400 _bfd_elf_link_check_relocs here.
401 (gc_sweep_hook_fn): Removed.
402 (elf_gc_sweep): Remove gc_sweep_hook.
403 * elfnn-aarch64.c (elfNN_aarch64_gc_sweep_hook): Removed.
404 (elf_backend_gc_sweep_hook): Likewise.
405 * elfnn-riscv.c (riscv_elf_gc_sweep_hook): Likewise.
406 (elf_backend_gc_sweep_hook): Likewise.
407 * elfxx-mips.c (_bfd_mips_elf_gc_sweep_hook): Likewise.
408 * elfxx-mips.h (_bfd_mips_elf_gc_sweep_hook): Likewise.
409 (elf_backend_gc_sweep_hook): Likewise.
410 * elfxx-sparc.c (_bfd_sparc_elf_gc_sweep_hook): Likewise.
411 * elfxx-sparc.h (_bfd_sparc_elf_gc_sweep_hook): Likewise.
412 * elfxx-target.h (elf_backend_gc_sweep_hook): Likewise.
413 (elfNN_bed): Remove elf_backend_gc_sweep_hook.
414 * elfxx-tilegx.c (tilegx_elf_gc_sweep_hook): Removed.
415 * elfxx-tilegx.h (tilegx_elf_gc_sweep_hook): Likewise.
417 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
419 * elf32-i386.c (elf_i386_backend_data): Removed.
420 (get_elf_i386_backend_data): Likewise.
421 (elf_i386_arch_bed): Replace elf_i386_backend_data with
422 elf_x86_backend_data.
423 (elf_i386_get_synthetic_symtab): Likewise.
424 (elf_i386_nacl_arch_bed): Likewise.
425 (elf_i386_vxworks_arch_bed): Likewise.
426 (elf_i386_relocate_section): Check target_os instead of
428 (elf_i386_finish_dynamic_symbol): Likewise.
429 (elf_i386_finish_dynamic_sections): Use htab->plt0_pad_byte.
430 Check target_os instead of is_vxworks.
431 (elf_i386_link_setup_gnu_properties): Remove normal_target and
432 is_vxworks. Initialize plt0_pad_byte.
433 * elf64-x86-64.c (elf_x86_64_backend_data); Removed.
434 (get_elf_x86_64_arch_data): Likewise.
435 (get_elf_x86_64_backend_data): Likewise.
436 (elf_x86_64_arch_bed): Replace elf_x86_64_backend_data with
437 elf_x86_backend_data.
438 (elf_x86_64_get_synthetic_symtab): Likewise.
439 (elf_x86_64_nacl_arch_bed): Likewise.
440 (elf_x86_64_link_setup_gnu_properties): Remove is_vxworks and
441 normal_target. Initialize plt0_pad_byte.
442 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Check target_os
443 instead of is_vxworks.
444 (_bfd_x86_elf_size_dynamic_sections): Likewise.
445 (_bfd_x86_elf_finish_dynamic_sections): Likewise.
446 (_bfd_x86_elf_adjust_dynamic_symbol): Likewise.
447 (_bfd_x86_elf_link_hash_table_create): Initialize target_os.
448 (_bfd_x86_elf_link_setup_gnu_properties): Remove is_vxworks.
449 Update normal_target. Set up plt0_pad_byte. Check target_os
450 instead of is_vxworks.
451 * elfxx-x86.h (elf_x86_target_os): New.
452 (elf_x86_backend_data): Likewise.
453 (get_elf_x86_backend_data): Likewise.
454 (elf_x86_link_hash_table): Remove is_vxworks. Add plt0_pad_byte
456 (elf_x86_init_table): Remove normal_target and is_vxworks. Add
459 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
461 * elf32-i386.c (elf_i386_finish_dynamic_sections): Call
462 _bfd_x86_elf_finish_dynamic_sections.
463 * elf64-x86-64.c (elf_x86_64_finish_dynamic_sections): Likewise.
464 * elfxx-x86.c (_bfd_x86_elf_finish_dynamic_sections): New
466 * elfxx-x86.h (_bfd_x86_elf_finish_dynamic_sections): New
469 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
472 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
473 hide symbol which was forced to be dynamic.
475 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
478 * elf32-cris.c (cris_elf_relocate_section): Don't generate
479 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
480 (cris_elf_check_relocs): Don't allocate dynamic relocation
481 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
483 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
486 * elf32-sh.c (allocate_dynrelocs): Discard dynamic relocations
487 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
488 (sh_elf_relocate_section): Don't generate dynamic relocation if
489 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
491 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
494 * elf32-s390.c (allocate_dynrelocs): Discard dynamic
495 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
496 (elf_s390_relocate_section): Don't generate dynamic relocation
497 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
498 * elf64-s390.c (allocate_dynrelocs): Discard dynamic
499 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
500 (elf_s390_relocate_section): Don't generate dynamic relocation
501 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
503 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
506 * elf32-nios2.c (nios2_elf32_relocate_section): Don't generate
507 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
508 (allocate_dynrelocs): Discard dynamic relocations if
509 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
511 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
514 * elf32-microblaze.c (microblaze_elf_relocate_section): Don't
515 generate dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is
517 (allocate_dynrelocs): Discard dynamic relocations if
518 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
520 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
523 * elf32-m68k.c (elf_m68k_check_relocs): Don't allocate dynamic
524 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
525 (elf_m68k_adjust_dynamic_symbol): Don't make symbol dynamic if
526 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
527 (elf_m68k_relocate_section): Don't generate dynamic relocation
528 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
530 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
533 * elf32-hppa.c (ensure_undef_dynamic): Don't make undefined
534 symbol dynamic if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
535 (allocate_dynrelocs): Discard dynamic relocations if
536 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
537 (elf32_hppa_relocate_section): Don't generate dynamic
538 relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
540 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
543 * elfnn-ia64.c (elfNN_ia64_check_relocs): Don't allocate
544 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
545 (allocate_fptr): Don't allocate function pointer if
546 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
547 (allocate_dynrel_entries): Don't allocate dynamic relocation
548 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
549 (set_got_entry): Don't set GOT entry if
550 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
551 (set_pltoff_entry): Don't set PLTOFF entry if
552 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
553 (elfNN_ia64_relocate_section): Don't install dynamic relocation
554 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
556 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
559 * elfxx-mips.c (mips_elf_calculate_relocation): Don't generate
560 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
561 (allocate_dynrelocs): Don't allocate dynamic relocations if
562 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
564 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
567 * elf32-arm.c (elf32_arm_final_link_relocate): Don't generate
568 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
569 (allocate_dynrelocs_for_symbol): Discard dynamic relocations
570 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
572 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
575 * elf32-tilepro.c (allocate_dynrelocs): Discard dynamic
576 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
577 (tilepro_elf_relocate_section): Don't generate dynamic
578 relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
579 * elfxx-tilegx.c (allocate_dynrelocs): Discard dynamic
580 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
581 (tilegx_elf_relocate_section): Don't generate dynamic
582 relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
584 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
587 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Don't
588 generate dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is
590 (elfNN_aarch64_allocate_dynrelocs): Discard dynamic relocations
591 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
593 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
595 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Moved to ...
596 * elf-bfd.h (UNDEFWEAK_NO_DYNAMIC_RELOC): Here.
597 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Removed.
599 2017-10-12 James Bowman <james.bowman@ftdichip.com>
601 * bfd-in2.h: Regenerate.
602 * libbfd.h: Regenerate.
603 * elf32-ft32.c: Add HOWTO R_FT32_15.
604 * reloc.c: Add BFD_RELOC_FT32_15.
606 2017-10-12 Nick Clifton <nickc@redhat.com>
608 * reloc.c (enum bfd_reloc_status): Start values at 2.
609 * bfd-in2.h: Regenerate.
610 * elfnn-aarch64.c (aarch64_relocate): Invert sense of function, so
611 that a TRUE return indicates success. Compare the result of
612 calling _bfd_aarch64_elf_put_addend against bfd_reloc_ok.
613 (build_one_stub): Change sense of tests against aarch64_relocate
615 (elfNN_aarch64_tls_relax): Return bfd_reloc_notsupported, rather
616 than FALSE, when an error is detected.
617 (elfNN_aarch64_final_link_relocate): Likewise.
619 2017-10-12 H.J. Lu <hongjiu.lu@intel.com>
621 * elf32-i386.c (elf_backend_hide_symbol): New.
622 * elf64-x86-64.c (elf_backend_hide_symbol): Likewise.
623 * elfxx-x86.c (_bfd_x86_elf_hide_symbol): Likewise.
624 * elfxx-x86.h (_bfd_x86_elf_hide_symbol): Likewise.
626 2017-10-12 Alan Modra <amodra@gmail.com>
628 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Call
629 elf_backend_hide_symbol, not _bfd_elf_link_hash_hide_symbol.
630 (bfd_elf_define_start_stop): Likewise.
632 2017-10-12 Alan Modra <amodra@gmail.com>
634 * elf32-nds32.c (nds32_elf_size_dynamic_sections): Set .interp
635 when executable rather than non-PIC.
636 * elf32-score.c (s3_bfd_score_elf_size_dynamic_sections): Likewise.
637 * elf32-score7.c (s7_bfd_score_elf_size_dynamic_sections): Likewise.
639 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
641 * elf-bfd.h (elf_backend_data): Add `linux_prpsinfo64_ugid16'
643 * elf-linux-core.h (elf_external_linux_prpsinfo64): Rename to...
644 (elf_external_linux_prpsinfo64_ugid32): ... this.
645 (swap_linux_prpsinfo32_out): Rename to...
646 (swap_linux_prpsinfo32_ugid32_out): ... this.
647 (elf_external_linux_prpsinfo64_ugid16): New structure.
648 (swap_linux_prpsinfo64_ugid16_out): New function.
649 * elfxx-target.h [!elf_backend_linux_prpsinfo64_ugid16]
650 (elf_backend_linux_prpsinfo64_ugid16): Define.
651 (elfNN_bed): Initialize `linux_prpsinfo64_ugid16' member.
652 * elf.c (elfcore_write_linux_prpsinfo64): Handle both variants
653 of the 64-bit Linux core PRPSINFO note.
654 * elf64-sh64.c (elf_backend_linux_prpsinfo64_ugid16): Define.
656 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
658 * elf-bfd.h (elf_backend_data): Add `linux_prpsinfo32_ugid16'
660 (elfcore_write_ppc_linux_prpsinfo32): Remove prototype.
661 * elf32-ppc.c (elfcore_write_ppc_linux_prpsinfo32): Remove.
662 (elf_external_ppc_linux_prpsinfo32)
663 (swap_ppc_linux_prpsinfo32_out): Move to...
664 * elf-linux-core.h (elf_external_linux_prpsinfo32_ugid32)
665 (swap_linux_prpsinfo32_ugid32_out): ... these.
666 (elf_external_linux_prpsinfo32): Rename to...
667 (elf_external_linux_prpsinfo32_ugid16): ... this.
668 (swap_linux_prpsinfo32_out): Rename to...
669 (swap_linux_prpsinfo32_ugid16_out): ... this.
670 * elfxx-target.h [!elf_backend_linux_prpsinfo32_ugid16]
671 (elf_backend_linux_prpsinfo32_ugid16): Define.
672 (elfNN_bed): Initialize `linux_prpsinfo32_ugid16' member.
673 * elf.c (elfcore_write_linux_prpsinfo32): Handle both variants
674 of the 32-bit Linux core PRPSINFO note.
675 * elf32-am33lin.c (elf_backend_linux_prpsinfo32_ugid16): Define.
676 * elf32-arm.c (elf_backend_linux_prpsinfo32_ugid16): Define.
677 * elf32-cris.c (elf_backend_linux_prpsinfo32_ugid16): Define.
678 * elf32-frv.c (elf_backend_linux_prpsinfo32_ugid16): Define.
679 * elf32-i386.c (elf_backend_linux_prpsinfo32_ugid16): Define.
680 * elf32-m32r.c (elf_backend_linux_prpsinfo32_ugid16): Define.
681 * elf32-m68k.c (elf_backend_linux_prpsinfo32_ugid16): Define.
682 * elf32-s390.c (elf_backend_linux_prpsinfo32_ugid16): Define.
683 * elf32-sh.c (elf_backend_linux_prpsinfo32_ugid16): Define.
684 * elf32-sparc.c (elf_backend_linux_prpsinfo32_ugid16): Define.
686 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
688 * elf-linux-core.h (elf_external_linux_prpsinfo64): Move the
689 `gap' member ahead of `pr_flag'.
691 2017-10-11 Pedro Alves <palves@redhat.com>
693 * bfd.c (_doprnt): Rename to ...
694 (_bfd_doprnt): ... this.
695 (error_handler_internal): Adjust.
697 2017-10-10 H.J. Lu <hongjiu.lu@intel.com>
699 * elf32-i386.c (elf_i386_check_relocs): Set GOT refcount to 1
700 instead of incrementing it.
701 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
703 2017-10-10 Renlin Li <renlin.li@arm.com>
706 * elf32-arm.c (allocate_dynrelocs_for_symbol): Only make undefined weak
707 symbols into dynamic.
709 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
712 * elfnn-riscv.c (riscv_elf_link_hash_table): Add max_alignment.
713 (riscv_elf_link_hash_table_create): Initialize max_alignment to
715 (_bfd_riscv_relax_section): Cache the max alignment of output
716 sections if possible.
718 2017-10-10 Alan Modra <amodra@gmail.com>
720 * elf64-ppc.c (ppc64_elf_before_check_relocs): Set sec_type for
721 .opd whenever .opd is present and non-zero size. Move code
722 setting abiversion to/from output file earlier. Only set
723 u.opd.func_sec when --gc-sections. Read relocs and set up
724 u.opd.func_sec values here..
725 (ppc64_elf_check_relocs): ..rather than here. Simplify opd
727 (ppc64_elf_edit_opd): Don't set sec_type for .opd here.
729 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
731 * elf-m10300.c (mn10300_elf_check_relocs): Don't free cached
734 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
736 * elf32-bfin.c (bfin_size_dynamic_sections): Don't create the
737 .interp section with "ld --no-dynamic-linker".
739 2017-10-09 Alan Modra <amodra@gmail.com>
742 * dwarf2.c (_bfd_dwarf2_cleanup_debug_info): Free
743 funcinfo_hash_table and varinfo_hash_table.
745 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
747 * elf32-sh.c (readonly_dynrelocs): Dump dynamic relocation
748 in read-only section with minfo.
749 (sh_elf_size_dynamic_sections): Likewise.
751 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
753 * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Remove
756 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
758 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_sections): Set
759 this_hdr.sh_entsize only if section size > 0.
761 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
763 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Reformat.
765 2017-10-07 H.J. Lu <hongjiu.lu@intel.com>
767 * elfxx-sparc.c (readonly_dynrelocs): Dump dynamic relocation
768 in read-only section with minfo.
769 (_bfd_sparc_elf_size_dynamic_sections): Likewise.
771 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
773 * elfxx-x86.h (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Update
776 2017-10-06 John Baldwin <jhb@FreeBSD.org>
778 * elf-bfd.h (struct elf_backend_data): Add
779 `elf_backend_grok_freebsd_prstatus'.
780 * elf.c (elfcore_grok_freebsd_note): Call
781 `elf_backend_grok_freebsd_prstatus' to handle NT_PRSTATUS if
783 * elfn32-mips.c (elf_n32_mips_grok_freebsd_prstatus): New
785 (elf_backend_grok_freebsd_prstatus): Define.
786 * elfxx-target.h (elf_backend_grok_freebsd_prstatus): Define.
787 (elfNN_bed): Initialize `elf_backend_grok_freebsd_prstatus'.
789 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
791 * elf32-i386.c (elf_i386_check_relocs): Replace has_got_reloc
792 and has_non_got_reloc with zero_undefweak.
793 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
794 * elfxx-x86.c (_bfd_x86_elf_link_hash_newfunc): Initialize
796 (_bfd_x86_elf_copy_indirect_symbol): Replace has_got_reloc and
797 has_non_got_reloc with zero_undefweak.
798 * elfxx-x86.h (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Replace
799 has_got_reloc and has_non_got_reloc with zero_undefweak.
800 (elf_x86_link_hash_entry): Likewise.
802 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
804 * elfxx-x86.h (COPY_INPUT_RELOC_P): Add "do/while(0);".
805 (VERIFY_COPY_RELOC): Likewise.
807 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
809 * elfxx-x86.h (VERIFY_COPY_RELOC): New.
810 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Use it.
811 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
813 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
815 * elfxx-x86.h (VERIFY_PLT_ENTRY): New.
816 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Use it.
817 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
819 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
821 * elfxx-x86.h (COPY_INPUT_RELOC_P): New.
822 * elf32-i386.c (elf_i386_relocate_section): Use it.
823 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
825 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
827 * elf32-i386.c (X86_SIZE_TYPE_P): New.
828 (elf_i386_relocate_section): Use GENERATE_DYNAMIC_RELOCATION_P.
829 * elf64-x86-64.c (X86_SIZE_TYPE_P): New.
830 (elf_x86_64_relocate_section): Use GENERATE_DYNAMIC_RELOCATION_P.
831 * elfxx-x86.h (GENERATE_DYNAMIC_RELOCATION_P): New.
833 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
835 * elfxx-x86.h (POINTER_LOCAL_IFUNC_P): New.
836 (PLT_LOCAL_IFUNC_P): Likewise.
837 * elf32-i386.c (elf_i386_relocate_section): Use them.
838 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
840 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
842 * elfxx-x86.h (GENERATE_RELATIVE_RELOC_P): New.
843 * elf32-i386.c (elf_i386_relocate_section): Use it.
844 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
846 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
848 * elfxx-x86.h (RESOLVED_LOCALLY_P): New.
849 * elf32-i386.c (elf_i386_relocate_section): Use it.
850 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
852 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
854 * elf32-i386.c (X86_PCREL_TYPE_P): New.
855 (elf_i386_check_relocs): Use NEED_DYNAMIC_RELOCATION_P.
856 * elf64-x86-64.c (IS_X86_64_PCREL_TYPE): Renamed to ...
857 (X86_PCREL_TYPE_P): This.
858 (elf_x86_64_check_relocs): Use NEED_DYNAMIC_RELOCATION_P.
859 Replace IS_X86_64_PCREL_TYPE with X86_PCREL_TYPE_P.
860 (elf_x86_64_relocate_section): Replace IS_X86_64_PCREL_TYPE with
862 * elfxx-x86.h (NEED_DYNAMIC_RELOCATION_P): New.
864 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
866 * elfxx-x86.h (TLS_TRANSITION_IE_TO_LE_P): New.
867 * elf32-i386.c (elf_i386_tls_transition): Use it.
868 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
870 2017-10-05 H.J. Lu <hongjiu.lu@intel.com>
872 * elf32-ppc.c (readonly_dynrelocs): Add a link_info argument.
873 Dump dynamic relocation in read-only section with minfo if
875 (ppc_elf_adjust_dynamic_symbol): Pass NULL to readonly_dynrelocs.
876 (maybe_set_textrel): Likewise.
877 (ppc_elf_size_dynamic_sections): Dump dynamic relocation in
878 read-only section with minfo.
880 2017-10-05 John Baldwin <jhb@FreeBSD.org>
882 * elf.c (elfcore_grok_freebsd_note): Handle NT_ARM_VFP.
884 2017-10-05 H.J. Lu <hongjiu.lu@intel.com>
886 * elf32-tilepro.c (readonly_dynrelocs): Dump dynamic relocation
887 in read-only section with minfo.
888 (tilepro_elf_size_dynamic_sections): Likewise.
889 * elfxx-tilegx.c (readonly_dynrelocs): Likewise.
890 (tilegx_elf_size_dynamic_sections): Likewise.
892 2017-10-05 Pedro Alves <palves@redhat.com>
895 * bfd.c (bfd_set_error): Revert 2017-10-04 change. Remove
896 ellipsis parameter. Split out bfd_error_on_input code to..
897 (bfd_set_input_error): .. New function.
898 * archive.c (_bfd_write_archive_contents): Use bfd_set_input_error.
899 * vms-lib.c (_bfd_vms_lib_write_archive_contents): Likewise.
900 * bfd-in2.h: Regenerate.
902 2017-10-05 Alan Modra <amodra@gmail.com>
904 * elflink.c (elf_link_input_bfd): Correct ctor/dtor in init_array/
905 fini_array error value.
907 2017-10-05 Alan Modra <amodra@gmail.com>
910 * elf.c (_bfd_elf_setup_sections): Don't trim reloc sections from
912 (_bfd_elf_init_reloc_shdr): Pass sec_hdr, use it to copy SHF_GROUP
914 (elf_fake_sections): Adjust calls. Exit immediately on failure.
915 (bfd_elf_set_group_contents): Add associated reloc section indices
918 2017-10-04 Alan Modra <amodra@gmail.com>
920 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't sort or
921 classify symbols for ELFv2.
923 2017-10-04 Pavel I. Kryukov <kryukov@frtk.ru>
926 * bfd.c (bfd_set_error): Avoid UB on passing arg to va_start that
927 undergoes default promotion.
928 * bfd-in2.h: Regenerate.
930 2017-10-02 Alan Modra <amodra@gmail.com>
932 * elf32-ppc.c (ppc_elf_relocate_section): Fix comment typo.
933 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
935 2017-10-01 Alan Modra <amodra@gmail.com>
938 * dwarf2.c (new_line_sorts_after): Remove end_sequence comparison.
939 (add_line_info): Always put end_sequence last.
941 2017-10-01 Alan Modra <amodra@gmail.com>
944 * dwarf2.c (read_section): Allocate buffer with extra byte for
945 bfd_simple_get_relocated_section_contents rather than copying
948 2017-09-29 Alan Modra <amodra@gmail.com>
950 * merge.c (merge_strings): Return FALSE on malloc failure.
951 (_bfd_merge_sections): Return failures from record_section and
954 2017-09-28 Alan Modra <amodra@gmail.com>
957 * elflink.c (_bfd_elf_merge_symbol): Set non_ir_ref_dynamic in
958 a case where plugin_notice isn't called.
960 2017-09-27 Kuan-Lin Chen <kuanlinchentw@gmail.com>
962 * elf32-nds32.c (nds32_elf_relax_section): Fix a tautological
965 2017-09-26 H.J. Lu <hongjiu.lu@intel.com>
968 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't pass
969 output_bfd to info->callbacks->minfo.
971 2017-09-26 Nick Clifton <nickc@redhat.com>
974 * elf64-x86-64.c (elf_x86_64_info_to_howto): Do not trigger an
975 assertion failure if elf_x86_64_rtype_to_howto has already issued
978 2017-09-26 Alan Modra <amodra@gmail.com>
981 * dwarf2.c (read_formatted_entries): Use read_attribute_value to
984 2017-09-26 Nick Clifton <nickc@redhat.com>
987 * dwarf2.c (read_formatted_entries): Fail early if we know that
988 the loop parsing data entries will overflow the end of the
991 2017-09-26 Alan Modra <amodra@gmail.com>
994 * dwarf2.c (struct comp_unit): Delete sec_info_ptr field.
995 (find_abstract_instance_name): Calculate DW_FORM_ref_addr relative
996 to stash->info_ptr_memory, and check die_ref is within that memory.
997 Set info_ptr_end correctly when another CU is refd. Check die_ref
998 for DW_FORM_ref4 etc. is within CU.
1000 2017-09-26 Alan Modra <amodra@gmail.com>
1003 * dwarf2.c (concat_filename): Return "<unknown>" on NULL filename.
1004 (read_formatted_entries): Init "fe".
1005 (decode_line_info <DW_LNE_define_file>): Use line_info_add_file_name.
1007 2017-09-26 Alan Modra <amodra@gmail.com>
1010 * dwarf2.c (decode_line_info): Ensure line_ptr stays within
1011 bounds in inner loop.
1013 2017-09-25 Alan Modra <amodra@gmail.com>
1016 * dwarf1.c (parse_die): Sanity check pointer against section limit
1017 before dereferencing.
1018 (parse_line_table): Likewise.
1020 2017-09-25 Alan Modra <amodra@gmail.com>
1023 * dwarf2.c (scan_unit_for_symbols): Ignore DW_AT_name unless it
1025 (parse_comp_unit): Likewise.
1027 2017-09-25 Alan Modra <amodra@gmail.com>
1030 * dwarf2.c (read_formatted_entries): Error on format_count zero.
1032 2017-09-24 Alan Modra <amodra@gmail.com>
1035 * opncls.c (bfd_get_debug_link_info_1): Properly check that crc is
1036 within section bounds.
1038 2017-09-24 Alan Modra <amodra@gmail.com>
1041 * dwarf2.c (decode_line_info): Properly free line sequences on error.
1043 2017-09-24 Alan Modra <amodra@gmail.com>
1046 * dwarf2.c (find_abstract_instance_name): Add orig_info_ptr and
1047 pname param. Return status. Make name const. Don't abort,
1048 return an error. Formatting. Exit if current info_ptr matches
1049 orig_info_ptr. Update callers.
1050 (scan_unit_for_symbols): Start at nesting_level of zero. Make
1051 nested_funcs an array of structs for extensibility. Formatting.
1053 2017-09-24 Alan Modra <amodra@gmail.com>
1056 * dwarf2.c (decode_line_info): Fail on lh.line_range of zero
1057 rather than dividing by zero.
1059 2017-09-24 Alan Modra <amodra@gmail.com>
1062 * dwarf2.c (decode_line_info): Correct .debug_line unit_length check.
1064 2017-09-24 Alan Modra <amodra@gmail.com>
1067 * dwarf2.c (scan_unit_for_symbols): Check u.blk->data is non-NULL.
1069 2017-09-24 Alan Modra <amodra@gmail.com>
1072 * elf.c (_bfd_elf_slurp_version_tables): Test sh_info on
1073 SHT_GNU_verneed section for sanity. Don't zalloc memory for
1076 2017-09-22 H.J. Lu <hongjiu.lu@intel.com>
1079 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Guard against
1082 2017-09-22 H.J. Lu <hongjiu.lu@intel.com>
1085 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Also return
1086 -1 if bfd_canonicalize_dynamic_reloc returns 0.
1088 2017-09-22 Pedro Alves <palves@redhat.com>
1089 Alan Modra <amodra@gmail.com>
1091 * version.h: Add comment.
1093 2017-09-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1095 * elf.c (elfcore_grok_note): For the cases NT_S390_GS_CB and
1096 NT_S390_GS_BC, correct the previously swapped invocations of
1097 elfcore_grok_s390_gs_bc and elfcore_grok_s390_gs_cb.
1099 2017-09-19 Alan Modra <amodra@gmail.com>
1102 * elf64-ppc.c (ppc64_elf_build_stubs): Don't check glink_eh_frame
1105 2017-09-19 Alan Modra <amodra@gmail.com>
1108 * elflink.c (bfd_elf_size_dynamic_sections): Garbage collect
1109 symbols before calculating verrefs. Don't renumber dynsyms
1110 after gc. Exclude .gnu.version when zero or one dynsym.
1111 Localize some vars and reindent.
1113 2017-09-18 H.J. Lu <hongjiu.lu@intel.com>
1116 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Check error
1117 return from bfd_canonicalize_dynamic_reloc.
1119 2017-09-15 Alan Modra <amodra@gmail.com>
1122 * archive.c (bfd_ar_hdr_from_filesystem): Detect when status.st_size
1123 overflows bfd_size_type.
1125 2017-09-14 H.J. Lu <hongjiu.lu@intel.com>
1128 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument
1129 to indicate if conversion is performed.
1130 (elf_i386_check_relocs): Cache section contents and relocations
1131 if conversion is performed.
1132 * elf64-x86-64.c (elf_x86_64_check_relocs): Cache section
1133 contents and relocations if conversion is performed.
1135 2017-09-14 Nick Clifton <nickc@redhat.com>
1138 * peXXigen.c (pe_print_idata): Extend check for HintName vector
1141 2017-09-13 H.J. Lu <hongjiu.lu@intel.com>
1143 * elfxx-x86.h: Fix a typo in comments.
1145 2017-09-09 Kamil Rytarowski <n54@gmx.com>
1147 * elf32-nds32.c: Rename __BIT() to N32_BIT().
1149 2017-09-09 Alan Modra <amodra@gmail.com>
1151 * elf64-ppp.c (plt_stub_pad): Handle positive and negative
1154 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
1156 * elf32-i386.c (elf_i386_relocate_section): Update usage of
1157 UNDEFINED_WEAK_RESOLVED_TO_ZERO.
1158 (elf_i386_finish_dynamic_symbol): Likewise.
1159 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1160 (elf_x86_64_finish_dynamic_symbol): Likewise.
1161 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Likewise.
1162 (_bfd_x86_elf_fixup_symbol): Likewise.
1164 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
1166 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
1167 check has_non_got_reloc.
1169 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
1172 * elf32-i386.c (elf_i386_convert_load_reloc): Check linker_def.
1173 Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
1174 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Check
1175 linker_def. Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
1176 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Set local_ref
1177 and linker_def on __ehdr_start if it is referenced and not
1179 (_bfd_x86_elf_link_symbol_references_local): Also set local_ref
1180 and return TRUE when building executable, if a symbol has
1181 non-GOT/non-PLT relocations in text section or there is no
1183 * elfxx-x86.h (elf_x86_link_hash_entry): Add linker_def.
1185 2017-09-08 H.J. Lu <hongjiu.lu@intel.com>
1187 * elfxx-x86.h: Update comments.
1189 2017-09-08 H.J. Lu <hongjiu.lu@intel.com>
1191 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Replace
1192 elf_x86_plt_layout_table with elf_x86_init_table.
1193 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
1195 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties):
1197 * elfxx-x86.h (elf_x86_plt_layout_table): Renamed to ...
1198 (elf_x86_init_table): This.
1199 (_bfd_x86_elf_link_setup_gnu_properties): Replace
1200 elf_x86_plt_layout_table with elf_x86_init_table.
1202 2017-09-07 H.J. Lu <hongjiu.lu@intel.com>
1204 * configure.ac (bfd_backends): Don't add elf64-x86-64.lo nor
1205 elf64.lo together with elfxx-x86.lo for 64-bit BFD.
1206 * configure: Regenerated.
1207 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set r_info
1208 and r_sym fields of plt_layout.
1209 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
1211 * elfxx-x86.c (elf_x86_64_is_reloc_section): Remove BFD64 check.
1212 (_bfd_x86_elf_link_hash_table_create): Likewise. Don't set
1213 r_info nor r_sym fields.
1214 (_bfd_x86_elf_link_setup_gnu_properties): Set r_info and r_sym
1216 * elfxx-x86.h (elf_x86_plt_layout_table): Add r_info and r_sym.
1218 2017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
1220 * (_bfd_riscv_relax_align): Call bfd_set_error and
1221 print an error message when unable to relax a .align directive.
1223 2017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
1225 * elfnn-riscv.c (riscv_zero_pcrel_hi_reloc): New function.
1226 (riscv_record_pcrel_hi_reloc): Add absolute argument.
1227 (riscv_elf_relocate_section): Call riscv_zero_pcrel_hi_reloc for
1228 R_RISCV_PCREL_HI20 relocs, and pass the result to
1229 riscv_record_pcrel_hi_reloc.
1231 2017-09-07 H.J. Lu <hongjiu.lu@intel.com>
1233 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument,
1234 r_type_p. Remove the converted argument. Replace
1235 SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P. Return
1236 the new relocation type via r_type_p.
1237 (elf_i386_relocate_section): Likewise.
1238 (elf_i386_finish_dynamic_symbol): Likewise.
1239 (need_convert_load): Removed.
1240 (check_relocs_failed): Updated.
1241 (elf_i386_check_relocs): Call elf_i386_convert_load_reloc,
1242 instead of setting need_convert_load.
1243 (_bfd_i386_elf_convert_load): Removed.
1244 * elf64-x86-64.c (need_convert_load): Removed.
1245 (check_relocs_failed): Updated.
1246 (elf_x86_64_convert_load_reloc): Add an argument, r_type_p.
1247 Replace SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P.
1248 Return the new relocation type via r_type_p.
1249 (elf_x86_64_check_relocs): Call elf_x86_64_convert_load_reloc,
1250 instead of setting need_convert_load.
1251 (elf_x86_64_check_relocs): Don't check PIC if relocation has
1253 (_bfd_x86_64_elf_convert_load): Removed.
1254 (elf_x86_64_relocate_section): Replace SYMBOL_REFERENCES_LOCAL
1255 with SYMBOL_REFERENCES_LOCAL_P.
1256 (elf_x86_64_finish_dynamic_symbol): Likewise.
1257 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Don't
1259 (_bfd_x86_elf_size_dynamic_sections): Don't call convert_load.
1260 (_bfd_x86_elf_link_symbol_references_local): New function.
1261 * elfxx-x86.h (SYMBOL_REFERENCES_LOCAL_P): New.
1262 (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Replace elf.forced_local with
1263 SYMBOL_REFERENCES_LOCAL_P.
1264 (elf_x86_link_hash_entry): Add local_ref.
1265 (elf_x86_link_hash_table): Remove convert_load.
1266 (_bfd_i386_elf_convert_load): Removed.
1267 (_bfd_x86_64_elf_convert_load): Likewise.
1268 (_bfd_x86_elf_link_symbol_references_local): New.
1270 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
1272 * elf64-x86-64.c (R_X86_64_converted_reloc_bit): New.
1273 (elf_x86_64_info_to_howto): Get the real relocation type by
1274 masking out R_X86_64_converted_reloc_bit.
1275 (elf_x86_64_check_tls_transition): Get the real relocation type
1276 by masking out R_X86_64_converted_reloc_bit.
1277 (elf_x86_64_convert_load_reloc): Set R_X86_64_converted_reloc_bit
1278 instead of setting converted_reloc.
1279 (elf_x86_64_relocate_section): Check R_X86_64_converted_reloc_bit
1280 instead of converted_reloc. Get the real relocation type by
1281 masking out R_X86_64_converted_reloc_bit.
1282 (elf_x86_64_link_setup_gnu_properties): Verify that the value of
1283 R_X86_64_converted_reloc_bit is valid.
1284 * elfxx-x86.h (converted_reloc): Removed.
1286 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
1288 * elf32-i386.c (elf_i386_relocate_section): Don't change r_type
1289 when calling elf_i386_tls_transition. Don't use ELF32_R_TYPE
1290 to get the relocation type again.
1291 * elf64-x86-64.c (elf_x86_64_relocate_section): Don't change
1292 r_type when calling elf_x86_64_tls_transition. Don't use
1293 ELF32_R_TYPE to get the relocation type again.
1295 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
1297 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Properly set
1300 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
1302 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Remove the sec
1303 argument. Don't check relocation overflow. Avoid relocation
1304 overflow if --no-relax is used. Set converted_reloc on symbol
1305 if a GOTPCREL relocation is converted.
1306 (elf_x86_64_relocate_section): Issue a fatal error and suggest
1307 --no-relax if GOTPCREL relocation conversion leads to relocation
1309 * elfxx-x86.h (elf_x86_link_hash_entry): Add converted_reloc.
1311 2017-09-05 Alexander Fedotov <alexander.fedotov@nxp.com>
1312 Edmar Wienskoski <edmar.wienskoski@nxp.com
1314 * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_VLE_ADDR20.
1315 (ppc_elf_check_relocs): Handle it.
1316 (ppc_elf_vle_split20): New function.
1317 (ppc_elf_relocate_section): Handle R_PPC_VLE_ADDR20.
1319 2017-09-03 H.J. Lu <hongjiu.lu@intel.com>
1322 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Set tlsdesc_plt
1323 for x86-64 if GOT_TLS_GDESC_P is true.
1325 2017-09-03 Alan Modra <amodra@gmail.com>
1328 * elfxx-x86.h (elf_x86_hash_table): Check is_elf_hash_table first.
1330 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1332 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1333 tls_get_addr for x86-64 in one place.
1335 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1337 * configure.ac (bfd_backends): Add elf64-x86-64.lo together
1338 with elfxx-x86.lo for 64-bit BFD.
1339 * configure: Regenerated.
1341 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1343 * elf32-i386.c (elf_i386_convert_load): Renamed to ...
1344 (_bfd_i386_elf_convert_load): This. Remove static.
1345 (elf_i386_size_dynamic_sections): Removed.
1346 (elf_backend_size_dynamic_sections): Likewise.
1347 * elf64-x86-64.c (elf_x86_64_convert_load): Renamed to ...
1348 (_bfd_x86_64_elf_convert_load): This. Remove static.
1349 (elf_x86_64_size_dynamic_sections): Removed.
1350 (elf_backend_size_dynamic_sections): Likewise.
1351 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): Renamed to ...
1352 (elf_x86_allocate_dynrelocs): This. Make it static.
1353 (_bfd_x86_elf_allocate_local_dynrelocs): Renamed to ...
1354 (elf_x86_allocate_local_dynreloc): This. Make it static.
1355 (elf_i386_is_reloc_section): New function.
1356 (elf_x86_64_is_reloc_section): Likewise.
1357 (_bfd_x86_elf_link_hash_table_create): Initialize convert_load,
1358 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
1359 Rearrange got_entry_size initialization.
1360 (_bfd_x86_elf_size_dynamic_sections): New function.
1361 * elfxx-x86.h (elf_x86_link_hash_table): Add convert_load,
1362 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
1363 (_bfd_i386_elf_convert_load): New.
1364 (_bfd_x86_64_elf_convert_load): Likewise.
1365 (_bfd_x86_elf_size_dynamic_sections): Likewise.
1366 (elf_backend_size_dynamic_sections): Likewise.
1367 (_bfd_x86_elf_allocate_dynrelocs): Removed.
1368 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
1370 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1372 * elfxx-x86.h (elf_x86_link_hash_table): Rearrange fields and
1375 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1377 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
1378 sgotplt_jump_table_size with elf_x86_compute_jump_table_size.
1380 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1382 * elf32-i386.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
1383 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Moved to ...
1384 * elfxx-x86.h (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
1385 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Here.
1386 * elf64-x86-64.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
1387 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Removed.
1389 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1391 * elf32-i386.c (elf_i386_allocate_dynrelocs): Removed.
1392 (elf_i386_allocate_local_dynrelocs): Likewise.
1393 (elf_i386_size_dynamic_sections): Replace
1394 elf_i386_allocate_dynrelocs/elf_i386_allocate_local_dynrelocs
1395 with _bfd_x86_elf_allocate_dynrelocs and
1396 _bfd_x86_elf_allocate_local_dynrelocs.
1397 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Removed.
1398 (elf_x86_64_allocate_local_dynrelocs): Likewise.
1399 (elf_x86_64_size_dynamic_sections): Replace
1400 elf_x86_64_allocate_dynrelocs/elf_x86_64_allocate_local_dynrelocs
1401 with _bfd_x86_elf_allocate_dynrelocs and
1402 _bfd_x86_elf_allocate_local_dynrelocs.
1403 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): New function.
1404 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
1405 * elfxx-x86.h (_bfd_x86_elf_allocate_dynrelocs): New prototype.
1406 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
1408 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1410 * elf32-i386.c (is_i386_elf): Removed.
1411 (elf_i386_check_relocs): Replace is_i386_elf with is_x86_elf.
1412 (elf_i386_size_dynamic_sections): Likewise.
1413 (elf_i386_relocate_section): Likewise.
1414 * elf64-x86-64.c (is_x86_64_elf): Removed.
1415 (elf_x86_64_check_relocs): Replace is_x86_64_elf with
1417 (elf_x86_64_size_dynamic_sections): Likewise.
1418 (elf_x86_64_relocate_section): Likewise.
1419 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1421 * elfxx-x86.h (elf_x86_link_hash_table): Add target_id.
1424 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1426 * elf32-i386.c (elf_i386_compute_jump_table_size): Removed.
1427 (elf_i386_allocate_dynrelocs): Replace
1428 elf_i386_compute_jump_table_size with
1429 elf_x86_compute_jump_table_size.
1430 (elf_i386_size_dynamic_sections): Likewise.
1431 * elf64-x86-64.c (elf_x86_64_compute_jump_table_size): Removed.
1432 (elf_x86_64_allocate_dynrelocs): Replace
1433 elf_x86_64_compute_jump_table_size with
1434 elf_x86_compute_jump_table_size.
1435 (elf_x86_64_size_dynamic_sections): Likewise.
1436 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1438 * elfxx-x86.h (elf_x86_link_hash_table): Add got_entry_size.
1439 (elf_x86_compute_jump_table_size): New.
1441 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1443 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1445 (_bfd_x86_elf_adjust_dynamic_symbol): Use sizeof_reloc.
1446 * elfxx-x86.h (elf_x86_link_hash_table): Add sizeof_reloc.
1448 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1450 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check VxWorks
1451 with htab->is_vxworks.
1452 (elf_i386_size_dynamic_sections): Likewise.
1453 (elf_i386_relocate_section): Likewise.
1454 (elf_i386_finish_dynamic_symbol): Likewise.
1455 (elf_i386_finish_dynamic_sections): Likewise.
1457 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1459 * elf32-i386.c (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
1460 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
1461 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Moved to ...
1462 * elfxx-x86.h (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
1463 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
1464 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Here.
1465 * elf64-x86-64.c (GOT_TLS_IE, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
1466 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Removed.
1468 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1471 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Check
1472 ELF_COMMON_DEF_P for common symbols.
1474 2017-09-02 Alan Modra <amodra@gmail.com>
1476 * elf-eh-frame.c (offset_adjust): Avoid false positive gcc warning.
1477 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Likewise.
1478 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
1480 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1482 * elf32-i386.c (elf_i386_gc_mark_hook): Removed.
1483 (elf_backend_gc_mark_hook): Likewise.
1484 * elf64-x86-64.c (elf_x86_64_gc_mark_hook): Likewise.
1485 (elf_backend_gc_mark_hook): Likewise.
1486 * elfxx-x86.c (_bfd_x86_elf_gc_mark_hook): New function.
1487 * elfxx-x86.h (_bfd_x86_elf_gc_mark_hook): New.
1488 (elf_backend_gc_mark_hook): Likewise.
1490 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1492 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Removed.
1493 (elf_backend_adjust_dynamic_symbol): Likewise.
1494 * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise.
1495 (elf_backend_adjust_dynamic_symbol): Likewise.
1496 * elfxx-x86.c (_bfd_x86_elf_adjust_dynamic_symbol): New function.
1497 (_bfd_x86_elf_link_setup_gnu_properties): Copy is_vxworks.
1498 * elfxx-x86.h (elf_x86_link_hash_table): Add is_vxworks.
1499 (_bfd_x86_elf_adjust_dynamic_symbol): New.
1500 (elf_backend_adjust_dynamic_symbol): Likewise.
1502 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1504 * elfxx-x86.h (elf_x86_plt_layout_table): Fix a typo in
1507 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1509 * elf32-i386.c (elf_i386_mkobject): Removed.
1510 (bfd_elf32_mkobject): Likewise.
1511 * elf64-x86-64.c (elf_x86_64_mkobject): Likewise.
1512 (bfd_elf64_mkobject): Likewise.
1513 (bfd_elf32_mkobject): Likewise.
1514 * elfxx-x86.c (_bfd_x86_elf_mkobject): New function.
1515 * elfxx-x86.h (_bfd_x86_elf_mkobject): New.
1516 (bfd_elf64_mkobject): Likewise.
1517 (bfd_elf32_mkobject): Likewise.
1519 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1521 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Updated.
1522 Call _bfd_x86_elf_link_setup_gnu_properties.
1523 * elf64-x86-64.c (elf_x86_lazy_plt_layout): Initialize
1524 pic_plt0_entry and pic_plt_entry fields with the non-PIC PLT
1526 (elf_x86_64_non_lazy_plt): Likewise.
1527 (elf_x86_64_lazy_bnd_plt): Likewise.
1528 (elf_x86_64_non_lazy_bnd_plt): Likewise.
1529 (elf_x86_64_lazy_ibt_plt): Likewise.
1530 (elf_x32_lazy_ibt_plt): Likewise.
1531 (elf_x86_64_non_lazy_ibt_plt): Likewise.
1532 (elf_x32_non_lazy_ibt_plt): Likewise.
1533 (elf_x86_64_nacl_plt): Likewise.
1534 (elf_x86_64_link_setup_gnu_properties): Updated. Call
1535 _bfd_x86_elf_link_setup_gnu_properties.
1536 * elfxx-x86.c: Include elf-vxworks.h".
1537 (_bfd_x86_elf_link_setup_gnu_properties): New function.
1538 * elfxx-x86.h (elf_x86_lazy_plt_layout): Remove "for i386 only"
1539 comments for pic_plt0_entry and pic_plt_entry.
1540 (elf_x86_non_lazy_plt_layout): Likewise.
1541 (elf_x86_plt_layout_table): New.
1542 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
1544 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1547 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Create
1548 .eh_frame section for the second PLT.
1549 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Correct
1550 alignment of .eh_frame section for the second PLT.
1552 2017-09-01 Nick Clifton <nickc@redhat.com>
1555 * dwarf2.c (decode_line_info): Fix test for an overlong line info
1558 2017-09-01 Nick Clifton <nickc@redhat.com>
1561 * elf-attrs.c (_bfd_elf_parse_attributes): Ensure that the
1562 attribute buffer is NUL terminated.
1564 2017-08-31 Nick Clifton <nickc@redhat.com>
1567 * dwarf2.c (read_section): If necessary add a terminating NUL byte
1568 to dwarf string sections.
1570 2017-08-31 Alan Modra <amodra@gmail.com>
1572 * po/SRC-POTFILES.in: Regenerate.
1574 2017-08-31 Alan Modra <amodra@gmail.com>
1576 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Don't exit early
1577 for a section containing just a terminator. Allow multiple
1578 terminators at end of section.
1579 * elflink.c (bfd_elf_discard_info): Iterate over .eh_frame
1580 sections when not adding alignment. Assert on terminator in
1583 2017-08-31 Alan Modra <amodra@gmail.com>
1587 * elflink.c (bfd_elf_discard_info): Don't pad embedded zero
1590 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1592 * configure.ac (bfd_backends): Add elf64.lo together with
1593 elfxx-x86.lo for 64-bit BFD.
1594 * configure: Regenerated.
1596 2017-08-31 James Bowman <james.bowman@ftdichip.com>
1598 * elf32-ft32.c (ft32_elf_howto_table): Use complain_overflow_dont
1601 2017-08-31 Alan Modra <amodra@gmail.com>
1604 * opncls.c (bfd_close_all_done): Don't call bfd_cache_close
1605 before _close_and_cleanup. Call iovec->bclose after.
1606 (bfd_close): Remove code common to, and call, bfd_close_all_done.
1608 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1610 * elf32-i386.c (elf_i386_plt_type): Removed.
1611 (elf_i386_plt): Likewise.
1612 (elf_i386_get_synthetic_symtab): Updated. Call
1613 _bfd_x86_elf_get_synthetic_symtab.
1614 * elf64-x86-64.c (elf_x86_64_plt_type): Removed.
1615 (elf_x86_64_plt): Likewise.
1616 (elf_x86_64_get_synthetic_symtab): Updated. Call
1617 _bfd_x86_elf_get_synthetic_symtab.
1618 * elfxx-x86.c (elf_i386_get_plt_got_vma): New function.
1619 (elf_x86_64_get_plt_got_vma): Likewise.
1620 (elf_i386_valid_plt_reloc_p): Likewise.
1621 (elf_x86_64_valid_plt_reloc_p): Likewise.
1622 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
1623 * elfxx-x86.h (elf_x86_plt_type): New.
1624 (elf_x86_plt): Likewise.
1625 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
1627 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1629 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Check
1630 target_id instead of elf_machine_code.
1632 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1634 * elf32-i386.c (ELF_DYNAMIC_INTERPRETER): Removed.
1635 (elf_i386_lazy_plt_layout): Likewise.
1636 (elf_i386_non_lazy_plt_layout): Likewise.
1637 (elf_i386_plt_layout): Likewise.
1638 (elf_i386_link_hash_table): Likewise.
1639 (elf_i386_next_tls_desc_index): Likewise.
1640 (elf_i386_srelplt2): Likewise.
1641 (elf_i386_plt): Likewise.
1642 (elf_i386_lazy_plt): Likewise.
1643 (elf_i386_non_lazy_plt): Likewise.
1644 (elf_i386_link_hash_table_create): Likewise.
1645 (bfd_elf32_bfd_link_hash_table_create): Likewise.
1646 (elf_i386_lazy_plt): Updated.
1647 (elf_i386_non_lazy_plt): Likewise.
1648 (elf_i386_lazy_ibt_plt): Likewise.
1649 (elf_i386_non_lazy_ibt_plt): Likewise.
1650 (elf_i386_allocate_dynrelocs): Likewise.
1651 (elf_i386_size_dynamic_sections): Likewise.
1652 (elf_i386_relocate_section): Likewise.
1653 (elf_i386_finish_dynamic_symbol): Likewise.
1654 (elf_i386_finish_dynamic_sections): Likewise.
1655 (elf_i386_get_synthetic_symtab): Likewise.
1656 (elf_i386_link_setup_gnu_properties): Likewise.
1657 (elf_i386_nacl_plt): Likewise.
1658 * elf64-x86-64.c (ABI_64_P): Removed.
1659 (ELF64_DYNAMIC_INTERPRETER): Likewise.
1660 (ELF32_DYNAMIC_INTERPRETER): Likewise.
1661 (elf_x86_64_lazy_plt_layout): Likewise.
1662 (elf_x86_64_non_lazy_plt_layout): Likewise.
1663 (elf_x86_64_plt_layout): Likewise.
1664 (elf_x86_64_link_hash_table): Likewise.
1665 (elf_x86_64_plt): Likewise.
1666 (elf_x86_64_lazy_plt): Likewise.
1667 (elf_x86_64_non_lazy_plt): Likewise.
1668 (elf_x86_64_link_hash_table_create): Likewise.
1669 (bfd_elf64_bfd_link_hash_table_create): Likewise.
1670 (bfd_elf32_bfd_link_hash_table_create): Likewise.
1671 (elf_x86_64_lazy_plt): Updated.
1672 (elf_x86_64_non_lazy_plt): Likewise.
1673 (elf_x86_64_lazy_bnd_plt): Likewise.
1674 (elf_x86_64_non_lazy_bnd_plt): Likewise.
1675 (elf_x86_64_lazy_ibt_plt): Likewise.
1676 (elf_x32_lazy_ibt_plt): Likewise.
1677 (elf_x86_64_non_lazy_ibt_plt): Likewise.
1678 (elf_x32_non_lazy_ibt_plt): Likewise.
1679 (elf_x86_64_allocate_dynrelocs): Likewise.
1680 (elf_x86_64_size_dynamic_sections): Likewise.
1681 (elf_x86_64_relocate_section): Likewise.
1682 (elf_x86_64_finish_dynamic_symbol): Likewise.
1683 (elf_x86_64_finish_dynamic_sections): Likewise.
1684 (elf_x86_64_get_synthetic_symtab): Likewise.
1685 (elf_x86_64_link_setup_gnu_properties): Likewise.
1686 (elf_x86_64_nacl_plt): Likewise.
1687 * elfxx-x86.c: Include "objalloc.h", "elf/i386.h" and
1689 (ELF32_DYNAMIC_INTERPRETER): New.
1690 (ELF64_DYNAMIC_INTERPRETER): Likewise.
1691 (ELFX32_DYNAMIC_INTERPRETER): Likewise.
1692 (_bfd_x86_elf_link_hash_table_create): Likewise.
1693 (_bfd_x86_elf_link_hash_table_free): Renamed to ...
1694 (elf_x86_link_hash_table_free): This. Make it static.
1695 * elfxx-x86.h: Don't include "objalloc.h".
1697 (elf_x86_lazy_plt_layout): Likewise.
1698 (elf_x86_non_lazy_plt_layout): Likewise.
1699 (elf_x86_plt_layout): Likewise.
1700 (_bfd_x86_elf_link_hash_table_create): Likewise.
1701 (bfd_elf64_bfd_link_hash_table_create): Likewise.
1702 (bfd_elf32_bfd_link_hash_table_create): Likewise.
1703 (elf_x86_link_hash_table): Add plt, lazy_plt, non_lazy_plt,
1704 srelplt2 and next_tls_desc_index.
1705 (_bfd_x86_elf_link_hash_table_free): Removed.
1707 2017-08-30 Maciej W. Rozycki <macro@imgtec.com>
1709 * elfxx-mips.c (mips_elf_perform_relocation): Correct microMIPS
1710 branch offset interpretation.
1712 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1715 * opncls.c (bfd_close_all_done): Call _close_and_cleanup.
1717 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1719 * elf64-x86-64.c (elf_x86_64_next_tls_desc_index): Removed.
1720 (elf_x86_64_srelplt2): Likewise.
1722 2017-08-30 Alan Modra <amodra@gmail.com>
1724 * elf64-ppc.c (struct ppc_link_hash_table): Add do_tls_opt.
1725 (ppc64_elf_tls_optimize): Set it.
1726 (ppc64_elf_relocate_section): Nop addis on TPREL16_HA, and convert
1727 insn on TPREL16_LO and TPREL16_LO_DS relocs to use r13 when
1728 addis would add zero.
1729 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add do_tls_opt.
1730 (ppc_elf_tls_optimize): Set it.
1731 (ppc_elf_relocate_section): Nop addis on TPREL16_HA, and convert
1732 insn on TPREL16_LO relocs to use r2 when addis would add zero.
1734 2017-08-30 Alan Modra <amodra@gmail.com>
1736 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing
1737 __tls_get_addr call sequences to LE, don't move the addi down
1738 to the nop. Replace the bl with addi and leave the nop alone.
1740 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1742 * elf32-i386.c (elf_i386_pie_finish_undefweak_symbol):
1744 * elf64-x86-64.c (elf_x86_64_finish_local_dynamic_symbol):
1746 (elf_x86_64_pie_finish_undefweak_symbol): Likewise.
1748 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1750 * Makefile.am (BFD32_BACKENDS): Add elfxx-x86.lo.
1751 (BFD64_BACKENDS): Likewise.
1752 (BFD32_BACKENDS_CFILES): Add elfxx-x86.c.
1753 (BFD64_BACKENDS_CFILES): Likewise.
1754 * Makefile.in: Regenerated.
1755 * configure.ac (bfd_backends): Add elfxx-x86.lo together with
1756 elf32-i386.lo and elf64-x86-64.lo.
1757 * configure: Regenerated.
1758 * elf32-i386.c: Include "elfxx-x86.h" instead of "sysdep.h",
1759 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
1760 "objalloc.h" and "hashtab.h".
1761 (ELIMINATE_COPY_RELOCS): Removed.
1762 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
1763 (SYMBOL_NO_COPYRELOC): Likewise.
1764 (elf_i386_link_hash_entry): Likewise.
1765 (GOT_UNKNOWN): Likewise.
1766 (GOT_NORMAL): Likewise.
1767 (GOT_TLS_GD): Likewise.
1768 (elf_i386_hash_entry): Likewise.
1769 (elf_i386_obj_tdata): Likewise.
1770 (elf_i386_tdata): Likewise.
1771 (elf_i386_local_got_tls_type): Likewise.
1772 (elf_i386_local_tlsdesc_gotent): Likewise.
1773 (elf_i386_hash_table): Likewise.
1774 (elf_i386_link_hash_newfunc): Likewise.
1775 (elf_i386_local_htab_hash): Likewise.
1776 (elf_i386_local_htab_eq): Likewise.
1777 (elf_i386_get_local_sym_hash): Likewise.
1778 (elf_i386_link_hash_table_free): Likewise.
1779 (elf_i386_copy_indirect_symbol): Likewise.
1780 (elf_i386_fixup_symbol): Likewise.
1781 (elf_i386_readonly_dynrelocs): Likewise.
1782 (elf_i386_always_size_sections): Likewise.
1783 (elf_i386_set_tls_module_base): Likewise.
1784 (elf_i386_dtpoff_base): Likewise.
1785 (compare_relocs): Likewise.
1786 (elf_i386_hash_symbol): Likewise.
1787 (elf_i386_parse_gnu_properties): Likewise.
1788 (elf_i386_merge_gnu_properties): Likewise.
1789 (elf_i386_link_check_relocs): Likewise.
1790 (elf_i386_merge_symbol_attribute): Likewise.
1791 (bfd_elf32_bfd_link_check_relocs): Likewise.
1792 (elf_backend_copy_indirect_symbol): Likewise.
1793 (elf_backend_always_size_sections): Likewise.
1794 (elf_backend_omit_section_dynsym): Likewise.
1795 (elf_backend_hash_symbol): Likewise.
1796 (elf_backend_fixup_symbol): Likewise.
1797 (elf_backend_parse_gnu_properties): Likewise.
1798 (elf_backend_merge_gnu_properties): Likewise.
1799 (elf_backend_merge_symbol_attribute): Likewise.
1800 (elf_i386_mkobject): Updated.
1801 (elf_i386_link_hash_table_create): Likewise.
1802 (elf_i386_check_tls_transition): Likewise.
1803 (elf_i386_tls_transition): Likewise.
1804 (elf_i386_convert_load_reloc): Likewise.
1805 (elf_i386_check_relocs): Likewise.
1806 (elf_i386_adjust_dynamic_symbol): Likewise.
1807 (elf_i386_allocate_dynrelocs): Likewise.
1808 (elf_i386_convert_load): Likewise.
1809 (elf_i386_size_dynamic_sections): Likewise.
1810 (elf_i386_relocate_section): Likewise.
1811 (elf_i386_finish_dynamic_symbol ): Likewise.
1812 (elf_i386_finish_dynamic_sections): Likewise.
1813 (elf_i386_output_arch_local_syms): Likewise.
1814 (elf_i386_get_synthetic_symtab): Likewise.
1815 (elf_i386_link_setup_gnu_properties): Likewise.
1816 (elf_i386_link_hash_table): Use elf_x86_link_hash_table, instead
1817 of elf_link_hash_table, as base.
1818 (elf_i386_next_tls_desc_index): New.
1819 (elf_i386_srelplt2): Likewise.
1820 (elf_i386_plt): Likewise.
1821 (elf_i386_lazy_plt): Likewise.
1822 (elf_i386_non_lazy_plt): Likewise.
1823 * elf32-x86-64.c: Include "elfxx-x86.h" instead of "sysdep.h",
1824 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
1825 "objalloc.h" and "hashtab.h".
1826 (ELIMINATE_COPY_RELOCS): Removed.
1827 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
1828 (SYMBOL_NO_COPYRELOC): Likewise.
1829 (elf_x86_64_link_hash_entry): Likewise.
1830 (GOT_UNKNOWN): Likewise.
1831 (GOT_NORMAL): Likewise.
1832 (GOT_TLS_GD): Likewise.
1833 (elf_x86_64_hash_entry): Likewise.
1834 (elf_x86_64_obj_tdata): Likewise.
1835 (elf_x86_64_tdata): Likewise.
1836 (elf_x86_64_local_got_tls_type): Likewise.
1837 (elf_x86_64_local_tlsdesc_gotent): Likewise.
1838 (elf_x86_64_hash_table): Likewise.
1839 (elf_x86_64_link_hash_newfunc): Likewise.
1840 (elf_x86_64_local_htab_hash): Likewise.
1841 (elf_x86_64_local_htab_eq): Likewise.
1842 (elf_x86_64_get_local_sym_hash): Likewise.
1843 (elf_x86_64_link_hash_table_free): Likewise.
1844 (elf_x86_64_copy_indirect_symbol): Likewise.
1845 (elf_x86_64_fixup_symbol): Likewise.
1846 (elf_x86_64_readonly_dynrelocs): Likewise.
1847 (elf_x86_64_always_size_sections): Likewise.
1848 (elf_x86_64_set_tls_module_base): Likewise.
1849 (elf_x86_64_dtpoff_base): Likewise.
1850 (compare_relocs): Likewise.
1851 (elf_x86_64_merge_symbol_attribute): Likewise.
1852 (elf_x86_64_hash_symbol): Likewise.
1853 (elf_x86_64_parse_gnu_properties): Likewise.
1854 (elf_x86_64_merge_gnu_properties): Likewise.
1855 (elf_x86_64_link_check_relocs): Likewise.
1856 (elf_backend_copy_indirect_symbol): Likewise.
1857 (elf_backend_always_size_sections): Likewise.
1858 (bfd_elf64_bfd_link_check_relocs): Likewise.
1859 (elf_backend_merge_symbol_attribute): Likewise.
1860 (elf_backend_hash_symbol): Likewise.
1861 (elf_backend_omit_section_dynsym): Likewise.
1862 (elf_backend_fixup_symbol): Likewise.
1863 (elf_backend_parse_gnu_properties): Likewise.
1864 (elf_backend_merge_gnu_properties): Likewise.
1865 (bfd_elf32_bfd_link_check_relocs): Likewise.
1866 (elf_x86_64_mkobject): Updated.
1867 (elf_x86_64_link_hash_table_create): Likewise.
1868 (elf_x86_64_check_tls_transition): Likewise.
1869 (elf_x86_64_tls_transition): Likewise.
1870 (elf_x86_64_convert_load_reloc): Likewise.
1871 (elf_x86_64_check_relocs): Likewise.
1872 (elf_x86_64_adjust_dynamic_symbol): Likewise.
1873 (elf_x86_64_allocate_dynrelocs): Likewise.
1874 (elf_x86_64_convert_load): Likewise.
1875 (elf_x86_64_size_dynamic_sections): Likewise.
1876 (elf_x86_64_relocate_section): Likewise.
1877 (elf_x86_64_finish_dynamic_symbol ): Likewise.
1878 (elf_x86_64_finish_dynamic_sections): Likewise.
1879 (elf_x86_64_output_arch_local_syms): Likewise.
1880 (elf_x86_64_get_synthetic_symtab): Likewise.
1881 (elf_x86_64_link_setup_gnu_properties): Likewise.
1882 (elf_x86_64_link_hash_table): Use elf_x86_link_hash_table,
1883 instead of elf_link_hash_table, as base.
1884 (elf_x86_64_next_tls_desc_index): New.
1885 (elf_x86_64_srelplt2): Likewise.
1886 (elf_x86_64_plt): Likewise.
1887 (elf_x86_64_lazy_plt): Likewise.
1888 (elf_x86_64_non_lazy_plt): Likewise.
1889 * elfxx-x86.c: New file.
1890 * elfxx-x86.h: Likewise.
1892 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1894 * elf32-i386.c (elf_i386_get_synthetic_symtab): Simplify bad
1896 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1898 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1900 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check valid PLT
1901 sections before checking dynamic relocations and free invalid
1902 PLT section contents.
1903 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1905 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
1907 * elf-bfd.h (_bfd_elf_ifunc_get_synthetic_symtab): Removed.
1908 * elf-ifunc.c (_bfd_elf_ifunc_get_synthetic_symtab): Likewise.
1910 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
1913 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check for valid
1915 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1917 2017-08-27 H.J. Lu <hongjiu.lu@intel.com>
1919 * elf32-i386.c (elf_i386_link_hash_newfunc): Initialize
1921 * elf64-x86-64.c (elf_x86_64_link_hash_newfunc): Likewise.
1923 2017-08-26 H.J. Lu <hongjiu.lu@intel.com>
1926 * elf-bfd.h (elf_obj_tdata): Use ENUM_BITFIELD on object_id,
1927 dyn_lib_class and has_gnu_symbols. Change bad_symtab to bitfield.
1928 Add a has_no_copy_on_protected bitfield.
1929 (elf_has_no_copy_on_protected): New.
1930 * elf-properties.c (_bfd_elf_parse_gnu_properties): Set
1931 elf_has_no_copy_on_protected for GNU_PROPERTY_NO_COPY_ON_PROTECTED.
1932 (elf_merge_gnu_property_list): Likewise.
1933 (_bfd_elf_link_setup_gnu_properties): Set extern_protected_data
1934 to FALSE for elf_has_no_copy_on_protected.
1935 * elf32-i386.c (SYMBOL_NO_COPYRELOC): New.
1936 (elf_i386_link_hash_entry): Add def_protected.
1937 (elf_i386_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
1938 when checking info->nocopyreloc.
1939 (elf_i386_link_setup_gnu_properties): Don't set
1940 extern_protected_data here.
1941 (elf_i386_merge_symbol_attribute): New function.
1942 (elf_backend_merge_symbol_attribute): New.
1943 * elf64-x86-64.c (SYMBOL_NO_COPYRELOC): New.
1944 (elf_x86_64_link_hash_entry): Add def_protected.
1945 (elf_x86_64_need_pic): Report protected symbol for def_protected.
1946 (elf_x86_64_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
1947 when checking info->nocopyreloc.
1948 (elf_x86_64_relocate_section): Also check for R_X86_64_PC32
1949 relocation run-time overflow and unresolvable R_X86_64_32S
1950 relocation against protected data symbol defined in shared object
1951 with GNU_PROPERTY_NO_COPY_ON_PROTECTED.
1952 (elf_x86_64_link_setup_gnu_properties): Don't set
1953 extern_protected_data here.
1954 (elf_x86_64_merge_symbol_attribute): New function.
1955 (elf_backend_merge_symbol_attribute): New.
1957 2017-08-26 Alan Modra <amodra@gmail.com>
1959 * elf32-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
1960 (ppc_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
1961 (ppc_elf_relocate_section): Comment fix.
1962 * elf64-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
1963 (ppc64_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
1964 Support dynamic relocs for TPREL16 when non-pic too.
1965 (dec_dynrel_count): Adjust TPREL16 handling as per check_relocs.
1966 (ppc64_elf_relocate_section): Support dynamic relocs for TPREL16
1969 2017-08-25 H.J. Lu <hongjiu.lu@intel.com>
1971 * elf32-i386.c (elf_i386_link_hash_entry): Remove redundant
1972 "symbol" in comments.
1973 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Likewise.
1975 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
1978 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for
1979 R_X86_64_PC32 relocation run-time overflow and unresolvable
1980 R_X86_64_32S relocation with -z nocopyreloc.
1982 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
1984 * elf32-i386.c (elf_i386_check_relocs): Revert the last change.
1985 Undefined symbols may not have a type.
1986 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1988 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1990 * elf64-x86-64.c (elf_x86_64_need_pic): Add an argument for
1991 bfd_link_info. Report shared, PIE or PDE object based on
1993 (elf_x86_64_check_relocs): Update elf_x86_64_need_pic call.
1994 (elf_x86_64_relocate_section): Likewise.
1996 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1998 * elf32-i386.c (elf_i386_check_relocs): Increment PLT count only
1999 for function symbols.
2000 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
2002 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
2004 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set
2005 extern_protected_data to FALSE if GNU_PROPERTY_NO_COPY_ON_PROTECTED
2006 is set on any input relocatable file.
2007 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
2009 2017-08-23 Alan Modra <amodra@gmail.com>
2012 * elf64-ppc.c (ensure_undef_dynamic): Rename from
2013 ensure_undefweak_dynamic. Handle undefined too.
2014 * elf32-ppc.c (ensure_undef_dynamic): Likewise.
2015 * elf32-hppa.c (ensure_undef_dynamic): Likewise.
2016 (allocate_dynrelocs): Discard undefined non-default visibility
2017 relocs first. Make undefined syms dynamic. Tidy goto.
2019 2017-08-21 Alan Modra <amodra@gmail.com>
2020 H.J. Lu <hongjiu.lu@intel.com>
2023 * elf-bfd.h (SYMBOLIC_BIND): Return TRUE for __start/__stop symbols.
2024 * elflink.c (bfd_elf_define_start_stop): Rewrite.
2026 2017-08-21 Hans-Peter Nilsson <hp@bitrange.com>
2029 * elf64-mmix.c (mmix_elf_relax_section): Correct handling of
2030 undefined weak symbols.
2032 2017-08-18 Nick Clifton <nickc@redhat.com>
2035 * tekhex.c (getsym): Fix check for source pointer walking off the
2036 end of the input buffer.
2038 2017-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
2041 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Skip IFUNC
2042 relocations in debug sections, change abort to _bfd_error_handler.
2044 2017-08-14 Nick Clifton <nickc@redhat.com>
2047 * elf.c (setup_group): Check for an empty or very small group
2049 * po/bfd.pot: Regenerate.
2051 2017-08-14 Alan Modra <amodra@gmail.com>
2054 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't add
2055 alignment padding here.
2056 * elflink.c (bfd_elf_discard_info): Add .eh_frame padding here
2057 in a reverse pass over sections.
2059 2017-08-11 H.J. Lu <hongjiu.lu@intel.com>
2062 * elf32-i386.c (elf_i386_get_synthetic_symtab): Allocate space
2063 for @plt suffixes first.
2064 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
2066 2017-08-08 Nick Clifton <nickc@redhat.com>
2069 * elf-attrs.c (_bfd_elf_parse_attributes): Complain about very
2070 small section lengths.
2071 * elf.c (_bfd_elf_setup_sections): Skip empty entries in the group
2073 (elfcore_grok_freebsd_prstatus): Add checks to make sure that
2074 there is enough data present in the note.
2076 2017-08-08 Alan Modra <amodra@gmail.com>
2079 * elf32-microblaze.c (microblaze_elf_check_relocs): Don't bump
2080 got.refcount for GOTOFF relocs, just create .got section.
2082 2017-08-07 H.J. Lu <hongjiu.lu@intel.com>
2084 * elflink.c (elf_link_add_object_symbols): Move common symbol
2085 check after bed->common_definition.
2087 2017-08-07 Alan Modra <amodra@gmail.com>
2090 * elflink.c (bfd_elf_final_link): Don't segfault when sections
2091 needed to define various dynamic tags have been discarded.
2093 2017-08-07 Nick Clifton <nickc@redhat.com>
2096 * elf32-i386.c (elf_i386_link_setup_gnu_properties): If the dynobj
2097 has not been set then use the bfd returned by
2098 _bfd_elf_link_setup_gnu_properties. If that is null then search
2099 through all the input bfds selecting the first normal, ELF format
2101 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
2103 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
2105 * elf32-i386.c (elf_i386_link_hash_entry): Change tls_get_addr
2107 (elf_i386_link_hash_newfunc): Initialize tls_get_addr to 0.
2108 (elf_i386_check_tls_transition): Check tls_get_addr directly.
2109 (elf_i386_convert_load_reloc): Update tls_get_addr check.
2110 (elf_i386_link_check_relocs): New function.
2111 (bfd_elf32_bfd_link_check_relocs): New.
2112 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Change tls_get_addr
2114 (elf_x86_64_link_hash_newfunc): Initialize tls_get_addr to 0.
2115 (elf_x86_64_check_tls_transition): Check tls_get_addr directly.
2116 (elf_x86_64_convert_load_reloc): Update tls_get_addr check.
2117 (elf_x86_64_link_check_relocs): New function.
2118 (bfd_elf64_bfd_link_check_relocs): New.
2119 (bfd_elf32_bfd_link_check_relocs): Likewise.
2121 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
2124 * elflink.c (elf_link_add_object_symbols): Treat common symbol
2125 as undefined for --no-define-common.
2127 2017-08-05 Alan Modra <amodra@gmail.com>
2129 * elf32-hppa.c (elf32_hppa_set_gp): Don't require an
2130 hppa_link_hash_table.
2132 2017-08-02 Max Filippov <jcmvbkbc@gmail.com>
2134 * xtensa-isa.c (xtensa_isa_init): Don't update lookup table
2135 entries for sysregs with negative indices.
2137 2017-08-01 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2139 * elf32-s390.c (elf_s390_finish_dynamic_sections): Skip if it
2140 isn't the S/390 specific elf data.
2141 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
2143 2017-07-31 Kuan-Lin Chen <rufus@andestech.com>
2145 * elfxx-riscv.c (riscv_elf_add_sub_reloc): New function.
2146 * (howto_table) [R_RISCV_ADD8]: Use riscv_elf_add_sub_reloc.
2147 [R_RISCV_ADD16]: Likewise.
2148 [R_RISCV_ADD32]: Likewise.
2149 [R_RISCV_ADD64]: Likewise.
2150 [R_RISCV_SUB6]: Likewise.
2151 [R_RISCV_SUB8]: Likewise.
2152 [R_RISCV_SUB16]: Likewise.
2153 [R_RISCV_SUB32]: Likewise.
2154 [R_RISCV_SUB64]: Likewise.
2156 2017-07-31 Alan Modra <amodra@gmail.com>
2158 * elf64-ppc.c (ppc64_elf_tls_setup): Warn on --plt-localentry
2159 without ld.so checks.
2161 2017-07-29 Alan Modra <amodra@gmail.com>
2164 * elf64-ppc.c (struct ppc_link_hash_entry): Add non_zero_localentry.
2165 (ppc64_elf_merge_symbol): Set non_zero_localentry.
2166 (is_elfv2_localentry0): Test non_zero_localentry.
2167 (ppc64_elf_tls_setup): Default to --no-plt-localentry.
2169 2017-07-28 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2171 * elf32-s390.c (elf_s390_finish_dynamic_sections): Add NULL
2172 pointer check for htab->elf.irelplt.
2173 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
2175 2017-07-27 Nick Clifton <nickc@redhat.com>
2178 * mach-o.c (bfd_mach_o_read_symtab_strtab): Fail if the symtab
2180 * nlmcode.h (nlm_swap_auxiliary_headers_in): Replace assertion
2182 * section.c (bfd_make_section_with_flags): Fail if the name or bfd
2184 * vms-alpha.c (bfd_make_section_with_flags): Correct computation
2186 (evax_bfd_print_emh): Check for invalid string lengths.
2188 2017-07-25 Nick Clifton <nickc@redhat.com>
2190 * po/fr.po: Updated French translation.
2192 2017-07-25 Benjamin Green <bengreen5mx@gmail.com>
2195 * elf32-msp430.c (msp430_elf_relax_section): Allow conversion of
2196 16-bit absolute branches into 10-bit pc-relative branches on the
2197 MSP430 as well as the MSP430X.
2199 2017-07-25 Alan Modra <amodra@gmail.com>
2201 * elf64-ppc.c (struct map_stub): Add tls_get_addr_opt_bctrl.
2202 (stub_eh_frame_size): New function.
2203 (ppc_size_one_stub): Set group tls_get_addr_opt_bctrl.
2204 (group_sections): Init group tls_get_addr_opt_bctrl.
2205 (ppc64_elf_size_stubs): Update sizing and initialization of
2206 .eh_frame. Iteration over stubs via group list.
2207 (ppc64_elf_build_stubs): Iterate over stubs via group list.
2208 (ppc64_elf_finish_dynamic_sections): Update finalization of
2211 2017-07-24 Nick Clifton <nickc@redhat.com>
2214 * mach-o.c (bfd_mach_o_canonicalize_relocs): Pass the base address
2215 of the relocs to the canonicalize_one_reloc routine.
2216 * mach-o.h (struct bfd_mach_o_backend_data): Update the prototype
2217 for the _bfd_mach_o_canonicalize_one_reloc field.
2218 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add
2219 res_base parameter. Use to check for corrupt pair relocs.
2220 * mach-o-aarch64.c (bfd_mach_o_arm64_canonicalize_one_reloc):
2222 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc):
2224 * mach-o-x86-64.c (bfd_mach_o_x86_64_canonicalize_one_reloc):
2227 * vms-alpha.c (_bfd_vms_slurp_eihd): Make sure that there is
2228 enough data in the record before attempting to parse it.
2229 (_bfd_vms_slurp_eeom): Likewise.
2231 (_bfd_vms_slurp_egsd): Check for an invalid section index.
2232 (image_set_ptr): Likewise.
2233 (alpha_vms_slurp_relocs): Likewise.
2235 (alpha_vms_object_p): Check for a truncated record.
2237 2017-07-24 Nick Clifton <nickc@redhat.com>
2240 * reloc.c (_bfd_unrecognized_reloc): New function. Reports
2241 an unrecognized reloc and sets the bfd_error value.
2242 * libbfd.h: Regenerate.
2243 * elf32-arm.c (elf32_arm_final_link_relocate): Use the new
2245 * elf32-i386.c (elf_i386_relocate_section): Likewise.
2246 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
2247 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
2248 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise.
2249 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
2251 2017-07-23 Alan Modra <amodra@gmail.com>
2253 * elf64-ppc.c (ppc64_elf_size_stubs): Correct advance to
2256 2017-07-19 Szabolcs Nagy <szabolcs.nagy@arm.com>
2259 * elfnn-aarch64.c (elfNN_aarch64_reloc_type_class): Return
2260 reloc_class_ifunc for ifunc symbols.
2262 2017-07-19 Nick Clifton <nickc@redhat.com>
2265 * archive.c (bfd_generic_archive_p): If the bfd does not have the
2266 correct magic bytes at the start, set the error to wrong format
2267 and clear the format selector before returning NULL.
2269 2017-07-19 Nick Clifton <nickc@redhat.com>
2272 * coff-rs6000.c (_bfd_strntol): New function.
2273 (_bfd_strntoll): New function.
2274 (GET_VALUE_IN_FIELD): New macro.
2275 (EQ_VALUE_IN_FIELD): new macro.
2276 (_bfd_xcoff_slurp_armap): Use new macros.
2277 (_bfd_xcoff_archive_p): Likewise.
2278 (_bfd_xcoff_read_ar_hdr): Likewise.
2279 (_bfd_xcoff_openr_next_archived_file): Likewise.
2280 (_bfd_xcoff_stat_arch_elt): Likewise.
2281 * coff64-rs6000.c (_bfd_strntol): New function.
2282 (_bfd_strntoll): New function.
2283 (GET_VALUE_IN_FIELD): New macro.
2284 (xcoff64_slurp_armap): Use new macros.
2286 2017-07-19 Claudiu Zissulescu <claziss@synopsys.com>
2287 John Eric Martin <John.Martin@emmicro-us.com>
2289 * bfd-in2.h: Regenerate.
2290 * libbfd.h: Regenerate.
2291 * elf32-arc.c (JLI): Define.
2292 * reloc.c: Add JLI relocations.
2294 2017-07-18 Nick Clifton <nickc@redhat.com>
2297 * coff-sh.c: Fix spelling typos.
2298 * compress.c: Likewise.
2299 * cpu-pdp11.c: Likewise.
2300 * ecofflink.c: Likewise.
2301 * elf-m10300.c: Likewise.
2303 * elf32-arm.c: Likewise.
2304 * elf32-m68k.c: Likewise.
2305 * elf32-nds32.c: Likewise.
2306 * elf32-ppc.c: Likewise.
2307 * elf32-sh.c: Likewise.
2308 * elf32-v850.c: Likewise.
2309 * elf64-ppc.c: Likewise.
2310 * elf64-x86-64.c: Likewise.
2311 * elflink.c: Likewise.
2312 * elfnn-aarch64.c: Likewise.
2313 * elfxx-mips.c: Likewise.
2315 * sunos.c: Likewise.
2316 * vms-alpha.c: Likewise.
2317 * xcofflink.c: Likewise.
2319 2017-07-18 Nick Clifton <nickc@redhat.com>
2322 * coffcode.h (handle_COMDAT): Replace abort with an error message
2325 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
2328 * elf64-x86-64.c (elf_x86_64_relocate_section): Limit PIC check
2331 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
2333 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
2335 2017-07-16 Alan Modra <amodra@gmail.com>
2337 * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimize
2338 __tls_index GOT entries when using __tls_get_addr_opt stub.
2339 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2341 2017-07-12 Alan Modra <amodra@gmail.com>
2343 * po/es.po: Update from translationproject.org/latest/bfd/.
2344 * po/fi.po: Likewise.
2345 * po/fr.po: Likewise.
2346 * po/id.po: Likewise.
2347 * po/ja.po: Likewise.
2348 * po/ro.po: Likewise.
2349 * po/ru.po: Likewise.
2350 * po/sr.po: Likewise.
2351 * po/sv.po: Likewise.
2352 * po/tr.po: Likewise.
2353 * po/uk.po: Likewise.
2354 * po/vi.po: Likewise.
2355 * po/zh_CN.po: Likewise.
2356 * po/hr.po: New file from translationproject.org.
2357 * configure.ac (ALL_LINGUAS): Add hr. Sort.
2358 * configure: Regenerate.
2360 2017-07-12 Nick Clifton <nickc@redhat.com>
2362 Fix compile time warnings using gcc 7.1.1.
2363 * elf32-xtensa.c (elf_xtensa_get_plt_section): Increase length of
2365 (elf_xtensa_get_gotplt_section): Increase length of got_name
2367 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add a
2368 default return of FALSE.
2369 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc): Add a
2370 default return of FALSE.
2372 2017-07-12 Alan Modra <amodra@gmail.com>
2374 * binary.c (binary_set_section_contents): Don't print filepos in
2376 (coff_write_object_contents): Cast size_t for error message.
2377 (coff_slurp_line_table): Don't use bfd_vma symndx.
2378 (coff_slurp_reloc_table): Remove unneeded cast.
2379 * dwarf2.c (read_section): Cast bfd_int64_t to long long for
2381 (find_abstract_instance_name): Likewise.
2382 * elf32-arm.c (arm_type_of_stub): Correct error arg order.
2383 (bfd_elf32_arm_stm32l4xx_erratum_scan): Don't cast error arg.
2384 (elf32_arm_check_relocs): Make r_symndx an int.
2385 * elf32-cris.c (cris_elf_check_relocs): Delete extraneous %s in
2387 * elf32-metag.c (elf_metag_relocate_section): Delete extra error
2389 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Rewrite bogus
2391 * elf32-i386.c (elf_i386_check_relocs): Make r_symndx an int.
2392 * elf32-s390.c (elf_s390_check_relocs): Likewise.
2393 * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
2394 * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
2395 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
2396 * elf64-s390.c (elf_s390_check_relocs): Likewise.
2397 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
2398 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Likewise.
2399 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
2400 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
2401 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
2402 * elf64-mmix.c (_bfd_mmix_after_linker_allocation): Cast size_t args
2403 and use %lu for error message.
2404 * elflink.c (elf_link_adjust_relocs): Delete extra error message arg.
2405 * mmo.c (mmo_scan): Make stab_loc a file_ptr. Cast expression for
2408 * elf32-arm.c (elf32_arm_tls_relax): Correct format string and args
2410 (elf32_arm_final_link_relocate): Likewise.
2411 * coff-arm.c (bfd_arm_process_before_allocation): Likewise.
2412 * coffcode.h (styp_to_sec_flags): Likewise.
2413 * cofflink.c (_bfd_coff_write_global_sym): Likewise.
2414 * ecoff.c (_bfd_ecoff_slurp_symbol_table): Likewise.
2415 * elf32-arc.c (arc_elf_merge_private_bfd_data): Likewise.
2416 * elf32-bfin.c (bfinfdpic_check_relocs): Likewise.
2417 (elf32_bfin_merge_private_bfd_data): Likewise.
2418 * elf32-cris.c (cris_elf_relocate_section): Likewise.
2419 * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
2420 * elf32-i370.c (i370_elf_merge_private_bfd_data): Likewise.
2421 (i370_elf_relocate_section): Likewise.
2422 * elf32-iq2000.c (iq2000_elf_merge_private_bfd_data): Likewise.
2423 * elf32-m32c.c (m32c_elf_merge_private_bfd_data): Likewise.
2424 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise.
2425 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
2426 * elf32-mep.c (mep_elf_merge_private_bfd_data): Likewise.
2427 * elf32-mt.c (mt_elf_merge_private_bfd_data): Likewise.
2428 * elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.
2429 * elfxx-mips.c (mips_elf_merge_obj_e_flags): Likewise.
2430 (_bfd_mips_elf_merge_private_bfd_data): Likewise.
2431 * ieee.c (ieee_write_id, read_id): Likewise.
2432 * mach-o.c (bfd_mach_o_write_contents): Likewise.
2433 (bfd_mach_o_layout_commands, bfd_mach_o_read_section_32): Likewise.
2434 (bfd_mach_o_read_section_64, bfd_mach_o_read_symtab_symbol): Likewise.
2435 (bfd_mach_o_read_command, bfd_mach_o_header_p): Likewise.
2436 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Likewise.
2437 * stabs.c (_bfd_link_section_stabs): Likewise.
2439 * coff-arm.c (coff_arm_relocate_section): Use L modifier in error
2441 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
2442 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
2443 * coff-rs6000.c (xcoff_reloc_type_toc): Likewise.
2444 * coff-sh.c (sh_relax_section): Likewise.
2445 (sh_relax_delete_bytes, sh_swap_insns): Likewise.
2446 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
2447 * coffcode.h (coff_slurp_reloc_table): Likewise.
2448 * coffgen.c (_bfd_coff_get_external_symbols): Likewise.
2449 (_bfd_coff_read_string_table): Likewise.
2450 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
2451 * compress.c (bfd_get_full_section_contents): Likewise.
2452 * dwarf2.c (read_formatted_entries, decode_line_info): Likewise.
2453 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
2454 * elf.c (bfd_elf_string_from_elf_section): Likewise.
2455 * elf32-arc.c (arc_special_overflow_checks): Likewise.
2456 * elf32-arm.c (elf32_arm_tls_relax): Likewise.
2457 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Likewise.
2458 (elf32_arm_write_section): Likewise.
2459 * elf32-bfin.c (bfin_relocate_section): Likewise.
2460 (bfinfdpic_relocate_section): Likewise.
2461 * elf32-hppa.c (hppa_build_one_stub): Likewise.
2462 (final_link_relocate, elf32_hppa_relocate_section): Likewise.
2463 * elf32-i386.c (elf_i386_tls_transition): Likewise.
2464 (elf_i386_relocate_section): Likewise.
2465 * elf32-ip2k.c (ip2k_final_link_relocate): Likewise.
2466 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise.
2467 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
2468 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
2469 * elf32-metag.c (elf_metag_relocate_section): Likewise.
2470 * elf32-nds32.c (unrecognized_reloc_msg): Likewise.
2471 (nds32_elf_relax_longcall1, nds32_elf_relax_longcall2): Likewise.
2472 (nds32_elf_relax_longcall3, nds32_elf_relax_longjump1): Likewise.
2473 (nds32_elf_relax_longjump2, nds32_elf_relax_longjump3): Likewise.
2474 (nds32_elf_relax_longcall4, nds32_elf_relax_longcall5): Likewise.
2475 (nds32_elf_relax_longcall6, nds32_elf_relax_longjump4): Likewise.
2476 (nds32_elf_relax_longjump5, nds32_elf_relax_longjump6): Likewise.
2477 (nds32_elf_relax_longjump7, nds32_elf_relax_loadstore): Likewise.
2478 (nds32_elf_relax_ptr, nds32_elf_ex9_build_hash_table): Likewise.
2479 * elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
2480 * elf32-rx.c (UNSAFE_FOR_PID): Likewise.
2481 * elf32-s390.c (invalid_tls_insn, elf_s390_relocate_section): Likewise.
2482 * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
2483 * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
2484 * elf32-sh.c (sh_elf_relax_section): Likewise.
2485 (sh_elf_relax_delete_bytes, sh_elf_swap_insns): Likewise.
2486 (sh_elf_relocate_section): Likewise.
2487 * elf32-sh64.c (shmedia_prepare_reloc): Likewise.
2488 * elf32-spu.c (spu_elf_relocate_section): Likewise.
2489 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
2490 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
2491 * elf32-v850.c (v850_elf_relax_section): Likewise.
2492 * elf32-vax.c (elf_vax_check_relocs): Likewise.
2493 (elf_vax_relocate_section): Likewise.
2494 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
2495 (extend_ebb_bounds_forward, extend_ebb_bounds_backward): Likewise.
2496 (compute_text_actions, compute_ebb_proposed_actions): Likewise.
2497 (do_fix_for_relocatable_link): Likewise.
2498 * elf64-alpha.c (elf64_alpha_relax_got_load): Likewise.
2499 (elf64_alpha_relax_with_lituse): Likewise.
2500 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Likewise.
2501 (elf_hppa_final_link_relocate): Likewise.
2502 * elf64-ia64-vms.c (elf64_ia64_relax_section): Likewise.
2503 (elf64_ia64_choose_gp, elf64_ia64_relocate_section): Likewise.
2504 (elf64_vms_link_add_object_symbols): Likewise.
2505 * elf64-mmix.c (mmix_elf_perform_relocation): Likewise.
2506 (mmix_final_link_relocate): Likewise.
2507 * elf64-s390.c (invalid_tls_insn): Likewise.
2508 (elf_s390_relocate_section): Likewise.
2509 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
2510 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
2511 (elf_x86_64_relocate_section): Likewise.
2512 * elfcode.h (elf_slurp_symbol_table): Likewise.
2513 * elfcore.h (elf_core_file_p): Likewise.
2514 * elflink.c (elf_link_read_relocs_from_section): Likewise.
2515 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
2516 (elfNN_aarch64_relocate_section): Likewise.
2517 * elfnn-ia64.c (elfNN_ia64_relax_section): Likewise.
2518 (elfNN_ia64_choose_gp, elfNN_ia64_relocate_section): Likewise.
2519 * elfnn-riscv.c (riscv_elf_relocate_section): Likewise.
2520 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
2521 (_bfd_mips_elf_relocate_section): Likewise.
2522 (_bfd_mips_elf_finish_dynamic_symbol, mips_finish_exec_plt): Likewise.
2523 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
2524 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
2525 * ieee.c (ieee_slurp_external_symbols): Likewise.
2526 * ihex.c (ihex_write_object_content): Likewise.
2527 * mach-o.c (bfd_mach_o_build_exec_seg_command): Likewise.
2528 * merge.c (_bfd_merged_section_offset): Likewise.
2529 * mmo.c (mmo_write_loc_chunk): Likewise.
2530 (mmo_write_object_contents): Likewise.
2531 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Likewise.
2532 * stabs.c (_bfd_link_section_stabs): Likewise.
2533 * xcofflink.c (xcoff_link_add_symbols, xcoff_find_tc0): Likewise.
2535 2017-07-11 Alan Modra <amodra@gmail.com>
2537 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo.
2539 2017-07-11 Alan Modra <amodra@gmail.com>
2541 * elf32-ppc.c (ppc_elf_relocate_section): Emit "unexpected
2542 instruction" error using _bfd_error_handler, not einfo.
2544 2017-07-10 Nick Clifton <nickc@redhat.com>
2546 * coffcode.h (coff_slurp_symbol_table): Do not include an entry
2547 for C_AIX_WEAKEXT if it has the same value as C_WEAKEXT.
2549 2017-07-07 John Baldwin <jhb@FreeBSD.org>
2551 * elf.c (elfcore_grok_freebsd_note): Handle NT_FREEBSD_PTLWPINFO.
2553 2017-07-07 Alan Modra <amodra@gmail.com>
2555 * coffcode.h (coff_slurp_symbol_table): Handle C_AIX_WEAKEXT.
2557 2017-07-07 Alan Modra <amodra@gmail.com>
2559 * bfd.c (_doprnt): Replace "L" with "ll" when printing bfd_vma
2560 as long long. Move code replacing "ll" with "I64", and simplify.
2562 2017-07-06 H.J. Lu <hongjiu.lu@intel.com>
2564 * bfd.c (_doprnt): Convert 'L' to 'l' when setting wide_width
2567 2017-07-05 H.J. Lu <hongjiu.lu@intel.com>
2569 * dwarf2.c (line_info_add_include_dir_stub): Replace time with
2571 (line_info_add_file_name): Likewise.
2572 (decode_line_info): Likewise.
2574 2017-07-04 Tristan Gingold <gingold@adacore.com>
2576 * version.m4: Bump version to 2.29.51
2577 * configure: Regenerate.
2579 2017-07-04 Jiong Wang <jiong.wang@arm.com>
2581 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Remove the
2582 sanity check at the head of this function.
2584 2017-07-04 Jan Kratochvil <jan.kratochvil@redhat.com>
2586 * dwarf2.c (struct dwarf2_debug): Add fields dwarf_line_str_buffer and
2587 dwarf_line_str_size.
2588 (struct attr_abbrev): Add field implicit_const.
2589 (dwarf_debug_sections): Add .debug_line_str.
2590 (enum dwarf_debug_section_enum): Add debug_line_str and debug_max.
2591 (dwarf_debug_section_assert): Add static assertion.
2592 (read_indirect_line_string): New.
2593 (read_abbrevs): Support DW_FORM_implicit_const.
2594 (is_str_attr): Support DW_FORM_line_strp.
2595 (read_attribute_value): Support DW_FORM_line_strp and
2596 DW_FORM_implicit_const.
2597 (read_attribute): Support DW_FORM_implicit_const.
2598 (line_info_add_include_dir, line_info_add_include_dir_stub):
2599 (line_info_add_file_name, read_formatted_entries): New.
2600 (decode_line_info, parse_comp_unit): Support DWARF 5.
2601 (_bfd_dwarf2_cleanup_debug_info): Free dwarf_line_str_buffer.
2603 2017-07-03 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
2605 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove the
2606 abort statement that was put for symbols that are not dynamic.
2608 2017-07-03 Tristan Gingold <gingold@adacore.com>
2610 * po/bfd.pot: Regenerate
2612 2017-07-03 Alan Modra <amodra@gmail.com>
2614 * bfd.c (_doprnt): Rewrite "ll" and "L" modifiers to "I64" for
2615 __MSVCRT__. Support "L" modifier for bfd_vma. Formatting.
2616 * elf.c (setup_group): Use "Lx" to print sh_size.
2617 (_bfd_elf_setup_sections): Remove unnecessary cast and print
2618 unknown section type in hex.
2619 (copy_special_section_fields): Style fix.
2620 (bfd_section_from_shdr): Correct format for sh_link. Use a
2621 common error message for all the variants of unrecognized
2623 (assign_file_positions_for_load_sections): Use "Lx" for lma
2624 adjust error message.
2625 (assign_file_positions_for_non_load_sections): Formatting.
2626 (rewrite_elf_program_header): Formatting. Use "Lx" for
2627 bfd_vma values in error messages.
2628 * elfcode.h (elf_slurp_reloc_table_from_section): Cast
2629 ELF_R_SYM value to type expected by format.
2630 * elflink.c (elf_link_read_relocs_from_section): Use "Lx"
2632 (elf_link_add_object_symbols): Use "Lu" for symbol sizes.
2633 (elf_link_input_bfd): Use "Lx" for r_info.
2634 (bfd_elf_gc_record_vtinherit): Use "Lx" for offset.
2636 2017-07-03 Alan Modra <amodra@gmail.com>
2638 * bfd.c (bfd_scan_vma): Don't use long long unless HAVE_LONG_LONG.
2639 * coff-rs6000.c (FMT20): Handle hosts with 64-bit long and
2640 Microsoft C library variant of long long format specifier.
2641 (PRINT20): Cast value to bfd_uint64_t not long long.
2642 * coffcode.h (coff_print_aux): Use BFD_VMA_FMT.
2643 * coff-x86_64.c (coff_amd64_reloc): Use bfd_uint64_t rather than
2644 long long. Don't cast to bfd_vma.
2645 * elf32-score.c (score3_bfd_getl48): Likewise.
2646 * vms-alpha.c (_bfd_vms_slurp_eisd): Likewise.
2648 2017-07-03 Alan Modra <amodra@gmail.com>
2650 * elf.c (_bfd_elf_print_private_bfd_data): Use BFD_VMA_FMT to
2652 (bfd_elf_print_symbol): Don't cast symbol->flags.
2653 (_bfd_elf_symbol_from_bfd_symbol): Likewise.
2654 * elf32-ppc.c (ppc_elf_begin_write_processing): Correct
2655 _bfd_error_handler argument order.
2656 (ppc_elf_merge_private_bfd_data): Don't cast flags.
2658 2017-07-03 Alan Modra <amodra@gmail.com>
2660 * configure.ac: Invoke AC_CHECK_TYPES for long long. Invoke
2661 AC_TYPE_LONG_DOUBLE.
2662 * configure: Regenerate.
2663 * config.in: Regenerate.
2665 2017-06-29 Andrew Waterman <andrew@sifive.com>
2667 * elfnn-riscv.c (riscv_elf_adjust_dynamic_symbol): Fix TLS copy
2670 2017-06-29 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
2672 * elfxx-sparc.c (allocate_dynrelocs): Don't make a symbol dynamic
2673 unless it is undefined weak.
2674 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Set the flag
2675 relative_reloc to direct non-dynamic symbols to R_SPARC_RELATIVE
2677 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): If symbol
2678 is not dynamic in PIC, abort.
2680 2017-06-29 Jiong Wang <jiong.wang@arm.com>
2683 * elfnn-aarch64.c (elfNN_aarch64_allocate_dynrelocs): Only make
2684 undefined weak symbols into dynamic.
2685 (elfNN_aarch64_final_link_relocate): Generate runtime RELATIVE
2686 relocation for non-dynamic symbols.
2687 (elfNN_aarch64_finish_dynamic_symbol): Add sanity check.
2689 2017-06-29 Jiong Wang <jiong.wang@arm.com>
2691 * elfnn-aarch64.c (aarch64_relocation_aginst_gp_p): New function.
2692 (elfNN_aarch64_final_link_relocate): Delete duplicated code for
2693 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15, BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC,
2694 BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
2695 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Optimize the
2698 2017-06-29 Andreas Arnez <arnez@linux.vnet.ibm.com>
2700 * elf-bfd.h (elfcore_write_s390_gs_cb): Add prototype.
2701 (elfcore_write_s390_gs_bc): Likewise.
2702 * elf.c (elfcore_grok_s390_gs_cb): New function.
2703 (elfcore_grok_s390_gs_bc): New function.
2704 (elfcore_grok_note): Call them.
2705 (elfcore_write_s390_gs_cb): New function.
2706 (elfcore_write_s390_gs_bc): New function.
2707 (elfcore_write_register_note): Call them.
2709 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
2711 * libbfd.c (_bfd_generic_get_section_contents): Don't call
2712 bfd_get_file_size. Check archive element size.
2713 (_bfd_generic_get_section_contents_in_window): Likewise.
2715 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
2717 * bfd-in2.h: Regenerated.
2718 * bfdio.c (bfd_get_size): Change return type to ufile_ptr.
2719 (bfd_get_file_size): Likewise.
2721 2017-06-28 Maciej W. Rozycki <macro@imgtec.com>
2722 Matthew Fortune <matthew.fortune@imgtec.com>
2724 * archures.c (bfd_mach_mips_interaptiv_mr2): New macro.
2725 * cpu-mips.c (I_interaptiv_mr2): New enum value.
2726 (arch_info_struct): Add "mips:interaptiv-mr2" entry.
2727 * elfxx-mips.c (_bfd_elf_mips_mach) <E_MIPS_MACH_IAMR2>: New
2729 (mips_set_isa_flags) <bfd_mach_mips_interaptiv_mr2>: Likewise.
2730 (bfd_mips_isa_ext) <bfd_mach_mips_interaptiv_mr2>: Likewise.
2731 (print_mips_isa_ext) <AFL_EXT_INTERAPTIV_MR2>: Likewise.
2732 (mips_mach_extensions): Add `bfd_mach_mipsisa32r3' and
2733 `bfd_mach_mips_interaptiv_mr2' entries.
2734 * bfd-in2.h: Regenerate.
2736 2017-06-27 Nick Clifton <nickc@redhat.com>
2738 * tekhex.c (pass_over): Revert accidental conversion of a local
2739 array to a static array.
2741 2017-06-27 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
2744 * elf32-avr.c (elf32_avr_adjust_diff_reloc_value): Adjust
2745 reloc addend if necessary. Adjust diff only if
2746 shrinked_insn_address < end_address.
2748 2017-06-27 Alan Modra <amodra@gmail.com>
2751 * libbfd.c (_bfd_generic_get_section_contents): Warning fix.
2752 (_bfd_generic_get_section_contents_in_window): Likewise.
2754 2017-06-26 Kuan-Lin Chen <rufus@andestech.com>
2756 * elfnn-riscv.c (perform_relocation): Support the new
2757 R_RISCV_32_PCREL relocation.
2758 (riscv_elf_relocate_section): Likewise.
2759 * elfxx-riscv.c (howto_table): Likewise.
2760 (riscv_reloc_map): Likewise.
2761 * bfd-in2.h (BFD_RELOC_RISCV_32_PCREL): New relocation.
2762 * libbfd.h: Regenerate.
2764 2017-06-27 Alan Modra <amodra@gmail.com>
2767 * libbfd.c (_bfd_generic_get_section_contents): Delete abort.
2768 Use unsigned file pointer type, and remove cast.
2769 * libbfd.c (_bfd_generic_get_section_contents_in_window): Likewise.
2770 Add "count", not "sz".
2772 2017-06-26 Pedro Alves <palves@redhat.com>
2775 * libbfd.c (_bfd_generic_get_section_contents): Add "count", not
2778 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
2781 * libbfd.c (_bfd_generic_get_section_contents_in_window): Add
2784 2017-06-26 Maciej W. Rozycki <macro@imgtec.com>
2786 * cpu-mips.c (arch_info_struct): Mark the 4010 32-bit.
2787 * elfxx-mips.c (mips_set_isa_flags) <bfd_mach_mips4010>: Set
2788 E_MIPS_ARCH_2 rather than E_MIPS_ARCH_3 in `e_flags'.
2789 (mips_mach_extensions): Mark `bfd_mach_mips4010' as extending
2790 `bfd_mach_mips6000' rather than `bfd_mach_mips4000'.
2792 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
2795 * compress.c (bfd_get_full_section_contents): Don't check the
2797 * libbfd.c (_bfd_generic_get_section_contents): Check for and
2798 reject a section whose size + offset is greater than the size
2800 (_bfd_generic_get_section_contents_in_window): Likewise.
2802 2017-06-26 Nick Clifton <nickc@redhat.com>
2805 * tekhex.c (getvalue): Check for the source pointer exceeding the
2806 end pointer before the first byte is read.
2808 2017-06-26 Nick Clifton <nickc@redhat.com>
2811 * opncls.c (get_build_id): Check that the section is big enough
2812 to contain the whole note.
2813 * compress.c (bfd_get_full_section_contents): Check for and reject
2814 a section whose size is greater than the size of the entire file.
2815 * elf32-v850.c (v850_elf_copy_notes): Allow for the ouput to not
2816 contain a notes section.
2818 2017-06-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2820 * elf64-s390.c (elf_s390_additional_program_headers): Add NULL
2822 (elf_s390_modify_segment_map): Likewise.
2823 (bfd_elf_s390_set_options): Lisewise.
2825 2017-06-26 Alan Modra <amodra@gmail.com>
2827 * elflink.c (_bfd_elf_link_create_dynstrtab): Don't make dynobj
2829 (_bfd_elf_size_group_sections): Skip --just-syms bfds.
2830 (bfd_elf_size_dynamic_sections): Ignore .note.GNU-stack and
2831 .preinit_array on --just-syms bfds.
2832 (_bfd_elf_gc_mark_extra_sections): Skip --just-syms bfds.
2833 (elf_gc_sweep, bfd_elf_parse_eh_frame_entries): Likewise.
2834 (bfd_elf_gc_sections, bfd_elf_discard_info): Likewise.
2836 2017-06-25 Sergei Trofimovich <slyfox@gentoo.org>
2838 * elf.c (find_link): Bounds check "hint".
2840 2017-06-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
2842 * elf32-arm.c (using_thumb_only): Update list of architectures in
2843 BFD_ASSERT for which the logic is valid.
2844 (using_thumb2_bl): Likewise.
2845 (using_thumb2): Likewise and return true for ARMv8-R.
2846 (arch_has_arm_nop): Likewise.
2847 (tag_cpu_arch_combine): New v8r table for ARMv8-R Tag_CPU_arch
2848 merging logic. Update commentis for value 15 of v8m_baseline,
2849 v8m_mainline and v4t_plus_v6_m arrays. Use v8r array to decide
2850 merging of value 15 of Tag_CPU_arch.
2852 2017-06-23 Jiong Wang <jiong.wang@arm.com>
2854 * reloc.c (BFD_RELOC_AARCH64_ADR_GOTPAGE): Rename to
2855 BFD_RELOC_AARCH64_ADR_GOT_PAGE
2856 * bfd-in2.h: Regenerate.
2858 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2860 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Move
2861 the error_alignment label forward. Properly align program
2862 property note section.
2864 2017-06-22 Eric Christopher <echristo@gmail.com>
2866 * elf32-arm.c (elf32_arm_final_link_relocate): Use labs rather than
2867 abs to fix a truncation warning.
2869 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2871 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Resolve
2872 local undefined weak symbol to 0.
2873 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Likewise.
2875 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2877 * elf32-i386.c (elf_i386_merge_gnu_properties): If info->shstk
2878 is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
2879 (elf_i386_link_setup_gnu_properties): If info->shstk is set,
2880 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
2881 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): If
2882 info->shstk is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
2883 (elf_x86_64_link_setup_gnu_properties): If info->shstk is set,
2884 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
2886 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2888 * elf32-i386.c (elf_i386_lazy_ibt_plt0_entry): New.
2889 (elf_i386_lazy_ibt_plt_entry): Likewise.
2890 (elf_i386_pic_lazy_ibt_plt0_entry): Likewise.
2891 (elf_i386_non_lazy_ibt_plt_entry): Likewise.
2892 (elf_i386_pic_non_lazy_ibt_plt_entry): Likewise.
2893 (elf_i386_eh_frame_lazy_ibt_plt): Likewise.
2894 (elf_i386_lazy_plt_layout): Likewise.
2895 (elf_i386_non_lazy_plt_layout): Likewise.
2896 (elf_i386_link_hash_entry): Add plt_second.
2897 (elf_i386_link_hash_table): Add plt_second and
2898 plt_second_eh_frame.
2899 (elf_i386_allocate_dynrelocs): Use the second PLT if needed.
2900 (elf_i386_size_dynamic_sections): Use .plt.got unwind info for
2901 the second PLT. Check the second PLT.
2902 (elf_i386_relocate_section): Use the second PLT to resolve
2903 PLT reference if needed.
2904 (elf_i386_finish_dynamic_symbol): Fill and use the second PLT if
2906 (elf_i386_finish_dynamic_sections): Set sh_entsize on the
2907 second PLT. Generate unwind info for the second PLT.
2908 (elf_i386_plt_type): Add plt_second.
2909 (elf_i386_get_synthetic_symtab): Support the second PLT.
2910 (elf_i386_parse_gnu_properties): Support
2911 GNU_PROPERTY_X86_FEATURE_1_AND.
2912 (elf_i386_merge_gnu_properties): Support
2913 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
2914 on GNU_PROPERTY_X86_FEATURE_1_IBT
2915 (elf_i386_link_setup_gnu_properties): If info->ibt is set,
2916 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
2917 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
2918 is set on all relocatable inputs.
2919 * elf64-x86-64.c (elf_x86_64_lazy_ibt_plt_entry): New.
2920 (elf_x32_lazy_ibt_plt_entry): Likewise.
2921 (elf_x86_64_non_lazy_ibt_plt_entry): Likewise.
2922 (elf_x32_non_lazy_ibt_plt_entry): Likewise.
2923 (elf_x86_64_eh_frame_lazy_ibt_plt): Likewise.
2924 (elf_x32_eh_frame_lazy_ibt_plt): Likewise.
2925 (elf_x86_64_lazy_ibt_plt): Likewise.
2926 (elf_x32_lazy_ibt_plt): Likewise.
2927 (elf_x86_64_non_lazy_ibt_plt): Likewise.
2928 (elf_x32_non_lazy_ibt_plt): Likewise.
2929 (elf_x86_64_get_synthetic_symtab): Support the second PLT.
2930 (elf_x86_64_parse_gnu_properties): Support
2931 GNU_PROPERTY_X86_FEATURE_1_AND.
2932 (elf_x86_64_merge_gnu_properties): Support
2933 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
2934 on GNU_PROPERTY_X86_FEATURE_1_IBT
2935 (elf_x86_64_link_setup_gnu_properties): If info->ibt is set,
2936 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
2937 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
2938 is set on all relocatable inputs.
2940 2017-06-22 Nick Clifton <nickc@redhat.com>
2943 * som.c (setup_sections): NUL terminate the space_strings buffer.
2944 Check that the space.name field does not index beyond the end of
2945 the space_strings buffer.
2947 2017-06-21 Nick Clifton <nickc@redhat.com>
2950 * coff-sh.c (sh_reloc): Check for an out of range reloc.
2952 2017-06-21 Nick Clifton <nickc@redhat.com>
2955 * vms-misc.c (_bfd_vms_save_sized_string): Use unsigned int as
2956 type of the size parameter.
2957 (_bfd_vms_save_counted_string): Add second parameter - the maximum
2958 length of the counted string.
2959 * vms.h (_bfd_vms_save_sized_string): Update prototype.
2960 (_bfd_vms_save_counted_string): Likewise.
2961 * vms-alpha.c (_bfd_vms_slurp_eisd): Update calls to
2962 _bfd_vms_save_counted_string.
2963 (_bfd_vms_slurp_ehdr): Likewise.
2964 (_bfd_vms_slurp_egsd): Likewise.
2965 (Parse_module): Likewise.
2967 2017-06-21 Alan Modra <amodra@gmail.com>
2969 * elf64-ppc.c (ppc64_elf_size_stubs): Test for localentry:0 plt
2970 calls before tocsave calls.
2971 (ppc64_elf_relocate_section): Allow localentry:0 plt calls without
2974 2017-06-21 Nick Clifton <nickc@redhat.com>
2977 * reloc.c (bfd_generic_get_relocated_section_contents): Fail if
2978 bfd_get_full_section_contents returns no contents.
2980 2017-06-21 Nick Clifton <nickc@redhat.com>
2983 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an undersized
2986 2017-06-21 Nick Clifton <nickc@redhat.com>
2989 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an empty section
2991 (image_set_ptr): Likewise.
2992 (alpha_vms_fix_sec_rel): Likewise.
2993 (alpha_vms_slurp_relocs): Likewise.
2995 2017-06-21 Nick Clifton <nickc@redhat.com>
2998 * ieee.c (ieee_slurp_sections): Check for a NULL return from
3000 (ieee_archive_p): Likewise.
3001 (ieee_object_p): Likewise.
3003 2017-06-21 Nick Clifton <nickc@redhat.com>
3006 * elf.c (setup_group): Zero the group section pointer list after
3007 allocation so that loops can be caught. Check for NULL pointers
3008 when processing a group list.
3010 2017-06-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
3012 * elf-s390.h: New file.
3013 * elf64-s390.c (struct elf_s390_link_hash_table): Add params
3015 (elf_s390_additional_program_headers): New function.
3016 (elf_s390_modify_segment_map): New function.
3017 (bfd_elf_s390_set_options): New function.
3018 (elf_backend_additional_program_headers)
3019 (elf_backend_modify_segment_map): Add macro definitions.
3021 2017-06-19 H.J. Lu <hongjiu.lu@intel.com>
3024 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Check
3025 the DYNAMIC bit instead of bfd_count_sections.
3027 2017-06-19 Nick Clifton <nickc@redhat.com>
3030 * vms-alpha.c (evax_bfd_print_emh): Check for insufficient record
3032 (evax_bfd_print_eeom): Likewise.
3033 (evax_bfd_print_egsd): Check for an overlarge record length.
3034 (evax_bfd_print_etir): Likewise.
3036 2017-06-19 Nick Clifton <nickc@redhat.com>
3039 * libieee.h (struct common_header_type): Add end_p field.
3040 * ieee.c (this_byte_and_next): Do not advance input_p beyond
3042 (read_id): Check for a length that exceeds the remaining bytes in
3044 (ieee_seek): Initialise end_p.
3045 (ieee_archive_p): Likewise.
3046 (ieee_object_p): Likewise.
3048 2017-06-19 Nick Clifton <nickc@redhat.com>
3051 * vms-alpha.c (_bfd_vms_slurp_eihs): Check for invalid offset
3052 before reading the EIHS structure entries.
3054 2017-06-19 Nick Clifton <nickc@redhat.com>
3057 * vms-alpha.c (_bfd_vms_slurp_egsd): Use unsigned int for
3058 gsd_size. Check that there are enough bytes remaining to read the
3059 type and size of the next egsd. Check that the size of the egsd
3060 does not exceed the size of the record.
3062 2017-06-19 Alan Modra <amodra@gmail.com>
3064 * config.bfd: Correct targ_underscore for cris.
3066 2017-06-18 Alan Modra <amodra@gmail.com>
3068 * config.bfd: Correct targ_underscore for epiphany, ip2k,
3069 m32c, mn10200, pru, rl78, rx, crisv32 and v850.
3071 2017-06-16 Nick Clifton <nickc@redhat.com>
3073 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Do not fail if the
3074 bucketlist is empty because there are no symbols to add to the
3077 2017-06-16 Alan Modra <amodra@gmail.com>
3083 * targets.c (struct bfd_target): Add _bfd_define_start_stop.
3084 (BFD_JUMP_TABLE_LINK): Likewise.
3085 * elf-bfd.h (bfd_elf_define_start_stop): Declare.
3086 * elflink.c (_bfd_elf_gc_mark_rsec): Update comment.
3087 (bfd_elf_define_start_stop): New function.
3088 * linker.c (bfd_generic_define_start_stop): New function.
3089 * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Init
3091 * aout-adobe.c (aout_32_bfd_define_start_stop): Define.
3092 * aout-target.h (MY_bfd_define_start_stop): Define.
3093 * aout-tic30.c (MY_bfd_define_start_stop): Define.
3094 * binary.c (binary_bfd_define_start_stop): Define.
3095 * bout.c (b_out_bfd_define_start_stop): Define.
3096 * coff-alpha.c (_bfd_ecoff_bfd_define_start_stop): Define.
3097 * coff-mips.c (_bfd_ecoff_bfd_define_start_stop): Define.
3098 * coff-rs6000.c (_bfd_xcoff_bfd_define_start_stop): Define.
3099 * coffcode.h (coff_bfd_define_start_stop): Define.
3100 * elfxx-target.h (bfd_elfNN_bfd_define_start_stop): Define.
3101 * i386msdos.c (msdos_bfd_define_start_stop): Define.
3102 * i386os9k.c (os9k_bfd_define_start_stop): Define.
3103 * ieee.c (ieee_bfd_define_start_stop): Define.
3104 * ihex.c (ihex_bfd_define_start_stop): Define.
3105 * libbfd-in.h (_bfd_nolink_bfd_define_start_stop): Define.
3106 * mach-o-target.c (bfd_mach_o_bfd_define_start_stop): Define.
3107 * mmo.c (mmo_bfd_define_start_stop): Define.
3108 * nlm-target.h (nlm_bfd_define_start_stop): Define.
3109 * oasys.c (oasys_bfd_define_start_stop): Define.
3110 * pef.c (bfd_pef_bfd_define_start_stop): Define.
3111 * plugin.c (bfd_plugin_bfd_define_start_stop): Define.
3112 * ppcboot.c (ppcboot_bfd_define_start_stop): Define.
3113 * som.c (som_bfd_define_start_stop): Define.
3114 * srec.c (srec_bfd_define_start_stop): Define.
3115 * tekhex.c (tekhex_bfd_define_start_stop): Define.
3116 * versados.c (versados_bfd_define_start_stop): Define.
3117 * vms-alpha.c (vms_bfd_define_start_stop): Define.
3118 (alpha_vms_bfd_define_start_stop): Define.
3119 * xsym.c (bfd_sym_bfd_define_start_stop): Define.
3120 * bfd-in2.h: Regenerate.
3121 * libbfd.h: Regenerate.
3123 2017-06-16 Jiong Wang <jiong.wang@arm.com>
3125 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use
3126 SYMBOL_REFERENCES_LOCAL.
3128 2017-06-15 Jiong Wang <jiong.wang@arm.com>
3131 * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
3132 (elfNN_aarch64_final_link_relocate): Also propagate relocations to
3133 runtime for if there needs copy relocation elimination.
3134 (need_copy_relocation_p): New function. Return true for symbol with
3135 pc-relative references and if it's against read-only sections.
3136 (elfNN_aarch64_adjust_dynamic_symbol): Use need_copy_relocation_p.
3137 (elfNN_aarch64_check_relocs): Allocate dynrelocs for relocation types
3138 that are related with accessing external objects.
3139 (elfNN_aarch64_gc_sweep_hook): Sync the relocation types with the change
3140 in elfNN_aarch64_check_relocs.
3142 2017-06-15 Nick Clifton <nickc@redhat.com>
3145 * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
3148 (ieee_archive_p): Likewise.
3150 2017-06-15 Nick Clifton <nickc@redhat.com>
3153 * vms-alpha.c (_bfd_vms_slurp_etir): Extend check of cmd_length.
3155 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
3157 * elf32-xtensa.c (elf_xtensa_be_plt_entry,
3158 elf_xtensa_le_plt_entry): Add dimension for the ABI to arrays,
3159 keep both windowed and call0 ABI PLT definitions.
3160 (elf_xtensa_create_plt_entry): Use selected ABI to choose upper
3161 elf_xtensa_*_plt_entry endex.
3162 (ELF_MAXPAGESIZE): Fix at minimal supported MMU page size.
3164 2017-06-14 Nick Clifton <nickc@redhat.com>
3167 * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid
3170 2017-06-14 Nick Clifton <nickc@redhat.com>
3173 * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the
3174 maximum value for the ascic pointer. Check that name processing
3175 does not read beyond this value.
3176 (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the
3179 2017-06-14 Nick Clifton <nickc@redhat.com>
3182 * versados.c (versados_mkobject): Zero the allocated tdata structure.
3183 (process_otr): Check for an invalid offset in the otr structure.
3185 2017-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
3187 * config.bfd (epiphany-*-elf): Accept epiphany-*-*.
3189 2017-06-13 H.J. Lu <hongjiu.lu@intel.com>
3195 * elf-bfd.h (elf_link_hash_entry): Add start_stop. Change the
3196 vtable field to a union.
3197 (_bfd_elf_is_start_stop): Removed.
3198 * elf32-i386.c (elf_i386_convert_load_reloc): Also check for
3199 __start_SECNAME and __stop_SECNAME symbols.
3200 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
3201 * elflink.c (_bfd_elf_is_start_stop): Removed.
3202 (_bfd_elf_gc_mark_rsec): Check start_stop instead of calling
3203 _bfd_elf_is_start_stop.
3204 (elf_gc_propagate_vtable_entries_used): Skip __start_SECNAME and
3205 __stop_SECNAME symbols. Updated.
3206 (elf_gc_smash_unused_vtentry_relocs): Likewise.
3207 (bfd_elf_gc_record_vtinherit): Likewise.
3208 (bfd_elf_gc_record_vtentry): Likewise.
3210 2017-06-13 Nick Clifton <nickc@redhat.com>
3213 * elflink.c (elf_link_adjust_relocs): Generate an error when
3214 encountering a reloc against a symbol removed by garbage
3217 2017-06-12 H.J. Lu <hongjiu.lu@intel.com>
3219 * elf-bfd.h (elf_backend_data): Add struct bfd_link_info *
3220 to merge_gnu_properties.
3221 * elf-properties.c (elf_merge_gnu_properties): Add struct
3222 bfd_link_info * and pass it to merge_gnu_properties.
3223 (elf_merge_gnu_property_list): Add struct bfd_link_info *
3224 and pass it to elf_merge_gnu_properties.
3225 (_bfd_elf_link_setup_gnu_properties): Pass info to
3226 elf_merge_gnu_property_list.
3227 * elf32-i386.c (elf_i386_merge_gnu_properties): Add struct
3229 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): Likewise.
3231 2017-06-11 Joe Zbiciak <joe.zbiciak@leftturnonly.info>
3234 * binary.c (binary_set_section_contents): Scale lma by octets
3235 per byte to set filepos.
3237 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3239 * elf32-arc.c (elf_arc_check_relocs): Fixed conditions to generate
3242 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3244 * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to
3247 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3249 * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to
3250 patched section contents for TLS IE reloc.
3251 * elf32-arc.c: Remove TCB_SIZE preprocessor macro.
3253 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3255 * elf32-arc.c (elf_arc_relocate_section): Added "call" to
3256 RELOC_FOR_GLOBAL_SYMBOL macro.
3258 2018-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3260 * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
3263 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3265 * config/tc-arc.c (md_undefined_symbol): Changed.
3266 * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed.
3268 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3270 * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
3273 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3275 * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
3276 warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
3278 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3280 * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
3283 2017-06-08 Richard Earnshaw <rearnsha@arm.com>
3285 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
3286 that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
3287 is non-zero. Add clarifying comments.
3289 2017-06-08 H.J. Lu <hongjiu.lu@intel.com>
3291 * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
3292 name. Use local IFUNC symbol name string to report unsupported
3293 non-PIC call to IFUNC function.
3294 (elf_i386_relocate_section): Dump local IFUNC name with minfo
3295 when generating R_386_IRELATIVE relocation.
3296 (elf_i386_finish_dynamic_symbol): Likewise.
3297 * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
3299 (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
3300 when generating R_X86_64_IRELATIVE relocation.
3301 (elf_x86_64_finish_dynamic_symbol): Likewise.
3303 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
3305 * elf.c (setup_group): Make sure BFD sections are created for all
3306 group sections in the input file when processing SHF_GROUP
3308 (bfd_section_from_shdr): Avoid duplicating logic already
3309 implemented in `setup_group'.
3311 2017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
3314 * peXXigen.c (pe_print_idata): Use the address of the first thunk
3315 if the hint address is zero.
3317 2017-06-06 James Clarke <jrtc27@jrtc27.com>
3320 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
3321 ELF_COMMON_DEF_P for common symbols.
3323 2017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
3325 * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
3326 SEC_GROUP sections as SEC_EXCLUDE.
3327 (bfd_elf_set_group_contents): Replace use of abort with an assert.
3328 (assign_section_numbers): Use resolve_section_groups flag instead
3329 of relocatable link type.
3330 (_bfd_elf_init_private_section_data): Use resolve_section_groups
3331 flag instead of checking the final_link flag for part of the
3332 checks in here. Fix white space as a result.
3333 * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
3334 instead of relocatable link type.
3335 (bfd_elf_final_link): Likewise.
3337 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
3339 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
3341 * elf32-score.c (score_elf_final_link_relocate): Likewise.
3342 (s3_bfd_score_elf_check_relocs): Likewise.
3343 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
3344 (score_elf_final_link_relocate): Likewise.
3345 (s7_bfd_score_elf_check_relocs): Likewise.
3347 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
3349 * elflink.c (init_reloc_cookie_rels): Remove unused variable
3352 2017-06-06 Maciej W. Rozycki <macro@imgtec.com>
3354 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
3355 from `reloc_count' rather than decrementing it.
3356 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
3357 `reloc_count' by `int_rels_per_ext_rel'.
3358 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
3359 `reloc_count' by `int_rels_per_ext_rel' for last relocation
3360 entry determination.
3361 (s3_bfd_score_elf_check_relocs): Likewise.
3362 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
3363 (s7_bfd_score_elf_relocate_section): Likewise.
3364 (s7_bfd_score_elf_check_relocs): Likewise.
3365 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
3366 prototype and function.
3367 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
3368 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
3369 triple rather than once the sum of REL and RELA relocation entry
3371 (bfd_elf64_get_reloc_upper_bound): Remove macro.
3372 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
3373 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
3374 storage allocation size determination.
3375 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
3376 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
3377 by `int_rels_per_ext_rel' for last relocation entry
3379 (bfd_elf_final_link): Do not multiply `reloc_count' by
3380 `int_rels_per_ext_rel' for internal relocation storage
3381 allocation size determination.
3382 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
3383 `int_rels_per_ext_rel' for last relocation entry determination.
3384 (elf_gc_smash_unused_vtentry_relocs): Likewise.
3385 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
3386 (_bfd_mips_elf_relocate_section): Likewise.
3388 2017-06-05 Alan Modra <amodra@gmail.com>
3391 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
3393 2017-06-01 John Baldwin <jhb@FreeBSD.org>
3395 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
3396 determine structure sizes.
3397 (elfcore_grok_freebsd_prstatus): Likewise.
3399 2017-06-01 Alan Modra <amodra@gmail.com>
3401 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
3402 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
3404 (is_elfv2_localentry0): New function.
3405 (ppc64_elf_tls_setup): Default params->plt_localentry0.
3406 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
3407 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
3408 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
3409 optimized localentry:0 stubs.
3410 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
3411 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
3413 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
3415 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
3417 2017-05-30 Casey Smith <clegg89@gmail.com>
3420 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
3421 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
3423 2017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
3425 * cpu-arc.c (arc_compatible): New function.
3427 2017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
3429 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
3431 2017-05-30 H.J. Lu <hongjiu.lu@intel.com>
3434 * bfdio.c (bfd_get_file_size): New function.
3435 * bfd-in2.h: Regenerated.
3437 2017-05-23 Dilian Palauzov <git-dpa@aegee.org>
3439 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
3442 2017-05-22 H.J. Lu <hongjiu.lu@intel.com>
3444 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
3445 dynobj instead of htab->elf.dynobj.
3447 2017-05-19 Maciej W. Rozycki <macro@imgtec.com>
3449 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
3451 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
3452 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
3453 actual number of internal relocations retrieved. Adjust
3454 function description.
3455 (bfd_elf64_canonicalize_reloc): Remove macro.
3456 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
3458 2017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
3460 * archures.c (bfd_mach_sparc_v9m8): Define.
3461 (bfd_mach_sparc_v8plusm8): Likewise.
3462 (bfd_mach_sparc_v9_p): Adjust to M8.
3463 (bfd_mach_sparc_64bit_p): Likewise.
3464 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
3465 bfd_mach_sparc_v8plusm8.
3466 * bfd-in2.h: Regenerated.
3467 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
3469 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
3470 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
3471 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
3473 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
3474 bfd_mach_sparc_v8plusm8.
3476 2017-05-19 Alan Modra <amodra@gmail.com>
3478 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
3479 debug and special sections when no non-note alloc sections in an
3482 2017-05-18 Alan Modra <amodra@gmail.com>
3484 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
3485 * elf-m10300.c: Likewise.
3487 * elf32-arc.c: Likewise.
3488 * elf32-bfin.c: Likewise.
3489 * elf32-m68k.c: Likewise.
3490 * elf32-nds32.c: Likewise.
3491 * elf32-tilepro.c: Likewise.
3492 * elflink.c: Likewise.
3493 * elfnn-aarch64.c: Likewise.
3494 * elfnn-riscv.c: Likewise.
3495 * elfxx-tilegx.c: Likewise.
3496 * mach-o.c: Likewise.
3497 * peXXigen.c: Likewise.
3498 * vms-alpha.c: Likewise.
3499 * vms-lib.c: Likewise.
3501 2017-05-17 H.J. Lu <hongjiu.lu@intel.com>
3504 * elflink.c (elf_gc_mark_debug_section): New function.
3505 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
3506 referenced by kept debug sections.
3508 2017-05-16 Alan Modra <amodra@gmail.com>
3510 * elf-m10300.c: Rename occurrences of non_ir_ref.
3511 * elf32-arm.c: Likewise.
3512 * elf32-bfin.c: Likewise.
3513 * elf32-cr16.c: Likewise.
3514 * elf32-cris.c: Likewise.
3515 * elf32-d10v.c: Likewise.
3516 * elf32-dlx.c: Likewise.
3517 * elf32-fr30.c: Likewise.
3518 * elf32-frv.c: Likewise.
3519 * elf32-hppa.c: Likewise.
3520 * elf32-i370.c: Likewise.
3521 * elf32-i386.c: Likewise.
3522 * elf32-iq2000.c: Likewise.
3523 * elf32-lm32.c: Likewise.
3524 * elf32-m32c.c: Likewise.
3525 * elf32-m32r.c: Likewise.
3526 * elf32-m68hc1x.c: Likewise.
3527 * elf32-m68k.c: Likewise.
3528 * elf32-mcore.c: Likewise.
3529 * elf32-metag.c: Likewise.
3530 * elf32-microblaze.c: Likewise.
3531 * elf32-moxie.c: Likewise.
3532 * elf32-msp430.c: Likewise.
3533 * elf32-mt.c: Likewise.
3534 * elf32-nios2.c: Likewise.
3535 * elf32-or1k.c: Likewise.
3536 * elf32-ppc.c: Likewise.
3537 * elf32-rl78.c: Likewise.
3538 * elf32-s390.c: Likewise.
3539 * elf32-score.c: Likewise.
3540 * elf32-score7.c: Likewise.
3541 * elf32-sh.c: Likewise.
3542 * elf32-tic6x.c: Likewise.
3543 * elf32-tilepro.c: Likewise.
3544 * elf32-v850.c: Likewise.
3545 * elf32-vax.c: Likewise.
3546 * elf32-xstormy16.c: Likewise.
3547 * elf32-xtensa.c: Likewise.
3548 * elf64-alpha.c: Likewise.
3549 * elf64-hppa.c: Likewise.
3550 * elf64-ia64-vms.c: Likewise.
3551 * elf64-mmix.c: Likewise.
3552 * elf64-ppc.c: Likewise.
3553 * elf64-s390.c: Likewise.
3554 * elf64-sh64.c: Likewise.
3555 * elf64-x86-64.c: Likewise.
3556 * elflink.c: Likewise.
3557 * elfnn-aarch64.c: Likewise.
3558 * elfnn-ia64.c: Likewise.
3559 * elfnn-riscv.c: Likewise.
3560 * elfxx-mips.c: Likewise.
3561 * elfxx-sparc.c: Likewise.
3562 * elfxx-tilegx.c: Likewise.
3563 * linker.c: Likewise.
3565 2017-05-16 Alan Modra <amodra@gmail.com>
3567 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
3568 * elflink.c (elf_link_add_object_symbols): Update to use
3570 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
3572 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
3574 2017-05-15 Maciej W. Rozycki <macro@imgtec.com>
3576 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
3578 2017-05-12 H.J. Lu <hongjiu.lu@intel.com>
3580 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
3581 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
3583 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
3585 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
3587 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
3589 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
3590 to plt_second/plt_second_eh_frame.
3591 (elf_x86_64_link_hash_newfunc): Updated.
3592 (elf_x86_64_allocate_dynrelocs): Likewise.
3593 (elf_x86_64_size_dynamic_sections): Likewise.
3594 (elf_x86_64_relocate_section): Likewise.
3595 (elf_x86_64_finish_dynamic_symbol): Likewise.
3596 (elf_x86_64_finish_dynamic_sections): Likewise.
3597 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
3598 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
3600 (elf_backend_setup_gnu_properties): Updated. Create the
3601 .plt.sec section instead of the .plt.sec section.
3603 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
3605 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
3606 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
3607 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
3609 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
3611 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
3612 (bfd_elf64_set_reloc): Define.
3613 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
3615 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
3617 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
3618 (struct bfd_target): New field _bfd_set_reloc.
3619 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
3620 * reloc.c (_bfd_generic_set_reloc): New function.
3621 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
3622 * nlm-target.h (nlm_set_reloc): Likewise.
3623 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
3624 * aout-tic30.c (MY_set_reloc): Likewise.
3625 * aout-target.h (MY_set_reloc): Likewise.
3626 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
3627 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
3628 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
3629 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
3630 * aout-adobe.c (aout_32_set_reloc): Likewise.
3631 * bout.c (b_out_set_reloc): Likewise.
3632 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
3633 * i386os9k.c (aout_32_set_reloc): Likewise.
3634 * ieee.c (ieee_set_reloc): Likewise.
3635 * oasys.c (oasys_set_reloc): Likewise.
3636 * som.c (som_set_reloc): Likewise.
3637 * versados.c (versados_set_reloc): Likewise.
3638 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
3639 _bfd_generic_set_reloc.
3640 (rs6000_xcoff64_aix_vec): LIkewise.
3641 * libbfd.c (_bfd_norelocs_set_reloc): New function.
3642 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
3643 * i386msdos.c (msdos_set_reloc): Define to
3644 _bfd_norelocs_set_reloc.
3645 * elfcode.h (elf_set_reloc): Define.
3646 * bfd-in2.h: Regenerated.
3648 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
3651 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
3652 for IFUNC function address.
3654 2017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
3656 * elf32-arc.c (FEATURE_LIST_NAME): Define.
3657 (CONFLICT_LIST): Likewise.
3658 (opcode/arc-attrs.h): Include.
3659 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
3660 (arc_extract_features): New file.
3661 (arc_stralloc): Likewise.
3662 (arc_elf_merge_attributes): Likewise.
3663 (arc_elf_merge_private_bfd_data): Use object attributes.
3664 (bfd_arc_get_mach_from_attributes): New function.
3665 (arc_elf_object_p): Use object attributes.
3666 (arc_elf_final_write_processing): Likewise.
3667 (elf32_arc_obj_attrs_arg_type): New function.
3668 (elf32_arc_obj_attrs_handle_unknown): Likewise.
3669 (elf32_arc_section_from_shdr): Likewise.
3670 (elf_backend_obj_attrs_vendor): Define.
3671 (elf_backend_obj_attrs_section): Likewise.
3672 (elf_backend_obj_attrs_arg_type): Likewise.
3673 (elf_backend_obj_attrs_section_type): Likewise.
3674 (elf_backend_obj_attrs_handle_unknown): Likewise.
3675 (elf_backend_section_from_shdr): Likewise.
3677 2017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
3680 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
3681 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
3682 and the destination is a Thumb symbol.
3684 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
3686 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
3687 initializer to silence GCC 4.2.
3688 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
3690 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
3692 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
3693 (LAZY_PLT_ENTRY_SIZE): This.
3694 (NON_LAZY_PLT_ENTRY_SIZE): New.
3695 (elf_x86_64_plt0_entry): Renamed to ...
3696 (elf_x86_64_lazy_plt0_entry): This.
3697 (elf_x86_64_plt_entry): Renamed to ...
3698 (elf_x86_64_lazy_plt_entry): This.
3699 (elf_x86_64_bnd_plt0_entry): Renamed to ...
3700 (elf_x86_64_lazy_bnd_plt0_entry): This.
3701 (elf_x86_64_legacy_plt_entry): Removed.
3702 (elf_x86_64_bnd_plt_entry): Renamed to ...
3703 (elf_x86_64_lazy_bnd_plt_entry): This.
3704 (elf_x86_64_legacy_plt2_entry): Renamed to ...
3705 (elf_x86_64_non_lazy_plt_entry): This.
3706 (elf_x86_64_bnd_plt2_entry): Renamed to ...
3707 (elf_x86_64_non_lazy_bnd_plt_entry): This.
3708 (elf_x86_64_eh_frame_plt): Renamed to ...
3709 (elf_x86_64_eh_frame_lazy_plt): This.
3710 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
3711 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
3712 (elf_x86_64_eh_frame_plt_got): Renamed to ...
3713 (elf_x86_64_eh_frame_non_lazy_plt): This.
3714 (elf_x86_64_lazy_plt_layout): New.
3715 (elf_x86_64_non_lazy_plt_layout): Likewise.
3716 (elf_x86_64_plt_layout): Likewise.
3717 (elf_x86_64_backend_data): Remove PLT layout information. Add
3718 os for target system.
3719 (GET_PLT_ENTRY_SIZE): Removed.
3720 (elf_x86_64_lazy_plt): New.
3721 (elf_x86_64_non_lazy_plt): Likewise.
3722 (elf_x86_64_lazy_bnd_plt): Likewise.
3723 (elf_x86_64_non_lazy_bnd_plt): Likewise.
3724 (elf_x86-64_arch_bed): Updated.
3725 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
3726 (elf_x86_64_create_dynamic_sections): Removed.
3727 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
3728 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
3729 (elf_x86-64_adjust_dynamic_symbol): Updated.
3730 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
3731 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
3732 size for PLT0 if there is no PLT0. Get plt_entry_size from
3733 non_lazy_plt for non-lazy PLT entries.
3734 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
3735 from non_lazy_plt for non-lazy PLT entries.
3736 (elf_x86-64_relocate_section): Updated. Properly get PLT index
3737 if there is no PLT0.
3738 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
3739 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
3740 entries with non-lazy PLT layout. Don't fill the second and third
3741 slots in the PLT entry if there is no PLT0.
3742 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
3743 if there is no PLT0. Set sh_entsize on the .plt.got section.
3744 (compare_relocs): New.
3745 (elf_x86_64_plt_type): Likewise.
3746 (elf_x86_64_plt): Likewise.
3747 (elf_x86_64_nacl_plt): New. Forward declaration.
3748 (elf_x86_64_get_plt_sym_val): Removed.
3749 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
3750 against all dynamic relocations.
3751 (elf_x86_64_link_setup_gnu_properties): New function.
3752 (elf_backend_create_dynamic_sections): Updated.
3753 (elf_backend_setup_gnu_properties): New.
3754 (elf_x86_64_nacl_plt): New.
3755 (elf_x86_64_nacl_arch_bed): Updated.
3757 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
3759 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
3760 (LAZY_PLT_ENTRY_SIZE): This.
3761 (NON_LAZY_PLT_ENTRY_SIZE): New.
3762 (elf_i386_plt0_entry): Renamed to ...
3763 (elf_i386_lazy_plt0_entry): This.
3764 (elf_i386_plt_entry): Renamed to ...
3765 (elf_i386_lazy_plt_entry): This.
3766 (elf_i386_pic_plt0_entry): Renamed to ...
3767 (elf_i386_pic_lazy_plt0_entry): This.
3768 (elf_i386_pic_plt_entry): Renamed to ...
3769 (elf_i386_pic_lazy_plt_entry): This.
3770 (elf_i386_got_plt_entry): Renamed to ...
3771 (elf_i386_non_lazy_plt_entry): This.
3772 (elf_i386_pic_got_plt_entry): Renamed to ...
3773 (elf_i386_pic_non_lazy_plt_entry): This.
3774 (elf_i386_eh_frame_plt): Renamed to ...
3775 (elf_i386_eh_frame_lazy_plt): This.
3776 (elf_i386_eh_frame_plt_got): Renamed to ...
3777 (elf_i386_eh_frame_non_lazy_plt): This.
3778 (elf_i386_plt_layout): Renamed to ...
3779 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
3780 eh_frame_plt_got_size.
3781 (elf_i386_non_lazy_plt_layout): New.
3782 (elf_i386_plt_layout): Likewise.
3783 (elf_i386_non_lazy_plt): Likewise.
3784 (GET_PLT_ENTRY_SIZE): Removed.
3785 (elf_i386_plt): Renamed to ...
3786 (elf_i386_lazy_plt): This.
3787 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
3788 (elf_i386_arch_bed): Updated.
3789 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
3790 (elf_i386_create_dynamic_sections): Removed.
3791 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
3792 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
3793 (elf_i386_adjust_dynamic_symbol): Updated.
3794 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
3795 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
3796 size for PLT0 if there is no PLT0.
3797 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
3798 output section is discarded only if GOT isn't empty.
3799 (elf_i386_relocate_section): Updated. Properly get PLT index
3800 if there is no PLT0.
3801 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
3802 second and third slots in the PLT entry if there is no PLT0.
3803 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
3804 if there is no PLT0. Set sh_entsize on the .plt.got section.
3805 (elf_i386_nacl_plt): Forward declaration.
3806 (elf_i386_get_plt_sym_val): Removed.
3807 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
3808 against all dynamic relocations.
3809 (elf_i386_link_setup_gnu_properties): New function.
3810 (elf_backend_create_dynamic_sections): Updated.
3811 (elf_backend_setup_gnu_properties): New.
3812 (elf_i386_nacl_plt): Updated.
3813 (elf_i386_nacl_arch_bed): Likewise.
3814 (elf_i386_vxworks_arch_bed): Likewise.
3816 2017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
3818 * elflink.c (elf_output_implib): Remove executable flag from import
3820 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
3821 library is a relocatable object file.
3823 2017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
3826 * elf32-avr.c (avr_should_move_sym): New function.
3827 (avr_should_reduce_sym_size): Likewise.
3828 (avr_should_increase_sym_size): Likewise.
3829 (elf32_avr_relax_delete_bytes): Adjust symbol values
3830 and sizes by calling new functions.
3832 2017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
3834 * config.bfd (riscv32-*): Enable rv64.
3836 2017-05-02 Alan Modra <amodra@gmail.com>
3839 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
3840 rather than h->root.type == bfd_link_hash_new.
3841 (bfd_elf_record_link_assignment): Similarly, call
3842 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
3844 2017-04-29 Alan Modra <amodra@gmail.com>
3847 * reloc.c (reloc_offset_in_range): New function.
3848 (bfd_perform_relocation, bfd_install_relocation): Use it.
3849 (_bfd_final_link_relocate): Likewise.
3851 2017-04-28 H.J. Lu <hongjiu.lu@intel.com>
3853 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
3854 before using .plt.got.
3855 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
3857 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3859 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
3860 instead of "+=" to update 0.
3862 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3864 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
3865 .plt.got section here.
3866 (elf_i386_check_relocs): Don't create the .plt.got section.
3867 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
3868 the .plt.got and .plt.bnd sections here.
3869 (elf_x86_64_check_relocs): Don't create the .plt.got nor
3872 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3874 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
3876 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
3877 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
3878 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
3879 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
3882 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3884 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
3886 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
3887 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
3888 the first relocatable ELF input with GNU properties.
3890 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3892 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
3893 VxWorks for non-PIC.
3895 2017-04-27 Alan Modra <amodra@gmail.com>
3897 * elf-bfd.h (struct elf_backend_data): Make asection param of
3898 elf_backend_eh_frame_address_size const.
3899 (_bfd_elf_eh_frame_address_size): Likewise.
3900 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
3901 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
3902 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
3903 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
3904 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
3905 (next_cie_fde_offset): Constify params.
3906 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
3908 2017-04-27 Alan Modra <amodra@gmail.com>
3910 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
3911 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
3912 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
3914 (offset_adjust): New function.
3915 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
3916 (adjust_eh_frame_local_symbols): Likewise.
3917 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
3918 after changing anything. Return true if anything changed.
3919 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
3920 _bfd_elf_adjust_eh_frame_global_symbol for globals.
3922 2017-04-27 Alan Modra <amodra@gmail.com>
3924 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
3927 2017-04-27 Alan Modra <amodra@gmail.com>
3929 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
3930 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
3931 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
3932 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
3933 for undef and undefweak dyn_relocs.
3934 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
3935 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
3936 (allocate_got, allocate_dynrelocs): Likewise.
3937 (ppc64_elf_relocate_section): Likewise.
3939 2017-04-26 H.J. Lu <hongjiu.lu@intel.com>
3941 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
3942 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
3943 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
3944 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
3946 2017-04-26 Nick Clifton <nickc@redhat.com>
3949 * reloc.c (bfd_perform_relocation): Check for a negative address
3952 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
3955 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
3957 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
3958 (elf_backend_always_renumber_dynsyms): Define.
3959 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
3960 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
3961 * elflink.c (bfd_elf_size_dynamic_sections): Also call
3962 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
3964 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
3966 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
3968 * elflink.c (bfd_elf_size_dynamic_sections): Only call
3969 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
3970 sections have been created.
3972 2017-04-26 Nick Clifton <nickc@redhat.com>
3975 * compress.c (bfd_init_section_compress_status): Check the return
3976 value from bfd_malloc.
3978 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3980 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
3981 no_finish_dynamic_symbol.
3982 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
3984 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
3985 weak symbol, don't make it dynamic.
3986 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
3987 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
3988 relocation for GOT reference.
3989 (elf_x86_64_finish_dynamic_symbol): Abort if
3990 no_finish_dynamic_symbol isn't 0.
3992 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3995 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
3996 undefined weak symbol, don't make it dynamic.
3997 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
3998 set no_finish_dynamic_symbol and generate R_386_RELATIVE
3999 relocation for R_386_GOT32.
4001 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
4004 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
4006 2017-04-23 Alan Modra <amodra@gmail.com>
4009 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
4010 * elf.c (lcomm_sym): New.
4011 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
4012 * bfd-in2.h: Regenerate.
4014 2017-04-23 Alan Modra <amodra@gmail.com>
4017 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
4018 parameters and comment.
4019 (_bfd_elf_get_reloc_section): Delete.
4020 (_bfd_elf_plt_get_reloc_section): Declare.
4021 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
4022 New functions. Don't blindly skip over assumed .rel/.rela prefix.
4024 (_bfd_elf_get_reloc_section): ..here. Delete.
4025 (assign_section_numbers): Call elf_get_reloc_section.
4026 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
4027 * elfxx-target.h (elf_backend_get_reloc_section): Update.
4029 2017-04-23 Alan Modra <amodra@gmail.com>
4032 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
4035 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
4038 * elf32-i386.c (elf_i386_link_hash_entry): Add
4039 no_finish_dynamic_symbol.
4040 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
4041 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
4042 symbol, don't make it dynamic in PIE.
4043 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
4044 set no_finish_dynamic_symbol and generate R_386_RELATIVE
4045 relocation for R_386_GOT32
4046 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
4049 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
4053 * elflink.c (elf_link_add_object_symbols): Require
4054 --no-dynamic-linker with -E/--dynamic-list when creating
4057 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
4059 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
4062 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
4064 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
4065 dynamic symbol sorting.
4067 2017-04-20 H.J. Lu <hongjiu.lu@intel.com>
4070 * elflink.c (elf_link_add_object_symbols): Preserve
4071 dynamic_ref_after_ir_def when restoring the symbol table for
4072 unneeded dynamic object.
4074 2017-04-19 H.J. Lu <hongjiu.lu@intel.com>
4077 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
4078 on on undefined IFUNC symbol in the second PLT.
4080 2017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
4082 * peXXigen.c (pe_print_reloc): Correct chunk_end.
4084 2017-04-19 Alan Modra <amodra@gmail.com>
4086 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
4087 or make dynamic for info->dynamic_undefined_weak 0 and 1.
4088 * elf32-ppc.c:Formatting.
4089 (ensure_undefweak_dynamic): Don't make dynamic when
4090 info->dynamic_undefined_weak is zero.
4091 (allocate_dynrelocs): Discard undefweak dyn_relocs for
4092 info->dynamic_undefined_weak. Discard undef dyn_relocs when
4093 not default visibility. Discard undef and undefweak
4095 (ppc_elf_relocate_section): Adjust to suit.
4096 * elf64-ppc.c: Formatting.
4097 (ensure_undefweak_dynamic): Don't make dynamic when
4098 info->dynamic_undefined_weak is zero.
4099 (allocate_dynrelocs): Discard undefweak dyn_relocs for
4100 info->dynamic_undefined_weak. Discard them earlier.
4102 2017-04-17 H.J. Lu <hongjiu.lu@intel.com>
4105 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
4106 before generating the version definition section.
4108 2017-04-17 Alan Modra <amodra@gmail.com>
4110 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
4111 state when a regular object file defines a symbol with
4112 incompatible type to that defined by an earlier shared lib.
4114 2017-04-13 Alan Modra <amodra@gmail.com>
4116 * coffcode.h: Wrap some overly long _bfd_error_handler args.
4118 * elf32-arm.c: Likewise.
4119 * elf32-i386.c: Likewise.
4120 * elf32-mep.c: Likewise.
4121 * elf64-ia64-vms.c: Likewise.
4122 * elf64-x86-64.c: Likewise.
4123 * elflink.c: Likewise.
4124 * elfnn-ia64.c: Likewise.
4125 * elfxx-mips.c: Likewise.
4127 2017-04-13 Alan Modra <amodra@gmail.com>
4129 * aoutx.h: Use %B and %A in error messages throughout file.
4130 * aout-cris.c: Likewise.
4131 * archive.c: Likewise.
4132 * binary.c: Likewise.
4133 * coff-rs6000.c: Likewise.
4134 * coff-tic4x.c: Likewise.
4135 * coffcode.h: Likewise.
4136 * coffgen.c: Likewise.
4137 * cofflink.c: Likewise.
4138 * coffswap.h: Likewise.
4139 * cpu-arm.c: Likewise.
4140 * elf-eh-frame.c: Likewise.
4141 * elf-m10300.c: Likewise.
4143 * elf32-arc.c: Likewise.
4144 * elf32-arm.c: Likewise.
4145 * elf32-bfin.c: Likewise.
4146 * elf32-frv.c: Likewise.
4147 * elf32-iq2000.c: Likewise.
4148 * elf32-m32c.c: Likewise.
4149 * elf32-microblaze.c: Likewise.
4150 * elf32-nds32.c: Likewise.
4151 * elf32-rl78.c: Likewise.
4152 * elf32-rx.c: Likewise.
4153 * elf32-score.c: Likewise.
4154 * elf32-score7.c: Likewise.
4155 * elf32-sh64.c: Likewise.
4156 * elf32-v850.c: Likewise.
4157 * elf32-vax.c: Likewise.
4158 * elf32-visium.c: Likewise.
4159 * elf64-ia64-vms.c: Likewise.
4160 * elf64-mmix.c: Likewise.
4161 * elf64-sh64.c: Likewise.
4162 * elfcode.h: Likewise.
4163 * elfnn-aarch64.c: Likewise.
4164 * elfnn-ia64.c: Likewise.
4165 * elfxx-mips.c: Likewise.
4166 * hpux-core.c: Likewise.
4169 * linker.c: Likewise.
4170 * merge.c: Likewise.
4172 * oasys.c: Likewise.
4173 * pdp11.c: Likewise.
4174 * peXXigen.c: Likewise.
4175 * rs6000-core.c: Likewise.
4176 * vms-alpha.c: Likewise.
4177 * xcofflink.c: Likewise.
4179 2017-04-13 Alan Modra <amodra@gmail.com>
4181 * bfd.c (PRINT_TYPE): Define.
4182 (_doprnt): New function.
4183 (error_handler_internal): Use _doprnt.
4184 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
4185 calls in their natural order, throughout file.
4186 * coff-mcore.c: Likewise.
4187 * coff-ppc.c: Likewise.
4188 * coff-tic80.c: Likewise.
4189 * cofflink.c: Likewise.
4190 * elf-s390-common.c: Likewise.
4192 * elf32-arm.c: Likewise.
4193 * elf32-i386.c: Likewise.
4194 * elf32-m32r.c: Likewise.
4195 * elf32-msp430.c: Likewise.
4196 * elf32-spu.c: Likewise.
4197 * elf64-ia64-vms.c: Likewise.
4198 * elf64-sparc.c: Likewise.
4199 * elf64-x86-64.c: Likewise.
4200 * elflink.c: Likewise.
4201 * elfnn-aarch64.c: Likewise.
4202 * elfnn-ia64.c: Likewise.
4203 * elfxx-mips.c: Likewise.
4205 2017-04-13 Alan Modra <amodra@gmail.com>
4207 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
4208 branch veneers" error. Fix double space and format message.
4209 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
4210 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
4212 2017-04-13 Alan Modra <amodra@gmail.com>
4214 * bfd-in2.h: Regenerate.
4216 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
4218 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
4219 extra `\n' in warning/error messages.
4220 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
4221 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
4223 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
4225 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
4226 processor-specific properties with generic ELF target vector.
4228 2017-04-10 Qing Zhao <qing.zhao@oracle.com>
4230 * elf32-sparc.c (elf_backend_fixup_symbol): New.
4231 * elf64-sparc.c (elf_backend_fixup_symbol): New.
4232 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
4233 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
4235 (link_hash_newfunc): Initialize has_got_reloc and
4237 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
4239 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
4241 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
4243 (_bfd_sparc_elf_fixup_symbol): New function.
4244 (allocate_dynrelocs): Don't allocate space for dynamic
4245 relocations and discard relocations against resolved undefined
4246 weak symbols in executable. Don't make resolved undefined weak
4247 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
4248 relocation against undefined weak symbols in PIE.
4249 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
4250 relocations against resolved undefined weak symbols in PIE
4251 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
4252 without ynamic PLT/GOT relocations for resolved undefined weak
4254 Don't generate dynamic relocation against resolved undefined
4255 weak symbol in executable.
4256 (pie_finish_undefweak_symbol): New function.
4257 (_bfd_sparc_elf_finish_dynamic_sections): Call
4258 pie_finish_undefweak_symbol on all symbols in PIE.
4259 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
4260 (_bfd_sparc_elf_fixup_symbol): New function.
4262 2017-04-10 Nick Clifton <nickc@redhat.com>
4264 * config.bfd: Remove ns32k from obsolete list.
4266 2017-04-10 Alan Modra <amodra@gmail.com>
4269 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
4270 (special_sections_i): Likewise for .init_array.
4271 (special_sections_p): Likewise for .preinit_array.
4273 2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
4277 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
4278 ELF_COMMON_DEF_P for common symbols.
4279 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
4280 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
4281 * elflink.c (_bfd_elf_merge_symbol): Revert commits
4282 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
4283 07492f668d2173da7a2bda3707ff0985e0f460b6.
4285 2017-04-07 Pedro Alves <palves@redhat.com>
4287 * opncls.c (bfd_get_debug_link_info): Rename to...
4288 (bfd_get_debug_link_info_1): ... this. Change type of second
4289 parameter to void pointer. Adjust.
4290 (bfd_get_debug_link_info): Reimplement on top of
4291 bfd_get_debug_link_info_1.
4292 (separate_debug_file_exists, separate_alt_debug_file_exists):
4293 Change type of second parameter to void pointer. Adjust.
4294 (get_func_type, check_func_type): Change type of second parameter
4296 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
4297 the callback functions instead of passing the address of a local.
4298 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
4299 find_separate_debug_file.
4300 (get_alt_debug_link_info_shim): Change type of second parameter to
4301 void pointer. Adjust.
4302 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
4303 find_separate_debug_file.
4304 (get_build_id_name, bfd_boolean check_build_id_file): Change type
4305 of second parameter to void pointer. Adjust.
4306 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
4307 pointer local to find_separate_debug_file.
4309 2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
4311 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
4312 external symbols with a definition.
4313 (_bfd_coff_gc_mark_extra_sections): Fix typo.
4315 2017-04-07 Alan Modra <amodra@gmail.com>
4317 * po/SRC-POTFILES.in: Regenerate.
4319 2017-04-05 Alan Modra <amodra@gmail.com>
4321 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
4324 2017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
4326 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
4327 numbers for DataDirectory entry indicies passed to
4330 2017-04-04 H.J. Lu <hongjiu.lu@intel.com>
4332 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
4333 each GNU_MBIND section and align GNU_MBIND section to page size.
4334 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
4335 segment for each GNU_MBIND section.
4336 (_bfd_elf_init_private_section_data): Copy sh_info from input
4337 for GNU_MBIND section.
4339 2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
4341 * elfnn-riscv.c (GP_NAME): Delete.
4342 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
4343 (_bfd_riscv_relax_lui): Likewise.
4345 2017-04-04 Nick Clifton <nickc@redhat.com>
4348 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
4350 (bfd_elf_final_link): Only initialize the extended symbol index
4351 section if there are extended symbol tables to list.
4353 2017-04-03 H.J. Lu <hongjiu.lu@intel.com>
4355 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
4356 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
4357 * configure.ac (elf): Add elf-properties.lo.
4358 * Makefile.in: Regenerated.
4359 * configure: Likewise.
4360 * elf-bfd.h (elf_property_kind): New.
4361 (elf_property): Likewise.
4362 (elf_property_list): Likewise.
4363 (elf_properties): Likewise.
4364 (_bfd_elf_parse_gnu_properties): Likewise.
4365 (_bfd_elf_get_property): Likewise.
4366 (_bfd_elf_link_setup_gnu_properties): Likewise.
4367 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
4368 and setup_gnu_properties.
4369 (elf_obj_tdata): Add properties.
4370 * elf-properties.c: New file.
4371 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
4372 (elf_i386_merge_gnu_properties): Likewise.
4373 (elf_backend_parse_gnu_properties): Likewise.
4374 (elf_backend_merge_gnu_properties): Likewise.
4375 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
4376 (elf_x86_64_merge_gnu_properties): Likewise.
4377 (elf_backend_parse_gnu_properties): Likewise.
4378 (elf_backend_merge_gnu_properties): Likewise.
4379 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
4380 (elf_backend_parse_gnu_properties): Likewise.
4381 (elf_backend_setup_gnu_properties): Likewise.
4382 (elfNN_bed): Add elf_backend_parse_gnu_properties,
4383 elf_backend_merge_gnu_properties and
4384 elf_backend_setup_gnu_properties.
4386 2017-03-30 Pip Cet <pipcet@gmail.com>
4388 * elf32-wasm32.c: Add relocation code, two relocs.
4389 * reloc.c: Add wasm32 relocations.
4390 * libbfd.h: Regenerate.
4391 * bfd-in2.h: Regenerate.
4392 * bfd/po/bfd.pot: Regenerate.
4394 2017-03-29 Nick Clifton <nickc@redhat.com>
4397 * coff-bfd.h (struct coff_section_data): Add new fields:
4398 saved_bias and bias.
4399 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
4400 computed for PE binaries.
4401 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
4404 2017-03-28 Hans-Peter Nilsson <hp@axis.com>
4407 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
4408 to handle a local symbol with a hash-symbol-entry; without PLT.
4409 Add BFD_ASSERT for an incidental case with GOT entry present.
4410 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
4411 isn't forced-or-set local.
4413 2017-03-27 Pip Cet <pipcet@gmail.com>
4415 * wasm-module.c: New file to support WebAssembly modules.
4416 * wasm-module.h: New file to support WebAssembly modules.
4417 * doc/webassembly.texi: Start documenting wasm-module.c.
4418 * config.bfd: Add wasm_vec.
4419 * targets.c: Likewise.
4420 * configure.ac: Likewise.
4421 * Makefile.am: Add entries for wasm-module.c.
4422 * Makefile.in: Regenerate.
4423 * configure: Regenerate.
4424 * po/SRC-POTFILES.in: Regenerate.
4426 2017-03-27 Pip Cet <pipcet@gmail.com>
4428 * cpu-wasm32.c: New file to support wasm32 architecture.
4429 * elf32-wasm32.c: New file to support wasm32 architecture.
4430 * Makefile.am: Add wasm32 architecture.
4431 * archures.c: Likewise.
4432 * config.bfd: Likewise.
4433 * configure.ac: Likewise.
4434 * targets.c: Likewise.
4435 * Makefile.in: Regenerate.
4436 * bfd-in2.h: Regenerate.
4437 * configure: Regenerate.
4438 * po/SRC-POTFILES.in: Regenerate.
4440 2017-03-20 Alan Modra <amodra@gmail.com>
4443 * elf64-ppc.c (compare_symbols): Stabilize sort.
4445 2017-03-18 Alan Modra <amodra@gmail.com>
4447 * elf64-ppc.c (struct ppc_link_hash_table): Add
4448 local_ifunc_resolver and maybe_local_ifunc_resolver.
4449 (ppc_build_one_stub): Set flags on emitting dynamic
4450 relocation to ifunc.
4451 (ppc64_elf_relocate_section): Likewise.
4452 (ppc64_elf_finish_dynamic_symbol): Likewise.
4453 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
4454 local dynamic relocs to ifuncs.
4455 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
4456 local_ifunc_resolver and maybe_local_ifunc_resolver.
4457 (ppc_elf_relocate_section): Set flag on emitting dynamic
4458 relocation to ifuncs.
4459 (ppc_elf_finish_dynamic_symbol): Likewise.
4460 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
4461 dynamic relocs to ifuncs.
4463 2017-03-13 Nick Clifton <nickc@redhat.com>
4466 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
4467 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
4468 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
4469 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
4470 * bfd-in2.h: Regenerate.
4471 * libbfd.h: Regenerate.
4472 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
4474 (IS_AARCH64_TLSDESC_RELOC): Likewise.
4475 (elfNN_aarch64_howto_table): Likewise.
4476 (aarch64_tls_transition_without_check): Likewise.
4477 (aarch64_reloc_got_type): Likewise.
4478 (elfNN_aarch64_final_link_relocate): Likewise.
4479 (elfNN_aarch64_tls_relax): Likewise.
4480 (elfNN_aarch64_relocate_section): Likewise.
4481 (elfNN_aarch64_gc_sweep_hook): Likewise.
4482 (elfNN_aarch64_check_relocs): Likewise.
4483 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
4484 (_bfd_aarch64_elf_resolve_relocation): Likewise.
4486 2017-03-11 Alan Modra <amodra@gmail.com>
4488 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
4489 parameter is in fact used. Whitespace fixes.
4490 * elf64-ppc.c: Likewise.
4492 2017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
4494 * rs6000-core.c (CORE_NEW): Simplify macro when
4495 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
4497 2017-03-07 Alan Modra <amodra@gmail.com>
4501 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
4504 2017-03-05 Alan Modra <amodra@gmail.com>
4506 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
4507 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
4508 (next_cie_fde_offset): New function.
4509 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
4510 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
4511 four bytes. Align CIEs to four or eight bytes depending on
4512 per_encoding_aligned8. Align FDEs according to their encoding.
4513 Pad last FDE to output section alignment.
4514 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
4516 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
4517 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
4518 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
4520 2017-03-02 Martin Bickel <binutils@ineranves.de>
4523 * elf.c (rewrite_elf_program_header): Do not issue a warning for
4524 empty segments which have a zero filesz, but a non-zero memsz.
4526 2017-03-02 Alan Modra <amodra@gmail.com>
4528 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
4530 2017-02-28 Alan Modra <amodra@gmail.com>
4532 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
4533 (ppc64_elf_relocate_section): Likewise.
4535 2017-02-28 Alan Modra <amodra@gmail.com>
4538 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
4539 rather than elf32_nios2_hash_table or elf_hash_table.
4540 (create_got_section): Likewise.
4541 (nios2_elf32_finish_dynamic_symbol): Likewise.
4542 (nios2_elf32_adjust_dynamic_symbol): Likewise.
4543 (nios2_elf32_size_dynamic_sections): Likewise.
4544 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
4545 vars. Use htab equivalents directly instead. Don't create
4546 all dynamic sections on needing just the GOT. Use a goto
4547 rather than a fall-through with reloc test. Ensure
4548 htab->dynobj is set when making dynamic sreloc section.
4549 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
4550 equivalent directly instead. Don't segfault on looking for
4551 .dynamic when dynamic sections have not been created. Don't
4552 segfault on .got.plt being discarded.
4553 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
4554 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
4555 fixme and another not so relevant comment.
4556 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
4557 already set, set hash table dynobj on creating .sbss.
4559 2017-02-28 Alan Modra <amodra@gmail.com>
4561 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
4562 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
4563 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
4564 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
4565 (ppc64_elf_relocate_section): Likewise.
4566 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
4567 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
4568 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
4569 * libbfd.h: Regenerate.
4570 * bfd-in2.h: Regenerate.
4572 2017-02-28 Alan Modra <amodra@gmail.com>
4574 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
4575 dynamic .data.rel.ro read-only.
4576 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
4577 rather than section flags when deciding where copy reloc goes.
4578 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
4579 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
4580 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
4581 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
4582 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
4583 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
4584 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
4585 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
4586 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
4587 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
4588 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
4589 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
4590 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
4591 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
4592 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
4593 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
4594 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
4595 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
4596 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
4598 2017-02-28 Maciej W. Rozycki <macro@imgtec.com>
4600 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
4601 `jalr $0, $25' instruction encoding.
4603 2017-02-27 Nick Clifton <nickc@redhat.com>
4606 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
4607 generating a seg-fault when encountering a symbol that has been
4608 deleted by garbage collection.
4610 2017-02-25 Alan Modra <amodra@gmail.com>
4612 * elf32-arc.c (struct dynamic_sections): Delete.
4613 (enum dyn_section_types): Delete.
4614 (dyn_section_names): Delete.
4615 (arc_create_dynamic_sections): Delete.
4616 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
4617 segfault on discarded .rela.plt section.
4618 (elf_arc_size_dynamic_sections): Formatting. Don't call
4619 arc_create_dynamic_sections. Don't allocate memory for sections
4620 handled by the generic linker. Correct code finding relocs in
4621 read-only sections. Set SEC_EXCLUDE on zero size .got,
4622 .got.plt, and .dynbss sections. Do set .interp for pies.
4624 2017-02-24 Andrew Waterman <andrew@sifive.com>
4626 * elfnn-riscv.c (GP_NAME): New macro.
4627 (riscv_global_pointer_value): Use it.
4628 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
4629 output section, consider only that section's alignment.
4631 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
4633 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
4634 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
4635 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
4636 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
4638 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
4640 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
4641 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
4644 2017-02-23 Alan Modra <amodra@gmail.com>
4647 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
4649 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
4650 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
4653 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
4656 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
4657 processing ahead of the call to `elf_gc_sweep_symbol'.
4659 2017-02-22 Nick Clifton <nickc@redhat.com>
4662 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
4663 created section 4-byte alignment.
4665 2017-02-22 Alan Modra <amodra@gmail.com>
4667 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
4668 on .got or .plt output section being discarded by script.
4669 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
4672 2017-02-21 Alan Modra <amodra@gmail.com>
4674 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
4675 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
4677 2017-02-20 Alan Modra <amodra@gmail.com>
4680 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
4681 if DT_RELSZ/DT_RELASZ is zero.
4683 2017-02-17 Nick Clifton <nickc@redhat.com>
4685 * compress.c (bfd_get_full_section_contents): Remember to reduce
4686 compressed size by the sizeof the compression header when
4687 decompressing the contents.
4689 2017-02-17 Pedro Alves <palves@redhat.com>
4691 * srec.c (Chunk): Rename to ...
4692 (_bfd_srec_len): ... this.
4693 (S3Forced): Rename to ...
4694 (_bfd_srec_forceS3): ... this.
4695 * objcopy.c: Adjust all references.
4697 2017-02-17 Pedro Alves <palves@redhat.com>
4699 * archive.c (bsd_write_armap): Rename to ...
4700 (_bfd_bsd_write_armap): ... this.
4701 (coff_write_armap): Rename to ...
4702 (_bfd_coff_write_armap): ... this.
4703 * libbfd-in.h (bsd_write_armap): Rename to ...
4704 (_bfd_bsd_write_armap): ... this.
4705 (coff_write_armap): Rename to ...
4706 (_bfd_coff_write_armap): ... this.
4707 * aout-target.h, aout-tic30.c: Adjust all users.
4708 * libbfd.h: Regenerate.
4710 2017-02-17 Pedro Alves <palves@redhat.com>
4712 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
4713 (warn_deprecated): Rename to ...
4714 (_bfd_warn_deprecated): ... this.
4715 * libbfd.c (warn_deprecated): Rename to ...
4716 (_bfd_warn_deprecated): ... this.
4717 * bfd-in2.h: Regenerate.
4719 2017-02-17 Pedro Alves <palves@redhat.com>
4721 * bfdio.c (real_ftell): Rename to ...
4722 (_bfd_real_ftell): ... this.
4723 (real_fseek): Rename to ...
4724 (_bfd_real_fseek): ... this.
4725 (real_fopen): Rename to ...
4726 (_bfd_real_fopen): ... this.
4727 * libbfd-in.h (real_ftell): Rename to ...
4728 (_bfd_real_ftell): ... this.
4729 (real_fseek): Rename to ...
4730 (_bfd_real_fseek): ... this.
4731 (real_fopen): Rename to ...
4732 (_bfd_real_fopen): ... this.
4733 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
4734 * libbfd.h: Regenerate.
4736 2017-02-17 Pedro Alves <palves@redhat.com>
4738 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
4739 * libbfd.c (read_unsigned_leb128): Rename to ...
4740 (_bfd_read_unsigned_leb128): ... this.
4741 (read_signed_leb128): Rename to ...
4742 (_bfd_read_signed_leb128): ... this.
4743 (safe_read_leb128): Rename to ...
4744 (_bfd_safe_read_leb128): ... this.
4745 * libbfd-in.h (read_unsigned_leb128): Rename to ...
4746 (_bfd_read_unsigned_leb128): ... this.
4747 (read_signed_leb128): Rename to ...
4748 (_bfd_read_signed_leb128): ... this.
4749 (safe_read_leb128): Rename to ...
4750 (_bfd_safe_read_leb128): ... this.
4751 * libbfd.h: Renegerate.
4753 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
4755 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
4756 before trying to fine matching file and line information.
4758 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
4760 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
4761 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
4762 not match current bfd, then reload debug information. Record bfd
4763 we're loading debug info for in the stash. If we have debug
4764 informatin in the cache then perform section placement before
4767 2017-02-16 Alan Modra <amodra@gmail.com>
4770 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
4771 * elfxx-target.h (elf_backend_no_page_alias): Define.
4772 (elfNN_bed): Init new field.
4773 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
4774 ensure PT_LOAD segment starts on a new page.
4775 * elf32-hppa.c (elf_backend_no_page_alias): Define.
4777 2017-02-16 Alan Modra <amodra@gmail.com>
4780 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
4783 2017-02-16 Jiong Wang <jiong.wang@arm.com>
4785 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
4786 * bfd-in2.h: Regenerated.
4788 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
4791 * elf32-i386.c (elf_i386_relocate_section): Allow
4792 "lea foo@GOT, %reg" in PIC.
4794 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
4797 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
4798 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
4799 error against local IFUNC symbol without a base register for
4802 2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
4804 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
4805 `%P: %H:' with `info->callbacks->einfo'.
4806 (ppc_elf_relocate_section): Likewise.
4807 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
4808 (ppc64_elf_edit_toc): Likewise.
4809 (ppc64_elf_relocate_section): Likewise.
4811 2017-02-14 Alan Modra <amodra@gmail.com>
4813 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
4814 --gc-keep-exported, and test versioned field of sym rather than
4815 looking for @ in name.
4817 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
4819 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
4822 2017-02-13 Nick Clifton <nickc@redhat.com>
4825 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
4828 2017-02-07 Andrew Waterman <andrew@sifive.com>
4830 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
4831 entry size if PLT header is written.
4833 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
4835 Fix sparc64 dynamic relocation processing to use the dynamic
4837 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
4838 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
4841 2017-02-03 Nick Clifton <nickc@redhat.com>
4844 * coffcode.h (coff_write_object_contents): Enlarge size of
4845 s_name_buf in order to avoid compile time warning about possible
4847 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
4848 32-bits of insn value before printing into buffer.
4850 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4852 * elfxx-mips.c (mips_elf_hash_sort_data): Add
4853 `max_local_dynindx'.
4854 (mips_elf_sort_hash_table): Handle it.
4855 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
4856 symbols bump up `max_local_dynindx' rather than
4857 `max_non_got_dynindx'.
4859 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4861 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
4862 `min_got_dynindx', `max_unref_got_dynindx' and
4863 `max_non_got_dynindx' members to the `bfd_size_type' data type.
4864 (mips_elf_sort_hash_table): Adjust accordingly.
4866 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4868 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
4869 to access the hash table.
4871 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4873 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
4874 non-NULL `htab' to the beginning.
4876 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4878 * elflink.c (elf_gc_sweep): Wrap overlong line.
4880 2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
4882 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
4883 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
4884 * elfxx-mips.c (mips_elf_link_hash_table): Add
4885 `ignore_branch_isa' member.
4886 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
4887 in branch relocation calculation as an error if
4888 `ignore_branch_isa' has been set.
4889 (_bfd_mips_elf_insn32): Rename to...
4890 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
4891 parameter to `insn32' and add an `ignore_branch_isa' parameter.
4892 Handle the new parameter.
4894 2017-01-27 Hans-Peter Nilsson <hp@axis.com>
4896 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
4897 local variable dynobj.
4900 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
4901 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
4902 executable from read-only sections into sdynrelro.
4903 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
4904 dynamic relocs in sdynrelro.
4905 (elf_backend_want_dynrelro): Define.
4907 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4909 * config.bfd (*-*-rtemsaout*): Mark as removed.
4911 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4913 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
4914 (arm-*-rtems*): Move to (arm*-*-eabi*).
4915 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
4916 (m68-*-rtems*): Move to (m68*-*-elf*).
4918 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4920 * config.bfd (*-*-rtemscoff*): Mark as removed.
4922 2017-01-24 Maciej W. Rozycki <macro@imgtec.com>
4925 * elflink.c (bfd_elf_record_link_assignment): Revert last
4926 change and don't ever clear `forced_local'. Set `mark'
4928 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
4930 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
4931 (bfd_elf_size_dynamic_sections): ... here.
4932 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
4933 and set `mark' instead in `__tls_get_addr_opt' processing.
4934 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
4936 2017-01-24 Alan Modra <amodra@gmail.com>
4938 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
4939 where dynamic relocs are preferable. Allow ifunc too.
4940 (ensure_undefweak_dynamic): New function.
4941 (allocate_dynrelocs): Use it here. Move plt handling last and
4942 don't make symbols dynamic, simplifying loop. Only make undef
4943 weak symbols with GOT entries dynamic. Correct condition
4944 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
4945 comments. Remove goto.
4946 (ppc_elf_relocate_section): Correct test for using dynamic
4947 symbol on GOT relocs. Rearrange test for emitting GOT relocs
4948 to suit. Set up explicit tls_index entries and implicit GOT
4949 tls_index entries resolvable at link time for
4950 __tls_get_addr_opt. Simplify test to clear mem for prelink.
4951 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
4952 (ensure_undefweak_dynamic): New function.
4953 (allocate_dynrelocs): Use it here. Only make undef weak symbols
4954 with GOT entries dynamic. Remove unnecessary test of
4955 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
4956 (ppc64_elf_relocate_section): Correct test for using dynamic
4957 symbol on GOT relocs. Rearrange test for emitting GOT relocs
4958 to suit. Set up explicit tls_index entries and implicit GOT
4959 tls_index entries resolvable at link time for __tls_get_addr_opt.
4960 Simplify expression to clear mem for prelink.
4962 2017-01-23 Yury Norov <ynorov@caviumnetworks.com>
4964 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
4966 2017-01-20 Jiong Wang <jiong.wang@arm.com>
4968 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
4969 (elf_backend_hash_symbol): Define.
4971 2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
4974 * elflink.c (bfd_elf_record_link_assignment): Clear any
4975 `forced_local' marking for DSO symbols that are not being
4978 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
4980 * elfnn-riscv.c (riscv_elf_object_p): New function.
4982 2017-01-12 H.J. Lu <hongjiu.lu@intel.com>
4985 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
4987 (elf_x86_64_check_relocs): Create .eh_frame section for the
4989 (elf_x86_64_size_dynamic_sections): Allocate and initialize
4990 .eh_frame section for the .plt.bnd section.
4991 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
4992 for the .plt.bnd section.
4994 2017-01-12 Nick Clifton <nickc@redhat.com>
4997 * opncls.c (find_separate_debug_file): Add include_dirs
4998 parameter. Only include the directory part of the bfd's filename
4999 in search paths if include_dirs is true. Add a couple of extra
5000 locations for looking for debug files.
5001 ( bfd_follow_gnu_debuglink): Update invocation of
5002 find_separate_debug_file.
5003 (bfd_follow_gnu_debugaltlink): Likewise.
5004 (get_build_id): New function: Finds the build-id of the given bfd.
5005 (get_build_id_name): New function: Computes the name of the
5006 separate debug info file for a bfd, based upon its build-id.
5007 (check_build_id_file): New function: Checks to see if a separate
5008 debug info file exists at the given location, and that its
5009 build-id matches that of the original bfd.
5010 (bfd_follow_build_id_debuglink): New function: Finds a separate
5011 debug info file for a given bfd by using the build-id method.
5012 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
5013 method of locating a separate debug info file before using the
5015 * bfd-in2.h: Regenerate.
5017 2017-01-11 H.J. Lu <hongjiu.lu@intel.com>
5020 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
5021 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
5022 elf_x86_64_eh_frame_plt_got.
5023 (elf_x86_64_size_dynamic_sections): Get unwind info from
5024 elf_x86_64_bnd_arch_bed for the BND PLT.
5026 2017-01-11 Jeremy Soller <jackpot51@gmail.com>
5028 * config.bfd: Add entries for i686-redox and x86_64-redox.
5030 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
5032 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
5034 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
5035 .eh_frame section to 4 bytes for x32.
5036 (elf_x86_64_check_relocs): Likewise.
5038 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
5041 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
5042 (PLT_GOT_FDE_LENGTH): Likewise.
5043 (elf_i386_plt_layout): Add eh_frame_plt_got and
5044 eh_frame_plt_got_size.
5045 (elf_i386_plt): Updated.
5046 (elf_i386_link_hash_table): Add plt_got_eh_frame.
5047 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
5048 (elf_i386_size_dynamic_sections): Allocate and initialize
5049 .eh_frame section for .plt.got.
5050 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
5052 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
5053 eh_frame_plt_got_size.
5054 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
5055 (PLT_GOT_FDE_LENGTH): Likewise.
5056 (elf_x86_64_backend_data): Add eh_frame_plt_got and
5057 eh_frame_plt_got_size.
5058 (elf_x86_64_arch_bed): Updated.
5059 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
5060 eh_frame_plt_got_size.
5061 (elf_x86_64_nacl_arch_bed): Likewise.
5062 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
5063 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
5064 (elf_x86_64_size_dynamic_sections): Allocate and initialize
5065 .eh_frame section for .plt.got.
5066 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
5069 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
5071 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
5072 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
5074 2017-01-09 Nick Clifton <nickc@redhat.com>
5076 * dwarf2.c (lookup_address_in_function_table): Return early if
5077 there are no functions in the given comp unit, or if the high
5078 address of the last function in the comp unit is less than the
5081 2017-01-09 Nick Clifton <nickc@redhat.com>
5084 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
5085 message if there are too many symbols to load.
5087 2017-01-04 James Clarke <jrtc27@jrtc27.com>
5089 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
5090 if relocs are cached.
5092 2017-01-03 Rich Felker <bugdal@aerifal.cx>
5095 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
5096 for R_MICROBLAZE_GOTOFF_64.
5098 2017-01-03 Nick Clifton <nickc@redhat.com>
5100 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
5101 warning about using a possibly uninitialised variable.
5103 2017-01-02 Alan Modra <amodra@gmail.com>
5105 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
5106 (allocate_plt_static, allocate_dynrelocs): Use it.
5108 2017-01-02 Alan Modra <amodra@gmail.com>
5110 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
5111 .PARISC.unwind section.
5113 2017-01-02 Alan Modra <amodra@gmail.com>
5116 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
5117 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
5118 indirect to GOT pointer relative code edit.
5120 2017-01-02 Alan Modra <amodra@gmail.com>
5122 Update year range in copyright notice of all files.
5124 For older changes see ChangeLog-2016
5126 Copyright (C) 2017 Free Software Foundation, Inc.
5128 Copying and distribution of this file, with or without modification,
5129 are permitted in any medium without royalty provided the copyright
5130 notice and this notice are preserved.
5136 version-control: never