1 2018-07-02 Maciej W. Rozycki <macro@mips.com>
3 * elf64-mips.c (micromips_elf64_howto_table_rel): Add
4 R_MICROMIPS_HI0_LO16, R_MICROMIPS_TLS_GD, R_MICROMIPS_TLS_LDM,
5 R_MICROMIPS_TLS_DTPREL_HI16, R_MICROMIPS_TLS_DTPREL_LO16,
6 R_MICROMIPS_TLS_GOTTPREL, R_MICROMIPS_TLS_TPREL_HI16,
7 R_MICROMIPS_TLS_TPREL_LO16, R_MICROMIPS_GPREL7_S2 and
8 R_MICROMIPS_PC23_S2 relocation entries.
9 (micromips_elf64_howto_table_rela): Likewise.
10 (micromips_reloc_map): Likewise.
11 * elfn32-mips.c (elf_micromips_howto_table_rel): Likewise.
12 (elf_micromips_howto_table_rela): Likewise.
13 (micromips_reloc_map): Likewise.
15 2018-07-02 H.J. Lu <hongjiu.lu@intel.com>
18 * elf64-x86-64.c (elf_x86_64_relocate_section): Clear the
19 R_X86_64_converted_reloc_bit bit.
21 2018-07-02 Jeff Muizelaar <jrmuizel@gmail.com>
22 Tom Tromey <tom@tromey.com>
26 * mach-o.c (bfd_mach_o_fat_close_and_cleanup): New function.
27 (bfd_mach_o_close_and_cleanup): Redefine.
28 * archive.c (_bfd_unlink_from_archive_parent): New function,
30 (_bfd_archive_close_and_cleanup): ..here.
31 (bfd_generic_archive_p): Do not clear archive's format.
32 * libbfd-in.h (_bfd_unlink_from_archive_parent): Declare.
33 * libbfd.h: Regenerate.
35 2018-07-02 Thomas Preud'homme <thomas.preudhomme@arm.com>
37 * archures.c (bfd_mach_arm_5TEJ, bfd_mach_arm_6, bfd_mach_arm_6KZ,
38 bfd_mach_arm_6T2, bfd_mach_arm_6K, bfd_mach_arm_7, bfd_mach_arm_6M,
39 bfd_mach_arm_6SM, bfd_mach_arm_7EM, bfd_mach_arm_8, bfd_mach_arm_8R,
40 bfd_mach_arm_8M_BASE, bfd_mach_arm_8M_MAIN): Define.
41 * bfd-in2.h: Regenerate.
42 * cpu-arm.c (arch_info_struct): Add entries for above new
44 * elf32-arm.c (bfd_arm_get_mach_from_attributes): Add Tag_CPU_arch to
45 bfd_mach_arm mapping logic for pre Armv4 and Armv5TEJ and later
46 architectures. Force assert failure for any new Tag_CPU_arch value.
48 2018-07-02 Thomas Preud'homme <thomas.preudhomme@arm.com>
50 * doc/bfdint.texi: Use command-line consistently when used in a
52 * doc/bfdsumm.texi: Likewise.
54 2018-06-29 Maciej W. Rozycki <macro@mips.com>
56 * elfxx-mips.c (allocate_dynrelocs): Remove extraneous symbol
57 visibility check made for undefined weak symbols.
59 2018-06-26 Nick Clifton <nickc@redhat.com>
61 * po/uk.po: Updated Ukranian translation.
63 2018-06-25 Nick Clifton <nickc@redhat.com>
65 * elfnn-aarch64.c (_bfd_aarch64_erratum_835769_stub_name): Check
66 for malloc returning NULL.
67 (_bfd_aarch64_erratum_843419_fixup): Check for
68 _bfd_aarch64_erratum_835769_stub_name returning NULL.
70 2018-06-24 Nick Clifton <nickc@redhat.com>
72 * po/bfd.pot: Regenerate.
74 2018-06-24 Nick Clifton <nickc@redhat.com>
76 * version.m4: Update version string to 2.31.51.
77 * configure: Regenerate.
79 2018-06-24 Nick Clifton <nickc@redhat.com>
83 2018-06-21 Maciej W. Rozycki <macro@mips.com>
85 * elfxx-mips.c (_bfd_mips_elf_compact_eh_encoding)
86 (_bfd_mips_elf_cant_unwind_opcode): Correct formatting.
88 2018-06-21 Maciej W. Rozycki <macro@mips.com>
90 * elfxx-mips.c (_bfd_mips_post_process_headers): Keep
91 EI_ABIVERSION setting together.
93 2018-06-21 Maciej W. Rozycki <macro@mips.com>
95 * elfxx-mips.c (MIPS_LIBC_ABI_DEFAULT, MIPS_LIBC_ABI_MIPS_PLT)
96 (MIPS_LIBC_ABI_UNIQUE, MIPS_LIBC_ABI_MIPS_O32_FP64)
97 (MIPS_LIBC_ABI_MAX): New enumeration constants.
98 (_bfd_mips_post_process_headers): Use them in place of magic
101 2018-06-21 Jim Wilson <jimw@sifive.com>
103 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Update comment.
104 Use SYMBOL_REFERENCES_LOCAL. Add asserts for h->got.offset.
106 2018-06-21 Alan Modra <amodra@gmail.com>
108 * doc/Makefile.am (AUTOMAKE_OPTIONS): Add "foreign".
109 * doc/Makefile.in: Regenerate.
111 2018-06-20 Renlin Li <renlin.li@arm.com>
113 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Use PG_OFFSET
114 to resolve BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC,
115 BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC,
116 BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC,
117 BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC,
118 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
119 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
120 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
121 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
123 2018-06-20 Nick Clifton <nickc@redhat.com>
126 * opncls.c (get_build_id): Check for a negative or excessive data
127 size in the build-id note.
129 2018-06-20 Nick Clifton <nickc@redhat.com>
132 * mach-o.c (cputype): New function.
133 (cpusubtype): New function.
134 (bfd_mach_o_bfd_print_private_data): New function. Dispalys the
135 values in the MACH-O file header.
136 (bfd_mach_o_bfd_copy_private_header_data): Copy the cputype and
137 cpusubtype fields from the input bfd's mach-o header to the output
139 * mach-o-target.c (bfd_mach_o_bfd_print_private_bfd_data):
140 Redefine to bfd_mach_o_bfd_print_private_data.
141 * mach-o.h (bfd_mach_o_bfd_print_private_bfd_data): Prototype.
143 2018-06-19 Maciej W. Rozycki <macro@mips.com>
146 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Verify the
147 `.got.plt' entry referred is in range.
148 (mips_finish_exec_plt): Correct the range check for `.got.plt'
149 start. Replace the assertion used for that with a proper error
152 2018-06-19 Maciej W. Rozycki <macro@mips.com>
154 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Fix
157 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
159 * Makefile.am (AUTOMAKE_OPTIONS): Remove 1.11.
160 (INCLUDES): Rename to ...
161 (AM_CPPFLAGS): ... this.
162 * configure.ac: Remove AC_PREREQ.
163 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove 1.9, cygnus, add
164 info-in-builddir no-texinfo.tex.
165 (info_TEXINFOS): Rename bfd.texinfo to bfd.texi.
166 * doc/bfd.texinfo: Rename to ...
167 * doc/bfd.texi: ... this.
168 * Makefile.in: Re-generate.
169 * aclocal.m4: Re-generate.
170 * config.in: Re-generate.
171 * configure: Re-generate.
172 * doc/Makefile.in: Re-generate.
174 2018-06-18 Mephi <mephi42@gmail.com>
177 * mach-o-x86-64.c (x86_64_howto_table): Add entry for
178 BFD_RELOC_MACH_O_X86_64_RELOC_TLV.
179 (bfd_mach_o_x86_64_canonicalize_one_reloc): Handle the new reloc.
180 (bfd_mach_o_x86_64_swap_reloc_out): Likewise.
181 * reloc.c (BFD_RELOC_MACH_O_X86_64_TV): New entry.
182 * bfd-in2.h: Regenerate.
183 * libbfd.h: Regenerate.
185 2018-06-14 Faraz Shahbazker <Faraz.Shahbazker@mips.com>
187 * elfxx-mips.c (print_mips_ases): Add GINV extension.
189 2018-06-14 H.J. Lu <hongjiu.lu@intel.com>
192 * elf.c (_bfd_elf_get_symbol_version_string): Check if the first
193 symbol version is base version.
195 2018-06-14 Alan Modra <amodra@gmail.com>
197 * elf-bfd.h (struct elf_link_hash_table): Add "dynamic_relocs".
198 * elflink.c (_bfd_elf_init_2_index_sections): Comment fix.
199 (_bfd_elf_add_dynamic_entry): Set "dynamic_relocs".
200 (_bfd_elf_link_renumber_dynsyms): Exclude all section symbols when
201 "dynamic_relocs" is not set.
202 * elfxx-mips.c (count_section_dynsyms): Likewise.
204 2018-06-14 Alan Modra <amodra@gmail.com>
207 * bfdio.c (bfd_seek): Optimize away seeks to current position.
209 2018-06-13 Scott Egerton <scott.egerton@imgtec.com>
210 Faraz Shahbazker <Faraz.Shahbazker@mips.com>
212 * elfxx-mips.c (print_mips_ases): Add CRC.
214 2018-06-08 H.J. Lu <hongjiu.lu@intel.com>
217 * elfxx-x86.c (elf_x86_hide_linker_defined): New function.
218 (_bfd_x86_elf_link_check_relocs): Use it to hide hidden
219 __bss_start, _end and _edata in shared libraries.
221 2018-06-07 Alan Modra <amodra@gmail.com>
223 * elf32-tic6x.c (elf32_tic6x_check_relocs): Reference
224 __c6xabi_DSBT_BASE explicitly for R_C6000_SBR_* relocs.
226 2018-06-05 Alan Modra <amodra@gmail.com>
228 * bfd.c (struct bfd): Update comment on "where" usage.
229 * bfdio.c (bfd_bwrite, bfd_stat): Use and update "iovec",
230 "iostream", and "where" from containing archive file. Return
232 (bfd_bread): Similarly, and return error attempted out of
233 bounds archive element access.
234 (bfd_tell, bfd_flush): Use and update "iovec", "iostream", and
235 "where" from containing archive file.
236 (bfd_seek): Likewise. Return error on NULL iovec. Don't
237 attempt to optimize away seeks. Don't paper over errors by
239 (bfd_get_mtime): Call bfd_stat rather than iovec->bstat.
240 (bfd_get_size): Likewise.
241 (bfd_mmap): Operate on and use iovec of containing archive
242 file. Return error on NULL iovec.
243 * cache.c (bfd_cache_lookup_worker): Abort if working on
245 (cache_bread_1): Delete bfd parameter, add FILE* parameter.
246 Don't ignore zero byte reads.
247 (cache_bread): Look up FILE* in cache here. Error on NULL
249 (cache_bwrite): Rename "where" to "from".
250 (cache_bmmap): Don't handle archive elements.
251 * coffcode.h (coff_slurp_line_table): Exit early on zero
253 * bfd-in2.h: Regenerate.
255 2018-06-05 Alan Modra <amodra@gmail.com>
258 * plugin.c (bfd_plugin_open_input): Allow for possibility of
259 nested archives. Open file again for plugin.
260 (try_claim): Don't save and restore file position. Close file
262 * sysdep.h (O_BINARY): Define.
264 2018-06-04 Max Filippov <jcmvbkbc@gmail.com>
266 * elf32-xtensa.c (xtensa_read_table_entries): Make global.
267 (compute_fill_extra_space): Drop declaration. Rename function to
268 xtensa_compute_fill_extra_space.
269 (compute_ebb_actions, remove_dead_literal): Update references to
270 compute_fill_extra_space.
272 2018-06-04 Volodymyr Arbatov <arbatov@cadence.com>
274 * elf32-xtensa.c (elf32xtensa_separate_props): New global
276 (xtensa_add_names): New function.
277 (xtensa_property_section_name): Add new parameter
278 separate_sections, use it to choose property section name.
279 (xtensa_get_separate_property_section): New function.
280 (xtensa_get_property_section): Invoke
281 xtensa_get_separate_property_section to get individual property
282 section if it exists, common property section otherwise.
283 (xtensa_make_property_section): Pass elf32xtensa_separate_props
284 to xtensa_property_section_name.
286 2018-06-04 H.J. Lu <hongjiu.lu@intel.com>
289 * bfd-in.h: Include "diagnostics.h".
290 * bfd-in2.h: Regenerated.
291 * elf32-arm.c (elf32_arm_nabi_write_core_note): Use
292 DIAGNOSTIC_PUSH, DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION and
293 DIAGNOSTIC_POP to silence GCC 8.1 warnings with
294 -Wstringop-truncation.
295 * elf32-ppc.c (ppc_elf_write_core_note): Likewse.
296 * elf32-s390.c (elf_s390_write_core_note): Likewse.
297 * elf64-ppc.c (ppc64_elf_write_core_note): Likewse.
298 * elf64-s390.c (elf_s390_write_core_note): Likewse.
299 * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewse.
301 2018-06-03 Jim Wilson <jimw@sifive.com>
304 * elfnn-riscv.c (riscv_elf_relocate_section) <R_RISCV_CALL>: Check
305 for and handle an undefined weak with no PLT.
308 * elfnn-riscv.c (riscv_relax_delete_bytes): Add versioned_hidden check
309 to code that ignores duplicate symbols.
311 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
313 * version.m4: Bump version to 2.30.52
314 * configure: Regenerated.
316 2018-06-01 Alan Modra <amodra@gmail.com>
318 * bfd.c (_bfd_error_handler): Arrange for this function to be
319 declared in bfd-in2.h.
320 * libbfd-in.h (_bfd_error_handler): Don't declare.
321 * libbfd.h: Regenerate.
322 * bfd-in2.h: Regenerate.
324 2018-05-30 Amaan Cheval <amaan.cheval@gmail.com>
326 * config.bfd (x86_64-*-*): Add pei-x86-64 target to x86_64-*-rtems*
327 This is needed to generate UEFI application image files from ELFs.
329 2018-05-28 H.J. Lu <hongjiu.lu@intel.com>
331 * elf32-i386.c (elf_i386_lazy_plt): Add plt_tlsdesc_entry,
332 plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset,
333 plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and
334 plt_tlsdesc_got2_insn_end for TLSDESC entry.
335 (elf_i386_lazy_ibt_plt): Likewise.
336 (elf_i386_nacl_plt): Likewise.
337 * elf64-x86-64.c (tlsdesc_plt_entry): Moved and renamed to ...
338 (elf_x86_64_tlsdesc_plt_entry): This.
339 (elf_x86_64_lazy_plt): Add plt_tlsdesc_entry,
340 plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset,
341 plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and
342 plt_tlsdesc_got2_insn_end for TLSDESC entry.
343 (elf_x86_64_lazy_bnd_plt): Likewise.
344 (elf_x86_64_lazy_ibt_plt): Likewise.
345 (elf_x32_lazy_ibt_plt): Likewise.
346 (elf_x86_64_nacl_plt): Likewise.
347 (elf_x86_64_finish_dynamic_sections): Use plt_tlsdesc_entry,
348 plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset,
349 plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and
350 plt_tlsdesc_got2_insn_end to update TLSDESC entry.
351 * elfxx-x86.h (elf_x86_lazy_plt_layout): Update comments.
352 Add plt_tlsdesc_entry, plt_tlsdesc_entry_size,
353 plt_tlsdesc_got1_offset, plt_tlsdesc_got2_offset,
354 plt_tlsdesc_got1_insn_end and plt_tlsdesc_got2_insn_end.
355 (elf_x86_non_lazy_plt_layout): Update comments.
356 (elf_x86_plt_layout): Likewise.
358 2018-05-28 H.J. Lu <hongjiu.lu@intel.com>
361 * elf-s390-common.c (elf_s390_add_symbol_hook): Removed.
362 * elf32-arc.c (elf_arc_add_symbol_hook): Likewise.
363 (elf_backend_add_symbol_hook): Likewise.
364 * elf32-m68k.c (elf_m68k_add_symbol_hook): Likewise.
365 (elf_backend_add_symbol_hook): Likewise.
366 * elf32-s390.c (elf_backend_add_symbol_hook): Likewise.
367 * elf32-sparc.c (elf32_sparc_add_symbol_hook): Likewise.
368 (elf_backend_add_symbol_hook): Likewise.
369 * elf64-s390.c (elf_backend_add_symbol_hook): Likewise.
370 * elfxx-aarch64.c (_bfd_aarch64_elf_add_symbol_hook): Likewise.
371 * elfxx-aarch64.h (_bfd_aarch64_elf_add_symbol_hook): Likewise.
372 (elf_backend_add_symbol_hook): Likewise.
373 * elf32-arm.c (elf32_arm_add_symbol_hook): Remove STT_GNU_IFUNC
375 * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise.
376 * elf64-ppc.c (ppc64_elf_add_symbol_hook): Likewise.
377 * elf64-sparc.c (elf64_sparc_add_symbol_hook): Likewise.
378 * elflink.c (elf_link_add_object_symbols): Set
379 elf_gnu_symbol_ifunc for STT_GNU_IFUNC symbols.
381 2018-05-26 H.J. Lu <hongjiu.lu@intel.com>
384 * elf-bfd.h (_bfd_elf_link_hide_sym_by_version): New.
385 * elflink.c (_bfd_elf_link_hide_versioned_symbol): New function.
386 Extracted from _bfd_elf_link_assign_sym_version.
387 (_bfd_elf_link_hide_sym_by_version): New function.
388 (_bfd_elf_link_assign_sym_version): Use
389 _bfd_elf_link_hide_versioned_symbol.
390 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Call
391 _bfd_elf_link_hide_sym_by_version instead of
392 bfd_hide_sym_by_version. Don't check unversioned symbol.
394 2018-05-25 Alan Modra <amodra@gmail.com>
396 * Makefile.in: Regenerate.
397 * po/SRC-POTFILES.in: Regenerate.
399 2018-05-25 Alan Modra <amodra@gmail.com>
401 * configure.ac (bfd_cv_hidden): Run test with -Werror in CFLAGS.
402 * configure: Regenerate.
404 2018-05-23 H.J. Lu <hongjiu.lu@intel.com>
406 * elf64-ppc.c (ppc64_elf_write_core_note): Add ATTRIBUTE_NONSTRING
409 2018-05-22 Alan Modra <amodra@gmail.com>
412 * elf32-hppa.c (hppa_get_stub_entry): Return NULL when link_sec
414 (elf32_hppa_size_stubs): Only create stubs for load, alloc, code
416 (final_link_relocate): Revert last change.
418 2018-05-22 Alan Modra <amodra@gmail.com>
421 * elf32-hppa.c (final_link_relocate): Don't look for plt call
422 stubs in non-alloc sections.
424 2018-05-21 H.J. Lu <hongjiu.lu@intel.com>
427 * aout-target.h (MY_bfd_link_hide_symbol): New.
428 * aout-tic30.c (MY_bfd_link_hide_symbol): Likewise.
429 * binary.c (binary_bfd_link_hide_symbol): Likewise.
430 * coff-alpha.c (_bfd_ecoff_bfd_link_hide_symbol): Likewise.
431 * coff-mips.c (_bfd_ecoff_bfd_link_hide_symbol): Likewise.
432 * coff-rs6000.c (_bfd_xcoff_bfd_link_hide_symbol): Likewise.
433 * coffcode.h (coff_bfd_link_hide_symbol): Likewise.
434 * elf-bfd.h (_bfd_elf_link_hide_symbol): Likewise.
435 * elfxx-target.h (bfd_elfNN_bfd_link_hide_symbol): Likewise.
436 * i386msdos.c (msdos_bfd_link_hide_symbol): Likewise.
437 * ihex.c (ihex_bfd_link_hide_symbol): Likewise.
438 * libbfd-in.h (_bfd_nolink_bfd_link_hide_symbol): Likewise.
439 * linker.c (_bfd_generic_link_hide_symbol): Likewise.
440 (bfd_link_hide_symbol): Likewise.
441 * mach-o-target.c (bfd_mach_o_bfd_link_hide_symbol): Likewise.
442 * mmo.c (mmo_bfd_link_hide_symbol): Likewise.
443 * pef.c (bfd_pef_bfd_link_hide_symbol): Likewise.
444 * plugin.c (bfd_plugin_bfd_link_hide_symbol): Likewise.
445 * ppcboot.c (ppcboot_bfd_link_hide_symbol): Likewise.
446 * som.c (som_bfd_link_hide_symbol): Likewise.
447 * srec.c (srec_bfd_link_hide_symbol): Likewise.
448 * tekhex.c (tekhex_bfd_link_hide_symbol): Likewise.
449 * vms-alpha.c (vms_bfd_link_hide_symbol): Likewise.
450 (alpha_vms_bfd_link_hide_symbol): Likewise.
451 * xsym.c (bfd_sym_bfd_link_hide_symbol): Likewise.
452 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
453 _bfd_generic_link_hide_symbol.
454 (rs6000_xcoff64_aix_vec): Likewise.
455 * elflink.c (bfd_elf_record_link_assignment): Don't make forced
456 local symbol dynamic.
457 (_bfd_elf_link_hide_symbol): New function.
458 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
459 check root.ldscript_def.
460 * targets.c (bfd_target): Add _bfd_link_hide_symbol.
461 (BFD_JUMP_TABLE_LINK): Add NAME##_bfd_link_hide_symbol.
462 * bfd-in2.h: Regenerated.
463 * libbfd.h: Likewise.
465 2018-05-21 H.J. Lu <hongjiu.lu@intel.com>
468 * elf.c (setup_group): Mark section in a section group with
471 2018-05-18 H.J. Lu <hongjiu.lu@intel.com>
474 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
475 set eh->local_ref to 1 if a symbol is versioned and there is a
478 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
480 * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Handle
483 2018-05-18 Jim Wilson <jimw@sifive.com>
485 * elfnn-riscv.c (allocate_dynrelocs): Discard dynamic relocations if
486 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
487 (riscv_elf_relocate_section): Don't generate dynamic relocation if
488 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
489 (riscv_elf_finish_dynamic_symbol): Likewise.
491 2018-05-18 John Darrington <john@darrington.wattle.id.au>
493 * Makefile.am: Add s12z files.
494 * Makefile.in: Regenerate.
495 * archures.c: Add bfd_s12z_arch.
496 * bfd-in.h: Add exports of bfd_putb24 and bfd_putl24.
497 * bfd-in2.h: Regenerate.
498 * config.bfd: Add s12z target.
499 * configure.ac: Add s12z target.
500 * configure: Regenerate.
501 * cpu-s12z.c: New file.
502 * elf32-s12z.c: New file.
503 * libbfd.c (bfd_putb24): New function.
504 (bfd_putl24): New function.
505 * libbfd.h: Regenerate.
506 * reloc.c: Add s12z relocations.
507 (bfd_get_reloc_size): Handle size 5 relocs.
508 * targets.c: Add s12z_elf32_vec.
510 2018-05-18 H.J. Lu <hongjiu.lu@intel.com>
513 * elf32-i386.c (elf_i386_relocate_section): Handle R_386_GOT32X
515 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
516 set eh->local_ref to 1 for linker defined symbols.
518 2018-05-18 Alan Modra <amodra@gmail.com>
521 * elf.c (setup_group): Formatting. Check that SHT_GROUP entries
522 don't point at other SHT_GROUP sections. Set shdr corresponding
523 to invalid entry, to NULL rather than section 0. Identify
524 SHT_GROUP section index when reporting an error. Cope with NULL
527 2018-05-18 Alan Modra <amodra@gmail.com>
529 * libbfd-in.h (ATTRIBUTE_HIDDEN): Define and use throughout.
530 * configure.ac (HAVE_HIDDEN): Check compiler support for hidden
532 * libbfd.h: Regenerate.
533 * configure: Regenerate.
534 * config.in: Regenerate.
536 2018-05-18 Alan Modra <amodra@gmail.com>
538 * libbfd-in.h: Add include guard.
539 * libcoff-in.h: Likewise.
540 * doc/Makefile.am (libbfd.h, libcoff.h): Append another #endif.
541 * doc/Makefile.in: Regenerate.
542 * libbfd.h: Regenerate.
543 * libcoff.h: Regenerate.
545 2018-05-16 Maciej W. Rozycki <macro@mips.com>
547 * elf32-nds32.c (nds32_convert_32_to_16): Preset `insn_type'.
549 2018-05-16 Alan Modra <amodra@gmail.com>
552 * format.c (struct bfd_preserve): Add section_id.
553 (bfd_preserve_save, bfd_preserve_restore): Save and restore
555 (bfd_reinit): Set _bfd_section_id.
556 (bfd_check_format_matches): Put all matches of any priority into
557 matching_vector. Save initial section id and start each attempted
558 match at that section id.
559 * libbfd-in.h (_bfd_section_id): Declare.
560 * section.c (_bfd_section_id): Rename from section_id and make
562 (bfd_get_next_section_id): Delete.
563 * elf64-ppc.c (ppc64_elf_setup_section_lists): Replace use of
564 bfd_get_section_id with _bfd_section_id.
565 * libbfd.h: Regenerate.
566 * bfd-in2.h: Regenerate.
568 2018-05-15 Christophe Guillon <christophe.guillon@st.com>
570 * coffcode.h (coff_bigobj_swap_aux_in): Make sure that all fields
571 of the aux structure are initialised.
573 2018-05-15 Francois H. Theron <francois.theron@netronome.com>
575 * targets.c: Wrap nfp_elf64_vec in BFD64 ifdef.
577 2018-05-15 Nick Clifton <nickc@redhat.com>
579 * po/pt.po: New Portuguese translation.
580 * configure.ac (ALL_LINGUAS): Add pt.
581 * configure: Regenerate.
583 2018-05-14 H.J. Lu <hongjiu.lu@intel.com>
586 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Don't issue
587 an error on IFUNC pointer defined in PDE.
588 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Call
589 _bfd_x86_elf_link_fixup_ifunc_symbol.
590 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
591 * elfxx-x86.c (_bfd_x86_elf_link_fixup_ifunc_symbol): New
593 * elfxx-x86.h (_bfd_x86_elf_link_fixup_ifunc_symbol): New.
595 2018-05-14 H.J. Lu <hongjiu.lu@intel.com>
598 * elfxx-x86.c (elf_x86_linker_defined): New function.
599 (_bfd_x86_elf_link_check_relocs): Use it to mark __bss_start,
600 _end and _edata locally defined within executables.
602 2018-05-12 Alan Modra <amodra@gmail.com>
605 * elf.c (rewrite_elf_program_header): Use segment_mark only for
606 PT_LOAD headers. Delete first_matching_lma and first_suggested_lma.
607 Instead make matching_lma and suggested_lma pointers to the
608 sections. Align section vma and lma calculated from segment.
609 Don't clear includes_phdrs or includes_filehdr based on p_paddr
610 test. Try to handle alignment padding before first section by
611 adjusting new segment lma down. Adjust PT_PHDR map p_paddr.
613 2018-05-09 Dimitar Dimitrov <dimitar@dinux.eu>
615 * elf32-pru.c (pru_elf32_do_ldi32_relocate): Make LDI32 relocation
616 conformant to TI ABI.
617 (pru_elf32_relax_section): Likewise.
618 (pru_elf_relax_delete_bytes): Fix offsets for new LDI32 code.
619 * elf32-pru.c (pru_elf32_do_ldi32_relocate): Ignore addend.
620 (pru_elf32_pmem_relocate): Trap - should not get here.
621 (pru_elf32_relocate_section): Add support for REL relocations.
622 (elf_info_to_howto_rel): Enable REL.
623 (elf_backend_may_use_rel_p): Likewise.
624 (elf_backend_may_use_rela_p): Likewise.
625 (elf_backend_default_use_rela_p): Likewise.
627 2018-05-09 Alan Modra <amodra@gmail.com>
630 * peXXigen.c (pe_print_edata): Correct minimum size.
632 2018-05-09 Alan Modra <amodra@gmail.com>
635 * peXXigen.c (pe_print_idata): Bound check hint_addr.
637 2018-05-08 Nick Clifton <nickc@redhat.com>
640 * elf.c (bfd_elf_get_str_section): Check for an excessively large
642 * elf-attrs.c (_bfd_elf_parse_attributes): Issue an error if the
643 attribute section is larger than the size of the file.
645 2018-05-07 Alan Modra <amodra@gmail.com>
647 * cofflink.c (_bfd_coff_link_input_bfd): Use memcmp rather than
648 strncmp when checking for ".bf" special symbol.
649 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Make pe_required_section_flags
650 section name a char array, remove sentinal known_sections entry,
651 and adjust loop over known_sections to suit. Use memcmp rather
654 2018-05-04 Alan Modra <amodra@gmail.com>
656 * elf-linux-core.h (struct elf_external_linux_prpsinfo32_ugid32),
657 (struct elf_external_linux_prpsinfo32_ugid16),
658 (struct elf_external_linux_prpsinfo64_ugid32),
659 (struct elf_external_linux_prpsinfo64_ugid16): Add ATTRIBUTE_NONSTRING
660 to pr_fname and pr_psargs fields. Remove GCC diagnostic pragmas.
662 * elf.c (elfcore_write_prpsinfo): ..here. Indent nested preprocessor
664 * elf32-arm.c (elf32_arm_nabi_write_core_note): Add ATTRIBUTE_NONSTRING
666 * elf32-ppc.c (ppc_elf_write_core_note): Likewise.
667 * elf32-s390.c (elf_s390_write_core_note): Likewise.
668 * elf64-s390.c (elf_s390_write_core_note): Likewise.
669 * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewise.
670 * elf64-x86-64.c (elf_x86_64_write_core_note): Add GCC diagnostic
672 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Use strnlen to avoid
673 false positive gcc-8 warning.
674 * cofflink.c (_bfd_coff_link_input_bfd): Likewise.
676 2018-05-04 Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
678 * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Fix the order
679 of arguments when warning about different long double types.
681 2018-05-03 Simon Atanasyan <simon@atanasyan.com>
683 * elf32-mips.c: (elf32_mips_fixup_symbol): New function.
684 (elf_backend_fixup_symbol): New macro.
685 * elfxx-mips.c: (mips_elf_output_extsym): Discard _gp_disp
687 (_bfd_mips_elf_finish_dynamic_symbol): Likewise.
689 2018-04-30 Francois H. Theron <francois.theron@netronome.com>
691 * Makefile.am: Added NFP files to build.
692 * archures.c: Added bfd_arch_nfp
693 * config.bfd: Added NFP support.
694 * configure.ac: Added NFP support.
695 * cpu-nfp.c: New, for NFP support.
696 * elf-bfd.h: Added elf_section_info()
697 * elf64-nfp.c: New, for NFP support.
698 * po/SRC-POTFILES.in: Added NFP source files.
699 * targets.c: Added nfp_elf64_vec
700 * bfd-in2.h: Regenerate.
701 * Makefile.in: Regenerate.
702 * configure: Regenerate.
704 2018-04-27 Alan Modra <amodra@gmail.com>
706 * bfd-in2.h: Regenerate.
707 * libbfd.h: Regenerate.
709 2018-04-27 Alan Modra <amodra@gmail.com>
713 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't drop plt
715 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Comment fixes.
717 2018-04-26 Pedro Alves <palves@redhat.com>
719 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't consider
720 ifunc and non-ifunc symbols duplicates.
722 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
723 Mickaël Guêné <mickael.guene@st.com>
725 * elf32-arm.c (elf32_arm_fdpic_thumb_plt_entry): New.
726 (elf32_arm_plt_needs_thumb_stub_p): Handle thumb-only case.
727 (elf32_arm_populate_plt_entry): Likewise.
728 (elf32_arm_output_plt_map_1): Likewise.
729 (elf32_arm_output_arch_local_syms): Likewise.
731 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
732 Mickaël Guêné <mickael.guene@st.com>
734 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Handle
735 _GLOBAL_OFFSET_TABLE_ in FDPIC mode.
737 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
738 Mickaël Guêné <mickael.guene@st.com>
740 * elf32-arm.c (bfd_elf32_arm_set_target_params): Handle FDPIC case
743 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
744 Mickaël Guêné <mickael.guene@st.com>
746 * elf32-arm.c (DEFAULT_STACK_SIZE): New.
747 (elf32_arm_always_size_sections): Create stack segment.
749 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
750 Mickaël Guêné <mickael.guene@st.com>
752 * bfd-in2.h (BFD_RELOC_ARM_TLS_GD32_FDPIC)
753 (BFD_RELOC_ARM_TLS_LDM32_FDPIC, BFD_RELOC_ARM_TLS_IE32_FDPIC): New
755 * elf32-arm.c (elf32_arm_howto_table_2): Add R_ARM_TLS_GD32_FDPIC,
756 R_ARM_TLS_LDM32_FDPIC, R_ARM_TLS_IE32_FDPIC relocations.
757 (elf32_arm_reloc_map): Add R_ARM_TLS_GD32_FDPIC,
758 R_ARM_TLS_LDM32_FDPIC, R_ARM_TLS_IE32_FDPIC.
759 (struct elf32_arm_link_hash_table): Update comment.
760 (elf32_arm_final_link_relocate): Handle TLS FDPIC relocations.
761 (IS_ARM_TLS_RELOC): Likewise.
762 (elf32_arm_check_relocs): Likewise.
763 (allocate_dynrelocs_for_symbol): Likewise.
764 (elf32_arm_size_dynamic_sections): Update comment.
765 * reloc.c: Add BFD_RELOC_ARM_TLS_GD32_FDPIC,
766 BFD_RELOC_ARM_TLS_LDM32_FDPIC, BFD_RELOC_ARM_TLS_IE32_FDPIC.
768 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
769 Mickaël Guêné <mickael.guene@st.com>
771 * elf32-arm.c (elf32_arm_fdpic_plt_entry): New.
772 (elf32_arm_create_dynamic_sections): Handle FDPIC.
773 (elf32_arm_allocate_plt_entry): Likewise.
774 (elf32_arm_populate_plt_entry): Likewise.
775 (elf32_arm_output_plt_map_1): Likewise.
777 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
778 Mickaël Guêné <mickael.guene@st.com>
780 * elf32-arm.c (struct fdpic_local): New.
781 (elf_arm_obj_tdata): Add local_fdpic_cnts field.
782 (elf32_arm_local_fdpic_cnts): New.
783 (struct fdpic_global): New.
784 (elf32_arm_link_hash_entry): Add fdpic_cnts field.
785 (elf32_arm_link_hash_table): Add srofixup field.
786 (arm_elf_add_rofixup): New.
787 (arm_elf_fill_funcdesc): New.
788 (elf32_arm_link_hash_newfunc): Handle fdpic_cnts.
789 (elf32_arm_allocate_local_sym_info): Likewise.
790 (create_got_section): Create .rofixup section.
791 (elf32_arm_copy_indirect_symbol): Handle fdpic_cnts.
792 (bfd_elf32_arm_set_target_params): Handle FDPIC.
793 (elf32_arm_final_link_relocate): Likewise.
794 (elf32_arm_check_relocs): Likewise.
795 (allocate_dynrelocs_for_symbol): Likewise.
796 (elf32_arm_size_dynamic_sections): Likewise.
797 (elf32_arm_finish_dynamic_sections): Likewise.
798 (elf32_arm_output_arch_local_syms): Likewise.
799 (elf32_arm_fdpic_omit_section_dynsym): New.
801 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
802 Mickaël Guêné <mickael.guene@st.com>
804 * bfd-in2.c (BFD_RELOC_ARM_GOTFUNCDESC)
805 (BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC)
806 (BFD_RELOC_ARM_FUNCDESC_VALUE): New.
807 * elf32-arm.c (elf32_arm_howto_table_2): Add R_ARM_GOTFUNCDESC,
808 R_ARM_GOTOFFFUNCDESC, R_ARM_FUNCDESC, R_ARM_FUNCDESC_VALUE.
809 (elf32_arm_howto_from_type): Take new members of
810 elf32_arm_howto_table_2 into account.
811 (elf32_arm_reloc_map): Add BFD_RELOC_ARM_GOTFUNCDESC,
812 BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC,
813 BFD_RELOC_ARM_FUNCDESC_VALUE.
814 * reloc.c: Add BFD_RELOC_ARM_GOTFUNCDESC,
815 BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC,
816 BFD_RELOC_ARM_FUNCDESC_VALUE.
818 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
819 Mickaël Guêné <mickael.guene@st.com>
821 * elf32-arm.c (elf32_arm_print_private_bfd_data): Support
822 EF_ARM_PIC and ELFOSABI_ARM_FDPIC.
823 (elf32_arm_post_process_headers): Support ELFOSABI_ARM_FDPIC.
824 (ELF_OSABI): Define to ELFOSABI_ARM_FDPIC.
826 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
827 Mickaël Guêné <mickael.guene@st.com>
829 * config.bfd (arm*-*-linux-*): Add arm_elf32_fdpic_be_vec and
830 arm_elf32_fdpic_le_vec to targ_selvecs. Accept
831 arm*-*-uclinuxfdpiceabi.
832 * configure.ac: Add support for arm_elf32_fdpic_be_vec and
833 arm_elf32_fdpic_le_vec.
834 * configure: Regenerate.
835 * elf32-arm.c (struct elf32_arm_link_hash_table): Add fdpic_p.
836 (elf32_arm_link_hash_table_create): Initialize fdpic_p.
837 (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME, TARGET_BIG_SYM)
838 (TARGET_BIG_NAME, elf_match_priority): Define for FDPIC targets.
839 (elf32_arm_fdpic_link_hash_table_create): New.
840 * targets.c (_bfd_target_vector): Add arm_elf32_fdpic_be_vec and
841 arm_elf32_fdpic_le_vec.
843 2018-04-25 Alan Modra <amodra@gmail.com>
845 * elf-linux-core.h: Disable gcc-8 string truncation warning.
846 * elf.c (elfcore_write_prpsinfo): Likewise.
848 2018-04-25 Alan Modra <amodra@gmail.com>
850 * Makefile.am: Remove arm-aout and arm-coff support.
851 * config.bfd: Likewise.
852 * configure.ac: Likewise.
853 * targets.c: Likewise.
854 * aout-arm.c: Delete.
855 * armnetbsd.c: Delete.
857 * Makefile.in: Regenerate.
858 * configure: Regenerate.
859 * po/SRC-POTFILES.in: Regenerate.
861 2018-04-24 Nick Clifton <nickc@redhat.com>
864 * elf.c (ignore_section_sym): Check for the output_section pointer
865 being NULL before dereferencing it.
868 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Check for
869 a negative PE_DEBUG_DATA size before iterating over the debug data.
871 2018-04-23 Alan Modra <amodra@gmail.com>
873 * elf-linux-core.h: Revert last change.
876 2018-04-23 Nick Clifton <nickc@redhat.com>
879 * aoutx.h (aout_get_external_symbols): Allocate an extra byte at
880 the end of the string table, and zero it.
882 2018-04-23 Alan Modra <amodra@gmail.com>
884 * elf-linux-core.h (swap_linux_prpsinfo32_ugid32_out): Disable
885 gcc-8 string truncation warning.
886 (swap_linux_prpsinfo32_ugid16_out): Likewise.
887 (swap_linux_prpsinfo64_ugid32_out): Likewise.
888 (swap_linux_prpsinfo64_ugid16_out): Likewise.
889 * elf.c (elfcore_write_prpsinfo): Likewise.
891 2018-04-23 Nick Clifton <nickc@redhat.com>
894 * aoutx.h (aout_get_external_symbols): Allocate an extra byte at
895 the end of the string table, and zero it.
897 2018-04-20 Alan Modra <amodra@gmail.com>
900 * elf32-hppa.c (got_relocs_needed): Add extra param to special
901 case both dtprel and tprel relocs.
902 (allocate_dynrelocs): Adjust conditions for got relocs.
903 (elf32_hppa_relocate_section): Likewise for local sym got relocs.
904 Emit dynamic relocs on TLS GOT entries for shared libraries,
905 not when pic. Omit dynamic reloc on dtprel entry when local,
906 and on tprel entry when local and executable.
908 2018-04-19 Alan Modra <amodra@gmail.com>
911 * elf32-hppa.c (elf32_hppa_size_stubs): Init "destination" to -1.
912 (hppa_type_of_stub): Don't return a long branch stub for
913 symbols other than those defined statically.
915 2018-04-19 Alan Modra <amodra@gmail.com>
917 * Makefile.am: Revert 2018-04-18 coff-mips changes.
918 * config.bfd: Add back mips_ecoff_le_vec and mips_ecoff_be_vec
919 to selvecs for mips targets change 2018-04-18.
920 * configure.ac: Reinstate mips_ecoff_le_vec, mips_ecoff_be_vec
921 and mips_ecoff_bele_vec.
922 * targets.c: Likewise.
923 * coff-mips.c: Resurrect.
924 * Makefile.in: Regenerate.
925 * configure: Regenerate.
926 * po/SRC-POTFILES.in: Regenerate.
928 2018-04-18 Alan Modra <amodra@gmail.com>
930 * Makefile.am: Remove mips aout and coff support.
931 * config.bfd: Likewise.
932 * configure.ac: Likewise.
933 * targets.c: Likewise.
934 * coff-mips.c: Delete
938 * Makefile.in: Regenerate.
939 * configure: Regenerate.
940 * po/SRC-POTFILES.in: Regenerate.
942 2018-04-17 H.J. Lu <hongjiu.lu@intel.com>
944 * elf32-i386.c (elf32_bed): Define before including
946 * elf64-x86-64.c (elf64_bed): Define before including
948 (elf32_bed): Define before including "elf32-target.h".
950 2018-04-17 H.J. Lu <hongjiu.lu@intel.com>
953 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Use a
954 normal input file with compatible relocation.
956 2018-04-18 Alan Modra <amodra@gmail.com>
958 * Makefile.am: Remove support for assorted i386 aout and coff targets.
959 * config.bfd: Likewise.
960 * configure.ac: Likewise.
961 * doc/bfdint.texi: Likewise.
962 * targets.c: Likewise.
964 * i386dynix.c: Delete.
965 * i386freebsd.c: Delete.
966 * i386linux.c: Delete.
967 * i386mach3.c: Delete.
968 * i386netbsd.c: Delete.
969 * i386os9k.c: Delete.
970 * Makefile.in: Regenerate.
971 * configure: Regenerate.
972 * po/SRC-POTFILES.in: Regenerate.
974 2018-04-17 Andrew Sadek <andrew.sadek.se@gmail.com>
976 Microblaze Target: PIC data text relative
978 * bfd/reloc.c (2 new BFD relocations):
979 BFD_RELOC_MICROBLAZE_64_TEXTPCREL &
980 BFD_RELOC_MICROBLAZE_64_TEXTPCREL
981 * bfd/bfd-in2.h: Regenerate
982 * bfd/libbfd.h: Regenerate
983 * bfd/elf32-microblaze.c (Handle new relocs): define 'HOWTO' of 3
984 new relocs and handle them in both relocate and relax functions.
985 (microblaze_elf_reloc_type_lookup): add mapping between for new
987 (microblaze_elf_relocate_section): Handle new relocs in case of
989 (microblaze_elf_relax_section): Handle new relocs for elf relaxation.
991 2018-04-17 Nick Clifton <nickc@redhat.com>
994 * aoutx.h (find_nearest_line): Check that the symbol name exists
995 and is long enough, before attempting to see if it is for a .o
997 * hash.c (bfd_hash_hash): Add an assertion that the string is not
999 * linker.c (bfd_link_hash_lookup): Fail if the table or string are
1001 (_bfd_generic_link_add_archive_symbols): Fail if an archive entry
1005 * dwarf2.c (concat_filename): Check for a NULL table pointer.
1007 2018-04-16 Nick Clifton <nickc@redhat.com>
1010 * coffgen.c (coff_pointerize_aux): Check for an out of range
1013 2018-04-16 Alan Modra <amodra@gmail.com>
1015 * Makefile.am: Remove arm-epoc-pe support.
1016 * coff-arm.c: Likewise.
1017 * config.bfd: Likewise.
1018 * configure.ac: Likewise.
1019 * targets.c: Likewise.
1020 * epoc-pe-arm.c: Delete.
1021 * epoc-pei-arm.c: Delete.
1022 * Makefile.in: Regenerate.
1023 * configure: Regenerate.
1024 * po/SRC-POTFILES.in: Regenerate.
1026 2018-04-16 Alan Modra <amodra@gmail.com>
1028 * Makefile.am: Remove sparc-aout and sparc-coff support.
1029 * config.bfd: Likewise.
1030 * configure.ac: Likewise.
1031 * targets.c: Likewise.
1032 * aout-sparcle.c: Delete.
1034 * cf-sparclynx.c: Delete.
1035 * coff-sparc.c: Delete.
1037 * sparclinux.c: Delete.
1038 * sparclynx.c: Delete.
1039 * sparcnetbsd.c: Delete.
1041 * Makefile.in: Regenerate.
1042 * configure: Regenerate.
1043 * po/SRC-POTFILES.in: Regenerate.
1045 2018-04-16 Alan Modra <amodra@gmail.com>
1047 * Makefile.am: Remove m68k-aout and m68k-coff support.
1048 * aoutf1.h: Likewise.
1049 * aoutx.h: Likewise.
1050 * archive.c: Likewise.
1051 * bfd-in.h: Likewise.
1053 * coffcode.h: Likewise.
1054 * coffswap.h: Likewise.
1055 * config.bfd: Likewise.
1056 * configure.ac: Likewise.
1057 * configure.host: Likewise.
1058 * doc/bfd.texinfo: Likewise.
1059 * doc/bfdint.texi: Likewise.
1060 * freebsd.h: Likewise.
1061 * gen-aout.c: Likewise.
1062 * hpux-core.c: Likewise.
1063 * libaout.h: Likewise.
1064 * libbfd-in.h: Likewise.
1065 * pdp11.c: Likewise.
1066 * peicode.h: Likewise.
1067 * riscix.c: Likewise.
1068 * targets.c: Likewise.
1070 * coff-apollo.c: Delete.
1071 * coff-aux.c: Delete.
1072 * coff-m68k.c: Delete.
1073 * coff-svm68k.c: Delete.
1074 * coff-u68k.c: Delete.
1075 * hosts/delta68.h: Delete.
1076 * hosts/hp300bsd.h: Delete.
1077 * hosts/m68kaux.h: Delete.
1078 * hosts/news.h: Delete.
1079 * hp300bsd.c: Delete.
1080 * hp300hpux.c: Delete.
1081 * liboasys.h: Delete.
1082 * m68k4knetbsd.c: Delete.
1083 * m68klinux.c: Delete.
1084 * m68knetbsd.c: Delete.
1086 * versados.c: Delete.
1087 * Makefile.in: Regenerate.
1088 * bfd-in2.h: Regenerate.
1089 * configure: Regenerate.
1090 * libbfd.h: Regenerate.
1091 * po/SRC-POTFILES.in: Regenerate.
1093 2018-04-16 Alan Modra <amodra@gmail.com>
1095 * Makefile.am: Remove sh5 and sh64 support.
1096 * archures.c: Likewise.
1097 * config.bfd: Likewise.
1098 * configure.ac: Likewise.
1099 * cpu-sh.c: Likewise.
1100 * elf32-sh-relocs.h: Likewise.
1101 * elf32-sh.c: Likewise.
1102 * targets.c: Likewise.
1103 * elf32-sh64-com.c: Delete.
1104 * elf32-sh64.c: Delete.
1105 * elf32-sh64.h: Delete.
1106 * elf64-sh64.c: Delete.
1107 * Makefile.in: Regenerate.
1108 * bfd-in2.h: Regenerate.
1109 * configure: Regenerate.
1110 * po/SRC-POTFILES.in: Regenerate.
1112 2018-04-16 Alan Modra <amodra@gmail.com>
1114 * Makefile.am: Remove sh-symbianelf support.
1115 * config.bfd: Likewise.
1116 * configure.ac: Likewise.
1117 * targets.c: Likewise.
1118 * elf32-sh-symbian.c: Delete.
1119 * Makefile.in: Regenerate.
1120 * configure: Regenerate.
1121 * po/SRC-POTFILES.in: Regenerate.
1123 2018-04-16 Alan Modra <amodra@gmail.com>
1125 * Makefile.am: Remove vax-bsd and vax-ultrix support.
1126 * config.bfd: Likewise.
1127 * configure.ac: Likewise.
1128 * targets.c: Likewise.
1130 * Makefile.in: Regenerate.
1131 * configure: Regenerate.
1132 * po/SRC-POTFILES.in: Regenerate.
1134 2018-04-16 Alan Modra <amodra@gmail.com>
1136 * Makefile.am: Remove w65 support.
1137 * archures.c: Likewise.
1138 * coffcode.h: Likewise.
1139 * config.bfd: Likewise.
1140 * configure.ac: Likewise.
1141 * targets.c: Likewise.
1142 * coff-w65.c: Delete.
1143 * cpu-w65.c: Delete.
1144 * Makefile.in: Regenerate.
1145 * bfd-in2.h: Regenerate.
1146 * configure: Regenerate.
1147 * po/SRC-POTFILES.in: Regenerate.
1149 2018-04-16 Alan Modra <amodra@gmail.com>
1151 * Makefile.am: Remove we32k support.
1152 * archures.c: Likewise.
1153 * coffcode.h: Likewise.
1154 * config.bfd: Likewise.
1155 * configure.ac: Likewise.
1156 * targets.c: Likewise.
1157 * coff-we32k.c: Delete.
1158 * cpu-we32k.c: Delete.
1159 * Makefile.in: Regenerate.
1160 * bfd-in2.h: Regenerate.
1161 * configure: Regenerate.
1162 * po/SRC-POTFILES.in: Regenerate.
1164 2018-04-16 Alan Modra <amodra@gmail.com>
1166 * Makefile.am: Remove m88k support.
1167 * aoutx.h: Likewise.
1168 * archures.c: Likewise.
1169 * coffcode.h: Likewise.
1170 * coffswap.h: Likewise.
1171 * config.bfd: Likewise.
1172 * configure.ac: Likewise.
1173 * cpu-ns32k.c: Likewise.
1174 * elf32-nds32.c: Likewise.
1175 * mach-o.c: Likewise.
1176 * netbsd-core.c: Likewise.
1177 * reloc.c: Likewise.
1178 * targets.c: Likewise.
1179 * coff-m88k.c: Delete.
1180 * cpu-m88k.c: Delete.
1181 * elf32-m88k.c: Delete.
1182 * hosts/m88kmach3.h: Delete.
1183 * m88kmach3.c: Delete.
1184 * m88kopenbsd.c: Delete.
1185 * Makefile.in: Regenerate.
1186 * bfd-in2.h: Regenerate.
1187 * configure: Regenerate.
1188 * po/SRC-POTFILES.in: Regenerate.
1190 2018-04-16 Alan Modra <amodra@gmail.com>
1192 * Makefile.am: Remove i370 support.
1193 * archures.c: Likewise.
1194 * config.bfd: Likewise.
1195 * configure.ac: Likewise.
1196 * targets.c: Likewise.
1197 * cpu-i370.c: Delete.
1198 * elf32-i370.c: Delete.
1199 * Makefile.in: Regenerate.
1200 * bfd-in2.h: Regenerate.
1201 * configure: Regenerate.
1202 * po/SRC-POTFILES.in: Regenerate.
1204 2018-04-16 Alan Modra <amodra@gmail.com>
1206 * Makefile.am: Remove h8500 support.
1207 * archures.c: Likewise.
1208 * coffcode.h: Likewise.
1209 * config.bfd: Likewise.
1210 * configure.ac: Likewise.
1211 * targets.c: Likewise.
1212 * coff-h8500.c: Delete.
1213 * cpu-h8500.c: Delete.
1214 * Makefile.in: Regenerate.
1215 * bfd-in2.h: Regenerate.
1216 * configure: Regenerate.
1217 * po/SRC-POTFILES.in: Regenerate.
1219 2018-04-16 Alan Modra <amodra@gmail.com>
1221 * Makefile.am: Remove h8300-coff support.
1222 * coffcode.h: Likewise.
1223 * config.bfd: Likewise.
1224 * configure.ac: Likewise.
1225 * reloc16.c: Likewise.
1226 * targets.c: Likewise.
1227 * coff-h8300.c: Delete.
1228 * Makefile.in: Regenerate.
1229 * configure: Regenerate.
1230 * po/SRC-POTFILES.in: Regenerate.
1232 2018-04-16 Alan Modra <amodra@gmail.com>
1234 * Makefile.am: Remove IEEE 695 support.
1235 * archures.c: Likewise.
1237 * config.bfd: Likewise.
1238 * configure.ac: Likewise.
1239 * doc/bfd.texinfo: Likewise.
1240 * doc/bfdint.texi: Likewise.
1241 * doc/bfdsumm.texi: Likewise.
1242 * section.c: Likewise.
1243 * targets.c: Likewise.
1245 * libieee.h: Delete.
1246 * Makefile.in: Regenerate.
1247 * bfd-in2.h: Regenerate.
1248 * configure: Regenerate.
1249 * po/SRC-POTFILES.in: Regenerate.
1251 2018-04-16 Alan Modra <amodra@gmail.com>
1253 * config.bfd: Remove tandem support.
1255 2018-04-16 Alan Modra <amodra@gmail.com>
1257 * Makefile.am: Remove newsos3 support.
1258 * aoutx.h: Likewise.
1259 * config.bfd: Likewise.
1260 * configure.ac: Likewise.
1261 * targets.c: Likewise.
1262 * newsos3.c: Delete.
1263 * Makefile.in: Regenerate.
1264 * configure: Regenerate.
1265 * po/SRC-POTFILES.in: Regenerate.
1267 2018-04-16 Alan Modra <amodra@gmail.com>
1269 * Makefile.am: Remove netware support.
1270 * bfd-in.h: Likewise.
1272 * config.bfd: Likewise.
1273 * configure.ac: Likewise.
1274 * doc/bfdint.texi: Likewise.
1275 * ecoff.c: Likewise.
1276 * targets.c: Likewise.
1278 * nlm-target.h: Delete.
1280 * nlm32-alpha.c: Delete.
1281 * nlm32-i386.c: Delete.
1282 * nlm32-ppc.c: Delete.
1283 * nlm32-sparc.c: Delete.
1286 * nlmcode.h: Delete.
1287 * nlmswap.h: Delete.
1288 * Makefile.in: Regenerate.
1289 * bfd-in2.h: Regenerate.
1290 * configure: Regenerate.
1291 * po/SRC-POTFILES.in: Regenerate.
1293 2018-04-16 Alan Modra <amodra@gmail.com>
1295 * archures.c: Remove tahoe support.
1296 * config.bfd: Likewise.
1297 * configure.ac: Likewise.
1298 * hosts/tahoe.h: Delete.
1299 * bfd-in2.h: Regenerate.
1300 * configure: Regenerate.
1302 2018-04-14 Alan Modra <amodra@gmail.com>
1304 * elf-bfd.h (struct elf_backend_data): Add relropagesize.
1305 * elfxx-target.h (ELF_RELROPAGESIZE): Provide default and
1307 (elfNN_bed): Init relropagesize.
1308 * bfd.c (bfd_emul_get_commonpagesize): Add boolean param to
1309 select relropagesize.
1310 * elf32-ppc.c (ELF_COMMONPAGESIZE): Define as 0x1000.
1311 (ELF_RELROPAGESIZE): Define as ELF_MAXPAGESIZE.
1312 (ELF_MINPAGESIZE): Don't define.
1313 * elf64-ppc.c (ELF_COMMONPAGESIZE): Define as 0x1000.
1314 (ELF_RELROPAGESIZE): Define as ELF_MAXPAGESIZE.
1315 * bfd-in2.h: Regenerate.
1317 2018-04-14 Alan Modra <amodra@gmail.com>
1319 * elf32-ppc.c (ELF_MAXPAGESIZE, ELF_COMMONPAGESIZE): Don't depend
1320 on __QNXTARGET__ define.
1322 2018-04-14 Alan Modra <amodra@gmail.com>
1324 * config.bfd: Add powerpc-*-lynxos* and powerpc-*-windiss*
1327 2018-04-11 Alan Modra <amodra@gmail.com>
1329 * aout-adobe.c: Delete.
1331 * coff-i860.c: Delete.
1332 * coff-i960.c: Delete.
1333 * cpu-i860.c: Delete.
1334 * cpu-i960.c: Delete.
1335 * elf32-i860.c: Delete.
1336 * elf32-i960.c: Delete.
1337 * hosts/i860mach3.h: Delete.
1338 * Makefile.am: Remove i860, i960, bout, and adobe support.
1339 * archures.c: Remove i860 and i960 support.
1340 * coffcode.h: Likewise.
1341 * reloc.c: Likewise.
1342 * aoutx.h: Comment updates.
1343 * archive.c: Remove BOUT and i960 support.
1344 * bfd.c: Remove BOUT support.
1345 * coffswap.h: Remove i960 support.
1346 * config.bfd: Remove i860, i960 and adobe targets.
1347 * configure.ac: Remove adode, bout, i860, i960, icoff targets.
1348 * targets.c: Likewise.
1349 * ieee.c: Remove i960 support.
1350 * mach-o.c: Remove i860 support.
1351 * Makefile.in: Regenerate.
1352 * bfd-in2.h: Regenerate.
1353 * configure: Regenerate.
1354 * libbfd.h: Regenerate.
1355 * po/SRC-POTFILES.in: Regenerate.
1357 2018-04-09 Maciej W. Rozycki <macro@mips.com>
1359 * elf64-mips.c (mips_elf64_write_rel): Handle a NULL BFD pointer
1360 in the BFD symbol referred by the relocation.
1361 (mips_elf64_write_rela): Likewise.
1363 2018-04-09 Maciej W. Rozycki <macro@mips.com>
1365 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Issue an
1366 error for out-of-range `r_sym' values.
1368 2018-04-09 Alan Modra <amodra@gmail.com>
1370 * elf64-ppc.c (struct _ppc64_elf_section_data): Add has_pltcall field.
1371 (struct ppc_link_hash_table): Add can_convert_all_inline_plt.
1372 (ppc64_elf_check_relocs): Set has_pltcall.
1373 (ppc64_elf_adjust_dynamic_symbol): Discard some PLT entries.
1374 (ppc64_elf_inline_plt): New function.
1375 (ppc64_elf_size_dynamic_sections): Discard some PLT entries for locals.
1376 * elf64-ppc.h (ppc64_elf_inline_plt): Declare.
1377 * elf32-ppc.c (has_pltcall): Define.
1378 (struct ppc_elf_link_hash_table): Add can_convert_all_inline_plt.
1379 (ppc_elf_check_relocs): Set has_pltcall.
1380 (ppc_elf_inline_plt): New function.
1381 (ppc_elf_adjust_dynamic_symbol): Discard some PLT entries.
1382 (ppc_elf_size_dynamic_sections): Likewise.
1383 * elf32-ppc.h (ppc_elf_inline_plt): Declare.
1385 2018-04-09 Alan Modra <amodra@gmail.com>
1387 * elf32-ppc.c (ppc_elf_howto_raw): Add PLTSEQ and PLTCALL howtos.
1388 (is_plt_seq_reloc): New function.
1389 (ppc_elf_check_relocs): Handle PLTSEQ and PLTCALL relocs.
1390 (ppc_elf_tls_optimize): Handle inline plt call sequence.
1391 (ppc_elf_relax_section): Handle PLTCALL reloc.
1392 (ppc_elf_relocate_section): Nop out inline plt call sequence when
1394 * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_PLTSEQ and
1395 R_PPC64_PLTCALL entries. Comment R_PPC64_TOCSAVE.
1396 (has_tls_get_addr_call): Correct comment.
1397 (is_branch_reloc): Add PLTCALL.
1398 (is_plt_seq_reloc): New function.
1399 (ppc64_elf_check_relocs): Handle PLT16_LO_DS reloc. Set
1400 has_tls_reloc for R_PPC64_TLSGD and R_PPC64_TLSLD. Create plt
1401 entry for R_PPC64_PLTCALL.
1402 (ppc64_elf_tls_optimize): Handle inline plt call sequence.
1403 (ppc_type_of_stub): Handle PLTCALL reloc.
1404 (toc_adjusting_stub_needed): Likewise.
1405 (ppc64_elf_relocate_section): Set "can_plt_call" for PLTCALL
1406 reloc insn. Nop out inline plt call sequence when resolving
1407 locally. Handle __tls_get_addr inline plt call optimization.
1409 2018-04-09 Alan Modra <amodra@gmail.com>
1411 * elf64-ppc.c (LOCAL_PLT_ENTRY_SIZE): Define.
1412 (struct ppc_stub_hash_entry): Add symtype field.
1414 (struct ppc_link_hash_table): Add pltlocal and relpltlocal.
1415 (create_linkage_sections): Create pltlocal and relpltlocal.
1416 (ppc64_elf_check_relocs): Allow PLT relocs on local symbols.
1418 (ppc64_elf_adjust_dynamic_symbol): Keep PLT entries for inline calls.
1419 (allocate_dynrelocs): Allocate pltlocal and relpltlocal.
1420 (ppc64_elf_size_dynamic_sections): Size pltlocal and relpltlocal.
1421 Keep PLT entries for inline calls against locals.
1422 (ppc_build_one_stub): Use pltlocal as appropriate.
1423 (ppc_size_one_stub): Likewise.
1424 (ppc64_elf_size_stubs): Set symtype.
1425 (build_global_entry_stubs_and_plt): Init pltlocal and write
1426 relpltlocal for globals.
1427 (write_plt_relocs_for_local_syms): Likewise for local syms.
1428 (ppc64_elf_relocate_section): Support PLT for local syms.
1429 * elf32-ppc.c (PLT_KEEP): Define.
1430 (struct ppc_elf_link_hash_table): Add pltlocal and relpltlocal.
1431 (ppc_elf_create_glink): Create pltlocal and relpltlocal.
1432 (ppc_elf_check_relocs): Allow PLT relocs on local symbols.
1433 Set PLT_KEEP. Adjust update_local_sym_info call.
1434 (ppc_elf_adjust_dynamic_symbol): Keep PLT entries for inline calls.
1435 (allocate_dynrelocs): Allocate pltlocal and relpltlocal.
1436 (ppc_elf_size_dynamic_sections): Size pltlocal and relpltlocal.
1437 (ppc_elf_relocate_section): Support PLT16 relocs for local syms.
1438 (write_global_sym_plt): Init pltlocal and write relpltlocal.
1439 (ppc_finish_symbols): Likewise for locals.
1441 2018-04-09 Alan Modra <amodra@gmail.com>
1443 * elf64-ppc.c (ppc_build_one_stub): Move output of PLT relocs
1444 for local symbols to..
1445 (write_plt_relocs_for_local_syms): ..here. New function.
1446 (ppc64_elf_finish_dynamic_symbol): Move output of PLT relocs for
1448 (build_global_entry_stubs_and_plt): ..here. Rename from
1449 build_global_entry_stubs.
1450 (ppc64_elf_build_stubs): Always call build_global_entry_stubs_and_plt.
1451 Call write_plt_relocs_for_local_syms.
1452 * elf32-ppc.c (get_sym_h): New function.
1453 (ppc_elf_relax_section): Use get_sym_h.
1454 (ppc_elf_relocate_section): Move output of PLT relocs and glink
1455 stubs for local symbols to..
1456 (ppc_finish_symbols): ..here. New function.
1457 (ppc_elf_finish_dynamic_symbol): Move output of PLT relocs for
1459 (write_global_sym_plt): ..here. New function.
1460 * elf32-ppc.h (ppc_elf_modify_segment_map): Delete attribute.
1461 (ppc_finish_symbols): Declare.
1463 2018-04-09 Alan Modra <amodra@gmail.com>
1465 * elf32-ppc.c (ppc_elf_check_relocs): Handle PLT16 relocs.
1466 (ppc_elf_relocate_section): Likewise.
1467 * elf64-ppc.c (ppc64_elf_check_relocs): Handle PLT16_LO_DS.
1468 (ppc64_elf_relocate_section): Likewise. Correct PLT16
1469 resolution to plt entry relative to toc pointer.
1471 2018-04-09 Alan Modra <amodra@gmail.com>
1473 * elf64-ppc.c (TLS_TLS, TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL,
1474 TLS_TPRELGD, TLS_EXPLICIT): Renumber. Test TLS_TLS throughout
1475 file when other TLS flags are tested in a mask.
1476 (TLS_MARK, NON_GOT): Define.
1477 (PLT_IFUNC): Redefine, and test TLS_TLS throughout file as well.
1478 (update_local_sym_info): Don't create got entry when NON_GOT.
1479 (ppc64_elf_check_relocs): Pass NON_GOT with PLT_IFUNC.
1481 (get_tls_mask): Do toc lookup if tls_mask is just TLS_MARK.
1482 (ppc64_elf_relocate_section): Likewise.
1483 (ppc64_elf_tls_optimize): Don't attempt to optimize indirect
1484 __tls_get_addr calls lacking a marker reloc.
1485 * elf32-ppc.c (TLS_TLS, TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL,
1486 TLS_TPRELGD): Renumber. Update comment.
1487 (TLS_MARK, NON_GOT): Define.
1488 (PLT_IFUNC): Redefine, and test TLS_TLS throughout file as well.
1489 (update_local_sym_info): Don't create got entry when NON_GOT.
1490 (ppc_elf_check_relocs): Pass NON_GOT with PLT_IFUNC.
1492 (ppc_elf_tls_optimize): Don't attempt to optimize indirect
1493 __tls_get_addr calls lacking a marker reloc.
1495 2018-04-06 H.J. Lu <hongjiu.lu@intel.com>
1497 * elf64-x86-64.c (elf_x86_64_info_to_howto): Don't mask out
1498 R_X86_64_converted_reloc_bit.
1500 2018-04-05 H.J. Lu <hongjiu.lu@intel.com>
1503 * configure: Regenerated.
1505 2018-04-05 Alan Modra <amodra@gmail.com>
1507 * elf-hppa.h (elf_hppa_info_to_howto): Init howto to NULL.
1508 (elf_hppa_info_to_howto_rel): Likewise.
1510 2018-04-04 Maciej W. Rozycki <macro@mips.com>
1512 * elf-hppa.h (elf_hppa_info_to_howto): Also return
1513 unsuccessfully for unimplemented relocations.
1514 (elf_hppa_info_to_howto_rel): Likewise.
1516 2018-04-04 Maciej W. Rozycki <macro@mips.com>
1518 * elf32-i860.c (lookup_howto): Add `abfd' parameter. Set the
1519 `bfd_error_bad_value' error and call `_bfd_error_handler' on a
1520 howto lookup failure.
1521 (elf32_i860_reloc_type_lookup): Adjust `lookup_howto' call
1523 (elf32_i860_info_to_howto_rela): Likewise.
1524 (elf32_i860_relocate_splitn): Likewise.
1525 (elf32_i860_relocate_pc16): Likewise.
1526 (elf32_i860_relocate_pc26): Likewise.
1527 (elf32_i860_relocate_section): Likewise.
1529 2018-04-04 Maciej W. Rozycki <macro@mips.com>
1531 * elf32-visium.c (visium_info_to_howto_rela): Correct the range
1532 check for `visium_elf_howto_table' table access.
1534 2018-04-04 Maciej W. Rozycki <macro@mips.com>
1536 * elf32-iq2000.c (iq2000_info_to_howto_rela): Correct the range
1537 check for `iq2000_elf_howto_table' table access.
1539 2018-04-04 Maciej W. Rozycki <macro@mips.com>
1541 * elf32-frv.c (frv_info_to_howto_rela): Correct the range check
1542 for `elf32_frv_howto_table' table access.
1544 2018-04-04 Maciej W. Rozycki <macro@mips.com>
1546 * elf32-mips.c (mips_elf32_rtype_to_howto): Also return
1547 unsuccessfully for placeholder howtos.
1548 * elf64-mips.c (mips_elf64_rtype_to_howto): Likewise.
1549 * elfn32-mips.c (mips_elf_n32_rtype_to_howto): Likewise.
1551 2018-03-29 Maciej W. Rozycki <macro@mips.com>
1553 * elf32-mips.c (mips_info_to_howto_rel): Remove the calls to
1554 `_bfd_error_handler' and to set the `bfd_error_bad_value' error.
1556 2018-03-28 Maciej W. Rozycki <macro@mips.com>
1558 * elf-hppa.h (elf_hppa_info_to_howto_rel): Remove
1559 ATTRIBUTE_UNUSED from `abfd'.
1561 2018-03-28 Maciej W. Rozycki <macro@mips.com>
1563 * elf-hppa.h (elf_hppa_info_to_howto_rel): Correct
1564 `_bfd_error_handler' call formatting.
1566 2018-03-28 Maciej W. Rozycki <macro@mips.com>
1568 * elf32-mips.c (mips_info_to_howto_rel): Call
1569 `mips_elf32_rtype_to_howto' directly rather than via
1570 `->elf_backend_mips_rtype_to_howto'.
1572 2018-03-28 Renlin Li <renlin.li@arm.com>
1575 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Add cases for
1576 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12,
1577 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
1578 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12,
1579 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
1580 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12,
1581 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
1582 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12,
1583 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
1584 (elfNN_aarch64_final_link_relocate): Support new relocations.
1585 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Support new
1587 (_bfd_aarch64_elf_resolve_relocation): Support new relocations.
1589 2018-03-28 Renlin Li <renlin.li@arm.com>
1592 * reloc.c: Add BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12
1593 BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12_NC,
1594 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12,
1595 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
1596 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12,
1597 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
1598 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12,
1599 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
1600 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12,
1601 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
1602 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Add table entry for
1603 TLSLE_LDST16_TPREL_LO12,
1604 TLSLE_LDST16_TPREL_LO12_NC,
1605 TLSLE_LDST32_TPREL_LO12,
1606 TLSLE_LDST32_TPREL_LO12_NC,
1607 TLSLE_LDST64_TPREL_LO12,
1608 TLSLE_LDST64_TPREL_LO12_NC,
1609 TLSLE_LDST8_TPREL_LO12,
1610 TLSLE_LDST8_TPREL_LO12_NC.
1611 * bfd-in2.h: Regenerated.
1612 * libbfd.h: Regenerated.
1614 2018-03-28 Eric Botcazou <ebotcazou@adacore.com>
1617 * elfxx-sparc.c (struct _bfd_sparc_elf_link_hash_entry): Add new flag
1618 has_old_style_got_reloc.
1619 (_bfd_sparc_elf_check_relocs) <GOT relocations>: Set it for old-style
1620 relocations. Fix a couple of long lines.
1621 (_bfd_sparc_elf_relocate_section) <R_SPARC_GOTDATA_OP>: Do not generate
1622 a R_SPARC_NONE for the GOT slot if the symbol is also subject to old-style
1625 2018-03-25 H.J. Lu <hongjiu.lu@intel.com>
1628 * elf64-x86-64.c (elf_x86_64_finish_dynamic_sections): Add
1629 ENDBR64 to the TLSDESC PLT entry.
1631 2018-03-21 Alan Modra <amodra@gmail.com>
1633 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Trim uninteresting
1634 symbols. Use size_t counts. Delete redundant opd test.
1636 2018-03-21 Alan Modra <amodra@gmail.com>
1638 * elf32-ppc.c (ppc_elf_tls_optimize): Delete locsyms.
1640 2018-03-21 Alan Modra <amodra@gmail.com>
1642 * elf32-ppc.c (struct ppc_elf_link_hash_entry): Make tls_mask
1644 (update_local_sym_info): Likewise for local_got_tls_masks.
1645 (ppc_elf_tls_optimize): Likewise for lgot_masks.
1647 2018-03-21 Alan Modra <amodra@gmail.com>
1649 * elf64-ppc.c (ppc_size_one_stub): Fix comment typo.
1650 (ppc64_elf_layout_multitoc): Allocate relocs for tprel as we
1651 do in size_dynamic_sections.
1653 2018-03-21 Alan Modra <amodra@gmail.com>
1655 * elf64-ppc.c (ppc64_elf_relocate_section): Don't access rel[1]
1656 without first checking array bounds.
1657 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1659 2018-03-20 H.J. Lu <hongjiu.lu@intel.com>
1662 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Set
1663 non_ir_ref_dynamic if a symbol is made dynamic by --dynamic-list.
1665 2018-03-19 Nick Clifton <nickc@redhat.com>
1667 * po/es.po: Updated Spanish translation.
1669 2018-03-15 Max Filippov <jcmvbkbc@gmail.com>
1671 * elf32-xtensa.c (xlate_map_entry): Change types of address
1672 fields from 'unsigned' to 'bfd_vma'.
1673 (xlate_offset_with_removed_text): Use struct xlate_map_entry as
1674 the key argument to bsearch. Allow offsets past the end of a
1675 section, use the last map entry for translation of such offsets.
1677 2018-03-15 Kuan-Lin Chen <kuanlinchentw@gmail.com>
1679 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Removed.
1680 Not support the target feature.
1681 (nds32_elf_ex9_itb_base): Likewise.
1682 (nds32_elf_ex9_import_table): Likewise.
1683 (nds32_elf_ex9_finish): Likewise.
1684 (nds32_elf_ex9_reloc_jmp): Likewise.
1685 (nds32_elf_get_insn_with_reg): Likewise.
1686 (nds32_get_local_syms): Likewise.
1687 (nds32_elf_ex9_replace_instruction): Likewise.
1688 (nds32_elf_ifc_calc): Likewise.
1689 (nds32_elf_ifc_finish): Likewise.
1690 (nds32_elf_ifc_replace): Likewise.
1691 (nds32_elf_ifc_reloc): Likewise.
1693 2018-03-14 Alan Modra <amodra@gmail.com>
1695 * elf64-ppc.c (sfpr_define): Adjust for stub_sec size having
1696 sfpr size added before defining alias symbols.
1697 (ppc64_elf_build_stubs): Add stub section padding before
1698 copying sfpr contents and defining save/restore alias symbols.
1700 2018-03-14 H.J. Lu <hongjiu.lu@intel.com>
1703 * elflink.c (elf_gc_mark_debug_section): Also check the local
1704 debug definition section.
1706 2018-03-13 Nick Clifton <nickc@redhat.com>
1709 * pei-x86_64.c (pex64_get_unwind_info): Change to a boolean
1710 function. Add an end address parameter. Check access of the data
1711 pointer to make sure that they do not extend beyond the end
1712 address. Return FALSE if any check fails. Add the end address
1713 pointer to the ui structure.
1714 (pex64_xdata_print_uwd_codes): Check accesses of the raw unwind
1715 codes to make sure that they do not extend beyond the end address
1716 pointer. Print an error message and return immediately if any
1719 2018-03-09 Nick Clifton <nickc@redhat.com>
1721 * elf64-s390.c (elf_s390_relocate_section): Move check for
1722 relocations against non-allocated sections to before the code that
1723 handles ifunc relocations.
1724 * elf32-s390.c (elf_s390_relocate_section): Likewise.
1725 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Treat
1726 relocs against IFUNC symbols in non-allocated sections as relocs
1727 against FUNC symbols.
1728 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
1730 2018-03-08 H.J. Lu <hongjiu.lu@intel.com>
1733 * elf32-i386.c (elf_i386_relocate_section): Treat relocation
1734 against IFUNC symbol in SHT_NOTE section without SHF_ALLOC as
1735 relocation against FUNC symbol.
1736 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1738 2018-03-07 Renlin Li <renlin.li@arm.com>
1741 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Check absolute
1742 symbol, and don't emit relocation in specific case.
1744 2018-03-07 Alan Modra <amodra@gmail.com>
1746 * elf64-mips.c (mips_elf64_rtype_to_howto): Return NULL on error.
1747 (mips_elf64_slurp_one_reloc_table): Pass on error.
1749 2018-03-03 James Cowgill <james.cowgill@mips.com>
1750 Maciej W. Rozycki <macro@mips.com>
1753 * elfxx-mips.c (mips_elf_calculate_relocation): Only return
1754 after calling `undefined_symbol' hook if this is an error
1755 condition. Assume the value of 0 for the symbol requested
1758 2018-03-02 Jim Wilson <jimw@sifive.com>
1761 * elfnn-aarch64.c (_bfd_aarch64_resize_stubs): Add 8 bytes for branch
1762 and nop instead of 4.
1763 (elfNN_arch64_build_stubs): Add nop after branch. Increase size by
1766 2018-03-01 Jim Wilson <jimw@sifive.com>
1769 * elfnn-riscv.c (riscv_relax_delete_bytes): When adjust st_size, use
1770 else if instead of if.
1772 2018-03-01 Alan Modra <amodra@gmail.com>
1774 * elf32-ft32.c (ft32_info_to_howto_rela): Correct range test.
1776 2018-02-28 Alan Modra <amodra@gmail.com>
1779 * aoutx.h (swap_std_reloc_in): Correct r_index bound check.
1781 2018-02-28 Nick Clifton <nickc@redhat.com>
1785 * dwarf2.c (read_n_bytes): Replace size parameter with dwarf_block
1786 pointer. Drop unused abfd parameter. Check the size of the block
1787 before initialising the data field. Return the end pointer if the
1789 (read_attribute_value): Adjust invocations of read_n_bytes.
1792 * dwarf1.c (parse_die): Check the length of form blocks before
1793 advancing the data pointer.
1795 2018-02-28 Alan Modra <amodra@gmail.com>
1798 * aoutx.h (translate_symbol_table): Print an error message and set
1799 bfd_error on finding an invalid name string offset.
1801 2018-02-27 H.J. Lu <hongjiu.lu@intel.com>
1803 * config.in: Regenerated.
1804 * configure: Likewise.
1805 * configure.ac: Add --enable-separate-code.
1806 (DEFAULT_LD_Z_SEPARATE_CODE): New AC_DEFINE_UNQUOTED. Default
1807 to 1 for Linux/x86 targets,
1808 * elf64-x86-64.c (ELF_MAXPAGESIZE): Set to 0x1000 if
1809 DEFAULT_LD_Z_SEPARATE_CODE is 1.
1811 2018-02-27 Nick Clifton <nickc@redhat.com>
1813 * aout-cris.c (swap_ext_reloc_out): Standadize error/warning
1815 * elf-hppa.h (elf_hppa_info_to_howto_rel): Likewise.
1816 * elf32-i386.c (elf_i386_reloc_type_lookup): Likewise.
1817 * elf32-xtensa.c (elf_xtensa_reloc_type_lookup): Likewise.
1818 * elf64-ppc.c (ppc64_elf_reloc_type_lookup): Likewise.
1819 * elf64-s390.c (elf_s390_reloc_type_lookup): Likewise.
1820 * elf64-sh64.c (sh_elf64_info_to_howto): Likewise.
1821 * elfxx-ia64.c (ia64_elf_reloc_type_lookup): Likewise.
1822 * elfxx-sparc.c (_bfd_sparc_elf_reloc_type_lookup): Likewise.
1823 * elfxx-tilegx.c (tilegx_reloc_type_lookup): Likewise.
1826 * elf-bfd.h (struct elf_backend_data): Change the return type of
1827 the elf_info_to_howto and elf_info_to_howto_rel function pointers
1829 * elfcode.h (elf_slurp_reloc_table_from_section): Check the return
1830 value from the info_to_howto function and fail if that function
1832 * elf32-h8300.c (elf32_h8_relocate_section): Check return value
1833 from the info_to_howto function.
1834 (elf32_h8_relax_section): Likewise.
1835 * elf32-lm32.c (lm32_elf_relocate_section): Likewise.
1836 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
1837 * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise.
1838 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
1839 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
1840 * elf64-ia64-vms.c (elf64_ia64_relocate_section): Likewise.
1841 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Likewise.
1842 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
1843 * elfnn-ia64.c (elfNN_ia64_relocate_section): Likewise.
1844 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
1845 (riscv_elf_relocate_section): Likewise.
1846 * elf-hppa.h (elf_hppa_info_to_howto): Change return type to
1847 bfd_boolean. Issue an error message, set an error value and
1848 return FALSE if the reloc is not recognized.
1849 (elf_hppa_info_to_howto_rel): Likewise.
1850 * elf-m10200.c (mn10200_info_to_howto): Likewise.
1851 * elf-m10300.c (mn10300_info_to_howto): Likewise.
1852 * elf.c (_bfd_elf_no_info_to_howto): Likewise.
1853 * elf32-arc.c (arc_info_to_howto_rel): Likewise.
1854 * elf32-arm.c (elf32_arm_info_to_howto): Likewise.
1855 * elf32-avr.c (avr_info_to_howto_rela): Likewise.
1856 * elf32-bfin.c (bfin_info_to_howto): Likewise.
1857 * elf32-cr16.c (elf_cr16_info_to_howto): Likewise.
1858 * elf32-cr16c.c (elf_cr16c_info_to_howto): Likewise.
1859 * elf32-cris.c (elf_cr16c_info_to_howto_rel)
1860 (cris_info_to_howto_rela): Likewise.
1861 * elf32-crx.c (elf_crx_info_to_howto): Likewise.
1862 * elf32-d10v.c (d10v_info_to_howto_rel): Likewise.
1863 * elf32-d30v.c (d30v_info_to_howto_rel, d30v_info_to_howto_rela):
1865 * elf32-dlx.c (dlx_rtype_to_howto, elf32_dlx_info_to_howto)
1866 (elf32_dlx_info_to_howto_rel): Likewise.
1867 * elf32-epiphany.c (epiphany_info_to_howto_rela): Likewise.
1868 * elf32-fr30.c (fr30_info_to_howto_rela): Likewise.
1869 * elf32-frv.c (frv_info_to_howto_rela)
1870 (frvfdpic_info_to_howto_rel): Likewise.
1871 * elf32-ft32.c (ft32_info_to_howto_rela): Likewise.
1872 * elf32-gen.c (elf_generic_info_to_howto)
1873 (elf_generic_info_to_howto_rel): Likewise.
1874 * elf32-h8300.c (elf32_h8_info_to_howto)
1875 (elf32_h8_info_to_howto_rel): Likewise.
1876 * elf32-i370.c (i370_elf_info_to_howto): Likewise.
1877 * elf32-i386.c (elf_i386_reloc_type_lookup)
1878 (elf_i386_rtype_to_howto, elf_i386_info_to_howto_rel): Likewise.
1879 * elf32-i860.c (lookup_howto, elf32_i860_info_to_howto_rela):
1881 * elf32-i960.c (elf32_i960_info_to_howto_rel): Likewise.
1882 * elf32-ip2k.c (ip2k_info_to_howto_rela): Likewise.
1883 * elf32-iq2000.c (iq2000_info_to_howto_rela): Likewise.
1884 * elf32-lm32.c (lm32_info_to_howto_rela): Likewise.
1885 * elf32-m32c.c (m32c_info_to_howto_rela): Likewise.
1886 * elf32-m32r.c (m32r_info_to_howto_rel, m32r_info_to_howto):
1888 * elf32-m68hc11.c (m68hc11_info_to_howto_rel): Likewise.
1889 * elf32-m68hc12.c (m68hc11_info_to_howto_rel): Likewise.
1890 * elf32-m68k.c (rtype_to_howto): Likewise.
1891 * elf32-mcore.c (mcore_elf_info_to_howto): Likewise.
1892 * elf32-mep.c (mep_info_to_howto_rela): Likewise.
1893 * elf32-metag.c (metag_info_to_howto_rela): Likewise.
1894 * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise.
1895 * elf32-mips.c (mips_info_to_howto_rel, mips_info_to_howto_rela):
1897 * elf32-moxie.c (moxie_info_to_howto_rela): Likewise.
1898 * elf32-msp430.c (msp430_info_to_howto_rela): Likewise.
1899 * elf32-mt.c (mt_info_to_howto_rela): Likewise.
1900 * elf32-nds32.c (nds32_info_to_howto_rel, nds32_info_to_howto):
1902 * elf32-nios2.c (nios2_elf32_info_to_howto): Likewise.
1903 * elf32-or1k.c (or1k_info_to_howto_rela): Likewise.
1904 * elf32-pj.c (pj_elf_info_to_howto): Likewise.
1905 * elf32-ppc.c (ppc_elf_info_to_howto): Likewise.
1906 * elf32-pru.c (pru_elf32_info_to_howto): Likewise.
1907 * elf32-rl78.c (rl78_info_to_howto_rela): Likewise.
1908 * elf32-rx.c (rx_info_to_howto_rela): Likewise.
1909 * elf32-s390.c (elf_s390_info_to_howto): Likewise.
1910 * elf32-score.c (s3_bfd_score_info_to_howto)
1911 (_bfd_score_info_to_howto): Likewise.
1912 * elf32-score7.c (s7_bfd_score_info_to_howto): Likewise.
1913 * elf32-sh.c (sh_elf_info_to_howto): Likewise.
1914 * elf32-spu.c (spu_elf_info_to_howto): Likewise.
1915 * elf32-tic6x.c (elf32_tic6x_info_to_howto)
1916 (elf32_tic6x_info_to_howto_rel): Likewise.
1917 * elf32-tilepro.c (tilepro_info_to_howto_rela): Likewise.
1918 * elf32-v850.c (v850_elf_info_to_howto_rel)
1919 (v850_elf_info_to_howto_rela, v800_elf_info_to_howto): Likewise.
1920 * elf32-vax.c (rtype_to_howto): Likewise.
1921 * elf32-visium.c (visium_info_to_howto_rela): Likewise.
1922 * elf32-wasm32.c (elf32_wasm32_rtype_to_howto)
1923 (elf32_wasm32_info_to_howto_rela): Likewise.
1924 * elf32-xc16x.c (elf32_xc16x_info_to_howto): Likewise.
1925 * elf32-xgate.c (xgate_info_to_howto_rel): Likewise.
1926 * elf32-xstormy16.c (xstormy16_info_to_howto_rela): Likewise.
1927 * elf32-xtensa.c (elf_xtensa_info_to_howto_rela): Likewise.
1928 * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise.
1929 * elf64-gen.c (elf_generic_info_to_howto)
1930 (elf_generic_info_to_howto_rel): Likewise.
1931 * elf64-ia64-vms.c (elf64_ia64_info_to_howto): Likewise.
1932 * elf64-mips.c (mips_elf64_info_to_howto_rela): Likewise.
1933 * elf64-mmix.c (mmix_info_to_howto_rela): Likewise.
1934 * elf64-ppc.c (ppc64_elf_info_to_howto): Likewise.
1935 * elf64-s390.c (elf_s390_reloc_type_lookup): Likewise.
1936 * elf64-sh64.c (elf_s390_info_to_howto, sh_elf64_info_to_howto):
1938 * elf64-x86-64.c (elf_x86_64_info_to_howto): Likewise.
1939 * elfn32-mips.c (mips_info_to_howto_rel, mips_info_to_howto_rela):
1941 * elfnn-aarch64.c (elfNN_aarch64_info_to_howto): Likewise.
1942 * elfnn-ia64.c (elfNN_ia64_info_to_howto): Likewise.
1943 * elfnn-riscv.c (riscv_info_to_howto_rela): Likewise.
1944 * elfxx-ia64.c (ia64_elf_reloc_type_lookup): Likewise.
1945 * elfxx-sparc.c (_bfd_sparc_elf_info_to_howto): Likewise.
1946 * elfxx-tilegx.c (tilegx_info_to_howto_rela): Likewise.
1947 * elf32-score.h (s7_bfd_score_info_to_howto): Update prototype.
1948 * elfxx-sparc.h (_bfd_sparc_elf_info_to_howto): Update prototype.
1949 * elfxx-tilegx.h (tilegx_info_to_howto_rela): Update prototype.
1950 * elfxx-target.h (elf_info_to_howto, elf_info_to_howto_rel):
1953 2018-02-26 Jim Wilson <jimw@sifive.com>
1954 Stephan Schreiber <info@fs-driver.org>
1957 * elfnn-ia64.c (elfNN_ia64_relax_section): After ia64_elf_relax_brl
1958 call, set changed_contents and changed_relocs. Likewise after
1959 successful ia64_elf_relax_br call.
1961 2018-02-26 Alan Modra <amodra@gmail.com>
1963 * elf.c (assign_file_positions_except_relocs): Don't segfault
1964 when actual number of phdrs is less than allocated. Delete
1965 outdated comment. Formatting.
1967 2018-02-26 Alan Modra <amodra@gmail.com>
1969 * elf-m10300.c, * elf-s390-common.c, * elf32-arc.c, * elf32-cris.c,
1970 * elf32-dlx.c, * elf32-frv.c, * elf32-i370.c, * elf32-lm32.c,
1971 * elf32-m32r.c, * elf32-m68hc1x.c, * elf32-m68k.c,
1972 * elf32-microblaze.c, * elf32-msp430.c, * elf32-nds32.c,
1973 * elf32-nios2.c, * elf32-or1k.c, * elf32-rl78.c, * elf32-rx.c,
1974 * elf32-score.c, * elf32-score7.c, * elf32-sh-symbian.c,
1975 * elf32-sh.c, * elf32-spu.c, * elf32-v850.c, * elf32-xtensa.c,
1976 * elf64-alpha.c, * elf64-ia64-vms.c, * elf64-mmix.c,
1977 * elf64-sh64.c, * elf64-sparc.c, * elfnn-ia64.c, * elfxx-tilegx.c,
1978 * mmo.c, * osf-core.c, * srec.c, * vms-alpha.c: Standardize
1979 error/warning messages.
1981 2018-02-26 Alan Modra <amodra@gmail.com>
1983 * archive.c, * bfd.c, * linker.c, * reloc.c, * stabs.c,
1984 * syms.c: Standardize error/warning messages.
1986 2018-02-26 Alan Modra <amodra@gmail.com>
1988 * aout-adobe.c, * aout-cris.c, * i386linux.c, * m68klinux.c,
1989 * sparclinux.c, * coff-alpha.c, * coff-arm.c, * coff-mcore.c,
1990 * coffcode.h, * coffgen.c, * cofflink.c, * ecoff.c, * pe-mips.c,
1991 * peXXigen.c, * peicode.h: Standardize error/warning messages.
1993 2018-02-26 Alan Modra <amodra@gmail.com>
1995 * elf32-arm.c, * elfnn-aarch64.c: Standardize error/warning messages.
1997 2018-02-26 Alan Modra <amodra@gmail.com>
1999 * elfxx-mips.c: Standardize error/warning messages.
2001 2018-02-26 Alan Modra <amodra@gmail.com>
2003 * dwarf2.c, * elf-attrs.c, * elf-eh-frame.c, * elf.c, * elf32-gen.c,
2004 * elflink.c: Standardize error/warning messages. Replace use of
2005 linker callback einfo with _bfd_error_handler when possible.
2007 2018-02-26 Alan Modra <amodra@gmail.com>
2009 * aoutx.h, * coff-alpha.c, * coff-i860.c, * coff-m68k.c,
2010 * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c,
2011 * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-w65.c,
2012 * elf-bfd.h, * elf-m10300.c, * elf.c, * elf32-avr.c, * elf32-bfin.c,
2013 * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c,
2014 * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c,
2015 * elf32-fr30.c, * elf32-frv.c, * elf32-i370.c, * elf32-i386.c,
2016 * elf32-i960.c, * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c,
2017 * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c,
2018 * elf32-m68k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c,
2019 * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c,
2020 * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-or1k.c,
2021 * elf32-pj.c, * elf32-ppc.c, * elf32-rl78.c, * elf32-rx.c,
2022 * elf32-s390.c, * elf32-sh.c, * elf32-spu.c, * elf32-tic6x.c,
2023 * elf32-v850.c, * elf32-vax.c, * elf32-visium.c, * elf32-wasm32.c,
2024 * elf32-xgate.c, * elf32-xtensa.c, * elf64-alpha.c,
2025 * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c,
2026 * elf64-ppc.c, * elf64-s390.c, * elf64-sparc.c, * elf64-x86-64.c,
2027 * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c,
2028 * elfnn-riscv.c, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-riscv.h,
2029 * elfxx-sparc.c, * elfxx-sparc.h, * reloc.c: Standardize
2030 unrecognized/unsupported reloc message.
2032 2018-02-26 Alan Modra <amodra@gmail.com>
2034 * elf32-ppc.c: Standardize error/warning messages. Use
2035 _bfd_error_handler rather than einfo when einfo features not used.
2036 * elf64-ppc.c: Likewise.
2038 2018-02-23 Alan Modra <amodra@gmail.com>
2041 * elf.c (assign_file_positions_for_non_load_sections): Remove RELRO
2042 segment if no matching LOAD segment.
2044 2018-02-23 Kuan-Lin Chen <kuanlinchentw@gmail.com>
2046 * elf32-nds32.h: Define mask for ict_model.
2048 2018-02-20 Jason Duerstock <jason.duerstock@gmail.com>
2050 * elfnn-ia64.c (elf_backend_can_gc_sections): Enable.
2052 2018-02-19 Maciej W. Rozycki <macro@mips.com>
2055 2018-01-12 Vlad Ivanov <vlad@ivanov.email>
2057 * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when
2058 .reginfo section has wrong size.
2060 2018-02-19 Maciej W. Rozycki <macro@mips.com>
2062 * elfxx-mips.c (_bfd_mips_elf_always_size_sections): Set
2063 SEC_FIXED_SIZE and SEC_HAS_CONTENTS flags for `.reginfo' and
2064 `.MIPS.abiflags' sections.
2065 (_bfd_mips_elf_final_link): Avoid reading beyond `.reginfo'
2068 2018-02-19 Maciej W. Rozycki <macro@mips.com>
2070 * section.c (SEC_FIXED_SIZE): New macro.
2071 * bfd-in2.h: Regenerate.
2073 2018-02-19 Maciej W. Rozycki <macro@mips.com>
2075 * section.c (SEC_HAS_GOT_REF): Remove macro.
2076 * bfd-in2.h: Regenerate.
2078 2018-02-19 Alan Modra <amodra@gmail.com>
2080 * elf-attrs.c (_bfd_elf_parse_attributes): Correct _bfd_error_handler
2082 * elfxx-mips.c (_bfd_mips_elf_final_link): Likewise.
2083 * elfnn-riscv.c (_bfd_riscv_relax_align): Likewise.
2084 (_bfd_riscv_relax_pc): Likewise and fix typos.
2085 * libbfd-in.h (_bfd_error_handler): Add attribute printf.
2086 * libbfd.h: Regenerate.
2088 2018-02-19 Alan Modra <amodra@gmail.com>
2090 * dwarf2.c (read_section): Don't use 'll' format modifier.
2091 (find_abstract_instance): Likewise.
2092 * elfcore.h (elf_core_file_p): Likewise.
2094 2018-02-19 Alan Modra <amodra@gmail.com>
2096 * bfd-in.h: Include inttypes.h or if not available define
2097 PRId64, PRIu64 and PRIx64.
2098 * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Remove support for L
2099 modifier to print bfd_vma.
2100 * coff-arm.c, * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c,
2101 * coff-sh.c, * coff-tic80.c, * coffcode.h, * coffgen.c, * cofflink.c,
2102 * compress.c, * dwarf2.c, * elf-m10300.c, * elf.c, * elf32-arc.c,
2103 * elf32-arm.c, * elf32-bfin.c, * elf32-cris.c, * elf32-hppa.c,
2104 * elf32-i386.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32r.c,
2105 * elf32-m68k.c, * elf32-metag.c, * elf32-nds32.c, * elf32-nios2.c,
2106 * elf32-ppc.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c,
2107 * elf32-score7.c, * elf32-sh.c, * elf32-sh64.c, * elf32-spu.c,
2108 * elf32-tic6x.c, * elf32-tilepro.c, * elf32-v850.c, * elf32-vax.c,
2109 * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c,
2110 * elf64-mmix.c, * elf64-s390.c, * elf64-sh64.c, * elf64-x86-64.c,
2111 * elfcode.h, * elfcore.h, * elflink.c, * elfnn-aarch64.c,
2112 * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-mips.c, * elfxx-sparc.c,
2113 * elfxx-tilegx.c, * ieee.c, * ihex.c, * mach-o.c, * merge.c, * mmo.c,
2114 * peXXigen.c, * xcofflink.c: Replace use of Lx modifier with PRIx64,
2115 and cast input to uint64_t, and similarly for Ld and Lu.
2116 * bfd-in2.h: Regenerate.
2118 2018-02-19 Alan Modra <amodra@gmail.com>
2120 * elf32-arm.c, * elf32-hppa.c, * elf32-lm32.c, * elf32-m32r.c,
2121 * elf32-metag.c, * elf32-nds32.c, * elf32-or1k.c, * elf32-ppc.c,
2122 * elf32-s390.c, * elf32-sh.c, * elf32-tic6x.c, * elf32-tilepro.c,
2123 * elf64-ppc.c, * elf64-s390.c, * elflink.c, * elfnn-aarch64.c,
2124 * elfnn-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c,
2125 * reloc.c: Replace use of %R and %T in format strings passed to
2126 einfo and friends by %pR and %pT.
2128 2018-02-19 Alan Modra <amodra@gmail.com>
2130 * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Handle %pA and %pB in place
2132 * aout-adobe.c: Update all messages using %A and %B.
2133 * aout-cris.c: Likewise.
2134 * aoutx.h: Likewise.
2135 * archive.c: Likewise.
2136 * binary.c: Likewise.
2137 * cache.c: Likewise.
2138 * coff-alpha.c: Likewise.
2139 * coff-arm.c: Likewise.
2140 * coff-i860.c: Likewise.
2141 * coff-mcore.c: Likewise.
2142 * coff-ppc.c: Likewise.
2143 * coff-rs6000.c: Likewise.
2144 * coff-sh.c: Likewise.
2145 * coff-tic4x.c: Likewise.
2146 * coff-tic54x.c: Likewise.
2147 * coff-tic80.c: Likewise.
2148 * coff64-rs6000.c: Likewise.
2149 * coffcode.h: Likewise.
2150 * coffgen.c: Likewise.
2151 * cofflink.c: Likewise.
2152 * coffswap.h: Likewise.
2153 * compress.c: Likewise.
2154 * cpu-arm.c: Likewise.
2155 * ecoff.c: Likewise.
2156 * elf-attrs.c: Likewise.
2157 * elf-eh-frame.c: Likewise.
2158 * elf-ifunc.c: Likewise.
2159 * elf-m10300.c: Likewise.
2160 * elf-properties.c: Likewise.
2161 * elf-s390-common.c: Likewise.
2163 * elf32-arc.c: Likewise.
2164 * elf32-arm.c: Likewise.
2165 * elf32-avr.c: Likewise.
2166 * elf32-bfin.c: Likewise.
2167 * elf32-cr16.c: Likewise.
2168 * elf32-cr16c.c: Likewise.
2169 * elf32-cris.c: Likewise.
2170 * elf32-crx.c: Likewise.
2171 * elf32-d10v.c: Likewise.
2172 * elf32-d30v.c: Likewise.
2173 * elf32-epiphany.c: Likewise.
2174 * elf32-fr30.c: Likewise.
2175 * elf32-frv.c: Likewise.
2176 * elf32-gen.c: Likewise.
2177 * elf32-hppa.c: Likewise.
2178 * elf32-i370.c: Likewise.
2179 * elf32-i386.c: Likewise.
2180 * elf32-i960.c: Likewise.
2181 * elf32-ip2k.c: Likewise.
2182 * elf32-iq2000.c: Likewise.
2183 * elf32-lm32.c: Likewise.
2184 * elf32-m32c.c: Likewise.
2185 * elf32-m32r.c: Likewise.
2186 * elf32-m68hc11.c: Likewise.
2187 * elf32-m68hc12.c: Likewise.
2188 * elf32-m68hc1x.c: Likewise.
2189 * elf32-m68k.c: Likewise.
2190 * elf32-mcore.c: Likewise.
2191 * elf32-mep.c: Likewise.
2192 * elf32-metag.c: Likewise.
2193 * elf32-microblaze.c: Likewise.
2194 * elf32-moxie.c: Likewise.
2195 * elf32-msp430.c: Likewise.
2196 * elf32-mt.c: Likewise.
2197 * elf32-nds32.c: Likewise.
2198 * elf32-nios2.c: Likewise.
2199 * elf32-or1k.c: Likewise.
2200 * elf32-pj.c: Likewise.
2201 * elf32-ppc.c: Likewise.
2202 * elf32-rl78.c: Likewise.
2203 * elf32-rx.c: Likewise.
2204 * elf32-s390.c: Likewise.
2205 * elf32-score.c: Likewise.
2206 * elf32-score7.c: Likewise.
2207 * elf32-sh-symbian.c: Likewise.
2208 * elf32-sh.c: Likewise.
2209 * elf32-sh64.c: Likewise.
2210 * elf32-sparc.c: Likewise.
2211 * elf32-spu.c: Likewise.
2212 * elf32-tic6x.c: Likewise.
2213 * elf32-tilepro.c: Likewise.
2214 * elf32-v850.c: Likewise.
2215 * elf32-vax.c: Likewise.
2216 * elf32-visium.c: Likewise.
2217 * elf32-wasm32.c: Likewise.
2218 * elf32-xgate.c: Likewise.
2219 * elf32-xtensa.c: Likewise.
2220 * elf64-alpha.c: Likewise.
2221 * elf64-gen.c: Likewise.
2222 * elf64-hppa.c: Likewise.
2223 * elf64-ia64-vms.c: Likewise.
2224 * elf64-mmix.c: Likewise.
2225 * elf64-ppc.c: Likewise.
2226 * elf64-s390.c: Likewise.
2227 * elf64-sh64.c: Likewise.
2228 * elf64-sparc.c: Likewise.
2229 * elf64-x86-64.c: Likewise.
2230 * elfcode.h: Likewise.
2231 * elfcore.h: Likewise.
2232 * elflink.c: Likewise.
2233 * elfnn-aarch64.c: Likewise.
2234 * elfnn-ia64.c: Likewise.
2235 * elfnn-riscv.c: Likewise.
2236 * elfxx-mips.c: Likewise.
2237 * elfxx-sparc.c: Likewise.
2238 * elfxx-tilegx.c: Likewise.
2239 * elfxx-x86.c: Likewise.
2240 * hpux-core.c: Likewise.
2243 * libbfd.c: Likewise.
2244 * linker.c: Likewise.
2245 * mach-o.c: Likewise.
2246 * merge.c: Likewise.
2248 * oasys.c: Likewise.
2249 * pdp11.c: Likewise.
2250 * pe-mips.c: Likewise.
2251 * peXXigen.c: Likewise.
2252 * peicode.h: Likewise.
2253 * reloc.c: Likewise.
2254 * rs6000-core.c: Likewise.
2256 * stabs.c: Likewise.
2257 * vms-alpha.c: Likewise.
2258 * xcofflink.c: Likewise.
2260 2018-02-19 Alan Modra <amodra@gmail.com>
2263 * elf.c (IS_TBSS): Define.
2264 (_bfd_elf_map_sections_to_segments): Use IS_TBSS.
2265 (assign_file_positions_for_non_load_sections): Revert last change.
2266 Properly calculate load segment limits to compare against relro limits.
2268 2018-02-17 Alan Modra <amodra@gmail.com>
2271 * elf.c (assign_file_positions_for_non_load_sections): Ignore
2272 degenerate zero size PT_LOAD segments when finding one overlapping
2273 the PT_GNU_RELRO segment.
2275 2018-02-16 Alan Modra <amodra@gmail.com>
2277 * libbfd.c (_bfd_bool_bfd_false_error): Rename from bfd_false.
2278 (_bfd_bool_bfd_true): Rename from bfd_true.
2279 (_bfd_ptr_bfd_null_error): Rename from bfd_nullvoidptr.
2280 (_bfd_int_bfd_0): Rename from bfd_0.
2281 (_bfd_uint_bfd_0): Rename from bfd_0u.
2282 (_bfd_long_bfd_0): Rename from bfd_0l.
2283 (_bfd_long_bfd_n1_error): Rename from _bfd_n1.
2284 (_bfd_void_bfd): Rename from bfd_void.
2285 (_bfd_bool_bfd_false, _bfd_bool_bfd_asymbol_false),
2286 (_bfd_bool_bfd_link_false_error),
2287 (_bfd_bool_bfd_link_true, _bfd_bool_bfd_bfd_true),
2288 (_bfd_bool_bfd_uint_true, _bfd_bool_bfd_ptr_true),
2289 (_bfd_bool_bfd_asection_bfd_asection_true),
2290 (_bfd_bool_bfd_asymbol_bfd_asymbol_true),
2291 (_bfd_void_bfd_link, _bfd_void_bfd_asection): New functions.
2292 * archive.c (_bfd_noarchive_get_elt_at_index),
2293 (_bfd_noarchive_openr_next_archived_file),
2294 (_bfd_noarchive_construct_extended_name_table),
2295 (_bfd_noarchive_write_ar_hdr, _bfd_noarchive_truncate_arname),
2296 (_bfd_noarchive_write_armap): New functions.
2297 * archures.c (_bfd_nowrite_set_arch_mach): New function.
2298 * coff-alpha.c (alpha_ecoff_swap_coff_aux_in),
2299 (alpha_ecoff_swap_coff_sym_in, alpha_ecoff_swap_coff_lineno_in),
2300 (alpha_ecoff_swap_coff_aux_out, alpha_ecoff_swap_coff_sym_out),
2301 (alpha_ecoff_swap_coff_lineno_out),
2302 (alpha_ecoff_swap_coff_reloc_out): New functions.
2303 * coff-mips.c (mips_ecoff_swap_coff_aux_in),
2304 (mips_ecoff_swap_coff_sym_in, mips_ecoff_swap_coff_lineno_in),
2305 (mips_ecoff_swap_coff_aux_out, mips_ecoff_swap_coff_sym_out),
2306 (mips_ecoff_swap_coff_lineno_out),
2307 (mips_ecoff_swap_coff_reloc_out): New functions.
2308 * coffcode.h (coff_set_alignment_hook): Replace define with
2310 (symname_in_debug_hook): Likewise.
2311 * ecoff.c (_bfd_ecoff_set_alignment_hook): New function.
2312 * elfxx-target.h (elf_backend_allow_non_load_phdr): Default to 0.
2313 * elf.c (assign_file_positions_except_relocs): Test
2314 elf_backend_allow_non_load_phdr for NULL.
2315 * elflink.c (_bfd_elf_omit_section_dynsym_default): Rename from
2316 _bfd_elf_link_omit_section_dynsym. Update uses.
2317 (_bfd_elf_omit_section_dynsym_all): New function.
2318 * elf-bfd.h (_bfd_elf_link_omit_section_dynsym): Delete.
2319 (_bfd_elf_omit_section_dynsym_default): Declare.
2320 (_bfd_elf_omit_section_dynsym_all): Declare.
2321 * linker.c (_bfd_nolink_sizeof_headers, _bfd_nolink_bfd_relax_section),
2322 (_bfd_nolink_bfd_get_relocated_section_contents),
2323 (_bfd_nolink_bfd_lookup_section_flags),
2324 (_bfd_nolink_bfd_is_group_section, _bfd_nolink_bfd_discard_group),
2325 (_bfd_nolink_bfd_link_hash_table_create),
2326 (_bfd_nolink_bfd_link_just_syms),
2327 (_bfd_nolink_bfd_copy_link_hash_symbol_type),
2328 (_bfd_nolink_bfd_link_split_section),
2329 (_bfd_nolink_section_already_linked),
2330 (_bfd_nolink_bfd_define_common_symbol),
2331 (_bfd_nolink_bfd_define_start_stop): New functions.
2332 * reloc.c (_bfd_norelocs_bfd_reloc_type_lookup),
2333 (_bfd_norelocs_bfd_reloc_name_lookup),
2334 (_bfd_nodynamic_canonicalize_dynamic_reloc): New functions.
2335 * section.c (_bfd_nowrite_set_section_contents): New function.
2336 * syms.c (_bfd_nosymbols_canonicalize_symtab),
2337 (_bfd_nosymbols_print_symbol, _bfd_nosymbols_get_symbol_info),
2338 (_bfd_nosymbols_get_symbol_version_string),
2339 (_bfd_nosymbols_bfd_is_local_label_name),
2340 (_bfd_nosymbols_get_lineno, _bfd_nosymbols_find_nearest_line),
2341 (_bfd_nosymbols_find_line, _bfd_nosymbols_find_inliner_info),
2342 (_bfd_nosymbols_bfd_make_debug_symbol),
2343 ( _bfd_nosymbols_read_minisymbols),
2344 ( _bfd_nosymbols_minisymbol_to_symbol),
2345 (_bfd_nodynamic_get_synthetic_symtab): New functions.
2346 * libbfd-in.h: Declare new functions. Update existing defines,
2348 * aix386-core.c: Update to use new hooks. Formatting.
2349 * aout-adobe.c: Likewise.
2350 * aout-arm.c: Likewise.
2351 * aout-target.h: Likewise.
2352 * aout-tic30.c: Likewise.
2353 * aoutf1.h: Likewise.
2354 * binary.c: Likewise.
2356 * cisco-core.c: Likewise.
2357 * coff-alpha.c: Likewise.
2358 * coff-i386.c: Likewise.
2359 * coff-i860.c: Likewise.
2360 * coff-i960.c: Likewise.
2361 * coff-ia64.c: Likewise.
2362 * coff-mips.c: Likewise.
2363 * coff-ppc.c: Likewise.
2364 * coff-rs6000.c: Likewise.
2365 * coff-sh.c: Likewise.
2366 * coff-tic30.c: Likewise.
2367 * coff-tic54x.c: Likewise.
2368 * coff-x86_64.c: Likewise.
2369 * coff64-rs6000.c: Likewise.
2370 * coffcode.h: Likewise.
2371 * elf-m10300.c: Likewise.
2372 * elf32-cr16.c: Likewise.
2373 * elf32-lm32.c: Likewise.
2374 * elf32-m32r.c: Likewise.
2375 * elf32-metag.c: Likewise.
2376 * elf32-score.c: Likewise.
2377 * elf32-score7.c: Likewise.
2378 * elf32-tilepro.c: Likewise.
2379 * elf32-xstormy16.c: Likewise.
2380 * elf32-xtensa.c: Likewise.
2381 * elf64-alpha.c: Likewise.
2382 * elf64-hppa.c: Likewise.
2383 * elf64-ia64-vms.c: Likewise.
2384 * elf64-mmix.c: Likewise.
2385 * elf64-sh64.c: Likewise.
2386 * elfnn-ia64.c: Likewise.
2387 * elfxx-sparc.c: Likewise.
2388 * elfxx-target.h: Likewise.
2389 * elfxx-tilegx.c: Likewise.
2390 * elfxx-x86.h: Likewise.
2391 * hp300hpux.c: Likewise.
2392 * hppabsd-core.c: Likewise.
2393 * hpux-core.c: Likewise.
2394 * i386msdos.c: Likewise.
2395 * i386os9k.c: Likewise.
2398 * irix-core.c: Likewise.
2399 * libaout.h: Likewise.
2400 * libecoff.h: Likewise.
2401 * mach-o-target.c: Likewise.
2402 * mach-o.c: Likewise.
2403 * mipsbsd.c: Likewise.
2405 * netbsd-core.c: Likewise.
2406 * nlm-target.h: Likewise.
2407 * oasys.c: Likewise.
2408 * osf-core.c: Likewise.
2409 * pdp11.c: Likewise.
2410 * pe-mips.c: Likewise.
2411 * pe-x86_64.c: Likewise.
2413 * plugin.c: Likewise.
2414 * ppcboot.c: Likewise.
2415 * ptrace-core.c: Likewise.
2416 * sco5-core.c: Likewise.
2418 * sparclynx.c: Likewise.
2420 * tekhex.c: Likewise.
2421 * trad-core.c: Likewise.
2422 * verilog.c: Likewise.
2423 * versados.c: Likewise.
2424 * vms-alpha.c: Likewise.
2425 * vms-lib.c: Likewise.
2426 * wasm-module.c: Likewise.
2428 * libbfd.h: Regenerate.
2430 2018-02-15 Jim Wilson <jimw@sifive.com>
2432 * elfnn-riscv.c (_bfd_riscv_relax_section): Ifdef out check to ignore
2433 symbols whose section address is zero.
2435 * elfnn-riscv.c (riscv_elf_relocate_section): Use bfd_reloc_dangerous
2436 when pcrel_lo reloc has an addend. Use reloc_dangerous callback for
2437 bfd_reloc_dangerous. Use einfo instead of warning callback for errors.
2438 Add %X%P to error messages.
2440 2018-02-15 Eric Botcazou <ebotcazou@adacore.com>
2443 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
2444 Pass FALSE instead of TRUE as 'create' argument to bfd_link_hash_lookup
2445 and assert that the result of the call is not NULL.
2447 2018-02-14 Nick Clifton <nickc@redhat.com>
2450 Revert previous delta. Add extra casts to avoid compile time
2452 * libbfd-in.h (_bfd_generic_bfd_copy_private_bfd_data): Add extra
2453 cast to avoid warning from gcc v8 compiler.
2454 (_bfd_generic_bfd_merge_private_bfd_data): Likewise.
2455 (_bfd_generic_bfd_set_private_flags): Likewise.
2456 (_bfd_generic_bfd_copy_private_section_data): Likewise.
2457 (_bfd_generic_bfd_copy_private_symbol_data): Likewise.
2458 (_bfd_generic_bfd_copy_private_header_data): Likewise.
2459 (_bfd_generic_bfd_print_private_bfd_data): Likewise.
2460 (_bfd_noarchive_construct_extended_name_table): Likewise.
2461 (_bfd_noarchive_truncate_arname): Likewise.
2462 (_bfd_noarchive_write_ar_hdr): Likewise.
2463 (_bfd_noarchive_get_elt_at_index): Likewise.
2464 (_bfd_nosymbols_canonicalize_symtab): Likewise.
2465 (_bfd_nosymbols_print_symbol): Likewise.
2466 (_bfd_nosymbols_get_symbol_info): Likewise.
2467 (_bfd_nosymbols_get_symbol_version_string): Likewise.
2468 (_bfd_nosymbols_bfd_is_local_label_name): Likewise.
2469 (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise.
2470 (_bfd_nosymbols_get_lineno): Likewise.
2471 (_bfd_nosymbols_find_nearest_line): Likewise.
2472 (_bfd_nosymbols_find_line): Likewise.
2473 (_bfd_nosymbols_find_inliner_info): Likewise.
2474 (_bfd_nosymbols_bfd_make_debug_symbol): Likewise.
2475 (_bfd_nosymbols_read_minisymbols): Likewise.
2476 (_bfd_nosymbols_minisymbol_to_symbol): Likewise.
2477 (_bfd_norelocs_bfd_reloc_type_lookup): Likewise.
2478 (_bfd_norelocs_bfd_reloc_name_lookup): Likewise.
2479 (_bfd_nowrite_set_arch_mach): Likewise.
2480 (_bfd_nowrite_set_section_contents): Likewise.
2481 (_bfd_nolink_sizeof_headers): Likewise.
2482 (_bfd_nolink_bfd_get_relocated_section_contents): Likewise.
2483 (_bfd_nolink_bfd_relax_section): Likewise.
2484 (_bfd_nolink_bfd_gc_sections): Likewise.
2485 (_bfd_nolink_bfd_lookup_section_flags): Likewise.
2486 (_bfd_nolink_bfd_merge_sections): Likewise.
2487 (_bfd_nolink_bfd_is_group_section): Likewise.
2488 (_bfd_nolink_bfd_discard_group): Likewise.
2489 (_bfd_nolink_bfd_link_hash_table_create): Likewise.
2490 (_bfd_nolink_bfd_link_add_symbols): Likewise.
2491 (_bfd_nolink_bfd_link_just_syms): Likewise.
2492 (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise.
2493 (_bfd_nolink_bfd_final_link): Likewise.
2494 (_bfd_nolink_bfd_link_split_section): Likewise.
2495 (_bfd_nolink_section_already_linked): Likewise.
2496 (_bfd_nolink_bfd_define_common_symbol): Likewise.
2497 (_bfd_nolink_bfd_define_start_stop): Likewise.
2498 (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise.
2499 (_bfd_nodynamic_get_synthetic_symtab): Likewise.
2500 (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise.
2501 (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise.
2502 * libbfd.c (bfd_false_any): Delete.
2503 (bfd_true_any, bfd_nullvoidptr_any, bfd_0_any): Delete.
2504 (bfd_0u_any, bfd_0l_any, _bfd_n1_any, bfd_void_any): Delete.
2505 * libbfd.h (extern): Regenerate
2506 * aout-target.h (MY_bfd_is_target_special_symbol): Add extra
2507 cast to avoid warning from gcc v8 compiler.
2508 * aout-tic30.c (tic30_aout_set_arch_mach): Likewise.
2509 * binary.c (binary_get_symbol_info): Likewise.
2510 * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
2511 * coff-mips.c (mips_ecoff_backend_data): Likewise.
2512 * coffcode.h (coff_set_alignment_hook): Likewise.
2513 (symname_in_debug_hook): Likewise.
2514 (bfd_coff_backend_data bigobj_swap_table): Likewise.
2515 * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise.
2516 * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise.
2517 * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise.
2518 * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise.
2519 * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise.
2520 * elf32-score.c (elf_backend_omit_section_dynsym): Likewise.
2521 * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise.
2522 * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise.
2523 * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise.
2524 * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise.
2525 * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise.
2526 * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise.
2527 * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise.
2528 * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise.
2529 * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise.
2530 * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise.
2531 (bfd_elfNN_bfd_make_debug_symbol): Likewise.
2532 (bfd_elfNN_bfd_merge_private_bfd_data): Likewise.
2533 (bfd_elfNN_bfd_set_private_flags): Likewise.
2534 (bfd_elfNN_bfd_is_target_special_symbol): Likewise.
2535 (elf_backend_init_index_section): Likewise.
2536 (elf_backend_allow_non_load_phdr): Likewise.
2537 * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise.
2538 * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise.
2539 * ieee.c (ieee_construct_extended_name_table): Likewise.
2540 (ieee_write_armap): Likewise.
2541 (ieee_write_ar_hdr): Likewise.
2542 (ieee_bfd_is_target_special_symbol): Likewise.
2543 * ihex.c (ihex_canonicalize_symtab): Likewise.
2544 (ihex_bfd_is_target_special_symbol): Likewise.
2545 * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise.
2546 * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise.
2547 (_bfd_ecoff_set_alignment_hook): Likewise.
2548 * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise.
2549 * mmo.c (mmo_bfd_is_target_special_symbol): Likewise.
2550 * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise.
2551 * oasys.c (oasys_construct_extended_name_table): Likewise.
2552 (oasys_write_armap): Likewise.
2553 (oasys_write_ar_hdr): Likewise.
2554 (oasys_bfd_is_target_special_symbol): Likewise.
2555 * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise.
2556 * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise.
2557 * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise.
2558 * som.c (som_bfd_is_target_special_symbol): Likewise.
2559 * srec.c (srec_bfd_is_target_special_symbol): Likewise.
2560 * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise.
2561 * verilog.c (verilog_bfd_is_target_special_symbol): Likewise.
2562 * versados.c (versados_bfd_is_target_special_symbol): Likewise.
2563 (versados_bfd_reloc_name_lookup): Likewise.
2564 * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise.
2565 (vms_bfd_define_start_stop): Likewise.
2566 (alpha_vms_bfd_is_target_special_symbol): Likewise.
2567 * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise.
2568 * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise.
2570 2018-02-14 H.J. Lu <hongjiu.lu@intel.com>
2573 * elf32-i386.c (elf_i386_check_relocs): Pass FALSE for non
2574 PC-relative PLT to NEED_DYNAMIC_RELOCATION_P.
2575 * elf64-x86-64.c (elf_x86_64_check_relocs): Create PLT for
2576 R_X86_64_PC32 reloc against dynamic function in data section.
2577 Pass TRUE for PC-relative PLT to NEED_DYNAMIC_RELOCATION_P.
2578 (elf_x86_64_relocate_section): Use PLT for R_X86_64_PC32 reloc
2579 against dynamic function in data section.
2580 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Use PLT in PIE as
2581 function address only if pcrel_plt is true.
2582 (_bfd_x86_elf_link_hash_table_create): Set pcrel_plt.
2583 * elfxx-x86.h (NEED_DYNAMIC_RELOCATION_P): Add PCREL_PLT for
2584 PC-relative PLT. If PLT is PC-relative, don't generate dynamic
2585 PC-relative relocation against a function definition in data
2586 secton in PIE. Remove the obsolete comments.
2587 (elf_x86_link_hash_table): Add pcrel_plt.
2589 2018-02-13 H.J. Lu <hongjiu.lu@intel.com>
2591 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Check bfd_link_dll,
2592 instead of bfd_link_pic, for building shared library.
2594 2018-02-13 H.J. Lu <hongjiu.lu@intel.com>
2597 * elf64-x86-64.c (is_32bit_relative_branch): Removed.
2598 (elf_x86_64_relocate_section): Check PIC relocations in PIE.
2599 Remove is_32bit_relative_branch usage. Disallow PC32 reloc
2600 against protected function in shared object.
2602 2018-02-13 Sergei Trofimovich <slyfox@inbox.ru>
2605 * po/ru.po: Fix typo in Russian translation.
2607 2018-02-13 Maciej W. Rozycki <macro@mips.com>
2609 * wasm-module.c (wasm_scan_name_function_section): Rename
2610 `index' local variable to `idx'.
2612 2018-02-13 Nick Clifton <nickc@redhat.com>
2615 Fix compile time warnings generated by gcc version 8.
2616 * libbfd-in.h: Remove extraneous text from prototypes.
2617 Add prototypes for bfd_false_any, bfd_true_any,
2618 bfd_nullvoidptr_any, bfd_0_any, bfd_0u_any, bfd_0l_any,
2619 bfd_n1_any, bfd_void_any.
2620 (_bfd_generic_bfd_copy_private_bfd_data): Use vararg based dummy
2622 (_bfd_generic_bfd_merge_private_bfd_data): Likewise.
2623 (_bfd_generic_bfd_set_private_flags): Likewise.
2624 (_bfd_generic_bfd_copy_private_section_data): Likewise.
2625 (_bfd_generic_bfd_copy_private_symbol_data): Likewise.
2626 (_bfd_generic_bfd_copy_private_header_data): Likewise.
2627 (_bfd_generic_bfd_print_private_bfd_data): Likewise.
2628 (_bfd_noarchive_construct_extended_name_table): Likewise.
2629 (_bfd_noarchive_truncate_arname): Likewise.
2630 (_bfd_noarchive_write_ar_hdr): Likewise.
2631 (_bfd_noarchive_get_elt_at_index): Likewise.
2632 (_bfd_nosymbols_canonicalize_symtab): Likewise.
2633 (_bfd_nosymbols_print_symbol): Likewise.
2634 (_bfd_nosymbols_get_symbol_info): Likewise.
2635 (_bfd_nosymbols_get_symbol_version_string): Likewise.
2636 (_bfd_nosymbols_bfd_is_local_label_name): Likewise.
2637 (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise.
2638 (_bfd_nosymbols_get_lineno): Likewise.
2639 (_bfd_nosymbols_find_nearest_line): Likewise.
2640 (_bfd_nosymbols_find_line): Likewise.
2641 (_bfd_nosymbols_find_inliner_info): Likewise.
2642 (_bfd_nosymbols_bfd_make_debug_symbol): Likewise.
2643 (_bfd_nosymbols_read_minisymbols): Likewise.
2644 (_bfd_nosymbols_minisymbol_to_symbol): Likewise.
2645 (_bfd_norelocs_bfd_reloc_type_lookup): Likewise.
2646 (_bfd_norelocs_bfd_reloc_name_lookup): Likewise.
2647 (_bfd_nowrite_set_arch_mach): Likewise.
2648 (_bfd_nowrite_set_section_contents): Likewise.
2649 (_bfd_nolink_sizeof_headers): Likewise.
2650 (_bfd_nolink_bfd_get_relocated_section_contents): Likewise.
2651 (_bfd_nolink_bfd_relax_section): Likewise.
2652 (_bfd_nolink_bfd_gc_sections): Likewise.
2653 (_bfd_nolink_bfd_lookup_section_flags): Likewise.
2654 (_bfd_nolink_bfd_merge_sections): Likewise.
2655 (_bfd_nolink_bfd_is_group_section): Likewise.
2656 (_bfd_nolink_bfd_discard_group): Likewise.
2657 (_bfd_nolink_bfd_link_hash_table_create): Likewise.
2658 (_bfd_nolink_bfd_link_add_symbols): Likewise.
2659 (_bfd_nolink_bfd_link_just_syms): Likewise.
2660 (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise.
2661 (_bfd_nolink_bfd_final_link): Likewise.
2662 (_bfd_nolink_bfd_link_split_section): Likewise.
2663 (_bfd_nolink_section_already_linked): Likewise.
2664 (_bfd_nolink_bfd_define_common_symbol): Likewise.
2665 (_bfd_nolink_bfd_define_start_stop): Likewise.
2666 (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise.
2667 (_bfd_nodynamic_get_synthetic_symtab): Likewise.
2668 (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise.
2669 (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise.
2670 * libbfd.c (bfd_false_any): New function. Like bfd_false but
2671 accepts one or more arguments.
2672 (bfd_true_any): Likewise.
2673 (bfd_nullvoidptr_any): Likewise.
2674 (bfd_0_any): Likewise.
2675 (bfd_0u_any): Likewise.
2676 (bfd_0l_any): Likewise.
2677 (_bfd_n1_any): Likewise.
2678 (bfd_void_any): Likewise.
2679 * libbfd.h (extern): Regenerate
2680 * aout-target.h (MY_bfd_is_target_special_symbol): Use vararg
2681 based dummy function.
2682 * aout-tic30.c (tic30_aout_set_arch_mach): Likewise.
2683 * binary.c (binary_get_symbol_info): Likewise.
2684 * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
2685 * coff-mips.c (mips_ecoff_backend_data): Likewise.
2686 * coffcode.h (coff_set_alignment_hook): Likewise.
2687 (symname_in_debug_hook): Likewise.
2688 (bfd_coff_backend_data bigobj_swap_table): Likewise.
2689 * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise.
2690 * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise.
2691 * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise.
2692 * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise.
2693 * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise.
2694 * elf32-score.c (elf_backend_omit_section_dynsym): Likewise.
2695 * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise.
2696 * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise.
2697 * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise.
2698 * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise.
2699 * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise.
2700 * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise.
2701 * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise.
2702 * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise.
2703 * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise.
2704 * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise.
2705 (bfd_elfNN_bfd_make_debug_symbol): Likewise.
2706 (bfd_elfNN_bfd_merge_private_bfd_data): Likewise.
2707 (bfd_elfNN_bfd_set_private_flags): Likewise.
2708 (bfd_elfNN_bfd_is_target_special_symbol): Likewise.
2709 (elf_backend_init_index_section): Likewise.
2710 (elf_backend_allow_non_load_phdr): Likewise.
2711 * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise.
2712 * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise.
2713 * ieee.c (ieee_construct_extended_name_table): Likewise.
2714 (ieee_write_armap): Likewise.
2715 (ieee_write_ar_hdr): Likewise.
2716 (ieee_bfd_is_target_special_symbol): Likewise.
2717 * ihex.c (ihex_canonicalize_symtab): Likewise.
2718 (ihex_bfd_is_target_special_symbol): Likewise.
2719 * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise.
2720 * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise.
2721 (_bfd_ecoff_set_alignment_hook): Likewise.
2722 * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise.
2723 * mmo.c (mmo_bfd_is_target_special_symbol): Likewise.
2724 * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise.
2725 * oasys.c (oasys_construct_extended_name_table): Likewise.
2726 (oasys_write_armap): Likewise.
2727 (oasys_write_ar_hdr): Likewise.
2728 (oasys_bfd_is_target_special_symbol): Likewise.
2729 * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise.
2730 * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise.
2731 * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise.
2732 * som.c (som_bfd_is_target_special_symbol): Likewise.
2733 * srec.c (srec_bfd_is_target_special_symbol): Likewise.
2734 * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise.
2735 * verilog.c (verilog_bfd_is_target_special_symbol): Likewise.
2736 * versados.c (versados_bfd_is_target_special_symbol): Likewise.
2737 (versados_bfd_reloc_name_lookup): Likewise.
2738 * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise.
2739 (vms_bfd_define_start_stop): Likewise.
2740 (alpha_vms_bfd_is_target_special_symbol): Likewise.
2741 * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise.
2742 * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise.
2743 * elf32-arc.c (get_replace_function): Assign replacement function
2745 * elf32-i370.c (i370_noop): Update prototype.
2747 2018-02-13 Alan Modra <amodra@gmail.com>
2750 * elf.c (_bfd_elf_fixup_group_sections): Account for removed
2751 relocation sections. If size reduces to just the flag word,
2752 remove that too and mark with SEC_EXCLUDE.
2753 * elflink.c (bfd_elf_final_link): Strip empty group sections.
2755 2018-02-13 Alan Modra <amodra@gmail.com>
2758 * elf.c (assign_file_positions_for_non_load_sections): Rewrite
2761 2018-02-12 Zebediah Figura <z.figura12@gmail.com>
2763 * i386msdos.c (msdos_mkobject); New function.
2764 (msdos_object_p): New function.
2765 (i386_msdos_vec): Use msdos_object_p as the check_format
2767 * peicode.h: Rename external_PEI_DOS_hdr, DOSMAGIC, and
2768 NT_SIGNATURE to external_DOS_hdr, IMAGE_DOS_SIGNATURE, and
2770 * peXXigen.c: Likewise.
2771 * coff-ia64.c: Likewise.
2773 2018-02-12 Nick Clifton <nickc@redhat.com>
2775 * elf32-nds32.c (nds32_elf_relax_longjump3): Remove redundant
2777 * elf32-arc.c (elf_arc_relocate_section): Likewise.
2779 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
2781 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Reorder conditions.
2782 (sparc_elf_append_rela): Assert that there is enough room in section.
2783 (_bfd_sparc_elf_copy_indirect_symbol): Fix formatting.
2784 (_bfd_sparc_elf_adjust_dynamic_symbol): Minor tweak.
2785 (allocate_dynrelocs): Remove outdated comments and reorder conditions.
2786 For a symbol subject to a GOT relocation, reserve a slot in the
2787 relocation section if the symbol isn't dynamic and we are in PIC mode.
2788 (_bfd_sparc_elf_relocate_section) <R_SPARC_GOTDATA_OP>: If relocation
2789 is relaxed and a slot was reserved, generate a R_SPARC_NONE relocation.
2790 <R_SPARC_GOTDATA_OP_HIX22>: Adjust comments.
2791 <R_SPARC_PC10>: Reorder conditions. Remove always-false assertion.
2792 (_bfd_sparc_elf_finish_dynamic_symbol): Rename local_undefweak into
2793 resolved_to_zero. Do not generate a dynamic GOT relocation for an
2794 undefined weak symbol with non-default visibility. Remove superfluous
2795 'else' and fix formatting.
2797 2018-02-09 H.J. Lu <hongjiu.lu@intel.com>
2799 * elf32-i386.c (elf_i386_get_synthetic_symtab): Also handle
2801 (i386_elf32_sol2_vec): Don't declare.
2802 (elf_i386_link_setup_gnu_properties): Also handle is_solaris.
2803 Don't set need_global_offset_table.
2804 (elf_i386_solaris_arch_bed): New.
2805 (elf_backend_arch_data): Set to elf_i386_solaris_arch_bed for
2807 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Check
2808 target_os != is_nacl instead of target_os == is_normal.
2809 (x86_64_elf64_sol2_vec): Don't declare.
2810 (elf_x86_64_link_setup_gnu_properties): Check target_os !=
2811 is_nacl instead of target_os == is_normal. Don't set
2812 need_global_offset_table.
2813 (elf_x86_64_solaris_arch_bed): New.
2814 (elf_backend_arch_data): Set to elf_x86_64_solaris_arch_bed for
2816 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep
2817 _GLOBAL_OFFSET_TABLE_ for Solaris.
2818 (_bfd_x86_elf_link_setup_gnu_properties): Don't copy
2819 need_global_offset_table.
2820 * elfxx-x86.h (elf_x86_target_os): Add is_solaris.
2821 (elf_x86_link_hash_table): Remove need_global_offset_table.
2822 (elf_x86_init_table): Likewise.
2824 2018-02-08 H.J. Lu <hongjiu.lu@intel.com>
2826 * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
2828 (i386_elf32_sol2_vec): Declared.
2829 (elf_i386_link_setup_gnu_properties): Set
2830 need_global_offset_table with info->output_bfd->xvec.
2831 * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
2833 (x86_64_elf64_sol2_vec): Declared.
2834 (elf_x86_64_link_setup_gnu_properties): Set
2835 need_global_offset_table with info->output_bfd->xvec.
2837 2018-02-08 H.J. Lu <hongjiu.lu@intel.com>
2839 * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
2841 (elf_i386_link_setup_gnu_properties): Set need_global_offset_table
2843 * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
2845 (elf_x86_64_link_setup_gnu_properties): Set
2846 need_global_offset_table for Solaris.
2847 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep the
2848 unused _GLOBAL_OFFSET_TABLE_ for Solaris.
2849 (_bfd_x86_elf_link_setup_gnu_properties): Copy
2850 need_global_offset_table.
2851 * elfxx-x86.h (elf_x86_link_hash_table): Add
2852 need_global_offset_table.
2853 (elf_x86_init_table): Likewise.
2855 2018-02-08 Jim Wilson <jimw@sifive.com>
2857 * elfnn-riscv.c (riscv_elf_relocate_section): Add comment for previous
2860 2018-02-08 Nick Clifton <nickc@redhat.com>
2863 * elf.c (elf_parse_notes): Reject notes with excessuively large
2866 2018-02-07 Alan Modra <amodra@gmail.com>
2868 Revert 2018-01-17 Alan Modra <amodra@gmail.com>
2869 * elf32-ppc.c: Remove speculation barrier support.
2870 * elf32-ppc.h: Likewise.
2871 * elf64-ppc.c: Likewise.
2872 * elf64-ppc.h: Likewise.
2874 2018-02-06 Jim Wilson <jimw@sifive.com>
2876 * elfnn-riscv.c (riscv_elf_relocate_section): Return TRUE if used
2877 callback to report an error.
2879 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
2882 * elfxx-sparc.c (sparc_elf_tls_transition): Turn call to bfd_link_pic
2883 into call to !bfd_link_executable and tidy up.
2884 (_bfd_sparc_elf_check_relocs): Fix formatting and tidy up.
2885 <R_SPARC_TLS_LE_HIX22>: Turn call to bfd_link_pic into call to
2886 !bfd_link_executable.
2887 <R_SPARC_TLS_IE_HI22>: Likewise.
2888 <GOT relocations>: Remove useless code, tidy and merge related blocks.
2889 <R_SPARC_TLS_GD_CALL>: Turn call to bfd_link_pic into call to
2890 !bfd_link_executable.
2891 <R_SPARC_WPLT30>: Tidy up.
2892 (_bfd_sparc_elf_gc_mark_hook): Turn call to bfd_link_pic into call to
2893 !bfd_link_executable.
2894 (allocate_dynrelocs): Likewise.
2895 (_bfd_sparc_elf_relocate_section): Fix formatting and tidy up.
2896 <R_SPARC_TLS_GD_HI22>: Merge into...
2897 <R_SPARC_TLS_GD_LO10>: ...this. Adjust 4th argument in call to
2898 sparc_elf_tls_transition and remove redundant code.
2899 <R_SPARC_TLS_LDM_HI22>: Turn call to bfd_link_pic into call to
2900 !bfd_link_executable.
2901 <R_SPARC_TLS_LDO_HIX22>: Likewise.
2902 <R_SPARC_TLS_LE_HIX22>: Likewise. Tidy up.
2903 <R_SPARC_TLS_LDM_CALL>: Likewise.
2904 <R_SPARC_TLS_GD_CALL>: Likewise. Tidy up.
2905 <R_SPARC_TLS_GD_ADD>: Likewise.
2906 <R_SPARC_TLS_LDM_ADD>: Likewise.
2907 <R_SPARC_TLS_LDO_ADD>: Likewise.
2908 <R_SPARC_TLS_IE_LD>: Likewise.
2910 2018-02-06 Miloš Stojanović <milos.stojanovic@rt-rk.com>
2913 * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): If the dwarf
2914 functions failed to find the function name, try the generic elf
2915 find function instead.
2917 2018-02-06 Sergio Durigan Junior <sergiodj@redhat.com>
2919 * coff-rs6000.c (xcoff_write_archive_contents_old): Use
2920 'memcpy' instead of 'strncpy' when writing the magic number.
2922 2018-02-06 Nick Clifton <nickc@redhat.com>
2925 * opncls.c (bfd_get_debug_link_info_1): Check the size of the
2926 section before attempting to read it in.
2927 (bfd_get_alt_debug_link_info): Likewise.
2929 2018-02-06 Paul Carroll <pcarroll@codesourcery.com>
2931 * bfd/dwarf2.c (find_abstract_name): Modified to return file and
2932 line information in addition to name, if they can be found.
2934 2018-02-05 Renlin Li <renlin.li@arm.com>
2937 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Relax the
2938 R_AARCH64_ABS32 and R_AARCH64_ABS16 for absolute symbol. Apply the
2939 check for writeable section as well.
2941 2018-02-05 H.J. Lu <hongjiu.lu@intel.com>
2944 * elf32-i386.c (elf_i386_check_relocs): Set got_referenced if
2945 _GLOBAL_OFFSET_TABLE_ is referenced or GOT is needed to resolve
2946 undefined weak symbol to 0.
2947 * elf64-x86-64.c (elf_x86_64_check_relocs): Set got_referenced
2948 if _GLOBAL_OFFSET_TABLE_ is referenced.
2949 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Check
2950 got_referenced instead of ref_regular_nonweak. Remove the
2951 unused _GLOBAL_OFFSET_TABLE_ from symbol table.
2952 * elfxx-x86.h (elf_x86_link_hash_table): Add got_referenced.
2954 2018-02-05 Maciej W. Rozycki <macro@mips.com>
2956 * elfnn-riscv.c (_bfd_riscv_relax_pc): Use `memset' to
2957 initialize `hi_reloc'.
2959 2018-02-05 Maciej W. Rozycki <macro@mips.com>
2961 * elfxx-mips.c (_bfd_mips_elf_section_processing): For
2962 SHT_MIPS_REGINFO sections don't assert the correct size and
2963 report an error instead.
2965 2018-02-05 Maciej W. Rozycki <macro@mips.com>
2967 * elf.c (_bfd_elf_write_object_contents): Propagate a failure
2968 status from `->elf_backend_section_processing'.
2970 2018-02-02 Jim Wilson <jimw@sifive.com>
2973 * elfnn-riscv.c (riscv_relax_delete_bytes): New parameter link_info.
2974 If link_info->wrap_hash, check for a duplicate symbol and ignore.
2975 (_bfd_riscv_relax_call, bfd_riscv_relax_lui, _bfd_riscv_relax_tls_le):
2976 Pass new argument to riscv_relax_delete_bytes.
2977 (_bfd_riscv_relax_align, _bfd_riscv_relax_delete): Likewise. Remove
2978 ATTRIBUTE_UNUSED from link_info parameter.
2980 2018-02-02 Alan Modra <amodra@gmail.com>
2982 * elf64-ppc.c (ppc64_elf_relocate_section): Don't relocate nops
2983 emitted for toc sequence optimization. Set and use "howto" later.
2985 2018-02-01 Simon Marchi <simon.marchi@ericsson.com>
2987 * elf64-ppc.c (ppc64_elf_archive_symbol_lookup): Avoid pointer
2988 arithmetic on NULL pointer.
2989 * elflink.c (_bfd_elf_archive_symbol_lookup,
2990 elf_link_add_archive_symbols): Likewise.
2992 2018-01-31 Michael Matz <matz@suse.de>
2994 * elflink.c (bfd_elf_define_start_stop): Fix check of
2997 2018-01-31 H.J. Lu <hongjiu.lu@intel.com>
3000 * elflink.c (bfd_elf_define_start_stop): Check if __start and
3001 __stop symbols are referenced by shared objects.
3003 2018-01-30 Alan Modra <amodra@gmail.com>
3006 * elf.c (_bfd_elf_map_sections_to_segments): Don't start a new
3007 segment when demand paged with lma on the same page. Test this
3008 before load/non-load, executable/non-executable,
3009 writable/non-writable tests and simplify. Delete bogus relro
3010 condition in writable/non-writable test. Delete outdated
3011 comment. Formatting.
3013 2018-01-30 Alan Modra <amodra@gmail.com>
3015 * elflink.c (bfd_elf_define_start_stop): Make __start and __stop
3018 2018-01-29 Alan Modra <amodra@gmail.com>
3021 * coffgen.c (coff_pointerize_aux): Ensure auxent tagndx is in
3022 range before converting to a symbol table pointer.
3024 2018-01-27 Nick Clifton <nickc@redhat.com>
3026 * po/ru.po: Updated Russian translation.
3028 2018-01-26 Alan Modra <amodra@gmail.com>
3030 * elflink.c (bfd_elf_define_start_stop): Override symbols when
3031 they are defined dynamically.
3033 2018-01-26 Alan Modra <amodra@gmail.com>
3035 * elf64-ppc.c (ppc64_elf_size_stubs): Iterate sizing when
3036 .branch_lt changes size.
3038 2018-01-25 Alan Modra <amodra@gmail.com>
3041 * elfcode.h (elf_object_p): Avoid integer overflow.
3043 2018-01-25 Eric Botcazou <ebotcazou@adacore.com>
3046 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
3047 Do a mere lookup of the __tls_get_addr symbol instead of adding it.
3050 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
3053 * elfxx-sparc.c (sparc_elf_tls_transition): Replace
3054 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
3055 bfd_link_executable for TLS check.
3056 (_bfd_sparc_elf_check_relocs): Likewise.
3057 (allocate_dynrelocs): Likewise.
3058 (_bfd_sparc_elf_relocate_section): Likewise.
3060 2018-01-24 Renlin Li <renlin.li@arm.com>
3062 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Add support for
3063 BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
3064 BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
3065 BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
3066 BFD_RELOC_AARCH64_MOVW_PREL_G3.
3067 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
3068 (_bfd_aarch64_elf_resolve_relocation): Likewise.
3070 2018-01-24 Renlin Li <renlin.li@arm.com>
3072 * reloc.c: Add BFD_RELOC_AARCH64_MOVW_PREL_G0,
3073 BFD_RELOC_AARCH64_MOVW_PREL_G0_NC, BFD_RELOC_AARCH64_MOVW_PREL_G1,
3074 BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, BFD_RELOC_AARCH64_MOVW_PREL_G2,
3075 BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, BFD_RELOC_AARCH64_MOVW_PREL_G3.
3076 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Add entries for
3077 BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
3078 BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
3079 BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
3080 BFD_RELOC_AARCH64_MOVW_PREL_G3.
3081 * bfd-in2.h: Regenerate.
3082 * libbfd.h: Regenerate.
3084 2018-01-23 Maciej W. Rozycki <macro@mips.com>
3086 * elfxx-mips.c (_bfd_mips_elf_final_link): Update a stale
3087 `mips_elf32_section_processing' comment reference.
3089 2018-01-20 H.J. Lu <hongjiu.lu@intel.com>
3092 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Check the
3093 versioned __tls_get_addr symbol.
3095 2018-01-19 Nick Clifton <nickc@redhat.com>
3097 * po/fr.po: Updated French translation.
3099 2018-01-18 Alan Modra <amodra@gmail.com>
3101 * elf32-ppc.c (ppc_elf_create_glink): Correct alignment of .glink.
3102 * elf64-ppc.c (ppc64_elf_size_stubs): Handle negative plt_stub_align.
3103 (ppc64_elf_build_stubs): Likewise.
3105 2018-01-17 Nick Clifton <nickc@redhat.com>
3107 * po/ru.po: Updated Russian translation.
3108 * po/uk/po: Updated Ukranian translation.
3110 2018-01-17 Alan Modra <amodra@gmail.com>
3112 * elf64-ppc.c (ppc64_elf_build_stubs): Silence gcc warning.
3114 2018-01-17 Alan Modra <amodra@gmail.com>
3116 * elf32-ppc.c (GLINK_ENTRY_SIZE): Handle speculation barrier.
3117 (CRSETEQ, BEQCTRM): Define.
3118 (is_nonpic_glink_stub): Don't check bctr.
3119 (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
3120 (ppc_elf_relax_section): Size speculation barrier.
3121 (output_bctr): New function.
3122 (write_glink_stub): Use output_bctr.
3123 (ppc_elf_relocate_section): Use output_bctr for long branch stub.
3124 (ppc_elf_finish_dynamic_symbol): Likewise.
3125 (ppc_elf_finish_dynamic_sections): Use output_bctr.
3126 * elf32-ppc.h (struct ppc_elf_params): Add speculate_indirect_jumps.
3127 * elf64-ppc.c (CRSETEQ, BEQCTRM, BEQCTRLM): Define.
3128 (GLINK_PLTRESOLVE_SIZE): Size speculation barrier.
3129 (size_global_entry_stubs): Handle speculation barrier sizing.
3130 (plt_stub_size): Likewise.
3131 (output_bctr): New function.
3132 (build_plt_stub, build_tls_get_addr_stub): Output speculation
3134 (ppc_build_one_stub): Likewise for ppc_stub_plt_branch.
3135 (ppc_size_one_stub): Size speculation barrier in ppc_stub_plt_branch.
3136 (build_global_entry_stubs): Output speculation barrier.
3137 (ppc64_elf_build_stubs): Likewise in __glink_PLTresolve stub.
3138 * elf64-ppc.h (struct ppc64_elf_params): Add speculate_indirect_jumps.
3140 2018-01-17 Alan Modra <amodra@gmail.com>
3142 * elf32-ppc.c (GLINK_ENTRY_SIZE): Add parameters, handle
3143 __tls_get_addr_opt, and alignment sizing.
3144 (TLS_GET_ADDR_GLINK_SIZE): Delete.
3145 (is_nonpic_glink_stub): Don't use GLINK_ENTRY_SIZE.
3146 (ppc_elf_get_synthetic_symtab): Recognize stubs spaced at 4, 6,
3148 (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
3149 (allocate_dynrelocs): Use new GLINK_ENTRY_SIZE.
3150 (ppc_elf_size_dynamic_sections): Likewise. Size branch table
3152 (write_glink_stub): Handle __tls_get_addr_opt stub.
3153 Pad out to size given by GLINK_ENTRY_SIZE.
3154 (ppc_elf_relocate_section): Adjust write_glink_stub call.
3155 (ppc_elf_finish_dynamic_symbol): Likewise.
3156 (ppc_elf_finish_dynamic_sections): Write PLTresolve without using
3157 insn array since so many need rewriting.
3158 * elf32-ppc.h (struct ppc_elf_params): Add plt_stub_align.
3159 * elf64-ppc.c (GLINK_PLTRESOLVE_SIZE): Rename from
3160 GLINK_CALL_STUB_SIZE. Add htab param and evaluate to size without
3161 nops. Adjust all uses.
3162 (ppc64_elf_get_synthetic_symtab): Don't use GLINK_CALL_STUB_SIZE
3163 in glink_vma calculation.
3164 (struct ppc_link_hash_table): Add global_entry section pointer.
3165 (create_linkage_sections): Create separate section for global
3167 (PPC_LO, PPC_HI, PPC_HA): Move earlier.
3168 (size_global_entry_stubs): Handle sizing for aligned stubs.
3169 (ppc64_elf_size_dynamic_sections): Handle global_entry alloc,
3170 and don't stash end of glink branch table in rawsize.
3171 (ppc_build_one_stub): Rewrite stub size calculations.
3172 (build_global_entry_stubs): Use new section.
3173 (ppc64_elf_build_stubs): Don't pad __glink_PLTresolve with nops.
3174 Build lazy link stubs out to end of section. Build global entry
3175 stubs in new section.
3177 2018-01-15 Nick Clifton <nickc@redhat.com>
3179 * po/uk.po: Updated Ukranian translation.
3181 2018-01-13 Nick Clifton <nickc@redhat.com>
3183 * po/bfd.pot: Regenerated.
3185 2018-01-13 Nick Clifton <nickc@redhat.com>
3187 * version.m4: Bump version to 2.30.51
3188 * configure: Regenerate.
3190 2018-01-13 Nick Clifton <nickc@redhat.com>
3192 2.30 branch created.
3194 2018-01-12 Jens Widell <jl@opera.com>
3196 * elf.c (setup_group): Optimize search for group by remembering
3197 last found group and restarting search at that index.
3198 * elf-bfd.h (struct elf_obj_tdata): Add group_search_offset field.
3200 2018-01-12 Gunther Nikl <gnikl@users.sourceforge.net>
3202 * aoutx.h (aout_link_check_ar_symbols): Remove default and handle
3203 bfd_link_common_skip_none in switch.
3205 2018-01-12 Alan Modra <amodra@gmail.com>
3208 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Ignore dynamic
3209 references on forced local symbols.
3211 2018-01-12 Vlad Ivanov <vlad@ivanov.email>
3213 * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when
3214 .reginfo section has wrong size.
3216 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
3219 * elf.c (_bfd_elf_map_sections_to_segments): When generating
3220 separate code and read-only data LOAD segments, create a new
3221 LOAD segment if the previous section contains text and the
3222 current section doesn't or vice versa. Don't put a writable
3223 section in a read-only segment if there is a RELRO segment.
3225 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
3228 * elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Ignore dynamic
3229 references on forced local symbols.
3231 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
3234 * elflink.c (bfd_elf_gc_sections): Keep all PREINIT_ARRAY,
3235 INIT_ARRAY as well as FINI_ARRAY sections for ld -r --gc-section.
3237 2018-01-09 Kuan-Lin Chen <kuanlinchentw@gmail.com>
3240 * elf32-nds32.c (nds32_elf_relax_loadstore): Fix a typographical error.
3242 2018-01-03 John Baldwin <jhb@FreeBSD.org>
3244 * elf.c (elfcore_grok_freebsd_note): Handle
3245 NT_FREEBSD_PROCSTAT_PROC, NT_FREEBSD_PROCSTAT_FILES, and
3246 NT_FREEBSD_PROCSTAT_VMMAP.
3248 2018-01-03 Alan Modra <amodra@gmail.com>
3250 Update year range in copyright notice of all files.
3252 For older changes see ChangeLog-2017
3254 Copyright (C) 2018 Free Software Foundation, Inc.
3256 Copying and distribution of this file, with or without modification,
3257 are permitted in any medium without royalty provided the copyright
3258 notice and this notice are preserved.
3264 version-control: never