1 2018-07-17 Maciej W. Rozycki <macro@mips.com>
3 * elf32-nds32.c (nds32_elf_relax_loadstore): Use
4 `bfd_is_abs_symbol' rather than `bfd_is_abs_section' in checking
5 whether the symbol is absolute.
6 (nds32_elf_relax_lo12): Likewise.
7 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
8 (elfNN_aarch64_check_relocs): Likewise.
9 * xcofflink.c (xcoff_need_ldrel_p): Likewise.
10 (bfd_xcoff_import_symbol): Likewise.
11 (xcoff_write_global_symbol): Likewise.
13 2018-07-17 Maciej W. Rozycki <macro@mips.com>
15 * linker.c (bfd_is_abs_symbol): New macro.
16 * bfd-in2.h: Regenerate.
18 2018-07-16 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
20 * elf-bfd.h (elfcore_write_ppc_tar): Add prototype.
21 (elfcore_write_ppc_ppr): Likewise.
22 (elfcore_write_ppc_dscr): Likewise.
23 (elfcore_write_ppc_ebb): Likewise.
24 (elfcore_write_ppc_pmu): Likewise.
25 (elfcore_write_ppc_tm_cgpr): Likewise.
26 (elfcore_write_ppc_tm_cfpr): Likewise.
27 (elfcore_write_ppc_tm_cvmx): Likewise.
28 (elfcore_write_ppc_tm_cvsx): Likewise.
29 (elfcore_write_ppc_tm_spr): Likewise.
30 (elfcore_write_ppc_tm_ctar): Likewise.
31 (elfcore_write_ppc_tm_cppr): Likewise.
32 (elfcore_write_ppc_tm_cdscr): Likewise.
33 * elf.c (elfcore_write_ppc_tar): New function.
34 (elfcore_write_ppc_ppr): Likewise.
35 (elfcore_write_ppc_dscr): Likewise.
36 (elfcore_write_ppc_ebb): Likewise.
37 (elfcore_write_ppc_pmu): Likewise.
38 (elfcore_write_ppc_tm_cgpr): Likewise.
39 (elfcore_write_ppc_tm_cfpr): Likewise.
40 (elfcore_write_ppc_tm_cvmx): Likewise.
41 (elfcore_write_ppc_tm_cvsx): Likewise.
42 (elfcore_write_ppc_tm_spr): Likewise.
43 (elfcore_write_ppc_tm_ctar): Likewise.
44 (elfcore_write_ppc_tm_cppr): Likewise.
45 (elfcore_write_ppc_tm_cdscr): Likewise.
46 (elfcore_write_register_note): Call them.
47 (elfcore_grok_ppc_tar): New function.
48 (elfcore_grok_ppc_ppr): Likewise.
49 (elfcore_grok_ppc_dscr): Likewise.
50 (elfcore_grok_ppc_ebb): Likewise.
51 (elfcore_grok_ppc_pmu): Likewise.
52 (elfcore_grok_ppc_tm_cgpr): Likewise.
53 (elfcore_grok_ppc_tm_cfpr): Likewise.
54 (elfcore_grok_ppc_tm_cvmx): Likewise.
55 (elfcore_grok_ppc_tm_cvsx): Likewise.
56 (elfcore_grok_ppc_tm_spr): Likewise.
57 (elfcore_grok_ppc_tm_ctar): Likewise.
58 (elfcore_grok_ppc_tm_cppr): Likewise.
59 (elfcore_grok_ppc_tm_cdscr): Likewise.
60 (elfcore_grok_note): Call them.
62 2018-07-11 Maciej W. Rozycki <macro@mips.com>
64 * elfxx-mips.c (mips_tls_got_relocs): Use `bfd_link_dll' rather
65 than `!bfd_link_pic' in determining the dynamic symbol index.
66 Avoid the index of -1.
67 (mips_elf_initialize_tls_slots): Likewise. Flatten code by
68 moving `dyn' to the beginning of the function block.
70 2018-07-11 Maciej W. Rozycki <macro@mips.com>
71 Rich Felker <bugdal@aerifal.cx>
74 * elfxx-mips.c (mips_tls_got_relocs): Use `bfd_link_dll' rather
75 than `bfd_link_pic' to determine whether dynamic relocations are
77 (mips_elf_initialize_tls_slots): Likewise.
79 2018-07-10 Maciej W. Rozycki <macro@mips.com>
81 * elflink.c (bfd_elf_final_link): Rename `remove' local variable
84 2018-07-10 Alan Modra <amodra@gmail.com>
86 * elf32-xgate.h: Delete.
87 * elf32-xgate.c: Delete unnecessary forward declarations, add two
89 (xgate_elf_bfd_link_hash_table_create)
90 (xgate_elf_bfd_link_hash_table_free)
91 (xgate_elf_set_mach_from_flags, struct xgate_scan_param)
92 (stub_hash_newfunc, elf32_xgate_add_symbol_hook)
93 (elf32_xgate_setup_section_lists, elf32_xgate_size_stubs)
94 (elf32_xgate_build_stubs, elf32_xgate_check_relocs)
95 (elf32_xgate_relocate_section, _bfd_xgate_elf_set_private_flags)
96 (elf32_xgate_post_process_headers): Delete.
97 (elf32_xgate_backend_symbol_processing): New function.
98 (xgate_elf_ignore_reloc, xgate_elf_special_reloc)
99 (_bfd_xgate_elf_print_private_bfd_data): Make static.
100 (ELF_TARGET_ID, elf_info_to_howto, elf_backend_check_relocs)
101 (elf_backend_relocate_section, elf_backend_object_p)
102 (elf_backend_final_write_processing, elf_backend_can_gc_sections)
103 (elf_backend_post_process_headers, elf_backend_add_symbol_hook)
104 (bfd_elf32_bfd_link_hash_table_create)
105 (bfd_elf32_bfd_set_private_flags)
106 (xgate_stub_hash_lookup): Don't define.
107 (elf_backend_symbol_processing): Define.
108 * elf-bfd.h (elf_target_id): Delete XGATE_ELF_DATA.
110 2018-07-09 Maciej W. Rozycki <macro@mips.com>
112 * elfxx-mips.c (_bfd_mips_elf_adjust_dynamic_symbol): Don't set
113 `->needs_lazy_stub' if the stubs output section is the absolute
116 2018-07-09 H.J. Lu <hongjiu.lu@intel.com>
119 * configure.ac: Use changequote for "i[3-7]86-*-linux-*".
120 * configure: Regenerated.
122 2018-07-09 Alan Modra <amodra@gmail.com>
124 * elf32-m68hc1x.c (elf32_m68hc11_post_process_headers): Call
125 _bfd_elf_post_process_headers.
127 2018-07-06 Max Filippov <jcmvbkbc@gmail.com>
129 * elf32-xtensa.c (elf_xtensa_allocate_dynrelocs): Don't allocate
130 space for dynamic relocation for undefined weak symbol.
131 (elf_xtensa_relocate_section): Don't emit R_XTENSA_RELATIVE
132 relocation for undefined weak symbols.
133 (shrink_dynamic_reloc_sections): Don't shrink dynamic relocation
134 section for relocations against undefined weak symbols.
136 2018-07-06 Alan Hayward <alan.hayward@arm.com>
138 * elf.c (elfcore_grok_aarch_sve): New function.
139 (elfcore_grok_note): Check for Aarch64 SVE.
140 (elfcore_write_aarch_sve): New function.
141 (elfcore_write_register_note): Check for Aarch64 SVE.
142 * elf-bfd.h(elfcore_grok_aarch_sve): New declaration.
144 2018-07-06 Alan Modra <amodra@gmail.com>
146 * elf32-arm.c (elf32_arm_nabi_write_core_note): Don't use
147 DIAGNOTIC_PUSH and DIAGNOSTIC_POP unconditionally.
148 * elf32-ppc.c (ppc_elf_write_core_note): Likewise.
149 * elf32-s390.c (elf_s390_write_core_note): Likewise.
150 * elf64-ppc.c (ppc64_elf_write_core_note): Likewise.
151 * elf64-s390.c (elf_s390_write_core_note): Likewise.
152 * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewise.
154 2018-07-05 Jim Wilson <jimw@sifive.com>
156 * config.bfd (riscv32*-*-*): Renamed from riscv32-*-*.
157 (riscv64*-*-*): Likewise.
158 (riscv-*-*): Add as an alias for riscv32*-*-*.
160 2018-07-05 H.J. Lu <hongjiu.lu@intel.com>
163 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Remove x86
164 ISA properties with empty bits.
166 2018-07-05 Nick Clifton <nickc@redhat.com>
168 * po/ru.po: Updated Russian translation.
170 2018-07-05 Alan Modra <amodra@gmail.com>
172 * elf-bfd.h (_bfd_elf_ppc_merge_fp_attributes): Update prototype.
173 * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Return error
174 on mismatch. Remove "warning: " from messages. Track last bfd
176 (ppc_elf_merge_obj_attributes): Likewise. Handle status from
177 _bfd_elf_ppc_merge_fp_attributes.
178 * elf64-ppc.c (ppc64_elf_merge_private_bfd_data): Handle status
179 from _bfd_elf_ppc_merge_fp_attributes.
181 2018-07-04 H.J. Lu <hongjiu.lu@intel.com>
183 * Makefile.am (bfdinclude_HEADERS): Add $(INCDIR)/diagnostics.h.
184 * Makefile.in: Regenerated.
186 2018-07-03 Alan Modra <amodra@gmail.com>
188 * elflink.c (bfd_elf_final_link): Remove zero size .gnu.attributes
191 2018-07-03 Alan Modra <amodra@gmail.com>
193 * elf-bfd.h (ATTR_TYPE_FLAG_ERROR, ATTR_TYPE_HAS_ERROR): Define.
194 * elf-attrs.c (is_default_attr): Handle ATTR_TYPE_HAS_ERROR.
195 * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Use
196 ATTR_TYPE_FLAG_INT_VAL. Set ATTR_TYPE_HAS_ERROR on finding
197 incompatible attribute.
198 (ppc_elf_merge_obj_attributes): Likewise. Return
199 _bfd_elf_merge_object_attributes result.
200 * elf64-ppc.c (ppc64_elf_merge_private_bfd_data): Return
201 _bfd_elf_merge_object_attributes result.
203 2018-07-03 Alan Modra <amodra@gmail.com>
206 * elflink.c (_bfd_elf_fix_symbol_flags): Hide dynamic symbols
207 in discarded sections.
209 2018-07-02 Maciej W. Rozycki <macro@mips.com>
211 * elfxx-mips.c (_bfd_mips_elf_create_dynamic_sections): Set
212 `mark' for symbols created from `mips_elf_dynsym_rtproc_names'
215 2018-07-02 Maciej W. Rozycki <macro@mips.com>
217 * elf64-mips.c (micromips_elf64_howto_table_rel): Add
218 R_MICROMIPS_HI0_LO16, R_MICROMIPS_TLS_GD, R_MICROMIPS_TLS_LDM,
219 R_MICROMIPS_TLS_DTPREL_HI16, R_MICROMIPS_TLS_DTPREL_LO16,
220 R_MICROMIPS_TLS_GOTTPREL, R_MICROMIPS_TLS_TPREL_HI16,
221 R_MICROMIPS_TLS_TPREL_LO16, R_MICROMIPS_GPREL7_S2 and
222 R_MICROMIPS_PC23_S2 relocation entries.
223 (micromips_elf64_howto_table_rela): Likewise.
224 (micromips_reloc_map): Likewise.
225 * elfn32-mips.c (elf_micromips_howto_table_rel): Likewise.
226 (elf_micromips_howto_table_rela): Likewise.
227 (micromips_reloc_map): Likewise.
229 2018-07-02 H.J. Lu <hongjiu.lu@intel.com>
232 * elf64-x86-64.c (elf_x86_64_relocate_section): Clear the
233 R_X86_64_converted_reloc_bit bit.
235 2018-07-02 Jeff Muizelaar <jrmuizel@gmail.com>
236 Tom Tromey <tom@tromey.com>
240 * mach-o.c (bfd_mach_o_fat_close_and_cleanup): New function.
241 (bfd_mach_o_close_and_cleanup): Redefine.
242 * archive.c (_bfd_unlink_from_archive_parent): New function,
244 (_bfd_archive_close_and_cleanup): ..here.
245 (bfd_generic_archive_p): Do not clear archive's format.
246 * libbfd-in.h (_bfd_unlink_from_archive_parent): Declare.
247 * libbfd.h: Regenerate.
249 2018-07-02 Thomas Preud'homme <thomas.preudhomme@arm.com>
251 * archures.c (bfd_mach_arm_5TEJ, bfd_mach_arm_6, bfd_mach_arm_6KZ,
252 bfd_mach_arm_6T2, bfd_mach_arm_6K, bfd_mach_arm_7, bfd_mach_arm_6M,
253 bfd_mach_arm_6SM, bfd_mach_arm_7EM, bfd_mach_arm_8, bfd_mach_arm_8R,
254 bfd_mach_arm_8M_BASE, bfd_mach_arm_8M_MAIN): Define.
255 * bfd-in2.h: Regenerate.
256 * cpu-arm.c (arch_info_struct): Add entries for above new
258 * elf32-arm.c (bfd_arm_get_mach_from_attributes): Add Tag_CPU_arch to
259 bfd_mach_arm mapping logic for pre Armv4 and Armv5TEJ and later
260 architectures. Force assert failure for any new Tag_CPU_arch value.
262 2018-07-02 Thomas Preud'homme <thomas.preudhomme@arm.com>
264 * doc/bfdint.texi: Use command-line consistently when used in a
266 * doc/bfdsumm.texi: Likewise.
268 2018-06-29 Maciej W. Rozycki <macro@mips.com>
270 * elfxx-mips.c (allocate_dynrelocs): Remove extraneous symbol
271 visibility check made for undefined weak symbols.
273 2018-06-26 Nick Clifton <nickc@redhat.com>
275 * po/uk.po: Updated Ukranian translation.
277 2018-06-25 Nick Clifton <nickc@redhat.com>
279 * elfnn-aarch64.c (_bfd_aarch64_erratum_835769_stub_name): Check
280 for malloc returning NULL.
281 (_bfd_aarch64_erratum_843419_fixup): Check for
282 _bfd_aarch64_erratum_835769_stub_name returning NULL.
284 2018-06-24 Nick Clifton <nickc@redhat.com>
286 * po/bfd.pot: Regenerate.
288 2018-06-24 Nick Clifton <nickc@redhat.com>
290 * version.m4: Update version string to 2.31.51.
291 * configure: Regenerate.
293 2018-06-24 Nick Clifton <nickc@redhat.com>
297 2018-06-21 Maciej W. Rozycki <macro@mips.com>
299 * elfxx-mips.c (_bfd_mips_elf_compact_eh_encoding)
300 (_bfd_mips_elf_cant_unwind_opcode): Correct formatting.
302 2018-06-21 Maciej W. Rozycki <macro@mips.com>
304 * elfxx-mips.c (_bfd_mips_post_process_headers): Keep
305 EI_ABIVERSION setting together.
307 2018-06-21 Maciej W. Rozycki <macro@mips.com>
309 * elfxx-mips.c (MIPS_LIBC_ABI_DEFAULT, MIPS_LIBC_ABI_MIPS_PLT)
310 (MIPS_LIBC_ABI_UNIQUE, MIPS_LIBC_ABI_MIPS_O32_FP64)
311 (MIPS_LIBC_ABI_MAX): New enumeration constants.
312 (_bfd_mips_post_process_headers): Use them in place of magic
315 2018-06-21 Jim Wilson <jimw@sifive.com>
317 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Update comment.
318 Use SYMBOL_REFERENCES_LOCAL. Add asserts for h->got.offset.
320 2018-06-21 Alan Modra <amodra@gmail.com>
322 * doc/Makefile.am (AUTOMAKE_OPTIONS): Add "foreign".
323 * doc/Makefile.in: Regenerate.
325 2018-06-20 Renlin Li <renlin.li@arm.com>
327 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Use PG_OFFSET
328 to resolve BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC,
329 BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC,
330 BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC,
331 BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC,
332 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
333 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
334 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
335 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
337 2018-06-20 Nick Clifton <nickc@redhat.com>
340 * opncls.c (get_build_id): Check for a negative or excessive data
341 size in the build-id note.
343 2018-06-20 Nick Clifton <nickc@redhat.com>
346 * mach-o.c (cputype): New function.
347 (cpusubtype): New function.
348 (bfd_mach_o_bfd_print_private_data): New function. Dispalys the
349 values in the MACH-O file header.
350 (bfd_mach_o_bfd_copy_private_header_data): Copy the cputype and
351 cpusubtype fields from the input bfd's mach-o header to the output
353 * mach-o-target.c (bfd_mach_o_bfd_print_private_bfd_data):
354 Redefine to bfd_mach_o_bfd_print_private_data.
355 * mach-o.h (bfd_mach_o_bfd_print_private_bfd_data): Prototype.
357 2018-06-19 Maciej W. Rozycki <macro@mips.com>
360 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Verify the
361 `.got.plt' entry referred is in range.
362 (mips_finish_exec_plt): Correct the range check for `.got.plt'
363 start. Replace the assertion used for that with a proper error
366 2018-06-19 Maciej W. Rozycki <macro@mips.com>
368 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Fix
371 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
373 * Makefile.am (AUTOMAKE_OPTIONS): Remove 1.11.
374 (INCLUDES): Rename to ...
375 (AM_CPPFLAGS): ... this.
376 * configure.ac: Remove AC_PREREQ.
377 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove 1.9, cygnus, add
378 info-in-builddir no-texinfo.tex.
379 (info_TEXINFOS): Rename bfd.texinfo to bfd.texi.
380 * doc/bfd.texinfo: Rename to ...
381 * doc/bfd.texi: ... this.
382 * Makefile.in: Re-generate.
383 * aclocal.m4: Re-generate.
384 * config.in: Re-generate.
385 * configure: Re-generate.
386 * doc/Makefile.in: Re-generate.
388 2018-06-18 Mephi <mephi42@gmail.com>
391 * mach-o-x86-64.c (x86_64_howto_table): Add entry for
392 BFD_RELOC_MACH_O_X86_64_RELOC_TLV.
393 (bfd_mach_o_x86_64_canonicalize_one_reloc): Handle the new reloc.
394 (bfd_mach_o_x86_64_swap_reloc_out): Likewise.
395 * reloc.c (BFD_RELOC_MACH_O_X86_64_TV): New entry.
396 * bfd-in2.h: Regenerate.
397 * libbfd.h: Regenerate.
399 2018-06-14 Faraz Shahbazker <Faraz.Shahbazker@mips.com>
401 * elfxx-mips.c (print_mips_ases): Add GINV extension.
403 2018-06-14 H.J. Lu <hongjiu.lu@intel.com>
406 * elf.c (_bfd_elf_get_symbol_version_string): Check if the first
407 symbol version is base version.
409 2018-06-14 Alan Modra <amodra@gmail.com>
411 * elf-bfd.h (struct elf_link_hash_table): Add "dynamic_relocs".
412 * elflink.c (_bfd_elf_init_2_index_sections): Comment fix.
413 (_bfd_elf_add_dynamic_entry): Set "dynamic_relocs".
414 (_bfd_elf_link_renumber_dynsyms): Exclude all section symbols when
415 "dynamic_relocs" is not set.
416 * elfxx-mips.c (count_section_dynsyms): Likewise.
418 2018-06-14 Alan Modra <amodra@gmail.com>
421 * bfdio.c (bfd_seek): Optimize away seeks to current position.
423 2018-06-13 Scott Egerton <scott.egerton@imgtec.com>
424 Faraz Shahbazker <Faraz.Shahbazker@mips.com>
426 * elfxx-mips.c (print_mips_ases): Add CRC.
428 2018-06-08 H.J. Lu <hongjiu.lu@intel.com>
431 * elfxx-x86.c (elf_x86_hide_linker_defined): New function.
432 (_bfd_x86_elf_link_check_relocs): Use it to hide hidden
433 __bss_start, _end and _edata in shared libraries.
435 2018-06-07 Alan Modra <amodra@gmail.com>
437 * elf32-tic6x.c (elf32_tic6x_check_relocs): Reference
438 __c6xabi_DSBT_BASE explicitly for R_C6000_SBR_* relocs.
440 2018-06-05 Alan Modra <amodra@gmail.com>
442 * bfd.c (struct bfd): Update comment on "where" usage.
443 * bfdio.c (bfd_bwrite, bfd_stat): Use and update "iovec",
444 "iostream", and "where" from containing archive file. Return
446 (bfd_bread): Similarly, and return error attempted out of
447 bounds archive element access.
448 (bfd_tell, bfd_flush): Use and update "iovec", "iostream", and
449 "where" from containing archive file.
450 (bfd_seek): Likewise. Return error on NULL iovec. Don't
451 attempt to optimize away seeks. Don't paper over errors by
453 (bfd_get_mtime): Call bfd_stat rather than iovec->bstat.
454 (bfd_get_size): Likewise.
455 (bfd_mmap): Operate on and use iovec of containing archive
456 file. Return error on NULL iovec.
457 * cache.c (bfd_cache_lookup_worker): Abort if working on
459 (cache_bread_1): Delete bfd parameter, add FILE* parameter.
460 Don't ignore zero byte reads.
461 (cache_bread): Look up FILE* in cache here. Error on NULL
463 (cache_bwrite): Rename "where" to "from".
464 (cache_bmmap): Don't handle archive elements.
465 * coffcode.h (coff_slurp_line_table): Exit early on zero
467 * bfd-in2.h: Regenerate.
469 2018-06-05 Alan Modra <amodra@gmail.com>
472 * plugin.c (bfd_plugin_open_input): Allow for possibility of
473 nested archives. Open file again for plugin.
474 (try_claim): Don't save and restore file position. Close file
476 * sysdep.h (O_BINARY): Define.
478 2018-06-04 Max Filippov <jcmvbkbc@gmail.com>
480 * elf32-xtensa.c (xtensa_read_table_entries): Make global.
481 (compute_fill_extra_space): Drop declaration. Rename function to
482 xtensa_compute_fill_extra_space.
483 (compute_ebb_actions, remove_dead_literal): Update references to
484 compute_fill_extra_space.
486 2018-06-04 Volodymyr Arbatov <arbatov@cadence.com>
488 * elf32-xtensa.c (elf32xtensa_separate_props): New global
490 (xtensa_add_names): New function.
491 (xtensa_property_section_name): Add new parameter
492 separate_sections, use it to choose property section name.
493 (xtensa_get_separate_property_section): New function.
494 (xtensa_get_property_section): Invoke
495 xtensa_get_separate_property_section to get individual property
496 section if it exists, common property section otherwise.
497 (xtensa_make_property_section): Pass elf32xtensa_separate_props
498 to xtensa_property_section_name.
500 2018-06-04 H.J. Lu <hongjiu.lu@intel.com>
503 * bfd-in.h: Include "diagnostics.h".
504 * bfd-in2.h: Regenerated.
505 * elf32-arm.c (elf32_arm_nabi_write_core_note): Use
506 DIAGNOSTIC_PUSH, DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION and
507 DIAGNOSTIC_POP to silence GCC 8.1 warnings with
508 -Wstringop-truncation.
509 * elf32-ppc.c (ppc_elf_write_core_note): Likewse.
510 * elf32-s390.c (elf_s390_write_core_note): Likewse.
511 * elf64-ppc.c (ppc64_elf_write_core_note): Likewse.
512 * elf64-s390.c (elf_s390_write_core_note): Likewse.
513 * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewse.
515 2018-06-03 Jim Wilson <jimw@sifive.com>
518 * elfnn-riscv.c (riscv_elf_relocate_section) <R_RISCV_CALL>: Check
519 for and handle an undefined weak with no PLT.
522 * elfnn-riscv.c (riscv_relax_delete_bytes): Add versioned_hidden check
523 to code that ignores duplicate symbols.
525 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
527 * version.m4: Bump version to 2.30.52
528 * configure: Regenerated.
530 2018-06-01 Alan Modra <amodra@gmail.com>
532 * bfd.c (_bfd_error_handler): Arrange for this function to be
533 declared in bfd-in2.h.
534 * libbfd-in.h (_bfd_error_handler): Don't declare.
535 * libbfd.h: Regenerate.
536 * bfd-in2.h: Regenerate.
538 2018-05-30 Amaan Cheval <amaan.cheval@gmail.com>
540 * config.bfd (x86_64-*-*): Add pei-x86-64 target to x86_64-*-rtems*
541 This is needed to generate UEFI application image files from ELFs.
543 2018-05-28 H.J. Lu <hongjiu.lu@intel.com>
545 * elf32-i386.c (elf_i386_lazy_plt): Add plt_tlsdesc_entry,
546 plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset,
547 plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and
548 plt_tlsdesc_got2_insn_end for TLSDESC entry.
549 (elf_i386_lazy_ibt_plt): Likewise.
550 (elf_i386_nacl_plt): Likewise.
551 * elf64-x86-64.c (tlsdesc_plt_entry): Moved and renamed to ...
552 (elf_x86_64_tlsdesc_plt_entry): This.
553 (elf_x86_64_lazy_plt): Add plt_tlsdesc_entry,
554 plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset,
555 plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and
556 plt_tlsdesc_got2_insn_end for TLSDESC entry.
557 (elf_x86_64_lazy_bnd_plt): Likewise.
558 (elf_x86_64_lazy_ibt_plt): Likewise.
559 (elf_x32_lazy_ibt_plt): Likewise.
560 (elf_x86_64_nacl_plt): Likewise.
561 (elf_x86_64_finish_dynamic_sections): Use plt_tlsdesc_entry,
562 plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset,
563 plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and
564 plt_tlsdesc_got2_insn_end to update TLSDESC entry.
565 * elfxx-x86.h (elf_x86_lazy_plt_layout): Update comments.
566 Add plt_tlsdesc_entry, plt_tlsdesc_entry_size,
567 plt_tlsdesc_got1_offset, plt_tlsdesc_got2_offset,
568 plt_tlsdesc_got1_insn_end and plt_tlsdesc_got2_insn_end.
569 (elf_x86_non_lazy_plt_layout): Update comments.
570 (elf_x86_plt_layout): Likewise.
572 2018-05-28 H.J. Lu <hongjiu.lu@intel.com>
575 * elf-s390-common.c (elf_s390_add_symbol_hook): Removed.
576 * elf32-arc.c (elf_arc_add_symbol_hook): Likewise.
577 (elf_backend_add_symbol_hook): Likewise.
578 * elf32-m68k.c (elf_m68k_add_symbol_hook): Likewise.
579 (elf_backend_add_symbol_hook): Likewise.
580 * elf32-s390.c (elf_backend_add_symbol_hook): Likewise.
581 * elf32-sparc.c (elf32_sparc_add_symbol_hook): Likewise.
582 (elf_backend_add_symbol_hook): Likewise.
583 * elf64-s390.c (elf_backend_add_symbol_hook): Likewise.
584 * elfxx-aarch64.c (_bfd_aarch64_elf_add_symbol_hook): Likewise.
585 * elfxx-aarch64.h (_bfd_aarch64_elf_add_symbol_hook): Likewise.
586 (elf_backend_add_symbol_hook): Likewise.
587 * elf32-arm.c (elf32_arm_add_symbol_hook): Remove STT_GNU_IFUNC
589 * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise.
590 * elf64-ppc.c (ppc64_elf_add_symbol_hook): Likewise.
591 * elf64-sparc.c (elf64_sparc_add_symbol_hook): Likewise.
592 * elflink.c (elf_link_add_object_symbols): Set
593 elf_gnu_symbol_ifunc for STT_GNU_IFUNC symbols.
595 2018-05-26 H.J. Lu <hongjiu.lu@intel.com>
598 * elf-bfd.h (_bfd_elf_link_hide_sym_by_version): New.
599 * elflink.c (_bfd_elf_link_hide_versioned_symbol): New function.
600 Extracted from _bfd_elf_link_assign_sym_version.
601 (_bfd_elf_link_hide_sym_by_version): New function.
602 (_bfd_elf_link_assign_sym_version): Use
603 _bfd_elf_link_hide_versioned_symbol.
604 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Call
605 _bfd_elf_link_hide_sym_by_version instead of
606 bfd_hide_sym_by_version. Don't check unversioned symbol.
608 2018-05-25 Alan Modra <amodra@gmail.com>
610 * Makefile.in: Regenerate.
611 * po/SRC-POTFILES.in: Regenerate.
613 2018-05-25 Alan Modra <amodra@gmail.com>
615 * configure.ac (bfd_cv_hidden): Run test with -Werror in CFLAGS.
616 * configure: Regenerate.
618 2018-05-23 H.J. Lu <hongjiu.lu@intel.com>
620 * elf64-ppc.c (ppc64_elf_write_core_note): Add ATTRIBUTE_NONSTRING
623 2018-05-22 Alan Modra <amodra@gmail.com>
626 * elf32-hppa.c (hppa_get_stub_entry): Return NULL when link_sec
628 (elf32_hppa_size_stubs): Only create stubs for load, alloc, code
630 (final_link_relocate): Revert last change.
632 2018-05-22 Alan Modra <amodra@gmail.com>
635 * elf32-hppa.c (final_link_relocate): Don't look for plt call
636 stubs in non-alloc sections.
638 2018-05-21 H.J. Lu <hongjiu.lu@intel.com>
641 * aout-target.h (MY_bfd_link_hide_symbol): New.
642 * aout-tic30.c (MY_bfd_link_hide_symbol): Likewise.
643 * binary.c (binary_bfd_link_hide_symbol): Likewise.
644 * coff-alpha.c (_bfd_ecoff_bfd_link_hide_symbol): Likewise.
645 * coff-mips.c (_bfd_ecoff_bfd_link_hide_symbol): Likewise.
646 * coff-rs6000.c (_bfd_xcoff_bfd_link_hide_symbol): Likewise.
647 * coffcode.h (coff_bfd_link_hide_symbol): Likewise.
648 * elf-bfd.h (_bfd_elf_link_hide_symbol): Likewise.
649 * elfxx-target.h (bfd_elfNN_bfd_link_hide_symbol): Likewise.
650 * i386msdos.c (msdos_bfd_link_hide_symbol): Likewise.
651 * ihex.c (ihex_bfd_link_hide_symbol): Likewise.
652 * libbfd-in.h (_bfd_nolink_bfd_link_hide_symbol): Likewise.
653 * linker.c (_bfd_generic_link_hide_symbol): Likewise.
654 (bfd_link_hide_symbol): Likewise.
655 * mach-o-target.c (bfd_mach_o_bfd_link_hide_symbol): Likewise.
656 * mmo.c (mmo_bfd_link_hide_symbol): Likewise.
657 * pef.c (bfd_pef_bfd_link_hide_symbol): Likewise.
658 * plugin.c (bfd_plugin_bfd_link_hide_symbol): Likewise.
659 * ppcboot.c (ppcboot_bfd_link_hide_symbol): Likewise.
660 * som.c (som_bfd_link_hide_symbol): Likewise.
661 * srec.c (srec_bfd_link_hide_symbol): Likewise.
662 * tekhex.c (tekhex_bfd_link_hide_symbol): Likewise.
663 * vms-alpha.c (vms_bfd_link_hide_symbol): Likewise.
664 (alpha_vms_bfd_link_hide_symbol): Likewise.
665 * xsym.c (bfd_sym_bfd_link_hide_symbol): Likewise.
666 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
667 _bfd_generic_link_hide_symbol.
668 (rs6000_xcoff64_aix_vec): Likewise.
669 * elflink.c (bfd_elf_record_link_assignment): Don't make forced
670 local symbol dynamic.
671 (_bfd_elf_link_hide_symbol): New function.
672 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
673 check root.ldscript_def.
674 * targets.c (bfd_target): Add _bfd_link_hide_symbol.
675 (BFD_JUMP_TABLE_LINK): Add NAME##_bfd_link_hide_symbol.
676 * bfd-in2.h: Regenerated.
677 * libbfd.h: Likewise.
679 2018-05-21 H.J. Lu <hongjiu.lu@intel.com>
682 * elf.c (setup_group): Mark section in a section group with
685 2018-05-18 H.J. Lu <hongjiu.lu@intel.com>
688 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
689 set eh->local_ref to 1 if a symbol is versioned and there is a
692 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
694 * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Handle
697 2018-05-18 Jim Wilson <jimw@sifive.com>
699 * elfnn-riscv.c (allocate_dynrelocs): Discard dynamic relocations if
700 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
701 (riscv_elf_relocate_section): Don't generate dynamic relocation if
702 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
703 (riscv_elf_finish_dynamic_symbol): Likewise.
705 2018-05-18 John Darrington <john@darrington.wattle.id.au>
707 * Makefile.am: Add s12z files.
708 * Makefile.in: Regenerate.
709 * archures.c: Add bfd_s12z_arch.
710 * bfd-in.h: Add exports of bfd_putb24 and bfd_putl24.
711 * bfd-in2.h: Regenerate.
712 * config.bfd: Add s12z target.
713 * configure.ac: Add s12z target.
714 * configure: Regenerate.
715 * cpu-s12z.c: New file.
716 * elf32-s12z.c: New file.
717 * libbfd.c (bfd_putb24): New function.
718 (bfd_putl24): New function.
719 * libbfd.h: Regenerate.
720 * reloc.c: Add s12z relocations.
721 (bfd_get_reloc_size): Handle size 5 relocs.
722 * targets.c: Add s12z_elf32_vec.
724 2018-05-18 H.J. Lu <hongjiu.lu@intel.com>
727 * elf32-i386.c (elf_i386_relocate_section): Handle R_386_GOT32X
729 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
730 set eh->local_ref to 1 for linker defined symbols.
732 2018-05-18 Alan Modra <amodra@gmail.com>
735 * elf.c (setup_group): Formatting. Check that SHT_GROUP entries
736 don't point at other SHT_GROUP sections. Set shdr corresponding
737 to invalid entry, to NULL rather than section 0. Identify
738 SHT_GROUP section index when reporting an error. Cope with NULL
741 2018-05-18 Alan Modra <amodra@gmail.com>
743 * libbfd-in.h (ATTRIBUTE_HIDDEN): Define and use throughout.
744 * configure.ac (HAVE_HIDDEN): Check compiler support for hidden
746 * libbfd.h: Regenerate.
747 * configure: Regenerate.
748 * config.in: Regenerate.
750 2018-05-18 Alan Modra <amodra@gmail.com>
752 * libbfd-in.h: Add include guard.
753 * libcoff-in.h: Likewise.
754 * doc/Makefile.am (libbfd.h, libcoff.h): Append another #endif.
755 * doc/Makefile.in: Regenerate.
756 * libbfd.h: Regenerate.
757 * libcoff.h: Regenerate.
759 2018-05-16 Maciej W. Rozycki <macro@mips.com>
761 * elf32-nds32.c (nds32_convert_32_to_16): Preset `insn_type'.
763 2018-05-16 Alan Modra <amodra@gmail.com>
766 * format.c (struct bfd_preserve): Add section_id.
767 (bfd_preserve_save, bfd_preserve_restore): Save and restore
769 (bfd_reinit): Set _bfd_section_id.
770 (bfd_check_format_matches): Put all matches of any priority into
771 matching_vector. Save initial section id and start each attempted
772 match at that section id.
773 * libbfd-in.h (_bfd_section_id): Declare.
774 * section.c (_bfd_section_id): Rename from section_id and make
776 (bfd_get_next_section_id): Delete.
777 * elf64-ppc.c (ppc64_elf_setup_section_lists): Replace use of
778 bfd_get_section_id with _bfd_section_id.
779 * libbfd.h: Regenerate.
780 * bfd-in2.h: Regenerate.
782 2018-05-15 Christophe Guillon <christophe.guillon@st.com>
784 * coffcode.h (coff_bigobj_swap_aux_in): Make sure that all fields
785 of the aux structure are initialised.
787 2018-05-15 Francois H. Theron <francois.theron@netronome.com>
789 * targets.c: Wrap nfp_elf64_vec in BFD64 ifdef.
791 2018-05-15 Nick Clifton <nickc@redhat.com>
793 * po/pt.po: New Portuguese translation.
794 * configure.ac (ALL_LINGUAS): Add pt.
795 * configure: Regenerate.
797 2018-05-14 H.J. Lu <hongjiu.lu@intel.com>
800 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Don't issue
801 an error on IFUNC pointer defined in PDE.
802 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Call
803 _bfd_x86_elf_link_fixup_ifunc_symbol.
804 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
805 * elfxx-x86.c (_bfd_x86_elf_link_fixup_ifunc_symbol): New
807 * elfxx-x86.h (_bfd_x86_elf_link_fixup_ifunc_symbol): New.
809 2018-05-14 H.J. Lu <hongjiu.lu@intel.com>
812 * elfxx-x86.c (elf_x86_linker_defined): New function.
813 (_bfd_x86_elf_link_check_relocs): Use it to mark __bss_start,
814 _end and _edata locally defined within executables.
816 2018-05-12 Alan Modra <amodra@gmail.com>
819 * elf.c (rewrite_elf_program_header): Use segment_mark only for
820 PT_LOAD headers. Delete first_matching_lma and first_suggested_lma.
821 Instead make matching_lma and suggested_lma pointers to the
822 sections. Align section vma and lma calculated from segment.
823 Don't clear includes_phdrs or includes_filehdr based on p_paddr
824 test. Try to handle alignment padding before first section by
825 adjusting new segment lma down. Adjust PT_PHDR map p_paddr.
827 2018-05-09 Dimitar Dimitrov <dimitar@dinux.eu>
829 * elf32-pru.c (pru_elf32_do_ldi32_relocate): Make LDI32 relocation
830 conformant to TI ABI.
831 (pru_elf32_relax_section): Likewise.
832 (pru_elf_relax_delete_bytes): Fix offsets for new LDI32 code.
833 * elf32-pru.c (pru_elf32_do_ldi32_relocate): Ignore addend.
834 (pru_elf32_pmem_relocate): Trap - should not get here.
835 (pru_elf32_relocate_section): Add support for REL relocations.
836 (elf_info_to_howto_rel): Enable REL.
837 (elf_backend_may_use_rel_p): Likewise.
838 (elf_backend_may_use_rela_p): Likewise.
839 (elf_backend_default_use_rela_p): Likewise.
841 2018-05-09 Alan Modra <amodra@gmail.com>
844 * peXXigen.c (pe_print_edata): Correct minimum size.
846 2018-05-09 Alan Modra <amodra@gmail.com>
849 * peXXigen.c (pe_print_idata): Bound check hint_addr.
851 2018-05-08 Nick Clifton <nickc@redhat.com>
854 * elf.c (bfd_elf_get_str_section): Check for an excessively large
856 * elf-attrs.c (_bfd_elf_parse_attributes): Issue an error if the
857 attribute section is larger than the size of the file.
859 2018-05-07 Alan Modra <amodra@gmail.com>
861 * cofflink.c (_bfd_coff_link_input_bfd): Use memcmp rather than
862 strncmp when checking for ".bf" special symbol.
863 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Make pe_required_section_flags
864 section name a char array, remove sentinal known_sections entry,
865 and adjust loop over known_sections to suit. Use memcmp rather
868 2018-05-04 Alan Modra <amodra@gmail.com>
870 * elf-linux-core.h (struct elf_external_linux_prpsinfo32_ugid32),
871 (struct elf_external_linux_prpsinfo32_ugid16),
872 (struct elf_external_linux_prpsinfo64_ugid32),
873 (struct elf_external_linux_prpsinfo64_ugid16): Add ATTRIBUTE_NONSTRING
874 to pr_fname and pr_psargs fields. Remove GCC diagnostic pragmas.
876 * elf.c (elfcore_write_prpsinfo): ..here. Indent nested preprocessor
878 * elf32-arm.c (elf32_arm_nabi_write_core_note): Add ATTRIBUTE_NONSTRING
880 * elf32-ppc.c (ppc_elf_write_core_note): Likewise.
881 * elf32-s390.c (elf_s390_write_core_note): Likewise.
882 * elf64-s390.c (elf_s390_write_core_note): Likewise.
883 * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewise.
884 * elf64-x86-64.c (elf_x86_64_write_core_note): Add GCC diagnostic
886 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Use strnlen to avoid
887 false positive gcc-8 warning.
888 * cofflink.c (_bfd_coff_link_input_bfd): Likewise.
890 2018-05-04 Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
892 * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Fix the order
893 of arguments when warning about different long double types.
895 2018-05-03 Simon Atanasyan <simon@atanasyan.com>
897 * elf32-mips.c: (elf32_mips_fixup_symbol): New function.
898 (elf_backend_fixup_symbol): New macro.
899 * elfxx-mips.c: (mips_elf_output_extsym): Discard _gp_disp
901 (_bfd_mips_elf_finish_dynamic_symbol): Likewise.
903 2018-04-30 Francois H. Theron <francois.theron@netronome.com>
905 * Makefile.am: Added NFP files to build.
906 * archures.c: Added bfd_arch_nfp
907 * config.bfd: Added NFP support.
908 * configure.ac: Added NFP support.
909 * cpu-nfp.c: New, for NFP support.
910 * elf-bfd.h: Added elf_section_info()
911 * elf64-nfp.c: New, for NFP support.
912 * po/SRC-POTFILES.in: Added NFP source files.
913 * targets.c: Added nfp_elf64_vec
914 * bfd-in2.h: Regenerate.
915 * Makefile.in: Regenerate.
916 * configure: Regenerate.
918 2018-04-27 Alan Modra <amodra@gmail.com>
920 * bfd-in2.h: Regenerate.
921 * libbfd.h: Regenerate.
923 2018-04-27 Alan Modra <amodra@gmail.com>
927 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't drop plt
929 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Comment fixes.
931 2018-04-26 Pedro Alves <palves@redhat.com>
933 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't consider
934 ifunc and non-ifunc symbols duplicates.
936 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
937 Mickaël Guêné <mickael.guene@st.com>
939 * elf32-arm.c (elf32_arm_fdpic_thumb_plt_entry): New.
940 (elf32_arm_plt_needs_thumb_stub_p): Handle thumb-only case.
941 (elf32_arm_populate_plt_entry): Likewise.
942 (elf32_arm_output_plt_map_1): Likewise.
943 (elf32_arm_output_arch_local_syms): Likewise.
945 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
946 Mickaël Guêné <mickael.guene@st.com>
948 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Handle
949 _GLOBAL_OFFSET_TABLE_ in FDPIC mode.
951 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
952 Mickaël Guêné <mickael.guene@st.com>
954 * elf32-arm.c (bfd_elf32_arm_set_target_params): Handle FDPIC case
957 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
958 Mickaël Guêné <mickael.guene@st.com>
960 * elf32-arm.c (DEFAULT_STACK_SIZE): New.
961 (elf32_arm_always_size_sections): Create stack segment.
963 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
964 Mickaël Guêné <mickael.guene@st.com>
966 * bfd-in2.h (BFD_RELOC_ARM_TLS_GD32_FDPIC)
967 (BFD_RELOC_ARM_TLS_LDM32_FDPIC, BFD_RELOC_ARM_TLS_IE32_FDPIC): New
969 * elf32-arm.c (elf32_arm_howto_table_2): Add R_ARM_TLS_GD32_FDPIC,
970 R_ARM_TLS_LDM32_FDPIC, R_ARM_TLS_IE32_FDPIC relocations.
971 (elf32_arm_reloc_map): Add R_ARM_TLS_GD32_FDPIC,
972 R_ARM_TLS_LDM32_FDPIC, R_ARM_TLS_IE32_FDPIC.
973 (struct elf32_arm_link_hash_table): Update comment.
974 (elf32_arm_final_link_relocate): Handle TLS FDPIC relocations.
975 (IS_ARM_TLS_RELOC): Likewise.
976 (elf32_arm_check_relocs): Likewise.
977 (allocate_dynrelocs_for_symbol): Likewise.
978 (elf32_arm_size_dynamic_sections): Update comment.
979 * reloc.c: Add BFD_RELOC_ARM_TLS_GD32_FDPIC,
980 BFD_RELOC_ARM_TLS_LDM32_FDPIC, BFD_RELOC_ARM_TLS_IE32_FDPIC.
982 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
983 Mickaël Guêné <mickael.guene@st.com>
985 * elf32-arm.c (elf32_arm_fdpic_plt_entry): New.
986 (elf32_arm_create_dynamic_sections): Handle FDPIC.
987 (elf32_arm_allocate_plt_entry): Likewise.
988 (elf32_arm_populate_plt_entry): Likewise.
989 (elf32_arm_output_plt_map_1): Likewise.
991 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
992 Mickaël Guêné <mickael.guene@st.com>
994 * elf32-arm.c (struct fdpic_local): New.
995 (elf_arm_obj_tdata): Add local_fdpic_cnts field.
996 (elf32_arm_local_fdpic_cnts): New.
997 (struct fdpic_global): New.
998 (elf32_arm_link_hash_entry): Add fdpic_cnts field.
999 (elf32_arm_link_hash_table): Add srofixup field.
1000 (arm_elf_add_rofixup): New.
1001 (arm_elf_fill_funcdesc): New.
1002 (elf32_arm_link_hash_newfunc): Handle fdpic_cnts.
1003 (elf32_arm_allocate_local_sym_info): Likewise.
1004 (create_got_section): Create .rofixup section.
1005 (elf32_arm_copy_indirect_symbol): Handle fdpic_cnts.
1006 (bfd_elf32_arm_set_target_params): Handle FDPIC.
1007 (elf32_arm_final_link_relocate): Likewise.
1008 (elf32_arm_check_relocs): Likewise.
1009 (allocate_dynrelocs_for_symbol): Likewise.
1010 (elf32_arm_size_dynamic_sections): Likewise.
1011 (elf32_arm_finish_dynamic_sections): Likewise.
1012 (elf32_arm_output_arch_local_syms): Likewise.
1013 (elf32_arm_fdpic_omit_section_dynsym): New.
1015 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1016 Mickaël Guêné <mickael.guene@st.com>
1018 * bfd-in2.c (BFD_RELOC_ARM_GOTFUNCDESC)
1019 (BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC)
1020 (BFD_RELOC_ARM_FUNCDESC_VALUE): New.
1021 * elf32-arm.c (elf32_arm_howto_table_2): Add R_ARM_GOTFUNCDESC,
1022 R_ARM_GOTOFFFUNCDESC, R_ARM_FUNCDESC, R_ARM_FUNCDESC_VALUE.
1023 (elf32_arm_howto_from_type): Take new members of
1024 elf32_arm_howto_table_2 into account.
1025 (elf32_arm_reloc_map): Add BFD_RELOC_ARM_GOTFUNCDESC,
1026 BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC,
1027 BFD_RELOC_ARM_FUNCDESC_VALUE.
1028 * reloc.c: Add BFD_RELOC_ARM_GOTFUNCDESC,
1029 BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC,
1030 BFD_RELOC_ARM_FUNCDESC_VALUE.
1032 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1033 Mickaël Guêné <mickael.guene@st.com>
1035 * elf32-arm.c (elf32_arm_print_private_bfd_data): Support
1036 EF_ARM_PIC and ELFOSABI_ARM_FDPIC.
1037 (elf32_arm_post_process_headers): Support ELFOSABI_ARM_FDPIC.
1038 (ELF_OSABI): Define to ELFOSABI_ARM_FDPIC.
1040 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1041 Mickaël Guêné <mickael.guene@st.com>
1043 * config.bfd (arm*-*-linux-*): Add arm_elf32_fdpic_be_vec and
1044 arm_elf32_fdpic_le_vec to targ_selvecs. Accept
1045 arm*-*-uclinuxfdpiceabi.
1046 * configure.ac: Add support for arm_elf32_fdpic_be_vec and
1047 arm_elf32_fdpic_le_vec.
1048 * configure: Regenerate.
1049 * elf32-arm.c (struct elf32_arm_link_hash_table): Add fdpic_p.
1050 (elf32_arm_link_hash_table_create): Initialize fdpic_p.
1051 (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME, TARGET_BIG_SYM)
1052 (TARGET_BIG_NAME, elf_match_priority): Define for FDPIC targets.
1053 (elf32_arm_fdpic_link_hash_table_create): New.
1054 * targets.c (_bfd_target_vector): Add arm_elf32_fdpic_be_vec and
1055 arm_elf32_fdpic_le_vec.
1057 2018-04-25 Alan Modra <amodra@gmail.com>
1059 * elf-linux-core.h: Disable gcc-8 string truncation warning.
1060 * elf.c (elfcore_write_prpsinfo): Likewise.
1062 2018-04-25 Alan Modra <amodra@gmail.com>
1064 * Makefile.am: Remove arm-aout and arm-coff support.
1065 * config.bfd: Likewise.
1066 * configure.ac: Likewise.
1067 * targets.c: Likewise.
1068 * aout-arm.c: Delete.
1069 * armnetbsd.c: Delete.
1071 * Makefile.in: Regenerate.
1072 * configure: Regenerate.
1073 * po/SRC-POTFILES.in: Regenerate.
1075 2018-04-24 Nick Clifton <nickc@redhat.com>
1078 * elf.c (ignore_section_sym): Check for the output_section pointer
1079 being NULL before dereferencing it.
1082 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Check for
1083 a negative PE_DEBUG_DATA size before iterating over the debug data.
1085 2018-04-23 Alan Modra <amodra@gmail.com>
1087 * elf-linux-core.h: Revert last change.
1090 2018-04-23 Nick Clifton <nickc@redhat.com>
1093 * aoutx.h (aout_get_external_symbols): Allocate an extra byte at
1094 the end of the string table, and zero it.
1096 2018-04-23 Alan Modra <amodra@gmail.com>
1098 * elf-linux-core.h (swap_linux_prpsinfo32_ugid32_out): Disable
1099 gcc-8 string truncation warning.
1100 (swap_linux_prpsinfo32_ugid16_out): Likewise.
1101 (swap_linux_prpsinfo64_ugid32_out): Likewise.
1102 (swap_linux_prpsinfo64_ugid16_out): Likewise.
1103 * elf.c (elfcore_write_prpsinfo): Likewise.
1105 2018-04-23 Nick Clifton <nickc@redhat.com>
1108 * aoutx.h (aout_get_external_symbols): Allocate an extra byte at
1109 the end of the string table, and zero it.
1111 2018-04-20 Alan Modra <amodra@gmail.com>
1114 * elf32-hppa.c (got_relocs_needed): Add extra param to special
1115 case both dtprel and tprel relocs.
1116 (allocate_dynrelocs): Adjust conditions for got relocs.
1117 (elf32_hppa_relocate_section): Likewise for local sym got relocs.
1118 Emit dynamic relocs on TLS GOT entries for shared libraries,
1119 not when pic. Omit dynamic reloc on dtprel entry when local,
1120 and on tprel entry when local and executable.
1122 2018-04-19 Alan Modra <amodra@gmail.com>
1125 * elf32-hppa.c (elf32_hppa_size_stubs): Init "destination" to -1.
1126 (hppa_type_of_stub): Don't return a long branch stub for
1127 symbols other than those defined statically.
1129 2018-04-19 Alan Modra <amodra@gmail.com>
1131 * Makefile.am: Revert 2018-04-18 coff-mips changes.
1132 * config.bfd: Add back mips_ecoff_le_vec and mips_ecoff_be_vec
1133 to selvecs for mips targets change 2018-04-18.
1134 * configure.ac: Reinstate mips_ecoff_le_vec, mips_ecoff_be_vec
1135 and mips_ecoff_bele_vec.
1136 * targets.c: Likewise.
1137 * coff-mips.c: Resurrect.
1138 * Makefile.in: Regenerate.
1139 * configure: Regenerate.
1140 * po/SRC-POTFILES.in: Regenerate.
1142 2018-04-18 Alan Modra <amodra@gmail.com>
1144 * Makefile.am: Remove mips aout and coff support.
1145 * config.bfd: Likewise.
1146 * configure.ac: Likewise.
1147 * targets.c: Likewise.
1148 * coff-mips.c: Delete
1151 * pei-mips.c: Delete
1152 * Makefile.in: Regenerate.
1153 * configure: Regenerate.
1154 * po/SRC-POTFILES.in: Regenerate.
1156 2018-04-17 H.J. Lu <hongjiu.lu@intel.com>
1158 * elf32-i386.c (elf32_bed): Define before including
1160 * elf64-x86-64.c (elf64_bed): Define before including
1162 (elf32_bed): Define before including "elf32-target.h".
1164 2018-04-17 H.J. Lu <hongjiu.lu@intel.com>
1167 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Use a
1168 normal input file with compatible relocation.
1170 2018-04-18 Alan Modra <amodra@gmail.com>
1172 * Makefile.am: Remove support for assorted i386 aout and coff targets.
1173 * config.bfd: Likewise.
1174 * configure.ac: Likewise.
1175 * doc/bfdint.texi: Likewise.
1176 * targets.c: Likewise.
1177 * freebsd.h: Delete.
1178 * i386dynix.c: Delete.
1179 * i386freebsd.c: Delete.
1180 * i386linux.c: Delete.
1181 * i386mach3.c: Delete.
1182 * i386netbsd.c: Delete.
1183 * i386os9k.c: Delete.
1184 * Makefile.in: Regenerate.
1185 * configure: Regenerate.
1186 * po/SRC-POTFILES.in: Regenerate.
1188 2018-04-17 Andrew Sadek <andrew.sadek.se@gmail.com>
1190 Microblaze Target: PIC data text relative
1192 * bfd/reloc.c (2 new BFD relocations):
1193 BFD_RELOC_MICROBLAZE_64_TEXTPCREL &
1194 BFD_RELOC_MICROBLAZE_64_TEXTPCREL
1195 * bfd/bfd-in2.h: Regenerate
1196 * bfd/libbfd.h: Regenerate
1197 * bfd/elf32-microblaze.c (Handle new relocs): define 'HOWTO' of 3
1198 new relocs and handle them in both relocate and relax functions.
1199 (microblaze_elf_reloc_type_lookup): add mapping between for new
1201 (microblaze_elf_relocate_section): Handle new relocs in case of
1203 (microblaze_elf_relax_section): Handle new relocs for elf relaxation.
1205 2018-04-17 Nick Clifton <nickc@redhat.com>
1208 * aoutx.h (find_nearest_line): Check that the symbol name exists
1209 and is long enough, before attempting to see if it is for a .o
1211 * hash.c (bfd_hash_hash): Add an assertion that the string is not
1213 * linker.c (bfd_link_hash_lookup): Fail if the table or string are
1215 (_bfd_generic_link_add_archive_symbols): Fail if an archive entry
1219 * dwarf2.c (concat_filename): Check for a NULL table pointer.
1221 2018-04-16 Nick Clifton <nickc@redhat.com>
1224 * coffgen.c (coff_pointerize_aux): Check for an out of range
1227 2018-04-16 Alan Modra <amodra@gmail.com>
1229 * Makefile.am: Remove arm-epoc-pe support.
1230 * coff-arm.c: Likewise.
1231 * config.bfd: Likewise.
1232 * configure.ac: Likewise.
1233 * targets.c: Likewise.
1234 * epoc-pe-arm.c: Delete.
1235 * epoc-pei-arm.c: Delete.
1236 * Makefile.in: Regenerate.
1237 * configure: Regenerate.
1238 * po/SRC-POTFILES.in: Regenerate.
1240 2018-04-16 Alan Modra <amodra@gmail.com>
1242 * Makefile.am: Remove sparc-aout and sparc-coff support.
1243 * config.bfd: Likewise.
1244 * configure.ac: Likewise.
1245 * targets.c: Likewise.
1246 * aout-sparcle.c: Delete.
1248 * cf-sparclynx.c: Delete.
1249 * coff-sparc.c: Delete.
1251 * sparclinux.c: Delete.
1252 * sparclynx.c: Delete.
1253 * sparcnetbsd.c: Delete.
1255 * Makefile.in: Regenerate.
1256 * configure: Regenerate.
1257 * po/SRC-POTFILES.in: Regenerate.
1259 2018-04-16 Alan Modra <amodra@gmail.com>
1261 * Makefile.am: Remove m68k-aout and m68k-coff support.
1262 * aoutf1.h: Likewise.
1263 * aoutx.h: Likewise.
1264 * archive.c: Likewise.
1265 * bfd-in.h: Likewise.
1267 * coffcode.h: Likewise.
1268 * coffswap.h: Likewise.
1269 * config.bfd: Likewise.
1270 * configure.ac: Likewise.
1271 * configure.host: Likewise.
1272 * doc/bfd.texinfo: Likewise.
1273 * doc/bfdint.texi: Likewise.
1274 * freebsd.h: Likewise.
1275 * gen-aout.c: Likewise.
1276 * hpux-core.c: Likewise.
1277 * libaout.h: Likewise.
1278 * libbfd-in.h: Likewise.
1279 * pdp11.c: Likewise.
1280 * peicode.h: Likewise.
1281 * riscix.c: Likewise.
1282 * targets.c: Likewise.
1284 * coff-apollo.c: Delete.
1285 * coff-aux.c: Delete.
1286 * coff-m68k.c: Delete.
1287 * coff-svm68k.c: Delete.
1288 * coff-u68k.c: Delete.
1289 * hosts/delta68.h: Delete.
1290 * hosts/hp300bsd.h: Delete.
1291 * hosts/m68kaux.h: Delete.
1292 * hosts/news.h: Delete.
1293 * hp300bsd.c: Delete.
1294 * hp300hpux.c: Delete.
1295 * liboasys.h: Delete.
1296 * m68k4knetbsd.c: Delete.
1297 * m68klinux.c: Delete.
1298 * m68knetbsd.c: Delete.
1300 * versados.c: Delete.
1301 * Makefile.in: Regenerate.
1302 * bfd-in2.h: Regenerate.
1303 * configure: Regenerate.
1304 * libbfd.h: Regenerate.
1305 * po/SRC-POTFILES.in: Regenerate.
1307 2018-04-16 Alan Modra <amodra@gmail.com>
1309 * Makefile.am: Remove sh5 and sh64 support.
1310 * archures.c: Likewise.
1311 * config.bfd: Likewise.
1312 * configure.ac: Likewise.
1313 * cpu-sh.c: Likewise.
1314 * elf32-sh-relocs.h: Likewise.
1315 * elf32-sh.c: Likewise.
1316 * targets.c: Likewise.
1317 * elf32-sh64-com.c: Delete.
1318 * elf32-sh64.c: Delete.
1319 * elf32-sh64.h: Delete.
1320 * elf64-sh64.c: Delete.
1321 * Makefile.in: Regenerate.
1322 * bfd-in2.h: Regenerate.
1323 * configure: Regenerate.
1324 * po/SRC-POTFILES.in: Regenerate.
1326 2018-04-16 Alan Modra <amodra@gmail.com>
1328 * Makefile.am: Remove sh-symbianelf support.
1329 * config.bfd: Likewise.
1330 * configure.ac: Likewise.
1331 * targets.c: Likewise.
1332 * elf32-sh-symbian.c: Delete.
1333 * Makefile.in: Regenerate.
1334 * configure: Regenerate.
1335 * po/SRC-POTFILES.in: Regenerate.
1337 2018-04-16 Alan Modra <amodra@gmail.com>
1339 * Makefile.am: Remove vax-bsd and vax-ultrix support.
1340 * config.bfd: Likewise.
1341 * configure.ac: Likewise.
1342 * targets.c: Likewise.
1344 * Makefile.in: Regenerate.
1345 * configure: Regenerate.
1346 * po/SRC-POTFILES.in: Regenerate.
1348 2018-04-16 Alan Modra <amodra@gmail.com>
1350 * Makefile.am: Remove w65 support.
1351 * archures.c: Likewise.
1352 * coffcode.h: Likewise.
1353 * config.bfd: Likewise.
1354 * configure.ac: Likewise.
1355 * targets.c: Likewise.
1356 * coff-w65.c: Delete.
1357 * cpu-w65.c: Delete.
1358 * Makefile.in: Regenerate.
1359 * bfd-in2.h: Regenerate.
1360 * configure: Regenerate.
1361 * po/SRC-POTFILES.in: Regenerate.
1363 2018-04-16 Alan Modra <amodra@gmail.com>
1365 * Makefile.am: Remove we32k support.
1366 * archures.c: Likewise.
1367 * coffcode.h: Likewise.
1368 * config.bfd: Likewise.
1369 * configure.ac: Likewise.
1370 * targets.c: Likewise.
1371 * coff-we32k.c: Delete.
1372 * cpu-we32k.c: Delete.
1373 * Makefile.in: Regenerate.
1374 * bfd-in2.h: Regenerate.
1375 * configure: Regenerate.
1376 * po/SRC-POTFILES.in: Regenerate.
1378 2018-04-16 Alan Modra <amodra@gmail.com>
1380 * Makefile.am: Remove m88k support.
1381 * aoutx.h: Likewise.
1382 * archures.c: Likewise.
1383 * coffcode.h: Likewise.
1384 * coffswap.h: Likewise.
1385 * config.bfd: Likewise.
1386 * configure.ac: Likewise.
1387 * cpu-ns32k.c: Likewise.
1388 * elf32-nds32.c: Likewise.
1389 * mach-o.c: Likewise.
1390 * netbsd-core.c: Likewise.
1391 * reloc.c: Likewise.
1392 * targets.c: Likewise.
1393 * coff-m88k.c: Delete.
1394 * cpu-m88k.c: Delete.
1395 * elf32-m88k.c: Delete.
1396 * hosts/m88kmach3.h: Delete.
1397 * m88kmach3.c: Delete.
1398 * m88kopenbsd.c: Delete.
1399 * Makefile.in: Regenerate.
1400 * bfd-in2.h: Regenerate.
1401 * configure: Regenerate.
1402 * po/SRC-POTFILES.in: Regenerate.
1404 2018-04-16 Alan Modra <amodra@gmail.com>
1406 * Makefile.am: Remove i370 support.
1407 * archures.c: Likewise.
1408 * config.bfd: Likewise.
1409 * configure.ac: Likewise.
1410 * targets.c: Likewise.
1411 * cpu-i370.c: Delete.
1412 * elf32-i370.c: Delete.
1413 * Makefile.in: Regenerate.
1414 * bfd-in2.h: Regenerate.
1415 * configure: Regenerate.
1416 * po/SRC-POTFILES.in: Regenerate.
1418 2018-04-16 Alan Modra <amodra@gmail.com>
1420 * Makefile.am: Remove h8500 support.
1421 * archures.c: Likewise.
1422 * coffcode.h: Likewise.
1423 * config.bfd: Likewise.
1424 * configure.ac: Likewise.
1425 * targets.c: Likewise.
1426 * coff-h8500.c: Delete.
1427 * cpu-h8500.c: Delete.
1428 * Makefile.in: Regenerate.
1429 * bfd-in2.h: Regenerate.
1430 * configure: Regenerate.
1431 * po/SRC-POTFILES.in: Regenerate.
1433 2018-04-16 Alan Modra <amodra@gmail.com>
1435 * Makefile.am: Remove h8300-coff support.
1436 * coffcode.h: Likewise.
1437 * config.bfd: Likewise.
1438 * configure.ac: Likewise.
1439 * reloc16.c: Likewise.
1440 * targets.c: Likewise.
1441 * coff-h8300.c: Delete.
1442 * Makefile.in: Regenerate.
1443 * configure: Regenerate.
1444 * po/SRC-POTFILES.in: Regenerate.
1446 2018-04-16 Alan Modra <amodra@gmail.com>
1448 * Makefile.am: Remove IEEE 695 support.
1449 * archures.c: Likewise.
1451 * config.bfd: Likewise.
1452 * configure.ac: Likewise.
1453 * doc/bfd.texinfo: Likewise.
1454 * doc/bfdint.texi: Likewise.
1455 * doc/bfdsumm.texi: Likewise.
1456 * section.c: Likewise.
1457 * targets.c: Likewise.
1459 * libieee.h: Delete.
1460 * Makefile.in: Regenerate.
1461 * bfd-in2.h: Regenerate.
1462 * configure: Regenerate.
1463 * po/SRC-POTFILES.in: Regenerate.
1465 2018-04-16 Alan Modra <amodra@gmail.com>
1467 * config.bfd: Remove tandem support.
1469 2018-04-16 Alan Modra <amodra@gmail.com>
1471 * Makefile.am: Remove newsos3 support.
1472 * aoutx.h: Likewise.
1473 * config.bfd: Likewise.
1474 * configure.ac: Likewise.
1475 * targets.c: Likewise.
1476 * newsos3.c: Delete.
1477 * Makefile.in: Regenerate.
1478 * configure: Regenerate.
1479 * po/SRC-POTFILES.in: Regenerate.
1481 2018-04-16 Alan Modra <amodra@gmail.com>
1483 * Makefile.am: Remove netware support.
1484 * bfd-in.h: Likewise.
1486 * config.bfd: Likewise.
1487 * configure.ac: Likewise.
1488 * doc/bfdint.texi: Likewise.
1489 * ecoff.c: Likewise.
1490 * targets.c: Likewise.
1492 * nlm-target.h: Delete.
1494 * nlm32-alpha.c: Delete.
1495 * nlm32-i386.c: Delete.
1496 * nlm32-ppc.c: Delete.
1497 * nlm32-sparc.c: Delete.
1500 * nlmcode.h: Delete.
1501 * nlmswap.h: Delete.
1502 * Makefile.in: Regenerate.
1503 * bfd-in2.h: Regenerate.
1504 * configure: Regenerate.
1505 * po/SRC-POTFILES.in: Regenerate.
1507 2018-04-16 Alan Modra <amodra@gmail.com>
1509 * archures.c: Remove tahoe support.
1510 * config.bfd: Likewise.
1511 * configure.ac: Likewise.
1512 * hosts/tahoe.h: Delete.
1513 * bfd-in2.h: Regenerate.
1514 * configure: Regenerate.
1516 2018-04-14 Alan Modra <amodra@gmail.com>
1518 * elf-bfd.h (struct elf_backend_data): Add relropagesize.
1519 * elfxx-target.h (ELF_RELROPAGESIZE): Provide default and
1521 (elfNN_bed): Init relropagesize.
1522 * bfd.c (bfd_emul_get_commonpagesize): Add boolean param to
1523 select relropagesize.
1524 * elf32-ppc.c (ELF_COMMONPAGESIZE): Define as 0x1000.
1525 (ELF_RELROPAGESIZE): Define as ELF_MAXPAGESIZE.
1526 (ELF_MINPAGESIZE): Don't define.
1527 * elf64-ppc.c (ELF_COMMONPAGESIZE): Define as 0x1000.
1528 (ELF_RELROPAGESIZE): Define as ELF_MAXPAGESIZE.
1529 * bfd-in2.h: Regenerate.
1531 2018-04-14 Alan Modra <amodra@gmail.com>
1533 * elf32-ppc.c (ELF_MAXPAGESIZE, ELF_COMMONPAGESIZE): Don't depend
1534 on __QNXTARGET__ define.
1536 2018-04-14 Alan Modra <amodra@gmail.com>
1538 * config.bfd: Add powerpc-*-lynxos* and powerpc-*-windiss*
1541 2018-04-11 Alan Modra <amodra@gmail.com>
1543 * aout-adobe.c: Delete.
1545 * coff-i860.c: Delete.
1546 * coff-i960.c: Delete.
1547 * cpu-i860.c: Delete.
1548 * cpu-i960.c: Delete.
1549 * elf32-i860.c: Delete.
1550 * elf32-i960.c: Delete.
1551 * hosts/i860mach3.h: Delete.
1552 * Makefile.am: Remove i860, i960, bout, and adobe support.
1553 * archures.c: Remove i860 and i960 support.
1554 * coffcode.h: Likewise.
1555 * reloc.c: Likewise.
1556 * aoutx.h: Comment updates.
1557 * archive.c: Remove BOUT and i960 support.
1558 * bfd.c: Remove BOUT support.
1559 * coffswap.h: Remove i960 support.
1560 * config.bfd: Remove i860, i960 and adobe targets.
1561 * configure.ac: Remove adode, bout, i860, i960, icoff targets.
1562 * targets.c: Likewise.
1563 * ieee.c: Remove i960 support.
1564 * mach-o.c: Remove i860 support.
1565 * Makefile.in: Regenerate.
1566 * bfd-in2.h: Regenerate.
1567 * configure: Regenerate.
1568 * libbfd.h: Regenerate.
1569 * po/SRC-POTFILES.in: Regenerate.
1571 2018-04-09 Maciej W. Rozycki <macro@mips.com>
1573 * elf64-mips.c (mips_elf64_write_rel): Handle a NULL BFD pointer
1574 in the BFD symbol referred by the relocation.
1575 (mips_elf64_write_rela): Likewise.
1577 2018-04-09 Maciej W. Rozycki <macro@mips.com>
1579 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Issue an
1580 error for out-of-range `r_sym' values.
1582 2018-04-09 Alan Modra <amodra@gmail.com>
1584 * elf64-ppc.c (struct _ppc64_elf_section_data): Add has_pltcall field.
1585 (struct ppc_link_hash_table): Add can_convert_all_inline_plt.
1586 (ppc64_elf_check_relocs): Set has_pltcall.
1587 (ppc64_elf_adjust_dynamic_symbol): Discard some PLT entries.
1588 (ppc64_elf_inline_plt): New function.
1589 (ppc64_elf_size_dynamic_sections): Discard some PLT entries for locals.
1590 * elf64-ppc.h (ppc64_elf_inline_plt): Declare.
1591 * elf32-ppc.c (has_pltcall): Define.
1592 (struct ppc_elf_link_hash_table): Add can_convert_all_inline_plt.
1593 (ppc_elf_check_relocs): Set has_pltcall.
1594 (ppc_elf_inline_plt): New function.
1595 (ppc_elf_adjust_dynamic_symbol): Discard some PLT entries.
1596 (ppc_elf_size_dynamic_sections): Likewise.
1597 * elf32-ppc.h (ppc_elf_inline_plt): Declare.
1599 2018-04-09 Alan Modra <amodra@gmail.com>
1601 * elf32-ppc.c (ppc_elf_howto_raw): Add PLTSEQ and PLTCALL howtos.
1602 (is_plt_seq_reloc): New function.
1603 (ppc_elf_check_relocs): Handle PLTSEQ and PLTCALL relocs.
1604 (ppc_elf_tls_optimize): Handle inline plt call sequence.
1605 (ppc_elf_relax_section): Handle PLTCALL reloc.
1606 (ppc_elf_relocate_section): Nop out inline plt call sequence when
1608 * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_PLTSEQ and
1609 R_PPC64_PLTCALL entries. Comment R_PPC64_TOCSAVE.
1610 (has_tls_get_addr_call): Correct comment.
1611 (is_branch_reloc): Add PLTCALL.
1612 (is_plt_seq_reloc): New function.
1613 (ppc64_elf_check_relocs): Handle PLT16_LO_DS reloc. Set
1614 has_tls_reloc for R_PPC64_TLSGD and R_PPC64_TLSLD. Create plt
1615 entry for R_PPC64_PLTCALL.
1616 (ppc64_elf_tls_optimize): Handle inline plt call sequence.
1617 (ppc_type_of_stub): Handle PLTCALL reloc.
1618 (toc_adjusting_stub_needed): Likewise.
1619 (ppc64_elf_relocate_section): Set "can_plt_call" for PLTCALL
1620 reloc insn. Nop out inline plt call sequence when resolving
1621 locally. Handle __tls_get_addr inline plt call optimization.
1623 2018-04-09 Alan Modra <amodra@gmail.com>
1625 * elf64-ppc.c (LOCAL_PLT_ENTRY_SIZE): Define.
1626 (struct ppc_stub_hash_entry): Add symtype field.
1628 (struct ppc_link_hash_table): Add pltlocal and relpltlocal.
1629 (create_linkage_sections): Create pltlocal and relpltlocal.
1630 (ppc64_elf_check_relocs): Allow PLT relocs on local symbols.
1632 (ppc64_elf_adjust_dynamic_symbol): Keep PLT entries for inline calls.
1633 (allocate_dynrelocs): Allocate pltlocal and relpltlocal.
1634 (ppc64_elf_size_dynamic_sections): Size pltlocal and relpltlocal.
1635 Keep PLT entries for inline calls against locals.
1636 (ppc_build_one_stub): Use pltlocal as appropriate.
1637 (ppc_size_one_stub): Likewise.
1638 (ppc64_elf_size_stubs): Set symtype.
1639 (build_global_entry_stubs_and_plt): Init pltlocal and write
1640 relpltlocal for globals.
1641 (write_plt_relocs_for_local_syms): Likewise for local syms.
1642 (ppc64_elf_relocate_section): Support PLT for local syms.
1643 * elf32-ppc.c (PLT_KEEP): Define.
1644 (struct ppc_elf_link_hash_table): Add pltlocal and relpltlocal.
1645 (ppc_elf_create_glink): Create pltlocal and relpltlocal.
1646 (ppc_elf_check_relocs): Allow PLT relocs on local symbols.
1647 Set PLT_KEEP. Adjust update_local_sym_info call.
1648 (ppc_elf_adjust_dynamic_symbol): Keep PLT entries for inline calls.
1649 (allocate_dynrelocs): Allocate pltlocal and relpltlocal.
1650 (ppc_elf_size_dynamic_sections): Size pltlocal and relpltlocal.
1651 (ppc_elf_relocate_section): Support PLT16 relocs for local syms.
1652 (write_global_sym_plt): Init pltlocal and write relpltlocal.
1653 (ppc_finish_symbols): Likewise for locals.
1655 2018-04-09 Alan Modra <amodra@gmail.com>
1657 * elf64-ppc.c (ppc_build_one_stub): Move output of PLT relocs
1658 for local symbols to..
1659 (write_plt_relocs_for_local_syms): ..here. New function.
1660 (ppc64_elf_finish_dynamic_symbol): Move output of PLT relocs for
1662 (build_global_entry_stubs_and_plt): ..here. Rename from
1663 build_global_entry_stubs.
1664 (ppc64_elf_build_stubs): Always call build_global_entry_stubs_and_plt.
1665 Call write_plt_relocs_for_local_syms.
1666 * elf32-ppc.c (get_sym_h): New function.
1667 (ppc_elf_relax_section): Use get_sym_h.
1668 (ppc_elf_relocate_section): Move output of PLT relocs and glink
1669 stubs for local symbols to..
1670 (ppc_finish_symbols): ..here. New function.
1671 (ppc_elf_finish_dynamic_symbol): Move output of PLT relocs for
1673 (write_global_sym_plt): ..here. New function.
1674 * elf32-ppc.h (ppc_elf_modify_segment_map): Delete attribute.
1675 (ppc_finish_symbols): Declare.
1677 2018-04-09 Alan Modra <amodra@gmail.com>
1679 * elf32-ppc.c (ppc_elf_check_relocs): Handle PLT16 relocs.
1680 (ppc_elf_relocate_section): Likewise.
1681 * elf64-ppc.c (ppc64_elf_check_relocs): Handle PLT16_LO_DS.
1682 (ppc64_elf_relocate_section): Likewise. Correct PLT16
1683 resolution to plt entry relative to toc pointer.
1685 2018-04-09 Alan Modra <amodra@gmail.com>
1687 * elf64-ppc.c (TLS_TLS, TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL,
1688 TLS_TPRELGD, TLS_EXPLICIT): Renumber. Test TLS_TLS throughout
1689 file when other TLS flags are tested in a mask.
1690 (TLS_MARK, NON_GOT): Define.
1691 (PLT_IFUNC): Redefine, and test TLS_TLS throughout file as well.
1692 (update_local_sym_info): Don't create got entry when NON_GOT.
1693 (ppc64_elf_check_relocs): Pass NON_GOT with PLT_IFUNC.
1695 (get_tls_mask): Do toc lookup if tls_mask is just TLS_MARK.
1696 (ppc64_elf_relocate_section): Likewise.
1697 (ppc64_elf_tls_optimize): Don't attempt to optimize indirect
1698 __tls_get_addr calls lacking a marker reloc.
1699 * elf32-ppc.c (TLS_TLS, TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL,
1700 TLS_TPRELGD): Renumber. Update comment.
1701 (TLS_MARK, NON_GOT): Define.
1702 (PLT_IFUNC): Redefine, and test TLS_TLS throughout file as well.
1703 (update_local_sym_info): Don't create got entry when NON_GOT.
1704 (ppc_elf_check_relocs): Pass NON_GOT with PLT_IFUNC.
1706 (ppc_elf_tls_optimize): Don't attempt to optimize indirect
1707 __tls_get_addr calls lacking a marker reloc.
1709 2018-04-06 H.J. Lu <hongjiu.lu@intel.com>
1711 * elf64-x86-64.c (elf_x86_64_info_to_howto): Don't mask out
1712 R_X86_64_converted_reloc_bit.
1714 2018-04-05 H.J. Lu <hongjiu.lu@intel.com>
1717 * configure: Regenerated.
1719 2018-04-05 Alan Modra <amodra@gmail.com>
1721 * elf-hppa.h (elf_hppa_info_to_howto): Init howto to NULL.
1722 (elf_hppa_info_to_howto_rel): Likewise.
1724 2018-04-04 Maciej W. Rozycki <macro@mips.com>
1726 * elf-hppa.h (elf_hppa_info_to_howto): Also return
1727 unsuccessfully for unimplemented relocations.
1728 (elf_hppa_info_to_howto_rel): Likewise.
1730 2018-04-04 Maciej W. Rozycki <macro@mips.com>
1732 * elf32-i860.c (lookup_howto): Add `abfd' parameter. Set the
1733 `bfd_error_bad_value' error and call `_bfd_error_handler' on a
1734 howto lookup failure.
1735 (elf32_i860_reloc_type_lookup): Adjust `lookup_howto' call
1737 (elf32_i860_info_to_howto_rela): Likewise.
1738 (elf32_i860_relocate_splitn): Likewise.
1739 (elf32_i860_relocate_pc16): Likewise.
1740 (elf32_i860_relocate_pc26): Likewise.
1741 (elf32_i860_relocate_section): Likewise.
1743 2018-04-04 Maciej W. Rozycki <macro@mips.com>
1745 * elf32-visium.c (visium_info_to_howto_rela): Correct the range
1746 check for `visium_elf_howto_table' table access.
1748 2018-04-04 Maciej W. Rozycki <macro@mips.com>
1750 * elf32-iq2000.c (iq2000_info_to_howto_rela): Correct the range
1751 check for `iq2000_elf_howto_table' table access.
1753 2018-04-04 Maciej W. Rozycki <macro@mips.com>
1755 * elf32-frv.c (frv_info_to_howto_rela): Correct the range check
1756 for `elf32_frv_howto_table' table access.
1758 2018-04-04 Maciej W. Rozycki <macro@mips.com>
1760 * elf32-mips.c (mips_elf32_rtype_to_howto): Also return
1761 unsuccessfully for placeholder howtos.
1762 * elf64-mips.c (mips_elf64_rtype_to_howto): Likewise.
1763 * elfn32-mips.c (mips_elf_n32_rtype_to_howto): Likewise.
1765 2018-03-29 Maciej W. Rozycki <macro@mips.com>
1767 * elf32-mips.c (mips_info_to_howto_rel): Remove the calls to
1768 `_bfd_error_handler' and to set the `bfd_error_bad_value' error.
1770 2018-03-28 Maciej W. Rozycki <macro@mips.com>
1772 * elf-hppa.h (elf_hppa_info_to_howto_rel): Remove
1773 ATTRIBUTE_UNUSED from `abfd'.
1775 2018-03-28 Maciej W. Rozycki <macro@mips.com>
1777 * elf-hppa.h (elf_hppa_info_to_howto_rel): Correct
1778 `_bfd_error_handler' call formatting.
1780 2018-03-28 Maciej W. Rozycki <macro@mips.com>
1782 * elf32-mips.c (mips_info_to_howto_rel): Call
1783 `mips_elf32_rtype_to_howto' directly rather than via
1784 `->elf_backend_mips_rtype_to_howto'.
1786 2018-03-28 Renlin Li <renlin.li@arm.com>
1789 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Add cases for
1790 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12,
1791 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
1792 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12,
1793 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
1794 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12,
1795 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
1796 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12,
1797 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
1798 (elfNN_aarch64_final_link_relocate): Support new relocations.
1799 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Support new
1801 (_bfd_aarch64_elf_resolve_relocation): Support new relocations.
1803 2018-03-28 Renlin Li <renlin.li@arm.com>
1806 * reloc.c: Add BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12
1807 BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12_NC,
1808 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12,
1809 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
1810 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12,
1811 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
1812 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12,
1813 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
1814 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12,
1815 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
1816 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Add table entry for
1817 TLSLE_LDST16_TPREL_LO12,
1818 TLSLE_LDST16_TPREL_LO12_NC,
1819 TLSLE_LDST32_TPREL_LO12,
1820 TLSLE_LDST32_TPREL_LO12_NC,
1821 TLSLE_LDST64_TPREL_LO12,
1822 TLSLE_LDST64_TPREL_LO12_NC,
1823 TLSLE_LDST8_TPREL_LO12,
1824 TLSLE_LDST8_TPREL_LO12_NC.
1825 * bfd-in2.h: Regenerated.
1826 * libbfd.h: Regenerated.
1828 2018-03-28 Eric Botcazou <ebotcazou@adacore.com>
1831 * elfxx-sparc.c (struct _bfd_sparc_elf_link_hash_entry): Add new flag
1832 has_old_style_got_reloc.
1833 (_bfd_sparc_elf_check_relocs) <GOT relocations>: Set it for old-style
1834 relocations. Fix a couple of long lines.
1835 (_bfd_sparc_elf_relocate_section) <R_SPARC_GOTDATA_OP>: Do not generate
1836 a R_SPARC_NONE for the GOT slot if the symbol is also subject to old-style
1839 2018-03-25 H.J. Lu <hongjiu.lu@intel.com>
1842 * elf64-x86-64.c (elf_x86_64_finish_dynamic_sections): Add
1843 ENDBR64 to the TLSDESC PLT entry.
1845 2018-03-21 Alan Modra <amodra@gmail.com>
1847 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Trim uninteresting
1848 symbols. Use size_t counts. Delete redundant opd test.
1850 2018-03-21 Alan Modra <amodra@gmail.com>
1852 * elf32-ppc.c (ppc_elf_tls_optimize): Delete locsyms.
1854 2018-03-21 Alan Modra <amodra@gmail.com>
1856 * elf32-ppc.c (struct ppc_elf_link_hash_entry): Make tls_mask
1858 (update_local_sym_info): Likewise for local_got_tls_masks.
1859 (ppc_elf_tls_optimize): Likewise for lgot_masks.
1861 2018-03-21 Alan Modra <amodra@gmail.com>
1863 * elf64-ppc.c (ppc_size_one_stub): Fix comment typo.
1864 (ppc64_elf_layout_multitoc): Allocate relocs for tprel as we
1865 do in size_dynamic_sections.
1867 2018-03-21 Alan Modra <amodra@gmail.com>
1869 * elf64-ppc.c (ppc64_elf_relocate_section): Don't access rel[1]
1870 without first checking array bounds.
1871 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1873 2018-03-20 H.J. Lu <hongjiu.lu@intel.com>
1876 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Set
1877 non_ir_ref_dynamic if a symbol is made dynamic by --dynamic-list.
1879 2018-03-19 Nick Clifton <nickc@redhat.com>
1881 * po/es.po: Updated Spanish translation.
1883 2018-03-15 Max Filippov <jcmvbkbc@gmail.com>
1885 * elf32-xtensa.c (xlate_map_entry): Change types of address
1886 fields from 'unsigned' to 'bfd_vma'.
1887 (xlate_offset_with_removed_text): Use struct xlate_map_entry as
1888 the key argument to bsearch. Allow offsets past the end of a
1889 section, use the last map entry for translation of such offsets.
1891 2018-03-15 Kuan-Lin Chen <kuanlinchentw@gmail.com>
1893 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Removed.
1894 Not support the target feature.
1895 (nds32_elf_ex9_itb_base): Likewise.
1896 (nds32_elf_ex9_import_table): Likewise.
1897 (nds32_elf_ex9_finish): Likewise.
1898 (nds32_elf_ex9_reloc_jmp): Likewise.
1899 (nds32_elf_get_insn_with_reg): Likewise.
1900 (nds32_get_local_syms): Likewise.
1901 (nds32_elf_ex9_replace_instruction): Likewise.
1902 (nds32_elf_ifc_calc): Likewise.
1903 (nds32_elf_ifc_finish): Likewise.
1904 (nds32_elf_ifc_replace): Likewise.
1905 (nds32_elf_ifc_reloc): Likewise.
1907 2018-03-14 Alan Modra <amodra@gmail.com>
1909 * elf64-ppc.c (sfpr_define): Adjust for stub_sec size having
1910 sfpr size added before defining alias symbols.
1911 (ppc64_elf_build_stubs): Add stub section padding before
1912 copying sfpr contents and defining save/restore alias symbols.
1914 2018-03-14 H.J. Lu <hongjiu.lu@intel.com>
1917 * elflink.c (elf_gc_mark_debug_section): Also check the local
1918 debug definition section.
1920 2018-03-13 Nick Clifton <nickc@redhat.com>
1923 * pei-x86_64.c (pex64_get_unwind_info): Change to a boolean
1924 function. Add an end address parameter. Check access of the data
1925 pointer to make sure that they do not extend beyond the end
1926 address. Return FALSE if any check fails. Add the end address
1927 pointer to the ui structure.
1928 (pex64_xdata_print_uwd_codes): Check accesses of the raw unwind
1929 codes to make sure that they do not extend beyond the end address
1930 pointer. Print an error message and return immediately if any
1933 2018-03-09 Nick Clifton <nickc@redhat.com>
1935 * elf64-s390.c (elf_s390_relocate_section): Move check for
1936 relocations against non-allocated sections to before the code that
1937 handles ifunc relocations.
1938 * elf32-s390.c (elf_s390_relocate_section): Likewise.
1939 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Treat
1940 relocs against IFUNC symbols in non-allocated sections as relocs
1941 against FUNC symbols.
1942 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
1944 2018-03-08 H.J. Lu <hongjiu.lu@intel.com>
1947 * elf32-i386.c (elf_i386_relocate_section): Treat relocation
1948 against IFUNC symbol in SHT_NOTE section without SHF_ALLOC as
1949 relocation against FUNC symbol.
1950 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1952 2018-03-07 Renlin Li <renlin.li@arm.com>
1955 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Check absolute
1956 symbol, and don't emit relocation in specific case.
1958 2018-03-07 Alan Modra <amodra@gmail.com>
1960 * elf64-mips.c (mips_elf64_rtype_to_howto): Return NULL on error.
1961 (mips_elf64_slurp_one_reloc_table): Pass on error.
1963 2018-03-03 James Cowgill <james.cowgill@mips.com>
1964 Maciej W. Rozycki <macro@mips.com>
1967 * elfxx-mips.c (mips_elf_calculate_relocation): Only return
1968 after calling `undefined_symbol' hook if this is an error
1969 condition. Assume the value of 0 for the symbol requested
1972 2018-03-02 Jim Wilson <jimw@sifive.com>
1975 * elfnn-aarch64.c (_bfd_aarch64_resize_stubs): Add 8 bytes for branch
1976 and nop instead of 4.
1977 (elfNN_arch64_build_stubs): Add nop after branch. Increase size by
1980 2018-03-01 Jim Wilson <jimw@sifive.com>
1983 * elfnn-riscv.c (riscv_relax_delete_bytes): When adjust st_size, use
1984 else if instead of if.
1986 2018-03-01 Alan Modra <amodra@gmail.com>
1988 * elf32-ft32.c (ft32_info_to_howto_rela): Correct range test.
1990 2018-02-28 Alan Modra <amodra@gmail.com>
1993 * aoutx.h (swap_std_reloc_in): Correct r_index bound check.
1995 2018-02-28 Nick Clifton <nickc@redhat.com>
1999 * dwarf2.c (read_n_bytes): Replace size parameter with dwarf_block
2000 pointer. Drop unused abfd parameter. Check the size of the block
2001 before initialising the data field. Return the end pointer if the
2003 (read_attribute_value): Adjust invocations of read_n_bytes.
2006 * dwarf1.c (parse_die): Check the length of form blocks before
2007 advancing the data pointer.
2009 2018-02-28 Alan Modra <amodra@gmail.com>
2012 * aoutx.h (translate_symbol_table): Print an error message and set
2013 bfd_error on finding an invalid name string offset.
2015 2018-02-27 H.J. Lu <hongjiu.lu@intel.com>
2017 * config.in: Regenerated.
2018 * configure: Likewise.
2019 * configure.ac: Add --enable-separate-code.
2020 (DEFAULT_LD_Z_SEPARATE_CODE): New AC_DEFINE_UNQUOTED. Default
2021 to 1 for Linux/x86 targets,
2022 * elf64-x86-64.c (ELF_MAXPAGESIZE): Set to 0x1000 if
2023 DEFAULT_LD_Z_SEPARATE_CODE is 1.
2025 2018-02-27 Nick Clifton <nickc@redhat.com>
2027 * aout-cris.c (swap_ext_reloc_out): Standadize error/warning
2029 * elf-hppa.h (elf_hppa_info_to_howto_rel): Likewise.
2030 * elf32-i386.c (elf_i386_reloc_type_lookup): Likewise.
2031 * elf32-xtensa.c (elf_xtensa_reloc_type_lookup): Likewise.
2032 * elf64-ppc.c (ppc64_elf_reloc_type_lookup): Likewise.
2033 * elf64-s390.c (elf_s390_reloc_type_lookup): Likewise.
2034 * elf64-sh64.c (sh_elf64_info_to_howto): Likewise.
2035 * elfxx-ia64.c (ia64_elf_reloc_type_lookup): Likewise.
2036 * elfxx-sparc.c (_bfd_sparc_elf_reloc_type_lookup): Likewise.
2037 * elfxx-tilegx.c (tilegx_reloc_type_lookup): Likewise.
2040 * elf-bfd.h (struct elf_backend_data): Change the return type of
2041 the elf_info_to_howto and elf_info_to_howto_rel function pointers
2043 * elfcode.h (elf_slurp_reloc_table_from_section): Check the return
2044 value from the info_to_howto function and fail if that function
2046 * elf32-h8300.c (elf32_h8_relocate_section): Check return value
2047 from the info_to_howto function.
2048 (elf32_h8_relax_section): Likewise.
2049 * elf32-lm32.c (lm32_elf_relocate_section): Likewise.
2050 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
2051 * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise.
2052 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
2053 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
2054 * elf64-ia64-vms.c (elf64_ia64_relocate_section): Likewise.
2055 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Likewise.
2056 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
2057 * elfnn-ia64.c (elfNN_ia64_relocate_section): Likewise.
2058 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
2059 (riscv_elf_relocate_section): Likewise.
2060 * elf-hppa.h (elf_hppa_info_to_howto): Change return type to
2061 bfd_boolean. Issue an error message, set an error value and
2062 return FALSE if the reloc is not recognized.
2063 (elf_hppa_info_to_howto_rel): Likewise.
2064 * elf-m10200.c (mn10200_info_to_howto): Likewise.
2065 * elf-m10300.c (mn10300_info_to_howto): Likewise.
2066 * elf.c (_bfd_elf_no_info_to_howto): Likewise.
2067 * elf32-arc.c (arc_info_to_howto_rel): Likewise.
2068 * elf32-arm.c (elf32_arm_info_to_howto): Likewise.
2069 * elf32-avr.c (avr_info_to_howto_rela): Likewise.
2070 * elf32-bfin.c (bfin_info_to_howto): Likewise.
2071 * elf32-cr16.c (elf_cr16_info_to_howto): Likewise.
2072 * elf32-cr16c.c (elf_cr16c_info_to_howto): Likewise.
2073 * elf32-cris.c (elf_cr16c_info_to_howto_rel)
2074 (cris_info_to_howto_rela): Likewise.
2075 * elf32-crx.c (elf_crx_info_to_howto): Likewise.
2076 * elf32-d10v.c (d10v_info_to_howto_rel): Likewise.
2077 * elf32-d30v.c (d30v_info_to_howto_rel, d30v_info_to_howto_rela):
2079 * elf32-dlx.c (dlx_rtype_to_howto, elf32_dlx_info_to_howto)
2080 (elf32_dlx_info_to_howto_rel): Likewise.
2081 * elf32-epiphany.c (epiphany_info_to_howto_rela): Likewise.
2082 * elf32-fr30.c (fr30_info_to_howto_rela): Likewise.
2083 * elf32-frv.c (frv_info_to_howto_rela)
2084 (frvfdpic_info_to_howto_rel): Likewise.
2085 * elf32-ft32.c (ft32_info_to_howto_rela): Likewise.
2086 * elf32-gen.c (elf_generic_info_to_howto)
2087 (elf_generic_info_to_howto_rel): Likewise.
2088 * elf32-h8300.c (elf32_h8_info_to_howto)
2089 (elf32_h8_info_to_howto_rel): Likewise.
2090 * elf32-i370.c (i370_elf_info_to_howto): Likewise.
2091 * elf32-i386.c (elf_i386_reloc_type_lookup)
2092 (elf_i386_rtype_to_howto, elf_i386_info_to_howto_rel): Likewise.
2093 * elf32-i860.c (lookup_howto, elf32_i860_info_to_howto_rela):
2095 * elf32-i960.c (elf32_i960_info_to_howto_rel): Likewise.
2096 * elf32-ip2k.c (ip2k_info_to_howto_rela): Likewise.
2097 * elf32-iq2000.c (iq2000_info_to_howto_rela): Likewise.
2098 * elf32-lm32.c (lm32_info_to_howto_rela): Likewise.
2099 * elf32-m32c.c (m32c_info_to_howto_rela): Likewise.
2100 * elf32-m32r.c (m32r_info_to_howto_rel, m32r_info_to_howto):
2102 * elf32-m68hc11.c (m68hc11_info_to_howto_rel): Likewise.
2103 * elf32-m68hc12.c (m68hc11_info_to_howto_rel): Likewise.
2104 * elf32-m68k.c (rtype_to_howto): Likewise.
2105 * elf32-mcore.c (mcore_elf_info_to_howto): Likewise.
2106 * elf32-mep.c (mep_info_to_howto_rela): Likewise.
2107 * elf32-metag.c (metag_info_to_howto_rela): Likewise.
2108 * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise.
2109 * elf32-mips.c (mips_info_to_howto_rel, mips_info_to_howto_rela):
2111 * elf32-moxie.c (moxie_info_to_howto_rela): Likewise.
2112 * elf32-msp430.c (msp430_info_to_howto_rela): Likewise.
2113 * elf32-mt.c (mt_info_to_howto_rela): Likewise.
2114 * elf32-nds32.c (nds32_info_to_howto_rel, nds32_info_to_howto):
2116 * elf32-nios2.c (nios2_elf32_info_to_howto): Likewise.
2117 * elf32-or1k.c (or1k_info_to_howto_rela): Likewise.
2118 * elf32-pj.c (pj_elf_info_to_howto): Likewise.
2119 * elf32-ppc.c (ppc_elf_info_to_howto): Likewise.
2120 * elf32-pru.c (pru_elf32_info_to_howto): Likewise.
2121 * elf32-rl78.c (rl78_info_to_howto_rela): Likewise.
2122 * elf32-rx.c (rx_info_to_howto_rela): Likewise.
2123 * elf32-s390.c (elf_s390_info_to_howto): Likewise.
2124 * elf32-score.c (s3_bfd_score_info_to_howto)
2125 (_bfd_score_info_to_howto): Likewise.
2126 * elf32-score7.c (s7_bfd_score_info_to_howto): Likewise.
2127 * elf32-sh.c (sh_elf_info_to_howto): Likewise.
2128 * elf32-spu.c (spu_elf_info_to_howto): Likewise.
2129 * elf32-tic6x.c (elf32_tic6x_info_to_howto)
2130 (elf32_tic6x_info_to_howto_rel): Likewise.
2131 * elf32-tilepro.c (tilepro_info_to_howto_rela): Likewise.
2132 * elf32-v850.c (v850_elf_info_to_howto_rel)
2133 (v850_elf_info_to_howto_rela, v800_elf_info_to_howto): Likewise.
2134 * elf32-vax.c (rtype_to_howto): Likewise.
2135 * elf32-visium.c (visium_info_to_howto_rela): Likewise.
2136 * elf32-wasm32.c (elf32_wasm32_rtype_to_howto)
2137 (elf32_wasm32_info_to_howto_rela): Likewise.
2138 * elf32-xc16x.c (elf32_xc16x_info_to_howto): Likewise.
2139 * elf32-xgate.c (xgate_info_to_howto_rel): Likewise.
2140 * elf32-xstormy16.c (xstormy16_info_to_howto_rela): Likewise.
2141 * elf32-xtensa.c (elf_xtensa_info_to_howto_rela): Likewise.
2142 * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise.
2143 * elf64-gen.c (elf_generic_info_to_howto)
2144 (elf_generic_info_to_howto_rel): Likewise.
2145 * elf64-ia64-vms.c (elf64_ia64_info_to_howto): Likewise.
2146 * elf64-mips.c (mips_elf64_info_to_howto_rela): Likewise.
2147 * elf64-mmix.c (mmix_info_to_howto_rela): Likewise.
2148 * elf64-ppc.c (ppc64_elf_info_to_howto): Likewise.
2149 * elf64-s390.c (elf_s390_reloc_type_lookup): Likewise.
2150 * elf64-sh64.c (elf_s390_info_to_howto, sh_elf64_info_to_howto):
2152 * elf64-x86-64.c (elf_x86_64_info_to_howto): Likewise.
2153 * elfn32-mips.c (mips_info_to_howto_rel, mips_info_to_howto_rela):
2155 * elfnn-aarch64.c (elfNN_aarch64_info_to_howto): Likewise.
2156 * elfnn-ia64.c (elfNN_ia64_info_to_howto): Likewise.
2157 * elfnn-riscv.c (riscv_info_to_howto_rela): Likewise.
2158 * elfxx-ia64.c (ia64_elf_reloc_type_lookup): Likewise.
2159 * elfxx-sparc.c (_bfd_sparc_elf_info_to_howto): Likewise.
2160 * elfxx-tilegx.c (tilegx_info_to_howto_rela): Likewise.
2161 * elf32-score.h (s7_bfd_score_info_to_howto): Update prototype.
2162 * elfxx-sparc.h (_bfd_sparc_elf_info_to_howto): Update prototype.
2163 * elfxx-tilegx.h (tilegx_info_to_howto_rela): Update prototype.
2164 * elfxx-target.h (elf_info_to_howto, elf_info_to_howto_rel):
2167 2018-02-26 Jim Wilson <jimw@sifive.com>
2168 Stephan Schreiber <info@fs-driver.org>
2171 * elfnn-ia64.c (elfNN_ia64_relax_section): After ia64_elf_relax_brl
2172 call, set changed_contents and changed_relocs. Likewise after
2173 successful ia64_elf_relax_br call.
2175 2018-02-26 Alan Modra <amodra@gmail.com>
2177 * elf.c (assign_file_positions_except_relocs): Don't segfault
2178 when actual number of phdrs is less than allocated. Delete
2179 outdated comment. Formatting.
2181 2018-02-26 Alan Modra <amodra@gmail.com>
2183 * elf-m10300.c, * elf-s390-common.c, * elf32-arc.c, * elf32-cris.c,
2184 * elf32-dlx.c, * elf32-frv.c, * elf32-i370.c, * elf32-lm32.c,
2185 * elf32-m32r.c, * elf32-m68hc1x.c, * elf32-m68k.c,
2186 * elf32-microblaze.c, * elf32-msp430.c, * elf32-nds32.c,
2187 * elf32-nios2.c, * elf32-or1k.c, * elf32-rl78.c, * elf32-rx.c,
2188 * elf32-score.c, * elf32-score7.c, * elf32-sh-symbian.c,
2189 * elf32-sh.c, * elf32-spu.c, * elf32-v850.c, * elf32-xtensa.c,
2190 * elf64-alpha.c, * elf64-ia64-vms.c, * elf64-mmix.c,
2191 * elf64-sh64.c, * elf64-sparc.c, * elfnn-ia64.c, * elfxx-tilegx.c,
2192 * mmo.c, * osf-core.c, * srec.c, * vms-alpha.c: Standardize
2193 error/warning messages.
2195 2018-02-26 Alan Modra <amodra@gmail.com>
2197 * archive.c, * bfd.c, * linker.c, * reloc.c, * stabs.c,
2198 * syms.c: Standardize error/warning messages.
2200 2018-02-26 Alan Modra <amodra@gmail.com>
2202 * aout-adobe.c, * aout-cris.c, * i386linux.c, * m68klinux.c,
2203 * sparclinux.c, * coff-alpha.c, * coff-arm.c, * coff-mcore.c,
2204 * coffcode.h, * coffgen.c, * cofflink.c, * ecoff.c, * pe-mips.c,
2205 * peXXigen.c, * peicode.h: Standardize error/warning messages.
2207 2018-02-26 Alan Modra <amodra@gmail.com>
2209 * elf32-arm.c, * elfnn-aarch64.c: Standardize error/warning messages.
2211 2018-02-26 Alan Modra <amodra@gmail.com>
2213 * elfxx-mips.c: Standardize error/warning messages.
2215 2018-02-26 Alan Modra <amodra@gmail.com>
2217 * dwarf2.c, * elf-attrs.c, * elf-eh-frame.c, * elf.c, * elf32-gen.c,
2218 * elflink.c: Standardize error/warning messages. Replace use of
2219 linker callback einfo with _bfd_error_handler when possible.
2221 2018-02-26 Alan Modra <amodra@gmail.com>
2223 * aoutx.h, * coff-alpha.c, * coff-i860.c, * coff-m68k.c,
2224 * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c,
2225 * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-w65.c,
2226 * elf-bfd.h, * elf-m10300.c, * elf.c, * elf32-avr.c, * elf32-bfin.c,
2227 * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c,
2228 * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c,
2229 * elf32-fr30.c, * elf32-frv.c, * elf32-i370.c, * elf32-i386.c,
2230 * elf32-i960.c, * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c,
2231 * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c,
2232 * elf32-m68k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c,
2233 * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c,
2234 * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-or1k.c,
2235 * elf32-pj.c, * elf32-ppc.c, * elf32-rl78.c, * elf32-rx.c,
2236 * elf32-s390.c, * elf32-sh.c, * elf32-spu.c, * elf32-tic6x.c,
2237 * elf32-v850.c, * elf32-vax.c, * elf32-visium.c, * elf32-wasm32.c,
2238 * elf32-xgate.c, * elf32-xtensa.c, * elf64-alpha.c,
2239 * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c,
2240 * elf64-ppc.c, * elf64-s390.c, * elf64-sparc.c, * elf64-x86-64.c,
2241 * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c,
2242 * elfnn-riscv.c, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-riscv.h,
2243 * elfxx-sparc.c, * elfxx-sparc.h, * reloc.c: Standardize
2244 unrecognized/unsupported reloc message.
2246 2018-02-26 Alan Modra <amodra@gmail.com>
2248 * elf32-ppc.c: Standardize error/warning messages. Use
2249 _bfd_error_handler rather than einfo when einfo features not used.
2250 * elf64-ppc.c: Likewise.
2252 2018-02-23 Alan Modra <amodra@gmail.com>
2255 * elf.c (assign_file_positions_for_non_load_sections): Remove RELRO
2256 segment if no matching LOAD segment.
2258 2018-02-23 Kuan-Lin Chen <kuanlinchentw@gmail.com>
2260 * elf32-nds32.h: Define mask for ict_model.
2262 2018-02-20 Jason Duerstock <jason.duerstock@gmail.com>
2264 * elfnn-ia64.c (elf_backend_can_gc_sections): Enable.
2266 2018-02-19 Maciej W. Rozycki <macro@mips.com>
2269 2018-01-12 Vlad Ivanov <vlad@ivanov.email>
2271 * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when
2272 .reginfo section has wrong size.
2274 2018-02-19 Maciej W. Rozycki <macro@mips.com>
2276 * elfxx-mips.c (_bfd_mips_elf_always_size_sections): Set
2277 SEC_FIXED_SIZE and SEC_HAS_CONTENTS flags for `.reginfo' and
2278 `.MIPS.abiflags' sections.
2279 (_bfd_mips_elf_final_link): Avoid reading beyond `.reginfo'
2282 2018-02-19 Maciej W. Rozycki <macro@mips.com>
2284 * section.c (SEC_FIXED_SIZE): New macro.
2285 * bfd-in2.h: Regenerate.
2287 2018-02-19 Maciej W. Rozycki <macro@mips.com>
2289 * section.c (SEC_HAS_GOT_REF): Remove macro.
2290 * bfd-in2.h: Regenerate.
2292 2018-02-19 Alan Modra <amodra@gmail.com>
2294 * elf-attrs.c (_bfd_elf_parse_attributes): Correct _bfd_error_handler
2296 * elfxx-mips.c (_bfd_mips_elf_final_link): Likewise.
2297 * elfnn-riscv.c (_bfd_riscv_relax_align): Likewise.
2298 (_bfd_riscv_relax_pc): Likewise and fix typos.
2299 * libbfd-in.h (_bfd_error_handler): Add attribute printf.
2300 * libbfd.h: Regenerate.
2302 2018-02-19 Alan Modra <amodra@gmail.com>
2304 * dwarf2.c (read_section): Don't use 'll' format modifier.
2305 (find_abstract_instance): Likewise.
2306 * elfcore.h (elf_core_file_p): Likewise.
2308 2018-02-19 Alan Modra <amodra@gmail.com>
2310 * bfd-in.h: Include inttypes.h or if not available define
2311 PRId64, PRIu64 and PRIx64.
2312 * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Remove support for L
2313 modifier to print bfd_vma.
2314 * coff-arm.c, * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c,
2315 * coff-sh.c, * coff-tic80.c, * coffcode.h, * coffgen.c, * cofflink.c,
2316 * compress.c, * dwarf2.c, * elf-m10300.c, * elf.c, * elf32-arc.c,
2317 * elf32-arm.c, * elf32-bfin.c, * elf32-cris.c, * elf32-hppa.c,
2318 * elf32-i386.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32r.c,
2319 * elf32-m68k.c, * elf32-metag.c, * elf32-nds32.c, * elf32-nios2.c,
2320 * elf32-ppc.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c,
2321 * elf32-score7.c, * elf32-sh.c, * elf32-sh64.c, * elf32-spu.c,
2322 * elf32-tic6x.c, * elf32-tilepro.c, * elf32-v850.c, * elf32-vax.c,
2323 * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c,
2324 * elf64-mmix.c, * elf64-s390.c, * elf64-sh64.c, * elf64-x86-64.c,
2325 * elfcode.h, * elfcore.h, * elflink.c, * elfnn-aarch64.c,
2326 * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-mips.c, * elfxx-sparc.c,
2327 * elfxx-tilegx.c, * ieee.c, * ihex.c, * mach-o.c, * merge.c, * mmo.c,
2328 * peXXigen.c, * xcofflink.c: Replace use of Lx modifier with PRIx64,
2329 and cast input to uint64_t, and similarly for Ld and Lu.
2330 * bfd-in2.h: Regenerate.
2332 2018-02-19 Alan Modra <amodra@gmail.com>
2334 * elf32-arm.c, * elf32-hppa.c, * elf32-lm32.c, * elf32-m32r.c,
2335 * elf32-metag.c, * elf32-nds32.c, * elf32-or1k.c, * elf32-ppc.c,
2336 * elf32-s390.c, * elf32-sh.c, * elf32-tic6x.c, * elf32-tilepro.c,
2337 * elf64-ppc.c, * elf64-s390.c, * elflink.c, * elfnn-aarch64.c,
2338 * elfnn-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c,
2339 * reloc.c: Replace use of %R and %T in format strings passed to
2340 einfo and friends by %pR and %pT.
2342 2018-02-19 Alan Modra <amodra@gmail.com>
2344 * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Handle %pA and %pB in place
2346 * aout-adobe.c: Update all messages using %A and %B.
2347 * aout-cris.c: Likewise.
2348 * aoutx.h: Likewise.
2349 * archive.c: Likewise.
2350 * binary.c: Likewise.
2351 * cache.c: Likewise.
2352 * coff-alpha.c: Likewise.
2353 * coff-arm.c: Likewise.
2354 * coff-i860.c: Likewise.
2355 * coff-mcore.c: Likewise.
2356 * coff-ppc.c: Likewise.
2357 * coff-rs6000.c: Likewise.
2358 * coff-sh.c: Likewise.
2359 * coff-tic4x.c: Likewise.
2360 * coff-tic54x.c: Likewise.
2361 * coff-tic80.c: Likewise.
2362 * coff64-rs6000.c: Likewise.
2363 * coffcode.h: Likewise.
2364 * coffgen.c: Likewise.
2365 * cofflink.c: Likewise.
2366 * coffswap.h: Likewise.
2367 * compress.c: Likewise.
2368 * cpu-arm.c: Likewise.
2369 * ecoff.c: Likewise.
2370 * elf-attrs.c: Likewise.
2371 * elf-eh-frame.c: Likewise.
2372 * elf-ifunc.c: Likewise.
2373 * elf-m10300.c: Likewise.
2374 * elf-properties.c: Likewise.
2375 * elf-s390-common.c: Likewise.
2377 * elf32-arc.c: Likewise.
2378 * elf32-arm.c: Likewise.
2379 * elf32-avr.c: Likewise.
2380 * elf32-bfin.c: Likewise.
2381 * elf32-cr16.c: Likewise.
2382 * elf32-cr16c.c: Likewise.
2383 * elf32-cris.c: Likewise.
2384 * elf32-crx.c: Likewise.
2385 * elf32-d10v.c: Likewise.
2386 * elf32-d30v.c: Likewise.
2387 * elf32-epiphany.c: Likewise.
2388 * elf32-fr30.c: Likewise.
2389 * elf32-frv.c: Likewise.
2390 * elf32-gen.c: Likewise.
2391 * elf32-hppa.c: Likewise.
2392 * elf32-i370.c: Likewise.
2393 * elf32-i386.c: Likewise.
2394 * elf32-i960.c: Likewise.
2395 * elf32-ip2k.c: Likewise.
2396 * elf32-iq2000.c: Likewise.
2397 * elf32-lm32.c: Likewise.
2398 * elf32-m32c.c: Likewise.
2399 * elf32-m32r.c: Likewise.
2400 * elf32-m68hc11.c: Likewise.
2401 * elf32-m68hc12.c: Likewise.
2402 * elf32-m68hc1x.c: Likewise.
2403 * elf32-m68k.c: Likewise.
2404 * elf32-mcore.c: Likewise.
2405 * elf32-mep.c: Likewise.
2406 * elf32-metag.c: Likewise.
2407 * elf32-microblaze.c: Likewise.
2408 * elf32-moxie.c: Likewise.
2409 * elf32-msp430.c: Likewise.
2410 * elf32-mt.c: Likewise.
2411 * elf32-nds32.c: Likewise.
2412 * elf32-nios2.c: Likewise.
2413 * elf32-or1k.c: Likewise.
2414 * elf32-pj.c: Likewise.
2415 * elf32-ppc.c: Likewise.
2416 * elf32-rl78.c: Likewise.
2417 * elf32-rx.c: Likewise.
2418 * elf32-s390.c: Likewise.
2419 * elf32-score.c: Likewise.
2420 * elf32-score7.c: Likewise.
2421 * elf32-sh-symbian.c: Likewise.
2422 * elf32-sh.c: Likewise.
2423 * elf32-sh64.c: Likewise.
2424 * elf32-sparc.c: Likewise.
2425 * elf32-spu.c: Likewise.
2426 * elf32-tic6x.c: Likewise.
2427 * elf32-tilepro.c: Likewise.
2428 * elf32-v850.c: Likewise.
2429 * elf32-vax.c: Likewise.
2430 * elf32-visium.c: Likewise.
2431 * elf32-wasm32.c: Likewise.
2432 * elf32-xgate.c: Likewise.
2433 * elf32-xtensa.c: Likewise.
2434 * elf64-alpha.c: Likewise.
2435 * elf64-gen.c: Likewise.
2436 * elf64-hppa.c: Likewise.
2437 * elf64-ia64-vms.c: Likewise.
2438 * elf64-mmix.c: Likewise.
2439 * elf64-ppc.c: Likewise.
2440 * elf64-s390.c: Likewise.
2441 * elf64-sh64.c: Likewise.
2442 * elf64-sparc.c: Likewise.
2443 * elf64-x86-64.c: Likewise.
2444 * elfcode.h: Likewise.
2445 * elfcore.h: Likewise.
2446 * elflink.c: Likewise.
2447 * elfnn-aarch64.c: Likewise.
2448 * elfnn-ia64.c: Likewise.
2449 * elfnn-riscv.c: Likewise.
2450 * elfxx-mips.c: Likewise.
2451 * elfxx-sparc.c: Likewise.
2452 * elfxx-tilegx.c: Likewise.
2453 * elfxx-x86.c: Likewise.
2454 * hpux-core.c: Likewise.
2457 * libbfd.c: Likewise.
2458 * linker.c: Likewise.
2459 * mach-o.c: Likewise.
2460 * merge.c: Likewise.
2462 * oasys.c: Likewise.
2463 * pdp11.c: Likewise.
2464 * pe-mips.c: Likewise.
2465 * peXXigen.c: Likewise.
2466 * peicode.h: Likewise.
2467 * reloc.c: Likewise.
2468 * rs6000-core.c: Likewise.
2470 * stabs.c: Likewise.
2471 * vms-alpha.c: Likewise.
2472 * xcofflink.c: Likewise.
2474 2018-02-19 Alan Modra <amodra@gmail.com>
2477 * elf.c (IS_TBSS): Define.
2478 (_bfd_elf_map_sections_to_segments): Use IS_TBSS.
2479 (assign_file_positions_for_non_load_sections): Revert last change.
2480 Properly calculate load segment limits to compare against relro limits.
2482 2018-02-17 Alan Modra <amodra@gmail.com>
2485 * elf.c (assign_file_positions_for_non_load_sections): Ignore
2486 degenerate zero size PT_LOAD segments when finding one overlapping
2487 the PT_GNU_RELRO segment.
2489 2018-02-16 Alan Modra <amodra@gmail.com>
2491 * libbfd.c (_bfd_bool_bfd_false_error): Rename from bfd_false.
2492 (_bfd_bool_bfd_true): Rename from bfd_true.
2493 (_bfd_ptr_bfd_null_error): Rename from bfd_nullvoidptr.
2494 (_bfd_int_bfd_0): Rename from bfd_0.
2495 (_bfd_uint_bfd_0): Rename from bfd_0u.
2496 (_bfd_long_bfd_0): Rename from bfd_0l.
2497 (_bfd_long_bfd_n1_error): Rename from _bfd_n1.
2498 (_bfd_void_bfd): Rename from bfd_void.
2499 (_bfd_bool_bfd_false, _bfd_bool_bfd_asymbol_false),
2500 (_bfd_bool_bfd_link_false_error),
2501 (_bfd_bool_bfd_link_true, _bfd_bool_bfd_bfd_true),
2502 (_bfd_bool_bfd_uint_true, _bfd_bool_bfd_ptr_true),
2503 (_bfd_bool_bfd_asection_bfd_asection_true),
2504 (_bfd_bool_bfd_asymbol_bfd_asymbol_true),
2505 (_bfd_void_bfd_link, _bfd_void_bfd_asection): New functions.
2506 * archive.c (_bfd_noarchive_get_elt_at_index),
2507 (_bfd_noarchive_openr_next_archived_file),
2508 (_bfd_noarchive_construct_extended_name_table),
2509 (_bfd_noarchive_write_ar_hdr, _bfd_noarchive_truncate_arname),
2510 (_bfd_noarchive_write_armap): New functions.
2511 * archures.c (_bfd_nowrite_set_arch_mach): New function.
2512 * coff-alpha.c (alpha_ecoff_swap_coff_aux_in),
2513 (alpha_ecoff_swap_coff_sym_in, alpha_ecoff_swap_coff_lineno_in),
2514 (alpha_ecoff_swap_coff_aux_out, alpha_ecoff_swap_coff_sym_out),
2515 (alpha_ecoff_swap_coff_lineno_out),
2516 (alpha_ecoff_swap_coff_reloc_out): New functions.
2517 * coff-mips.c (mips_ecoff_swap_coff_aux_in),
2518 (mips_ecoff_swap_coff_sym_in, mips_ecoff_swap_coff_lineno_in),
2519 (mips_ecoff_swap_coff_aux_out, mips_ecoff_swap_coff_sym_out),
2520 (mips_ecoff_swap_coff_lineno_out),
2521 (mips_ecoff_swap_coff_reloc_out): New functions.
2522 * coffcode.h (coff_set_alignment_hook): Replace define with
2524 (symname_in_debug_hook): Likewise.
2525 * ecoff.c (_bfd_ecoff_set_alignment_hook): New function.
2526 * elfxx-target.h (elf_backend_allow_non_load_phdr): Default to 0.
2527 * elf.c (assign_file_positions_except_relocs): Test
2528 elf_backend_allow_non_load_phdr for NULL.
2529 * elflink.c (_bfd_elf_omit_section_dynsym_default): Rename from
2530 _bfd_elf_link_omit_section_dynsym. Update uses.
2531 (_bfd_elf_omit_section_dynsym_all): New function.
2532 * elf-bfd.h (_bfd_elf_link_omit_section_dynsym): Delete.
2533 (_bfd_elf_omit_section_dynsym_default): Declare.
2534 (_bfd_elf_omit_section_dynsym_all): Declare.
2535 * linker.c (_bfd_nolink_sizeof_headers, _bfd_nolink_bfd_relax_section),
2536 (_bfd_nolink_bfd_get_relocated_section_contents),
2537 (_bfd_nolink_bfd_lookup_section_flags),
2538 (_bfd_nolink_bfd_is_group_section, _bfd_nolink_bfd_discard_group),
2539 (_bfd_nolink_bfd_link_hash_table_create),
2540 (_bfd_nolink_bfd_link_just_syms),
2541 (_bfd_nolink_bfd_copy_link_hash_symbol_type),
2542 (_bfd_nolink_bfd_link_split_section),
2543 (_bfd_nolink_section_already_linked),
2544 (_bfd_nolink_bfd_define_common_symbol),
2545 (_bfd_nolink_bfd_define_start_stop): New functions.
2546 * reloc.c (_bfd_norelocs_bfd_reloc_type_lookup),
2547 (_bfd_norelocs_bfd_reloc_name_lookup),
2548 (_bfd_nodynamic_canonicalize_dynamic_reloc): New functions.
2549 * section.c (_bfd_nowrite_set_section_contents): New function.
2550 * syms.c (_bfd_nosymbols_canonicalize_symtab),
2551 (_bfd_nosymbols_print_symbol, _bfd_nosymbols_get_symbol_info),
2552 (_bfd_nosymbols_get_symbol_version_string),
2553 (_bfd_nosymbols_bfd_is_local_label_name),
2554 (_bfd_nosymbols_get_lineno, _bfd_nosymbols_find_nearest_line),
2555 (_bfd_nosymbols_find_line, _bfd_nosymbols_find_inliner_info),
2556 (_bfd_nosymbols_bfd_make_debug_symbol),
2557 ( _bfd_nosymbols_read_minisymbols),
2558 ( _bfd_nosymbols_minisymbol_to_symbol),
2559 (_bfd_nodynamic_get_synthetic_symtab): New functions.
2560 * libbfd-in.h: Declare new functions. Update existing defines,
2562 * aix386-core.c: Update to use new hooks. Formatting.
2563 * aout-adobe.c: Likewise.
2564 * aout-arm.c: Likewise.
2565 * aout-target.h: Likewise.
2566 * aout-tic30.c: Likewise.
2567 * aoutf1.h: Likewise.
2568 * binary.c: Likewise.
2570 * cisco-core.c: Likewise.
2571 * coff-alpha.c: Likewise.
2572 * coff-i386.c: Likewise.
2573 * coff-i860.c: Likewise.
2574 * coff-i960.c: Likewise.
2575 * coff-ia64.c: Likewise.
2576 * coff-mips.c: Likewise.
2577 * coff-ppc.c: Likewise.
2578 * coff-rs6000.c: Likewise.
2579 * coff-sh.c: Likewise.
2580 * coff-tic30.c: Likewise.
2581 * coff-tic54x.c: Likewise.
2582 * coff-x86_64.c: Likewise.
2583 * coff64-rs6000.c: Likewise.
2584 * coffcode.h: Likewise.
2585 * elf-m10300.c: Likewise.
2586 * elf32-cr16.c: Likewise.
2587 * elf32-lm32.c: Likewise.
2588 * elf32-m32r.c: Likewise.
2589 * elf32-metag.c: Likewise.
2590 * elf32-score.c: Likewise.
2591 * elf32-score7.c: Likewise.
2592 * elf32-tilepro.c: Likewise.
2593 * elf32-xstormy16.c: Likewise.
2594 * elf32-xtensa.c: Likewise.
2595 * elf64-alpha.c: Likewise.
2596 * elf64-hppa.c: Likewise.
2597 * elf64-ia64-vms.c: Likewise.
2598 * elf64-mmix.c: Likewise.
2599 * elf64-sh64.c: Likewise.
2600 * elfnn-ia64.c: Likewise.
2601 * elfxx-sparc.c: Likewise.
2602 * elfxx-target.h: Likewise.
2603 * elfxx-tilegx.c: Likewise.
2604 * elfxx-x86.h: Likewise.
2605 * hp300hpux.c: Likewise.
2606 * hppabsd-core.c: Likewise.
2607 * hpux-core.c: Likewise.
2608 * i386msdos.c: Likewise.
2609 * i386os9k.c: Likewise.
2612 * irix-core.c: Likewise.
2613 * libaout.h: Likewise.
2614 * libecoff.h: Likewise.
2615 * mach-o-target.c: Likewise.
2616 * mach-o.c: Likewise.
2617 * mipsbsd.c: Likewise.
2619 * netbsd-core.c: Likewise.
2620 * nlm-target.h: Likewise.
2621 * oasys.c: Likewise.
2622 * osf-core.c: Likewise.
2623 * pdp11.c: Likewise.
2624 * pe-mips.c: Likewise.
2625 * pe-x86_64.c: Likewise.
2627 * plugin.c: Likewise.
2628 * ppcboot.c: Likewise.
2629 * ptrace-core.c: Likewise.
2630 * sco5-core.c: Likewise.
2632 * sparclynx.c: Likewise.
2634 * tekhex.c: Likewise.
2635 * trad-core.c: Likewise.
2636 * verilog.c: Likewise.
2637 * versados.c: Likewise.
2638 * vms-alpha.c: Likewise.
2639 * vms-lib.c: Likewise.
2640 * wasm-module.c: Likewise.
2642 * libbfd.h: Regenerate.
2644 2018-02-15 Jim Wilson <jimw@sifive.com>
2646 * elfnn-riscv.c (_bfd_riscv_relax_section): Ifdef out check to ignore
2647 symbols whose section address is zero.
2649 * elfnn-riscv.c (riscv_elf_relocate_section): Use bfd_reloc_dangerous
2650 when pcrel_lo reloc has an addend. Use reloc_dangerous callback for
2651 bfd_reloc_dangerous. Use einfo instead of warning callback for errors.
2652 Add %X%P to error messages.
2654 2018-02-15 Eric Botcazou <ebotcazou@adacore.com>
2657 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
2658 Pass FALSE instead of TRUE as 'create' argument to bfd_link_hash_lookup
2659 and assert that the result of the call is not NULL.
2661 2018-02-14 Nick Clifton <nickc@redhat.com>
2664 Revert previous delta. Add extra casts to avoid compile time
2666 * libbfd-in.h (_bfd_generic_bfd_copy_private_bfd_data): Add extra
2667 cast to avoid warning from gcc v8 compiler.
2668 (_bfd_generic_bfd_merge_private_bfd_data): Likewise.
2669 (_bfd_generic_bfd_set_private_flags): Likewise.
2670 (_bfd_generic_bfd_copy_private_section_data): Likewise.
2671 (_bfd_generic_bfd_copy_private_symbol_data): Likewise.
2672 (_bfd_generic_bfd_copy_private_header_data): Likewise.
2673 (_bfd_generic_bfd_print_private_bfd_data): Likewise.
2674 (_bfd_noarchive_construct_extended_name_table): Likewise.
2675 (_bfd_noarchive_truncate_arname): Likewise.
2676 (_bfd_noarchive_write_ar_hdr): Likewise.
2677 (_bfd_noarchive_get_elt_at_index): Likewise.
2678 (_bfd_nosymbols_canonicalize_symtab): Likewise.
2679 (_bfd_nosymbols_print_symbol): Likewise.
2680 (_bfd_nosymbols_get_symbol_info): Likewise.
2681 (_bfd_nosymbols_get_symbol_version_string): Likewise.
2682 (_bfd_nosymbols_bfd_is_local_label_name): Likewise.
2683 (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise.
2684 (_bfd_nosymbols_get_lineno): Likewise.
2685 (_bfd_nosymbols_find_nearest_line): Likewise.
2686 (_bfd_nosymbols_find_line): Likewise.
2687 (_bfd_nosymbols_find_inliner_info): Likewise.
2688 (_bfd_nosymbols_bfd_make_debug_symbol): Likewise.
2689 (_bfd_nosymbols_read_minisymbols): Likewise.
2690 (_bfd_nosymbols_minisymbol_to_symbol): Likewise.
2691 (_bfd_norelocs_bfd_reloc_type_lookup): Likewise.
2692 (_bfd_norelocs_bfd_reloc_name_lookup): Likewise.
2693 (_bfd_nowrite_set_arch_mach): Likewise.
2694 (_bfd_nowrite_set_section_contents): Likewise.
2695 (_bfd_nolink_sizeof_headers): Likewise.
2696 (_bfd_nolink_bfd_get_relocated_section_contents): Likewise.
2697 (_bfd_nolink_bfd_relax_section): Likewise.
2698 (_bfd_nolink_bfd_gc_sections): Likewise.
2699 (_bfd_nolink_bfd_lookup_section_flags): Likewise.
2700 (_bfd_nolink_bfd_merge_sections): Likewise.
2701 (_bfd_nolink_bfd_is_group_section): Likewise.
2702 (_bfd_nolink_bfd_discard_group): Likewise.
2703 (_bfd_nolink_bfd_link_hash_table_create): Likewise.
2704 (_bfd_nolink_bfd_link_add_symbols): Likewise.
2705 (_bfd_nolink_bfd_link_just_syms): Likewise.
2706 (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise.
2707 (_bfd_nolink_bfd_final_link): Likewise.
2708 (_bfd_nolink_bfd_link_split_section): Likewise.
2709 (_bfd_nolink_section_already_linked): Likewise.
2710 (_bfd_nolink_bfd_define_common_symbol): Likewise.
2711 (_bfd_nolink_bfd_define_start_stop): Likewise.
2712 (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise.
2713 (_bfd_nodynamic_get_synthetic_symtab): Likewise.
2714 (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise.
2715 (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise.
2716 * libbfd.c (bfd_false_any): Delete.
2717 (bfd_true_any, bfd_nullvoidptr_any, bfd_0_any): Delete.
2718 (bfd_0u_any, bfd_0l_any, _bfd_n1_any, bfd_void_any): Delete.
2719 * libbfd.h (extern): Regenerate
2720 * aout-target.h (MY_bfd_is_target_special_symbol): Add extra
2721 cast to avoid warning from gcc v8 compiler.
2722 * aout-tic30.c (tic30_aout_set_arch_mach): Likewise.
2723 * binary.c (binary_get_symbol_info): Likewise.
2724 * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
2725 * coff-mips.c (mips_ecoff_backend_data): Likewise.
2726 * coffcode.h (coff_set_alignment_hook): Likewise.
2727 (symname_in_debug_hook): Likewise.
2728 (bfd_coff_backend_data bigobj_swap_table): Likewise.
2729 * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise.
2730 * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise.
2731 * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise.
2732 * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise.
2733 * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise.
2734 * elf32-score.c (elf_backend_omit_section_dynsym): Likewise.
2735 * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise.
2736 * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise.
2737 * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise.
2738 * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise.
2739 * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise.
2740 * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise.
2741 * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise.
2742 * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise.
2743 * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise.
2744 * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise.
2745 (bfd_elfNN_bfd_make_debug_symbol): Likewise.
2746 (bfd_elfNN_bfd_merge_private_bfd_data): Likewise.
2747 (bfd_elfNN_bfd_set_private_flags): Likewise.
2748 (bfd_elfNN_bfd_is_target_special_symbol): Likewise.
2749 (elf_backend_init_index_section): Likewise.
2750 (elf_backend_allow_non_load_phdr): Likewise.
2751 * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise.
2752 * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise.
2753 * ieee.c (ieee_construct_extended_name_table): Likewise.
2754 (ieee_write_armap): Likewise.
2755 (ieee_write_ar_hdr): Likewise.
2756 (ieee_bfd_is_target_special_symbol): Likewise.
2757 * ihex.c (ihex_canonicalize_symtab): Likewise.
2758 (ihex_bfd_is_target_special_symbol): Likewise.
2759 * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise.
2760 * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise.
2761 (_bfd_ecoff_set_alignment_hook): Likewise.
2762 * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise.
2763 * mmo.c (mmo_bfd_is_target_special_symbol): Likewise.
2764 * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise.
2765 * oasys.c (oasys_construct_extended_name_table): Likewise.
2766 (oasys_write_armap): Likewise.
2767 (oasys_write_ar_hdr): Likewise.
2768 (oasys_bfd_is_target_special_symbol): Likewise.
2769 * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise.
2770 * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise.
2771 * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise.
2772 * som.c (som_bfd_is_target_special_symbol): Likewise.
2773 * srec.c (srec_bfd_is_target_special_symbol): Likewise.
2774 * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise.
2775 * verilog.c (verilog_bfd_is_target_special_symbol): Likewise.
2776 * versados.c (versados_bfd_is_target_special_symbol): Likewise.
2777 (versados_bfd_reloc_name_lookup): Likewise.
2778 * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise.
2779 (vms_bfd_define_start_stop): Likewise.
2780 (alpha_vms_bfd_is_target_special_symbol): Likewise.
2781 * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise.
2782 * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise.
2784 2018-02-14 H.J. Lu <hongjiu.lu@intel.com>
2787 * elf32-i386.c (elf_i386_check_relocs): Pass FALSE for non
2788 PC-relative PLT to NEED_DYNAMIC_RELOCATION_P.
2789 * elf64-x86-64.c (elf_x86_64_check_relocs): Create PLT for
2790 R_X86_64_PC32 reloc against dynamic function in data section.
2791 Pass TRUE for PC-relative PLT to NEED_DYNAMIC_RELOCATION_P.
2792 (elf_x86_64_relocate_section): Use PLT for R_X86_64_PC32 reloc
2793 against dynamic function in data section.
2794 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Use PLT in PIE as
2795 function address only if pcrel_plt is true.
2796 (_bfd_x86_elf_link_hash_table_create): Set pcrel_plt.
2797 * elfxx-x86.h (NEED_DYNAMIC_RELOCATION_P): Add PCREL_PLT for
2798 PC-relative PLT. If PLT is PC-relative, don't generate dynamic
2799 PC-relative relocation against a function definition in data
2800 secton in PIE. Remove the obsolete comments.
2801 (elf_x86_link_hash_table): Add pcrel_plt.
2803 2018-02-13 H.J. Lu <hongjiu.lu@intel.com>
2805 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Check bfd_link_dll,
2806 instead of bfd_link_pic, for building shared library.
2808 2018-02-13 H.J. Lu <hongjiu.lu@intel.com>
2811 * elf64-x86-64.c (is_32bit_relative_branch): Removed.
2812 (elf_x86_64_relocate_section): Check PIC relocations in PIE.
2813 Remove is_32bit_relative_branch usage. Disallow PC32 reloc
2814 against protected function in shared object.
2816 2018-02-13 Sergei Trofimovich <slyfox@inbox.ru>
2819 * po/ru.po: Fix typo in Russian translation.
2821 2018-02-13 Maciej W. Rozycki <macro@mips.com>
2823 * wasm-module.c (wasm_scan_name_function_section): Rename
2824 `index' local variable to `idx'.
2826 2018-02-13 Nick Clifton <nickc@redhat.com>
2829 Fix compile time warnings generated by gcc version 8.
2830 * libbfd-in.h: Remove extraneous text from prototypes.
2831 Add prototypes for bfd_false_any, bfd_true_any,
2832 bfd_nullvoidptr_any, bfd_0_any, bfd_0u_any, bfd_0l_any,
2833 bfd_n1_any, bfd_void_any.
2834 (_bfd_generic_bfd_copy_private_bfd_data): Use vararg based dummy
2836 (_bfd_generic_bfd_merge_private_bfd_data): Likewise.
2837 (_bfd_generic_bfd_set_private_flags): Likewise.
2838 (_bfd_generic_bfd_copy_private_section_data): Likewise.
2839 (_bfd_generic_bfd_copy_private_symbol_data): Likewise.
2840 (_bfd_generic_bfd_copy_private_header_data): Likewise.
2841 (_bfd_generic_bfd_print_private_bfd_data): Likewise.
2842 (_bfd_noarchive_construct_extended_name_table): Likewise.
2843 (_bfd_noarchive_truncate_arname): Likewise.
2844 (_bfd_noarchive_write_ar_hdr): Likewise.
2845 (_bfd_noarchive_get_elt_at_index): Likewise.
2846 (_bfd_nosymbols_canonicalize_symtab): Likewise.
2847 (_bfd_nosymbols_print_symbol): Likewise.
2848 (_bfd_nosymbols_get_symbol_info): Likewise.
2849 (_bfd_nosymbols_get_symbol_version_string): Likewise.
2850 (_bfd_nosymbols_bfd_is_local_label_name): Likewise.
2851 (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise.
2852 (_bfd_nosymbols_get_lineno): Likewise.
2853 (_bfd_nosymbols_find_nearest_line): Likewise.
2854 (_bfd_nosymbols_find_line): Likewise.
2855 (_bfd_nosymbols_find_inliner_info): Likewise.
2856 (_bfd_nosymbols_bfd_make_debug_symbol): Likewise.
2857 (_bfd_nosymbols_read_minisymbols): Likewise.
2858 (_bfd_nosymbols_minisymbol_to_symbol): Likewise.
2859 (_bfd_norelocs_bfd_reloc_type_lookup): Likewise.
2860 (_bfd_norelocs_bfd_reloc_name_lookup): Likewise.
2861 (_bfd_nowrite_set_arch_mach): Likewise.
2862 (_bfd_nowrite_set_section_contents): Likewise.
2863 (_bfd_nolink_sizeof_headers): Likewise.
2864 (_bfd_nolink_bfd_get_relocated_section_contents): Likewise.
2865 (_bfd_nolink_bfd_relax_section): Likewise.
2866 (_bfd_nolink_bfd_gc_sections): Likewise.
2867 (_bfd_nolink_bfd_lookup_section_flags): Likewise.
2868 (_bfd_nolink_bfd_merge_sections): Likewise.
2869 (_bfd_nolink_bfd_is_group_section): Likewise.
2870 (_bfd_nolink_bfd_discard_group): Likewise.
2871 (_bfd_nolink_bfd_link_hash_table_create): Likewise.
2872 (_bfd_nolink_bfd_link_add_symbols): Likewise.
2873 (_bfd_nolink_bfd_link_just_syms): Likewise.
2874 (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise.
2875 (_bfd_nolink_bfd_final_link): Likewise.
2876 (_bfd_nolink_bfd_link_split_section): Likewise.
2877 (_bfd_nolink_section_already_linked): Likewise.
2878 (_bfd_nolink_bfd_define_common_symbol): Likewise.
2879 (_bfd_nolink_bfd_define_start_stop): Likewise.
2880 (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise.
2881 (_bfd_nodynamic_get_synthetic_symtab): Likewise.
2882 (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise.
2883 (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise.
2884 * libbfd.c (bfd_false_any): New function. Like bfd_false but
2885 accepts one or more arguments.
2886 (bfd_true_any): Likewise.
2887 (bfd_nullvoidptr_any): Likewise.
2888 (bfd_0_any): Likewise.
2889 (bfd_0u_any): Likewise.
2890 (bfd_0l_any): Likewise.
2891 (_bfd_n1_any): Likewise.
2892 (bfd_void_any): Likewise.
2893 * libbfd.h (extern): Regenerate
2894 * aout-target.h (MY_bfd_is_target_special_symbol): Use vararg
2895 based dummy function.
2896 * aout-tic30.c (tic30_aout_set_arch_mach): Likewise.
2897 * binary.c (binary_get_symbol_info): Likewise.
2898 * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
2899 * coff-mips.c (mips_ecoff_backend_data): Likewise.
2900 * coffcode.h (coff_set_alignment_hook): Likewise.
2901 (symname_in_debug_hook): Likewise.
2902 (bfd_coff_backend_data bigobj_swap_table): Likewise.
2903 * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise.
2904 * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise.
2905 * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise.
2906 * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise.
2907 * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise.
2908 * elf32-score.c (elf_backend_omit_section_dynsym): Likewise.
2909 * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise.
2910 * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise.
2911 * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise.
2912 * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise.
2913 * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise.
2914 * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise.
2915 * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise.
2916 * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise.
2917 * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise.
2918 * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise.
2919 (bfd_elfNN_bfd_make_debug_symbol): Likewise.
2920 (bfd_elfNN_bfd_merge_private_bfd_data): Likewise.
2921 (bfd_elfNN_bfd_set_private_flags): Likewise.
2922 (bfd_elfNN_bfd_is_target_special_symbol): Likewise.
2923 (elf_backend_init_index_section): Likewise.
2924 (elf_backend_allow_non_load_phdr): Likewise.
2925 * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise.
2926 * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise.
2927 * ieee.c (ieee_construct_extended_name_table): Likewise.
2928 (ieee_write_armap): Likewise.
2929 (ieee_write_ar_hdr): Likewise.
2930 (ieee_bfd_is_target_special_symbol): Likewise.
2931 * ihex.c (ihex_canonicalize_symtab): Likewise.
2932 (ihex_bfd_is_target_special_symbol): Likewise.
2933 * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise.
2934 * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise.
2935 (_bfd_ecoff_set_alignment_hook): Likewise.
2936 * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise.
2937 * mmo.c (mmo_bfd_is_target_special_symbol): Likewise.
2938 * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise.
2939 * oasys.c (oasys_construct_extended_name_table): Likewise.
2940 (oasys_write_armap): Likewise.
2941 (oasys_write_ar_hdr): Likewise.
2942 (oasys_bfd_is_target_special_symbol): Likewise.
2943 * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise.
2944 * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise.
2945 * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise.
2946 * som.c (som_bfd_is_target_special_symbol): Likewise.
2947 * srec.c (srec_bfd_is_target_special_symbol): Likewise.
2948 * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise.
2949 * verilog.c (verilog_bfd_is_target_special_symbol): Likewise.
2950 * versados.c (versados_bfd_is_target_special_symbol): Likewise.
2951 (versados_bfd_reloc_name_lookup): Likewise.
2952 * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise.
2953 (vms_bfd_define_start_stop): Likewise.
2954 (alpha_vms_bfd_is_target_special_symbol): Likewise.
2955 * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise.
2956 * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise.
2957 * elf32-arc.c (get_replace_function): Assign replacement function
2959 * elf32-i370.c (i370_noop): Update prototype.
2961 2018-02-13 Alan Modra <amodra@gmail.com>
2964 * elf.c (_bfd_elf_fixup_group_sections): Account for removed
2965 relocation sections. If size reduces to just the flag word,
2966 remove that too and mark with SEC_EXCLUDE.
2967 * elflink.c (bfd_elf_final_link): Strip empty group sections.
2969 2018-02-13 Alan Modra <amodra@gmail.com>
2972 * elf.c (assign_file_positions_for_non_load_sections): Rewrite
2975 2018-02-12 Zebediah Figura <z.figura12@gmail.com>
2977 * i386msdos.c (msdos_mkobject); New function.
2978 (msdos_object_p): New function.
2979 (i386_msdos_vec): Use msdos_object_p as the check_format
2981 * peicode.h: Rename external_PEI_DOS_hdr, DOSMAGIC, and
2982 NT_SIGNATURE to external_DOS_hdr, IMAGE_DOS_SIGNATURE, and
2984 * peXXigen.c: Likewise.
2985 * coff-ia64.c: Likewise.
2987 2018-02-12 Nick Clifton <nickc@redhat.com>
2989 * elf32-nds32.c (nds32_elf_relax_longjump3): Remove redundant
2991 * elf32-arc.c (elf_arc_relocate_section): Likewise.
2993 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
2995 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Reorder conditions.
2996 (sparc_elf_append_rela): Assert that there is enough room in section.
2997 (_bfd_sparc_elf_copy_indirect_symbol): Fix formatting.
2998 (_bfd_sparc_elf_adjust_dynamic_symbol): Minor tweak.
2999 (allocate_dynrelocs): Remove outdated comments and reorder conditions.
3000 For a symbol subject to a GOT relocation, reserve a slot in the
3001 relocation section if the symbol isn't dynamic and we are in PIC mode.
3002 (_bfd_sparc_elf_relocate_section) <R_SPARC_GOTDATA_OP>: If relocation
3003 is relaxed and a slot was reserved, generate a R_SPARC_NONE relocation.
3004 <R_SPARC_GOTDATA_OP_HIX22>: Adjust comments.
3005 <R_SPARC_PC10>: Reorder conditions. Remove always-false assertion.
3006 (_bfd_sparc_elf_finish_dynamic_symbol): Rename local_undefweak into
3007 resolved_to_zero. Do not generate a dynamic GOT relocation for an
3008 undefined weak symbol with non-default visibility. Remove superfluous
3009 'else' and fix formatting.
3011 2018-02-09 H.J. Lu <hongjiu.lu@intel.com>
3013 * elf32-i386.c (elf_i386_get_synthetic_symtab): Also handle
3015 (i386_elf32_sol2_vec): Don't declare.
3016 (elf_i386_link_setup_gnu_properties): Also handle is_solaris.
3017 Don't set need_global_offset_table.
3018 (elf_i386_solaris_arch_bed): New.
3019 (elf_backend_arch_data): Set to elf_i386_solaris_arch_bed for
3021 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Check
3022 target_os != is_nacl instead of target_os == is_normal.
3023 (x86_64_elf64_sol2_vec): Don't declare.
3024 (elf_x86_64_link_setup_gnu_properties): Check target_os !=
3025 is_nacl instead of target_os == is_normal. Don't set
3026 need_global_offset_table.
3027 (elf_x86_64_solaris_arch_bed): New.
3028 (elf_backend_arch_data): Set to elf_x86_64_solaris_arch_bed for
3030 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep
3031 _GLOBAL_OFFSET_TABLE_ for Solaris.
3032 (_bfd_x86_elf_link_setup_gnu_properties): Don't copy
3033 need_global_offset_table.
3034 * elfxx-x86.h (elf_x86_target_os): Add is_solaris.
3035 (elf_x86_link_hash_table): Remove need_global_offset_table.
3036 (elf_x86_init_table): Likewise.
3038 2018-02-08 H.J. Lu <hongjiu.lu@intel.com>
3040 * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
3042 (i386_elf32_sol2_vec): Declared.
3043 (elf_i386_link_setup_gnu_properties): Set
3044 need_global_offset_table with info->output_bfd->xvec.
3045 * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
3047 (x86_64_elf64_sol2_vec): Declared.
3048 (elf_x86_64_link_setup_gnu_properties): Set
3049 need_global_offset_table with info->output_bfd->xvec.
3051 2018-02-08 H.J. Lu <hongjiu.lu@intel.com>
3053 * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
3055 (elf_i386_link_setup_gnu_properties): Set need_global_offset_table
3057 * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
3059 (elf_x86_64_link_setup_gnu_properties): Set
3060 need_global_offset_table for Solaris.
3061 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep the
3062 unused _GLOBAL_OFFSET_TABLE_ for Solaris.
3063 (_bfd_x86_elf_link_setup_gnu_properties): Copy
3064 need_global_offset_table.
3065 * elfxx-x86.h (elf_x86_link_hash_table): Add
3066 need_global_offset_table.
3067 (elf_x86_init_table): Likewise.
3069 2018-02-08 Jim Wilson <jimw@sifive.com>
3071 * elfnn-riscv.c (riscv_elf_relocate_section): Add comment for previous
3074 2018-02-08 Nick Clifton <nickc@redhat.com>
3077 * elf.c (elf_parse_notes): Reject notes with excessuively large
3080 2018-02-07 Alan Modra <amodra@gmail.com>
3082 Revert 2018-01-17 Alan Modra <amodra@gmail.com>
3083 * elf32-ppc.c: Remove speculation barrier support.
3084 * elf32-ppc.h: Likewise.
3085 * elf64-ppc.c: Likewise.
3086 * elf64-ppc.h: Likewise.
3088 2018-02-06 Jim Wilson <jimw@sifive.com>
3090 * elfnn-riscv.c (riscv_elf_relocate_section): Return TRUE if used
3091 callback to report an error.
3093 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
3096 * elfxx-sparc.c (sparc_elf_tls_transition): Turn call to bfd_link_pic
3097 into call to !bfd_link_executable and tidy up.
3098 (_bfd_sparc_elf_check_relocs): Fix formatting and tidy up.
3099 <R_SPARC_TLS_LE_HIX22>: Turn call to bfd_link_pic into call to
3100 !bfd_link_executable.
3101 <R_SPARC_TLS_IE_HI22>: Likewise.
3102 <GOT relocations>: Remove useless code, tidy and merge related blocks.
3103 <R_SPARC_TLS_GD_CALL>: Turn call to bfd_link_pic into call to
3104 !bfd_link_executable.
3105 <R_SPARC_WPLT30>: Tidy up.
3106 (_bfd_sparc_elf_gc_mark_hook): Turn call to bfd_link_pic into call to
3107 !bfd_link_executable.
3108 (allocate_dynrelocs): Likewise.
3109 (_bfd_sparc_elf_relocate_section): Fix formatting and tidy up.
3110 <R_SPARC_TLS_GD_HI22>: Merge into...
3111 <R_SPARC_TLS_GD_LO10>: ...this. Adjust 4th argument in call to
3112 sparc_elf_tls_transition and remove redundant code.
3113 <R_SPARC_TLS_LDM_HI22>: Turn call to bfd_link_pic into call to
3114 !bfd_link_executable.
3115 <R_SPARC_TLS_LDO_HIX22>: Likewise.
3116 <R_SPARC_TLS_LE_HIX22>: Likewise. Tidy up.
3117 <R_SPARC_TLS_LDM_CALL>: Likewise.
3118 <R_SPARC_TLS_GD_CALL>: Likewise. Tidy up.
3119 <R_SPARC_TLS_GD_ADD>: Likewise.
3120 <R_SPARC_TLS_LDM_ADD>: Likewise.
3121 <R_SPARC_TLS_LDO_ADD>: Likewise.
3122 <R_SPARC_TLS_IE_LD>: Likewise.
3124 2018-02-06 Miloš Stojanović <milos.stojanovic@rt-rk.com>
3127 * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): If the dwarf
3128 functions failed to find the function name, try the generic elf
3129 find function instead.
3131 2018-02-06 Sergio Durigan Junior <sergiodj@redhat.com>
3133 * coff-rs6000.c (xcoff_write_archive_contents_old): Use
3134 'memcpy' instead of 'strncpy' when writing the magic number.
3136 2018-02-06 Nick Clifton <nickc@redhat.com>
3139 * opncls.c (bfd_get_debug_link_info_1): Check the size of the
3140 section before attempting to read it in.
3141 (bfd_get_alt_debug_link_info): Likewise.
3143 2018-02-06 Paul Carroll <pcarroll@codesourcery.com>
3145 * bfd/dwarf2.c (find_abstract_name): Modified to return file and
3146 line information in addition to name, if they can be found.
3148 2018-02-05 Renlin Li <renlin.li@arm.com>
3151 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Relax the
3152 R_AARCH64_ABS32 and R_AARCH64_ABS16 for absolute symbol. Apply the
3153 check for writeable section as well.
3155 2018-02-05 H.J. Lu <hongjiu.lu@intel.com>
3158 * elf32-i386.c (elf_i386_check_relocs): Set got_referenced if
3159 _GLOBAL_OFFSET_TABLE_ is referenced or GOT is needed to resolve
3160 undefined weak symbol to 0.
3161 * elf64-x86-64.c (elf_x86_64_check_relocs): Set got_referenced
3162 if _GLOBAL_OFFSET_TABLE_ is referenced.
3163 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Check
3164 got_referenced instead of ref_regular_nonweak. Remove the
3165 unused _GLOBAL_OFFSET_TABLE_ from symbol table.
3166 * elfxx-x86.h (elf_x86_link_hash_table): Add got_referenced.
3168 2018-02-05 Maciej W. Rozycki <macro@mips.com>
3170 * elfnn-riscv.c (_bfd_riscv_relax_pc): Use `memset' to
3171 initialize `hi_reloc'.
3173 2018-02-05 Maciej W. Rozycki <macro@mips.com>
3175 * elfxx-mips.c (_bfd_mips_elf_section_processing): For
3176 SHT_MIPS_REGINFO sections don't assert the correct size and
3177 report an error instead.
3179 2018-02-05 Maciej W. Rozycki <macro@mips.com>
3181 * elf.c (_bfd_elf_write_object_contents): Propagate a failure
3182 status from `->elf_backend_section_processing'.
3184 2018-02-02 Jim Wilson <jimw@sifive.com>
3187 * elfnn-riscv.c (riscv_relax_delete_bytes): New parameter link_info.
3188 If link_info->wrap_hash, check for a duplicate symbol and ignore.
3189 (_bfd_riscv_relax_call, bfd_riscv_relax_lui, _bfd_riscv_relax_tls_le):
3190 Pass new argument to riscv_relax_delete_bytes.
3191 (_bfd_riscv_relax_align, _bfd_riscv_relax_delete): Likewise. Remove
3192 ATTRIBUTE_UNUSED from link_info parameter.
3194 2018-02-02 Alan Modra <amodra@gmail.com>
3196 * elf64-ppc.c (ppc64_elf_relocate_section): Don't relocate nops
3197 emitted for toc sequence optimization. Set and use "howto" later.
3199 2018-02-01 Simon Marchi <simon.marchi@ericsson.com>
3201 * elf64-ppc.c (ppc64_elf_archive_symbol_lookup): Avoid pointer
3202 arithmetic on NULL pointer.
3203 * elflink.c (_bfd_elf_archive_symbol_lookup,
3204 elf_link_add_archive_symbols): Likewise.
3206 2018-01-31 Michael Matz <matz@suse.de>
3208 * elflink.c (bfd_elf_define_start_stop): Fix check of
3211 2018-01-31 H.J. Lu <hongjiu.lu@intel.com>
3214 * elflink.c (bfd_elf_define_start_stop): Check if __start and
3215 __stop symbols are referenced by shared objects.
3217 2018-01-30 Alan Modra <amodra@gmail.com>
3220 * elf.c (_bfd_elf_map_sections_to_segments): Don't start a new
3221 segment when demand paged with lma on the same page. Test this
3222 before load/non-load, executable/non-executable,
3223 writable/non-writable tests and simplify. Delete bogus relro
3224 condition in writable/non-writable test. Delete outdated
3225 comment. Formatting.
3227 2018-01-30 Alan Modra <amodra@gmail.com>
3229 * elflink.c (bfd_elf_define_start_stop): Make __start and __stop
3232 2018-01-29 Alan Modra <amodra@gmail.com>
3235 * coffgen.c (coff_pointerize_aux): Ensure auxent tagndx is in
3236 range before converting to a symbol table pointer.
3238 2018-01-27 Nick Clifton <nickc@redhat.com>
3240 * po/ru.po: Updated Russian translation.
3242 2018-01-26 Alan Modra <amodra@gmail.com>
3244 * elflink.c (bfd_elf_define_start_stop): Override symbols when
3245 they are defined dynamically.
3247 2018-01-26 Alan Modra <amodra@gmail.com>
3249 * elf64-ppc.c (ppc64_elf_size_stubs): Iterate sizing when
3250 .branch_lt changes size.
3252 2018-01-25 Alan Modra <amodra@gmail.com>
3255 * elfcode.h (elf_object_p): Avoid integer overflow.
3257 2018-01-25 Eric Botcazou <ebotcazou@adacore.com>
3260 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
3261 Do a mere lookup of the __tls_get_addr symbol instead of adding it.
3264 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
3267 * elfxx-sparc.c (sparc_elf_tls_transition): Replace
3268 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
3269 bfd_link_executable for TLS check.
3270 (_bfd_sparc_elf_check_relocs): Likewise.
3271 (allocate_dynrelocs): Likewise.
3272 (_bfd_sparc_elf_relocate_section): Likewise.
3274 2018-01-24 Renlin Li <renlin.li@arm.com>
3276 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Add support for
3277 BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
3278 BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
3279 BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
3280 BFD_RELOC_AARCH64_MOVW_PREL_G3.
3281 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
3282 (_bfd_aarch64_elf_resolve_relocation): Likewise.
3284 2018-01-24 Renlin Li <renlin.li@arm.com>
3286 * reloc.c: Add BFD_RELOC_AARCH64_MOVW_PREL_G0,
3287 BFD_RELOC_AARCH64_MOVW_PREL_G0_NC, BFD_RELOC_AARCH64_MOVW_PREL_G1,
3288 BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, BFD_RELOC_AARCH64_MOVW_PREL_G2,
3289 BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, BFD_RELOC_AARCH64_MOVW_PREL_G3.
3290 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Add entries for
3291 BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
3292 BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
3293 BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
3294 BFD_RELOC_AARCH64_MOVW_PREL_G3.
3295 * bfd-in2.h: Regenerate.
3296 * libbfd.h: Regenerate.
3298 2018-01-23 Maciej W. Rozycki <macro@mips.com>
3300 * elfxx-mips.c (_bfd_mips_elf_final_link): Update a stale
3301 `mips_elf32_section_processing' comment reference.
3303 2018-01-20 H.J. Lu <hongjiu.lu@intel.com>
3306 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Check the
3307 versioned __tls_get_addr symbol.
3309 2018-01-19 Nick Clifton <nickc@redhat.com>
3311 * po/fr.po: Updated French translation.
3313 2018-01-18 Alan Modra <amodra@gmail.com>
3315 * elf32-ppc.c (ppc_elf_create_glink): Correct alignment of .glink.
3316 * elf64-ppc.c (ppc64_elf_size_stubs): Handle negative plt_stub_align.
3317 (ppc64_elf_build_stubs): Likewise.
3319 2018-01-17 Nick Clifton <nickc@redhat.com>
3321 * po/ru.po: Updated Russian translation.
3322 * po/uk/po: Updated Ukranian translation.
3324 2018-01-17 Alan Modra <amodra@gmail.com>
3326 * elf64-ppc.c (ppc64_elf_build_stubs): Silence gcc warning.
3328 2018-01-17 Alan Modra <amodra@gmail.com>
3330 * elf32-ppc.c (GLINK_ENTRY_SIZE): Handle speculation barrier.
3331 (CRSETEQ, BEQCTRM): Define.
3332 (is_nonpic_glink_stub): Don't check bctr.
3333 (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
3334 (ppc_elf_relax_section): Size speculation barrier.
3335 (output_bctr): New function.
3336 (write_glink_stub): Use output_bctr.
3337 (ppc_elf_relocate_section): Use output_bctr for long branch stub.
3338 (ppc_elf_finish_dynamic_symbol): Likewise.
3339 (ppc_elf_finish_dynamic_sections): Use output_bctr.
3340 * elf32-ppc.h (struct ppc_elf_params): Add speculate_indirect_jumps.
3341 * elf64-ppc.c (CRSETEQ, BEQCTRM, BEQCTRLM): Define.
3342 (GLINK_PLTRESOLVE_SIZE): Size speculation barrier.
3343 (size_global_entry_stubs): Handle speculation barrier sizing.
3344 (plt_stub_size): Likewise.
3345 (output_bctr): New function.
3346 (build_plt_stub, build_tls_get_addr_stub): Output speculation
3348 (ppc_build_one_stub): Likewise for ppc_stub_plt_branch.
3349 (ppc_size_one_stub): Size speculation barrier in ppc_stub_plt_branch.
3350 (build_global_entry_stubs): Output speculation barrier.
3351 (ppc64_elf_build_stubs): Likewise in __glink_PLTresolve stub.
3352 * elf64-ppc.h (struct ppc64_elf_params): Add speculate_indirect_jumps.
3354 2018-01-17 Alan Modra <amodra@gmail.com>
3356 * elf32-ppc.c (GLINK_ENTRY_SIZE): Add parameters, handle
3357 __tls_get_addr_opt, and alignment sizing.
3358 (TLS_GET_ADDR_GLINK_SIZE): Delete.
3359 (is_nonpic_glink_stub): Don't use GLINK_ENTRY_SIZE.
3360 (ppc_elf_get_synthetic_symtab): Recognize stubs spaced at 4, 6,
3362 (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
3363 (allocate_dynrelocs): Use new GLINK_ENTRY_SIZE.
3364 (ppc_elf_size_dynamic_sections): Likewise. Size branch table
3366 (write_glink_stub): Handle __tls_get_addr_opt stub.
3367 Pad out to size given by GLINK_ENTRY_SIZE.
3368 (ppc_elf_relocate_section): Adjust write_glink_stub call.
3369 (ppc_elf_finish_dynamic_symbol): Likewise.
3370 (ppc_elf_finish_dynamic_sections): Write PLTresolve without using
3371 insn array since so many need rewriting.
3372 * elf32-ppc.h (struct ppc_elf_params): Add plt_stub_align.
3373 * elf64-ppc.c (GLINK_PLTRESOLVE_SIZE): Rename from
3374 GLINK_CALL_STUB_SIZE. Add htab param and evaluate to size without
3375 nops. Adjust all uses.
3376 (ppc64_elf_get_synthetic_symtab): Don't use GLINK_CALL_STUB_SIZE
3377 in glink_vma calculation.
3378 (struct ppc_link_hash_table): Add global_entry section pointer.
3379 (create_linkage_sections): Create separate section for global
3381 (PPC_LO, PPC_HI, PPC_HA): Move earlier.
3382 (size_global_entry_stubs): Handle sizing for aligned stubs.
3383 (ppc64_elf_size_dynamic_sections): Handle global_entry alloc,
3384 and don't stash end of glink branch table in rawsize.
3385 (ppc_build_one_stub): Rewrite stub size calculations.
3386 (build_global_entry_stubs): Use new section.
3387 (ppc64_elf_build_stubs): Don't pad __glink_PLTresolve with nops.
3388 Build lazy link stubs out to end of section. Build global entry
3389 stubs in new section.
3391 2018-01-15 Nick Clifton <nickc@redhat.com>
3393 * po/uk.po: Updated Ukranian translation.
3395 2018-01-13 Nick Clifton <nickc@redhat.com>
3397 * po/bfd.pot: Regenerated.
3399 2018-01-13 Nick Clifton <nickc@redhat.com>
3401 * version.m4: Bump version to 2.30.51
3402 * configure: Regenerate.
3404 2018-01-13 Nick Clifton <nickc@redhat.com>
3406 2.30 branch created.
3408 2018-01-12 Jens Widell <jl@opera.com>
3410 * elf.c (setup_group): Optimize search for group by remembering
3411 last found group and restarting search at that index.
3412 * elf-bfd.h (struct elf_obj_tdata): Add group_search_offset field.
3414 2018-01-12 Gunther Nikl <gnikl@users.sourceforge.net>
3416 * aoutx.h (aout_link_check_ar_symbols): Remove default and handle
3417 bfd_link_common_skip_none in switch.
3419 2018-01-12 Alan Modra <amodra@gmail.com>
3422 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Ignore dynamic
3423 references on forced local symbols.
3425 2018-01-12 Vlad Ivanov <vlad@ivanov.email>
3427 * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when
3428 .reginfo section has wrong size.
3430 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
3433 * elf.c (_bfd_elf_map_sections_to_segments): When generating
3434 separate code and read-only data LOAD segments, create a new
3435 LOAD segment if the previous section contains text and the
3436 current section doesn't or vice versa. Don't put a writable
3437 section in a read-only segment if there is a RELRO segment.
3439 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
3442 * elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Ignore dynamic
3443 references on forced local symbols.
3445 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
3448 * elflink.c (bfd_elf_gc_sections): Keep all PREINIT_ARRAY,
3449 INIT_ARRAY as well as FINI_ARRAY sections for ld -r --gc-section.
3451 2018-01-09 Kuan-Lin Chen <kuanlinchentw@gmail.com>
3454 * elf32-nds32.c (nds32_elf_relax_loadstore): Fix a typographical error.
3456 2018-01-03 John Baldwin <jhb@FreeBSD.org>
3458 * elf.c (elfcore_grok_freebsd_note): Handle
3459 NT_FREEBSD_PROCSTAT_PROC, NT_FREEBSD_PROCSTAT_FILES, and
3460 NT_FREEBSD_PROCSTAT_VMMAP.
3462 2018-01-03 Alan Modra <amodra@gmail.com>
3464 Update year range in copyright notice of all files.
3466 For older changes see ChangeLog-2017
3468 Copyright (C) 2018 Free Software Foundation, Inc.
3470 Copying and distribution of this file, with or without modification,
3471 are permitted in any medium without royalty provided the copyright
3472 notice and this notice are preserved.
3478 version-control: never