1 2018-07-06 Alan Hayward <alan.hayward@arm.com>
3 * elf.c (elfcore_grok_aarch_sve): New function.
4 (elfcore_grok_note): Check for Aarch64 SVE.
5 (elfcore_write_aarch_sve): New function.
6 (elfcore_write_register_note): Check for Aarch64 SVE.
7 * elf-bfd.h(elfcore_grok_aarch_sve): New declaration.
9 2018-07-06 Alan Modra <amodra@gmail.com>
11 * elf32-arm.c (elf32_arm_nabi_write_core_note): Don't use
12 DIAGNOTIC_PUSH and DIAGNOSTIC_POP unconditionally.
13 * elf32-ppc.c (ppc_elf_write_core_note): Likewise.
14 * elf32-s390.c (elf_s390_write_core_note): Likewise.
15 * elf64-ppc.c (ppc64_elf_write_core_note): Likewise.
16 * elf64-s390.c (elf_s390_write_core_note): Likewise.
17 * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewise.
19 2018-07-05 Jim Wilson <jimw@sifive.com>
21 * config.bfd (riscv32*-*-*): Renamed from riscv32-*-*.
22 (riscv64*-*-*): Likewise.
23 (riscv-*-*): Add as an alias for riscv32*-*-*.
25 2018-07-05 H.J. Lu <hongjiu.lu@intel.com>
28 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Remove x86
29 ISA properties with empty bits.
31 2018-07-05 Nick Clifton <nickc@redhat.com>
33 * po/ru.po: Updated Russian translation.
35 2018-07-05 Alan Modra <amodra@gmail.com>
37 * elf-bfd.h (_bfd_elf_ppc_merge_fp_attributes): Update prototype.
38 * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Return error
39 on mismatch. Remove "warning: " from messages. Track last bfd
41 (ppc_elf_merge_obj_attributes): Likewise. Handle status from
42 _bfd_elf_ppc_merge_fp_attributes.
43 * elf64-ppc.c (ppc64_elf_merge_private_bfd_data): Handle status
44 from _bfd_elf_ppc_merge_fp_attributes.
46 2018-07-04 H.J. Lu <hongjiu.lu@intel.com>
48 * Makefile.am (bfdinclude_HEADERS): Add $(INCDIR)/diagnostics.h.
49 * Makefile.in: Regenerated.
51 2018-07-03 Alan Modra <amodra@gmail.com>
53 * elflink.c (bfd_elf_final_link): Remove zero size .gnu.attributes
56 2018-07-03 Alan Modra <amodra@gmail.com>
58 * elf-bfd.h (ATTR_TYPE_FLAG_ERROR, ATTR_TYPE_HAS_ERROR): Define.
59 * elf-attrs.c (is_default_attr): Handle ATTR_TYPE_HAS_ERROR.
60 * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Use
61 ATTR_TYPE_FLAG_INT_VAL. Set ATTR_TYPE_HAS_ERROR on finding
62 incompatible attribute.
63 (ppc_elf_merge_obj_attributes): Likewise. Return
64 _bfd_elf_merge_object_attributes result.
65 * elf64-ppc.c (ppc64_elf_merge_private_bfd_data): Return
66 _bfd_elf_merge_object_attributes result.
68 2018-07-03 Alan Modra <amodra@gmail.com>
71 * elflink.c (_bfd_elf_fix_symbol_flags): Hide dynamic symbols
72 in discarded sections.
74 2018-07-02 Maciej W. Rozycki <macro@mips.com>
76 * elfxx-mips.c (_bfd_mips_elf_create_dynamic_sections): Set
77 `mark' for symbols created from `mips_elf_dynsym_rtproc_names'
80 2018-07-02 Maciej W. Rozycki <macro@mips.com>
82 * elf64-mips.c (micromips_elf64_howto_table_rel): Add
83 R_MICROMIPS_HI0_LO16, R_MICROMIPS_TLS_GD, R_MICROMIPS_TLS_LDM,
84 R_MICROMIPS_TLS_DTPREL_HI16, R_MICROMIPS_TLS_DTPREL_LO16,
85 R_MICROMIPS_TLS_GOTTPREL, R_MICROMIPS_TLS_TPREL_HI16,
86 R_MICROMIPS_TLS_TPREL_LO16, R_MICROMIPS_GPREL7_S2 and
87 R_MICROMIPS_PC23_S2 relocation entries.
88 (micromips_elf64_howto_table_rela): Likewise.
89 (micromips_reloc_map): Likewise.
90 * elfn32-mips.c (elf_micromips_howto_table_rel): Likewise.
91 (elf_micromips_howto_table_rela): Likewise.
92 (micromips_reloc_map): Likewise.
94 2018-07-02 H.J. Lu <hongjiu.lu@intel.com>
97 * elf64-x86-64.c (elf_x86_64_relocate_section): Clear the
98 R_X86_64_converted_reloc_bit bit.
100 2018-07-02 Jeff Muizelaar <jrmuizel@gmail.com>
101 Tom Tromey <tom@tromey.com>
105 * mach-o.c (bfd_mach_o_fat_close_and_cleanup): New function.
106 (bfd_mach_o_close_and_cleanup): Redefine.
107 * archive.c (_bfd_unlink_from_archive_parent): New function,
109 (_bfd_archive_close_and_cleanup): ..here.
110 (bfd_generic_archive_p): Do not clear archive's format.
111 * libbfd-in.h (_bfd_unlink_from_archive_parent): Declare.
112 * libbfd.h: Regenerate.
114 2018-07-02 Thomas Preud'homme <thomas.preudhomme@arm.com>
116 * archures.c (bfd_mach_arm_5TEJ, bfd_mach_arm_6, bfd_mach_arm_6KZ,
117 bfd_mach_arm_6T2, bfd_mach_arm_6K, bfd_mach_arm_7, bfd_mach_arm_6M,
118 bfd_mach_arm_6SM, bfd_mach_arm_7EM, bfd_mach_arm_8, bfd_mach_arm_8R,
119 bfd_mach_arm_8M_BASE, bfd_mach_arm_8M_MAIN): Define.
120 * bfd-in2.h: Regenerate.
121 * cpu-arm.c (arch_info_struct): Add entries for above new
123 * elf32-arm.c (bfd_arm_get_mach_from_attributes): Add Tag_CPU_arch to
124 bfd_mach_arm mapping logic for pre Armv4 and Armv5TEJ and later
125 architectures. Force assert failure for any new Tag_CPU_arch value.
127 2018-07-02 Thomas Preud'homme <thomas.preudhomme@arm.com>
129 * doc/bfdint.texi: Use command-line consistently when used in a
131 * doc/bfdsumm.texi: Likewise.
133 2018-06-29 Maciej W. Rozycki <macro@mips.com>
135 * elfxx-mips.c (allocate_dynrelocs): Remove extraneous symbol
136 visibility check made for undefined weak symbols.
138 2018-06-26 Nick Clifton <nickc@redhat.com>
140 * po/uk.po: Updated Ukranian translation.
142 2018-06-25 Nick Clifton <nickc@redhat.com>
144 * elfnn-aarch64.c (_bfd_aarch64_erratum_835769_stub_name): Check
145 for malloc returning NULL.
146 (_bfd_aarch64_erratum_843419_fixup): Check for
147 _bfd_aarch64_erratum_835769_stub_name returning NULL.
149 2018-06-24 Nick Clifton <nickc@redhat.com>
151 * po/bfd.pot: Regenerate.
153 2018-06-24 Nick Clifton <nickc@redhat.com>
155 * version.m4: Update version string to 2.31.51.
156 * configure: Regenerate.
158 2018-06-24 Nick Clifton <nickc@redhat.com>
162 2018-06-21 Maciej W. Rozycki <macro@mips.com>
164 * elfxx-mips.c (_bfd_mips_elf_compact_eh_encoding)
165 (_bfd_mips_elf_cant_unwind_opcode): Correct formatting.
167 2018-06-21 Maciej W. Rozycki <macro@mips.com>
169 * elfxx-mips.c (_bfd_mips_post_process_headers): Keep
170 EI_ABIVERSION setting together.
172 2018-06-21 Maciej W. Rozycki <macro@mips.com>
174 * elfxx-mips.c (MIPS_LIBC_ABI_DEFAULT, MIPS_LIBC_ABI_MIPS_PLT)
175 (MIPS_LIBC_ABI_UNIQUE, MIPS_LIBC_ABI_MIPS_O32_FP64)
176 (MIPS_LIBC_ABI_MAX): New enumeration constants.
177 (_bfd_mips_post_process_headers): Use them in place of magic
180 2018-06-21 Jim Wilson <jimw@sifive.com>
182 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Update comment.
183 Use SYMBOL_REFERENCES_LOCAL. Add asserts for h->got.offset.
185 2018-06-21 Alan Modra <amodra@gmail.com>
187 * doc/Makefile.am (AUTOMAKE_OPTIONS): Add "foreign".
188 * doc/Makefile.in: Regenerate.
190 2018-06-20 Renlin Li <renlin.li@arm.com>
192 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Use PG_OFFSET
193 to resolve BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC,
194 BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC,
195 BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC,
196 BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC,
197 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
198 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
199 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
200 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
202 2018-06-20 Nick Clifton <nickc@redhat.com>
205 * opncls.c (get_build_id): Check for a negative or excessive data
206 size in the build-id note.
208 2018-06-20 Nick Clifton <nickc@redhat.com>
211 * mach-o.c (cputype): New function.
212 (cpusubtype): New function.
213 (bfd_mach_o_bfd_print_private_data): New function. Dispalys the
214 values in the MACH-O file header.
215 (bfd_mach_o_bfd_copy_private_header_data): Copy the cputype and
216 cpusubtype fields from the input bfd's mach-o header to the output
218 * mach-o-target.c (bfd_mach_o_bfd_print_private_bfd_data):
219 Redefine to bfd_mach_o_bfd_print_private_data.
220 * mach-o.h (bfd_mach_o_bfd_print_private_bfd_data): Prototype.
222 2018-06-19 Maciej W. Rozycki <macro@mips.com>
225 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Verify the
226 `.got.plt' entry referred is in range.
227 (mips_finish_exec_plt): Correct the range check for `.got.plt'
228 start. Replace the assertion used for that with a proper error
231 2018-06-19 Maciej W. Rozycki <macro@mips.com>
233 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Fix
236 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
238 * Makefile.am (AUTOMAKE_OPTIONS): Remove 1.11.
239 (INCLUDES): Rename to ...
240 (AM_CPPFLAGS): ... this.
241 * configure.ac: Remove AC_PREREQ.
242 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove 1.9, cygnus, add
243 info-in-builddir no-texinfo.tex.
244 (info_TEXINFOS): Rename bfd.texinfo to bfd.texi.
245 * doc/bfd.texinfo: Rename to ...
246 * doc/bfd.texi: ... this.
247 * Makefile.in: Re-generate.
248 * aclocal.m4: Re-generate.
249 * config.in: Re-generate.
250 * configure: Re-generate.
251 * doc/Makefile.in: Re-generate.
253 2018-06-18 Mephi <mephi42@gmail.com>
256 * mach-o-x86-64.c (x86_64_howto_table): Add entry for
257 BFD_RELOC_MACH_O_X86_64_RELOC_TLV.
258 (bfd_mach_o_x86_64_canonicalize_one_reloc): Handle the new reloc.
259 (bfd_mach_o_x86_64_swap_reloc_out): Likewise.
260 * reloc.c (BFD_RELOC_MACH_O_X86_64_TV): New entry.
261 * bfd-in2.h: Regenerate.
262 * libbfd.h: Regenerate.
264 2018-06-14 Faraz Shahbazker <Faraz.Shahbazker@mips.com>
266 * elfxx-mips.c (print_mips_ases): Add GINV extension.
268 2018-06-14 H.J. Lu <hongjiu.lu@intel.com>
271 * elf.c (_bfd_elf_get_symbol_version_string): Check if the first
272 symbol version is base version.
274 2018-06-14 Alan Modra <amodra@gmail.com>
276 * elf-bfd.h (struct elf_link_hash_table): Add "dynamic_relocs".
277 * elflink.c (_bfd_elf_init_2_index_sections): Comment fix.
278 (_bfd_elf_add_dynamic_entry): Set "dynamic_relocs".
279 (_bfd_elf_link_renumber_dynsyms): Exclude all section symbols when
280 "dynamic_relocs" is not set.
281 * elfxx-mips.c (count_section_dynsyms): Likewise.
283 2018-06-14 Alan Modra <amodra@gmail.com>
286 * bfdio.c (bfd_seek): Optimize away seeks to current position.
288 2018-06-13 Scott Egerton <scott.egerton@imgtec.com>
289 Faraz Shahbazker <Faraz.Shahbazker@mips.com>
291 * elfxx-mips.c (print_mips_ases): Add CRC.
293 2018-06-08 H.J. Lu <hongjiu.lu@intel.com>
296 * elfxx-x86.c (elf_x86_hide_linker_defined): New function.
297 (_bfd_x86_elf_link_check_relocs): Use it to hide hidden
298 __bss_start, _end and _edata in shared libraries.
300 2018-06-07 Alan Modra <amodra@gmail.com>
302 * elf32-tic6x.c (elf32_tic6x_check_relocs): Reference
303 __c6xabi_DSBT_BASE explicitly for R_C6000_SBR_* relocs.
305 2018-06-05 Alan Modra <amodra@gmail.com>
307 * bfd.c (struct bfd): Update comment on "where" usage.
308 * bfdio.c (bfd_bwrite, bfd_stat): Use and update "iovec",
309 "iostream", and "where" from containing archive file. Return
311 (bfd_bread): Similarly, and return error attempted out of
312 bounds archive element access.
313 (bfd_tell, bfd_flush): Use and update "iovec", "iostream", and
314 "where" from containing archive file.
315 (bfd_seek): Likewise. Return error on NULL iovec. Don't
316 attempt to optimize away seeks. Don't paper over errors by
318 (bfd_get_mtime): Call bfd_stat rather than iovec->bstat.
319 (bfd_get_size): Likewise.
320 (bfd_mmap): Operate on and use iovec of containing archive
321 file. Return error on NULL iovec.
322 * cache.c (bfd_cache_lookup_worker): Abort if working on
324 (cache_bread_1): Delete bfd parameter, add FILE* parameter.
325 Don't ignore zero byte reads.
326 (cache_bread): Look up FILE* in cache here. Error on NULL
328 (cache_bwrite): Rename "where" to "from".
329 (cache_bmmap): Don't handle archive elements.
330 * coffcode.h (coff_slurp_line_table): Exit early on zero
332 * bfd-in2.h: Regenerate.
334 2018-06-05 Alan Modra <amodra@gmail.com>
337 * plugin.c (bfd_plugin_open_input): Allow for possibility of
338 nested archives. Open file again for plugin.
339 (try_claim): Don't save and restore file position. Close file
341 * sysdep.h (O_BINARY): Define.
343 2018-06-04 Max Filippov <jcmvbkbc@gmail.com>
345 * elf32-xtensa.c (xtensa_read_table_entries): Make global.
346 (compute_fill_extra_space): Drop declaration. Rename function to
347 xtensa_compute_fill_extra_space.
348 (compute_ebb_actions, remove_dead_literal): Update references to
349 compute_fill_extra_space.
351 2018-06-04 Volodymyr Arbatov <arbatov@cadence.com>
353 * elf32-xtensa.c (elf32xtensa_separate_props): New global
355 (xtensa_add_names): New function.
356 (xtensa_property_section_name): Add new parameter
357 separate_sections, use it to choose property section name.
358 (xtensa_get_separate_property_section): New function.
359 (xtensa_get_property_section): Invoke
360 xtensa_get_separate_property_section to get individual property
361 section if it exists, common property section otherwise.
362 (xtensa_make_property_section): Pass elf32xtensa_separate_props
363 to xtensa_property_section_name.
365 2018-06-04 H.J. Lu <hongjiu.lu@intel.com>
368 * bfd-in.h: Include "diagnostics.h".
369 * bfd-in2.h: Regenerated.
370 * elf32-arm.c (elf32_arm_nabi_write_core_note): Use
371 DIAGNOSTIC_PUSH, DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION and
372 DIAGNOSTIC_POP to silence GCC 8.1 warnings with
373 -Wstringop-truncation.
374 * elf32-ppc.c (ppc_elf_write_core_note): Likewse.
375 * elf32-s390.c (elf_s390_write_core_note): Likewse.
376 * elf64-ppc.c (ppc64_elf_write_core_note): Likewse.
377 * elf64-s390.c (elf_s390_write_core_note): Likewse.
378 * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewse.
380 2018-06-03 Jim Wilson <jimw@sifive.com>
383 * elfnn-riscv.c (riscv_elf_relocate_section) <R_RISCV_CALL>: Check
384 for and handle an undefined weak with no PLT.
387 * elfnn-riscv.c (riscv_relax_delete_bytes): Add versioned_hidden check
388 to code that ignores duplicate symbols.
390 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
392 * version.m4: Bump version to 2.30.52
393 * configure: Regenerated.
395 2018-06-01 Alan Modra <amodra@gmail.com>
397 * bfd.c (_bfd_error_handler): Arrange for this function to be
398 declared in bfd-in2.h.
399 * libbfd-in.h (_bfd_error_handler): Don't declare.
400 * libbfd.h: Regenerate.
401 * bfd-in2.h: Regenerate.
403 2018-05-30 Amaan Cheval <amaan.cheval@gmail.com>
405 * config.bfd (x86_64-*-*): Add pei-x86-64 target to x86_64-*-rtems*
406 This is needed to generate UEFI application image files from ELFs.
408 2018-05-28 H.J. Lu <hongjiu.lu@intel.com>
410 * elf32-i386.c (elf_i386_lazy_plt): Add plt_tlsdesc_entry,
411 plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset,
412 plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and
413 plt_tlsdesc_got2_insn_end for TLSDESC entry.
414 (elf_i386_lazy_ibt_plt): Likewise.
415 (elf_i386_nacl_plt): Likewise.
416 * elf64-x86-64.c (tlsdesc_plt_entry): Moved and renamed to ...
417 (elf_x86_64_tlsdesc_plt_entry): This.
418 (elf_x86_64_lazy_plt): Add plt_tlsdesc_entry,
419 plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset,
420 plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and
421 plt_tlsdesc_got2_insn_end for TLSDESC entry.
422 (elf_x86_64_lazy_bnd_plt): Likewise.
423 (elf_x86_64_lazy_ibt_plt): Likewise.
424 (elf_x32_lazy_ibt_plt): Likewise.
425 (elf_x86_64_nacl_plt): Likewise.
426 (elf_x86_64_finish_dynamic_sections): Use plt_tlsdesc_entry,
427 plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset,
428 plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and
429 plt_tlsdesc_got2_insn_end to update TLSDESC entry.
430 * elfxx-x86.h (elf_x86_lazy_plt_layout): Update comments.
431 Add plt_tlsdesc_entry, plt_tlsdesc_entry_size,
432 plt_tlsdesc_got1_offset, plt_tlsdesc_got2_offset,
433 plt_tlsdesc_got1_insn_end and plt_tlsdesc_got2_insn_end.
434 (elf_x86_non_lazy_plt_layout): Update comments.
435 (elf_x86_plt_layout): Likewise.
437 2018-05-28 H.J. Lu <hongjiu.lu@intel.com>
440 * elf-s390-common.c (elf_s390_add_symbol_hook): Removed.
441 * elf32-arc.c (elf_arc_add_symbol_hook): Likewise.
442 (elf_backend_add_symbol_hook): Likewise.
443 * elf32-m68k.c (elf_m68k_add_symbol_hook): Likewise.
444 (elf_backend_add_symbol_hook): Likewise.
445 * elf32-s390.c (elf_backend_add_symbol_hook): Likewise.
446 * elf32-sparc.c (elf32_sparc_add_symbol_hook): Likewise.
447 (elf_backend_add_symbol_hook): Likewise.
448 * elf64-s390.c (elf_backend_add_symbol_hook): Likewise.
449 * elfxx-aarch64.c (_bfd_aarch64_elf_add_symbol_hook): Likewise.
450 * elfxx-aarch64.h (_bfd_aarch64_elf_add_symbol_hook): Likewise.
451 (elf_backend_add_symbol_hook): Likewise.
452 * elf32-arm.c (elf32_arm_add_symbol_hook): Remove STT_GNU_IFUNC
454 * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise.
455 * elf64-ppc.c (ppc64_elf_add_symbol_hook): Likewise.
456 * elf64-sparc.c (elf64_sparc_add_symbol_hook): Likewise.
457 * elflink.c (elf_link_add_object_symbols): Set
458 elf_gnu_symbol_ifunc for STT_GNU_IFUNC symbols.
460 2018-05-26 H.J. Lu <hongjiu.lu@intel.com>
463 * elf-bfd.h (_bfd_elf_link_hide_sym_by_version): New.
464 * elflink.c (_bfd_elf_link_hide_versioned_symbol): New function.
465 Extracted from _bfd_elf_link_assign_sym_version.
466 (_bfd_elf_link_hide_sym_by_version): New function.
467 (_bfd_elf_link_assign_sym_version): Use
468 _bfd_elf_link_hide_versioned_symbol.
469 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Call
470 _bfd_elf_link_hide_sym_by_version instead of
471 bfd_hide_sym_by_version. Don't check unversioned symbol.
473 2018-05-25 Alan Modra <amodra@gmail.com>
475 * Makefile.in: Regenerate.
476 * po/SRC-POTFILES.in: Regenerate.
478 2018-05-25 Alan Modra <amodra@gmail.com>
480 * configure.ac (bfd_cv_hidden): Run test with -Werror in CFLAGS.
481 * configure: Regenerate.
483 2018-05-23 H.J. Lu <hongjiu.lu@intel.com>
485 * elf64-ppc.c (ppc64_elf_write_core_note): Add ATTRIBUTE_NONSTRING
488 2018-05-22 Alan Modra <amodra@gmail.com>
491 * elf32-hppa.c (hppa_get_stub_entry): Return NULL when link_sec
493 (elf32_hppa_size_stubs): Only create stubs for load, alloc, code
495 (final_link_relocate): Revert last change.
497 2018-05-22 Alan Modra <amodra@gmail.com>
500 * elf32-hppa.c (final_link_relocate): Don't look for plt call
501 stubs in non-alloc sections.
503 2018-05-21 H.J. Lu <hongjiu.lu@intel.com>
506 * aout-target.h (MY_bfd_link_hide_symbol): New.
507 * aout-tic30.c (MY_bfd_link_hide_symbol): Likewise.
508 * binary.c (binary_bfd_link_hide_symbol): Likewise.
509 * coff-alpha.c (_bfd_ecoff_bfd_link_hide_symbol): Likewise.
510 * coff-mips.c (_bfd_ecoff_bfd_link_hide_symbol): Likewise.
511 * coff-rs6000.c (_bfd_xcoff_bfd_link_hide_symbol): Likewise.
512 * coffcode.h (coff_bfd_link_hide_symbol): Likewise.
513 * elf-bfd.h (_bfd_elf_link_hide_symbol): Likewise.
514 * elfxx-target.h (bfd_elfNN_bfd_link_hide_symbol): Likewise.
515 * i386msdos.c (msdos_bfd_link_hide_symbol): Likewise.
516 * ihex.c (ihex_bfd_link_hide_symbol): Likewise.
517 * libbfd-in.h (_bfd_nolink_bfd_link_hide_symbol): Likewise.
518 * linker.c (_bfd_generic_link_hide_symbol): Likewise.
519 (bfd_link_hide_symbol): Likewise.
520 * mach-o-target.c (bfd_mach_o_bfd_link_hide_symbol): Likewise.
521 * mmo.c (mmo_bfd_link_hide_symbol): Likewise.
522 * pef.c (bfd_pef_bfd_link_hide_symbol): Likewise.
523 * plugin.c (bfd_plugin_bfd_link_hide_symbol): Likewise.
524 * ppcboot.c (ppcboot_bfd_link_hide_symbol): Likewise.
525 * som.c (som_bfd_link_hide_symbol): Likewise.
526 * srec.c (srec_bfd_link_hide_symbol): Likewise.
527 * tekhex.c (tekhex_bfd_link_hide_symbol): Likewise.
528 * vms-alpha.c (vms_bfd_link_hide_symbol): Likewise.
529 (alpha_vms_bfd_link_hide_symbol): Likewise.
530 * xsym.c (bfd_sym_bfd_link_hide_symbol): Likewise.
531 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
532 _bfd_generic_link_hide_symbol.
533 (rs6000_xcoff64_aix_vec): Likewise.
534 * elflink.c (bfd_elf_record_link_assignment): Don't make forced
535 local symbol dynamic.
536 (_bfd_elf_link_hide_symbol): New function.
537 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
538 check root.ldscript_def.
539 * targets.c (bfd_target): Add _bfd_link_hide_symbol.
540 (BFD_JUMP_TABLE_LINK): Add NAME##_bfd_link_hide_symbol.
541 * bfd-in2.h: Regenerated.
542 * libbfd.h: Likewise.
544 2018-05-21 H.J. Lu <hongjiu.lu@intel.com>
547 * elf.c (setup_group): Mark section in a section group with
550 2018-05-18 H.J. Lu <hongjiu.lu@intel.com>
553 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
554 set eh->local_ref to 1 if a symbol is versioned and there is a
557 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
559 * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Handle
562 2018-05-18 Jim Wilson <jimw@sifive.com>
564 * elfnn-riscv.c (allocate_dynrelocs): Discard dynamic relocations if
565 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
566 (riscv_elf_relocate_section): Don't generate dynamic relocation if
567 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
568 (riscv_elf_finish_dynamic_symbol): Likewise.
570 2018-05-18 John Darrington <john@darrington.wattle.id.au>
572 * Makefile.am: Add s12z files.
573 * Makefile.in: Regenerate.
574 * archures.c: Add bfd_s12z_arch.
575 * bfd-in.h: Add exports of bfd_putb24 and bfd_putl24.
576 * bfd-in2.h: Regenerate.
577 * config.bfd: Add s12z target.
578 * configure.ac: Add s12z target.
579 * configure: Regenerate.
580 * cpu-s12z.c: New file.
581 * elf32-s12z.c: New file.
582 * libbfd.c (bfd_putb24): New function.
583 (bfd_putl24): New function.
584 * libbfd.h: Regenerate.
585 * reloc.c: Add s12z relocations.
586 (bfd_get_reloc_size): Handle size 5 relocs.
587 * targets.c: Add s12z_elf32_vec.
589 2018-05-18 H.J. Lu <hongjiu.lu@intel.com>
592 * elf32-i386.c (elf_i386_relocate_section): Handle R_386_GOT32X
594 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
595 set eh->local_ref to 1 for linker defined symbols.
597 2018-05-18 Alan Modra <amodra@gmail.com>
600 * elf.c (setup_group): Formatting. Check that SHT_GROUP entries
601 don't point at other SHT_GROUP sections. Set shdr corresponding
602 to invalid entry, to NULL rather than section 0. Identify
603 SHT_GROUP section index when reporting an error. Cope with NULL
606 2018-05-18 Alan Modra <amodra@gmail.com>
608 * libbfd-in.h (ATTRIBUTE_HIDDEN): Define and use throughout.
609 * configure.ac (HAVE_HIDDEN): Check compiler support for hidden
611 * libbfd.h: Regenerate.
612 * configure: Regenerate.
613 * config.in: Regenerate.
615 2018-05-18 Alan Modra <amodra@gmail.com>
617 * libbfd-in.h: Add include guard.
618 * libcoff-in.h: Likewise.
619 * doc/Makefile.am (libbfd.h, libcoff.h): Append another #endif.
620 * doc/Makefile.in: Regenerate.
621 * libbfd.h: Regenerate.
622 * libcoff.h: Regenerate.
624 2018-05-16 Maciej W. Rozycki <macro@mips.com>
626 * elf32-nds32.c (nds32_convert_32_to_16): Preset `insn_type'.
628 2018-05-16 Alan Modra <amodra@gmail.com>
631 * format.c (struct bfd_preserve): Add section_id.
632 (bfd_preserve_save, bfd_preserve_restore): Save and restore
634 (bfd_reinit): Set _bfd_section_id.
635 (bfd_check_format_matches): Put all matches of any priority into
636 matching_vector. Save initial section id and start each attempted
637 match at that section id.
638 * libbfd-in.h (_bfd_section_id): Declare.
639 * section.c (_bfd_section_id): Rename from section_id and make
641 (bfd_get_next_section_id): Delete.
642 * elf64-ppc.c (ppc64_elf_setup_section_lists): Replace use of
643 bfd_get_section_id with _bfd_section_id.
644 * libbfd.h: Regenerate.
645 * bfd-in2.h: Regenerate.
647 2018-05-15 Christophe Guillon <christophe.guillon@st.com>
649 * coffcode.h (coff_bigobj_swap_aux_in): Make sure that all fields
650 of the aux structure are initialised.
652 2018-05-15 Francois H. Theron <francois.theron@netronome.com>
654 * targets.c: Wrap nfp_elf64_vec in BFD64 ifdef.
656 2018-05-15 Nick Clifton <nickc@redhat.com>
658 * po/pt.po: New Portuguese translation.
659 * configure.ac (ALL_LINGUAS): Add pt.
660 * configure: Regenerate.
662 2018-05-14 H.J. Lu <hongjiu.lu@intel.com>
665 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Don't issue
666 an error on IFUNC pointer defined in PDE.
667 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Call
668 _bfd_x86_elf_link_fixup_ifunc_symbol.
669 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
670 * elfxx-x86.c (_bfd_x86_elf_link_fixup_ifunc_symbol): New
672 * elfxx-x86.h (_bfd_x86_elf_link_fixup_ifunc_symbol): New.
674 2018-05-14 H.J. Lu <hongjiu.lu@intel.com>
677 * elfxx-x86.c (elf_x86_linker_defined): New function.
678 (_bfd_x86_elf_link_check_relocs): Use it to mark __bss_start,
679 _end and _edata locally defined within executables.
681 2018-05-12 Alan Modra <amodra@gmail.com>
684 * elf.c (rewrite_elf_program_header): Use segment_mark only for
685 PT_LOAD headers. Delete first_matching_lma and first_suggested_lma.
686 Instead make matching_lma and suggested_lma pointers to the
687 sections. Align section vma and lma calculated from segment.
688 Don't clear includes_phdrs or includes_filehdr based on p_paddr
689 test. Try to handle alignment padding before first section by
690 adjusting new segment lma down. Adjust PT_PHDR map p_paddr.
692 2018-05-09 Dimitar Dimitrov <dimitar@dinux.eu>
694 * elf32-pru.c (pru_elf32_do_ldi32_relocate): Make LDI32 relocation
695 conformant to TI ABI.
696 (pru_elf32_relax_section): Likewise.
697 (pru_elf_relax_delete_bytes): Fix offsets for new LDI32 code.
698 * elf32-pru.c (pru_elf32_do_ldi32_relocate): Ignore addend.
699 (pru_elf32_pmem_relocate): Trap - should not get here.
700 (pru_elf32_relocate_section): Add support for REL relocations.
701 (elf_info_to_howto_rel): Enable REL.
702 (elf_backend_may_use_rel_p): Likewise.
703 (elf_backend_may_use_rela_p): Likewise.
704 (elf_backend_default_use_rela_p): Likewise.
706 2018-05-09 Alan Modra <amodra@gmail.com>
709 * peXXigen.c (pe_print_edata): Correct minimum size.
711 2018-05-09 Alan Modra <amodra@gmail.com>
714 * peXXigen.c (pe_print_idata): Bound check hint_addr.
716 2018-05-08 Nick Clifton <nickc@redhat.com>
719 * elf.c (bfd_elf_get_str_section): Check for an excessively large
721 * elf-attrs.c (_bfd_elf_parse_attributes): Issue an error if the
722 attribute section is larger than the size of the file.
724 2018-05-07 Alan Modra <amodra@gmail.com>
726 * cofflink.c (_bfd_coff_link_input_bfd): Use memcmp rather than
727 strncmp when checking for ".bf" special symbol.
728 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Make pe_required_section_flags
729 section name a char array, remove sentinal known_sections entry,
730 and adjust loop over known_sections to suit. Use memcmp rather
733 2018-05-04 Alan Modra <amodra@gmail.com>
735 * elf-linux-core.h (struct elf_external_linux_prpsinfo32_ugid32),
736 (struct elf_external_linux_prpsinfo32_ugid16),
737 (struct elf_external_linux_prpsinfo64_ugid32),
738 (struct elf_external_linux_prpsinfo64_ugid16): Add ATTRIBUTE_NONSTRING
739 to pr_fname and pr_psargs fields. Remove GCC diagnostic pragmas.
741 * elf.c (elfcore_write_prpsinfo): ..here. Indent nested preprocessor
743 * elf32-arm.c (elf32_arm_nabi_write_core_note): Add ATTRIBUTE_NONSTRING
745 * elf32-ppc.c (ppc_elf_write_core_note): Likewise.
746 * elf32-s390.c (elf_s390_write_core_note): Likewise.
747 * elf64-s390.c (elf_s390_write_core_note): Likewise.
748 * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewise.
749 * elf64-x86-64.c (elf_x86_64_write_core_note): Add GCC diagnostic
751 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Use strnlen to avoid
752 false positive gcc-8 warning.
753 * cofflink.c (_bfd_coff_link_input_bfd): Likewise.
755 2018-05-04 Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
757 * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Fix the order
758 of arguments when warning about different long double types.
760 2018-05-03 Simon Atanasyan <simon@atanasyan.com>
762 * elf32-mips.c: (elf32_mips_fixup_symbol): New function.
763 (elf_backend_fixup_symbol): New macro.
764 * elfxx-mips.c: (mips_elf_output_extsym): Discard _gp_disp
766 (_bfd_mips_elf_finish_dynamic_symbol): Likewise.
768 2018-04-30 Francois H. Theron <francois.theron@netronome.com>
770 * Makefile.am: Added NFP files to build.
771 * archures.c: Added bfd_arch_nfp
772 * config.bfd: Added NFP support.
773 * configure.ac: Added NFP support.
774 * cpu-nfp.c: New, for NFP support.
775 * elf-bfd.h: Added elf_section_info()
776 * elf64-nfp.c: New, for NFP support.
777 * po/SRC-POTFILES.in: Added NFP source files.
778 * targets.c: Added nfp_elf64_vec
779 * bfd-in2.h: Regenerate.
780 * Makefile.in: Regenerate.
781 * configure: Regenerate.
783 2018-04-27 Alan Modra <amodra@gmail.com>
785 * bfd-in2.h: Regenerate.
786 * libbfd.h: Regenerate.
788 2018-04-27 Alan Modra <amodra@gmail.com>
792 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't drop plt
794 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Comment fixes.
796 2018-04-26 Pedro Alves <palves@redhat.com>
798 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't consider
799 ifunc and non-ifunc symbols duplicates.
801 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
802 Mickaël Guêné <mickael.guene@st.com>
804 * elf32-arm.c (elf32_arm_fdpic_thumb_plt_entry): New.
805 (elf32_arm_plt_needs_thumb_stub_p): Handle thumb-only case.
806 (elf32_arm_populate_plt_entry): Likewise.
807 (elf32_arm_output_plt_map_1): Likewise.
808 (elf32_arm_output_arch_local_syms): Likewise.
810 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
811 Mickaël Guêné <mickael.guene@st.com>
813 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Handle
814 _GLOBAL_OFFSET_TABLE_ in FDPIC mode.
816 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
817 Mickaël Guêné <mickael.guene@st.com>
819 * elf32-arm.c (bfd_elf32_arm_set_target_params): Handle FDPIC case
822 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
823 Mickaël Guêné <mickael.guene@st.com>
825 * elf32-arm.c (DEFAULT_STACK_SIZE): New.
826 (elf32_arm_always_size_sections): Create stack segment.
828 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
829 Mickaël Guêné <mickael.guene@st.com>
831 * bfd-in2.h (BFD_RELOC_ARM_TLS_GD32_FDPIC)
832 (BFD_RELOC_ARM_TLS_LDM32_FDPIC, BFD_RELOC_ARM_TLS_IE32_FDPIC): New
834 * elf32-arm.c (elf32_arm_howto_table_2): Add R_ARM_TLS_GD32_FDPIC,
835 R_ARM_TLS_LDM32_FDPIC, R_ARM_TLS_IE32_FDPIC relocations.
836 (elf32_arm_reloc_map): Add R_ARM_TLS_GD32_FDPIC,
837 R_ARM_TLS_LDM32_FDPIC, R_ARM_TLS_IE32_FDPIC.
838 (struct elf32_arm_link_hash_table): Update comment.
839 (elf32_arm_final_link_relocate): Handle TLS FDPIC relocations.
840 (IS_ARM_TLS_RELOC): Likewise.
841 (elf32_arm_check_relocs): Likewise.
842 (allocate_dynrelocs_for_symbol): Likewise.
843 (elf32_arm_size_dynamic_sections): Update comment.
844 * reloc.c: Add BFD_RELOC_ARM_TLS_GD32_FDPIC,
845 BFD_RELOC_ARM_TLS_LDM32_FDPIC, BFD_RELOC_ARM_TLS_IE32_FDPIC.
847 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
848 Mickaël Guêné <mickael.guene@st.com>
850 * elf32-arm.c (elf32_arm_fdpic_plt_entry): New.
851 (elf32_arm_create_dynamic_sections): Handle FDPIC.
852 (elf32_arm_allocate_plt_entry): Likewise.
853 (elf32_arm_populate_plt_entry): Likewise.
854 (elf32_arm_output_plt_map_1): Likewise.
856 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
857 Mickaël Guêné <mickael.guene@st.com>
859 * elf32-arm.c (struct fdpic_local): New.
860 (elf_arm_obj_tdata): Add local_fdpic_cnts field.
861 (elf32_arm_local_fdpic_cnts): New.
862 (struct fdpic_global): New.
863 (elf32_arm_link_hash_entry): Add fdpic_cnts field.
864 (elf32_arm_link_hash_table): Add srofixup field.
865 (arm_elf_add_rofixup): New.
866 (arm_elf_fill_funcdesc): New.
867 (elf32_arm_link_hash_newfunc): Handle fdpic_cnts.
868 (elf32_arm_allocate_local_sym_info): Likewise.
869 (create_got_section): Create .rofixup section.
870 (elf32_arm_copy_indirect_symbol): Handle fdpic_cnts.
871 (bfd_elf32_arm_set_target_params): Handle FDPIC.
872 (elf32_arm_final_link_relocate): Likewise.
873 (elf32_arm_check_relocs): Likewise.
874 (allocate_dynrelocs_for_symbol): Likewise.
875 (elf32_arm_size_dynamic_sections): Likewise.
876 (elf32_arm_finish_dynamic_sections): Likewise.
877 (elf32_arm_output_arch_local_syms): Likewise.
878 (elf32_arm_fdpic_omit_section_dynsym): New.
880 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
881 Mickaël Guêné <mickael.guene@st.com>
883 * bfd-in2.c (BFD_RELOC_ARM_GOTFUNCDESC)
884 (BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC)
885 (BFD_RELOC_ARM_FUNCDESC_VALUE): New.
886 * elf32-arm.c (elf32_arm_howto_table_2): Add R_ARM_GOTFUNCDESC,
887 R_ARM_GOTOFFFUNCDESC, R_ARM_FUNCDESC, R_ARM_FUNCDESC_VALUE.
888 (elf32_arm_howto_from_type): Take new members of
889 elf32_arm_howto_table_2 into account.
890 (elf32_arm_reloc_map): Add BFD_RELOC_ARM_GOTFUNCDESC,
891 BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC,
892 BFD_RELOC_ARM_FUNCDESC_VALUE.
893 * reloc.c: Add BFD_RELOC_ARM_GOTFUNCDESC,
894 BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC,
895 BFD_RELOC_ARM_FUNCDESC_VALUE.
897 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
898 Mickaël Guêné <mickael.guene@st.com>
900 * elf32-arm.c (elf32_arm_print_private_bfd_data): Support
901 EF_ARM_PIC and ELFOSABI_ARM_FDPIC.
902 (elf32_arm_post_process_headers): Support ELFOSABI_ARM_FDPIC.
903 (ELF_OSABI): Define to ELFOSABI_ARM_FDPIC.
905 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
906 Mickaël Guêné <mickael.guene@st.com>
908 * config.bfd (arm*-*-linux-*): Add arm_elf32_fdpic_be_vec and
909 arm_elf32_fdpic_le_vec to targ_selvecs. Accept
910 arm*-*-uclinuxfdpiceabi.
911 * configure.ac: Add support for arm_elf32_fdpic_be_vec and
912 arm_elf32_fdpic_le_vec.
913 * configure: Regenerate.
914 * elf32-arm.c (struct elf32_arm_link_hash_table): Add fdpic_p.
915 (elf32_arm_link_hash_table_create): Initialize fdpic_p.
916 (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME, TARGET_BIG_SYM)
917 (TARGET_BIG_NAME, elf_match_priority): Define for FDPIC targets.
918 (elf32_arm_fdpic_link_hash_table_create): New.
919 * targets.c (_bfd_target_vector): Add arm_elf32_fdpic_be_vec and
920 arm_elf32_fdpic_le_vec.
922 2018-04-25 Alan Modra <amodra@gmail.com>
924 * elf-linux-core.h: Disable gcc-8 string truncation warning.
925 * elf.c (elfcore_write_prpsinfo): Likewise.
927 2018-04-25 Alan Modra <amodra@gmail.com>
929 * Makefile.am: Remove arm-aout and arm-coff support.
930 * config.bfd: Likewise.
931 * configure.ac: Likewise.
932 * targets.c: Likewise.
933 * aout-arm.c: Delete.
934 * armnetbsd.c: Delete.
936 * Makefile.in: Regenerate.
937 * configure: Regenerate.
938 * po/SRC-POTFILES.in: Regenerate.
940 2018-04-24 Nick Clifton <nickc@redhat.com>
943 * elf.c (ignore_section_sym): Check for the output_section pointer
944 being NULL before dereferencing it.
947 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Check for
948 a negative PE_DEBUG_DATA size before iterating over the debug data.
950 2018-04-23 Alan Modra <amodra@gmail.com>
952 * elf-linux-core.h: Revert last change.
955 2018-04-23 Nick Clifton <nickc@redhat.com>
958 * aoutx.h (aout_get_external_symbols): Allocate an extra byte at
959 the end of the string table, and zero it.
961 2018-04-23 Alan Modra <amodra@gmail.com>
963 * elf-linux-core.h (swap_linux_prpsinfo32_ugid32_out): Disable
964 gcc-8 string truncation warning.
965 (swap_linux_prpsinfo32_ugid16_out): Likewise.
966 (swap_linux_prpsinfo64_ugid32_out): Likewise.
967 (swap_linux_prpsinfo64_ugid16_out): Likewise.
968 * elf.c (elfcore_write_prpsinfo): Likewise.
970 2018-04-23 Nick Clifton <nickc@redhat.com>
973 * aoutx.h (aout_get_external_symbols): Allocate an extra byte at
974 the end of the string table, and zero it.
976 2018-04-20 Alan Modra <amodra@gmail.com>
979 * elf32-hppa.c (got_relocs_needed): Add extra param to special
980 case both dtprel and tprel relocs.
981 (allocate_dynrelocs): Adjust conditions for got relocs.
982 (elf32_hppa_relocate_section): Likewise for local sym got relocs.
983 Emit dynamic relocs on TLS GOT entries for shared libraries,
984 not when pic. Omit dynamic reloc on dtprel entry when local,
985 and on tprel entry when local and executable.
987 2018-04-19 Alan Modra <amodra@gmail.com>
990 * elf32-hppa.c (elf32_hppa_size_stubs): Init "destination" to -1.
991 (hppa_type_of_stub): Don't return a long branch stub for
992 symbols other than those defined statically.
994 2018-04-19 Alan Modra <amodra@gmail.com>
996 * Makefile.am: Revert 2018-04-18 coff-mips changes.
997 * config.bfd: Add back mips_ecoff_le_vec and mips_ecoff_be_vec
998 to selvecs for mips targets change 2018-04-18.
999 * configure.ac: Reinstate mips_ecoff_le_vec, mips_ecoff_be_vec
1000 and mips_ecoff_bele_vec.
1001 * targets.c: Likewise.
1002 * coff-mips.c: Resurrect.
1003 * Makefile.in: Regenerate.
1004 * configure: Regenerate.
1005 * po/SRC-POTFILES.in: Regenerate.
1007 2018-04-18 Alan Modra <amodra@gmail.com>
1009 * Makefile.am: Remove mips aout and coff support.
1010 * config.bfd: Likewise.
1011 * configure.ac: Likewise.
1012 * targets.c: Likewise.
1013 * coff-mips.c: Delete
1016 * pei-mips.c: Delete
1017 * Makefile.in: Regenerate.
1018 * configure: Regenerate.
1019 * po/SRC-POTFILES.in: Regenerate.
1021 2018-04-17 H.J. Lu <hongjiu.lu@intel.com>
1023 * elf32-i386.c (elf32_bed): Define before including
1025 * elf64-x86-64.c (elf64_bed): Define before including
1027 (elf32_bed): Define before including "elf32-target.h".
1029 2018-04-17 H.J. Lu <hongjiu.lu@intel.com>
1032 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Use a
1033 normal input file with compatible relocation.
1035 2018-04-18 Alan Modra <amodra@gmail.com>
1037 * Makefile.am: Remove support for assorted i386 aout and coff targets.
1038 * config.bfd: Likewise.
1039 * configure.ac: Likewise.
1040 * doc/bfdint.texi: Likewise.
1041 * targets.c: Likewise.
1042 * freebsd.h: Delete.
1043 * i386dynix.c: Delete.
1044 * i386freebsd.c: Delete.
1045 * i386linux.c: Delete.
1046 * i386mach3.c: Delete.
1047 * i386netbsd.c: Delete.
1048 * i386os9k.c: Delete.
1049 * Makefile.in: Regenerate.
1050 * configure: Regenerate.
1051 * po/SRC-POTFILES.in: Regenerate.
1053 2018-04-17 Andrew Sadek <andrew.sadek.se@gmail.com>
1055 Microblaze Target: PIC data text relative
1057 * bfd/reloc.c (2 new BFD relocations):
1058 BFD_RELOC_MICROBLAZE_64_TEXTPCREL &
1059 BFD_RELOC_MICROBLAZE_64_TEXTPCREL
1060 * bfd/bfd-in2.h: Regenerate
1061 * bfd/libbfd.h: Regenerate
1062 * bfd/elf32-microblaze.c (Handle new relocs): define 'HOWTO' of 3
1063 new relocs and handle them in both relocate and relax functions.
1064 (microblaze_elf_reloc_type_lookup): add mapping between for new
1066 (microblaze_elf_relocate_section): Handle new relocs in case of
1068 (microblaze_elf_relax_section): Handle new relocs for elf relaxation.
1070 2018-04-17 Nick Clifton <nickc@redhat.com>
1073 * aoutx.h (find_nearest_line): Check that the symbol name exists
1074 and is long enough, before attempting to see if it is for a .o
1076 * hash.c (bfd_hash_hash): Add an assertion that the string is not
1078 * linker.c (bfd_link_hash_lookup): Fail if the table or string are
1080 (_bfd_generic_link_add_archive_symbols): Fail if an archive entry
1084 * dwarf2.c (concat_filename): Check for a NULL table pointer.
1086 2018-04-16 Nick Clifton <nickc@redhat.com>
1089 * coffgen.c (coff_pointerize_aux): Check for an out of range
1092 2018-04-16 Alan Modra <amodra@gmail.com>
1094 * Makefile.am: Remove arm-epoc-pe support.
1095 * coff-arm.c: Likewise.
1096 * config.bfd: Likewise.
1097 * configure.ac: Likewise.
1098 * targets.c: Likewise.
1099 * epoc-pe-arm.c: Delete.
1100 * epoc-pei-arm.c: Delete.
1101 * Makefile.in: Regenerate.
1102 * configure: Regenerate.
1103 * po/SRC-POTFILES.in: Regenerate.
1105 2018-04-16 Alan Modra <amodra@gmail.com>
1107 * Makefile.am: Remove sparc-aout and sparc-coff support.
1108 * config.bfd: Likewise.
1109 * configure.ac: Likewise.
1110 * targets.c: Likewise.
1111 * aout-sparcle.c: Delete.
1113 * cf-sparclynx.c: Delete.
1114 * coff-sparc.c: Delete.
1116 * sparclinux.c: Delete.
1117 * sparclynx.c: Delete.
1118 * sparcnetbsd.c: Delete.
1120 * Makefile.in: Regenerate.
1121 * configure: Regenerate.
1122 * po/SRC-POTFILES.in: Regenerate.
1124 2018-04-16 Alan Modra <amodra@gmail.com>
1126 * Makefile.am: Remove m68k-aout and m68k-coff support.
1127 * aoutf1.h: Likewise.
1128 * aoutx.h: Likewise.
1129 * archive.c: Likewise.
1130 * bfd-in.h: Likewise.
1132 * coffcode.h: Likewise.
1133 * coffswap.h: Likewise.
1134 * config.bfd: Likewise.
1135 * configure.ac: Likewise.
1136 * configure.host: Likewise.
1137 * doc/bfd.texinfo: Likewise.
1138 * doc/bfdint.texi: Likewise.
1139 * freebsd.h: Likewise.
1140 * gen-aout.c: Likewise.
1141 * hpux-core.c: Likewise.
1142 * libaout.h: Likewise.
1143 * libbfd-in.h: Likewise.
1144 * pdp11.c: Likewise.
1145 * peicode.h: Likewise.
1146 * riscix.c: Likewise.
1147 * targets.c: Likewise.
1149 * coff-apollo.c: Delete.
1150 * coff-aux.c: Delete.
1151 * coff-m68k.c: Delete.
1152 * coff-svm68k.c: Delete.
1153 * coff-u68k.c: Delete.
1154 * hosts/delta68.h: Delete.
1155 * hosts/hp300bsd.h: Delete.
1156 * hosts/m68kaux.h: Delete.
1157 * hosts/news.h: Delete.
1158 * hp300bsd.c: Delete.
1159 * hp300hpux.c: Delete.
1160 * liboasys.h: Delete.
1161 * m68k4knetbsd.c: Delete.
1162 * m68klinux.c: Delete.
1163 * m68knetbsd.c: Delete.
1165 * versados.c: Delete.
1166 * Makefile.in: Regenerate.
1167 * bfd-in2.h: Regenerate.
1168 * configure: Regenerate.
1169 * libbfd.h: Regenerate.
1170 * po/SRC-POTFILES.in: Regenerate.
1172 2018-04-16 Alan Modra <amodra@gmail.com>
1174 * Makefile.am: Remove sh5 and sh64 support.
1175 * archures.c: Likewise.
1176 * config.bfd: Likewise.
1177 * configure.ac: Likewise.
1178 * cpu-sh.c: Likewise.
1179 * elf32-sh-relocs.h: Likewise.
1180 * elf32-sh.c: Likewise.
1181 * targets.c: Likewise.
1182 * elf32-sh64-com.c: Delete.
1183 * elf32-sh64.c: Delete.
1184 * elf32-sh64.h: Delete.
1185 * elf64-sh64.c: Delete.
1186 * Makefile.in: Regenerate.
1187 * bfd-in2.h: Regenerate.
1188 * configure: Regenerate.
1189 * po/SRC-POTFILES.in: Regenerate.
1191 2018-04-16 Alan Modra <amodra@gmail.com>
1193 * Makefile.am: Remove sh-symbianelf support.
1194 * config.bfd: Likewise.
1195 * configure.ac: Likewise.
1196 * targets.c: Likewise.
1197 * elf32-sh-symbian.c: Delete.
1198 * Makefile.in: Regenerate.
1199 * configure: Regenerate.
1200 * po/SRC-POTFILES.in: Regenerate.
1202 2018-04-16 Alan Modra <amodra@gmail.com>
1204 * Makefile.am: Remove vax-bsd and vax-ultrix support.
1205 * config.bfd: Likewise.
1206 * configure.ac: Likewise.
1207 * targets.c: Likewise.
1209 * Makefile.in: Regenerate.
1210 * configure: Regenerate.
1211 * po/SRC-POTFILES.in: Regenerate.
1213 2018-04-16 Alan Modra <amodra@gmail.com>
1215 * Makefile.am: Remove w65 support.
1216 * archures.c: Likewise.
1217 * coffcode.h: Likewise.
1218 * config.bfd: Likewise.
1219 * configure.ac: Likewise.
1220 * targets.c: Likewise.
1221 * coff-w65.c: Delete.
1222 * cpu-w65.c: Delete.
1223 * Makefile.in: Regenerate.
1224 * bfd-in2.h: Regenerate.
1225 * configure: Regenerate.
1226 * po/SRC-POTFILES.in: Regenerate.
1228 2018-04-16 Alan Modra <amodra@gmail.com>
1230 * Makefile.am: Remove we32k support.
1231 * archures.c: Likewise.
1232 * coffcode.h: Likewise.
1233 * config.bfd: Likewise.
1234 * configure.ac: Likewise.
1235 * targets.c: Likewise.
1236 * coff-we32k.c: Delete.
1237 * cpu-we32k.c: Delete.
1238 * Makefile.in: Regenerate.
1239 * bfd-in2.h: Regenerate.
1240 * configure: Regenerate.
1241 * po/SRC-POTFILES.in: Regenerate.
1243 2018-04-16 Alan Modra <amodra@gmail.com>
1245 * Makefile.am: Remove m88k support.
1246 * aoutx.h: Likewise.
1247 * archures.c: Likewise.
1248 * coffcode.h: Likewise.
1249 * coffswap.h: Likewise.
1250 * config.bfd: Likewise.
1251 * configure.ac: Likewise.
1252 * cpu-ns32k.c: Likewise.
1253 * elf32-nds32.c: Likewise.
1254 * mach-o.c: Likewise.
1255 * netbsd-core.c: Likewise.
1256 * reloc.c: Likewise.
1257 * targets.c: Likewise.
1258 * coff-m88k.c: Delete.
1259 * cpu-m88k.c: Delete.
1260 * elf32-m88k.c: Delete.
1261 * hosts/m88kmach3.h: Delete.
1262 * m88kmach3.c: Delete.
1263 * m88kopenbsd.c: Delete.
1264 * Makefile.in: Regenerate.
1265 * bfd-in2.h: Regenerate.
1266 * configure: Regenerate.
1267 * po/SRC-POTFILES.in: Regenerate.
1269 2018-04-16 Alan Modra <amodra@gmail.com>
1271 * Makefile.am: Remove i370 support.
1272 * archures.c: Likewise.
1273 * config.bfd: Likewise.
1274 * configure.ac: Likewise.
1275 * targets.c: Likewise.
1276 * cpu-i370.c: Delete.
1277 * elf32-i370.c: Delete.
1278 * Makefile.in: Regenerate.
1279 * bfd-in2.h: Regenerate.
1280 * configure: Regenerate.
1281 * po/SRC-POTFILES.in: Regenerate.
1283 2018-04-16 Alan Modra <amodra@gmail.com>
1285 * Makefile.am: Remove h8500 support.
1286 * archures.c: Likewise.
1287 * coffcode.h: Likewise.
1288 * config.bfd: Likewise.
1289 * configure.ac: Likewise.
1290 * targets.c: Likewise.
1291 * coff-h8500.c: Delete.
1292 * cpu-h8500.c: Delete.
1293 * Makefile.in: Regenerate.
1294 * bfd-in2.h: Regenerate.
1295 * configure: Regenerate.
1296 * po/SRC-POTFILES.in: Regenerate.
1298 2018-04-16 Alan Modra <amodra@gmail.com>
1300 * Makefile.am: Remove h8300-coff support.
1301 * coffcode.h: Likewise.
1302 * config.bfd: Likewise.
1303 * configure.ac: Likewise.
1304 * reloc16.c: Likewise.
1305 * targets.c: Likewise.
1306 * coff-h8300.c: Delete.
1307 * Makefile.in: Regenerate.
1308 * configure: Regenerate.
1309 * po/SRC-POTFILES.in: Regenerate.
1311 2018-04-16 Alan Modra <amodra@gmail.com>
1313 * Makefile.am: Remove IEEE 695 support.
1314 * archures.c: Likewise.
1316 * config.bfd: Likewise.
1317 * configure.ac: Likewise.
1318 * doc/bfd.texinfo: Likewise.
1319 * doc/bfdint.texi: Likewise.
1320 * doc/bfdsumm.texi: Likewise.
1321 * section.c: Likewise.
1322 * targets.c: Likewise.
1324 * libieee.h: Delete.
1325 * Makefile.in: Regenerate.
1326 * bfd-in2.h: Regenerate.
1327 * configure: Regenerate.
1328 * po/SRC-POTFILES.in: Regenerate.
1330 2018-04-16 Alan Modra <amodra@gmail.com>
1332 * config.bfd: Remove tandem support.
1334 2018-04-16 Alan Modra <amodra@gmail.com>
1336 * Makefile.am: Remove newsos3 support.
1337 * aoutx.h: Likewise.
1338 * config.bfd: Likewise.
1339 * configure.ac: Likewise.
1340 * targets.c: Likewise.
1341 * newsos3.c: Delete.
1342 * Makefile.in: Regenerate.
1343 * configure: Regenerate.
1344 * po/SRC-POTFILES.in: Regenerate.
1346 2018-04-16 Alan Modra <amodra@gmail.com>
1348 * Makefile.am: Remove netware support.
1349 * bfd-in.h: Likewise.
1351 * config.bfd: Likewise.
1352 * configure.ac: Likewise.
1353 * doc/bfdint.texi: Likewise.
1354 * ecoff.c: Likewise.
1355 * targets.c: Likewise.
1357 * nlm-target.h: Delete.
1359 * nlm32-alpha.c: Delete.
1360 * nlm32-i386.c: Delete.
1361 * nlm32-ppc.c: Delete.
1362 * nlm32-sparc.c: Delete.
1365 * nlmcode.h: Delete.
1366 * nlmswap.h: Delete.
1367 * Makefile.in: Regenerate.
1368 * bfd-in2.h: Regenerate.
1369 * configure: Regenerate.
1370 * po/SRC-POTFILES.in: Regenerate.
1372 2018-04-16 Alan Modra <amodra@gmail.com>
1374 * archures.c: Remove tahoe support.
1375 * config.bfd: Likewise.
1376 * configure.ac: Likewise.
1377 * hosts/tahoe.h: Delete.
1378 * bfd-in2.h: Regenerate.
1379 * configure: Regenerate.
1381 2018-04-14 Alan Modra <amodra@gmail.com>
1383 * elf-bfd.h (struct elf_backend_data): Add relropagesize.
1384 * elfxx-target.h (ELF_RELROPAGESIZE): Provide default and
1386 (elfNN_bed): Init relropagesize.
1387 * bfd.c (bfd_emul_get_commonpagesize): Add boolean param to
1388 select relropagesize.
1389 * elf32-ppc.c (ELF_COMMONPAGESIZE): Define as 0x1000.
1390 (ELF_RELROPAGESIZE): Define as ELF_MAXPAGESIZE.
1391 (ELF_MINPAGESIZE): Don't define.
1392 * elf64-ppc.c (ELF_COMMONPAGESIZE): Define as 0x1000.
1393 (ELF_RELROPAGESIZE): Define as ELF_MAXPAGESIZE.
1394 * bfd-in2.h: Regenerate.
1396 2018-04-14 Alan Modra <amodra@gmail.com>
1398 * elf32-ppc.c (ELF_MAXPAGESIZE, ELF_COMMONPAGESIZE): Don't depend
1399 on __QNXTARGET__ define.
1401 2018-04-14 Alan Modra <amodra@gmail.com>
1403 * config.bfd: Add powerpc-*-lynxos* and powerpc-*-windiss*
1406 2018-04-11 Alan Modra <amodra@gmail.com>
1408 * aout-adobe.c: Delete.
1410 * coff-i860.c: Delete.
1411 * coff-i960.c: Delete.
1412 * cpu-i860.c: Delete.
1413 * cpu-i960.c: Delete.
1414 * elf32-i860.c: Delete.
1415 * elf32-i960.c: Delete.
1416 * hosts/i860mach3.h: Delete.
1417 * Makefile.am: Remove i860, i960, bout, and adobe support.
1418 * archures.c: Remove i860 and i960 support.
1419 * coffcode.h: Likewise.
1420 * reloc.c: Likewise.
1421 * aoutx.h: Comment updates.
1422 * archive.c: Remove BOUT and i960 support.
1423 * bfd.c: Remove BOUT support.
1424 * coffswap.h: Remove i960 support.
1425 * config.bfd: Remove i860, i960 and adobe targets.
1426 * configure.ac: Remove adode, bout, i860, i960, icoff targets.
1427 * targets.c: Likewise.
1428 * ieee.c: Remove i960 support.
1429 * mach-o.c: Remove i860 support.
1430 * Makefile.in: Regenerate.
1431 * bfd-in2.h: Regenerate.
1432 * configure: Regenerate.
1433 * libbfd.h: Regenerate.
1434 * po/SRC-POTFILES.in: Regenerate.
1436 2018-04-09 Maciej W. Rozycki <macro@mips.com>
1438 * elf64-mips.c (mips_elf64_write_rel): Handle a NULL BFD pointer
1439 in the BFD symbol referred by the relocation.
1440 (mips_elf64_write_rela): Likewise.
1442 2018-04-09 Maciej W. Rozycki <macro@mips.com>
1444 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Issue an
1445 error for out-of-range `r_sym' values.
1447 2018-04-09 Alan Modra <amodra@gmail.com>
1449 * elf64-ppc.c (struct _ppc64_elf_section_data): Add has_pltcall field.
1450 (struct ppc_link_hash_table): Add can_convert_all_inline_plt.
1451 (ppc64_elf_check_relocs): Set has_pltcall.
1452 (ppc64_elf_adjust_dynamic_symbol): Discard some PLT entries.
1453 (ppc64_elf_inline_plt): New function.
1454 (ppc64_elf_size_dynamic_sections): Discard some PLT entries for locals.
1455 * elf64-ppc.h (ppc64_elf_inline_plt): Declare.
1456 * elf32-ppc.c (has_pltcall): Define.
1457 (struct ppc_elf_link_hash_table): Add can_convert_all_inline_plt.
1458 (ppc_elf_check_relocs): Set has_pltcall.
1459 (ppc_elf_inline_plt): New function.
1460 (ppc_elf_adjust_dynamic_symbol): Discard some PLT entries.
1461 (ppc_elf_size_dynamic_sections): Likewise.
1462 * elf32-ppc.h (ppc_elf_inline_plt): Declare.
1464 2018-04-09 Alan Modra <amodra@gmail.com>
1466 * elf32-ppc.c (ppc_elf_howto_raw): Add PLTSEQ and PLTCALL howtos.
1467 (is_plt_seq_reloc): New function.
1468 (ppc_elf_check_relocs): Handle PLTSEQ and PLTCALL relocs.
1469 (ppc_elf_tls_optimize): Handle inline plt call sequence.
1470 (ppc_elf_relax_section): Handle PLTCALL reloc.
1471 (ppc_elf_relocate_section): Nop out inline plt call sequence when
1473 * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_PLTSEQ and
1474 R_PPC64_PLTCALL entries. Comment R_PPC64_TOCSAVE.
1475 (has_tls_get_addr_call): Correct comment.
1476 (is_branch_reloc): Add PLTCALL.
1477 (is_plt_seq_reloc): New function.
1478 (ppc64_elf_check_relocs): Handle PLT16_LO_DS reloc. Set
1479 has_tls_reloc for R_PPC64_TLSGD and R_PPC64_TLSLD. Create plt
1480 entry for R_PPC64_PLTCALL.
1481 (ppc64_elf_tls_optimize): Handle inline plt call sequence.
1482 (ppc_type_of_stub): Handle PLTCALL reloc.
1483 (toc_adjusting_stub_needed): Likewise.
1484 (ppc64_elf_relocate_section): Set "can_plt_call" for PLTCALL
1485 reloc insn. Nop out inline plt call sequence when resolving
1486 locally. Handle __tls_get_addr inline plt call optimization.
1488 2018-04-09 Alan Modra <amodra@gmail.com>
1490 * elf64-ppc.c (LOCAL_PLT_ENTRY_SIZE): Define.
1491 (struct ppc_stub_hash_entry): Add symtype field.
1493 (struct ppc_link_hash_table): Add pltlocal and relpltlocal.
1494 (create_linkage_sections): Create pltlocal and relpltlocal.
1495 (ppc64_elf_check_relocs): Allow PLT relocs on local symbols.
1497 (ppc64_elf_adjust_dynamic_symbol): Keep PLT entries for inline calls.
1498 (allocate_dynrelocs): Allocate pltlocal and relpltlocal.
1499 (ppc64_elf_size_dynamic_sections): Size pltlocal and relpltlocal.
1500 Keep PLT entries for inline calls against locals.
1501 (ppc_build_one_stub): Use pltlocal as appropriate.
1502 (ppc_size_one_stub): Likewise.
1503 (ppc64_elf_size_stubs): Set symtype.
1504 (build_global_entry_stubs_and_plt): Init pltlocal and write
1505 relpltlocal for globals.
1506 (write_plt_relocs_for_local_syms): Likewise for local syms.
1507 (ppc64_elf_relocate_section): Support PLT for local syms.
1508 * elf32-ppc.c (PLT_KEEP): Define.
1509 (struct ppc_elf_link_hash_table): Add pltlocal and relpltlocal.
1510 (ppc_elf_create_glink): Create pltlocal and relpltlocal.
1511 (ppc_elf_check_relocs): Allow PLT relocs on local symbols.
1512 Set PLT_KEEP. Adjust update_local_sym_info call.
1513 (ppc_elf_adjust_dynamic_symbol): Keep PLT entries for inline calls.
1514 (allocate_dynrelocs): Allocate pltlocal and relpltlocal.
1515 (ppc_elf_size_dynamic_sections): Size pltlocal and relpltlocal.
1516 (ppc_elf_relocate_section): Support PLT16 relocs for local syms.
1517 (write_global_sym_plt): Init pltlocal and write relpltlocal.
1518 (ppc_finish_symbols): Likewise for locals.
1520 2018-04-09 Alan Modra <amodra@gmail.com>
1522 * elf64-ppc.c (ppc_build_one_stub): Move output of PLT relocs
1523 for local symbols to..
1524 (write_plt_relocs_for_local_syms): ..here. New function.
1525 (ppc64_elf_finish_dynamic_symbol): Move output of PLT relocs for
1527 (build_global_entry_stubs_and_plt): ..here. Rename from
1528 build_global_entry_stubs.
1529 (ppc64_elf_build_stubs): Always call build_global_entry_stubs_and_plt.
1530 Call write_plt_relocs_for_local_syms.
1531 * elf32-ppc.c (get_sym_h): New function.
1532 (ppc_elf_relax_section): Use get_sym_h.
1533 (ppc_elf_relocate_section): Move output of PLT relocs and glink
1534 stubs for local symbols to..
1535 (ppc_finish_symbols): ..here. New function.
1536 (ppc_elf_finish_dynamic_symbol): Move output of PLT relocs for
1538 (write_global_sym_plt): ..here. New function.
1539 * elf32-ppc.h (ppc_elf_modify_segment_map): Delete attribute.
1540 (ppc_finish_symbols): Declare.
1542 2018-04-09 Alan Modra <amodra@gmail.com>
1544 * elf32-ppc.c (ppc_elf_check_relocs): Handle PLT16 relocs.
1545 (ppc_elf_relocate_section): Likewise.
1546 * elf64-ppc.c (ppc64_elf_check_relocs): Handle PLT16_LO_DS.
1547 (ppc64_elf_relocate_section): Likewise. Correct PLT16
1548 resolution to plt entry relative to toc pointer.
1550 2018-04-09 Alan Modra <amodra@gmail.com>
1552 * elf64-ppc.c (TLS_TLS, TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL,
1553 TLS_TPRELGD, TLS_EXPLICIT): Renumber. Test TLS_TLS throughout
1554 file when other TLS flags are tested in a mask.
1555 (TLS_MARK, NON_GOT): Define.
1556 (PLT_IFUNC): Redefine, and test TLS_TLS throughout file as well.
1557 (update_local_sym_info): Don't create got entry when NON_GOT.
1558 (ppc64_elf_check_relocs): Pass NON_GOT with PLT_IFUNC.
1560 (get_tls_mask): Do toc lookup if tls_mask is just TLS_MARK.
1561 (ppc64_elf_relocate_section): Likewise.
1562 (ppc64_elf_tls_optimize): Don't attempt to optimize indirect
1563 __tls_get_addr calls lacking a marker reloc.
1564 * elf32-ppc.c (TLS_TLS, TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL,
1565 TLS_TPRELGD): Renumber. Update comment.
1566 (TLS_MARK, NON_GOT): Define.
1567 (PLT_IFUNC): Redefine, and test TLS_TLS throughout file as well.
1568 (update_local_sym_info): Don't create got entry when NON_GOT.
1569 (ppc_elf_check_relocs): Pass NON_GOT with PLT_IFUNC.
1571 (ppc_elf_tls_optimize): Don't attempt to optimize indirect
1572 __tls_get_addr calls lacking a marker reloc.
1574 2018-04-06 H.J. Lu <hongjiu.lu@intel.com>
1576 * elf64-x86-64.c (elf_x86_64_info_to_howto): Don't mask out
1577 R_X86_64_converted_reloc_bit.
1579 2018-04-05 H.J. Lu <hongjiu.lu@intel.com>
1582 * configure: Regenerated.
1584 2018-04-05 Alan Modra <amodra@gmail.com>
1586 * elf-hppa.h (elf_hppa_info_to_howto): Init howto to NULL.
1587 (elf_hppa_info_to_howto_rel): Likewise.
1589 2018-04-04 Maciej W. Rozycki <macro@mips.com>
1591 * elf-hppa.h (elf_hppa_info_to_howto): Also return
1592 unsuccessfully for unimplemented relocations.
1593 (elf_hppa_info_to_howto_rel): Likewise.
1595 2018-04-04 Maciej W. Rozycki <macro@mips.com>
1597 * elf32-i860.c (lookup_howto): Add `abfd' parameter. Set the
1598 `bfd_error_bad_value' error and call `_bfd_error_handler' on a
1599 howto lookup failure.
1600 (elf32_i860_reloc_type_lookup): Adjust `lookup_howto' call
1602 (elf32_i860_info_to_howto_rela): Likewise.
1603 (elf32_i860_relocate_splitn): Likewise.
1604 (elf32_i860_relocate_pc16): Likewise.
1605 (elf32_i860_relocate_pc26): Likewise.
1606 (elf32_i860_relocate_section): Likewise.
1608 2018-04-04 Maciej W. Rozycki <macro@mips.com>
1610 * elf32-visium.c (visium_info_to_howto_rela): Correct the range
1611 check for `visium_elf_howto_table' table access.
1613 2018-04-04 Maciej W. Rozycki <macro@mips.com>
1615 * elf32-iq2000.c (iq2000_info_to_howto_rela): Correct the range
1616 check for `iq2000_elf_howto_table' table access.
1618 2018-04-04 Maciej W. Rozycki <macro@mips.com>
1620 * elf32-frv.c (frv_info_to_howto_rela): Correct the range check
1621 for `elf32_frv_howto_table' table access.
1623 2018-04-04 Maciej W. Rozycki <macro@mips.com>
1625 * elf32-mips.c (mips_elf32_rtype_to_howto): Also return
1626 unsuccessfully for placeholder howtos.
1627 * elf64-mips.c (mips_elf64_rtype_to_howto): Likewise.
1628 * elfn32-mips.c (mips_elf_n32_rtype_to_howto): Likewise.
1630 2018-03-29 Maciej W. Rozycki <macro@mips.com>
1632 * elf32-mips.c (mips_info_to_howto_rel): Remove the calls to
1633 `_bfd_error_handler' and to set the `bfd_error_bad_value' error.
1635 2018-03-28 Maciej W. Rozycki <macro@mips.com>
1637 * elf-hppa.h (elf_hppa_info_to_howto_rel): Remove
1638 ATTRIBUTE_UNUSED from `abfd'.
1640 2018-03-28 Maciej W. Rozycki <macro@mips.com>
1642 * elf-hppa.h (elf_hppa_info_to_howto_rel): Correct
1643 `_bfd_error_handler' call formatting.
1645 2018-03-28 Maciej W. Rozycki <macro@mips.com>
1647 * elf32-mips.c (mips_info_to_howto_rel): Call
1648 `mips_elf32_rtype_to_howto' directly rather than via
1649 `->elf_backend_mips_rtype_to_howto'.
1651 2018-03-28 Renlin Li <renlin.li@arm.com>
1654 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Add cases for
1655 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12,
1656 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
1657 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12,
1658 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
1659 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12,
1660 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
1661 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12,
1662 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
1663 (elfNN_aarch64_final_link_relocate): Support new relocations.
1664 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Support new
1666 (_bfd_aarch64_elf_resolve_relocation): Support new relocations.
1668 2018-03-28 Renlin Li <renlin.li@arm.com>
1671 * reloc.c: Add BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12
1672 BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12_NC,
1673 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12,
1674 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
1675 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12,
1676 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
1677 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12,
1678 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
1679 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12,
1680 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
1681 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Add table entry for
1682 TLSLE_LDST16_TPREL_LO12,
1683 TLSLE_LDST16_TPREL_LO12_NC,
1684 TLSLE_LDST32_TPREL_LO12,
1685 TLSLE_LDST32_TPREL_LO12_NC,
1686 TLSLE_LDST64_TPREL_LO12,
1687 TLSLE_LDST64_TPREL_LO12_NC,
1688 TLSLE_LDST8_TPREL_LO12,
1689 TLSLE_LDST8_TPREL_LO12_NC.
1690 * bfd-in2.h: Regenerated.
1691 * libbfd.h: Regenerated.
1693 2018-03-28 Eric Botcazou <ebotcazou@adacore.com>
1696 * elfxx-sparc.c (struct _bfd_sparc_elf_link_hash_entry): Add new flag
1697 has_old_style_got_reloc.
1698 (_bfd_sparc_elf_check_relocs) <GOT relocations>: Set it for old-style
1699 relocations. Fix a couple of long lines.
1700 (_bfd_sparc_elf_relocate_section) <R_SPARC_GOTDATA_OP>: Do not generate
1701 a R_SPARC_NONE for the GOT slot if the symbol is also subject to old-style
1704 2018-03-25 H.J. Lu <hongjiu.lu@intel.com>
1707 * elf64-x86-64.c (elf_x86_64_finish_dynamic_sections): Add
1708 ENDBR64 to the TLSDESC PLT entry.
1710 2018-03-21 Alan Modra <amodra@gmail.com>
1712 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Trim uninteresting
1713 symbols. Use size_t counts. Delete redundant opd test.
1715 2018-03-21 Alan Modra <amodra@gmail.com>
1717 * elf32-ppc.c (ppc_elf_tls_optimize): Delete locsyms.
1719 2018-03-21 Alan Modra <amodra@gmail.com>
1721 * elf32-ppc.c (struct ppc_elf_link_hash_entry): Make tls_mask
1723 (update_local_sym_info): Likewise for local_got_tls_masks.
1724 (ppc_elf_tls_optimize): Likewise for lgot_masks.
1726 2018-03-21 Alan Modra <amodra@gmail.com>
1728 * elf64-ppc.c (ppc_size_one_stub): Fix comment typo.
1729 (ppc64_elf_layout_multitoc): Allocate relocs for tprel as we
1730 do in size_dynamic_sections.
1732 2018-03-21 Alan Modra <amodra@gmail.com>
1734 * elf64-ppc.c (ppc64_elf_relocate_section): Don't access rel[1]
1735 without first checking array bounds.
1736 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1738 2018-03-20 H.J. Lu <hongjiu.lu@intel.com>
1741 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Set
1742 non_ir_ref_dynamic if a symbol is made dynamic by --dynamic-list.
1744 2018-03-19 Nick Clifton <nickc@redhat.com>
1746 * po/es.po: Updated Spanish translation.
1748 2018-03-15 Max Filippov <jcmvbkbc@gmail.com>
1750 * elf32-xtensa.c (xlate_map_entry): Change types of address
1751 fields from 'unsigned' to 'bfd_vma'.
1752 (xlate_offset_with_removed_text): Use struct xlate_map_entry as
1753 the key argument to bsearch. Allow offsets past the end of a
1754 section, use the last map entry for translation of such offsets.
1756 2018-03-15 Kuan-Lin Chen <kuanlinchentw@gmail.com>
1758 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Removed.
1759 Not support the target feature.
1760 (nds32_elf_ex9_itb_base): Likewise.
1761 (nds32_elf_ex9_import_table): Likewise.
1762 (nds32_elf_ex9_finish): Likewise.
1763 (nds32_elf_ex9_reloc_jmp): Likewise.
1764 (nds32_elf_get_insn_with_reg): Likewise.
1765 (nds32_get_local_syms): Likewise.
1766 (nds32_elf_ex9_replace_instruction): Likewise.
1767 (nds32_elf_ifc_calc): Likewise.
1768 (nds32_elf_ifc_finish): Likewise.
1769 (nds32_elf_ifc_replace): Likewise.
1770 (nds32_elf_ifc_reloc): Likewise.
1772 2018-03-14 Alan Modra <amodra@gmail.com>
1774 * elf64-ppc.c (sfpr_define): Adjust for stub_sec size having
1775 sfpr size added before defining alias symbols.
1776 (ppc64_elf_build_stubs): Add stub section padding before
1777 copying sfpr contents and defining save/restore alias symbols.
1779 2018-03-14 H.J. Lu <hongjiu.lu@intel.com>
1782 * elflink.c (elf_gc_mark_debug_section): Also check the local
1783 debug definition section.
1785 2018-03-13 Nick Clifton <nickc@redhat.com>
1788 * pei-x86_64.c (pex64_get_unwind_info): Change to a boolean
1789 function. Add an end address parameter. Check access of the data
1790 pointer to make sure that they do not extend beyond the end
1791 address. Return FALSE if any check fails. Add the end address
1792 pointer to the ui structure.
1793 (pex64_xdata_print_uwd_codes): Check accesses of the raw unwind
1794 codes to make sure that they do not extend beyond the end address
1795 pointer. Print an error message and return immediately if any
1798 2018-03-09 Nick Clifton <nickc@redhat.com>
1800 * elf64-s390.c (elf_s390_relocate_section): Move check for
1801 relocations against non-allocated sections to before the code that
1802 handles ifunc relocations.
1803 * elf32-s390.c (elf_s390_relocate_section): Likewise.
1804 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Treat
1805 relocs against IFUNC symbols in non-allocated sections as relocs
1806 against FUNC symbols.
1807 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
1809 2018-03-08 H.J. Lu <hongjiu.lu@intel.com>
1812 * elf32-i386.c (elf_i386_relocate_section): Treat relocation
1813 against IFUNC symbol in SHT_NOTE section without SHF_ALLOC as
1814 relocation against FUNC symbol.
1815 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1817 2018-03-07 Renlin Li <renlin.li@arm.com>
1820 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Check absolute
1821 symbol, and don't emit relocation in specific case.
1823 2018-03-07 Alan Modra <amodra@gmail.com>
1825 * elf64-mips.c (mips_elf64_rtype_to_howto): Return NULL on error.
1826 (mips_elf64_slurp_one_reloc_table): Pass on error.
1828 2018-03-03 James Cowgill <james.cowgill@mips.com>
1829 Maciej W. Rozycki <macro@mips.com>
1832 * elfxx-mips.c (mips_elf_calculate_relocation): Only return
1833 after calling `undefined_symbol' hook if this is an error
1834 condition. Assume the value of 0 for the symbol requested
1837 2018-03-02 Jim Wilson <jimw@sifive.com>
1840 * elfnn-aarch64.c (_bfd_aarch64_resize_stubs): Add 8 bytes for branch
1841 and nop instead of 4.
1842 (elfNN_arch64_build_stubs): Add nop after branch. Increase size by
1845 2018-03-01 Jim Wilson <jimw@sifive.com>
1848 * elfnn-riscv.c (riscv_relax_delete_bytes): When adjust st_size, use
1849 else if instead of if.
1851 2018-03-01 Alan Modra <amodra@gmail.com>
1853 * elf32-ft32.c (ft32_info_to_howto_rela): Correct range test.
1855 2018-02-28 Alan Modra <amodra@gmail.com>
1858 * aoutx.h (swap_std_reloc_in): Correct r_index bound check.
1860 2018-02-28 Nick Clifton <nickc@redhat.com>
1864 * dwarf2.c (read_n_bytes): Replace size parameter with dwarf_block
1865 pointer. Drop unused abfd parameter. Check the size of the block
1866 before initialising the data field. Return the end pointer if the
1868 (read_attribute_value): Adjust invocations of read_n_bytes.
1871 * dwarf1.c (parse_die): Check the length of form blocks before
1872 advancing the data pointer.
1874 2018-02-28 Alan Modra <amodra@gmail.com>
1877 * aoutx.h (translate_symbol_table): Print an error message and set
1878 bfd_error on finding an invalid name string offset.
1880 2018-02-27 H.J. Lu <hongjiu.lu@intel.com>
1882 * config.in: Regenerated.
1883 * configure: Likewise.
1884 * configure.ac: Add --enable-separate-code.
1885 (DEFAULT_LD_Z_SEPARATE_CODE): New AC_DEFINE_UNQUOTED. Default
1886 to 1 for Linux/x86 targets,
1887 * elf64-x86-64.c (ELF_MAXPAGESIZE): Set to 0x1000 if
1888 DEFAULT_LD_Z_SEPARATE_CODE is 1.
1890 2018-02-27 Nick Clifton <nickc@redhat.com>
1892 * aout-cris.c (swap_ext_reloc_out): Standadize error/warning
1894 * elf-hppa.h (elf_hppa_info_to_howto_rel): Likewise.
1895 * elf32-i386.c (elf_i386_reloc_type_lookup): Likewise.
1896 * elf32-xtensa.c (elf_xtensa_reloc_type_lookup): Likewise.
1897 * elf64-ppc.c (ppc64_elf_reloc_type_lookup): Likewise.
1898 * elf64-s390.c (elf_s390_reloc_type_lookup): Likewise.
1899 * elf64-sh64.c (sh_elf64_info_to_howto): Likewise.
1900 * elfxx-ia64.c (ia64_elf_reloc_type_lookup): Likewise.
1901 * elfxx-sparc.c (_bfd_sparc_elf_reloc_type_lookup): Likewise.
1902 * elfxx-tilegx.c (tilegx_reloc_type_lookup): Likewise.
1905 * elf-bfd.h (struct elf_backend_data): Change the return type of
1906 the elf_info_to_howto and elf_info_to_howto_rel function pointers
1908 * elfcode.h (elf_slurp_reloc_table_from_section): Check the return
1909 value from the info_to_howto function and fail if that function
1911 * elf32-h8300.c (elf32_h8_relocate_section): Check return value
1912 from the info_to_howto function.
1913 (elf32_h8_relax_section): Likewise.
1914 * elf32-lm32.c (lm32_elf_relocate_section): Likewise.
1915 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
1916 * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise.
1917 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
1918 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
1919 * elf64-ia64-vms.c (elf64_ia64_relocate_section): Likewise.
1920 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Likewise.
1921 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
1922 * elfnn-ia64.c (elfNN_ia64_relocate_section): Likewise.
1923 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
1924 (riscv_elf_relocate_section): Likewise.
1925 * elf-hppa.h (elf_hppa_info_to_howto): Change return type to
1926 bfd_boolean. Issue an error message, set an error value and
1927 return FALSE if the reloc is not recognized.
1928 (elf_hppa_info_to_howto_rel): Likewise.
1929 * elf-m10200.c (mn10200_info_to_howto): Likewise.
1930 * elf-m10300.c (mn10300_info_to_howto): Likewise.
1931 * elf.c (_bfd_elf_no_info_to_howto): Likewise.
1932 * elf32-arc.c (arc_info_to_howto_rel): Likewise.
1933 * elf32-arm.c (elf32_arm_info_to_howto): Likewise.
1934 * elf32-avr.c (avr_info_to_howto_rela): Likewise.
1935 * elf32-bfin.c (bfin_info_to_howto): Likewise.
1936 * elf32-cr16.c (elf_cr16_info_to_howto): Likewise.
1937 * elf32-cr16c.c (elf_cr16c_info_to_howto): Likewise.
1938 * elf32-cris.c (elf_cr16c_info_to_howto_rel)
1939 (cris_info_to_howto_rela): Likewise.
1940 * elf32-crx.c (elf_crx_info_to_howto): Likewise.
1941 * elf32-d10v.c (d10v_info_to_howto_rel): Likewise.
1942 * elf32-d30v.c (d30v_info_to_howto_rel, d30v_info_to_howto_rela):
1944 * elf32-dlx.c (dlx_rtype_to_howto, elf32_dlx_info_to_howto)
1945 (elf32_dlx_info_to_howto_rel): Likewise.
1946 * elf32-epiphany.c (epiphany_info_to_howto_rela): Likewise.
1947 * elf32-fr30.c (fr30_info_to_howto_rela): Likewise.
1948 * elf32-frv.c (frv_info_to_howto_rela)
1949 (frvfdpic_info_to_howto_rel): Likewise.
1950 * elf32-ft32.c (ft32_info_to_howto_rela): Likewise.
1951 * elf32-gen.c (elf_generic_info_to_howto)
1952 (elf_generic_info_to_howto_rel): Likewise.
1953 * elf32-h8300.c (elf32_h8_info_to_howto)
1954 (elf32_h8_info_to_howto_rel): Likewise.
1955 * elf32-i370.c (i370_elf_info_to_howto): Likewise.
1956 * elf32-i386.c (elf_i386_reloc_type_lookup)
1957 (elf_i386_rtype_to_howto, elf_i386_info_to_howto_rel): Likewise.
1958 * elf32-i860.c (lookup_howto, elf32_i860_info_to_howto_rela):
1960 * elf32-i960.c (elf32_i960_info_to_howto_rel): Likewise.
1961 * elf32-ip2k.c (ip2k_info_to_howto_rela): Likewise.
1962 * elf32-iq2000.c (iq2000_info_to_howto_rela): Likewise.
1963 * elf32-lm32.c (lm32_info_to_howto_rela): Likewise.
1964 * elf32-m32c.c (m32c_info_to_howto_rela): Likewise.
1965 * elf32-m32r.c (m32r_info_to_howto_rel, m32r_info_to_howto):
1967 * elf32-m68hc11.c (m68hc11_info_to_howto_rel): Likewise.
1968 * elf32-m68hc12.c (m68hc11_info_to_howto_rel): Likewise.
1969 * elf32-m68k.c (rtype_to_howto): Likewise.
1970 * elf32-mcore.c (mcore_elf_info_to_howto): Likewise.
1971 * elf32-mep.c (mep_info_to_howto_rela): Likewise.
1972 * elf32-metag.c (metag_info_to_howto_rela): Likewise.
1973 * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise.
1974 * elf32-mips.c (mips_info_to_howto_rel, mips_info_to_howto_rela):
1976 * elf32-moxie.c (moxie_info_to_howto_rela): Likewise.
1977 * elf32-msp430.c (msp430_info_to_howto_rela): Likewise.
1978 * elf32-mt.c (mt_info_to_howto_rela): Likewise.
1979 * elf32-nds32.c (nds32_info_to_howto_rel, nds32_info_to_howto):
1981 * elf32-nios2.c (nios2_elf32_info_to_howto): Likewise.
1982 * elf32-or1k.c (or1k_info_to_howto_rela): Likewise.
1983 * elf32-pj.c (pj_elf_info_to_howto): Likewise.
1984 * elf32-ppc.c (ppc_elf_info_to_howto): Likewise.
1985 * elf32-pru.c (pru_elf32_info_to_howto): Likewise.
1986 * elf32-rl78.c (rl78_info_to_howto_rela): Likewise.
1987 * elf32-rx.c (rx_info_to_howto_rela): Likewise.
1988 * elf32-s390.c (elf_s390_info_to_howto): Likewise.
1989 * elf32-score.c (s3_bfd_score_info_to_howto)
1990 (_bfd_score_info_to_howto): Likewise.
1991 * elf32-score7.c (s7_bfd_score_info_to_howto): Likewise.
1992 * elf32-sh.c (sh_elf_info_to_howto): Likewise.
1993 * elf32-spu.c (spu_elf_info_to_howto): Likewise.
1994 * elf32-tic6x.c (elf32_tic6x_info_to_howto)
1995 (elf32_tic6x_info_to_howto_rel): Likewise.
1996 * elf32-tilepro.c (tilepro_info_to_howto_rela): Likewise.
1997 * elf32-v850.c (v850_elf_info_to_howto_rel)
1998 (v850_elf_info_to_howto_rela, v800_elf_info_to_howto): Likewise.
1999 * elf32-vax.c (rtype_to_howto): Likewise.
2000 * elf32-visium.c (visium_info_to_howto_rela): Likewise.
2001 * elf32-wasm32.c (elf32_wasm32_rtype_to_howto)
2002 (elf32_wasm32_info_to_howto_rela): Likewise.
2003 * elf32-xc16x.c (elf32_xc16x_info_to_howto): Likewise.
2004 * elf32-xgate.c (xgate_info_to_howto_rel): Likewise.
2005 * elf32-xstormy16.c (xstormy16_info_to_howto_rela): Likewise.
2006 * elf32-xtensa.c (elf_xtensa_info_to_howto_rela): Likewise.
2007 * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise.
2008 * elf64-gen.c (elf_generic_info_to_howto)
2009 (elf_generic_info_to_howto_rel): Likewise.
2010 * elf64-ia64-vms.c (elf64_ia64_info_to_howto): Likewise.
2011 * elf64-mips.c (mips_elf64_info_to_howto_rela): Likewise.
2012 * elf64-mmix.c (mmix_info_to_howto_rela): Likewise.
2013 * elf64-ppc.c (ppc64_elf_info_to_howto): Likewise.
2014 * elf64-s390.c (elf_s390_reloc_type_lookup): Likewise.
2015 * elf64-sh64.c (elf_s390_info_to_howto, sh_elf64_info_to_howto):
2017 * elf64-x86-64.c (elf_x86_64_info_to_howto): Likewise.
2018 * elfn32-mips.c (mips_info_to_howto_rel, mips_info_to_howto_rela):
2020 * elfnn-aarch64.c (elfNN_aarch64_info_to_howto): Likewise.
2021 * elfnn-ia64.c (elfNN_ia64_info_to_howto): Likewise.
2022 * elfnn-riscv.c (riscv_info_to_howto_rela): Likewise.
2023 * elfxx-ia64.c (ia64_elf_reloc_type_lookup): Likewise.
2024 * elfxx-sparc.c (_bfd_sparc_elf_info_to_howto): Likewise.
2025 * elfxx-tilegx.c (tilegx_info_to_howto_rela): Likewise.
2026 * elf32-score.h (s7_bfd_score_info_to_howto): Update prototype.
2027 * elfxx-sparc.h (_bfd_sparc_elf_info_to_howto): Update prototype.
2028 * elfxx-tilegx.h (tilegx_info_to_howto_rela): Update prototype.
2029 * elfxx-target.h (elf_info_to_howto, elf_info_to_howto_rel):
2032 2018-02-26 Jim Wilson <jimw@sifive.com>
2033 Stephan Schreiber <info@fs-driver.org>
2036 * elfnn-ia64.c (elfNN_ia64_relax_section): After ia64_elf_relax_brl
2037 call, set changed_contents and changed_relocs. Likewise after
2038 successful ia64_elf_relax_br call.
2040 2018-02-26 Alan Modra <amodra@gmail.com>
2042 * elf.c (assign_file_positions_except_relocs): Don't segfault
2043 when actual number of phdrs is less than allocated. Delete
2044 outdated comment. Formatting.
2046 2018-02-26 Alan Modra <amodra@gmail.com>
2048 * elf-m10300.c, * elf-s390-common.c, * elf32-arc.c, * elf32-cris.c,
2049 * elf32-dlx.c, * elf32-frv.c, * elf32-i370.c, * elf32-lm32.c,
2050 * elf32-m32r.c, * elf32-m68hc1x.c, * elf32-m68k.c,
2051 * elf32-microblaze.c, * elf32-msp430.c, * elf32-nds32.c,
2052 * elf32-nios2.c, * elf32-or1k.c, * elf32-rl78.c, * elf32-rx.c,
2053 * elf32-score.c, * elf32-score7.c, * elf32-sh-symbian.c,
2054 * elf32-sh.c, * elf32-spu.c, * elf32-v850.c, * elf32-xtensa.c,
2055 * elf64-alpha.c, * elf64-ia64-vms.c, * elf64-mmix.c,
2056 * elf64-sh64.c, * elf64-sparc.c, * elfnn-ia64.c, * elfxx-tilegx.c,
2057 * mmo.c, * osf-core.c, * srec.c, * vms-alpha.c: Standardize
2058 error/warning messages.
2060 2018-02-26 Alan Modra <amodra@gmail.com>
2062 * archive.c, * bfd.c, * linker.c, * reloc.c, * stabs.c,
2063 * syms.c: Standardize error/warning messages.
2065 2018-02-26 Alan Modra <amodra@gmail.com>
2067 * aout-adobe.c, * aout-cris.c, * i386linux.c, * m68klinux.c,
2068 * sparclinux.c, * coff-alpha.c, * coff-arm.c, * coff-mcore.c,
2069 * coffcode.h, * coffgen.c, * cofflink.c, * ecoff.c, * pe-mips.c,
2070 * peXXigen.c, * peicode.h: Standardize error/warning messages.
2072 2018-02-26 Alan Modra <amodra@gmail.com>
2074 * elf32-arm.c, * elfnn-aarch64.c: Standardize error/warning messages.
2076 2018-02-26 Alan Modra <amodra@gmail.com>
2078 * elfxx-mips.c: Standardize error/warning messages.
2080 2018-02-26 Alan Modra <amodra@gmail.com>
2082 * dwarf2.c, * elf-attrs.c, * elf-eh-frame.c, * elf.c, * elf32-gen.c,
2083 * elflink.c: Standardize error/warning messages. Replace use of
2084 linker callback einfo with _bfd_error_handler when possible.
2086 2018-02-26 Alan Modra <amodra@gmail.com>
2088 * aoutx.h, * coff-alpha.c, * coff-i860.c, * coff-m68k.c,
2089 * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c,
2090 * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-w65.c,
2091 * elf-bfd.h, * elf-m10300.c, * elf.c, * elf32-avr.c, * elf32-bfin.c,
2092 * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c,
2093 * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c,
2094 * elf32-fr30.c, * elf32-frv.c, * elf32-i370.c, * elf32-i386.c,
2095 * elf32-i960.c, * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c,
2096 * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c,
2097 * elf32-m68k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c,
2098 * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c,
2099 * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-or1k.c,
2100 * elf32-pj.c, * elf32-ppc.c, * elf32-rl78.c, * elf32-rx.c,
2101 * elf32-s390.c, * elf32-sh.c, * elf32-spu.c, * elf32-tic6x.c,
2102 * elf32-v850.c, * elf32-vax.c, * elf32-visium.c, * elf32-wasm32.c,
2103 * elf32-xgate.c, * elf32-xtensa.c, * elf64-alpha.c,
2104 * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c,
2105 * elf64-ppc.c, * elf64-s390.c, * elf64-sparc.c, * elf64-x86-64.c,
2106 * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c,
2107 * elfnn-riscv.c, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-riscv.h,
2108 * elfxx-sparc.c, * elfxx-sparc.h, * reloc.c: Standardize
2109 unrecognized/unsupported reloc message.
2111 2018-02-26 Alan Modra <amodra@gmail.com>
2113 * elf32-ppc.c: Standardize error/warning messages. Use
2114 _bfd_error_handler rather than einfo when einfo features not used.
2115 * elf64-ppc.c: Likewise.
2117 2018-02-23 Alan Modra <amodra@gmail.com>
2120 * elf.c (assign_file_positions_for_non_load_sections): Remove RELRO
2121 segment if no matching LOAD segment.
2123 2018-02-23 Kuan-Lin Chen <kuanlinchentw@gmail.com>
2125 * elf32-nds32.h: Define mask for ict_model.
2127 2018-02-20 Jason Duerstock <jason.duerstock@gmail.com>
2129 * elfnn-ia64.c (elf_backend_can_gc_sections): Enable.
2131 2018-02-19 Maciej W. Rozycki <macro@mips.com>
2134 2018-01-12 Vlad Ivanov <vlad@ivanov.email>
2136 * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when
2137 .reginfo section has wrong size.
2139 2018-02-19 Maciej W. Rozycki <macro@mips.com>
2141 * elfxx-mips.c (_bfd_mips_elf_always_size_sections): Set
2142 SEC_FIXED_SIZE and SEC_HAS_CONTENTS flags for `.reginfo' and
2143 `.MIPS.abiflags' sections.
2144 (_bfd_mips_elf_final_link): Avoid reading beyond `.reginfo'
2147 2018-02-19 Maciej W. Rozycki <macro@mips.com>
2149 * section.c (SEC_FIXED_SIZE): New macro.
2150 * bfd-in2.h: Regenerate.
2152 2018-02-19 Maciej W. Rozycki <macro@mips.com>
2154 * section.c (SEC_HAS_GOT_REF): Remove macro.
2155 * bfd-in2.h: Regenerate.
2157 2018-02-19 Alan Modra <amodra@gmail.com>
2159 * elf-attrs.c (_bfd_elf_parse_attributes): Correct _bfd_error_handler
2161 * elfxx-mips.c (_bfd_mips_elf_final_link): Likewise.
2162 * elfnn-riscv.c (_bfd_riscv_relax_align): Likewise.
2163 (_bfd_riscv_relax_pc): Likewise and fix typos.
2164 * libbfd-in.h (_bfd_error_handler): Add attribute printf.
2165 * libbfd.h: Regenerate.
2167 2018-02-19 Alan Modra <amodra@gmail.com>
2169 * dwarf2.c (read_section): Don't use 'll' format modifier.
2170 (find_abstract_instance): Likewise.
2171 * elfcore.h (elf_core_file_p): Likewise.
2173 2018-02-19 Alan Modra <amodra@gmail.com>
2175 * bfd-in.h: Include inttypes.h or if not available define
2176 PRId64, PRIu64 and PRIx64.
2177 * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Remove support for L
2178 modifier to print bfd_vma.
2179 * coff-arm.c, * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c,
2180 * coff-sh.c, * coff-tic80.c, * coffcode.h, * coffgen.c, * cofflink.c,
2181 * compress.c, * dwarf2.c, * elf-m10300.c, * elf.c, * elf32-arc.c,
2182 * elf32-arm.c, * elf32-bfin.c, * elf32-cris.c, * elf32-hppa.c,
2183 * elf32-i386.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32r.c,
2184 * elf32-m68k.c, * elf32-metag.c, * elf32-nds32.c, * elf32-nios2.c,
2185 * elf32-ppc.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c,
2186 * elf32-score7.c, * elf32-sh.c, * elf32-sh64.c, * elf32-spu.c,
2187 * elf32-tic6x.c, * elf32-tilepro.c, * elf32-v850.c, * elf32-vax.c,
2188 * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c,
2189 * elf64-mmix.c, * elf64-s390.c, * elf64-sh64.c, * elf64-x86-64.c,
2190 * elfcode.h, * elfcore.h, * elflink.c, * elfnn-aarch64.c,
2191 * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-mips.c, * elfxx-sparc.c,
2192 * elfxx-tilegx.c, * ieee.c, * ihex.c, * mach-o.c, * merge.c, * mmo.c,
2193 * peXXigen.c, * xcofflink.c: Replace use of Lx modifier with PRIx64,
2194 and cast input to uint64_t, and similarly for Ld and Lu.
2195 * bfd-in2.h: Regenerate.
2197 2018-02-19 Alan Modra <amodra@gmail.com>
2199 * elf32-arm.c, * elf32-hppa.c, * elf32-lm32.c, * elf32-m32r.c,
2200 * elf32-metag.c, * elf32-nds32.c, * elf32-or1k.c, * elf32-ppc.c,
2201 * elf32-s390.c, * elf32-sh.c, * elf32-tic6x.c, * elf32-tilepro.c,
2202 * elf64-ppc.c, * elf64-s390.c, * elflink.c, * elfnn-aarch64.c,
2203 * elfnn-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c,
2204 * reloc.c: Replace use of %R and %T in format strings passed to
2205 einfo and friends by %pR and %pT.
2207 2018-02-19 Alan Modra <amodra@gmail.com>
2209 * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Handle %pA and %pB in place
2211 * aout-adobe.c: Update all messages using %A and %B.
2212 * aout-cris.c: Likewise.
2213 * aoutx.h: Likewise.
2214 * archive.c: Likewise.
2215 * binary.c: Likewise.
2216 * cache.c: Likewise.
2217 * coff-alpha.c: Likewise.
2218 * coff-arm.c: Likewise.
2219 * coff-i860.c: Likewise.
2220 * coff-mcore.c: Likewise.
2221 * coff-ppc.c: Likewise.
2222 * coff-rs6000.c: Likewise.
2223 * coff-sh.c: Likewise.
2224 * coff-tic4x.c: Likewise.
2225 * coff-tic54x.c: Likewise.
2226 * coff-tic80.c: Likewise.
2227 * coff64-rs6000.c: Likewise.
2228 * coffcode.h: Likewise.
2229 * coffgen.c: Likewise.
2230 * cofflink.c: Likewise.
2231 * coffswap.h: Likewise.
2232 * compress.c: Likewise.
2233 * cpu-arm.c: Likewise.
2234 * ecoff.c: Likewise.
2235 * elf-attrs.c: Likewise.
2236 * elf-eh-frame.c: Likewise.
2237 * elf-ifunc.c: Likewise.
2238 * elf-m10300.c: Likewise.
2239 * elf-properties.c: Likewise.
2240 * elf-s390-common.c: Likewise.
2242 * elf32-arc.c: Likewise.
2243 * elf32-arm.c: Likewise.
2244 * elf32-avr.c: Likewise.
2245 * elf32-bfin.c: Likewise.
2246 * elf32-cr16.c: Likewise.
2247 * elf32-cr16c.c: Likewise.
2248 * elf32-cris.c: Likewise.
2249 * elf32-crx.c: Likewise.
2250 * elf32-d10v.c: Likewise.
2251 * elf32-d30v.c: Likewise.
2252 * elf32-epiphany.c: Likewise.
2253 * elf32-fr30.c: Likewise.
2254 * elf32-frv.c: Likewise.
2255 * elf32-gen.c: Likewise.
2256 * elf32-hppa.c: Likewise.
2257 * elf32-i370.c: Likewise.
2258 * elf32-i386.c: Likewise.
2259 * elf32-i960.c: Likewise.
2260 * elf32-ip2k.c: Likewise.
2261 * elf32-iq2000.c: Likewise.
2262 * elf32-lm32.c: Likewise.
2263 * elf32-m32c.c: Likewise.
2264 * elf32-m32r.c: Likewise.
2265 * elf32-m68hc11.c: Likewise.
2266 * elf32-m68hc12.c: Likewise.
2267 * elf32-m68hc1x.c: Likewise.
2268 * elf32-m68k.c: Likewise.
2269 * elf32-mcore.c: Likewise.
2270 * elf32-mep.c: Likewise.
2271 * elf32-metag.c: Likewise.
2272 * elf32-microblaze.c: Likewise.
2273 * elf32-moxie.c: Likewise.
2274 * elf32-msp430.c: Likewise.
2275 * elf32-mt.c: Likewise.
2276 * elf32-nds32.c: Likewise.
2277 * elf32-nios2.c: Likewise.
2278 * elf32-or1k.c: Likewise.
2279 * elf32-pj.c: Likewise.
2280 * elf32-ppc.c: Likewise.
2281 * elf32-rl78.c: Likewise.
2282 * elf32-rx.c: Likewise.
2283 * elf32-s390.c: Likewise.
2284 * elf32-score.c: Likewise.
2285 * elf32-score7.c: Likewise.
2286 * elf32-sh-symbian.c: Likewise.
2287 * elf32-sh.c: Likewise.
2288 * elf32-sh64.c: Likewise.
2289 * elf32-sparc.c: Likewise.
2290 * elf32-spu.c: Likewise.
2291 * elf32-tic6x.c: Likewise.
2292 * elf32-tilepro.c: Likewise.
2293 * elf32-v850.c: Likewise.
2294 * elf32-vax.c: Likewise.
2295 * elf32-visium.c: Likewise.
2296 * elf32-wasm32.c: Likewise.
2297 * elf32-xgate.c: Likewise.
2298 * elf32-xtensa.c: Likewise.
2299 * elf64-alpha.c: Likewise.
2300 * elf64-gen.c: Likewise.
2301 * elf64-hppa.c: Likewise.
2302 * elf64-ia64-vms.c: Likewise.
2303 * elf64-mmix.c: Likewise.
2304 * elf64-ppc.c: Likewise.
2305 * elf64-s390.c: Likewise.
2306 * elf64-sh64.c: Likewise.
2307 * elf64-sparc.c: Likewise.
2308 * elf64-x86-64.c: Likewise.
2309 * elfcode.h: Likewise.
2310 * elfcore.h: Likewise.
2311 * elflink.c: Likewise.
2312 * elfnn-aarch64.c: Likewise.
2313 * elfnn-ia64.c: Likewise.
2314 * elfnn-riscv.c: Likewise.
2315 * elfxx-mips.c: Likewise.
2316 * elfxx-sparc.c: Likewise.
2317 * elfxx-tilegx.c: Likewise.
2318 * elfxx-x86.c: Likewise.
2319 * hpux-core.c: Likewise.
2322 * libbfd.c: Likewise.
2323 * linker.c: Likewise.
2324 * mach-o.c: Likewise.
2325 * merge.c: Likewise.
2327 * oasys.c: Likewise.
2328 * pdp11.c: Likewise.
2329 * pe-mips.c: Likewise.
2330 * peXXigen.c: Likewise.
2331 * peicode.h: Likewise.
2332 * reloc.c: Likewise.
2333 * rs6000-core.c: Likewise.
2335 * stabs.c: Likewise.
2336 * vms-alpha.c: Likewise.
2337 * xcofflink.c: Likewise.
2339 2018-02-19 Alan Modra <amodra@gmail.com>
2342 * elf.c (IS_TBSS): Define.
2343 (_bfd_elf_map_sections_to_segments): Use IS_TBSS.
2344 (assign_file_positions_for_non_load_sections): Revert last change.
2345 Properly calculate load segment limits to compare against relro limits.
2347 2018-02-17 Alan Modra <amodra@gmail.com>
2350 * elf.c (assign_file_positions_for_non_load_sections): Ignore
2351 degenerate zero size PT_LOAD segments when finding one overlapping
2352 the PT_GNU_RELRO segment.
2354 2018-02-16 Alan Modra <amodra@gmail.com>
2356 * libbfd.c (_bfd_bool_bfd_false_error): Rename from bfd_false.
2357 (_bfd_bool_bfd_true): Rename from bfd_true.
2358 (_bfd_ptr_bfd_null_error): Rename from bfd_nullvoidptr.
2359 (_bfd_int_bfd_0): Rename from bfd_0.
2360 (_bfd_uint_bfd_0): Rename from bfd_0u.
2361 (_bfd_long_bfd_0): Rename from bfd_0l.
2362 (_bfd_long_bfd_n1_error): Rename from _bfd_n1.
2363 (_bfd_void_bfd): Rename from bfd_void.
2364 (_bfd_bool_bfd_false, _bfd_bool_bfd_asymbol_false),
2365 (_bfd_bool_bfd_link_false_error),
2366 (_bfd_bool_bfd_link_true, _bfd_bool_bfd_bfd_true),
2367 (_bfd_bool_bfd_uint_true, _bfd_bool_bfd_ptr_true),
2368 (_bfd_bool_bfd_asection_bfd_asection_true),
2369 (_bfd_bool_bfd_asymbol_bfd_asymbol_true),
2370 (_bfd_void_bfd_link, _bfd_void_bfd_asection): New functions.
2371 * archive.c (_bfd_noarchive_get_elt_at_index),
2372 (_bfd_noarchive_openr_next_archived_file),
2373 (_bfd_noarchive_construct_extended_name_table),
2374 (_bfd_noarchive_write_ar_hdr, _bfd_noarchive_truncate_arname),
2375 (_bfd_noarchive_write_armap): New functions.
2376 * archures.c (_bfd_nowrite_set_arch_mach): New function.
2377 * coff-alpha.c (alpha_ecoff_swap_coff_aux_in),
2378 (alpha_ecoff_swap_coff_sym_in, alpha_ecoff_swap_coff_lineno_in),
2379 (alpha_ecoff_swap_coff_aux_out, alpha_ecoff_swap_coff_sym_out),
2380 (alpha_ecoff_swap_coff_lineno_out),
2381 (alpha_ecoff_swap_coff_reloc_out): New functions.
2382 * coff-mips.c (mips_ecoff_swap_coff_aux_in),
2383 (mips_ecoff_swap_coff_sym_in, mips_ecoff_swap_coff_lineno_in),
2384 (mips_ecoff_swap_coff_aux_out, mips_ecoff_swap_coff_sym_out),
2385 (mips_ecoff_swap_coff_lineno_out),
2386 (mips_ecoff_swap_coff_reloc_out): New functions.
2387 * coffcode.h (coff_set_alignment_hook): Replace define with
2389 (symname_in_debug_hook): Likewise.
2390 * ecoff.c (_bfd_ecoff_set_alignment_hook): New function.
2391 * elfxx-target.h (elf_backend_allow_non_load_phdr): Default to 0.
2392 * elf.c (assign_file_positions_except_relocs): Test
2393 elf_backend_allow_non_load_phdr for NULL.
2394 * elflink.c (_bfd_elf_omit_section_dynsym_default): Rename from
2395 _bfd_elf_link_omit_section_dynsym. Update uses.
2396 (_bfd_elf_omit_section_dynsym_all): New function.
2397 * elf-bfd.h (_bfd_elf_link_omit_section_dynsym): Delete.
2398 (_bfd_elf_omit_section_dynsym_default): Declare.
2399 (_bfd_elf_omit_section_dynsym_all): Declare.
2400 * linker.c (_bfd_nolink_sizeof_headers, _bfd_nolink_bfd_relax_section),
2401 (_bfd_nolink_bfd_get_relocated_section_contents),
2402 (_bfd_nolink_bfd_lookup_section_flags),
2403 (_bfd_nolink_bfd_is_group_section, _bfd_nolink_bfd_discard_group),
2404 (_bfd_nolink_bfd_link_hash_table_create),
2405 (_bfd_nolink_bfd_link_just_syms),
2406 (_bfd_nolink_bfd_copy_link_hash_symbol_type),
2407 (_bfd_nolink_bfd_link_split_section),
2408 (_bfd_nolink_section_already_linked),
2409 (_bfd_nolink_bfd_define_common_symbol),
2410 (_bfd_nolink_bfd_define_start_stop): New functions.
2411 * reloc.c (_bfd_norelocs_bfd_reloc_type_lookup),
2412 (_bfd_norelocs_bfd_reloc_name_lookup),
2413 (_bfd_nodynamic_canonicalize_dynamic_reloc): New functions.
2414 * section.c (_bfd_nowrite_set_section_contents): New function.
2415 * syms.c (_bfd_nosymbols_canonicalize_symtab),
2416 (_bfd_nosymbols_print_symbol, _bfd_nosymbols_get_symbol_info),
2417 (_bfd_nosymbols_get_symbol_version_string),
2418 (_bfd_nosymbols_bfd_is_local_label_name),
2419 (_bfd_nosymbols_get_lineno, _bfd_nosymbols_find_nearest_line),
2420 (_bfd_nosymbols_find_line, _bfd_nosymbols_find_inliner_info),
2421 (_bfd_nosymbols_bfd_make_debug_symbol),
2422 ( _bfd_nosymbols_read_minisymbols),
2423 ( _bfd_nosymbols_minisymbol_to_symbol),
2424 (_bfd_nodynamic_get_synthetic_symtab): New functions.
2425 * libbfd-in.h: Declare new functions. Update existing defines,
2427 * aix386-core.c: Update to use new hooks. Formatting.
2428 * aout-adobe.c: Likewise.
2429 * aout-arm.c: Likewise.
2430 * aout-target.h: Likewise.
2431 * aout-tic30.c: Likewise.
2432 * aoutf1.h: Likewise.
2433 * binary.c: Likewise.
2435 * cisco-core.c: Likewise.
2436 * coff-alpha.c: Likewise.
2437 * coff-i386.c: Likewise.
2438 * coff-i860.c: Likewise.
2439 * coff-i960.c: Likewise.
2440 * coff-ia64.c: Likewise.
2441 * coff-mips.c: Likewise.
2442 * coff-ppc.c: Likewise.
2443 * coff-rs6000.c: Likewise.
2444 * coff-sh.c: Likewise.
2445 * coff-tic30.c: Likewise.
2446 * coff-tic54x.c: Likewise.
2447 * coff-x86_64.c: Likewise.
2448 * coff64-rs6000.c: Likewise.
2449 * coffcode.h: Likewise.
2450 * elf-m10300.c: Likewise.
2451 * elf32-cr16.c: Likewise.
2452 * elf32-lm32.c: Likewise.
2453 * elf32-m32r.c: Likewise.
2454 * elf32-metag.c: Likewise.
2455 * elf32-score.c: Likewise.
2456 * elf32-score7.c: Likewise.
2457 * elf32-tilepro.c: Likewise.
2458 * elf32-xstormy16.c: Likewise.
2459 * elf32-xtensa.c: Likewise.
2460 * elf64-alpha.c: Likewise.
2461 * elf64-hppa.c: Likewise.
2462 * elf64-ia64-vms.c: Likewise.
2463 * elf64-mmix.c: Likewise.
2464 * elf64-sh64.c: Likewise.
2465 * elfnn-ia64.c: Likewise.
2466 * elfxx-sparc.c: Likewise.
2467 * elfxx-target.h: Likewise.
2468 * elfxx-tilegx.c: Likewise.
2469 * elfxx-x86.h: Likewise.
2470 * hp300hpux.c: Likewise.
2471 * hppabsd-core.c: Likewise.
2472 * hpux-core.c: Likewise.
2473 * i386msdos.c: Likewise.
2474 * i386os9k.c: Likewise.
2477 * irix-core.c: Likewise.
2478 * libaout.h: Likewise.
2479 * libecoff.h: Likewise.
2480 * mach-o-target.c: Likewise.
2481 * mach-o.c: Likewise.
2482 * mipsbsd.c: Likewise.
2484 * netbsd-core.c: Likewise.
2485 * nlm-target.h: Likewise.
2486 * oasys.c: Likewise.
2487 * osf-core.c: Likewise.
2488 * pdp11.c: Likewise.
2489 * pe-mips.c: Likewise.
2490 * pe-x86_64.c: Likewise.
2492 * plugin.c: Likewise.
2493 * ppcboot.c: Likewise.
2494 * ptrace-core.c: Likewise.
2495 * sco5-core.c: Likewise.
2497 * sparclynx.c: Likewise.
2499 * tekhex.c: Likewise.
2500 * trad-core.c: Likewise.
2501 * verilog.c: Likewise.
2502 * versados.c: Likewise.
2503 * vms-alpha.c: Likewise.
2504 * vms-lib.c: Likewise.
2505 * wasm-module.c: Likewise.
2507 * libbfd.h: Regenerate.
2509 2018-02-15 Jim Wilson <jimw@sifive.com>
2511 * elfnn-riscv.c (_bfd_riscv_relax_section): Ifdef out check to ignore
2512 symbols whose section address is zero.
2514 * elfnn-riscv.c (riscv_elf_relocate_section): Use bfd_reloc_dangerous
2515 when pcrel_lo reloc has an addend. Use reloc_dangerous callback for
2516 bfd_reloc_dangerous. Use einfo instead of warning callback for errors.
2517 Add %X%P to error messages.
2519 2018-02-15 Eric Botcazou <ebotcazou@adacore.com>
2522 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
2523 Pass FALSE instead of TRUE as 'create' argument to bfd_link_hash_lookup
2524 and assert that the result of the call is not NULL.
2526 2018-02-14 Nick Clifton <nickc@redhat.com>
2529 Revert previous delta. Add extra casts to avoid compile time
2531 * libbfd-in.h (_bfd_generic_bfd_copy_private_bfd_data): Add extra
2532 cast to avoid warning from gcc v8 compiler.
2533 (_bfd_generic_bfd_merge_private_bfd_data): Likewise.
2534 (_bfd_generic_bfd_set_private_flags): Likewise.
2535 (_bfd_generic_bfd_copy_private_section_data): Likewise.
2536 (_bfd_generic_bfd_copy_private_symbol_data): Likewise.
2537 (_bfd_generic_bfd_copy_private_header_data): Likewise.
2538 (_bfd_generic_bfd_print_private_bfd_data): Likewise.
2539 (_bfd_noarchive_construct_extended_name_table): Likewise.
2540 (_bfd_noarchive_truncate_arname): Likewise.
2541 (_bfd_noarchive_write_ar_hdr): Likewise.
2542 (_bfd_noarchive_get_elt_at_index): Likewise.
2543 (_bfd_nosymbols_canonicalize_symtab): Likewise.
2544 (_bfd_nosymbols_print_symbol): Likewise.
2545 (_bfd_nosymbols_get_symbol_info): Likewise.
2546 (_bfd_nosymbols_get_symbol_version_string): Likewise.
2547 (_bfd_nosymbols_bfd_is_local_label_name): Likewise.
2548 (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise.
2549 (_bfd_nosymbols_get_lineno): Likewise.
2550 (_bfd_nosymbols_find_nearest_line): Likewise.
2551 (_bfd_nosymbols_find_line): Likewise.
2552 (_bfd_nosymbols_find_inliner_info): Likewise.
2553 (_bfd_nosymbols_bfd_make_debug_symbol): Likewise.
2554 (_bfd_nosymbols_read_minisymbols): Likewise.
2555 (_bfd_nosymbols_minisymbol_to_symbol): Likewise.
2556 (_bfd_norelocs_bfd_reloc_type_lookup): Likewise.
2557 (_bfd_norelocs_bfd_reloc_name_lookup): Likewise.
2558 (_bfd_nowrite_set_arch_mach): Likewise.
2559 (_bfd_nowrite_set_section_contents): Likewise.
2560 (_bfd_nolink_sizeof_headers): Likewise.
2561 (_bfd_nolink_bfd_get_relocated_section_contents): Likewise.
2562 (_bfd_nolink_bfd_relax_section): Likewise.
2563 (_bfd_nolink_bfd_gc_sections): Likewise.
2564 (_bfd_nolink_bfd_lookup_section_flags): Likewise.
2565 (_bfd_nolink_bfd_merge_sections): Likewise.
2566 (_bfd_nolink_bfd_is_group_section): Likewise.
2567 (_bfd_nolink_bfd_discard_group): Likewise.
2568 (_bfd_nolink_bfd_link_hash_table_create): Likewise.
2569 (_bfd_nolink_bfd_link_add_symbols): Likewise.
2570 (_bfd_nolink_bfd_link_just_syms): Likewise.
2571 (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise.
2572 (_bfd_nolink_bfd_final_link): Likewise.
2573 (_bfd_nolink_bfd_link_split_section): Likewise.
2574 (_bfd_nolink_section_already_linked): Likewise.
2575 (_bfd_nolink_bfd_define_common_symbol): Likewise.
2576 (_bfd_nolink_bfd_define_start_stop): Likewise.
2577 (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise.
2578 (_bfd_nodynamic_get_synthetic_symtab): Likewise.
2579 (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise.
2580 (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise.
2581 * libbfd.c (bfd_false_any): Delete.
2582 (bfd_true_any, bfd_nullvoidptr_any, bfd_0_any): Delete.
2583 (bfd_0u_any, bfd_0l_any, _bfd_n1_any, bfd_void_any): Delete.
2584 * libbfd.h (extern): Regenerate
2585 * aout-target.h (MY_bfd_is_target_special_symbol): Add extra
2586 cast to avoid warning from gcc v8 compiler.
2587 * aout-tic30.c (tic30_aout_set_arch_mach): Likewise.
2588 * binary.c (binary_get_symbol_info): Likewise.
2589 * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
2590 * coff-mips.c (mips_ecoff_backend_data): Likewise.
2591 * coffcode.h (coff_set_alignment_hook): Likewise.
2592 (symname_in_debug_hook): Likewise.
2593 (bfd_coff_backend_data bigobj_swap_table): Likewise.
2594 * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise.
2595 * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise.
2596 * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise.
2597 * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise.
2598 * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise.
2599 * elf32-score.c (elf_backend_omit_section_dynsym): Likewise.
2600 * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise.
2601 * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise.
2602 * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise.
2603 * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise.
2604 * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise.
2605 * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise.
2606 * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise.
2607 * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise.
2608 * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise.
2609 * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise.
2610 (bfd_elfNN_bfd_make_debug_symbol): Likewise.
2611 (bfd_elfNN_bfd_merge_private_bfd_data): Likewise.
2612 (bfd_elfNN_bfd_set_private_flags): Likewise.
2613 (bfd_elfNN_bfd_is_target_special_symbol): Likewise.
2614 (elf_backend_init_index_section): Likewise.
2615 (elf_backend_allow_non_load_phdr): Likewise.
2616 * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise.
2617 * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise.
2618 * ieee.c (ieee_construct_extended_name_table): Likewise.
2619 (ieee_write_armap): Likewise.
2620 (ieee_write_ar_hdr): Likewise.
2621 (ieee_bfd_is_target_special_symbol): Likewise.
2622 * ihex.c (ihex_canonicalize_symtab): Likewise.
2623 (ihex_bfd_is_target_special_symbol): Likewise.
2624 * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise.
2625 * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise.
2626 (_bfd_ecoff_set_alignment_hook): Likewise.
2627 * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise.
2628 * mmo.c (mmo_bfd_is_target_special_symbol): Likewise.
2629 * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise.
2630 * oasys.c (oasys_construct_extended_name_table): Likewise.
2631 (oasys_write_armap): Likewise.
2632 (oasys_write_ar_hdr): Likewise.
2633 (oasys_bfd_is_target_special_symbol): Likewise.
2634 * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise.
2635 * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise.
2636 * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise.
2637 * som.c (som_bfd_is_target_special_symbol): Likewise.
2638 * srec.c (srec_bfd_is_target_special_symbol): Likewise.
2639 * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise.
2640 * verilog.c (verilog_bfd_is_target_special_symbol): Likewise.
2641 * versados.c (versados_bfd_is_target_special_symbol): Likewise.
2642 (versados_bfd_reloc_name_lookup): Likewise.
2643 * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise.
2644 (vms_bfd_define_start_stop): Likewise.
2645 (alpha_vms_bfd_is_target_special_symbol): Likewise.
2646 * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise.
2647 * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise.
2649 2018-02-14 H.J. Lu <hongjiu.lu@intel.com>
2652 * elf32-i386.c (elf_i386_check_relocs): Pass FALSE for non
2653 PC-relative PLT to NEED_DYNAMIC_RELOCATION_P.
2654 * elf64-x86-64.c (elf_x86_64_check_relocs): Create PLT for
2655 R_X86_64_PC32 reloc against dynamic function in data section.
2656 Pass TRUE for PC-relative PLT to NEED_DYNAMIC_RELOCATION_P.
2657 (elf_x86_64_relocate_section): Use PLT for R_X86_64_PC32 reloc
2658 against dynamic function in data section.
2659 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Use PLT in PIE as
2660 function address only if pcrel_plt is true.
2661 (_bfd_x86_elf_link_hash_table_create): Set pcrel_plt.
2662 * elfxx-x86.h (NEED_DYNAMIC_RELOCATION_P): Add PCREL_PLT for
2663 PC-relative PLT. If PLT is PC-relative, don't generate dynamic
2664 PC-relative relocation against a function definition in data
2665 secton in PIE. Remove the obsolete comments.
2666 (elf_x86_link_hash_table): Add pcrel_plt.
2668 2018-02-13 H.J. Lu <hongjiu.lu@intel.com>
2670 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Check bfd_link_dll,
2671 instead of bfd_link_pic, for building shared library.
2673 2018-02-13 H.J. Lu <hongjiu.lu@intel.com>
2676 * elf64-x86-64.c (is_32bit_relative_branch): Removed.
2677 (elf_x86_64_relocate_section): Check PIC relocations in PIE.
2678 Remove is_32bit_relative_branch usage. Disallow PC32 reloc
2679 against protected function in shared object.
2681 2018-02-13 Sergei Trofimovich <slyfox@inbox.ru>
2684 * po/ru.po: Fix typo in Russian translation.
2686 2018-02-13 Maciej W. Rozycki <macro@mips.com>
2688 * wasm-module.c (wasm_scan_name_function_section): Rename
2689 `index' local variable to `idx'.
2691 2018-02-13 Nick Clifton <nickc@redhat.com>
2694 Fix compile time warnings generated by gcc version 8.
2695 * libbfd-in.h: Remove extraneous text from prototypes.
2696 Add prototypes for bfd_false_any, bfd_true_any,
2697 bfd_nullvoidptr_any, bfd_0_any, bfd_0u_any, bfd_0l_any,
2698 bfd_n1_any, bfd_void_any.
2699 (_bfd_generic_bfd_copy_private_bfd_data): Use vararg based dummy
2701 (_bfd_generic_bfd_merge_private_bfd_data): Likewise.
2702 (_bfd_generic_bfd_set_private_flags): Likewise.
2703 (_bfd_generic_bfd_copy_private_section_data): Likewise.
2704 (_bfd_generic_bfd_copy_private_symbol_data): Likewise.
2705 (_bfd_generic_bfd_copy_private_header_data): Likewise.
2706 (_bfd_generic_bfd_print_private_bfd_data): Likewise.
2707 (_bfd_noarchive_construct_extended_name_table): Likewise.
2708 (_bfd_noarchive_truncate_arname): Likewise.
2709 (_bfd_noarchive_write_ar_hdr): Likewise.
2710 (_bfd_noarchive_get_elt_at_index): Likewise.
2711 (_bfd_nosymbols_canonicalize_symtab): Likewise.
2712 (_bfd_nosymbols_print_symbol): Likewise.
2713 (_bfd_nosymbols_get_symbol_info): Likewise.
2714 (_bfd_nosymbols_get_symbol_version_string): Likewise.
2715 (_bfd_nosymbols_bfd_is_local_label_name): Likewise.
2716 (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise.
2717 (_bfd_nosymbols_get_lineno): Likewise.
2718 (_bfd_nosymbols_find_nearest_line): Likewise.
2719 (_bfd_nosymbols_find_line): Likewise.
2720 (_bfd_nosymbols_find_inliner_info): Likewise.
2721 (_bfd_nosymbols_bfd_make_debug_symbol): Likewise.
2722 (_bfd_nosymbols_read_minisymbols): Likewise.
2723 (_bfd_nosymbols_minisymbol_to_symbol): Likewise.
2724 (_bfd_norelocs_bfd_reloc_type_lookup): Likewise.
2725 (_bfd_norelocs_bfd_reloc_name_lookup): Likewise.
2726 (_bfd_nowrite_set_arch_mach): Likewise.
2727 (_bfd_nowrite_set_section_contents): Likewise.
2728 (_bfd_nolink_sizeof_headers): Likewise.
2729 (_bfd_nolink_bfd_get_relocated_section_contents): Likewise.
2730 (_bfd_nolink_bfd_relax_section): Likewise.
2731 (_bfd_nolink_bfd_gc_sections): Likewise.
2732 (_bfd_nolink_bfd_lookup_section_flags): Likewise.
2733 (_bfd_nolink_bfd_merge_sections): Likewise.
2734 (_bfd_nolink_bfd_is_group_section): Likewise.
2735 (_bfd_nolink_bfd_discard_group): Likewise.
2736 (_bfd_nolink_bfd_link_hash_table_create): Likewise.
2737 (_bfd_nolink_bfd_link_add_symbols): Likewise.
2738 (_bfd_nolink_bfd_link_just_syms): Likewise.
2739 (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise.
2740 (_bfd_nolink_bfd_final_link): Likewise.
2741 (_bfd_nolink_bfd_link_split_section): Likewise.
2742 (_bfd_nolink_section_already_linked): Likewise.
2743 (_bfd_nolink_bfd_define_common_symbol): Likewise.
2744 (_bfd_nolink_bfd_define_start_stop): Likewise.
2745 (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise.
2746 (_bfd_nodynamic_get_synthetic_symtab): Likewise.
2747 (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise.
2748 (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise.
2749 * libbfd.c (bfd_false_any): New function. Like bfd_false but
2750 accepts one or more arguments.
2751 (bfd_true_any): Likewise.
2752 (bfd_nullvoidptr_any): Likewise.
2753 (bfd_0_any): Likewise.
2754 (bfd_0u_any): Likewise.
2755 (bfd_0l_any): Likewise.
2756 (_bfd_n1_any): Likewise.
2757 (bfd_void_any): Likewise.
2758 * libbfd.h (extern): Regenerate
2759 * aout-target.h (MY_bfd_is_target_special_symbol): Use vararg
2760 based dummy function.
2761 * aout-tic30.c (tic30_aout_set_arch_mach): Likewise.
2762 * binary.c (binary_get_symbol_info): Likewise.
2763 * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
2764 * coff-mips.c (mips_ecoff_backend_data): Likewise.
2765 * coffcode.h (coff_set_alignment_hook): Likewise.
2766 (symname_in_debug_hook): Likewise.
2767 (bfd_coff_backend_data bigobj_swap_table): Likewise.
2768 * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise.
2769 * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise.
2770 * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise.
2771 * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise.
2772 * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise.
2773 * elf32-score.c (elf_backend_omit_section_dynsym): Likewise.
2774 * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise.
2775 * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise.
2776 * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise.
2777 * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise.
2778 * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise.
2779 * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise.
2780 * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise.
2781 * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise.
2782 * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise.
2783 * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise.
2784 (bfd_elfNN_bfd_make_debug_symbol): Likewise.
2785 (bfd_elfNN_bfd_merge_private_bfd_data): Likewise.
2786 (bfd_elfNN_bfd_set_private_flags): Likewise.
2787 (bfd_elfNN_bfd_is_target_special_symbol): Likewise.
2788 (elf_backend_init_index_section): Likewise.
2789 (elf_backend_allow_non_load_phdr): Likewise.
2790 * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise.
2791 * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise.
2792 * ieee.c (ieee_construct_extended_name_table): Likewise.
2793 (ieee_write_armap): Likewise.
2794 (ieee_write_ar_hdr): Likewise.
2795 (ieee_bfd_is_target_special_symbol): Likewise.
2796 * ihex.c (ihex_canonicalize_symtab): Likewise.
2797 (ihex_bfd_is_target_special_symbol): Likewise.
2798 * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise.
2799 * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise.
2800 (_bfd_ecoff_set_alignment_hook): Likewise.
2801 * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise.
2802 * mmo.c (mmo_bfd_is_target_special_symbol): Likewise.
2803 * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise.
2804 * oasys.c (oasys_construct_extended_name_table): Likewise.
2805 (oasys_write_armap): Likewise.
2806 (oasys_write_ar_hdr): Likewise.
2807 (oasys_bfd_is_target_special_symbol): Likewise.
2808 * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise.
2809 * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise.
2810 * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise.
2811 * som.c (som_bfd_is_target_special_symbol): Likewise.
2812 * srec.c (srec_bfd_is_target_special_symbol): Likewise.
2813 * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise.
2814 * verilog.c (verilog_bfd_is_target_special_symbol): Likewise.
2815 * versados.c (versados_bfd_is_target_special_symbol): Likewise.
2816 (versados_bfd_reloc_name_lookup): Likewise.
2817 * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise.
2818 (vms_bfd_define_start_stop): Likewise.
2819 (alpha_vms_bfd_is_target_special_symbol): Likewise.
2820 * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise.
2821 * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise.
2822 * elf32-arc.c (get_replace_function): Assign replacement function
2824 * elf32-i370.c (i370_noop): Update prototype.
2826 2018-02-13 Alan Modra <amodra@gmail.com>
2829 * elf.c (_bfd_elf_fixup_group_sections): Account for removed
2830 relocation sections. If size reduces to just the flag word,
2831 remove that too and mark with SEC_EXCLUDE.
2832 * elflink.c (bfd_elf_final_link): Strip empty group sections.
2834 2018-02-13 Alan Modra <amodra@gmail.com>
2837 * elf.c (assign_file_positions_for_non_load_sections): Rewrite
2840 2018-02-12 Zebediah Figura <z.figura12@gmail.com>
2842 * i386msdos.c (msdos_mkobject); New function.
2843 (msdos_object_p): New function.
2844 (i386_msdos_vec): Use msdos_object_p as the check_format
2846 * peicode.h: Rename external_PEI_DOS_hdr, DOSMAGIC, and
2847 NT_SIGNATURE to external_DOS_hdr, IMAGE_DOS_SIGNATURE, and
2849 * peXXigen.c: Likewise.
2850 * coff-ia64.c: Likewise.
2852 2018-02-12 Nick Clifton <nickc@redhat.com>
2854 * elf32-nds32.c (nds32_elf_relax_longjump3): Remove redundant
2856 * elf32-arc.c (elf_arc_relocate_section): Likewise.
2858 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
2860 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Reorder conditions.
2861 (sparc_elf_append_rela): Assert that there is enough room in section.
2862 (_bfd_sparc_elf_copy_indirect_symbol): Fix formatting.
2863 (_bfd_sparc_elf_adjust_dynamic_symbol): Minor tweak.
2864 (allocate_dynrelocs): Remove outdated comments and reorder conditions.
2865 For a symbol subject to a GOT relocation, reserve a slot in the
2866 relocation section if the symbol isn't dynamic and we are in PIC mode.
2867 (_bfd_sparc_elf_relocate_section) <R_SPARC_GOTDATA_OP>: If relocation
2868 is relaxed and a slot was reserved, generate a R_SPARC_NONE relocation.
2869 <R_SPARC_GOTDATA_OP_HIX22>: Adjust comments.
2870 <R_SPARC_PC10>: Reorder conditions. Remove always-false assertion.
2871 (_bfd_sparc_elf_finish_dynamic_symbol): Rename local_undefweak into
2872 resolved_to_zero. Do not generate a dynamic GOT relocation for an
2873 undefined weak symbol with non-default visibility. Remove superfluous
2874 'else' and fix formatting.
2876 2018-02-09 H.J. Lu <hongjiu.lu@intel.com>
2878 * elf32-i386.c (elf_i386_get_synthetic_symtab): Also handle
2880 (i386_elf32_sol2_vec): Don't declare.
2881 (elf_i386_link_setup_gnu_properties): Also handle is_solaris.
2882 Don't set need_global_offset_table.
2883 (elf_i386_solaris_arch_bed): New.
2884 (elf_backend_arch_data): Set to elf_i386_solaris_arch_bed for
2886 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Check
2887 target_os != is_nacl instead of target_os == is_normal.
2888 (x86_64_elf64_sol2_vec): Don't declare.
2889 (elf_x86_64_link_setup_gnu_properties): Check target_os !=
2890 is_nacl instead of target_os == is_normal. Don't set
2891 need_global_offset_table.
2892 (elf_x86_64_solaris_arch_bed): New.
2893 (elf_backend_arch_data): Set to elf_x86_64_solaris_arch_bed for
2895 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep
2896 _GLOBAL_OFFSET_TABLE_ for Solaris.
2897 (_bfd_x86_elf_link_setup_gnu_properties): Don't copy
2898 need_global_offset_table.
2899 * elfxx-x86.h (elf_x86_target_os): Add is_solaris.
2900 (elf_x86_link_hash_table): Remove need_global_offset_table.
2901 (elf_x86_init_table): Likewise.
2903 2018-02-08 H.J. Lu <hongjiu.lu@intel.com>
2905 * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
2907 (i386_elf32_sol2_vec): Declared.
2908 (elf_i386_link_setup_gnu_properties): Set
2909 need_global_offset_table with info->output_bfd->xvec.
2910 * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
2912 (x86_64_elf64_sol2_vec): Declared.
2913 (elf_x86_64_link_setup_gnu_properties): Set
2914 need_global_offset_table with info->output_bfd->xvec.
2916 2018-02-08 H.J. Lu <hongjiu.lu@intel.com>
2918 * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
2920 (elf_i386_link_setup_gnu_properties): Set need_global_offset_table
2922 * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
2924 (elf_x86_64_link_setup_gnu_properties): Set
2925 need_global_offset_table for Solaris.
2926 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep the
2927 unused _GLOBAL_OFFSET_TABLE_ for Solaris.
2928 (_bfd_x86_elf_link_setup_gnu_properties): Copy
2929 need_global_offset_table.
2930 * elfxx-x86.h (elf_x86_link_hash_table): Add
2931 need_global_offset_table.
2932 (elf_x86_init_table): Likewise.
2934 2018-02-08 Jim Wilson <jimw@sifive.com>
2936 * elfnn-riscv.c (riscv_elf_relocate_section): Add comment for previous
2939 2018-02-08 Nick Clifton <nickc@redhat.com>
2942 * elf.c (elf_parse_notes): Reject notes with excessuively large
2945 2018-02-07 Alan Modra <amodra@gmail.com>
2947 Revert 2018-01-17 Alan Modra <amodra@gmail.com>
2948 * elf32-ppc.c: Remove speculation barrier support.
2949 * elf32-ppc.h: Likewise.
2950 * elf64-ppc.c: Likewise.
2951 * elf64-ppc.h: Likewise.
2953 2018-02-06 Jim Wilson <jimw@sifive.com>
2955 * elfnn-riscv.c (riscv_elf_relocate_section): Return TRUE if used
2956 callback to report an error.
2958 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
2961 * elfxx-sparc.c (sparc_elf_tls_transition): Turn call to bfd_link_pic
2962 into call to !bfd_link_executable and tidy up.
2963 (_bfd_sparc_elf_check_relocs): Fix formatting and tidy up.
2964 <R_SPARC_TLS_LE_HIX22>: Turn call to bfd_link_pic into call to
2965 !bfd_link_executable.
2966 <R_SPARC_TLS_IE_HI22>: Likewise.
2967 <GOT relocations>: Remove useless code, tidy and merge related blocks.
2968 <R_SPARC_TLS_GD_CALL>: Turn call to bfd_link_pic into call to
2969 !bfd_link_executable.
2970 <R_SPARC_WPLT30>: Tidy up.
2971 (_bfd_sparc_elf_gc_mark_hook): Turn call to bfd_link_pic into call to
2972 !bfd_link_executable.
2973 (allocate_dynrelocs): Likewise.
2974 (_bfd_sparc_elf_relocate_section): Fix formatting and tidy up.
2975 <R_SPARC_TLS_GD_HI22>: Merge into...
2976 <R_SPARC_TLS_GD_LO10>: ...this. Adjust 4th argument in call to
2977 sparc_elf_tls_transition and remove redundant code.
2978 <R_SPARC_TLS_LDM_HI22>: Turn call to bfd_link_pic into call to
2979 !bfd_link_executable.
2980 <R_SPARC_TLS_LDO_HIX22>: Likewise.
2981 <R_SPARC_TLS_LE_HIX22>: Likewise. Tidy up.
2982 <R_SPARC_TLS_LDM_CALL>: Likewise.
2983 <R_SPARC_TLS_GD_CALL>: Likewise. Tidy up.
2984 <R_SPARC_TLS_GD_ADD>: Likewise.
2985 <R_SPARC_TLS_LDM_ADD>: Likewise.
2986 <R_SPARC_TLS_LDO_ADD>: Likewise.
2987 <R_SPARC_TLS_IE_LD>: Likewise.
2989 2018-02-06 Miloš Stojanović <milos.stojanovic@rt-rk.com>
2992 * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): If the dwarf
2993 functions failed to find the function name, try the generic elf
2994 find function instead.
2996 2018-02-06 Sergio Durigan Junior <sergiodj@redhat.com>
2998 * coff-rs6000.c (xcoff_write_archive_contents_old): Use
2999 'memcpy' instead of 'strncpy' when writing the magic number.
3001 2018-02-06 Nick Clifton <nickc@redhat.com>
3004 * opncls.c (bfd_get_debug_link_info_1): Check the size of the
3005 section before attempting to read it in.
3006 (bfd_get_alt_debug_link_info): Likewise.
3008 2018-02-06 Paul Carroll <pcarroll@codesourcery.com>
3010 * bfd/dwarf2.c (find_abstract_name): Modified to return file and
3011 line information in addition to name, if they can be found.
3013 2018-02-05 Renlin Li <renlin.li@arm.com>
3016 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Relax the
3017 R_AARCH64_ABS32 and R_AARCH64_ABS16 for absolute symbol. Apply the
3018 check for writeable section as well.
3020 2018-02-05 H.J. Lu <hongjiu.lu@intel.com>
3023 * elf32-i386.c (elf_i386_check_relocs): Set got_referenced if
3024 _GLOBAL_OFFSET_TABLE_ is referenced or GOT is needed to resolve
3025 undefined weak symbol to 0.
3026 * elf64-x86-64.c (elf_x86_64_check_relocs): Set got_referenced
3027 if _GLOBAL_OFFSET_TABLE_ is referenced.
3028 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Check
3029 got_referenced instead of ref_regular_nonweak. Remove the
3030 unused _GLOBAL_OFFSET_TABLE_ from symbol table.
3031 * elfxx-x86.h (elf_x86_link_hash_table): Add got_referenced.
3033 2018-02-05 Maciej W. Rozycki <macro@mips.com>
3035 * elfnn-riscv.c (_bfd_riscv_relax_pc): Use `memset' to
3036 initialize `hi_reloc'.
3038 2018-02-05 Maciej W. Rozycki <macro@mips.com>
3040 * elfxx-mips.c (_bfd_mips_elf_section_processing): For
3041 SHT_MIPS_REGINFO sections don't assert the correct size and
3042 report an error instead.
3044 2018-02-05 Maciej W. Rozycki <macro@mips.com>
3046 * elf.c (_bfd_elf_write_object_contents): Propagate a failure
3047 status from `->elf_backend_section_processing'.
3049 2018-02-02 Jim Wilson <jimw@sifive.com>
3052 * elfnn-riscv.c (riscv_relax_delete_bytes): New parameter link_info.
3053 If link_info->wrap_hash, check for a duplicate symbol and ignore.
3054 (_bfd_riscv_relax_call, bfd_riscv_relax_lui, _bfd_riscv_relax_tls_le):
3055 Pass new argument to riscv_relax_delete_bytes.
3056 (_bfd_riscv_relax_align, _bfd_riscv_relax_delete): Likewise. Remove
3057 ATTRIBUTE_UNUSED from link_info parameter.
3059 2018-02-02 Alan Modra <amodra@gmail.com>
3061 * elf64-ppc.c (ppc64_elf_relocate_section): Don't relocate nops
3062 emitted for toc sequence optimization. Set and use "howto" later.
3064 2018-02-01 Simon Marchi <simon.marchi@ericsson.com>
3066 * elf64-ppc.c (ppc64_elf_archive_symbol_lookup): Avoid pointer
3067 arithmetic on NULL pointer.
3068 * elflink.c (_bfd_elf_archive_symbol_lookup,
3069 elf_link_add_archive_symbols): Likewise.
3071 2018-01-31 Michael Matz <matz@suse.de>
3073 * elflink.c (bfd_elf_define_start_stop): Fix check of
3076 2018-01-31 H.J. Lu <hongjiu.lu@intel.com>
3079 * elflink.c (bfd_elf_define_start_stop): Check if __start and
3080 __stop symbols are referenced by shared objects.
3082 2018-01-30 Alan Modra <amodra@gmail.com>
3085 * elf.c (_bfd_elf_map_sections_to_segments): Don't start a new
3086 segment when demand paged with lma on the same page. Test this
3087 before load/non-load, executable/non-executable,
3088 writable/non-writable tests and simplify. Delete bogus relro
3089 condition in writable/non-writable test. Delete outdated
3090 comment. Formatting.
3092 2018-01-30 Alan Modra <amodra@gmail.com>
3094 * elflink.c (bfd_elf_define_start_stop): Make __start and __stop
3097 2018-01-29 Alan Modra <amodra@gmail.com>
3100 * coffgen.c (coff_pointerize_aux): Ensure auxent tagndx is in
3101 range before converting to a symbol table pointer.
3103 2018-01-27 Nick Clifton <nickc@redhat.com>
3105 * po/ru.po: Updated Russian translation.
3107 2018-01-26 Alan Modra <amodra@gmail.com>
3109 * elflink.c (bfd_elf_define_start_stop): Override symbols when
3110 they are defined dynamically.
3112 2018-01-26 Alan Modra <amodra@gmail.com>
3114 * elf64-ppc.c (ppc64_elf_size_stubs): Iterate sizing when
3115 .branch_lt changes size.
3117 2018-01-25 Alan Modra <amodra@gmail.com>
3120 * elfcode.h (elf_object_p): Avoid integer overflow.
3122 2018-01-25 Eric Botcazou <ebotcazou@adacore.com>
3125 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
3126 Do a mere lookup of the __tls_get_addr symbol instead of adding it.
3129 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
3132 * elfxx-sparc.c (sparc_elf_tls_transition): Replace
3133 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
3134 bfd_link_executable for TLS check.
3135 (_bfd_sparc_elf_check_relocs): Likewise.
3136 (allocate_dynrelocs): Likewise.
3137 (_bfd_sparc_elf_relocate_section): Likewise.
3139 2018-01-24 Renlin Li <renlin.li@arm.com>
3141 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Add support for
3142 BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
3143 BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
3144 BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
3145 BFD_RELOC_AARCH64_MOVW_PREL_G3.
3146 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
3147 (_bfd_aarch64_elf_resolve_relocation): Likewise.
3149 2018-01-24 Renlin Li <renlin.li@arm.com>
3151 * reloc.c: Add BFD_RELOC_AARCH64_MOVW_PREL_G0,
3152 BFD_RELOC_AARCH64_MOVW_PREL_G0_NC, BFD_RELOC_AARCH64_MOVW_PREL_G1,
3153 BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, BFD_RELOC_AARCH64_MOVW_PREL_G2,
3154 BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, BFD_RELOC_AARCH64_MOVW_PREL_G3.
3155 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Add entries for
3156 BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
3157 BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
3158 BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
3159 BFD_RELOC_AARCH64_MOVW_PREL_G3.
3160 * bfd-in2.h: Regenerate.
3161 * libbfd.h: Regenerate.
3163 2018-01-23 Maciej W. Rozycki <macro@mips.com>
3165 * elfxx-mips.c (_bfd_mips_elf_final_link): Update a stale
3166 `mips_elf32_section_processing' comment reference.
3168 2018-01-20 H.J. Lu <hongjiu.lu@intel.com>
3171 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Check the
3172 versioned __tls_get_addr symbol.
3174 2018-01-19 Nick Clifton <nickc@redhat.com>
3176 * po/fr.po: Updated French translation.
3178 2018-01-18 Alan Modra <amodra@gmail.com>
3180 * elf32-ppc.c (ppc_elf_create_glink): Correct alignment of .glink.
3181 * elf64-ppc.c (ppc64_elf_size_stubs): Handle negative plt_stub_align.
3182 (ppc64_elf_build_stubs): Likewise.
3184 2018-01-17 Nick Clifton <nickc@redhat.com>
3186 * po/ru.po: Updated Russian translation.
3187 * po/uk/po: Updated Ukranian translation.
3189 2018-01-17 Alan Modra <amodra@gmail.com>
3191 * elf64-ppc.c (ppc64_elf_build_stubs): Silence gcc warning.
3193 2018-01-17 Alan Modra <amodra@gmail.com>
3195 * elf32-ppc.c (GLINK_ENTRY_SIZE): Handle speculation barrier.
3196 (CRSETEQ, BEQCTRM): Define.
3197 (is_nonpic_glink_stub): Don't check bctr.
3198 (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
3199 (ppc_elf_relax_section): Size speculation barrier.
3200 (output_bctr): New function.
3201 (write_glink_stub): Use output_bctr.
3202 (ppc_elf_relocate_section): Use output_bctr for long branch stub.
3203 (ppc_elf_finish_dynamic_symbol): Likewise.
3204 (ppc_elf_finish_dynamic_sections): Use output_bctr.
3205 * elf32-ppc.h (struct ppc_elf_params): Add speculate_indirect_jumps.
3206 * elf64-ppc.c (CRSETEQ, BEQCTRM, BEQCTRLM): Define.
3207 (GLINK_PLTRESOLVE_SIZE): Size speculation barrier.
3208 (size_global_entry_stubs): Handle speculation barrier sizing.
3209 (plt_stub_size): Likewise.
3210 (output_bctr): New function.
3211 (build_plt_stub, build_tls_get_addr_stub): Output speculation
3213 (ppc_build_one_stub): Likewise for ppc_stub_plt_branch.
3214 (ppc_size_one_stub): Size speculation barrier in ppc_stub_plt_branch.
3215 (build_global_entry_stubs): Output speculation barrier.
3216 (ppc64_elf_build_stubs): Likewise in __glink_PLTresolve stub.
3217 * elf64-ppc.h (struct ppc64_elf_params): Add speculate_indirect_jumps.
3219 2018-01-17 Alan Modra <amodra@gmail.com>
3221 * elf32-ppc.c (GLINK_ENTRY_SIZE): Add parameters, handle
3222 __tls_get_addr_opt, and alignment sizing.
3223 (TLS_GET_ADDR_GLINK_SIZE): Delete.
3224 (is_nonpic_glink_stub): Don't use GLINK_ENTRY_SIZE.
3225 (ppc_elf_get_synthetic_symtab): Recognize stubs spaced at 4, 6,
3227 (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
3228 (allocate_dynrelocs): Use new GLINK_ENTRY_SIZE.
3229 (ppc_elf_size_dynamic_sections): Likewise. Size branch table
3231 (write_glink_stub): Handle __tls_get_addr_opt stub.
3232 Pad out to size given by GLINK_ENTRY_SIZE.
3233 (ppc_elf_relocate_section): Adjust write_glink_stub call.
3234 (ppc_elf_finish_dynamic_symbol): Likewise.
3235 (ppc_elf_finish_dynamic_sections): Write PLTresolve without using
3236 insn array since so many need rewriting.
3237 * elf32-ppc.h (struct ppc_elf_params): Add plt_stub_align.
3238 * elf64-ppc.c (GLINK_PLTRESOLVE_SIZE): Rename from
3239 GLINK_CALL_STUB_SIZE. Add htab param and evaluate to size without
3240 nops. Adjust all uses.
3241 (ppc64_elf_get_synthetic_symtab): Don't use GLINK_CALL_STUB_SIZE
3242 in glink_vma calculation.
3243 (struct ppc_link_hash_table): Add global_entry section pointer.
3244 (create_linkage_sections): Create separate section for global
3246 (PPC_LO, PPC_HI, PPC_HA): Move earlier.
3247 (size_global_entry_stubs): Handle sizing for aligned stubs.
3248 (ppc64_elf_size_dynamic_sections): Handle global_entry alloc,
3249 and don't stash end of glink branch table in rawsize.
3250 (ppc_build_one_stub): Rewrite stub size calculations.
3251 (build_global_entry_stubs): Use new section.
3252 (ppc64_elf_build_stubs): Don't pad __glink_PLTresolve with nops.
3253 Build lazy link stubs out to end of section. Build global entry
3254 stubs in new section.
3256 2018-01-15 Nick Clifton <nickc@redhat.com>
3258 * po/uk.po: Updated Ukranian translation.
3260 2018-01-13 Nick Clifton <nickc@redhat.com>
3262 * po/bfd.pot: Regenerated.
3264 2018-01-13 Nick Clifton <nickc@redhat.com>
3266 * version.m4: Bump version to 2.30.51
3267 * configure: Regenerate.
3269 2018-01-13 Nick Clifton <nickc@redhat.com>
3271 2.30 branch created.
3273 2018-01-12 Jens Widell <jl@opera.com>
3275 * elf.c (setup_group): Optimize search for group by remembering
3276 last found group and restarting search at that index.
3277 * elf-bfd.h (struct elf_obj_tdata): Add group_search_offset field.
3279 2018-01-12 Gunther Nikl <gnikl@users.sourceforge.net>
3281 * aoutx.h (aout_link_check_ar_symbols): Remove default and handle
3282 bfd_link_common_skip_none in switch.
3284 2018-01-12 Alan Modra <amodra@gmail.com>
3287 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Ignore dynamic
3288 references on forced local symbols.
3290 2018-01-12 Vlad Ivanov <vlad@ivanov.email>
3292 * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when
3293 .reginfo section has wrong size.
3295 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
3298 * elf.c (_bfd_elf_map_sections_to_segments): When generating
3299 separate code and read-only data LOAD segments, create a new
3300 LOAD segment if the previous section contains text and the
3301 current section doesn't or vice versa. Don't put a writable
3302 section in a read-only segment if there is a RELRO segment.
3304 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
3307 * elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Ignore dynamic
3308 references on forced local symbols.
3310 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
3313 * elflink.c (bfd_elf_gc_sections): Keep all PREINIT_ARRAY,
3314 INIT_ARRAY as well as FINI_ARRAY sections for ld -r --gc-section.
3316 2018-01-09 Kuan-Lin Chen <kuanlinchentw@gmail.com>
3319 * elf32-nds32.c (nds32_elf_relax_loadstore): Fix a typographical error.
3321 2018-01-03 John Baldwin <jhb@FreeBSD.org>
3323 * elf.c (elfcore_grok_freebsd_note): Handle
3324 NT_FREEBSD_PROCSTAT_PROC, NT_FREEBSD_PROCSTAT_FILES, and
3325 NT_FREEBSD_PROCSTAT_VMMAP.
3327 2018-01-03 Alan Modra <amodra@gmail.com>
3329 Update year range in copyright notice of all files.
3331 For older changes see ChangeLog-2017
3333 Copyright (C) 2018 Free Software Foundation, Inc.
3335 Copying and distribution of this file, with or without modification,
3336 are permitted in any medium without royalty provided the copyright
3337 notice and this notice are preserved.
3343 version-control: never