1 2018-06-21 Maciej W. Rozycki <macro@mips.com>
3 * elfxx-mips.c (_bfd_mips_post_process_headers): Keep
4 EI_ABIVERSION setting together.
6 2018-06-21 Maciej W. Rozycki <macro@mips.com>
8 * elfxx-mips.c (MIPS_LIBC_ABI_DEFAULT, MIPS_LIBC_ABI_MIPS_PLT)
9 (MIPS_LIBC_ABI_UNIQUE, MIPS_LIBC_ABI_MIPS_O32_FP64)
10 (MIPS_LIBC_ABI_MAX): New enumeration constants.
11 (_bfd_mips_post_process_headers): Use them in place of magic
14 2018-06-21 Jim Wilson <jimw@sifive.com>
16 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Update comment.
17 Use SYMBOL_REFERENCES_LOCAL. Add asserts for h->got.offset.
19 2018-06-21 Alan Modra <amodra@gmail.com>
21 * doc/Makefile.am (AUTOMAKE_OPTIONS): Add "foreign".
22 * doc/Makefile.in: Regenerate.
24 2018-06-20 Renlin Li <renlin.li@arm.com>
26 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Use PG_OFFSET
27 to resolve BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC,
28 BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC,
29 BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC,
30 BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC,
31 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
32 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
33 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
34 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
36 2018-06-20 Nick Clifton <nickc@redhat.com>
39 * opncls.c (get_build_id): Check for a negative or excessive data
40 size in the build-id note.
42 2018-06-20 Nick Clifton <nickc@redhat.com>
45 * mach-o.c (cputype): New function.
46 (cpusubtype): New function.
47 (bfd_mach_o_bfd_print_private_data): New function. Dispalys the
48 values in the MACH-O file header.
49 (bfd_mach_o_bfd_copy_private_header_data): Copy the cputype and
50 cpusubtype fields from the input bfd's mach-o header to the output
52 * mach-o-target.c (bfd_mach_o_bfd_print_private_bfd_data):
53 Redefine to bfd_mach_o_bfd_print_private_data.
54 * mach-o.h (bfd_mach_o_bfd_print_private_bfd_data): Prototype.
56 2018-06-19 Maciej W. Rozycki <macro@mips.com>
59 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Verify the
60 `.got.plt' entry referred is in range.
61 (mips_finish_exec_plt): Correct the range check for `.got.plt'
62 start. Replace the assertion used for that with a proper error
65 2018-06-19 Maciej W. Rozycki <macro@mips.com>
67 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Fix
70 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
72 * Makefile.am (AUTOMAKE_OPTIONS): Remove 1.11.
73 (INCLUDES): Rename to ...
74 (AM_CPPFLAGS): ... this.
75 * configure.ac: Remove AC_PREREQ.
76 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove 1.9, cygnus, add
77 info-in-builddir no-texinfo.tex.
78 (info_TEXINFOS): Rename bfd.texinfo to bfd.texi.
79 * doc/bfd.texinfo: Rename to ...
80 * doc/bfd.texi: ... this.
81 * Makefile.in: Re-generate.
82 * aclocal.m4: Re-generate.
83 * config.in: Re-generate.
84 * configure: Re-generate.
85 * doc/Makefile.in: Re-generate.
87 2018-06-18 Mephi <mephi42@gmail.com>
90 * mach-o-x86-64.c (x86_64_howto_table): Add entry for
91 BFD_RELOC_MACH_O_X86_64_RELOC_TLV.
92 (bfd_mach_o_x86_64_canonicalize_one_reloc): Handle the new reloc.
93 (bfd_mach_o_x86_64_swap_reloc_out): Likewise.
94 * reloc.c (BFD_RELOC_MACH_O_X86_64_TV): New entry.
95 * bfd-in2.h: Regenerate.
96 * libbfd.h: Regenerate.
98 2018-06-14 Faraz Shahbazker <Faraz.Shahbazker@mips.com>
100 * elfxx-mips.c (print_mips_ases): Add GINV extension.
102 2018-06-14 H.J. Lu <hongjiu.lu@intel.com>
105 * elf.c (_bfd_elf_get_symbol_version_string): Check if the first
106 symbol version is base version.
108 2018-06-14 Alan Modra <amodra@gmail.com>
110 * elf-bfd.h (struct elf_link_hash_table): Add "dynamic_relocs".
111 * elflink.c (_bfd_elf_init_2_index_sections): Comment fix.
112 (_bfd_elf_add_dynamic_entry): Set "dynamic_relocs".
113 (_bfd_elf_link_renumber_dynsyms): Exclude all section symbols when
114 "dynamic_relocs" is not set.
115 * elfxx-mips.c (count_section_dynsyms): Likewise.
117 2018-06-14 Alan Modra <amodra@gmail.com>
120 * bfdio.c (bfd_seek): Optimize away seeks to current position.
122 2018-06-13 Scott Egerton <scott.egerton@imgtec.com>
123 Faraz Shahbazker <Faraz.Shahbazker@mips.com>
125 * elfxx-mips.c (print_mips_ases): Add CRC.
127 2018-06-08 H.J. Lu <hongjiu.lu@intel.com>
130 * elfxx-x86.c (elf_x86_hide_linker_defined): New function.
131 (_bfd_x86_elf_link_check_relocs): Use it to hide hidden
132 __bss_start, _end and _edata in shared libraries.
134 2018-06-07 Alan Modra <amodra@gmail.com>
136 * elf32-tic6x.c (elf32_tic6x_check_relocs): Reference
137 __c6xabi_DSBT_BASE explicitly for R_C6000_SBR_* relocs.
139 2018-06-05 Alan Modra <amodra@gmail.com>
141 * bfd.c (struct bfd): Update comment on "where" usage.
142 * bfdio.c (bfd_bwrite, bfd_stat): Use and update "iovec",
143 "iostream", and "where" from containing archive file. Return
145 (bfd_bread): Similarly, and return error attempted out of
146 bounds archive element access.
147 (bfd_tell, bfd_flush): Use and update "iovec", "iostream", and
148 "where" from containing archive file.
149 (bfd_seek): Likewise. Return error on NULL iovec. Don't
150 attempt to optimize away seeks. Don't paper over errors by
152 (bfd_get_mtime): Call bfd_stat rather than iovec->bstat.
153 (bfd_get_size): Likewise.
154 (bfd_mmap): Operate on and use iovec of containing archive
155 file. Return error on NULL iovec.
156 * cache.c (bfd_cache_lookup_worker): Abort if working on
158 (cache_bread_1): Delete bfd parameter, add FILE* parameter.
159 Don't ignore zero byte reads.
160 (cache_bread): Look up FILE* in cache here. Error on NULL
162 (cache_bwrite): Rename "where" to "from".
163 (cache_bmmap): Don't handle archive elements.
164 * coffcode.h (coff_slurp_line_table): Exit early on zero
166 * bfd-in2.h: Regenerate.
168 2018-06-05 Alan Modra <amodra@gmail.com>
171 * plugin.c (bfd_plugin_open_input): Allow for possibility of
172 nested archives. Open file again for plugin.
173 (try_claim): Don't save and restore file position. Close file
175 * sysdep.h (O_BINARY): Define.
177 2018-06-04 Max Filippov <jcmvbkbc@gmail.com>
179 * elf32-xtensa.c (xtensa_read_table_entries): Make global.
180 (compute_fill_extra_space): Drop declaration. Rename function to
181 xtensa_compute_fill_extra_space.
182 (compute_ebb_actions, remove_dead_literal): Update references to
183 compute_fill_extra_space.
185 2018-06-04 Volodymyr Arbatov <arbatov@cadence.com>
187 * elf32-xtensa.c (elf32xtensa_separate_props): New global
189 (xtensa_add_names): New function.
190 (xtensa_property_section_name): Add new parameter
191 separate_sections, use it to choose property section name.
192 (xtensa_get_separate_property_section): New function.
193 (xtensa_get_property_section): Invoke
194 xtensa_get_separate_property_section to get individual property
195 section if it exists, common property section otherwise.
196 (xtensa_make_property_section): Pass elf32xtensa_separate_props
197 to xtensa_property_section_name.
199 2018-06-04 H.J. Lu <hongjiu.lu@intel.com>
202 * bfd-in.h: Include "diagnostics.h".
203 * bfd-in2.h: Regenerated.
204 * elf32-arm.c (elf32_arm_nabi_write_core_note): Use
205 DIAGNOSTIC_PUSH, DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION and
206 DIAGNOSTIC_POP to silence GCC 8.1 warnings with
207 -Wstringop-truncation.
208 * elf32-ppc.c (ppc_elf_write_core_note): Likewse.
209 * elf32-s390.c (elf_s390_write_core_note): Likewse.
210 * elf64-ppc.c (ppc64_elf_write_core_note): Likewse.
211 * elf64-s390.c (elf_s390_write_core_note): Likewse.
212 * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewse.
214 2018-06-03 Jim Wilson <jimw@sifive.com>
217 * elfnn-riscv.c (riscv_elf_relocate_section) <R_RISCV_CALL>: Check
218 for and handle an undefined weak with no PLT.
221 * elfnn-riscv.c (riscv_relax_delete_bytes): Add versioned_hidden check
222 to code that ignores duplicate symbols.
224 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
226 * version.m4: Bump version to 2.30.52
227 * configure: Regenerated.
229 2018-06-01 Alan Modra <amodra@gmail.com>
231 * bfd.c (_bfd_error_handler): Arrange for this function to be
232 declared in bfd-in2.h.
233 * libbfd-in.h (_bfd_error_handler): Don't declare.
234 * libbfd.h: Regenerate.
235 * bfd-in2.h: Regenerate.
237 2018-05-30 Amaan Cheval <amaan.cheval@gmail.com>
239 * config.bfd (x86_64-*-*): Add pei-x86-64 target to x86_64-*-rtems*
240 This is needed to generate UEFI application image files from ELFs.
242 2018-05-28 H.J. Lu <hongjiu.lu@intel.com>
244 * elf32-i386.c (elf_i386_lazy_plt): Add plt_tlsdesc_entry,
245 plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset,
246 plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and
247 plt_tlsdesc_got2_insn_end for TLSDESC entry.
248 (elf_i386_lazy_ibt_plt): Likewise.
249 (elf_i386_nacl_plt): Likewise.
250 * elf64-x86-64.c (tlsdesc_plt_entry): Moved and renamed to ...
251 (elf_x86_64_tlsdesc_plt_entry): This.
252 (elf_x86_64_lazy_plt): Add plt_tlsdesc_entry,
253 plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset,
254 plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and
255 plt_tlsdesc_got2_insn_end for TLSDESC entry.
256 (elf_x86_64_lazy_bnd_plt): Likewise.
257 (elf_x86_64_lazy_ibt_plt): Likewise.
258 (elf_x32_lazy_ibt_plt): Likewise.
259 (elf_x86_64_nacl_plt): Likewise.
260 (elf_x86_64_finish_dynamic_sections): Use plt_tlsdesc_entry,
261 plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset,
262 plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and
263 plt_tlsdesc_got2_insn_end to update TLSDESC entry.
264 * elfxx-x86.h (elf_x86_lazy_plt_layout): Update comments.
265 Add plt_tlsdesc_entry, plt_tlsdesc_entry_size,
266 plt_tlsdesc_got1_offset, plt_tlsdesc_got2_offset,
267 plt_tlsdesc_got1_insn_end and plt_tlsdesc_got2_insn_end.
268 (elf_x86_non_lazy_plt_layout): Update comments.
269 (elf_x86_plt_layout): Likewise.
271 2018-05-28 H.J. Lu <hongjiu.lu@intel.com>
274 * elf-s390-common.c (elf_s390_add_symbol_hook): Removed.
275 * elf32-arc.c (elf_arc_add_symbol_hook): Likewise.
276 (elf_backend_add_symbol_hook): Likewise.
277 * elf32-m68k.c (elf_m68k_add_symbol_hook): Likewise.
278 (elf_backend_add_symbol_hook): Likewise.
279 * elf32-s390.c (elf_backend_add_symbol_hook): Likewise.
280 * elf32-sparc.c (elf32_sparc_add_symbol_hook): Likewise.
281 (elf_backend_add_symbol_hook): Likewise.
282 * elf64-s390.c (elf_backend_add_symbol_hook): Likewise.
283 * elfxx-aarch64.c (_bfd_aarch64_elf_add_symbol_hook): Likewise.
284 * elfxx-aarch64.h (_bfd_aarch64_elf_add_symbol_hook): Likewise.
285 (elf_backend_add_symbol_hook): Likewise.
286 * elf32-arm.c (elf32_arm_add_symbol_hook): Remove STT_GNU_IFUNC
288 * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise.
289 * elf64-ppc.c (ppc64_elf_add_symbol_hook): Likewise.
290 * elf64-sparc.c (elf64_sparc_add_symbol_hook): Likewise.
291 * elflink.c (elf_link_add_object_symbols): Set
292 elf_gnu_symbol_ifunc for STT_GNU_IFUNC symbols.
294 2018-05-26 H.J. Lu <hongjiu.lu@intel.com>
297 * elf-bfd.h (_bfd_elf_link_hide_sym_by_version): New.
298 * elflink.c (_bfd_elf_link_hide_versioned_symbol): New function.
299 Extracted from _bfd_elf_link_assign_sym_version.
300 (_bfd_elf_link_hide_sym_by_version): New function.
301 (_bfd_elf_link_assign_sym_version): Use
302 _bfd_elf_link_hide_versioned_symbol.
303 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Call
304 _bfd_elf_link_hide_sym_by_version instead of
305 bfd_hide_sym_by_version. Don't check unversioned symbol.
307 2018-05-25 Alan Modra <amodra@gmail.com>
309 * Makefile.in: Regenerate.
310 * po/SRC-POTFILES.in: Regenerate.
312 2018-05-25 Alan Modra <amodra@gmail.com>
314 * configure.ac (bfd_cv_hidden): Run test with -Werror in CFLAGS.
315 * configure: Regenerate.
317 2018-05-23 H.J. Lu <hongjiu.lu@intel.com>
319 * elf64-ppc.c (ppc64_elf_write_core_note): Add ATTRIBUTE_NONSTRING
322 2018-05-22 Alan Modra <amodra@gmail.com>
325 * elf32-hppa.c (hppa_get_stub_entry): Return NULL when link_sec
327 (elf32_hppa_size_stubs): Only create stubs for load, alloc, code
329 (final_link_relocate): Revert last change.
331 2018-05-22 Alan Modra <amodra@gmail.com>
334 * elf32-hppa.c (final_link_relocate): Don't look for plt call
335 stubs in non-alloc sections.
337 2018-05-21 H.J. Lu <hongjiu.lu@intel.com>
340 * aout-target.h (MY_bfd_link_hide_symbol): New.
341 * aout-tic30.c (MY_bfd_link_hide_symbol): Likewise.
342 * binary.c (binary_bfd_link_hide_symbol): Likewise.
343 * coff-alpha.c (_bfd_ecoff_bfd_link_hide_symbol): Likewise.
344 * coff-mips.c (_bfd_ecoff_bfd_link_hide_symbol): Likewise.
345 * coff-rs6000.c (_bfd_xcoff_bfd_link_hide_symbol): Likewise.
346 * coffcode.h (coff_bfd_link_hide_symbol): Likewise.
347 * elf-bfd.h (_bfd_elf_link_hide_symbol): Likewise.
348 * elfxx-target.h (bfd_elfNN_bfd_link_hide_symbol): Likewise.
349 * i386msdos.c (msdos_bfd_link_hide_symbol): Likewise.
350 * ihex.c (ihex_bfd_link_hide_symbol): Likewise.
351 * libbfd-in.h (_bfd_nolink_bfd_link_hide_symbol): Likewise.
352 * linker.c (_bfd_generic_link_hide_symbol): Likewise.
353 (bfd_link_hide_symbol): Likewise.
354 * mach-o-target.c (bfd_mach_o_bfd_link_hide_symbol): Likewise.
355 * mmo.c (mmo_bfd_link_hide_symbol): Likewise.
356 * pef.c (bfd_pef_bfd_link_hide_symbol): Likewise.
357 * plugin.c (bfd_plugin_bfd_link_hide_symbol): Likewise.
358 * ppcboot.c (ppcboot_bfd_link_hide_symbol): Likewise.
359 * som.c (som_bfd_link_hide_symbol): Likewise.
360 * srec.c (srec_bfd_link_hide_symbol): Likewise.
361 * tekhex.c (tekhex_bfd_link_hide_symbol): Likewise.
362 * vms-alpha.c (vms_bfd_link_hide_symbol): Likewise.
363 (alpha_vms_bfd_link_hide_symbol): Likewise.
364 * xsym.c (bfd_sym_bfd_link_hide_symbol): Likewise.
365 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
366 _bfd_generic_link_hide_symbol.
367 (rs6000_xcoff64_aix_vec): Likewise.
368 * elflink.c (bfd_elf_record_link_assignment): Don't make forced
369 local symbol dynamic.
370 (_bfd_elf_link_hide_symbol): New function.
371 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
372 check root.ldscript_def.
373 * targets.c (bfd_target): Add _bfd_link_hide_symbol.
374 (BFD_JUMP_TABLE_LINK): Add NAME##_bfd_link_hide_symbol.
375 * bfd-in2.h: Regenerated.
376 * libbfd.h: Likewise.
378 2018-05-21 H.J. Lu <hongjiu.lu@intel.com>
381 * elf.c (setup_group): Mark section in a section group with
384 2018-05-18 H.J. Lu <hongjiu.lu@intel.com>
387 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
388 set eh->local_ref to 1 if a symbol is versioned and there is a
391 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
393 * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Handle
396 2018-05-18 Jim Wilson <jimw@sifive.com>
398 * elfnn-riscv.c (allocate_dynrelocs): Discard dynamic relocations if
399 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
400 (riscv_elf_relocate_section): Don't generate dynamic relocation if
401 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
402 (riscv_elf_finish_dynamic_symbol): Likewise.
404 2018-05-18 John Darrington <john@darrington.wattle.id.au>
406 * Makefile.am: Add s12z files.
407 * Makefile.in: Regenerate.
408 * archures.c: Add bfd_s12z_arch.
409 * bfd-in.h: Add exports of bfd_putb24 and bfd_putl24.
410 * bfd-in2.h: Regenerate.
411 * config.bfd: Add s12z target.
412 * configure.ac: Add s12z target.
413 * configure: Regenerate.
414 * cpu-s12z.c: New file.
415 * elf32-s12z.c: New file.
416 * libbfd.c (bfd_putb24): New function.
417 (bfd_putl24): New function.
418 * libbfd.h: Regenerate.
419 * reloc.c: Add s12z relocations.
420 (bfd_get_reloc_size): Handle size 5 relocs.
421 * targets.c: Add s12z_elf32_vec.
423 2018-05-18 H.J. Lu <hongjiu.lu@intel.com>
426 * elf32-i386.c (elf_i386_relocate_section): Handle R_386_GOT32X
428 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
429 set eh->local_ref to 1 for linker defined symbols.
431 2018-05-18 Alan Modra <amodra@gmail.com>
434 * elf.c (setup_group): Formatting. Check that SHT_GROUP entries
435 don't point at other SHT_GROUP sections. Set shdr corresponding
436 to invalid entry, to NULL rather than section 0. Identify
437 SHT_GROUP section index when reporting an error. Cope with NULL
440 2018-05-18 Alan Modra <amodra@gmail.com>
442 * libbfd-in.h (ATTRIBUTE_HIDDEN): Define and use throughout.
443 * configure.ac (HAVE_HIDDEN): Check compiler support for hidden
445 * libbfd.h: Regenerate.
446 * configure: Regenerate.
447 * config.in: Regenerate.
449 2018-05-18 Alan Modra <amodra@gmail.com>
451 * libbfd-in.h: Add include guard.
452 * libcoff-in.h: Likewise.
453 * doc/Makefile.am (libbfd.h, libcoff.h): Append another #endif.
454 * doc/Makefile.in: Regenerate.
455 * libbfd.h: Regenerate.
456 * libcoff.h: Regenerate.
458 2018-05-16 Maciej W. Rozycki <macro@mips.com>
460 * elf32-nds32.c (nds32_convert_32_to_16): Preset `insn_type'.
462 2018-05-16 Alan Modra <amodra@gmail.com>
465 * format.c (struct bfd_preserve): Add section_id.
466 (bfd_preserve_save, bfd_preserve_restore): Save and restore
468 (bfd_reinit): Set _bfd_section_id.
469 (bfd_check_format_matches): Put all matches of any priority into
470 matching_vector. Save initial section id and start each attempted
471 match at that section id.
472 * libbfd-in.h (_bfd_section_id): Declare.
473 * section.c (_bfd_section_id): Rename from section_id and make
475 (bfd_get_next_section_id): Delete.
476 * elf64-ppc.c (ppc64_elf_setup_section_lists): Replace use of
477 bfd_get_section_id with _bfd_section_id.
478 * libbfd.h: Regenerate.
479 * bfd-in2.h: Regenerate.
481 2018-05-15 Christophe Guillon <christophe.guillon@st.com>
483 * coffcode.h (coff_bigobj_swap_aux_in): Make sure that all fields
484 of the aux structure are initialised.
486 2018-05-15 Francois H. Theron <francois.theron@netronome.com>
488 * targets.c: Wrap nfp_elf64_vec in BFD64 ifdef.
490 2018-05-15 Nick Clifton <nickc@redhat.com>
492 * po/pt.po: New Portuguese translation.
493 * configure.ac (ALL_LINGUAS): Add pt.
494 * configure: Regenerate.
496 2018-05-14 H.J. Lu <hongjiu.lu@intel.com>
499 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Don't issue
500 an error on IFUNC pointer defined in PDE.
501 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Call
502 _bfd_x86_elf_link_fixup_ifunc_symbol.
503 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
504 * elfxx-x86.c (_bfd_x86_elf_link_fixup_ifunc_symbol): New
506 * elfxx-x86.h (_bfd_x86_elf_link_fixup_ifunc_symbol): New.
508 2018-05-14 H.J. Lu <hongjiu.lu@intel.com>
511 * elfxx-x86.c (elf_x86_linker_defined): New function.
512 (_bfd_x86_elf_link_check_relocs): Use it to mark __bss_start,
513 _end and _edata locally defined within executables.
515 2018-05-12 Alan Modra <amodra@gmail.com>
518 * elf.c (rewrite_elf_program_header): Use segment_mark only for
519 PT_LOAD headers. Delete first_matching_lma and first_suggested_lma.
520 Instead make matching_lma and suggested_lma pointers to the
521 sections. Align section vma and lma calculated from segment.
522 Don't clear includes_phdrs or includes_filehdr based on p_paddr
523 test. Try to handle alignment padding before first section by
524 adjusting new segment lma down. Adjust PT_PHDR map p_paddr.
526 2018-05-09 Dimitar Dimitrov <dimitar@dinux.eu>
528 * elf32-pru.c (pru_elf32_do_ldi32_relocate): Make LDI32 relocation
529 conformant to TI ABI.
530 (pru_elf32_relax_section): Likewise.
531 (pru_elf_relax_delete_bytes): Fix offsets for new LDI32 code.
532 * elf32-pru.c (pru_elf32_do_ldi32_relocate): Ignore addend.
533 (pru_elf32_pmem_relocate): Trap - should not get here.
534 (pru_elf32_relocate_section): Add support for REL relocations.
535 (elf_info_to_howto_rel): Enable REL.
536 (elf_backend_may_use_rel_p): Likewise.
537 (elf_backend_may_use_rela_p): Likewise.
538 (elf_backend_default_use_rela_p): Likewise.
540 2018-05-09 Alan Modra <amodra@gmail.com>
543 * peXXigen.c (pe_print_edata): Correct minimum size.
545 2018-05-09 Alan Modra <amodra@gmail.com>
548 * peXXigen.c (pe_print_idata): Bound check hint_addr.
550 2018-05-08 Nick Clifton <nickc@redhat.com>
553 * elf.c (bfd_elf_get_str_section): Check for an excessively large
555 * elf-attrs.c (_bfd_elf_parse_attributes): Issue an error if the
556 attribute section is larger than the size of the file.
558 2018-05-07 Alan Modra <amodra@gmail.com>
560 * cofflink.c (_bfd_coff_link_input_bfd): Use memcmp rather than
561 strncmp when checking for ".bf" special symbol.
562 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Make pe_required_section_flags
563 section name a char array, remove sentinal known_sections entry,
564 and adjust loop over known_sections to suit. Use memcmp rather
567 2018-05-04 Alan Modra <amodra@gmail.com>
569 * elf-linux-core.h (struct elf_external_linux_prpsinfo32_ugid32),
570 (struct elf_external_linux_prpsinfo32_ugid16),
571 (struct elf_external_linux_prpsinfo64_ugid32),
572 (struct elf_external_linux_prpsinfo64_ugid16): Add ATTRIBUTE_NONSTRING
573 to pr_fname and pr_psargs fields. Remove GCC diagnostic pragmas.
575 * elf.c (elfcore_write_prpsinfo): ..here. Indent nested preprocessor
577 * elf32-arm.c (elf32_arm_nabi_write_core_note): Add ATTRIBUTE_NONSTRING
579 * elf32-ppc.c (ppc_elf_write_core_note): Likewise.
580 * elf32-s390.c (elf_s390_write_core_note): Likewise.
581 * elf64-s390.c (elf_s390_write_core_note): Likewise.
582 * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewise.
583 * elf64-x86-64.c (elf_x86_64_write_core_note): Add GCC diagnostic
585 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Use strnlen to avoid
586 false positive gcc-8 warning.
587 * cofflink.c (_bfd_coff_link_input_bfd): Likewise.
589 2018-05-04 Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
591 * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Fix the order
592 of arguments when warning about different long double types.
594 2018-05-03 Simon Atanasyan <simon@atanasyan.com>
596 * elf32-mips.c: (elf32_mips_fixup_symbol): New function.
597 (elf_backend_fixup_symbol): New macro.
598 * elfxx-mips.c: (mips_elf_output_extsym): Discard _gp_disp
600 (_bfd_mips_elf_finish_dynamic_symbol): Likewise.
602 2018-04-30 Francois H. Theron <francois.theron@netronome.com>
604 * Makefile.am: Added NFP files to build.
605 * archures.c: Added bfd_arch_nfp
606 * config.bfd: Added NFP support.
607 * configure.ac: Added NFP support.
608 * cpu-nfp.c: New, for NFP support.
609 * elf-bfd.h: Added elf_section_info()
610 * elf64-nfp.c: New, for NFP support.
611 * po/SRC-POTFILES.in: Added NFP source files.
612 * targets.c: Added nfp_elf64_vec
613 * bfd-in2.h: Regenerate.
614 * Makefile.in: Regenerate.
615 * configure: Regenerate.
617 2018-04-27 Alan Modra <amodra@gmail.com>
619 * bfd-in2.h: Regenerate.
620 * libbfd.h: Regenerate.
622 2018-04-27 Alan Modra <amodra@gmail.com>
626 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't drop plt
628 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Comment fixes.
630 2018-04-26 Pedro Alves <palves@redhat.com>
632 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't consider
633 ifunc and non-ifunc symbols duplicates.
635 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
636 Mickaël Guêné <mickael.guene@st.com>
638 * elf32-arm.c (elf32_arm_fdpic_thumb_plt_entry): New.
639 (elf32_arm_plt_needs_thumb_stub_p): Handle thumb-only case.
640 (elf32_arm_populate_plt_entry): Likewise.
641 (elf32_arm_output_plt_map_1): Likewise.
642 (elf32_arm_output_arch_local_syms): Likewise.
644 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
645 Mickaël Guêné <mickael.guene@st.com>
647 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Handle
648 _GLOBAL_OFFSET_TABLE_ in FDPIC mode.
650 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
651 Mickaël Guêné <mickael.guene@st.com>
653 * elf32-arm.c (bfd_elf32_arm_set_target_params): Handle FDPIC case
656 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
657 Mickaël Guêné <mickael.guene@st.com>
659 * elf32-arm.c (DEFAULT_STACK_SIZE): New.
660 (elf32_arm_always_size_sections): Create stack segment.
662 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
663 Mickaël Guêné <mickael.guene@st.com>
665 * bfd-in2.h (BFD_RELOC_ARM_TLS_GD32_FDPIC)
666 (BFD_RELOC_ARM_TLS_LDM32_FDPIC, BFD_RELOC_ARM_TLS_IE32_FDPIC): New
668 * elf32-arm.c (elf32_arm_howto_table_2): Add R_ARM_TLS_GD32_FDPIC,
669 R_ARM_TLS_LDM32_FDPIC, R_ARM_TLS_IE32_FDPIC relocations.
670 (elf32_arm_reloc_map): Add R_ARM_TLS_GD32_FDPIC,
671 R_ARM_TLS_LDM32_FDPIC, R_ARM_TLS_IE32_FDPIC.
672 (struct elf32_arm_link_hash_table): Update comment.
673 (elf32_arm_final_link_relocate): Handle TLS FDPIC relocations.
674 (IS_ARM_TLS_RELOC): Likewise.
675 (elf32_arm_check_relocs): Likewise.
676 (allocate_dynrelocs_for_symbol): Likewise.
677 (elf32_arm_size_dynamic_sections): Update comment.
678 * reloc.c: Add BFD_RELOC_ARM_TLS_GD32_FDPIC,
679 BFD_RELOC_ARM_TLS_LDM32_FDPIC, BFD_RELOC_ARM_TLS_IE32_FDPIC.
681 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
682 Mickaël Guêné <mickael.guene@st.com>
684 * elf32-arm.c (elf32_arm_fdpic_plt_entry): New.
685 (elf32_arm_create_dynamic_sections): Handle FDPIC.
686 (elf32_arm_allocate_plt_entry): Likewise.
687 (elf32_arm_populate_plt_entry): Likewise.
688 (elf32_arm_output_plt_map_1): Likewise.
690 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
691 Mickaël Guêné <mickael.guene@st.com>
693 * elf32-arm.c (struct fdpic_local): New.
694 (elf_arm_obj_tdata): Add local_fdpic_cnts field.
695 (elf32_arm_local_fdpic_cnts): New.
696 (struct fdpic_global): New.
697 (elf32_arm_link_hash_entry): Add fdpic_cnts field.
698 (elf32_arm_link_hash_table): Add srofixup field.
699 (arm_elf_add_rofixup): New.
700 (arm_elf_fill_funcdesc): New.
701 (elf32_arm_link_hash_newfunc): Handle fdpic_cnts.
702 (elf32_arm_allocate_local_sym_info): Likewise.
703 (create_got_section): Create .rofixup section.
704 (elf32_arm_copy_indirect_symbol): Handle fdpic_cnts.
705 (bfd_elf32_arm_set_target_params): Handle FDPIC.
706 (elf32_arm_final_link_relocate): Likewise.
707 (elf32_arm_check_relocs): Likewise.
708 (allocate_dynrelocs_for_symbol): Likewise.
709 (elf32_arm_size_dynamic_sections): Likewise.
710 (elf32_arm_finish_dynamic_sections): Likewise.
711 (elf32_arm_output_arch_local_syms): Likewise.
712 (elf32_arm_fdpic_omit_section_dynsym): New.
714 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
715 Mickaël Guêné <mickael.guene@st.com>
717 * bfd-in2.c (BFD_RELOC_ARM_GOTFUNCDESC)
718 (BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC)
719 (BFD_RELOC_ARM_FUNCDESC_VALUE): New.
720 * elf32-arm.c (elf32_arm_howto_table_2): Add R_ARM_GOTFUNCDESC,
721 R_ARM_GOTOFFFUNCDESC, R_ARM_FUNCDESC, R_ARM_FUNCDESC_VALUE.
722 (elf32_arm_howto_from_type): Take new members of
723 elf32_arm_howto_table_2 into account.
724 (elf32_arm_reloc_map): Add BFD_RELOC_ARM_GOTFUNCDESC,
725 BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC,
726 BFD_RELOC_ARM_FUNCDESC_VALUE.
727 * reloc.c: Add BFD_RELOC_ARM_GOTFUNCDESC,
728 BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC,
729 BFD_RELOC_ARM_FUNCDESC_VALUE.
731 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
732 Mickaël Guêné <mickael.guene@st.com>
734 * elf32-arm.c (elf32_arm_print_private_bfd_data): Support
735 EF_ARM_PIC and ELFOSABI_ARM_FDPIC.
736 (elf32_arm_post_process_headers): Support ELFOSABI_ARM_FDPIC.
737 (ELF_OSABI): Define to ELFOSABI_ARM_FDPIC.
739 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
740 Mickaël Guêné <mickael.guene@st.com>
742 * config.bfd (arm*-*-linux-*): Add arm_elf32_fdpic_be_vec and
743 arm_elf32_fdpic_le_vec to targ_selvecs. Accept
744 arm*-*-uclinuxfdpiceabi.
745 * configure.ac: Add support for arm_elf32_fdpic_be_vec and
746 arm_elf32_fdpic_le_vec.
747 * configure: Regenerate.
748 * elf32-arm.c (struct elf32_arm_link_hash_table): Add fdpic_p.
749 (elf32_arm_link_hash_table_create): Initialize fdpic_p.
750 (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME, TARGET_BIG_SYM)
751 (TARGET_BIG_NAME, elf_match_priority): Define for FDPIC targets.
752 (elf32_arm_fdpic_link_hash_table_create): New.
753 * targets.c (_bfd_target_vector): Add arm_elf32_fdpic_be_vec and
754 arm_elf32_fdpic_le_vec.
756 2018-04-25 Alan Modra <amodra@gmail.com>
758 * elf-linux-core.h: Disable gcc-8 string truncation warning.
759 * elf.c (elfcore_write_prpsinfo): Likewise.
761 2018-04-25 Alan Modra <amodra@gmail.com>
763 * Makefile.am: Remove arm-aout and arm-coff support.
764 * config.bfd: Likewise.
765 * configure.ac: Likewise.
766 * targets.c: Likewise.
767 * aout-arm.c: Delete.
768 * armnetbsd.c: Delete.
770 * Makefile.in: Regenerate.
771 * configure: Regenerate.
772 * po/SRC-POTFILES.in: Regenerate.
774 2018-04-24 Nick Clifton <nickc@redhat.com>
777 * elf.c (ignore_section_sym): Check for the output_section pointer
778 being NULL before dereferencing it.
781 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Check for
782 a negative PE_DEBUG_DATA size before iterating over the debug data.
784 2018-04-23 Alan Modra <amodra@gmail.com>
786 * elf-linux-core.h: Revert last change.
789 2018-04-23 Nick Clifton <nickc@redhat.com>
792 * aoutx.h (aout_get_external_symbols): Allocate an extra byte at
793 the end of the string table, and zero it.
795 2018-04-23 Alan Modra <amodra@gmail.com>
797 * elf-linux-core.h (swap_linux_prpsinfo32_ugid32_out): Disable
798 gcc-8 string truncation warning.
799 (swap_linux_prpsinfo32_ugid16_out): Likewise.
800 (swap_linux_prpsinfo64_ugid32_out): Likewise.
801 (swap_linux_prpsinfo64_ugid16_out): Likewise.
802 * elf.c (elfcore_write_prpsinfo): Likewise.
804 2018-04-23 Nick Clifton <nickc@redhat.com>
807 * aoutx.h (aout_get_external_symbols): Allocate an extra byte at
808 the end of the string table, and zero it.
810 2018-04-20 Alan Modra <amodra@gmail.com>
813 * elf32-hppa.c (got_relocs_needed): Add extra param to special
814 case both dtprel and tprel relocs.
815 (allocate_dynrelocs): Adjust conditions for got relocs.
816 (elf32_hppa_relocate_section): Likewise for local sym got relocs.
817 Emit dynamic relocs on TLS GOT entries for shared libraries,
818 not when pic. Omit dynamic reloc on dtprel entry when local,
819 and on tprel entry when local and executable.
821 2018-04-19 Alan Modra <amodra@gmail.com>
824 * elf32-hppa.c (elf32_hppa_size_stubs): Init "destination" to -1.
825 (hppa_type_of_stub): Don't return a long branch stub for
826 symbols other than those defined statically.
828 2018-04-19 Alan Modra <amodra@gmail.com>
830 * Makefile.am: Revert 2018-04-18 coff-mips changes.
831 * config.bfd: Add back mips_ecoff_le_vec and mips_ecoff_be_vec
832 to selvecs for mips targets change 2018-04-18.
833 * configure.ac: Reinstate mips_ecoff_le_vec, mips_ecoff_be_vec
834 and mips_ecoff_bele_vec.
835 * targets.c: Likewise.
836 * coff-mips.c: Resurrect.
837 * Makefile.in: Regenerate.
838 * configure: Regenerate.
839 * po/SRC-POTFILES.in: Regenerate.
841 2018-04-18 Alan Modra <amodra@gmail.com>
843 * Makefile.am: Remove mips aout and coff support.
844 * config.bfd: Likewise.
845 * configure.ac: Likewise.
846 * targets.c: Likewise.
847 * coff-mips.c: Delete
851 * Makefile.in: Regenerate.
852 * configure: Regenerate.
853 * po/SRC-POTFILES.in: Regenerate.
855 2018-04-17 H.J. Lu <hongjiu.lu@intel.com>
857 * elf32-i386.c (elf32_bed): Define before including
859 * elf64-x86-64.c (elf64_bed): Define before including
861 (elf32_bed): Define before including "elf32-target.h".
863 2018-04-17 H.J. Lu <hongjiu.lu@intel.com>
866 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Use a
867 normal input file with compatible relocation.
869 2018-04-18 Alan Modra <amodra@gmail.com>
871 * Makefile.am: Remove support for assorted i386 aout and coff targets.
872 * config.bfd: Likewise.
873 * configure.ac: Likewise.
874 * doc/bfdint.texi: Likewise.
875 * targets.c: Likewise.
877 * i386dynix.c: Delete.
878 * i386freebsd.c: Delete.
879 * i386linux.c: Delete.
880 * i386mach3.c: Delete.
881 * i386netbsd.c: Delete.
882 * i386os9k.c: Delete.
883 * Makefile.in: Regenerate.
884 * configure: Regenerate.
885 * po/SRC-POTFILES.in: Regenerate.
887 2018-04-17 Andrew Sadek <andrew.sadek.se@gmail.com>
889 Microblaze Target: PIC data text relative
891 * bfd/reloc.c (2 new BFD relocations):
892 BFD_RELOC_MICROBLAZE_64_TEXTPCREL &
893 BFD_RELOC_MICROBLAZE_64_TEXTPCREL
894 * bfd/bfd-in2.h: Regenerate
895 * bfd/libbfd.h: Regenerate
896 * bfd/elf32-microblaze.c (Handle new relocs): define 'HOWTO' of 3
897 new relocs and handle them in both relocate and relax functions.
898 (microblaze_elf_reloc_type_lookup): add mapping between for new
900 (microblaze_elf_relocate_section): Handle new relocs in case of
902 (microblaze_elf_relax_section): Handle new relocs for elf relaxation.
904 2018-04-17 Nick Clifton <nickc@redhat.com>
907 * aoutx.h (find_nearest_line): Check that the symbol name exists
908 and is long enough, before attempting to see if it is for a .o
910 * hash.c (bfd_hash_hash): Add an assertion that the string is not
912 * linker.c (bfd_link_hash_lookup): Fail if the table or string are
914 (_bfd_generic_link_add_archive_symbols): Fail if an archive entry
918 * dwarf2.c (concat_filename): Check for a NULL table pointer.
920 2018-04-16 Nick Clifton <nickc@redhat.com>
923 * coffgen.c (coff_pointerize_aux): Check for an out of range
926 2018-04-16 Alan Modra <amodra@gmail.com>
928 * Makefile.am: Remove arm-epoc-pe support.
929 * coff-arm.c: Likewise.
930 * config.bfd: Likewise.
931 * configure.ac: Likewise.
932 * targets.c: Likewise.
933 * epoc-pe-arm.c: Delete.
934 * epoc-pei-arm.c: Delete.
935 * Makefile.in: Regenerate.
936 * configure: Regenerate.
937 * po/SRC-POTFILES.in: Regenerate.
939 2018-04-16 Alan Modra <amodra@gmail.com>
941 * Makefile.am: Remove sparc-aout and sparc-coff support.
942 * config.bfd: Likewise.
943 * configure.ac: Likewise.
944 * targets.c: Likewise.
945 * aout-sparcle.c: Delete.
947 * cf-sparclynx.c: Delete.
948 * coff-sparc.c: Delete.
950 * sparclinux.c: Delete.
951 * sparclynx.c: Delete.
952 * sparcnetbsd.c: Delete.
954 * Makefile.in: Regenerate.
955 * configure: Regenerate.
956 * po/SRC-POTFILES.in: Regenerate.
958 2018-04-16 Alan Modra <amodra@gmail.com>
960 * Makefile.am: Remove m68k-aout and m68k-coff support.
961 * aoutf1.h: Likewise.
963 * archive.c: Likewise.
964 * bfd-in.h: Likewise.
966 * coffcode.h: Likewise.
967 * coffswap.h: Likewise.
968 * config.bfd: Likewise.
969 * configure.ac: Likewise.
970 * configure.host: Likewise.
971 * doc/bfd.texinfo: Likewise.
972 * doc/bfdint.texi: Likewise.
973 * freebsd.h: Likewise.
974 * gen-aout.c: Likewise.
975 * hpux-core.c: Likewise.
976 * libaout.h: Likewise.
977 * libbfd-in.h: Likewise.
979 * peicode.h: Likewise.
980 * riscix.c: Likewise.
981 * targets.c: Likewise.
983 * coff-apollo.c: Delete.
984 * coff-aux.c: Delete.
985 * coff-m68k.c: Delete.
986 * coff-svm68k.c: Delete.
987 * coff-u68k.c: Delete.
988 * hosts/delta68.h: Delete.
989 * hosts/hp300bsd.h: Delete.
990 * hosts/m68kaux.h: Delete.
991 * hosts/news.h: Delete.
992 * hp300bsd.c: Delete.
993 * hp300hpux.c: Delete.
994 * liboasys.h: Delete.
995 * m68k4knetbsd.c: Delete.
996 * m68klinux.c: Delete.
997 * m68knetbsd.c: Delete.
999 * versados.c: Delete.
1000 * Makefile.in: Regenerate.
1001 * bfd-in2.h: Regenerate.
1002 * configure: Regenerate.
1003 * libbfd.h: Regenerate.
1004 * po/SRC-POTFILES.in: Regenerate.
1006 2018-04-16 Alan Modra <amodra@gmail.com>
1008 * Makefile.am: Remove sh5 and sh64 support.
1009 * archures.c: Likewise.
1010 * config.bfd: Likewise.
1011 * configure.ac: Likewise.
1012 * cpu-sh.c: Likewise.
1013 * elf32-sh-relocs.h: Likewise.
1014 * elf32-sh.c: Likewise.
1015 * targets.c: Likewise.
1016 * elf32-sh64-com.c: Delete.
1017 * elf32-sh64.c: Delete.
1018 * elf32-sh64.h: Delete.
1019 * elf64-sh64.c: Delete.
1020 * Makefile.in: Regenerate.
1021 * bfd-in2.h: Regenerate.
1022 * configure: Regenerate.
1023 * po/SRC-POTFILES.in: Regenerate.
1025 2018-04-16 Alan Modra <amodra@gmail.com>
1027 * Makefile.am: Remove sh-symbianelf support.
1028 * config.bfd: Likewise.
1029 * configure.ac: Likewise.
1030 * targets.c: Likewise.
1031 * elf32-sh-symbian.c: Delete.
1032 * Makefile.in: Regenerate.
1033 * configure: Regenerate.
1034 * po/SRC-POTFILES.in: Regenerate.
1036 2018-04-16 Alan Modra <amodra@gmail.com>
1038 * Makefile.am: Remove vax-bsd and vax-ultrix support.
1039 * config.bfd: Likewise.
1040 * configure.ac: Likewise.
1041 * targets.c: Likewise.
1043 * Makefile.in: Regenerate.
1044 * configure: Regenerate.
1045 * po/SRC-POTFILES.in: Regenerate.
1047 2018-04-16 Alan Modra <amodra@gmail.com>
1049 * Makefile.am: Remove w65 support.
1050 * archures.c: Likewise.
1051 * coffcode.h: Likewise.
1052 * config.bfd: Likewise.
1053 * configure.ac: Likewise.
1054 * targets.c: Likewise.
1055 * coff-w65.c: Delete.
1056 * cpu-w65.c: Delete.
1057 * Makefile.in: Regenerate.
1058 * bfd-in2.h: Regenerate.
1059 * configure: Regenerate.
1060 * po/SRC-POTFILES.in: Regenerate.
1062 2018-04-16 Alan Modra <amodra@gmail.com>
1064 * Makefile.am: Remove we32k support.
1065 * archures.c: Likewise.
1066 * coffcode.h: Likewise.
1067 * config.bfd: Likewise.
1068 * configure.ac: Likewise.
1069 * targets.c: Likewise.
1070 * coff-we32k.c: Delete.
1071 * cpu-we32k.c: Delete.
1072 * Makefile.in: Regenerate.
1073 * bfd-in2.h: Regenerate.
1074 * configure: Regenerate.
1075 * po/SRC-POTFILES.in: Regenerate.
1077 2018-04-16 Alan Modra <amodra@gmail.com>
1079 * Makefile.am: Remove m88k support.
1080 * aoutx.h: Likewise.
1081 * archures.c: Likewise.
1082 * coffcode.h: Likewise.
1083 * coffswap.h: Likewise.
1084 * config.bfd: Likewise.
1085 * configure.ac: Likewise.
1086 * cpu-ns32k.c: Likewise.
1087 * elf32-nds32.c: Likewise.
1088 * mach-o.c: Likewise.
1089 * netbsd-core.c: Likewise.
1090 * reloc.c: Likewise.
1091 * targets.c: Likewise.
1092 * coff-m88k.c: Delete.
1093 * cpu-m88k.c: Delete.
1094 * elf32-m88k.c: Delete.
1095 * hosts/m88kmach3.h: Delete.
1096 * m88kmach3.c: Delete.
1097 * m88kopenbsd.c: Delete.
1098 * Makefile.in: Regenerate.
1099 * bfd-in2.h: Regenerate.
1100 * configure: Regenerate.
1101 * po/SRC-POTFILES.in: Regenerate.
1103 2018-04-16 Alan Modra <amodra@gmail.com>
1105 * Makefile.am: Remove i370 support.
1106 * archures.c: Likewise.
1107 * config.bfd: Likewise.
1108 * configure.ac: Likewise.
1109 * targets.c: Likewise.
1110 * cpu-i370.c: Delete.
1111 * elf32-i370.c: Delete.
1112 * Makefile.in: Regenerate.
1113 * bfd-in2.h: Regenerate.
1114 * configure: Regenerate.
1115 * po/SRC-POTFILES.in: Regenerate.
1117 2018-04-16 Alan Modra <amodra@gmail.com>
1119 * Makefile.am: Remove h8500 support.
1120 * archures.c: Likewise.
1121 * coffcode.h: Likewise.
1122 * config.bfd: Likewise.
1123 * configure.ac: Likewise.
1124 * targets.c: Likewise.
1125 * coff-h8500.c: Delete.
1126 * cpu-h8500.c: Delete.
1127 * Makefile.in: Regenerate.
1128 * bfd-in2.h: Regenerate.
1129 * configure: Regenerate.
1130 * po/SRC-POTFILES.in: Regenerate.
1132 2018-04-16 Alan Modra <amodra@gmail.com>
1134 * Makefile.am: Remove h8300-coff support.
1135 * coffcode.h: Likewise.
1136 * config.bfd: Likewise.
1137 * configure.ac: Likewise.
1138 * reloc16.c: Likewise.
1139 * targets.c: Likewise.
1140 * coff-h8300.c: Delete.
1141 * Makefile.in: Regenerate.
1142 * configure: Regenerate.
1143 * po/SRC-POTFILES.in: Regenerate.
1145 2018-04-16 Alan Modra <amodra@gmail.com>
1147 * Makefile.am: Remove IEEE 695 support.
1148 * archures.c: Likewise.
1150 * config.bfd: Likewise.
1151 * configure.ac: Likewise.
1152 * doc/bfd.texinfo: Likewise.
1153 * doc/bfdint.texi: Likewise.
1154 * doc/bfdsumm.texi: Likewise.
1155 * section.c: Likewise.
1156 * targets.c: Likewise.
1158 * libieee.h: Delete.
1159 * Makefile.in: Regenerate.
1160 * bfd-in2.h: Regenerate.
1161 * configure: Regenerate.
1162 * po/SRC-POTFILES.in: Regenerate.
1164 2018-04-16 Alan Modra <amodra@gmail.com>
1166 * config.bfd: Remove tandem support.
1168 2018-04-16 Alan Modra <amodra@gmail.com>
1170 * Makefile.am: Remove newsos3 support.
1171 * aoutx.h: Likewise.
1172 * config.bfd: Likewise.
1173 * configure.ac: Likewise.
1174 * targets.c: Likewise.
1175 * newsos3.c: Delete.
1176 * Makefile.in: Regenerate.
1177 * configure: Regenerate.
1178 * po/SRC-POTFILES.in: Regenerate.
1180 2018-04-16 Alan Modra <amodra@gmail.com>
1182 * Makefile.am: Remove netware support.
1183 * bfd-in.h: Likewise.
1185 * config.bfd: Likewise.
1186 * configure.ac: Likewise.
1187 * doc/bfdint.texi: Likewise.
1188 * ecoff.c: Likewise.
1189 * targets.c: Likewise.
1191 * nlm-target.h: Delete.
1193 * nlm32-alpha.c: Delete.
1194 * nlm32-i386.c: Delete.
1195 * nlm32-ppc.c: Delete.
1196 * nlm32-sparc.c: Delete.
1199 * nlmcode.h: Delete.
1200 * nlmswap.h: Delete.
1201 * Makefile.in: Regenerate.
1202 * bfd-in2.h: Regenerate.
1203 * configure: Regenerate.
1204 * po/SRC-POTFILES.in: Regenerate.
1206 2018-04-16 Alan Modra <amodra@gmail.com>
1208 * archures.c: Remove tahoe support.
1209 * config.bfd: Likewise.
1210 * configure.ac: Likewise.
1211 * hosts/tahoe.h: Delete.
1212 * bfd-in2.h: Regenerate.
1213 * configure: Regenerate.
1215 2018-04-14 Alan Modra <amodra@gmail.com>
1217 * elf-bfd.h (struct elf_backend_data): Add relropagesize.
1218 * elfxx-target.h (ELF_RELROPAGESIZE): Provide default and
1220 (elfNN_bed): Init relropagesize.
1221 * bfd.c (bfd_emul_get_commonpagesize): Add boolean param to
1222 select relropagesize.
1223 * elf32-ppc.c (ELF_COMMONPAGESIZE): Define as 0x1000.
1224 (ELF_RELROPAGESIZE): Define as ELF_MAXPAGESIZE.
1225 (ELF_MINPAGESIZE): Don't define.
1226 * elf64-ppc.c (ELF_COMMONPAGESIZE): Define as 0x1000.
1227 (ELF_RELROPAGESIZE): Define as ELF_MAXPAGESIZE.
1228 * bfd-in2.h: Regenerate.
1230 2018-04-14 Alan Modra <amodra@gmail.com>
1232 * elf32-ppc.c (ELF_MAXPAGESIZE, ELF_COMMONPAGESIZE): Don't depend
1233 on __QNXTARGET__ define.
1235 2018-04-14 Alan Modra <amodra@gmail.com>
1237 * config.bfd: Add powerpc-*-lynxos* and powerpc-*-windiss*
1240 2018-04-11 Alan Modra <amodra@gmail.com>
1242 * aout-adobe.c: Delete.
1244 * coff-i860.c: Delete.
1245 * coff-i960.c: Delete.
1246 * cpu-i860.c: Delete.
1247 * cpu-i960.c: Delete.
1248 * elf32-i860.c: Delete.
1249 * elf32-i960.c: Delete.
1250 * hosts/i860mach3.h: Delete.
1251 * Makefile.am: Remove i860, i960, bout, and adobe support.
1252 * archures.c: Remove i860 and i960 support.
1253 * coffcode.h: Likewise.
1254 * reloc.c: Likewise.
1255 * aoutx.h: Comment updates.
1256 * archive.c: Remove BOUT and i960 support.
1257 * bfd.c: Remove BOUT support.
1258 * coffswap.h: Remove i960 support.
1259 * config.bfd: Remove i860, i960 and adobe targets.
1260 * configure.ac: Remove adode, bout, i860, i960, icoff targets.
1261 * targets.c: Likewise.
1262 * ieee.c: Remove i960 support.
1263 * mach-o.c: Remove i860 support.
1264 * Makefile.in: Regenerate.
1265 * bfd-in2.h: Regenerate.
1266 * configure: Regenerate.
1267 * libbfd.h: Regenerate.
1268 * po/SRC-POTFILES.in: Regenerate.
1270 2018-04-09 Maciej W. Rozycki <macro@mips.com>
1272 * elf64-mips.c (mips_elf64_write_rel): Handle a NULL BFD pointer
1273 in the BFD symbol referred by the relocation.
1274 (mips_elf64_write_rela): Likewise.
1276 2018-04-09 Maciej W. Rozycki <macro@mips.com>
1278 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Issue an
1279 error for out-of-range `r_sym' values.
1281 2018-04-09 Alan Modra <amodra@gmail.com>
1283 * elf64-ppc.c (struct _ppc64_elf_section_data): Add has_pltcall field.
1284 (struct ppc_link_hash_table): Add can_convert_all_inline_plt.
1285 (ppc64_elf_check_relocs): Set has_pltcall.
1286 (ppc64_elf_adjust_dynamic_symbol): Discard some PLT entries.
1287 (ppc64_elf_inline_plt): New function.
1288 (ppc64_elf_size_dynamic_sections): Discard some PLT entries for locals.
1289 * elf64-ppc.h (ppc64_elf_inline_plt): Declare.
1290 * elf32-ppc.c (has_pltcall): Define.
1291 (struct ppc_elf_link_hash_table): Add can_convert_all_inline_plt.
1292 (ppc_elf_check_relocs): Set has_pltcall.
1293 (ppc_elf_inline_plt): New function.
1294 (ppc_elf_adjust_dynamic_symbol): Discard some PLT entries.
1295 (ppc_elf_size_dynamic_sections): Likewise.
1296 * elf32-ppc.h (ppc_elf_inline_plt): Declare.
1298 2018-04-09 Alan Modra <amodra@gmail.com>
1300 * elf32-ppc.c (ppc_elf_howto_raw): Add PLTSEQ and PLTCALL howtos.
1301 (is_plt_seq_reloc): New function.
1302 (ppc_elf_check_relocs): Handle PLTSEQ and PLTCALL relocs.
1303 (ppc_elf_tls_optimize): Handle inline plt call sequence.
1304 (ppc_elf_relax_section): Handle PLTCALL reloc.
1305 (ppc_elf_relocate_section): Nop out inline plt call sequence when
1307 * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_PLTSEQ and
1308 R_PPC64_PLTCALL entries. Comment R_PPC64_TOCSAVE.
1309 (has_tls_get_addr_call): Correct comment.
1310 (is_branch_reloc): Add PLTCALL.
1311 (is_plt_seq_reloc): New function.
1312 (ppc64_elf_check_relocs): Handle PLT16_LO_DS reloc. Set
1313 has_tls_reloc for R_PPC64_TLSGD and R_PPC64_TLSLD. Create plt
1314 entry for R_PPC64_PLTCALL.
1315 (ppc64_elf_tls_optimize): Handle inline plt call sequence.
1316 (ppc_type_of_stub): Handle PLTCALL reloc.
1317 (toc_adjusting_stub_needed): Likewise.
1318 (ppc64_elf_relocate_section): Set "can_plt_call" for PLTCALL
1319 reloc insn. Nop out inline plt call sequence when resolving
1320 locally. Handle __tls_get_addr inline plt call optimization.
1322 2018-04-09 Alan Modra <amodra@gmail.com>
1324 * elf64-ppc.c (LOCAL_PLT_ENTRY_SIZE): Define.
1325 (struct ppc_stub_hash_entry): Add symtype field.
1327 (struct ppc_link_hash_table): Add pltlocal and relpltlocal.
1328 (create_linkage_sections): Create pltlocal and relpltlocal.
1329 (ppc64_elf_check_relocs): Allow PLT relocs on local symbols.
1331 (ppc64_elf_adjust_dynamic_symbol): Keep PLT entries for inline calls.
1332 (allocate_dynrelocs): Allocate pltlocal and relpltlocal.
1333 (ppc64_elf_size_dynamic_sections): Size pltlocal and relpltlocal.
1334 Keep PLT entries for inline calls against locals.
1335 (ppc_build_one_stub): Use pltlocal as appropriate.
1336 (ppc_size_one_stub): Likewise.
1337 (ppc64_elf_size_stubs): Set symtype.
1338 (build_global_entry_stubs_and_plt): Init pltlocal and write
1339 relpltlocal for globals.
1340 (write_plt_relocs_for_local_syms): Likewise for local syms.
1341 (ppc64_elf_relocate_section): Support PLT for local syms.
1342 * elf32-ppc.c (PLT_KEEP): Define.
1343 (struct ppc_elf_link_hash_table): Add pltlocal and relpltlocal.
1344 (ppc_elf_create_glink): Create pltlocal and relpltlocal.
1345 (ppc_elf_check_relocs): Allow PLT relocs on local symbols.
1346 Set PLT_KEEP. Adjust update_local_sym_info call.
1347 (ppc_elf_adjust_dynamic_symbol): Keep PLT entries for inline calls.
1348 (allocate_dynrelocs): Allocate pltlocal and relpltlocal.
1349 (ppc_elf_size_dynamic_sections): Size pltlocal and relpltlocal.
1350 (ppc_elf_relocate_section): Support PLT16 relocs for local syms.
1351 (write_global_sym_plt): Init pltlocal and write relpltlocal.
1352 (ppc_finish_symbols): Likewise for locals.
1354 2018-04-09 Alan Modra <amodra@gmail.com>
1356 * elf64-ppc.c (ppc_build_one_stub): Move output of PLT relocs
1357 for local symbols to..
1358 (write_plt_relocs_for_local_syms): ..here. New function.
1359 (ppc64_elf_finish_dynamic_symbol): Move output of PLT relocs for
1361 (build_global_entry_stubs_and_plt): ..here. Rename from
1362 build_global_entry_stubs.
1363 (ppc64_elf_build_stubs): Always call build_global_entry_stubs_and_plt.
1364 Call write_plt_relocs_for_local_syms.
1365 * elf32-ppc.c (get_sym_h): New function.
1366 (ppc_elf_relax_section): Use get_sym_h.
1367 (ppc_elf_relocate_section): Move output of PLT relocs and glink
1368 stubs for local symbols to..
1369 (ppc_finish_symbols): ..here. New function.
1370 (ppc_elf_finish_dynamic_symbol): Move output of PLT relocs for
1372 (write_global_sym_plt): ..here. New function.
1373 * elf32-ppc.h (ppc_elf_modify_segment_map): Delete attribute.
1374 (ppc_finish_symbols): Declare.
1376 2018-04-09 Alan Modra <amodra@gmail.com>
1378 * elf32-ppc.c (ppc_elf_check_relocs): Handle PLT16 relocs.
1379 (ppc_elf_relocate_section): Likewise.
1380 * elf64-ppc.c (ppc64_elf_check_relocs): Handle PLT16_LO_DS.
1381 (ppc64_elf_relocate_section): Likewise. Correct PLT16
1382 resolution to plt entry relative to toc pointer.
1384 2018-04-09 Alan Modra <amodra@gmail.com>
1386 * elf64-ppc.c (TLS_TLS, TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL,
1387 TLS_TPRELGD, TLS_EXPLICIT): Renumber. Test TLS_TLS throughout
1388 file when other TLS flags are tested in a mask.
1389 (TLS_MARK, NON_GOT): Define.
1390 (PLT_IFUNC): Redefine, and test TLS_TLS throughout file as well.
1391 (update_local_sym_info): Don't create got entry when NON_GOT.
1392 (ppc64_elf_check_relocs): Pass NON_GOT with PLT_IFUNC.
1394 (get_tls_mask): Do toc lookup if tls_mask is just TLS_MARK.
1395 (ppc64_elf_relocate_section): Likewise.
1396 (ppc64_elf_tls_optimize): Don't attempt to optimize indirect
1397 __tls_get_addr calls lacking a marker reloc.
1398 * elf32-ppc.c (TLS_TLS, TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL,
1399 TLS_TPRELGD): Renumber. Update comment.
1400 (TLS_MARK, NON_GOT): Define.
1401 (PLT_IFUNC): Redefine, and test TLS_TLS throughout file as well.
1402 (update_local_sym_info): Don't create got entry when NON_GOT.
1403 (ppc_elf_check_relocs): Pass NON_GOT with PLT_IFUNC.
1405 (ppc_elf_tls_optimize): Don't attempt to optimize indirect
1406 __tls_get_addr calls lacking a marker reloc.
1408 2018-04-06 H.J. Lu <hongjiu.lu@intel.com>
1410 * elf64-x86-64.c (elf_x86_64_info_to_howto): Don't mask out
1411 R_X86_64_converted_reloc_bit.
1413 2018-04-05 H.J. Lu <hongjiu.lu@intel.com>
1416 * configure: Regenerated.
1418 2018-04-05 Alan Modra <amodra@gmail.com>
1420 * elf-hppa.h (elf_hppa_info_to_howto): Init howto to NULL.
1421 (elf_hppa_info_to_howto_rel): Likewise.
1423 2018-04-04 Maciej W. Rozycki <macro@mips.com>
1425 * elf-hppa.h (elf_hppa_info_to_howto): Also return
1426 unsuccessfully for unimplemented relocations.
1427 (elf_hppa_info_to_howto_rel): Likewise.
1429 2018-04-04 Maciej W. Rozycki <macro@mips.com>
1431 * elf32-i860.c (lookup_howto): Add `abfd' parameter. Set the
1432 `bfd_error_bad_value' error and call `_bfd_error_handler' on a
1433 howto lookup failure.
1434 (elf32_i860_reloc_type_lookup): Adjust `lookup_howto' call
1436 (elf32_i860_info_to_howto_rela): Likewise.
1437 (elf32_i860_relocate_splitn): Likewise.
1438 (elf32_i860_relocate_pc16): Likewise.
1439 (elf32_i860_relocate_pc26): Likewise.
1440 (elf32_i860_relocate_section): Likewise.
1442 2018-04-04 Maciej W. Rozycki <macro@mips.com>
1444 * elf32-visium.c (visium_info_to_howto_rela): Correct the range
1445 check for `visium_elf_howto_table' table access.
1447 2018-04-04 Maciej W. Rozycki <macro@mips.com>
1449 * elf32-iq2000.c (iq2000_info_to_howto_rela): Correct the range
1450 check for `iq2000_elf_howto_table' table access.
1452 2018-04-04 Maciej W. Rozycki <macro@mips.com>
1454 * elf32-frv.c (frv_info_to_howto_rela): Correct the range check
1455 for `elf32_frv_howto_table' table access.
1457 2018-04-04 Maciej W. Rozycki <macro@mips.com>
1459 * elf32-mips.c (mips_elf32_rtype_to_howto): Also return
1460 unsuccessfully for placeholder howtos.
1461 * elf64-mips.c (mips_elf64_rtype_to_howto): Likewise.
1462 * elfn32-mips.c (mips_elf_n32_rtype_to_howto): Likewise.
1464 2018-03-29 Maciej W. Rozycki <macro@mips.com>
1466 * elf32-mips.c (mips_info_to_howto_rel): Remove the calls to
1467 `_bfd_error_handler' and to set the `bfd_error_bad_value' error.
1469 2018-03-28 Maciej W. Rozycki <macro@mips.com>
1471 * elf-hppa.h (elf_hppa_info_to_howto_rel): Remove
1472 ATTRIBUTE_UNUSED from `abfd'.
1474 2018-03-28 Maciej W. Rozycki <macro@mips.com>
1476 * elf-hppa.h (elf_hppa_info_to_howto_rel): Correct
1477 `_bfd_error_handler' call formatting.
1479 2018-03-28 Maciej W. Rozycki <macro@mips.com>
1481 * elf32-mips.c (mips_info_to_howto_rel): Call
1482 `mips_elf32_rtype_to_howto' directly rather than via
1483 `->elf_backend_mips_rtype_to_howto'.
1485 2018-03-28 Renlin Li <renlin.li@arm.com>
1488 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Add cases for
1489 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12,
1490 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
1491 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12,
1492 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
1493 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12,
1494 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
1495 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12,
1496 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
1497 (elfNN_aarch64_final_link_relocate): Support new relocations.
1498 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Support new
1500 (_bfd_aarch64_elf_resolve_relocation): Support new relocations.
1502 2018-03-28 Renlin Li <renlin.li@arm.com>
1505 * reloc.c: Add BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12
1506 BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12_NC,
1507 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12,
1508 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
1509 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12,
1510 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
1511 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12,
1512 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
1513 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12,
1514 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
1515 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Add table entry for
1516 TLSLE_LDST16_TPREL_LO12,
1517 TLSLE_LDST16_TPREL_LO12_NC,
1518 TLSLE_LDST32_TPREL_LO12,
1519 TLSLE_LDST32_TPREL_LO12_NC,
1520 TLSLE_LDST64_TPREL_LO12,
1521 TLSLE_LDST64_TPREL_LO12_NC,
1522 TLSLE_LDST8_TPREL_LO12,
1523 TLSLE_LDST8_TPREL_LO12_NC.
1524 * bfd-in2.h: Regenerated.
1525 * libbfd.h: Regenerated.
1527 2018-03-28 Eric Botcazou <ebotcazou@adacore.com>
1530 * elfxx-sparc.c (struct _bfd_sparc_elf_link_hash_entry): Add new flag
1531 has_old_style_got_reloc.
1532 (_bfd_sparc_elf_check_relocs) <GOT relocations>: Set it for old-style
1533 relocations. Fix a couple of long lines.
1534 (_bfd_sparc_elf_relocate_section) <R_SPARC_GOTDATA_OP>: Do not generate
1535 a R_SPARC_NONE for the GOT slot if the symbol is also subject to old-style
1538 2018-03-25 H.J. Lu <hongjiu.lu@intel.com>
1541 * elf64-x86-64.c (elf_x86_64_finish_dynamic_sections): Add
1542 ENDBR64 to the TLSDESC PLT entry.
1544 2018-03-21 Alan Modra <amodra@gmail.com>
1546 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Trim uninteresting
1547 symbols. Use size_t counts. Delete redundant opd test.
1549 2018-03-21 Alan Modra <amodra@gmail.com>
1551 * elf32-ppc.c (ppc_elf_tls_optimize): Delete locsyms.
1553 2018-03-21 Alan Modra <amodra@gmail.com>
1555 * elf32-ppc.c (struct ppc_elf_link_hash_entry): Make tls_mask
1557 (update_local_sym_info): Likewise for local_got_tls_masks.
1558 (ppc_elf_tls_optimize): Likewise for lgot_masks.
1560 2018-03-21 Alan Modra <amodra@gmail.com>
1562 * elf64-ppc.c (ppc_size_one_stub): Fix comment typo.
1563 (ppc64_elf_layout_multitoc): Allocate relocs for tprel as we
1564 do in size_dynamic_sections.
1566 2018-03-21 Alan Modra <amodra@gmail.com>
1568 * elf64-ppc.c (ppc64_elf_relocate_section): Don't access rel[1]
1569 without first checking array bounds.
1570 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1572 2018-03-20 H.J. Lu <hongjiu.lu@intel.com>
1575 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Set
1576 non_ir_ref_dynamic if a symbol is made dynamic by --dynamic-list.
1578 2018-03-19 Nick Clifton <nickc@redhat.com>
1580 * po/es.po: Updated Spanish translation.
1582 2018-03-15 Max Filippov <jcmvbkbc@gmail.com>
1584 * elf32-xtensa.c (xlate_map_entry): Change types of address
1585 fields from 'unsigned' to 'bfd_vma'.
1586 (xlate_offset_with_removed_text): Use struct xlate_map_entry as
1587 the key argument to bsearch. Allow offsets past the end of a
1588 section, use the last map entry for translation of such offsets.
1590 2018-03-15 Kuan-Lin Chen <kuanlinchentw@gmail.com>
1592 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Removed.
1593 Not support the target feature.
1594 (nds32_elf_ex9_itb_base): Likewise.
1595 (nds32_elf_ex9_import_table): Likewise.
1596 (nds32_elf_ex9_finish): Likewise.
1597 (nds32_elf_ex9_reloc_jmp): Likewise.
1598 (nds32_elf_get_insn_with_reg): Likewise.
1599 (nds32_get_local_syms): Likewise.
1600 (nds32_elf_ex9_replace_instruction): Likewise.
1601 (nds32_elf_ifc_calc): Likewise.
1602 (nds32_elf_ifc_finish): Likewise.
1603 (nds32_elf_ifc_replace): Likewise.
1604 (nds32_elf_ifc_reloc): Likewise.
1606 2018-03-14 Alan Modra <amodra@gmail.com>
1608 * elf64-ppc.c (sfpr_define): Adjust for stub_sec size having
1609 sfpr size added before defining alias symbols.
1610 (ppc64_elf_build_stubs): Add stub section padding before
1611 copying sfpr contents and defining save/restore alias symbols.
1613 2018-03-14 H.J. Lu <hongjiu.lu@intel.com>
1616 * elflink.c (elf_gc_mark_debug_section): Also check the local
1617 debug definition section.
1619 2018-03-13 Nick Clifton <nickc@redhat.com>
1622 * pei-x86_64.c (pex64_get_unwind_info): Change to a boolean
1623 function. Add an end address parameter. Check access of the data
1624 pointer to make sure that they do not extend beyond the end
1625 address. Return FALSE if any check fails. Add the end address
1626 pointer to the ui structure.
1627 (pex64_xdata_print_uwd_codes): Check accesses of the raw unwind
1628 codes to make sure that they do not extend beyond the end address
1629 pointer. Print an error message and return immediately if any
1632 2018-03-09 Nick Clifton <nickc@redhat.com>
1634 * elf64-s390.c (elf_s390_relocate_section): Move check for
1635 relocations against non-allocated sections to before the code that
1636 handles ifunc relocations.
1637 * elf32-s390.c (elf_s390_relocate_section): Likewise.
1638 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Treat
1639 relocs against IFUNC symbols in non-allocated sections as relocs
1640 against FUNC symbols.
1641 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
1643 2018-03-08 H.J. Lu <hongjiu.lu@intel.com>
1646 * elf32-i386.c (elf_i386_relocate_section): Treat relocation
1647 against IFUNC symbol in SHT_NOTE section without SHF_ALLOC as
1648 relocation against FUNC symbol.
1649 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1651 2018-03-07 Renlin Li <renlin.li@arm.com>
1654 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Check absolute
1655 symbol, and don't emit relocation in specific case.
1657 2018-03-07 Alan Modra <amodra@gmail.com>
1659 * elf64-mips.c (mips_elf64_rtype_to_howto): Return NULL on error.
1660 (mips_elf64_slurp_one_reloc_table): Pass on error.
1662 2018-03-03 James Cowgill <james.cowgill@mips.com>
1663 Maciej W. Rozycki <macro@mips.com>
1666 * elfxx-mips.c (mips_elf_calculate_relocation): Only return
1667 after calling `undefined_symbol' hook if this is an error
1668 condition. Assume the value of 0 for the symbol requested
1671 2018-03-02 Jim Wilson <jimw@sifive.com>
1674 * elfnn-aarch64.c (_bfd_aarch64_resize_stubs): Add 8 bytes for branch
1675 and nop instead of 4.
1676 (elfNN_arch64_build_stubs): Add nop after branch. Increase size by
1679 2018-03-01 Jim Wilson <jimw@sifive.com>
1682 * elfnn-riscv.c (riscv_relax_delete_bytes): When adjust st_size, use
1683 else if instead of if.
1685 2018-03-01 Alan Modra <amodra@gmail.com>
1687 * elf32-ft32.c (ft32_info_to_howto_rela): Correct range test.
1689 2018-02-28 Alan Modra <amodra@gmail.com>
1692 * aoutx.h (swap_std_reloc_in): Correct r_index bound check.
1694 2018-02-28 Nick Clifton <nickc@redhat.com>
1698 * dwarf2.c (read_n_bytes): Replace size parameter with dwarf_block
1699 pointer. Drop unused abfd parameter. Check the size of the block
1700 before initialising the data field. Return the end pointer if the
1702 (read_attribute_value): Adjust invocations of read_n_bytes.
1705 * dwarf1.c (parse_die): Check the length of form blocks before
1706 advancing the data pointer.
1708 2018-02-28 Alan Modra <amodra@gmail.com>
1711 * aoutx.h (translate_symbol_table): Print an error message and set
1712 bfd_error on finding an invalid name string offset.
1714 2018-02-27 H.J. Lu <hongjiu.lu@intel.com>
1716 * config.in: Regenerated.
1717 * configure: Likewise.
1718 * configure.ac: Add --enable-separate-code.
1719 (DEFAULT_LD_Z_SEPARATE_CODE): New AC_DEFINE_UNQUOTED. Default
1720 to 1 for Linux/x86 targets,
1721 * elf64-x86-64.c (ELF_MAXPAGESIZE): Set to 0x1000 if
1722 DEFAULT_LD_Z_SEPARATE_CODE is 1.
1724 2018-02-27 Nick Clifton <nickc@redhat.com>
1726 * aout-cris.c (swap_ext_reloc_out): Standadize error/warning
1728 * elf-hppa.h (elf_hppa_info_to_howto_rel): Likewise.
1729 * elf32-i386.c (elf_i386_reloc_type_lookup): Likewise.
1730 * elf32-xtensa.c (elf_xtensa_reloc_type_lookup): Likewise.
1731 * elf64-ppc.c (ppc64_elf_reloc_type_lookup): Likewise.
1732 * elf64-s390.c (elf_s390_reloc_type_lookup): Likewise.
1733 * elf64-sh64.c (sh_elf64_info_to_howto): Likewise.
1734 * elfxx-ia64.c (ia64_elf_reloc_type_lookup): Likewise.
1735 * elfxx-sparc.c (_bfd_sparc_elf_reloc_type_lookup): Likewise.
1736 * elfxx-tilegx.c (tilegx_reloc_type_lookup): Likewise.
1739 * elf-bfd.h (struct elf_backend_data): Change the return type of
1740 the elf_info_to_howto and elf_info_to_howto_rel function pointers
1742 * elfcode.h (elf_slurp_reloc_table_from_section): Check the return
1743 value from the info_to_howto function and fail if that function
1745 * elf32-h8300.c (elf32_h8_relocate_section): Check return value
1746 from the info_to_howto function.
1747 (elf32_h8_relax_section): Likewise.
1748 * elf32-lm32.c (lm32_elf_relocate_section): Likewise.
1749 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
1750 * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise.
1751 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
1752 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
1753 * elf64-ia64-vms.c (elf64_ia64_relocate_section): Likewise.
1754 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Likewise.
1755 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
1756 * elfnn-ia64.c (elfNN_ia64_relocate_section): Likewise.
1757 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
1758 (riscv_elf_relocate_section): Likewise.
1759 * elf-hppa.h (elf_hppa_info_to_howto): Change return type to
1760 bfd_boolean. Issue an error message, set an error value and
1761 return FALSE if the reloc is not recognized.
1762 (elf_hppa_info_to_howto_rel): Likewise.
1763 * elf-m10200.c (mn10200_info_to_howto): Likewise.
1764 * elf-m10300.c (mn10300_info_to_howto): Likewise.
1765 * elf.c (_bfd_elf_no_info_to_howto): Likewise.
1766 * elf32-arc.c (arc_info_to_howto_rel): Likewise.
1767 * elf32-arm.c (elf32_arm_info_to_howto): Likewise.
1768 * elf32-avr.c (avr_info_to_howto_rela): Likewise.
1769 * elf32-bfin.c (bfin_info_to_howto): Likewise.
1770 * elf32-cr16.c (elf_cr16_info_to_howto): Likewise.
1771 * elf32-cr16c.c (elf_cr16c_info_to_howto): Likewise.
1772 * elf32-cris.c (elf_cr16c_info_to_howto_rel)
1773 (cris_info_to_howto_rela): Likewise.
1774 * elf32-crx.c (elf_crx_info_to_howto): Likewise.
1775 * elf32-d10v.c (d10v_info_to_howto_rel): Likewise.
1776 * elf32-d30v.c (d30v_info_to_howto_rel, d30v_info_to_howto_rela):
1778 * elf32-dlx.c (dlx_rtype_to_howto, elf32_dlx_info_to_howto)
1779 (elf32_dlx_info_to_howto_rel): Likewise.
1780 * elf32-epiphany.c (epiphany_info_to_howto_rela): Likewise.
1781 * elf32-fr30.c (fr30_info_to_howto_rela): Likewise.
1782 * elf32-frv.c (frv_info_to_howto_rela)
1783 (frvfdpic_info_to_howto_rel): Likewise.
1784 * elf32-ft32.c (ft32_info_to_howto_rela): Likewise.
1785 * elf32-gen.c (elf_generic_info_to_howto)
1786 (elf_generic_info_to_howto_rel): Likewise.
1787 * elf32-h8300.c (elf32_h8_info_to_howto)
1788 (elf32_h8_info_to_howto_rel): Likewise.
1789 * elf32-i370.c (i370_elf_info_to_howto): Likewise.
1790 * elf32-i386.c (elf_i386_reloc_type_lookup)
1791 (elf_i386_rtype_to_howto, elf_i386_info_to_howto_rel): Likewise.
1792 * elf32-i860.c (lookup_howto, elf32_i860_info_to_howto_rela):
1794 * elf32-i960.c (elf32_i960_info_to_howto_rel): Likewise.
1795 * elf32-ip2k.c (ip2k_info_to_howto_rela): Likewise.
1796 * elf32-iq2000.c (iq2000_info_to_howto_rela): Likewise.
1797 * elf32-lm32.c (lm32_info_to_howto_rela): Likewise.
1798 * elf32-m32c.c (m32c_info_to_howto_rela): Likewise.
1799 * elf32-m32r.c (m32r_info_to_howto_rel, m32r_info_to_howto):
1801 * elf32-m68hc11.c (m68hc11_info_to_howto_rel): Likewise.
1802 * elf32-m68hc12.c (m68hc11_info_to_howto_rel): Likewise.
1803 * elf32-m68k.c (rtype_to_howto): Likewise.
1804 * elf32-mcore.c (mcore_elf_info_to_howto): Likewise.
1805 * elf32-mep.c (mep_info_to_howto_rela): Likewise.
1806 * elf32-metag.c (metag_info_to_howto_rela): Likewise.
1807 * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise.
1808 * elf32-mips.c (mips_info_to_howto_rel, mips_info_to_howto_rela):
1810 * elf32-moxie.c (moxie_info_to_howto_rela): Likewise.
1811 * elf32-msp430.c (msp430_info_to_howto_rela): Likewise.
1812 * elf32-mt.c (mt_info_to_howto_rela): Likewise.
1813 * elf32-nds32.c (nds32_info_to_howto_rel, nds32_info_to_howto):
1815 * elf32-nios2.c (nios2_elf32_info_to_howto): Likewise.
1816 * elf32-or1k.c (or1k_info_to_howto_rela): Likewise.
1817 * elf32-pj.c (pj_elf_info_to_howto): Likewise.
1818 * elf32-ppc.c (ppc_elf_info_to_howto): Likewise.
1819 * elf32-pru.c (pru_elf32_info_to_howto): Likewise.
1820 * elf32-rl78.c (rl78_info_to_howto_rela): Likewise.
1821 * elf32-rx.c (rx_info_to_howto_rela): Likewise.
1822 * elf32-s390.c (elf_s390_info_to_howto): Likewise.
1823 * elf32-score.c (s3_bfd_score_info_to_howto)
1824 (_bfd_score_info_to_howto): Likewise.
1825 * elf32-score7.c (s7_bfd_score_info_to_howto): Likewise.
1826 * elf32-sh.c (sh_elf_info_to_howto): Likewise.
1827 * elf32-spu.c (spu_elf_info_to_howto): Likewise.
1828 * elf32-tic6x.c (elf32_tic6x_info_to_howto)
1829 (elf32_tic6x_info_to_howto_rel): Likewise.
1830 * elf32-tilepro.c (tilepro_info_to_howto_rela): Likewise.
1831 * elf32-v850.c (v850_elf_info_to_howto_rel)
1832 (v850_elf_info_to_howto_rela, v800_elf_info_to_howto): Likewise.
1833 * elf32-vax.c (rtype_to_howto): Likewise.
1834 * elf32-visium.c (visium_info_to_howto_rela): Likewise.
1835 * elf32-wasm32.c (elf32_wasm32_rtype_to_howto)
1836 (elf32_wasm32_info_to_howto_rela): Likewise.
1837 * elf32-xc16x.c (elf32_xc16x_info_to_howto): Likewise.
1838 * elf32-xgate.c (xgate_info_to_howto_rel): Likewise.
1839 * elf32-xstormy16.c (xstormy16_info_to_howto_rela): Likewise.
1840 * elf32-xtensa.c (elf_xtensa_info_to_howto_rela): Likewise.
1841 * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise.
1842 * elf64-gen.c (elf_generic_info_to_howto)
1843 (elf_generic_info_to_howto_rel): Likewise.
1844 * elf64-ia64-vms.c (elf64_ia64_info_to_howto): Likewise.
1845 * elf64-mips.c (mips_elf64_info_to_howto_rela): Likewise.
1846 * elf64-mmix.c (mmix_info_to_howto_rela): Likewise.
1847 * elf64-ppc.c (ppc64_elf_info_to_howto): Likewise.
1848 * elf64-s390.c (elf_s390_reloc_type_lookup): Likewise.
1849 * elf64-sh64.c (elf_s390_info_to_howto, sh_elf64_info_to_howto):
1851 * elf64-x86-64.c (elf_x86_64_info_to_howto): Likewise.
1852 * elfn32-mips.c (mips_info_to_howto_rel, mips_info_to_howto_rela):
1854 * elfnn-aarch64.c (elfNN_aarch64_info_to_howto): Likewise.
1855 * elfnn-ia64.c (elfNN_ia64_info_to_howto): Likewise.
1856 * elfnn-riscv.c (riscv_info_to_howto_rela): Likewise.
1857 * elfxx-ia64.c (ia64_elf_reloc_type_lookup): Likewise.
1858 * elfxx-sparc.c (_bfd_sparc_elf_info_to_howto): Likewise.
1859 * elfxx-tilegx.c (tilegx_info_to_howto_rela): Likewise.
1860 * elf32-score.h (s7_bfd_score_info_to_howto): Update prototype.
1861 * elfxx-sparc.h (_bfd_sparc_elf_info_to_howto): Update prototype.
1862 * elfxx-tilegx.h (tilegx_info_to_howto_rela): Update prototype.
1863 * elfxx-target.h (elf_info_to_howto, elf_info_to_howto_rel):
1866 2018-02-26 Jim Wilson <jimw@sifive.com>
1867 Stephan Schreiber <info@fs-driver.org>
1870 * elfnn-ia64.c (elfNN_ia64_relax_section): After ia64_elf_relax_brl
1871 call, set changed_contents and changed_relocs. Likewise after
1872 successful ia64_elf_relax_br call.
1874 2018-02-26 Alan Modra <amodra@gmail.com>
1876 * elf.c (assign_file_positions_except_relocs): Don't segfault
1877 when actual number of phdrs is less than allocated. Delete
1878 outdated comment. Formatting.
1880 2018-02-26 Alan Modra <amodra@gmail.com>
1882 * elf-m10300.c, * elf-s390-common.c, * elf32-arc.c, * elf32-cris.c,
1883 * elf32-dlx.c, * elf32-frv.c, * elf32-i370.c, * elf32-lm32.c,
1884 * elf32-m32r.c, * elf32-m68hc1x.c, * elf32-m68k.c,
1885 * elf32-microblaze.c, * elf32-msp430.c, * elf32-nds32.c,
1886 * elf32-nios2.c, * elf32-or1k.c, * elf32-rl78.c, * elf32-rx.c,
1887 * elf32-score.c, * elf32-score7.c, * elf32-sh-symbian.c,
1888 * elf32-sh.c, * elf32-spu.c, * elf32-v850.c, * elf32-xtensa.c,
1889 * elf64-alpha.c, * elf64-ia64-vms.c, * elf64-mmix.c,
1890 * elf64-sh64.c, * elf64-sparc.c, * elfnn-ia64.c, * elfxx-tilegx.c,
1891 * mmo.c, * osf-core.c, * srec.c, * vms-alpha.c: Standardize
1892 error/warning messages.
1894 2018-02-26 Alan Modra <amodra@gmail.com>
1896 * archive.c, * bfd.c, * linker.c, * reloc.c, * stabs.c,
1897 * syms.c: Standardize error/warning messages.
1899 2018-02-26 Alan Modra <amodra@gmail.com>
1901 * aout-adobe.c, * aout-cris.c, * i386linux.c, * m68klinux.c,
1902 * sparclinux.c, * coff-alpha.c, * coff-arm.c, * coff-mcore.c,
1903 * coffcode.h, * coffgen.c, * cofflink.c, * ecoff.c, * pe-mips.c,
1904 * peXXigen.c, * peicode.h: Standardize error/warning messages.
1906 2018-02-26 Alan Modra <amodra@gmail.com>
1908 * elf32-arm.c, * elfnn-aarch64.c: Standardize error/warning messages.
1910 2018-02-26 Alan Modra <amodra@gmail.com>
1912 * elfxx-mips.c: Standardize error/warning messages.
1914 2018-02-26 Alan Modra <amodra@gmail.com>
1916 * dwarf2.c, * elf-attrs.c, * elf-eh-frame.c, * elf.c, * elf32-gen.c,
1917 * elflink.c: Standardize error/warning messages. Replace use of
1918 linker callback einfo with _bfd_error_handler when possible.
1920 2018-02-26 Alan Modra <amodra@gmail.com>
1922 * aoutx.h, * coff-alpha.c, * coff-i860.c, * coff-m68k.c,
1923 * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c,
1924 * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-w65.c,
1925 * elf-bfd.h, * elf-m10300.c, * elf.c, * elf32-avr.c, * elf32-bfin.c,
1926 * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c,
1927 * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c,
1928 * elf32-fr30.c, * elf32-frv.c, * elf32-i370.c, * elf32-i386.c,
1929 * elf32-i960.c, * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c,
1930 * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c,
1931 * elf32-m68k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c,
1932 * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c,
1933 * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-or1k.c,
1934 * elf32-pj.c, * elf32-ppc.c, * elf32-rl78.c, * elf32-rx.c,
1935 * elf32-s390.c, * elf32-sh.c, * elf32-spu.c, * elf32-tic6x.c,
1936 * elf32-v850.c, * elf32-vax.c, * elf32-visium.c, * elf32-wasm32.c,
1937 * elf32-xgate.c, * elf32-xtensa.c, * elf64-alpha.c,
1938 * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c,
1939 * elf64-ppc.c, * elf64-s390.c, * elf64-sparc.c, * elf64-x86-64.c,
1940 * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c,
1941 * elfnn-riscv.c, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-riscv.h,
1942 * elfxx-sparc.c, * elfxx-sparc.h, * reloc.c: Standardize
1943 unrecognized/unsupported reloc message.
1945 2018-02-26 Alan Modra <amodra@gmail.com>
1947 * elf32-ppc.c: Standardize error/warning messages. Use
1948 _bfd_error_handler rather than einfo when einfo features not used.
1949 * elf64-ppc.c: Likewise.
1951 2018-02-23 Alan Modra <amodra@gmail.com>
1954 * elf.c (assign_file_positions_for_non_load_sections): Remove RELRO
1955 segment if no matching LOAD segment.
1957 2018-02-23 Kuan-Lin Chen <kuanlinchentw@gmail.com>
1959 * elf32-nds32.h: Define mask for ict_model.
1961 2018-02-20 Jason Duerstock <jason.duerstock@gmail.com>
1963 * elfnn-ia64.c (elf_backend_can_gc_sections): Enable.
1965 2018-02-19 Maciej W. Rozycki <macro@mips.com>
1968 2018-01-12 Vlad Ivanov <vlad@ivanov.email>
1970 * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when
1971 .reginfo section has wrong size.
1973 2018-02-19 Maciej W. Rozycki <macro@mips.com>
1975 * elfxx-mips.c (_bfd_mips_elf_always_size_sections): Set
1976 SEC_FIXED_SIZE and SEC_HAS_CONTENTS flags for `.reginfo' and
1977 `.MIPS.abiflags' sections.
1978 (_bfd_mips_elf_final_link): Avoid reading beyond `.reginfo'
1981 2018-02-19 Maciej W. Rozycki <macro@mips.com>
1983 * section.c (SEC_FIXED_SIZE): New macro.
1984 * bfd-in2.h: Regenerate.
1986 2018-02-19 Maciej W. Rozycki <macro@mips.com>
1988 * section.c (SEC_HAS_GOT_REF): Remove macro.
1989 * bfd-in2.h: Regenerate.
1991 2018-02-19 Alan Modra <amodra@gmail.com>
1993 * elf-attrs.c (_bfd_elf_parse_attributes): Correct _bfd_error_handler
1995 * elfxx-mips.c (_bfd_mips_elf_final_link): Likewise.
1996 * elfnn-riscv.c (_bfd_riscv_relax_align): Likewise.
1997 (_bfd_riscv_relax_pc): Likewise and fix typos.
1998 * libbfd-in.h (_bfd_error_handler): Add attribute printf.
1999 * libbfd.h: Regenerate.
2001 2018-02-19 Alan Modra <amodra@gmail.com>
2003 * dwarf2.c (read_section): Don't use 'll' format modifier.
2004 (find_abstract_instance): Likewise.
2005 * elfcore.h (elf_core_file_p): Likewise.
2007 2018-02-19 Alan Modra <amodra@gmail.com>
2009 * bfd-in.h: Include inttypes.h or if not available define
2010 PRId64, PRIu64 and PRIx64.
2011 * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Remove support for L
2012 modifier to print bfd_vma.
2013 * coff-arm.c, * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c,
2014 * coff-sh.c, * coff-tic80.c, * coffcode.h, * coffgen.c, * cofflink.c,
2015 * compress.c, * dwarf2.c, * elf-m10300.c, * elf.c, * elf32-arc.c,
2016 * elf32-arm.c, * elf32-bfin.c, * elf32-cris.c, * elf32-hppa.c,
2017 * elf32-i386.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32r.c,
2018 * elf32-m68k.c, * elf32-metag.c, * elf32-nds32.c, * elf32-nios2.c,
2019 * elf32-ppc.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c,
2020 * elf32-score7.c, * elf32-sh.c, * elf32-sh64.c, * elf32-spu.c,
2021 * elf32-tic6x.c, * elf32-tilepro.c, * elf32-v850.c, * elf32-vax.c,
2022 * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c,
2023 * elf64-mmix.c, * elf64-s390.c, * elf64-sh64.c, * elf64-x86-64.c,
2024 * elfcode.h, * elfcore.h, * elflink.c, * elfnn-aarch64.c,
2025 * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-mips.c, * elfxx-sparc.c,
2026 * elfxx-tilegx.c, * ieee.c, * ihex.c, * mach-o.c, * merge.c, * mmo.c,
2027 * peXXigen.c, * xcofflink.c: Replace use of Lx modifier with PRIx64,
2028 and cast input to uint64_t, and similarly for Ld and Lu.
2029 * bfd-in2.h: Regenerate.
2031 2018-02-19 Alan Modra <amodra@gmail.com>
2033 * elf32-arm.c, * elf32-hppa.c, * elf32-lm32.c, * elf32-m32r.c,
2034 * elf32-metag.c, * elf32-nds32.c, * elf32-or1k.c, * elf32-ppc.c,
2035 * elf32-s390.c, * elf32-sh.c, * elf32-tic6x.c, * elf32-tilepro.c,
2036 * elf64-ppc.c, * elf64-s390.c, * elflink.c, * elfnn-aarch64.c,
2037 * elfnn-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c,
2038 * reloc.c: Replace use of %R and %T in format strings passed to
2039 einfo and friends by %pR and %pT.
2041 2018-02-19 Alan Modra <amodra@gmail.com>
2043 * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Handle %pA and %pB in place
2045 * aout-adobe.c: Update all messages using %A and %B.
2046 * aout-cris.c: Likewise.
2047 * aoutx.h: Likewise.
2048 * archive.c: Likewise.
2049 * binary.c: Likewise.
2050 * cache.c: Likewise.
2051 * coff-alpha.c: Likewise.
2052 * coff-arm.c: Likewise.
2053 * coff-i860.c: Likewise.
2054 * coff-mcore.c: Likewise.
2055 * coff-ppc.c: Likewise.
2056 * coff-rs6000.c: Likewise.
2057 * coff-sh.c: Likewise.
2058 * coff-tic4x.c: Likewise.
2059 * coff-tic54x.c: Likewise.
2060 * coff-tic80.c: Likewise.
2061 * coff64-rs6000.c: Likewise.
2062 * coffcode.h: Likewise.
2063 * coffgen.c: Likewise.
2064 * cofflink.c: Likewise.
2065 * coffswap.h: Likewise.
2066 * compress.c: Likewise.
2067 * cpu-arm.c: Likewise.
2068 * ecoff.c: Likewise.
2069 * elf-attrs.c: Likewise.
2070 * elf-eh-frame.c: Likewise.
2071 * elf-ifunc.c: Likewise.
2072 * elf-m10300.c: Likewise.
2073 * elf-properties.c: Likewise.
2074 * elf-s390-common.c: Likewise.
2076 * elf32-arc.c: Likewise.
2077 * elf32-arm.c: Likewise.
2078 * elf32-avr.c: Likewise.
2079 * elf32-bfin.c: Likewise.
2080 * elf32-cr16.c: Likewise.
2081 * elf32-cr16c.c: Likewise.
2082 * elf32-cris.c: Likewise.
2083 * elf32-crx.c: Likewise.
2084 * elf32-d10v.c: Likewise.
2085 * elf32-d30v.c: Likewise.
2086 * elf32-epiphany.c: Likewise.
2087 * elf32-fr30.c: Likewise.
2088 * elf32-frv.c: Likewise.
2089 * elf32-gen.c: Likewise.
2090 * elf32-hppa.c: Likewise.
2091 * elf32-i370.c: Likewise.
2092 * elf32-i386.c: Likewise.
2093 * elf32-i960.c: Likewise.
2094 * elf32-ip2k.c: Likewise.
2095 * elf32-iq2000.c: Likewise.
2096 * elf32-lm32.c: Likewise.
2097 * elf32-m32c.c: Likewise.
2098 * elf32-m32r.c: Likewise.
2099 * elf32-m68hc11.c: Likewise.
2100 * elf32-m68hc12.c: Likewise.
2101 * elf32-m68hc1x.c: Likewise.
2102 * elf32-m68k.c: Likewise.
2103 * elf32-mcore.c: Likewise.
2104 * elf32-mep.c: Likewise.
2105 * elf32-metag.c: Likewise.
2106 * elf32-microblaze.c: Likewise.
2107 * elf32-moxie.c: Likewise.
2108 * elf32-msp430.c: Likewise.
2109 * elf32-mt.c: Likewise.
2110 * elf32-nds32.c: Likewise.
2111 * elf32-nios2.c: Likewise.
2112 * elf32-or1k.c: Likewise.
2113 * elf32-pj.c: Likewise.
2114 * elf32-ppc.c: Likewise.
2115 * elf32-rl78.c: Likewise.
2116 * elf32-rx.c: Likewise.
2117 * elf32-s390.c: Likewise.
2118 * elf32-score.c: Likewise.
2119 * elf32-score7.c: Likewise.
2120 * elf32-sh-symbian.c: Likewise.
2121 * elf32-sh.c: Likewise.
2122 * elf32-sh64.c: Likewise.
2123 * elf32-sparc.c: Likewise.
2124 * elf32-spu.c: Likewise.
2125 * elf32-tic6x.c: Likewise.
2126 * elf32-tilepro.c: Likewise.
2127 * elf32-v850.c: Likewise.
2128 * elf32-vax.c: Likewise.
2129 * elf32-visium.c: Likewise.
2130 * elf32-wasm32.c: Likewise.
2131 * elf32-xgate.c: Likewise.
2132 * elf32-xtensa.c: Likewise.
2133 * elf64-alpha.c: Likewise.
2134 * elf64-gen.c: Likewise.
2135 * elf64-hppa.c: Likewise.
2136 * elf64-ia64-vms.c: Likewise.
2137 * elf64-mmix.c: Likewise.
2138 * elf64-ppc.c: Likewise.
2139 * elf64-s390.c: Likewise.
2140 * elf64-sh64.c: Likewise.
2141 * elf64-sparc.c: Likewise.
2142 * elf64-x86-64.c: Likewise.
2143 * elfcode.h: Likewise.
2144 * elfcore.h: Likewise.
2145 * elflink.c: Likewise.
2146 * elfnn-aarch64.c: Likewise.
2147 * elfnn-ia64.c: Likewise.
2148 * elfnn-riscv.c: Likewise.
2149 * elfxx-mips.c: Likewise.
2150 * elfxx-sparc.c: Likewise.
2151 * elfxx-tilegx.c: Likewise.
2152 * elfxx-x86.c: Likewise.
2153 * hpux-core.c: Likewise.
2156 * libbfd.c: Likewise.
2157 * linker.c: Likewise.
2158 * mach-o.c: Likewise.
2159 * merge.c: Likewise.
2161 * oasys.c: Likewise.
2162 * pdp11.c: Likewise.
2163 * pe-mips.c: Likewise.
2164 * peXXigen.c: Likewise.
2165 * peicode.h: Likewise.
2166 * reloc.c: Likewise.
2167 * rs6000-core.c: Likewise.
2169 * stabs.c: Likewise.
2170 * vms-alpha.c: Likewise.
2171 * xcofflink.c: Likewise.
2173 2018-02-19 Alan Modra <amodra@gmail.com>
2176 * elf.c (IS_TBSS): Define.
2177 (_bfd_elf_map_sections_to_segments): Use IS_TBSS.
2178 (assign_file_positions_for_non_load_sections): Revert last change.
2179 Properly calculate load segment limits to compare against relro limits.
2181 2018-02-17 Alan Modra <amodra@gmail.com>
2184 * elf.c (assign_file_positions_for_non_load_sections): Ignore
2185 degenerate zero size PT_LOAD segments when finding one overlapping
2186 the PT_GNU_RELRO segment.
2188 2018-02-16 Alan Modra <amodra@gmail.com>
2190 * libbfd.c (_bfd_bool_bfd_false_error): Rename from bfd_false.
2191 (_bfd_bool_bfd_true): Rename from bfd_true.
2192 (_bfd_ptr_bfd_null_error): Rename from bfd_nullvoidptr.
2193 (_bfd_int_bfd_0): Rename from bfd_0.
2194 (_bfd_uint_bfd_0): Rename from bfd_0u.
2195 (_bfd_long_bfd_0): Rename from bfd_0l.
2196 (_bfd_long_bfd_n1_error): Rename from _bfd_n1.
2197 (_bfd_void_bfd): Rename from bfd_void.
2198 (_bfd_bool_bfd_false, _bfd_bool_bfd_asymbol_false),
2199 (_bfd_bool_bfd_link_false_error),
2200 (_bfd_bool_bfd_link_true, _bfd_bool_bfd_bfd_true),
2201 (_bfd_bool_bfd_uint_true, _bfd_bool_bfd_ptr_true),
2202 (_bfd_bool_bfd_asection_bfd_asection_true),
2203 (_bfd_bool_bfd_asymbol_bfd_asymbol_true),
2204 (_bfd_void_bfd_link, _bfd_void_bfd_asection): New functions.
2205 * archive.c (_bfd_noarchive_get_elt_at_index),
2206 (_bfd_noarchive_openr_next_archived_file),
2207 (_bfd_noarchive_construct_extended_name_table),
2208 (_bfd_noarchive_write_ar_hdr, _bfd_noarchive_truncate_arname),
2209 (_bfd_noarchive_write_armap): New functions.
2210 * archures.c (_bfd_nowrite_set_arch_mach): New function.
2211 * coff-alpha.c (alpha_ecoff_swap_coff_aux_in),
2212 (alpha_ecoff_swap_coff_sym_in, alpha_ecoff_swap_coff_lineno_in),
2213 (alpha_ecoff_swap_coff_aux_out, alpha_ecoff_swap_coff_sym_out),
2214 (alpha_ecoff_swap_coff_lineno_out),
2215 (alpha_ecoff_swap_coff_reloc_out): New functions.
2216 * coff-mips.c (mips_ecoff_swap_coff_aux_in),
2217 (mips_ecoff_swap_coff_sym_in, mips_ecoff_swap_coff_lineno_in),
2218 (mips_ecoff_swap_coff_aux_out, mips_ecoff_swap_coff_sym_out),
2219 (mips_ecoff_swap_coff_lineno_out),
2220 (mips_ecoff_swap_coff_reloc_out): New functions.
2221 * coffcode.h (coff_set_alignment_hook): Replace define with
2223 (symname_in_debug_hook): Likewise.
2224 * ecoff.c (_bfd_ecoff_set_alignment_hook): New function.
2225 * elfxx-target.h (elf_backend_allow_non_load_phdr): Default to 0.
2226 * elf.c (assign_file_positions_except_relocs): Test
2227 elf_backend_allow_non_load_phdr for NULL.
2228 * elflink.c (_bfd_elf_omit_section_dynsym_default): Rename from
2229 _bfd_elf_link_omit_section_dynsym. Update uses.
2230 (_bfd_elf_omit_section_dynsym_all): New function.
2231 * elf-bfd.h (_bfd_elf_link_omit_section_dynsym): Delete.
2232 (_bfd_elf_omit_section_dynsym_default): Declare.
2233 (_bfd_elf_omit_section_dynsym_all): Declare.
2234 * linker.c (_bfd_nolink_sizeof_headers, _bfd_nolink_bfd_relax_section),
2235 (_bfd_nolink_bfd_get_relocated_section_contents),
2236 (_bfd_nolink_bfd_lookup_section_flags),
2237 (_bfd_nolink_bfd_is_group_section, _bfd_nolink_bfd_discard_group),
2238 (_bfd_nolink_bfd_link_hash_table_create),
2239 (_bfd_nolink_bfd_link_just_syms),
2240 (_bfd_nolink_bfd_copy_link_hash_symbol_type),
2241 (_bfd_nolink_bfd_link_split_section),
2242 (_bfd_nolink_section_already_linked),
2243 (_bfd_nolink_bfd_define_common_symbol),
2244 (_bfd_nolink_bfd_define_start_stop): New functions.
2245 * reloc.c (_bfd_norelocs_bfd_reloc_type_lookup),
2246 (_bfd_norelocs_bfd_reloc_name_lookup),
2247 (_bfd_nodynamic_canonicalize_dynamic_reloc): New functions.
2248 * section.c (_bfd_nowrite_set_section_contents): New function.
2249 * syms.c (_bfd_nosymbols_canonicalize_symtab),
2250 (_bfd_nosymbols_print_symbol, _bfd_nosymbols_get_symbol_info),
2251 (_bfd_nosymbols_get_symbol_version_string),
2252 (_bfd_nosymbols_bfd_is_local_label_name),
2253 (_bfd_nosymbols_get_lineno, _bfd_nosymbols_find_nearest_line),
2254 (_bfd_nosymbols_find_line, _bfd_nosymbols_find_inliner_info),
2255 (_bfd_nosymbols_bfd_make_debug_symbol),
2256 ( _bfd_nosymbols_read_minisymbols),
2257 ( _bfd_nosymbols_minisymbol_to_symbol),
2258 (_bfd_nodynamic_get_synthetic_symtab): New functions.
2259 * libbfd-in.h: Declare new functions. Update existing defines,
2261 * aix386-core.c: Update to use new hooks. Formatting.
2262 * aout-adobe.c: Likewise.
2263 * aout-arm.c: Likewise.
2264 * aout-target.h: Likewise.
2265 * aout-tic30.c: Likewise.
2266 * aoutf1.h: Likewise.
2267 * binary.c: Likewise.
2269 * cisco-core.c: Likewise.
2270 * coff-alpha.c: Likewise.
2271 * coff-i386.c: Likewise.
2272 * coff-i860.c: Likewise.
2273 * coff-i960.c: Likewise.
2274 * coff-ia64.c: Likewise.
2275 * coff-mips.c: Likewise.
2276 * coff-ppc.c: Likewise.
2277 * coff-rs6000.c: Likewise.
2278 * coff-sh.c: Likewise.
2279 * coff-tic30.c: Likewise.
2280 * coff-tic54x.c: Likewise.
2281 * coff-x86_64.c: Likewise.
2282 * coff64-rs6000.c: Likewise.
2283 * coffcode.h: Likewise.
2284 * elf-m10300.c: Likewise.
2285 * elf32-cr16.c: Likewise.
2286 * elf32-lm32.c: Likewise.
2287 * elf32-m32r.c: Likewise.
2288 * elf32-metag.c: Likewise.
2289 * elf32-score.c: Likewise.
2290 * elf32-score7.c: Likewise.
2291 * elf32-tilepro.c: Likewise.
2292 * elf32-xstormy16.c: Likewise.
2293 * elf32-xtensa.c: Likewise.
2294 * elf64-alpha.c: Likewise.
2295 * elf64-hppa.c: Likewise.
2296 * elf64-ia64-vms.c: Likewise.
2297 * elf64-mmix.c: Likewise.
2298 * elf64-sh64.c: Likewise.
2299 * elfnn-ia64.c: Likewise.
2300 * elfxx-sparc.c: Likewise.
2301 * elfxx-target.h: Likewise.
2302 * elfxx-tilegx.c: Likewise.
2303 * elfxx-x86.h: Likewise.
2304 * hp300hpux.c: Likewise.
2305 * hppabsd-core.c: Likewise.
2306 * hpux-core.c: Likewise.
2307 * i386msdos.c: Likewise.
2308 * i386os9k.c: Likewise.
2311 * irix-core.c: Likewise.
2312 * libaout.h: Likewise.
2313 * libecoff.h: Likewise.
2314 * mach-o-target.c: Likewise.
2315 * mach-o.c: Likewise.
2316 * mipsbsd.c: Likewise.
2318 * netbsd-core.c: Likewise.
2319 * nlm-target.h: Likewise.
2320 * oasys.c: Likewise.
2321 * osf-core.c: Likewise.
2322 * pdp11.c: Likewise.
2323 * pe-mips.c: Likewise.
2324 * pe-x86_64.c: Likewise.
2326 * plugin.c: Likewise.
2327 * ppcboot.c: Likewise.
2328 * ptrace-core.c: Likewise.
2329 * sco5-core.c: Likewise.
2331 * sparclynx.c: Likewise.
2333 * tekhex.c: Likewise.
2334 * trad-core.c: Likewise.
2335 * verilog.c: Likewise.
2336 * versados.c: Likewise.
2337 * vms-alpha.c: Likewise.
2338 * vms-lib.c: Likewise.
2339 * wasm-module.c: Likewise.
2341 * libbfd.h: Regenerate.
2343 2018-02-15 Jim Wilson <jimw@sifive.com>
2345 * elfnn-riscv.c (_bfd_riscv_relax_section): Ifdef out check to ignore
2346 symbols whose section address is zero.
2348 * elfnn-riscv.c (riscv_elf_relocate_section): Use bfd_reloc_dangerous
2349 when pcrel_lo reloc has an addend. Use reloc_dangerous callback for
2350 bfd_reloc_dangerous. Use einfo instead of warning callback for errors.
2351 Add %X%P to error messages.
2353 2018-02-15 Eric Botcazou <ebotcazou@adacore.com>
2356 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
2357 Pass FALSE instead of TRUE as 'create' argument to bfd_link_hash_lookup
2358 and assert that the result of the call is not NULL.
2360 2018-02-14 Nick Clifton <nickc@redhat.com>
2363 Revert previous delta. Add extra casts to avoid compile time
2365 * libbfd-in.h (_bfd_generic_bfd_copy_private_bfd_data): Add extra
2366 cast to avoid warning from gcc v8 compiler.
2367 (_bfd_generic_bfd_merge_private_bfd_data): Likewise.
2368 (_bfd_generic_bfd_set_private_flags): Likewise.
2369 (_bfd_generic_bfd_copy_private_section_data): Likewise.
2370 (_bfd_generic_bfd_copy_private_symbol_data): Likewise.
2371 (_bfd_generic_bfd_copy_private_header_data): Likewise.
2372 (_bfd_generic_bfd_print_private_bfd_data): Likewise.
2373 (_bfd_noarchive_construct_extended_name_table): Likewise.
2374 (_bfd_noarchive_truncate_arname): Likewise.
2375 (_bfd_noarchive_write_ar_hdr): Likewise.
2376 (_bfd_noarchive_get_elt_at_index): Likewise.
2377 (_bfd_nosymbols_canonicalize_symtab): Likewise.
2378 (_bfd_nosymbols_print_symbol): Likewise.
2379 (_bfd_nosymbols_get_symbol_info): Likewise.
2380 (_bfd_nosymbols_get_symbol_version_string): Likewise.
2381 (_bfd_nosymbols_bfd_is_local_label_name): Likewise.
2382 (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise.
2383 (_bfd_nosymbols_get_lineno): Likewise.
2384 (_bfd_nosymbols_find_nearest_line): Likewise.
2385 (_bfd_nosymbols_find_line): Likewise.
2386 (_bfd_nosymbols_find_inliner_info): Likewise.
2387 (_bfd_nosymbols_bfd_make_debug_symbol): Likewise.
2388 (_bfd_nosymbols_read_minisymbols): Likewise.
2389 (_bfd_nosymbols_minisymbol_to_symbol): Likewise.
2390 (_bfd_norelocs_bfd_reloc_type_lookup): Likewise.
2391 (_bfd_norelocs_bfd_reloc_name_lookup): Likewise.
2392 (_bfd_nowrite_set_arch_mach): Likewise.
2393 (_bfd_nowrite_set_section_contents): Likewise.
2394 (_bfd_nolink_sizeof_headers): Likewise.
2395 (_bfd_nolink_bfd_get_relocated_section_contents): Likewise.
2396 (_bfd_nolink_bfd_relax_section): Likewise.
2397 (_bfd_nolink_bfd_gc_sections): Likewise.
2398 (_bfd_nolink_bfd_lookup_section_flags): Likewise.
2399 (_bfd_nolink_bfd_merge_sections): Likewise.
2400 (_bfd_nolink_bfd_is_group_section): Likewise.
2401 (_bfd_nolink_bfd_discard_group): Likewise.
2402 (_bfd_nolink_bfd_link_hash_table_create): Likewise.
2403 (_bfd_nolink_bfd_link_add_symbols): Likewise.
2404 (_bfd_nolink_bfd_link_just_syms): Likewise.
2405 (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise.
2406 (_bfd_nolink_bfd_final_link): Likewise.
2407 (_bfd_nolink_bfd_link_split_section): Likewise.
2408 (_bfd_nolink_section_already_linked): Likewise.
2409 (_bfd_nolink_bfd_define_common_symbol): Likewise.
2410 (_bfd_nolink_bfd_define_start_stop): Likewise.
2411 (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise.
2412 (_bfd_nodynamic_get_synthetic_symtab): Likewise.
2413 (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise.
2414 (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise.
2415 * libbfd.c (bfd_false_any): Delete.
2416 (bfd_true_any, bfd_nullvoidptr_any, bfd_0_any): Delete.
2417 (bfd_0u_any, bfd_0l_any, _bfd_n1_any, bfd_void_any): Delete.
2418 * libbfd.h (extern): Regenerate
2419 * aout-target.h (MY_bfd_is_target_special_symbol): Add extra
2420 cast to avoid warning from gcc v8 compiler.
2421 * aout-tic30.c (tic30_aout_set_arch_mach): Likewise.
2422 * binary.c (binary_get_symbol_info): Likewise.
2423 * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
2424 * coff-mips.c (mips_ecoff_backend_data): Likewise.
2425 * coffcode.h (coff_set_alignment_hook): Likewise.
2426 (symname_in_debug_hook): Likewise.
2427 (bfd_coff_backend_data bigobj_swap_table): Likewise.
2428 * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise.
2429 * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise.
2430 * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise.
2431 * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise.
2432 * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise.
2433 * elf32-score.c (elf_backend_omit_section_dynsym): Likewise.
2434 * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise.
2435 * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise.
2436 * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise.
2437 * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise.
2438 * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise.
2439 * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise.
2440 * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise.
2441 * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise.
2442 * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise.
2443 * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise.
2444 (bfd_elfNN_bfd_make_debug_symbol): Likewise.
2445 (bfd_elfNN_bfd_merge_private_bfd_data): Likewise.
2446 (bfd_elfNN_bfd_set_private_flags): Likewise.
2447 (bfd_elfNN_bfd_is_target_special_symbol): Likewise.
2448 (elf_backend_init_index_section): Likewise.
2449 (elf_backend_allow_non_load_phdr): Likewise.
2450 * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise.
2451 * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise.
2452 * ieee.c (ieee_construct_extended_name_table): Likewise.
2453 (ieee_write_armap): Likewise.
2454 (ieee_write_ar_hdr): Likewise.
2455 (ieee_bfd_is_target_special_symbol): Likewise.
2456 * ihex.c (ihex_canonicalize_symtab): Likewise.
2457 (ihex_bfd_is_target_special_symbol): Likewise.
2458 * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise.
2459 * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise.
2460 (_bfd_ecoff_set_alignment_hook): Likewise.
2461 * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise.
2462 * mmo.c (mmo_bfd_is_target_special_symbol): Likewise.
2463 * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise.
2464 * oasys.c (oasys_construct_extended_name_table): Likewise.
2465 (oasys_write_armap): Likewise.
2466 (oasys_write_ar_hdr): Likewise.
2467 (oasys_bfd_is_target_special_symbol): Likewise.
2468 * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise.
2469 * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise.
2470 * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise.
2471 * som.c (som_bfd_is_target_special_symbol): Likewise.
2472 * srec.c (srec_bfd_is_target_special_symbol): Likewise.
2473 * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise.
2474 * verilog.c (verilog_bfd_is_target_special_symbol): Likewise.
2475 * versados.c (versados_bfd_is_target_special_symbol): Likewise.
2476 (versados_bfd_reloc_name_lookup): Likewise.
2477 * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise.
2478 (vms_bfd_define_start_stop): Likewise.
2479 (alpha_vms_bfd_is_target_special_symbol): Likewise.
2480 * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise.
2481 * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise.
2483 2018-02-14 H.J. Lu <hongjiu.lu@intel.com>
2486 * elf32-i386.c (elf_i386_check_relocs): Pass FALSE for non
2487 PC-relative PLT to NEED_DYNAMIC_RELOCATION_P.
2488 * elf64-x86-64.c (elf_x86_64_check_relocs): Create PLT for
2489 R_X86_64_PC32 reloc against dynamic function in data section.
2490 Pass TRUE for PC-relative PLT to NEED_DYNAMIC_RELOCATION_P.
2491 (elf_x86_64_relocate_section): Use PLT for R_X86_64_PC32 reloc
2492 against dynamic function in data section.
2493 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Use PLT in PIE as
2494 function address only if pcrel_plt is true.
2495 (_bfd_x86_elf_link_hash_table_create): Set pcrel_plt.
2496 * elfxx-x86.h (NEED_DYNAMIC_RELOCATION_P): Add PCREL_PLT for
2497 PC-relative PLT. If PLT is PC-relative, don't generate dynamic
2498 PC-relative relocation against a function definition in data
2499 secton in PIE. Remove the obsolete comments.
2500 (elf_x86_link_hash_table): Add pcrel_plt.
2502 2018-02-13 H.J. Lu <hongjiu.lu@intel.com>
2504 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Check bfd_link_dll,
2505 instead of bfd_link_pic, for building shared library.
2507 2018-02-13 H.J. Lu <hongjiu.lu@intel.com>
2510 * elf64-x86-64.c (is_32bit_relative_branch): Removed.
2511 (elf_x86_64_relocate_section): Check PIC relocations in PIE.
2512 Remove is_32bit_relative_branch usage. Disallow PC32 reloc
2513 against protected function in shared object.
2515 2018-02-13 Sergei Trofimovich <slyfox@inbox.ru>
2518 * po/ru.po: Fix typo in Russian translation.
2520 2018-02-13 Maciej W. Rozycki <macro@mips.com>
2522 * wasm-module.c (wasm_scan_name_function_section): Rename
2523 `index' local variable to `idx'.
2525 2018-02-13 Nick Clifton <nickc@redhat.com>
2528 Fix compile time warnings generated by gcc version 8.
2529 * libbfd-in.h: Remove extraneous text from prototypes.
2530 Add prototypes for bfd_false_any, bfd_true_any,
2531 bfd_nullvoidptr_any, bfd_0_any, bfd_0u_any, bfd_0l_any,
2532 bfd_n1_any, bfd_void_any.
2533 (_bfd_generic_bfd_copy_private_bfd_data): Use vararg based dummy
2535 (_bfd_generic_bfd_merge_private_bfd_data): Likewise.
2536 (_bfd_generic_bfd_set_private_flags): Likewise.
2537 (_bfd_generic_bfd_copy_private_section_data): Likewise.
2538 (_bfd_generic_bfd_copy_private_symbol_data): Likewise.
2539 (_bfd_generic_bfd_copy_private_header_data): Likewise.
2540 (_bfd_generic_bfd_print_private_bfd_data): Likewise.
2541 (_bfd_noarchive_construct_extended_name_table): Likewise.
2542 (_bfd_noarchive_truncate_arname): Likewise.
2543 (_bfd_noarchive_write_ar_hdr): Likewise.
2544 (_bfd_noarchive_get_elt_at_index): Likewise.
2545 (_bfd_nosymbols_canonicalize_symtab): Likewise.
2546 (_bfd_nosymbols_print_symbol): Likewise.
2547 (_bfd_nosymbols_get_symbol_info): Likewise.
2548 (_bfd_nosymbols_get_symbol_version_string): Likewise.
2549 (_bfd_nosymbols_bfd_is_local_label_name): Likewise.
2550 (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise.
2551 (_bfd_nosymbols_get_lineno): Likewise.
2552 (_bfd_nosymbols_find_nearest_line): Likewise.
2553 (_bfd_nosymbols_find_line): Likewise.
2554 (_bfd_nosymbols_find_inliner_info): Likewise.
2555 (_bfd_nosymbols_bfd_make_debug_symbol): Likewise.
2556 (_bfd_nosymbols_read_minisymbols): Likewise.
2557 (_bfd_nosymbols_minisymbol_to_symbol): Likewise.
2558 (_bfd_norelocs_bfd_reloc_type_lookup): Likewise.
2559 (_bfd_norelocs_bfd_reloc_name_lookup): Likewise.
2560 (_bfd_nowrite_set_arch_mach): Likewise.
2561 (_bfd_nowrite_set_section_contents): Likewise.
2562 (_bfd_nolink_sizeof_headers): Likewise.
2563 (_bfd_nolink_bfd_get_relocated_section_contents): Likewise.
2564 (_bfd_nolink_bfd_relax_section): Likewise.
2565 (_bfd_nolink_bfd_gc_sections): Likewise.
2566 (_bfd_nolink_bfd_lookup_section_flags): Likewise.
2567 (_bfd_nolink_bfd_merge_sections): Likewise.
2568 (_bfd_nolink_bfd_is_group_section): Likewise.
2569 (_bfd_nolink_bfd_discard_group): Likewise.
2570 (_bfd_nolink_bfd_link_hash_table_create): Likewise.
2571 (_bfd_nolink_bfd_link_add_symbols): Likewise.
2572 (_bfd_nolink_bfd_link_just_syms): Likewise.
2573 (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise.
2574 (_bfd_nolink_bfd_final_link): Likewise.
2575 (_bfd_nolink_bfd_link_split_section): Likewise.
2576 (_bfd_nolink_section_already_linked): Likewise.
2577 (_bfd_nolink_bfd_define_common_symbol): Likewise.
2578 (_bfd_nolink_bfd_define_start_stop): Likewise.
2579 (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise.
2580 (_bfd_nodynamic_get_synthetic_symtab): Likewise.
2581 (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise.
2582 (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise.
2583 * libbfd.c (bfd_false_any): New function. Like bfd_false but
2584 accepts one or more arguments.
2585 (bfd_true_any): Likewise.
2586 (bfd_nullvoidptr_any): Likewise.
2587 (bfd_0_any): Likewise.
2588 (bfd_0u_any): Likewise.
2589 (bfd_0l_any): Likewise.
2590 (_bfd_n1_any): Likewise.
2591 (bfd_void_any): Likewise.
2592 * libbfd.h (extern): Regenerate
2593 * aout-target.h (MY_bfd_is_target_special_symbol): Use vararg
2594 based dummy function.
2595 * aout-tic30.c (tic30_aout_set_arch_mach): Likewise.
2596 * binary.c (binary_get_symbol_info): Likewise.
2597 * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
2598 * coff-mips.c (mips_ecoff_backend_data): Likewise.
2599 * coffcode.h (coff_set_alignment_hook): Likewise.
2600 (symname_in_debug_hook): Likewise.
2601 (bfd_coff_backend_data bigobj_swap_table): Likewise.
2602 * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise.
2603 * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise.
2604 * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise.
2605 * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise.
2606 * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise.
2607 * elf32-score.c (elf_backend_omit_section_dynsym): Likewise.
2608 * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise.
2609 * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise.
2610 * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise.
2611 * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise.
2612 * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise.
2613 * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise.
2614 * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise.
2615 * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise.
2616 * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise.
2617 * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise.
2618 (bfd_elfNN_bfd_make_debug_symbol): Likewise.
2619 (bfd_elfNN_bfd_merge_private_bfd_data): Likewise.
2620 (bfd_elfNN_bfd_set_private_flags): Likewise.
2621 (bfd_elfNN_bfd_is_target_special_symbol): Likewise.
2622 (elf_backend_init_index_section): Likewise.
2623 (elf_backend_allow_non_load_phdr): Likewise.
2624 * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise.
2625 * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise.
2626 * ieee.c (ieee_construct_extended_name_table): Likewise.
2627 (ieee_write_armap): Likewise.
2628 (ieee_write_ar_hdr): Likewise.
2629 (ieee_bfd_is_target_special_symbol): Likewise.
2630 * ihex.c (ihex_canonicalize_symtab): Likewise.
2631 (ihex_bfd_is_target_special_symbol): Likewise.
2632 * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise.
2633 * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise.
2634 (_bfd_ecoff_set_alignment_hook): Likewise.
2635 * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise.
2636 * mmo.c (mmo_bfd_is_target_special_symbol): Likewise.
2637 * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise.
2638 * oasys.c (oasys_construct_extended_name_table): Likewise.
2639 (oasys_write_armap): Likewise.
2640 (oasys_write_ar_hdr): Likewise.
2641 (oasys_bfd_is_target_special_symbol): Likewise.
2642 * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise.
2643 * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise.
2644 * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise.
2645 * som.c (som_bfd_is_target_special_symbol): Likewise.
2646 * srec.c (srec_bfd_is_target_special_symbol): Likewise.
2647 * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise.
2648 * verilog.c (verilog_bfd_is_target_special_symbol): Likewise.
2649 * versados.c (versados_bfd_is_target_special_symbol): Likewise.
2650 (versados_bfd_reloc_name_lookup): Likewise.
2651 * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise.
2652 (vms_bfd_define_start_stop): Likewise.
2653 (alpha_vms_bfd_is_target_special_symbol): Likewise.
2654 * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise.
2655 * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise.
2656 * elf32-arc.c (get_replace_function): Assign replacement function
2658 * elf32-i370.c (i370_noop): Update prototype.
2660 2018-02-13 Alan Modra <amodra@gmail.com>
2663 * elf.c (_bfd_elf_fixup_group_sections): Account for removed
2664 relocation sections. If size reduces to just the flag word,
2665 remove that too and mark with SEC_EXCLUDE.
2666 * elflink.c (bfd_elf_final_link): Strip empty group sections.
2668 2018-02-13 Alan Modra <amodra@gmail.com>
2671 * elf.c (assign_file_positions_for_non_load_sections): Rewrite
2674 2018-02-12 Zebediah Figura <z.figura12@gmail.com>
2676 * i386msdos.c (msdos_mkobject); New function.
2677 (msdos_object_p): New function.
2678 (i386_msdos_vec): Use msdos_object_p as the check_format
2680 * peicode.h: Rename external_PEI_DOS_hdr, DOSMAGIC, and
2681 NT_SIGNATURE to external_DOS_hdr, IMAGE_DOS_SIGNATURE, and
2683 * peXXigen.c: Likewise.
2684 * coff-ia64.c: Likewise.
2686 2018-02-12 Nick Clifton <nickc@redhat.com>
2688 * elf32-nds32.c (nds32_elf_relax_longjump3): Remove redundant
2690 * elf32-arc.c (elf_arc_relocate_section): Likewise.
2692 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
2694 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Reorder conditions.
2695 (sparc_elf_append_rela): Assert that there is enough room in section.
2696 (_bfd_sparc_elf_copy_indirect_symbol): Fix formatting.
2697 (_bfd_sparc_elf_adjust_dynamic_symbol): Minor tweak.
2698 (allocate_dynrelocs): Remove outdated comments and reorder conditions.
2699 For a symbol subject to a GOT relocation, reserve a slot in the
2700 relocation section if the symbol isn't dynamic and we are in PIC mode.
2701 (_bfd_sparc_elf_relocate_section) <R_SPARC_GOTDATA_OP>: If relocation
2702 is relaxed and a slot was reserved, generate a R_SPARC_NONE relocation.
2703 <R_SPARC_GOTDATA_OP_HIX22>: Adjust comments.
2704 <R_SPARC_PC10>: Reorder conditions. Remove always-false assertion.
2705 (_bfd_sparc_elf_finish_dynamic_symbol): Rename local_undefweak into
2706 resolved_to_zero. Do not generate a dynamic GOT relocation for an
2707 undefined weak symbol with non-default visibility. Remove superfluous
2708 'else' and fix formatting.
2710 2018-02-09 H.J. Lu <hongjiu.lu@intel.com>
2712 * elf32-i386.c (elf_i386_get_synthetic_symtab): Also handle
2714 (i386_elf32_sol2_vec): Don't declare.
2715 (elf_i386_link_setup_gnu_properties): Also handle is_solaris.
2716 Don't set need_global_offset_table.
2717 (elf_i386_solaris_arch_bed): New.
2718 (elf_backend_arch_data): Set to elf_i386_solaris_arch_bed for
2720 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Check
2721 target_os != is_nacl instead of target_os == is_normal.
2722 (x86_64_elf64_sol2_vec): Don't declare.
2723 (elf_x86_64_link_setup_gnu_properties): Check target_os !=
2724 is_nacl instead of target_os == is_normal. Don't set
2725 need_global_offset_table.
2726 (elf_x86_64_solaris_arch_bed): New.
2727 (elf_backend_arch_data): Set to elf_x86_64_solaris_arch_bed for
2729 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep
2730 _GLOBAL_OFFSET_TABLE_ for Solaris.
2731 (_bfd_x86_elf_link_setup_gnu_properties): Don't copy
2732 need_global_offset_table.
2733 * elfxx-x86.h (elf_x86_target_os): Add is_solaris.
2734 (elf_x86_link_hash_table): Remove need_global_offset_table.
2735 (elf_x86_init_table): Likewise.
2737 2018-02-08 H.J. Lu <hongjiu.lu@intel.com>
2739 * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
2741 (i386_elf32_sol2_vec): Declared.
2742 (elf_i386_link_setup_gnu_properties): Set
2743 need_global_offset_table with info->output_bfd->xvec.
2744 * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
2746 (x86_64_elf64_sol2_vec): Declared.
2747 (elf_x86_64_link_setup_gnu_properties): Set
2748 need_global_offset_table with info->output_bfd->xvec.
2750 2018-02-08 H.J. Lu <hongjiu.lu@intel.com>
2752 * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
2754 (elf_i386_link_setup_gnu_properties): Set need_global_offset_table
2756 * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
2758 (elf_x86_64_link_setup_gnu_properties): Set
2759 need_global_offset_table for Solaris.
2760 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep the
2761 unused _GLOBAL_OFFSET_TABLE_ for Solaris.
2762 (_bfd_x86_elf_link_setup_gnu_properties): Copy
2763 need_global_offset_table.
2764 * elfxx-x86.h (elf_x86_link_hash_table): Add
2765 need_global_offset_table.
2766 (elf_x86_init_table): Likewise.
2768 2018-02-08 Jim Wilson <jimw@sifive.com>
2770 * elfnn-riscv.c (riscv_elf_relocate_section): Add comment for previous
2773 2018-02-08 Nick Clifton <nickc@redhat.com>
2776 * elf.c (elf_parse_notes): Reject notes with excessuively large
2779 2018-02-07 Alan Modra <amodra@gmail.com>
2781 Revert 2018-01-17 Alan Modra <amodra@gmail.com>
2782 * elf32-ppc.c: Remove speculation barrier support.
2783 * elf32-ppc.h: Likewise.
2784 * elf64-ppc.c: Likewise.
2785 * elf64-ppc.h: Likewise.
2787 2018-02-06 Jim Wilson <jimw@sifive.com>
2789 * elfnn-riscv.c (riscv_elf_relocate_section): Return TRUE if used
2790 callback to report an error.
2792 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
2795 * elfxx-sparc.c (sparc_elf_tls_transition): Turn call to bfd_link_pic
2796 into call to !bfd_link_executable and tidy up.
2797 (_bfd_sparc_elf_check_relocs): Fix formatting and tidy up.
2798 <R_SPARC_TLS_LE_HIX22>: Turn call to bfd_link_pic into call to
2799 !bfd_link_executable.
2800 <R_SPARC_TLS_IE_HI22>: Likewise.
2801 <GOT relocations>: Remove useless code, tidy and merge related blocks.
2802 <R_SPARC_TLS_GD_CALL>: Turn call to bfd_link_pic into call to
2803 !bfd_link_executable.
2804 <R_SPARC_WPLT30>: Tidy up.
2805 (_bfd_sparc_elf_gc_mark_hook): Turn call to bfd_link_pic into call to
2806 !bfd_link_executable.
2807 (allocate_dynrelocs): Likewise.
2808 (_bfd_sparc_elf_relocate_section): Fix formatting and tidy up.
2809 <R_SPARC_TLS_GD_HI22>: Merge into...
2810 <R_SPARC_TLS_GD_LO10>: ...this. Adjust 4th argument in call to
2811 sparc_elf_tls_transition and remove redundant code.
2812 <R_SPARC_TLS_LDM_HI22>: Turn call to bfd_link_pic into call to
2813 !bfd_link_executable.
2814 <R_SPARC_TLS_LDO_HIX22>: Likewise.
2815 <R_SPARC_TLS_LE_HIX22>: Likewise. Tidy up.
2816 <R_SPARC_TLS_LDM_CALL>: Likewise.
2817 <R_SPARC_TLS_GD_CALL>: Likewise. Tidy up.
2818 <R_SPARC_TLS_GD_ADD>: Likewise.
2819 <R_SPARC_TLS_LDM_ADD>: Likewise.
2820 <R_SPARC_TLS_LDO_ADD>: Likewise.
2821 <R_SPARC_TLS_IE_LD>: Likewise.
2823 2018-02-06 Miloš Stojanović <milos.stojanovic@rt-rk.com>
2826 * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): If the dwarf
2827 functions failed to find the function name, try the generic elf
2828 find function instead.
2830 2018-02-06 Sergio Durigan Junior <sergiodj@redhat.com>
2832 * coff-rs6000.c (xcoff_write_archive_contents_old): Use
2833 'memcpy' instead of 'strncpy' when writing the magic number.
2835 2018-02-06 Nick Clifton <nickc@redhat.com>
2838 * opncls.c (bfd_get_debug_link_info_1): Check the size of the
2839 section before attempting to read it in.
2840 (bfd_get_alt_debug_link_info): Likewise.
2842 2018-02-06 Paul Carroll <pcarroll@codesourcery.com>
2844 * bfd/dwarf2.c (find_abstract_name): Modified to return file and
2845 line information in addition to name, if they can be found.
2847 2018-02-05 Renlin Li <renlin.li@arm.com>
2850 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Relax the
2851 R_AARCH64_ABS32 and R_AARCH64_ABS16 for absolute symbol. Apply the
2852 check for writeable section as well.
2854 2018-02-05 H.J. Lu <hongjiu.lu@intel.com>
2857 * elf32-i386.c (elf_i386_check_relocs): Set got_referenced if
2858 _GLOBAL_OFFSET_TABLE_ is referenced or GOT is needed to resolve
2859 undefined weak symbol to 0.
2860 * elf64-x86-64.c (elf_x86_64_check_relocs): Set got_referenced
2861 if _GLOBAL_OFFSET_TABLE_ is referenced.
2862 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Check
2863 got_referenced instead of ref_regular_nonweak. Remove the
2864 unused _GLOBAL_OFFSET_TABLE_ from symbol table.
2865 * elfxx-x86.h (elf_x86_link_hash_table): Add got_referenced.
2867 2018-02-05 Maciej W. Rozycki <macro@mips.com>
2869 * elfnn-riscv.c (_bfd_riscv_relax_pc): Use `memset' to
2870 initialize `hi_reloc'.
2872 2018-02-05 Maciej W. Rozycki <macro@mips.com>
2874 * elfxx-mips.c (_bfd_mips_elf_section_processing): For
2875 SHT_MIPS_REGINFO sections don't assert the correct size and
2876 report an error instead.
2878 2018-02-05 Maciej W. Rozycki <macro@mips.com>
2880 * elf.c (_bfd_elf_write_object_contents): Propagate a failure
2881 status from `->elf_backend_section_processing'.
2883 2018-02-02 Jim Wilson <jimw@sifive.com>
2886 * elfnn-riscv.c (riscv_relax_delete_bytes): New parameter link_info.
2887 If link_info->wrap_hash, check for a duplicate symbol and ignore.
2888 (_bfd_riscv_relax_call, bfd_riscv_relax_lui, _bfd_riscv_relax_tls_le):
2889 Pass new argument to riscv_relax_delete_bytes.
2890 (_bfd_riscv_relax_align, _bfd_riscv_relax_delete): Likewise. Remove
2891 ATTRIBUTE_UNUSED from link_info parameter.
2893 2018-02-02 Alan Modra <amodra@gmail.com>
2895 * elf64-ppc.c (ppc64_elf_relocate_section): Don't relocate nops
2896 emitted for toc sequence optimization. Set and use "howto" later.
2898 2018-02-01 Simon Marchi <simon.marchi@ericsson.com>
2900 * elf64-ppc.c (ppc64_elf_archive_symbol_lookup): Avoid pointer
2901 arithmetic on NULL pointer.
2902 * elflink.c (_bfd_elf_archive_symbol_lookup,
2903 elf_link_add_archive_symbols): Likewise.
2905 2018-01-31 Michael Matz <matz@suse.de>
2907 * elflink.c (bfd_elf_define_start_stop): Fix check of
2910 2018-01-31 H.J. Lu <hongjiu.lu@intel.com>
2913 * elflink.c (bfd_elf_define_start_stop): Check if __start and
2914 __stop symbols are referenced by shared objects.
2916 2018-01-30 Alan Modra <amodra@gmail.com>
2919 * elf.c (_bfd_elf_map_sections_to_segments): Don't start a new
2920 segment when demand paged with lma on the same page. Test this
2921 before load/non-load, executable/non-executable,
2922 writable/non-writable tests and simplify. Delete bogus relro
2923 condition in writable/non-writable test. Delete outdated
2924 comment. Formatting.
2926 2018-01-30 Alan Modra <amodra@gmail.com>
2928 * elflink.c (bfd_elf_define_start_stop): Make __start and __stop
2931 2018-01-29 Alan Modra <amodra@gmail.com>
2934 * coffgen.c (coff_pointerize_aux): Ensure auxent tagndx is in
2935 range before converting to a symbol table pointer.
2937 2018-01-27 Nick Clifton <nickc@redhat.com>
2939 * po/ru.po: Updated Russian translation.
2941 2018-01-26 Alan Modra <amodra@gmail.com>
2943 * elflink.c (bfd_elf_define_start_stop): Override symbols when
2944 they are defined dynamically.
2946 2018-01-26 Alan Modra <amodra@gmail.com>
2948 * elf64-ppc.c (ppc64_elf_size_stubs): Iterate sizing when
2949 .branch_lt changes size.
2951 2018-01-25 Alan Modra <amodra@gmail.com>
2954 * elfcode.h (elf_object_p): Avoid integer overflow.
2956 2018-01-25 Eric Botcazou <ebotcazou@adacore.com>
2959 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
2960 Do a mere lookup of the __tls_get_addr symbol instead of adding it.
2963 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
2966 * elfxx-sparc.c (sparc_elf_tls_transition): Replace
2967 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
2968 bfd_link_executable for TLS check.
2969 (_bfd_sparc_elf_check_relocs): Likewise.
2970 (allocate_dynrelocs): Likewise.
2971 (_bfd_sparc_elf_relocate_section): Likewise.
2973 2018-01-24 Renlin Li <renlin.li@arm.com>
2975 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Add support for
2976 BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
2977 BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
2978 BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
2979 BFD_RELOC_AARCH64_MOVW_PREL_G3.
2980 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
2981 (_bfd_aarch64_elf_resolve_relocation): Likewise.
2983 2018-01-24 Renlin Li <renlin.li@arm.com>
2985 * reloc.c: Add BFD_RELOC_AARCH64_MOVW_PREL_G0,
2986 BFD_RELOC_AARCH64_MOVW_PREL_G0_NC, BFD_RELOC_AARCH64_MOVW_PREL_G1,
2987 BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, BFD_RELOC_AARCH64_MOVW_PREL_G2,
2988 BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, BFD_RELOC_AARCH64_MOVW_PREL_G3.
2989 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Add entries for
2990 BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
2991 BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
2992 BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
2993 BFD_RELOC_AARCH64_MOVW_PREL_G3.
2994 * bfd-in2.h: Regenerate.
2995 * libbfd.h: Regenerate.
2997 2018-01-23 Maciej W. Rozycki <macro@mips.com>
2999 * elfxx-mips.c (_bfd_mips_elf_final_link): Update a stale
3000 `mips_elf32_section_processing' comment reference.
3002 2018-01-20 H.J. Lu <hongjiu.lu@intel.com>
3005 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Check the
3006 versioned __tls_get_addr symbol.
3008 2018-01-19 Nick Clifton <nickc@redhat.com>
3010 * po/fr.po: Updated French translation.
3012 2018-01-18 Alan Modra <amodra@gmail.com>
3014 * elf32-ppc.c (ppc_elf_create_glink): Correct alignment of .glink.
3015 * elf64-ppc.c (ppc64_elf_size_stubs): Handle negative plt_stub_align.
3016 (ppc64_elf_build_stubs): Likewise.
3018 2018-01-17 Nick Clifton <nickc@redhat.com>
3020 * po/ru.po: Updated Russian translation.
3021 * po/uk/po: Updated Ukranian translation.
3023 2018-01-17 Alan Modra <amodra@gmail.com>
3025 * elf64-ppc.c (ppc64_elf_build_stubs): Silence gcc warning.
3027 2018-01-17 Alan Modra <amodra@gmail.com>
3029 * elf32-ppc.c (GLINK_ENTRY_SIZE): Handle speculation barrier.
3030 (CRSETEQ, BEQCTRM): Define.
3031 (is_nonpic_glink_stub): Don't check bctr.
3032 (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
3033 (ppc_elf_relax_section): Size speculation barrier.
3034 (output_bctr): New function.
3035 (write_glink_stub): Use output_bctr.
3036 (ppc_elf_relocate_section): Use output_bctr for long branch stub.
3037 (ppc_elf_finish_dynamic_symbol): Likewise.
3038 (ppc_elf_finish_dynamic_sections): Use output_bctr.
3039 * elf32-ppc.h (struct ppc_elf_params): Add speculate_indirect_jumps.
3040 * elf64-ppc.c (CRSETEQ, BEQCTRM, BEQCTRLM): Define.
3041 (GLINK_PLTRESOLVE_SIZE): Size speculation barrier.
3042 (size_global_entry_stubs): Handle speculation barrier sizing.
3043 (plt_stub_size): Likewise.
3044 (output_bctr): New function.
3045 (build_plt_stub, build_tls_get_addr_stub): Output speculation
3047 (ppc_build_one_stub): Likewise for ppc_stub_plt_branch.
3048 (ppc_size_one_stub): Size speculation barrier in ppc_stub_plt_branch.
3049 (build_global_entry_stubs): Output speculation barrier.
3050 (ppc64_elf_build_stubs): Likewise in __glink_PLTresolve stub.
3051 * elf64-ppc.h (struct ppc64_elf_params): Add speculate_indirect_jumps.
3053 2018-01-17 Alan Modra <amodra@gmail.com>
3055 * elf32-ppc.c (GLINK_ENTRY_SIZE): Add parameters, handle
3056 __tls_get_addr_opt, and alignment sizing.
3057 (TLS_GET_ADDR_GLINK_SIZE): Delete.
3058 (is_nonpic_glink_stub): Don't use GLINK_ENTRY_SIZE.
3059 (ppc_elf_get_synthetic_symtab): Recognize stubs spaced at 4, 6,
3061 (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
3062 (allocate_dynrelocs): Use new GLINK_ENTRY_SIZE.
3063 (ppc_elf_size_dynamic_sections): Likewise. Size branch table
3065 (write_glink_stub): Handle __tls_get_addr_opt stub.
3066 Pad out to size given by GLINK_ENTRY_SIZE.
3067 (ppc_elf_relocate_section): Adjust write_glink_stub call.
3068 (ppc_elf_finish_dynamic_symbol): Likewise.
3069 (ppc_elf_finish_dynamic_sections): Write PLTresolve without using
3070 insn array since so many need rewriting.
3071 * elf32-ppc.h (struct ppc_elf_params): Add plt_stub_align.
3072 * elf64-ppc.c (GLINK_PLTRESOLVE_SIZE): Rename from
3073 GLINK_CALL_STUB_SIZE. Add htab param and evaluate to size without
3074 nops. Adjust all uses.
3075 (ppc64_elf_get_synthetic_symtab): Don't use GLINK_CALL_STUB_SIZE
3076 in glink_vma calculation.
3077 (struct ppc_link_hash_table): Add global_entry section pointer.
3078 (create_linkage_sections): Create separate section for global
3080 (PPC_LO, PPC_HI, PPC_HA): Move earlier.
3081 (size_global_entry_stubs): Handle sizing for aligned stubs.
3082 (ppc64_elf_size_dynamic_sections): Handle global_entry alloc,
3083 and don't stash end of glink branch table in rawsize.
3084 (ppc_build_one_stub): Rewrite stub size calculations.
3085 (build_global_entry_stubs): Use new section.
3086 (ppc64_elf_build_stubs): Don't pad __glink_PLTresolve with nops.
3087 Build lazy link stubs out to end of section. Build global entry
3088 stubs in new section.
3090 2018-01-15 Nick Clifton <nickc@redhat.com>
3092 * po/uk.po: Updated Ukranian translation.
3094 2018-01-13 Nick Clifton <nickc@redhat.com>
3096 * po/bfd.pot: Regenerated.
3098 2018-01-13 Nick Clifton <nickc@redhat.com>
3100 * version.m4: Bump version to 2.30.51
3101 * configure: Regenerate.
3103 2018-01-13 Nick Clifton <nickc@redhat.com>
3105 2.30 branch created.
3107 2018-01-12 Jens Widell <jl@opera.com>
3109 * elf.c (setup_group): Optimize search for group by remembering
3110 last found group and restarting search at that index.
3111 * elf-bfd.h (struct elf_obj_tdata): Add group_search_offset field.
3113 2018-01-12 Gunther Nikl <gnikl@users.sourceforge.net>
3115 * aoutx.h (aout_link_check_ar_symbols): Remove default and handle
3116 bfd_link_common_skip_none in switch.
3118 2018-01-12 Alan Modra <amodra@gmail.com>
3121 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Ignore dynamic
3122 references on forced local symbols.
3124 2018-01-12 Vlad Ivanov <vlad@ivanov.email>
3126 * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when
3127 .reginfo section has wrong size.
3129 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
3132 * elf.c (_bfd_elf_map_sections_to_segments): When generating
3133 separate code and read-only data LOAD segments, create a new
3134 LOAD segment if the previous section contains text and the
3135 current section doesn't or vice versa. Don't put a writable
3136 section in a read-only segment if there is a RELRO segment.
3138 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
3141 * elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Ignore dynamic
3142 references on forced local symbols.
3144 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
3147 * elflink.c (bfd_elf_gc_sections): Keep all PREINIT_ARRAY,
3148 INIT_ARRAY as well as FINI_ARRAY sections for ld -r --gc-section.
3150 2018-01-09 Kuan-Lin Chen <kuanlinchentw@gmail.com>
3153 * elf32-nds32.c (nds32_elf_relax_loadstore): Fix a typographical error.
3155 2018-01-03 John Baldwin <jhb@FreeBSD.org>
3157 * elf.c (elfcore_grok_freebsd_note): Handle
3158 NT_FREEBSD_PROCSTAT_PROC, NT_FREEBSD_PROCSTAT_FILES, and
3159 NT_FREEBSD_PROCSTAT_VMMAP.
3161 2018-01-03 Alan Modra <amodra@gmail.com>
3163 Update year range in copyright notice of all files.
3165 For older changes see ChangeLog-2017
3167 Copyright (C) 2018 Free Software Foundation, Inc.
3169 Copying and distribution of this file, with or without modification,
3170 are permitted in any medium without royalty provided the copyright
3171 notice and this notice are preserved.
3177 version-control: never