1 2018-06-24 Nick Clifton <nickc@redhat.com>
5 2018-06-21 Maciej W. Rozycki <macro@mips.com>
7 * elfxx-mips.c (_bfd_mips_elf_compact_eh_encoding)
8 (_bfd_mips_elf_cant_unwind_opcode): Correct formatting.
10 2018-06-21 Maciej W. Rozycki <macro@mips.com>
12 * elfxx-mips.c (_bfd_mips_post_process_headers): Keep
13 EI_ABIVERSION setting together.
15 2018-06-21 Maciej W. Rozycki <macro@mips.com>
17 * elfxx-mips.c (MIPS_LIBC_ABI_DEFAULT, MIPS_LIBC_ABI_MIPS_PLT)
18 (MIPS_LIBC_ABI_UNIQUE, MIPS_LIBC_ABI_MIPS_O32_FP64)
19 (MIPS_LIBC_ABI_MAX): New enumeration constants.
20 (_bfd_mips_post_process_headers): Use them in place of magic
23 2018-06-21 Jim Wilson <jimw@sifive.com>
25 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Update comment.
26 Use SYMBOL_REFERENCES_LOCAL. Add asserts for h->got.offset.
28 2018-06-21 Alan Modra <amodra@gmail.com>
30 * doc/Makefile.am (AUTOMAKE_OPTIONS): Add "foreign".
31 * doc/Makefile.in: Regenerate.
33 2018-06-20 Renlin Li <renlin.li@arm.com>
35 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Use PG_OFFSET
36 to resolve BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC,
37 BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC,
38 BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC,
39 BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC,
40 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
41 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
42 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
43 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
45 2018-06-20 Nick Clifton <nickc@redhat.com>
48 * opncls.c (get_build_id): Check for a negative or excessive data
49 size in the build-id note.
51 2018-06-20 Nick Clifton <nickc@redhat.com>
54 * mach-o.c (cputype): New function.
55 (cpusubtype): New function.
56 (bfd_mach_o_bfd_print_private_data): New function. Dispalys the
57 values in the MACH-O file header.
58 (bfd_mach_o_bfd_copy_private_header_data): Copy the cputype and
59 cpusubtype fields from the input bfd's mach-o header to the output
61 * mach-o-target.c (bfd_mach_o_bfd_print_private_bfd_data):
62 Redefine to bfd_mach_o_bfd_print_private_data.
63 * mach-o.h (bfd_mach_o_bfd_print_private_bfd_data): Prototype.
65 2018-06-19 Maciej W. Rozycki <macro@mips.com>
68 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Verify the
69 `.got.plt' entry referred is in range.
70 (mips_finish_exec_plt): Correct the range check for `.got.plt'
71 start. Replace the assertion used for that with a proper error
74 2018-06-19 Maciej W. Rozycki <macro@mips.com>
76 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Fix
79 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
81 * Makefile.am (AUTOMAKE_OPTIONS): Remove 1.11.
82 (INCLUDES): Rename to ...
83 (AM_CPPFLAGS): ... this.
84 * configure.ac: Remove AC_PREREQ.
85 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove 1.9, cygnus, add
86 info-in-builddir no-texinfo.tex.
87 (info_TEXINFOS): Rename bfd.texinfo to bfd.texi.
88 * doc/bfd.texinfo: Rename to ...
89 * doc/bfd.texi: ... this.
90 * Makefile.in: Re-generate.
91 * aclocal.m4: Re-generate.
92 * config.in: Re-generate.
93 * configure: Re-generate.
94 * doc/Makefile.in: Re-generate.
96 2018-06-18 Mephi <mephi42@gmail.com>
99 * mach-o-x86-64.c (x86_64_howto_table): Add entry for
100 BFD_RELOC_MACH_O_X86_64_RELOC_TLV.
101 (bfd_mach_o_x86_64_canonicalize_one_reloc): Handle the new reloc.
102 (bfd_mach_o_x86_64_swap_reloc_out): Likewise.
103 * reloc.c (BFD_RELOC_MACH_O_X86_64_TV): New entry.
104 * bfd-in2.h: Regenerate.
105 * libbfd.h: Regenerate.
107 2018-06-14 Faraz Shahbazker <Faraz.Shahbazker@mips.com>
109 * elfxx-mips.c (print_mips_ases): Add GINV extension.
111 2018-06-14 H.J. Lu <hongjiu.lu@intel.com>
114 * elf.c (_bfd_elf_get_symbol_version_string): Check if the first
115 symbol version is base version.
117 2018-06-14 Alan Modra <amodra@gmail.com>
119 * elf-bfd.h (struct elf_link_hash_table): Add "dynamic_relocs".
120 * elflink.c (_bfd_elf_init_2_index_sections): Comment fix.
121 (_bfd_elf_add_dynamic_entry): Set "dynamic_relocs".
122 (_bfd_elf_link_renumber_dynsyms): Exclude all section symbols when
123 "dynamic_relocs" is not set.
124 * elfxx-mips.c (count_section_dynsyms): Likewise.
126 2018-06-14 Alan Modra <amodra@gmail.com>
129 * bfdio.c (bfd_seek): Optimize away seeks to current position.
131 2018-06-13 Scott Egerton <scott.egerton@imgtec.com>
132 Faraz Shahbazker <Faraz.Shahbazker@mips.com>
134 * elfxx-mips.c (print_mips_ases): Add CRC.
136 2018-06-08 H.J. Lu <hongjiu.lu@intel.com>
139 * elfxx-x86.c (elf_x86_hide_linker_defined): New function.
140 (_bfd_x86_elf_link_check_relocs): Use it to hide hidden
141 __bss_start, _end and _edata in shared libraries.
143 2018-06-07 Alan Modra <amodra@gmail.com>
145 * elf32-tic6x.c (elf32_tic6x_check_relocs): Reference
146 __c6xabi_DSBT_BASE explicitly for R_C6000_SBR_* relocs.
148 2018-06-05 Alan Modra <amodra@gmail.com>
150 * bfd.c (struct bfd): Update comment on "where" usage.
151 * bfdio.c (bfd_bwrite, bfd_stat): Use and update "iovec",
152 "iostream", and "where" from containing archive file. Return
154 (bfd_bread): Similarly, and return error attempted out of
155 bounds archive element access.
156 (bfd_tell, bfd_flush): Use and update "iovec", "iostream", and
157 "where" from containing archive file.
158 (bfd_seek): Likewise. Return error on NULL iovec. Don't
159 attempt to optimize away seeks. Don't paper over errors by
161 (bfd_get_mtime): Call bfd_stat rather than iovec->bstat.
162 (bfd_get_size): Likewise.
163 (bfd_mmap): Operate on and use iovec of containing archive
164 file. Return error on NULL iovec.
165 * cache.c (bfd_cache_lookup_worker): Abort if working on
167 (cache_bread_1): Delete bfd parameter, add FILE* parameter.
168 Don't ignore zero byte reads.
169 (cache_bread): Look up FILE* in cache here. Error on NULL
171 (cache_bwrite): Rename "where" to "from".
172 (cache_bmmap): Don't handle archive elements.
173 * coffcode.h (coff_slurp_line_table): Exit early on zero
175 * bfd-in2.h: Regenerate.
177 2018-06-05 Alan Modra <amodra@gmail.com>
180 * plugin.c (bfd_plugin_open_input): Allow for possibility of
181 nested archives. Open file again for plugin.
182 (try_claim): Don't save and restore file position. Close file
184 * sysdep.h (O_BINARY): Define.
186 2018-06-04 Max Filippov <jcmvbkbc@gmail.com>
188 * elf32-xtensa.c (xtensa_read_table_entries): Make global.
189 (compute_fill_extra_space): Drop declaration. Rename function to
190 xtensa_compute_fill_extra_space.
191 (compute_ebb_actions, remove_dead_literal): Update references to
192 compute_fill_extra_space.
194 2018-06-04 Volodymyr Arbatov <arbatov@cadence.com>
196 * elf32-xtensa.c (elf32xtensa_separate_props): New global
198 (xtensa_add_names): New function.
199 (xtensa_property_section_name): Add new parameter
200 separate_sections, use it to choose property section name.
201 (xtensa_get_separate_property_section): New function.
202 (xtensa_get_property_section): Invoke
203 xtensa_get_separate_property_section to get individual property
204 section if it exists, common property section otherwise.
205 (xtensa_make_property_section): Pass elf32xtensa_separate_props
206 to xtensa_property_section_name.
208 2018-06-04 H.J. Lu <hongjiu.lu@intel.com>
211 * bfd-in.h: Include "diagnostics.h".
212 * bfd-in2.h: Regenerated.
213 * elf32-arm.c (elf32_arm_nabi_write_core_note): Use
214 DIAGNOSTIC_PUSH, DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION and
215 DIAGNOSTIC_POP to silence GCC 8.1 warnings with
216 -Wstringop-truncation.
217 * elf32-ppc.c (ppc_elf_write_core_note): Likewse.
218 * elf32-s390.c (elf_s390_write_core_note): Likewse.
219 * elf64-ppc.c (ppc64_elf_write_core_note): Likewse.
220 * elf64-s390.c (elf_s390_write_core_note): Likewse.
221 * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewse.
223 2018-06-03 Jim Wilson <jimw@sifive.com>
226 * elfnn-riscv.c (riscv_elf_relocate_section) <R_RISCV_CALL>: Check
227 for and handle an undefined weak with no PLT.
230 * elfnn-riscv.c (riscv_relax_delete_bytes): Add versioned_hidden check
231 to code that ignores duplicate symbols.
233 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
235 * version.m4: Bump version to 2.30.52
236 * configure: Regenerated.
238 2018-06-01 Alan Modra <amodra@gmail.com>
240 * bfd.c (_bfd_error_handler): Arrange for this function to be
241 declared in bfd-in2.h.
242 * libbfd-in.h (_bfd_error_handler): Don't declare.
243 * libbfd.h: Regenerate.
244 * bfd-in2.h: Regenerate.
246 2018-05-30 Amaan Cheval <amaan.cheval@gmail.com>
248 * config.bfd (x86_64-*-*): Add pei-x86-64 target to x86_64-*-rtems*
249 This is needed to generate UEFI application image files from ELFs.
251 2018-05-28 H.J. Lu <hongjiu.lu@intel.com>
253 * elf32-i386.c (elf_i386_lazy_plt): Add plt_tlsdesc_entry,
254 plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset,
255 plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and
256 plt_tlsdesc_got2_insn_end for TLSDESC entry.
257 (elf_i386_lazy_ibt_plt): Likewise.
258 (elf_i386_nacl_plt): Likewise.
259 * elf64-x86-64.c (tlsdesc_plt_entry): Moved and renamed to ...
260 (elf_x86_64_tlsdesc_plt_entry): This.
261 (elf_x86_64_lazy_plt): Add plt_tlsdesc_entry,
262 plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset,
263 plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and
264 plt_tlsdesc_got2_insn_end for TLSDESC entry.
265 (elf_x86_64_lazy_bnd_plt): Likewise.
266 (elf_x86_64_lazy_ibt_plt): Likewise.
267 (elf_x32_lazy_ibt_plt): Likewise.
268 (elf_x86_64_nacl_plt): Likewise.
269 (elf_x86_64_finish_dynamic_sections): Use plt_tlsdesc_entry,
270 plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset,
271 plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and
272 plt_tlsdesc_got2_insn_end to update TLSDESC entry.
273 * elfxx-x86.h (elf_x86_lazy_plt_layout): Update comments.
274 Add plt_tlsdesc_entry, plt_tlsdesc_entry_size,
275 plt_tlsdesc_got1_offset, plt_tlsdesc_got2_offset,
276 plt_tlsdesc_got1_insn_end and plt_tlsdesc_got2_insn_end.
277 (elf_x86_non_lazy_plt_layout): Update comments.
278 (elf_x86_plt_layout): Likewise.
280 2018-05-28 H.J. Lu <hongjiu.lu@intel.com>
283 * elf-s390-common.c (elf_s390_add_symbol_hook): Removed.
284 * elf32-arc.c (elf_arc_add_symbol_hook): Likewise.
285 (elf_backend_add_symbol_hook): Likewise.
286 * elf32-m68k.c (elf_m68k_add_symbol_hook): Likewise.
287 (elf_backend_add_symbol_hook): Likewise.
288 * elf32-s390.c (elf_backend_add_symbol_hook): Likewise.
289 * elf32-sparc.c (elf32_sparc_add_symbol_hook): Likewise.
290 (elf_backend_add_symbol_hook): Likewise.
291 * elf64-s390.c (elf_backend_add_symbol_hook): Likewise.
292 * elfxx-aarch64.c (_bfd_aarch64_elf_add_symbol_hook): Likewise.
293 * elfxx-aarch64.h (_bfd_aarch64_elf_add_symbol_hook): Likewise.
294 (elf_backend_add_symbol_hook): Likewise.
295 * elf32-arm.c (elf32_arm_add_symbol_hook): Remove STT_GNU_IFUNC
297 * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise.
298 * elf64-ppc.c (ppc64_elf_add_symbol_hook): Likewise.
299 * elf64-sparc.c (elf64_sparc_add_symbol_hook): Likewise.
300 * elflink.c (elf_link_add_object_symbols): Set
301 elf_gnu_symbol_ifunc for STT_GNU_IFUNC symbols.
303 2018-05-26 H.J. Lu <hongjiu.lu@intel.com>
306 * elf-bfd.h (_bfd_elf_link_hide_sym_by_version): New.
307 * elflink.c (_bfd_elf_link_hide_versioned_symbol): New function.
308 Extracted from _bfd_elf_link_assign_sym_version.
309 (_bfd_elf_link_hide_sym_by_version): New function.
310 (_bfd_elf_link_assign_sym_version): Use
311 _bfd_elf_link_hide_versioned_symbol.
312 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Call
313 _bfd_elf_link_hide_sym_by_version instead of
314 bfd_hide_sym_by_version. Don't check unversioned symbol.
316 2018-05-25 Alan Modra <amodra@gmail.com>
318 * Makefile.in: Regenerate.
319 * po/SRC-POTFILES.in: Regenerate.
321 2018-05-25 Alan Modra <amodra@gmail.com>
323 * configure.ac (bfd_cv_hidden): Run test with -Werror in CFLAGS.
324 * configure: Regenerate.
326 2018-05-23 H.J. Lu <hongjiu.lu@intel.com>
328 * elf64-ppc.c (ppc64_elf_write_core_note): Add ATTRIBUTE_NONSTRING
331 2018-05-22 Alan Modra <amodra@gmail.com>
334 * elf32-hppa.c (hppa_get_stub_entry): Return NULL when link_sec
336 (elf32_hppa_size_stubs): Only create stubs for load, alloc, code
338 (final_link_relocate): Revert last change.
340 2018-05-22 Alan Modra <amodra@gmail.com>
343 * elf32-hppa.c (final_link_relocate): Don't look for plt call
344 stubs in non-alloc sections.
346 2018-05-21 H.J. Lu <hongjiu.lu@intel.com>
349 * aout-target.h (MY_bfd_link_hide_symbol): New.
350 * aout-tic30.c (MY_bfd_link_hide_symbol): Likewise.
351 * binary.c (binary_bfd_link_hide_symbol): Likewise.
352 * coff-alpha.c (_bfd_ecoff_bfd_link_hide_symbol): Likewise.
353 * coff-mips.c (_bfd_ecoff_bfd_link_hide_symbol): Likewise.
354 * coff-rs6000.c (_bfd_xcoff_bfd_link_hide_symbol): Likewise.
355 * coffcode.h (coff_bfd_link_hide_symbol): Likewise.
356 * elf-bfd.h (_bfd_elf_link_hide_symbol): Likewise.
357 * elfxx-target.h (bfd_elfNN_bfd_link_hide_symbol): Likewise.
358 * i386msdos.c (msdos_bfd_link_hide_symbol): Likewise.
359 * ihex.c (ihex_bfd_link_hide_symbol): Likewise.
360 * libbfd-in.h (_bfd_nolink_bfd_link_hide_symbol): Likewise.
361 * linker.c (_bfd_generic_link_hide_symbol): Likewise.
362 (bfd_link_hide_symbol): Likewise.
363 * mach-o-target.c (bfd_mach_o_bfd_link_hide_symbol): Likewise.
364 * mmo.c (mmo_bfd_link_hide_symbol): Likewise.
365 * pef.c (bfd_pef_bfd_link_hide_symbol): Likewise.
366 * plugin.c (bfd_plugin_bfd_link_hide_symbol): Likewise.
367 * ppcboot.c (ppcboot_bfd_link_hide_symbol): Likewise.
368 * som.c (som_bfd_link_hide_symbol): Likewise.
369 * srec.c (srec_bfd_link_hide_symbol): Likewise.
370 * tekhex.c (tekhex_bfd_link_hide_symbol): Likewise.
371 * vms-alpha.c (vms_bfd_link_hide_symbol): Likewise.
372 (alpha_vms_bfd_link_hide_symbol): Likewise.
373 * xsym.c (bfd_sym_bfd_link_hide_symbol): Likewise.
374 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
375 _bfd_generic_link_hide_symbol.
376 (rs6000_xcoff64_aix_vec): Likewise.
377 * elflink.c (bfd_elf_record_link_assignment): Don't make forced
378 local symbol dynamic.
379 (_bfd_elf_link_hide_symbol): New function.
380 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
381 check root.ldscript_def.
382 * targets.c (bfd_target): Add _bfd_link_hide_symbol.
383 (BFD_JUMP_TABLE_LINK): Add NAME##_bfd_link_hide_symbol.
384 * bfd-in2.h: Regenerated.
385 * libbfd.h: Likewise.
387 2018-05-21 H.J. Lu <hongjiu.lu@intel.com>
390 * elf.c (setup_group): Mark section in a section group with
393 2018-05-18 H.J. Lu <hongjiu.lu@intel.com>
396 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
397 set eh->local_ref to 1 if a symbol is versioned and there is a
400 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
402 * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Handle
405 2018-05-18 Jim Wilson <jimw@sifive.com>
407 * elfnn-riscv.c (allocate_dynrelocs): Discard dynamic relocations if
408 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
409 (riscv_elf_relocate_section): Don't generate dynamic relocation if
410 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
411 (riscv_elf_finish_dynamic_symbol): Likewise.
413 2018-05-18 John Darrington <john@darrington.wattle.id.au>
415 * Makefile.am: Add s12z files.
416 * Makefile.in: Regenerate.
417 * archures.c: Add bfd_s12z_arch.
418 * bfd-in.h: Add exports of bfd_putb24 and bfd_putl24.
419 * bfd-in2.h: Regenerate.
420 * config.bfd: Add s12z target.
421 * configure.ac: Add s12z target.
422 * configure: Regenerate.
423 * cpu-s12z.c: New file.
424 * elf32-s12z.c: New file.
425 * libbfd.c (bfd_putb24): New function.
426 (bfd_putl24): New function.
427 * libbfd.h: Regenerate.
428 * reloc.c: Add s12z relocations.
429 (bfd_get_reloc_size): Handle size 5 relocs.
430 * targets.c: Add s12z_elf32_vec.
432 2018-05-18 H.J. Lu <hongjiu.lu@intel.com>
435 * elf32-i386.c (elf_i386_relocate_section): Handle R_386_GOT32X
437 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
438 set eh->local_ref to 1 for linker defined symbols.
440 2018-05-18 Alan Modra <amodra@gmail.com>
443 * elf.c (setup_group): Formatting. Check that SHT_GROUP entries
444 don't point at other SHT_GROUP sections. Set shdr corresponding
445 to invalid entry, to NULL rather than section 0. Identify
446 SHT_GROUP section index when reporting an error. Cope with NULL
449 2018-05-18 Alan Modra <amodra@gmail.com>
451 * libbfd-in.h (ATTRIBUTE_HIDDEN): Define and use throughout.
452 * configure.ac (HAVE_HIDDEN): Check compiler support for hidden
454 * libbfd.h: Regenerate.
455 * configure: Regenerate.
456 * config.in: Regenerate.
458 2018-05-18 Alan Modra <amodra@gmail.com>
460 * libbfd-in.h: Add include guard.
461 * libcoff-in.h: Likewise.
462 * doc/Makefile.am (libbfd.h, libcoff.h): Append another #endif.
463 * doc/Makefile.in: Regenerate.
464 * libbfd.h: Regenerate.
465 * libcoff.h: Regenerate.
467 2018-05-16 Maciej W. Rozycki <macro@mips.com>
469 * elf32-nds32.c (nds32_convert_32_to_16): Preset `insn_type'.
471 2018-05-16 Alan Modra <amodra@gmail.com>
474 * format.c (struct bfd_preserve): Add section_id.
475 (bfd_preserve_save, bfd_preserve_restore): Save and restore
477 (bfd_reinit): Set _bfd_section_id.
478 (bfd_check_format_matches): Put all matches of any priority into
479 matching_vector. Save initial section id and start each attempted
480 match at that section id.
481 * libbfd-in.h (_bfd_section_id): Declare.
482 * section.c (_bfd_section_id): Rename from section_id and make
484 (bfd_get_next_section_id): Delete.
485 * elf64-ppc.c (ppc64_elf_setup_section_lists): Replace use of
486 bfd_get_section_id with _bfd_section_id.
487 * libbfd.h: Regenerate.
488 * bfd-in2.h: Regenerate.
490 2018-05-15 Christophe Guillon <christophe.guillon@st.com>
492 * coffcode.h (coff_bigobj_swap_aux_in): Make sure that all fields
493 of the aux structure are initialised.
495 2018-05-15 Francois H. Theron <francois.theron@netronome.com>
497 * targets.c: Wrap nfp_elf64_vec in BFD64 ifdef.
499 2018-05-15 Nick Clifton <nickc@redhat.com>
501 * po/pt.po: New Portuguese translation.
502 * configure.ac (ALL_LINGUAS): Add pt.
503 * configure: Regenerate.
505 2018-05-14 H.J. Lu <hongjiu.lu@intel.com>
508 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Don't issue
509 an error on IFUNC pointer defined in PDE.
510 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Call
511 _bfd_x86_elf_link_fixup_ifunc_symbol.
512 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
513 * elfxx-x86.c (_bfd_x86_elf_link_fixup_ifunc_symbol): New
515 * elfxx-x86.h (_bfd_x86_elf_link_fixup_ifunc_symbol): New.
517 2018-05-14 H.J. Lu <hongjiu.lu@intel.com>
520 * elfxx-x86.c (elf_x86_linker_defined): New function.
521 (_bfd_x86_elf_link_check_relocs): Use it to mark __bss_start,
522 _end and _edata locally defined within executables.
524 2018-05-12 Alan Modra <amodra@gmail.com>
527 * elf.c (rewrite_elf_program_header): Use segment_mark only for
528 PT_LOAD headers. Delete first_matching_lma and first_suggested_lma.
529 Instead make matching_lma and suggested_lma pointers to the
530 sections. Align section vma and lma calculated from segment.
531 Don't clear includes_phdrs or includes_filehdr based on p_paddr
532 test. Try to handle alignment padding before first section by
533 adjusting new segment lma down. Adjust PT_PHDR map p_paddr.
535 2018-05-09 Dimitar Dimitrov <dimitar@dinux.eu>
537 * elf32-pru.c (pru_elf32_do_ldi32_relocate): Make LDI32 relocation
538 conformant to TI ABI.
539 (pru_elf32_relax_section): Likewise.
540 (pru_elf_relax_delete_bytes): Fix offsets for new LDI32 code.
541 * elf32-pru.c (pru_elf32_do_ldi32_relocate): Ignore addend.
542 (pru_elf32_pmem_relocate): Trap - should not get here.
543 (pru_elf32_relocate_section): Add support for REL relocations.
544 (elf_info_to_howto_rel): Enable REL.
545 (elf_backend_may_use_rel_p): Likewise.
546 (elf_backend_may_use_rela_p): Likewise.
547 (elf_backend_default_use_rela_p): Likewise.
549 2018-05-09 Alan Modra <amodra@gmail.com>
552 * peXXigen.c (pe_print_edata): Correct minimum size.
554 2018-05-09 Alan Modra <amodra@gmail.com>
557 * peXXigen.c (pe_print_idata): Bound check hint_addr.
559 2018-05-08 Nick Clifton <nickc@redhat.com>
562 * elf.c (bfd_elf_get_str_section): Check for an excessively large
564 * elf-attrs.c (_bfd_elf_parse_attributes): Issue an error if the
565 attribute section is larger than the size of the file.
567 2018-05-07 Alan Modra <amodra@gmail.com>
569 * cofflink.c (_bfd_coff_link_input_bfd): Use memcmp rather than
570 strncmp when checking for ".bf" special symbol.
571 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Make pe_required_section_flags
572 section name a char array, remove sentinal known_sections entry,
573 and adjust loop over known_sections to suit. Use memcmp rather
576 2018-05-04 Alan Modra <amodra@gmail.com>
578 * elf-linux-core.h (struct elf_external_linux_prpsinfo32_ugid32),
579 (struct elf_external_linux_prpsinfo32_ugid16),
580 (struct elf_external_linux_prpsinfo64_ugid32),
581 (struct elf_external_linux_prpsinfo64_ugid16): Add ATTRIBUTE_NONSTRING
582 to pr_fname and pr_psargs fields. Remove GCC diagnostic pragmas.
584 * elf.c (elfcore_write_prpsinfo): ..here. Indent nested preprocessor
586 * elf32-arm.c (elf32_arm_nabi_write_core_note): Add ATTRIBUTE_NONSTRING
588 * elf32-ppc.c (ppc_elf_write_core_note): Likewise.
589 * elf32-s390.c (elf_s390_write_core_note): Likewise.
590 * elf64-s390.c (elf_s390_write_core_note): Likewise.
591 * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewise.
592 * elf64-x86-64.c (elf_x86_64_write_core_note): Add GCC diagnostic
594 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Use strnlen to avoid
595 false positive gcc-8 warning.
596 * cofflink.c (_bfd_coff_link_input_bfd): Likewise.
598 2018-05-04 Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
600 * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Fix the order
601 of arguments when warning about different long double types.
603 2018-05-03 Simon Atanasyan <simon@atanasyan.com>
605 * elf32-mips.c: (elf32_mips_fixup_symbol): New function.
606 (elf_backend_fixup_symbol): New macro.
607 * elfxx-mips.c: (mips_elf_output_extsym): Discard _gp_disp
609 (_bfd_mips_elf_finish_dynamic_symbol): Likewise.
611 2018-04-30 Francois H. Theron <francois.theron@netronome.com>
613 * Makefile.am: Added NFP files to build.
614 * archures.c: Added bfd_arch_nfp
615 * config.bfd: Added NFP support.
616 * configure.ac: Added NFP support.
617 * cpu-nfp.c: New, for NFP support.
618 * elf-bfd.h: Added elf_section_info()
619 * elf64-nfp.c: New, for NFP support.
620 * po/SRC-POTFILES.in: Added NFP source files.
621 * targets.c: Added nfp_elf64_vec
622 * bfd-in2.h: Regenerate.
623 * Makefile.in: Regenerate.
624 * configure: Regenerate.
626 2018-04-27 Alan Modra <amodra@gmail.com>
628 * bfd-in2.h: Regenerate.
629 * libbfd.h: Regenerate.
631 2018-04-27 Alan Modra <amodra@gmail.com>
635 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't drop plt
637 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Comment fixes.
639 2018-04-26 Pedro Alves <palves@redhat.com>
641 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't consider
642 ifunc and non-ifunc symbols duplicates.
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_fdpic_thumb_plt_entry): New.
648 (elf32_arm_plt_needs_thumb_stub_p): Handle thumb-only case.
649 (elf32_arm_populate_plt_entry): Likewise.
650 (elf32_arm_output_plt_map_1): Likewise.
651 (elf32_arm_output_arch_local_syms): Likewise.
653 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
654 Mickaël Guêné <mickael.guene@st.com>
656 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Handle
657 _GLOBAL_OFFSET_TABLE_ in FDPIC mode.
659 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
660 Mickaël Guêné <mickael.guene@st.com>
662 * elf32-arm.c (bfd_elf32_arm_set_target_params): Handle FDPIC case
665 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
666 Mickaël Guêné <mickael.guene@st.com>
668 * elf32-arm.c (DEFAULT_STACK_SIZE): New.
669 (elf32_arm_always_size_sections): Create stack segment.
671 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
672 Mickaël Guêné <mickael.guene@st.com>
674 * bfd-in2.h (BFD_RELOC_ARM_TLS_GD32_FDPIC)
675 (BFD_RELOC_ARM_TLS_LDM32_FDPIC, BFD_RELOC_ARM_TLS_IE32_FDPIC): New
677 * elf32-arm.c (elf32_arm_howto_table_2): Add R_ARM_TLS_GD32_FDPIC,
678 R_ARM_TLS_LDM32_FDPIC, R_ARM_TLS_IE32_FDPIC relocations.
679 (elf32_arm_reloc_map): Add R_ARM_TLS_GD32_FDPIC,
680 R_ARM_TLS_LDM32_FDPIC, R_ARM_TLS_IE32_FDPIC.
681 (struct elf32_arm_link_hash_table): Update comment.
682 (elf32_arm_final_link_relocate): Handle TLS FDPIC relocations.
683 (IS_ARM_TLS_RELOC): Likewise.
684 (elf32_arm_check_relocs): Likewise.
685 (allocate_dynrelocs_for_symbol): Likewise.
686 (elf32_arm_size_dynamic_sections): Update comment.
687 * reloc.c: Add BFD_RELOC_ARM_TLS_GD32_FDPIC,
688 BFD_RELOC_ARM_TLS_LDM32_FDPIC, BFD_RELOC_ARM_TLS_IE32_FDPIC.
690 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
691 Mickaël Guêné <mickael.guene@st.com>
693 * elf32-arm.c (elf32_arm_fdpic_plt_entry): New.
694 (elf32_arm_create_dynamic_sections): Handle FDPIC.
695 (elf32_arm_allocate_plt_entry): Likewise.
696 (elf32_arm_populate_plt_entry): Likewise.
697 (elf32_arm_output_plt_map_1): Likewise.
699 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
700 Mickaël Guêné <mickael.guene@st.com>
702 * elf32-arm.c (struct fdpic_local): New.
703 (elf_arm_obj_tdata): Add local_fdpic_cnts field.
704 (elf32_arm_local_fdpic_cnts): New.
705 (struct fdpic_global): New.
706 (elf32_arm_link_hash_entry): Add fdpic_cnts field.
707 (elf32_arm_link_hash_table): Add srofixup field.
708 (arm_elf_add_rofixup): New.
709 (arm_elf_fill_funcdesc): New.
710 (elf32_arm_link_hash_newfunc): Handle fdpic_cnts.
711 (elf32_arm_allocate_local_sym_info): Likewise.
712 (create_got_section): Create .rofixup section.
713 (elf32_arm_copy_indirect_symbol): Handle fdpic_cnts.
714 (bfd_elf32_arm_set_target_params): Handle FDPIC.
715 (elf32_arm_final_link_relocate): Likewise.
716 (elf32_arm_check_relocs): Likewise.
717 (allocate_dynrelocs_for_symbol): Likewise.
718 (elf32_arm_size_dynamic_sections): Likewise.
719 (elf32_arm_finish_dynamic_sections): Likewise.
720 (elf32_arm_output_arch_local_syms): Likewise.
721 (elf32_arm_fdpic_omit_section_dynsym): New.
723 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
724 Mickaël Guêné <mickael.guene@st.com>
726 * bfd-in2.c (BFD_RELOC_ARM_GOTFUNCDESC)
727 (BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC)
728 (BFD_RELOC_ARM_FUNCDESC_VALUE): New.
729 * elf32-arm.c (elf32_arm_howto_table_2): Add R_ARM_GOTFUNCDESC,
730 R_ARM_GOTOFFFUNCDESC, R_ARM_FUNCDESC, R_ARM_FUNCDESC_VALUE.
731 (elf32_arm_howto_from_type): Take new members of
732 elf32_arm_howto_table_2 into account.
733 (elf32_arm_reloc_map): Add BFD_RELOC_ARM_GOTFUNCDESC,
734 BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC,
735 BFD_RELOC_ARM_FUNCDESC_VALUE.
736 * reloc.c: Add BFD_RELOC_ARM_GOTFUNCDESC,
737 BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC,
738 BFD_RELOC_ARM_FUNCDESC_VALUE.
740 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
741 Mickaël Guêné <mickael.guene@st.com>
743 * elf32-arm.c (elf32_arm_print_private_bfd_data): Support
744 EF_ARM_PIC and ELFOSABI_ARM_FDPIC.
745 (elf32_arm_post_process_headers): Support ELFOSABI_ARM_FDPIC.
746 (ELF_OSABI): Define to ELFOSABI_ARM_FDPIC.
748 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
749 Mickaël Guêné <mickael.guene@st.com>
751 * config.bfd (arm*-*-linux-*): Add arm_elf32_fdpic_be_vec and
752 arm_elf32_fdpic_le_vec to targ_selvecs. Accept
753 arm*-*-uclinuxfdpiceabi.
754 * configure.ac: Add support for arm_elf32_fdpic_be_vec and
755 arm_elf32_fdpic_le_vec.
756 * configure: Regenerate.
757 * elf32-arm.c (struct elf32_arm_link_hash_table): Add fdpic_p.
758 (elf32_arm_link_hash_table_create): Initialize fdpic_p.
759 (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME, TARGET_BIG_SYM)
760 (TARGET_BIG_NAME, elf_match_priority): Define for FDPIC targets.
761 (elf32_arm_fdpic_link_hash_table_create): New.
762 * targets.c (_bfd_target_vector): Add arm_elf32_fdpic_be_vec and
763 arm_elf32_fdpic_le_vec.
765 2018-04-25 Alan Modra <amodra@gmail.com>
767 * elf-linux-core.h: Disable gcc-8 string truncation warning.
768 * elf.c (elfcore_write_prpsinfo): Likewise.
770 2018-04-25 Alan Modra <amodra@gmail.com>
772 * Makefile.am: Remove arm-aout and arm-coff support.
773 * config.bfd: Likewise.
774 * configure.ac: Likewise.
775 * targets.c: Likewise.
776 * aout-arm.c: Delete.
777 * armnetbsd.c: Delete.
779 * Makefile.in: Regenerate.
780 * configure: Regenerate.
781 * po/SRC-POTFILES.in: Regenerate.
783 2018-04-24 Nick Clifton <nickc@redhat.com>
786 * elf.c (ignore_section_sym): Check for the output_section pointer
787 being NULL before dereferencing it.
790 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Check for
791 a negative PE_DEBUG_DATA size before iterating over the debug data.
793 2018-04-23 Alan Modra <amodra@gmail.com>
795 * elf-linux-core.h: Revert last change.
798 2018-04-23 Nick Clifton <nickc@redhat.com>
801 * aoutx.h (aout_get_external_symbols): Allocate an extra byte at
802 the end of the string table, and zero it.
804 2018-04-23 Alan Modra <amodra@gmail.com>
806 * elf-linux-core.h (swap_linux_prpsinfo32_ugid32_out): Disable
807 gcc-8 string truncation warning.
808 (swap_linux_prpsinfo32_ugid16_out): Likewise.
809 (swap_linux_prpsinfo64_ugid32_out): Likewise.
810 (swap_linux_prpsinfo64_ugid16_out): Likewise.
811 * elf.c (elfcore_write_prpsinfo): Likewise.
813 2018-04-23 Nick Clifton <nickc@redhat.com>
816 * aoutx.h (aout_get_external_symbols): Allocate an extra byte at
817 the end of the string table, and zero it.
819 2018-04-20 Alan Modra <amodra@gmail.com>
822 * elf32-hppa.c (got_relocs_needed): Add extra param to special
823 case both dtprel and tprel relocs.
824 (allocate_dynrelocs): Adjust conditions for got relocs.
825 (elf32_hppa_relocate_section): Likewise for local sym got relocs.
826 Emit dynamic relocs on TLS GOT entries for shared libraries,
827 not when pic. Omit dynamic reloc on dtprel entry when local,
828 and on tprel entry when local and executable.
830 2018-04-19 Alan Modra <amodra@gmail.com>
833 * elf32-hppa.c (elf32_hppa_size_stubs): Init "destination" to -1.
834 (hppa_type_of_stub): Don't return a long branch stub for
835 symbols other than those defined statically.
837 2018-04-19 Alan Modra <amodra@gmail.com>
839 * Makefile.am: Revert 2018-04-18 coff-mips changes.
840 * config.bfd: Add back mips_ecoff_le_vec and mips_ecoff_be_vec
841 to selvecs for mips targets change 2018-04-18.
842 * configure.ac: Reinstate mips_ecoff_le_vec, mips_ecoff_be_vec
843 and mips_ecoff_bele_vec.
844 * targets.c: Likewise.
845 * coff-mips.c: Resurrect.
846 * Makefile.in: Regenerate.
847 * configure: Regenerate.
848 * po/SRC-POTFILES.in: Regenerate.
850 2018-04-18 Alan Modra <amodra@gmail.com>
852 * Makefile.am: Remove mips aout and coff support.
853 * config.bfd: Likewise.
854 * configure.ac: Likewise.
855 * targets.c: Likewise.
856 * coff-mips.c: Delete
860 * Makefile.in: Regenerate.
861 * configure: Regenerate.
862 * po/SRC-POTFILES.in: Regenerate.
864 2018-04-17 H.J. Lu <hongjiu.lu@intel.com>
866 * elf32-i386.c (elf32_bed): Define before including
868 * elf64-x86-64.c (elf64_bed): Define before including
870 (elf32_bed): Define before including "elf32-target.h".
872 2018-04-17 H.J. Lu <hongjiu.lu@intel.com>
875 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Use a
876 normal input file with compatible relocation.
878 2018-04-18 Alan Modra <amodra@gmail.com>
880 * Makefile.am: Remove support for assorted i386 aout and coff targets.
881 * config.bfd: Likewise.
882 * configure.ac: Likewise.
883 * doc/bfdint.texi: Likewise.
884 * targets.c: Likewise.
886 * i386dynix.c: Delete.
887 * i386freebsd.c: Delete.
888 * i386linux.c: Delete.
889 * i386mach3.c: Delete.
890 * i386netbsd.c: Delete.
891 * i386os9k.c: Delete.
892 * Makefile.in: Regenerate.
893 * configure: Regenerate.
894 * po/SRC-POTFILES.in: Regenerate.
896 2018-04-17 Andrew Sadek <andrew.sadek.se@gmail.com>
898 Microblaze Target: PIC data text relative
900 * bfd/reloc.c (2 new BFD relocations):
901 BFD_RELOC_MICROBLAZE_64_TEXTPCREL &
902 BFD_RELOC_MICROBLAZE_64_TEXTPCREL
903 * bfd/bfd-in2.h: Regenerate
904 * bfd/libbfd.h: Regenerate
905 * bfd/elf32-microblaze.c (Handle new relocs): define 'HOWTO' of 3
906 new relocs and handle them in both relocate and relax functions.
907 (microblaze_elf_reloc_type_lookup): add mapping between for new
909 (microblaze_elf_relocate_section): Handle new relocs in case of
911 (microblaze_elf_relax_section): Handle new relocs for elf relaxation.
913 2018-04-17 Nick Clifton <nickc@redhat.com>
916 * aoutx.h (find_nearest_line): Check that the symbol name exists
917 and is long enough, before attempting to see if it is for a .o
919 * hash.c (bfd_hash_hash): Add an assertion that the string is not
921 * linker.c (bfd_link_hash_lookup): Fail if the table or string are
923 (_bfd_generic_link_add_archive_symbols): Fail if an archive entry
927 * dwarf2.c (concat_filename): Check for a NULL table pointer.
929 2018-04-16 Nick Clifton <nickc@redhat.com>
932 * coffgen.c (coff_pointerize_aux): Check for an out of range
935 2018-04-16 Alan Modra <amodra@gmail.com>
937 * Makefile.am: Remove arm-epoc-pe support.
938 * coff-arm.c: Likewise.
939 * config.bfd: Likewise.
940 * configure.ac: Likewise.
941 * targets.c: Likewise.
942 * epoc-pe-arm.c: Delete.
943 * epoc-pei-arm.c: Delete.
944 * Makefile.in: Regenerate.
945 * configure: Regenerate.
946 * po/SRC-POTFILES.in: Regenerate.
948 2018-04-16 Alan Modra <amodra@gmail.com>
950 * Makefile.am: Remove sparc-aout and sparc-coff support.
951 * config.bfd: Likewise.
952 * configure.ac: Likewise.
953 * targets.c: Likewise.
954 * aout-sparcle.c: Delete.
956 * cf-sparclynx.c: Delete.
957 * coff-sparc.c: Delete.
959 * sparclinux.c: Delete.
960 * sparclynx.c: Delete.
961 * sparcnetbsd.c: Delete.
963 * Makefile.in: Regenerate.
964 * configure: Regenerate.
965 * po/SRC-POTFILES.in: Regenerate.
967 2018-04-16 Alan Modra <amodra@gmail.com>
969 * Makefile.am: Remove m68k-aout and m68k-coff support.
970 * aoutf1.h: Likewise.
972 * archive.c: Likewise.
973 * bfd-in.h: Likewise.
975 * coffcode.h: Likewise.
976 * coffswap.h: Likewise.
977 * config.bfd: Likewise.
978 * configure.ac: Likewise.
979 * configure.host: Likewise.
980 * doc/bfd.texinfo: Likewise.
981 * doc/bfdint.texi: Likewise.
982 * freebsd.h: Likewise.
983 * gen-aout.c: Likewise.
984 * hpux-core.c: Likewise.
985 * libaout.h: Likewise.
986 * libbfd-in.h: Likewise.
988 * peicode.h: Likewise.
989 * riscix.c: Likewise.
990 * targets.c: Likewise.
992 * coff-apollo.c: Delete.
993 * coff-aux.c: Delete.
994 * coff-m68k.c: Delete.
995 * coff-svm68k.c: Delete.
996 * coff-u68k.c: Delete.
997 * hosts/delta68.h: Delete.
998 * hosts/hp300bsd.h: Delete.
999 * hosts/m68kaux.h: Delete.
1000 * hosts/news.h: Delete.
1001 * hp300bsd.c: Delete.
1002 * hp300hpux.c: Delete.
1003 * liboasys.h: Delete.
1004 * m68k4knetbsd.c: Delete.
1005 * m68klinux.c: Delete.
1006 * m68knetbsd.c: Delete.
1008 * versados.c: Delete.
1009 * Makefile.in: Regenerate.
1010 * bfd-in2.h: Regenerate.
1011 * configure: Regenerate.
1012 * libbfd.h: Regenerate.
1013 * po/SRC-POTFILES.in: Regenerate.
1015 2018-04-16 Alan Modra <amodra@gmail.com>
1017 * Makefile.am: Remove sh5 and sh64 support.
1018 * archures.c: Likewise.
1019 * config.bfd: Likewise.
1020 * configure.ac: Likewise.
1021 * cpu-sh.c: Likewise.
1022 * elf32-sh-relocs.h: Likewise.
1023 * elf32-sh.c: Likewise.
1024 * targets.c: Likewise.
1025 * elf32-sh64-com.c: Delete.
1026 * elf32-sh64.c: Delete.
1027 * elf32-sh64.h: Delete.
1028 * elf64-sh64.c: Delete.
1029 * Makefile.in: Regenerate.
1030 * bfd-in2.h: Regenerate.
1031 * configure: Regenerate.
1032 * po/SRC-POTFILES.in: Regenerate.
1034 2018-04-16 Alan Modra <amodra@gmail.com>
1036 * Makefile.am: Remove sh-symbianelf support.
1037 * config.bfd: Likewise.
1038 * configure.ac: Likewise.
1039 * targets.c: Likewise.
1040 * elf32-sh-symbian.c: Delete.
1041 * Makefile.in: Regenerate.
1042 * configure: Regenerate.
1043 * po/SRC-POTFILES.in: Regenerate.
1045 2018-04-16 Alan Modra <amodra@gmail.com>
1047 * Makefile.am: Remove vax-bsd and vax-ultrix support.
1048 * config.bfd: Likewise.
1049 * configure.ac: Likewise.
1050 * targets.c: Likewise.
1052 * Makefile.in: Regenerate.
1053 * configure: Regenerate.
1054 * po/SRC-POTFILES.in: Regenerate.
1056 2018-04-16 Alan Modra <amodra@gmail.com>
1058 * Makefile.am: Remove w65 support.
1059 * archures.c: Likewise.
1060 * coffcode.h: Likewise.
1061 * config.bfd: Likewise.
1062 * configure.ac: Likewise.
1063 * targets.c: Likewise.
1064 * coff-w65.c: Delete.
1065 * cpu-w65.c: Delete.
1066 * Makefile.in: Regenerate.
1067 * bfd-in2.h: Regenerate.
1068 * configure: Regenerate.
1069 * po/SRC-POTFILES.in: Regenerate.
1071 2018-04-16 Alan Modra <amodra@gmail.com>
1073 * Makefile.am: Remove we32k support.
1074 * archures.c: Likewise.
1075 * coffcode.h: Likewise.
1076 * config.bfd: Likewise.
1077 * configure.ac: Likewise.
1078 * targets.c: Likewise.
1079 * coff-we32k.c: Delete.
1080 * cpu-we32k.c: Delete.
1081 * Makefile.in: Regenerate.
1082 * bfd-in2.h: Regenerate.
1083 * configure: Regenerate.
1084 * po/SRC-POTFILES.in: Regenerate.
1086 2018-04-16 Alan Modra <amodra@gmail.com>
1088 * Makefile.am: Remove m88k support.
1089 * aoutx.h: Likewise.
1090 * archures.c: Likewise.
1091 * coffcode.h: Likewise.
1092 * coffswap.h: Likewise.
1093 * config.bfd: Likewise.
1094 * configure.ac: Likewise.
1095 * cpu-ns32k.c: Likewise.
1096 * elf32-nds32.c: Likewise.
1097 * mach-o.c: Likewise.
1098 * netbsd-core.c: Likewise.
1099 * reloc.c: Likewise.
1100 * targets.c: Likewise.
1101 * coff-m88k.c: Delete.
1102 * cpu-m88k.c: Delete.
1103 * elf32-m88k.c: Delete.
1104 * hosts/m88kmach3.h: Delete.
1105 * m88kmach3.c: Delete.
1106 * m88kopenbsd.c: Delete.
1107 * Makefile.in: Regenerate.
1108 * bfd-in2.h: Regenerate.
1109 * configure: Regenerate.
1110 * po/SRC-POTFILES.in: Regenerate.
1112 2018-04-16 Alan Modra <amodra@gmail.com>
1114 * Makefile.am: Remove i370 support.
1115 * archures.c: Likewise.
1116 * config.bfd: Likewise.
1117 * configure.ac: Likewise.
1118 * targets.c: Likewise.
1119 * cpu-i370.c: Delete.
1120 * elf32-i370.c: Delete.
1121 * Makefile.in: Regenerate.
1122 * bfd-in2.h: Regenerate.
1123 * configure: Regenerate.
1124 * po/SRC-POTFILES.in: Regenerate.
1126 2018-04-16 Alan Modra <amodra@gmail.com>
1128 * Makefile.am: Remove h8500 support.
1129 * archures.c: Likewise.
1130 * coffcode.h: Likewise.
1131 * config.bfd: Likewise.
1132 * configure.ac: Likewise.
1133 * targets.c: Likewise.
1134 * coff-h8500.c: Delete.
1135 * cpu-h8500.c: Delete.
1136 * Makefile.in: Regenerate.
1137 * bfd-in2.h: Regenerate.
1138 * configure: Regenerate.
1139 * po/SRC-POTFILES.in: Regenerate.
1141 2018-04-16 Alan Modra <amodra@gmail.com>
1143 * Makefile.am: Remove h8300-coff support.
1144 * coffcode.h: Likewise.
1145 * config.bfd: Likewise.
1146 * configure.ac: Likewise.
1147 * reloc16.c: Likewise.
1148 * targets.c: Likewise.
1149 * coff-h8300.c: Delete.
1150 * Makefile.in: Regenerate.
1151 * configure: Regenerate.
1152 * po/SRC-POTFILES.in: Regenerate.
1154 2018-04-16 Alan Modra <amodra@gmail.com>
1156 * Makefile.am: Remove IEEE 695 support.
1157 * archures.c: Likewise.
1159 * config.bfd: Likewise.
1160 * configure.ac: Likewise.
1161 * doc/bfd.texinfo: Likewise.
1162 * doc/bfdint.texi: Likewise.
1163 * doc/bfdsumm.texi: Likewise.
1164 * section.c: Likewise.
1165 * targets.c: Likewise.
1167 * libieee.h: Delete.
1168 * Makefile.in: Regenerate.
1169 * bfd-in2.h: Regenerate.
1170 * configure: Regenerate.
1171 * po/SRC-POTFILES.in: Regenerate.
1173 2018-04-16 Alan Modra <amodra@gmail.com>
1175 * config.bfd: Remove tandem support.
1177 2018-04-16 Alan Modra <amodra@gmail.com>
1179 * Makefile.am: Remove newsos3 support.
1180 * aoutx.h: Likewise.
1181 * config.bfd: Likewise.
1182 * configure.ac: Likewise.
1183 * targets.c: Likewise.
1184 * newsos3.c: Delete.
1185 * Makefile.in: Regenerate.
1186 * configure: Regenerate.
1187 * po/SRC-POTFILES.in: Regenerate.
1189 2018-04-16 Alan Modra <amodra@gmail.com>
1191 * Makefile.am: Remove netware support.
1192 * bfd-in.h: Likewise.
1194 * config.bfd: Likewise.
1195 * configure.ac: Likewise.
1196 * doc/bfdint.texi: Likewise.
1197 * ecoff.c: Likewise.
1198 * targets.c: Likewise.
1200 * nlm-target.h: Delete.
1202 * nlm32-alpha.c: Delete.
1203 * nlm32-i386.c: Delete.
1204 * nlm32-ppc.c: Delete.
1205 * nlm32-sparc.c: Delete.
1208 * nlmcode.h: Delete.
1209 * nlmswap.h: Delete.
1210 * Makefile.in: Regenerate.
1211 * bfd-in2.h: Regenerate.
1212 * configure: Regenerate.
1213 * po/SRC-POTFILES.in: Regenerate.
1215 2018-04-16 Alan Modra <amodra@gmail.com>
1217 * archures.c: Remove tahoe support.
1218 * config.bfd: Likewise.
1219 * configure.ac: Likewise.
1220 * hosts/tahoe.h: Delete.
1221 * bfd-in2.h: Regenerate.
1222 * configure: Regenerate.
1224 2018-04-14 Alan Modra <amodra@gmail.com>
1226 * elf-bfd.h (struct elf_backend_data): Add relropagesize.
1227 * elfxx-target.h (ELF_RELROPAGESIZE): Provide default and
1229 (elfNN_bed): Init relropagesize.
1230 * bfd.c (bfd_emul_get_commonpagesize): Add boolean param to
1231 select relropagesize.
1232 * elf32-ppc.c (ELF_COMMONPAGESIZE): Define as 0x1000.
1233 (ELF_RELROPAGESIZE): Define as ELF_MAXPAGESIZE.
1234 (ELF_MINPAGESIZE): Don't define.
1235 * elf64-ppc.c (ELF_COMMONPAGESIZE): Define as 0x1000.
1236 (ELF_RELROPAGESIZE): Define as ELF_MAXPAGESIZE.
1237 * bfd-in2.h: Regenerate.
1239 2018-04-14 Alan Modra <amodra@gmail.com>
1241 * elf32-ppc.c (ELF_MAXPAGESIZE, ELF_COMMONPAGESIZE): Don't depend
1242 on __QNXTARGET__ define.
1244 2018-04-14 Alan Modra <amodra@gmail.com>
1246 * config.bfd: Add powerpc-*-lynxos* and powerpc-*-windiss*
1249 2018-04-11 Alan Modra <amodra@gmail.com>
1251 * aout-adobe.c: Delete.
1253 * coff-i860.c: Delete.
1254 * coff-i960.c: Delete.
1255 * cpu-i860.c: Delete.
1256 * cpu-i960.c: Delete.
1257 * elf32-i860.c: Delete.
1258 * elf32-i960.c: Delete.
1259 * hosts/i860mach3.h: Delete.
1260 * Makefile.am: Remove i860, i960, bout, and adobe support.
1261 * archures.c: Remove i860 and i960 support.
1262 * coffcode.h: Likewise.
1263 * reloc.c: Likewise.
1264 * aoutx.h: Comment updates.
1265 * archive.c: Remove BOUT and i960 support.
1266 * bfd.c: Remove BOUT support.
1267 * coffswap.h: Remove i960 support.
1268 * config.bfd: Remove i860, i960 and adobe targets.
1269 * configure.ac: Remove adode, bout, i860, i960, icoff targets.
1270 * targets.c: Likewise.
1271 * ieee.c: Remove i960 support.
1272 * mach-o.c: Remove i860 support.
1273 * Makefile.in: Regenerate.
1274 * bfd-in2.h: Regenerate.
1275 * configure: Regenerate.
1276 * libbfd.h: Regenerate.
1277 * po/SRC-POTFILES.in: Regenerate.
1279 2018-04-09 Maciej W. Rozycki <macro@mips.com>
1281 * elf64-mips.c (mips_elf64_write_rel): Handle a NULL BFD pointer
1282 in the BFD symbol referred by the relocation.
1283 (mips_elf64_write_rela): Likewise.
1285 2018-04-09 Maciej W. Rozycki <macro@mips.com>
1287 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Issue an
1288 error for out-of-range `r_sym' values.
1290 2018-04-09 Alan Modra <amodra@gmail.com>
1292 * elf64-ppc.c (struct _ppc64_elf_section_data): Add has_pltcall field.
1293 (struct ppc_link_hash_table): Add can_convert_all_inline_plt.
1294 (ppc64_elf_check_relocs): Set has_pltcall.
1295 (ppc64_elf_adjust_dynamic_symbol): Discard some PLT entries.
1296 (ppc64_elf_inline_plt): New function.
1297 (ppc64_elf_size_dynamic_sections): Discard some PLT entries for locals.
1298 * elf64-ppc.h (ppc64_elf_inline_plt): Declare.
1299 * elf32-ppc.c (has_pltcall): Define.
1300 (struct ppc_elf_link_hash_table): Add can_convert_all_inline_plt.
1301 (ppc_elf_check_relocs): Set has_pltcall.
1302 (ppc_elf_inline_plt): New function.
1303 (ppc_elf_adjust_dynamic_symbol): Discard some PLT entries.
1304 (ppc_elf_size_dynamic_sections): Likewise.
1305 * elf32-ppc.h (ppc_elf_inline_plt): Declare.
1307 2018-04-09 Alan Modra <amodra@gmail.com>
1309 * elf32-ppc.c (ppc_elf_howto_raw): Add PLTSEQ and PLTCALL howtos.
1310 (is_plt_seq_reloc): New function.
1311 (ppc_elf_check_relocs): Handle PLTSEQ and PLTCALL relocs.
1312 (ppc_elf_tls_optimize): Handle inline plt call sequence.
1313 (ppc_elf_relax_section): Handle PLTCALL reloc.
1314 (ppc_elf_relocate_section): Nop out inline plt call sequence when
1316 * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_PLTSEQ and
1317 R_PPC64_PLTCALL entries. Comment R_PPC64_TOCSAVE.
1318 (has_tls_get_addr_call): Correct comment.
1319 (is_branch_reloc): Add PLTCALL.
1320 (is_plt_seq_reloc): New function.
1321 (ppc64_elf_check_relocs): Handle PLT16_LO_DS reloc. Set
1322 has_tls_reloc for R_PPC64_TLSGD and R_PPC64_TLSLD. Create plt
1323 entry for R_PPC64_PLTCALL.
1324 (ppc64_elf_tls_optimize): Handle inline plt call sequence.
1325 (ppc_type_of_stub): Handle PLTCALL reloc.
1326 (toc_adjusting_stub_needed): Likewise.
1327 (ppc64_elf_relocate_section): Set "can_plt_call" for PLTCALL
1328 reloc insn. Nop out inline plt call sequence when resolving
1329 locally. Handle __tls_get_addr inline plt call optimization.
1331 2018-04-09 Alan Modra <amodra@gmail.com>
1333 * elf64-ppc.c (LOCAL_PLT_ENTRY_SIZE): Define.
1334 (struct ppc_stub_hash_entry): Add symtype field.
1336 (struct ppc_link_hash_table): Add pltlocal and relpltlocal.
1337 (create_linkage_sections): Create pltlocal and relpltlocal.
1338 (ppc64_elf_check_relocs): Allow PLT relocs on local symbols.
1340 (ppc64_elf_adjust_dynamic_symbol): Keep PLT entries for inline calls.
1341 (allocate_dynrelocs): Allocate pltlocal and relpltlocal.
1342 (ppc64_elf_size_dynamic_sections): Size pltlocal and relpltlocal.
1343 Keep PLT entries for inline calls against locals.
1344 (ppc_build_one_stub): Use pltlocal as appropriate.
1345 (ppc_size_one_stub): Likewise.
1346 (ppc64_elf_size_stubs): Set symtype.
1347 (build_global_entry_stubs_and_plt): Init pltlocal and write
1348 relpltlocal for globals.
1349 (write_plt_relocs_for_local_syms): Likewise for local syms.
1350 (ppc64_elf_relocate_section): Support PLT for local syms.
1351 * elf32-ppc.c (PLT_KEEP): Define.
1352 (struct ppc_elf_link_hash_table): Add pltlocal and relpltlocal.
1353 (ppc_elf_create_glink): Create pltlocal and relpltlocal.
1354 (ppc_elf_check_relocs): Allow PLT relocs on local symbols.
1355 Set PLT_KEEP. Adjust update_local_sym_info call.
1356 (ppc_elf_adjust_dynamic_symbol): Keep PLT entries for inline calls.
1357 (allocate_dynrelocs): Allocate pltlocal and relpltlocal.
1358 (ppc_elf_size_dynamic_sections): Size pltlocal and relpltlocal.
1359 (ppc_elf_relocate_section): Support PLT16 relocs for local syms.
1360 (write_global_sym_plt): Init pltlocal and write relpltlocal.
1361 (ppc_finish_symbols): Likewise for locals.
1363 2018-04-09 Alan Modra <amodra@gmail.com>
1365 * elf64-ppc.c (ppc_build_one_stub): Move output of PLT relocs
1366 for local symbols to..
1367 (write_plt_relocs_for_local_syms): ..here. New function.
1368 (ppc64_elf_finish_dynamic_symbol): Move output of PLT relocs for
1370 (build_global_entry_stubs_and_plt): ..here. Rename from
1371 build_global_entry_stubs.
1372 (ppc64_elf_build_stubs): Always call build_global_entry_stubs_and_plt.
1373 Call write_plt_relocs_for_local_syms.
1374 * elf32-ppc.c (get_sym_h): New function.
1375 (ppc_elf_relax_section): Use get_sym_h.
1376 (ppc_elf_relocate_section): Move output of PLT relocs and glink
1377 stubs for local symbols to..
1378 (ppc_finish_symbols): ..here. New function.
1379 (ppc_elf_finish_dynamic_symbol): Move output of PLT relocs for
1381 (write_global_sym_plt): ..here. New function.
1382 * elf32-ppc.h (ppc_elf_modify_segment_map): Delete attribute.
1383 (ppc_finish_symbols): Declare.
1385 2018-04-09 Alan Modra <amodra@gmail.com>
1387 * elf32-ppc.c (ppc_elf_check_relocs): Handle PLT16 relocs.
1388 (ppc_elf_relocate_section): Likewise.
1389 * elf64-ppc.c (ppc64_elf_check_relocs): Handle PLT16_LO_DS.
1390 (ppc64_elf_relocate_section): Likewise. Correct PLT16
1391 resolution to plt entry relative to toc pointer.
1393 2018-04-09 Alan Modra <amodra@gmail.com>
1395 * elf64-ppc.c (TLS_TLS, TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL,
1396 TLS_TPRELGD, TLS_EXPLICIT): Renumber. Test TLS_TLS throughout
1397 file when other TLS flags are tested in a mask.
1398 (TLS_MARK, NON_GOT): Define.
1399 (PLT_IFUNC): Redefine, and test TLS_TLS throughout file as well.
1400 (update_local_sym_info): Don't create got entry when NON_GOT.
1401 (ppc64_elf_check_relocs): Pass NON_GOT with PLT_IFUNC.
1403 (get_tls_mask): Do toc lookup if tls_mask is just TLS_MARK.
1404 (ppc64_elf_relocate_section): Likewise.
1405 (ppc64_elf_tls_optimize): Don't attempt to optimize indirect
1406 __tls_get_addr calls lacking a marker reloc.
1407 * elf32-ppc.c (TLS_TLS, TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL,
1408 TLS_TPRELGD): Renumber. Update comment.
1409 (TLS_MARK, NON_GOT): Define.
1410 (PLT_IFUNC): Redefine, and test TLS_TLS throughout file as well.
1411 (update_local_sym_info): Don't create got entry when NON_GOT.
1412 (ppc_elf_check_relocs): Pass NON_GOT with PLT_IFUNC.
1414 (ppc_elf_tls_optimize): Don't attempt to optimize indirect
1415 __tls_get_addr calls lacking a marker reloc.
1417 2018-04-06 H.J. Lu <hongjiu.lu@intel.com>
1419 * elf64-x86-64.c (elf_x86_64_info_to_howto): Don't mask out
1420 R_X86_64_converted_reloc_bit.
1422 2018-04-05 H.J. Lu <hongjiu.lu@intel.com>
1425 * configure: Regenerated.
1427 2018-04-05 Alan Modra <amodra@gmail.com>
1429 * elf-hppa.h (elf_hppa_info_to_howto): Init howto to NULL.
1430 (elf_hppa_info_to_howto_rel): Likewise.
1432 2018-04-04 Maciej W. Rozycki <macro@mips.com>
1434 * elf-hppa.h (elf_hppa_info_to_howto): Also return
1435 unsuccessfully for unimplemented relocations.
1436 (elf_hppa_info_to_howto_rel): Likewise.
1438 2018-04-04 Maciej W. Rozycki <macro@mips.com>
1440 * elf32-i860.c (lookup_howto): Add `abfd' parameter. Set the
1441 `bfd_error_bad_value' error and call `_bfd_error_handler' on a
1442 howto lookup failure.
1443 (elf32_i860_reloc_type_lookup): Adjust `lookup_howto' call
1445 (elf32_i860_info_to_howto_rela): Likewise.
1446 (elf32_i860_relocate_splitn): Likewise.
1447 (elf32_i860_relocate_pc16): Likewise.
1448 (elf32_i860_relocate_pc26): Likewise.
1449 (elf32_i860_relocate_section): Likewise.
1451 2018-04-04 Maciej W. Rozycki <macro@mips.com>
1453 * elf32-visium.c (visium_info_to_howto_rela): Correct the range
1454 check for `visium_elf_howto_table' table access.
1456 2018-04-04 Maciej W. Rozycki <macro@mips.com>
1458 * elf32-iq2000.c (iq2000_info_to_howto_rela): Correct the range
1459 check for `iq2000_elf_howto_table' table access.
1461 2018-04-04 Maciej W. Rozycki <macro@mips.com>
1463 * elf32-frv.c (frv_info_to_howto_rela): Correct the range check
1464 for `elf32_frv_howto_table' table access.
1466 2018-04-04 Maciej W. Rozycki <macro@mips.com>
1468 * elf32-mips.c (mips_elf32_rtype_to_howto): Also return
1469 unsuccessfully for placeholder howtos.
1470 * elf64-mips.c (mips_elf64_rtype_to_howto): Likewise.
1471 * elfn32-mips.c (mips_elf_n32_rtype_to_howto): Likewise.
1473 2018-03-29 Maciej W. Rozycki <macro@mips.com>
1475 * elf32-mips.c (mips_info_to_howto_rel): Remove the calls to
1476 `_bfd_error_handler' and to set the `bfd_error_bad_value' error.
1478 2018-03-28 Maciej W. Rozycki <macro@mips.com>
1480 * elf-hppa.h (elf_hppa_info_to_howto_rel): Remove
1481 ATTRIBUTE_UNUSED from `abfd'.
1483 2018-03-28 Maciej W. Rozycki <macro@mips.com>
1485 * elf-hppa.h (elf_hppa_info_to_howto_rel): Correct
1486 `_bfd_error_handler' call formatting.
1488 2018-03-28 Maciej W. Rozycki <macro@mips.com>
1490 * elf32-mips.c (mips_info_to_howto_rel): Call
1491 `mips_elf32_rtype_to_howto' directly rather than via
1492 `->elf_backend_mips_rtype_to_howto'.
1494 2018-03-28 Renlin Li <renlin.li@arm.com>
1497 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Add cases for
1498 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12,
1499 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
1500 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12,
1501 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
1502 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12,
1503 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
1504 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12,
1505 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
1506 (elfNN_aarch64_final_link_relocate): Support new relocations.
1507 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Support new
1509 (_bfd_aarch64_elf_resolve_relocation): Support new relocations.
1511 2018-03-28 Renlin Li <renlin.li@arm.com>
1514 * reloc.c: Add BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12
1515 BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12_NC,
1516 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12,
1517 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
1518 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12,
1519 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
1520 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12,
1521 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
1522 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12,
1523 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
1524 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Add table entry for
1525 TLSLE_LDST16_TPREL_LO12,
1526 TLSLE_LDST16_TPREL_LO12_NC,
1527 TLSLE_LDST32_TPREL_LO12,
1528 TLSLE_LDST32_TPREL_LO12_NC,
1529 TLSLE_LDST64_TPREL_LO12,
1530 TLSLE_LDST64_TPREL_LO12_NC,
1531 TLSLE_LDST8_TPREL_LO12,
1532 TLSLE_LDST8_TPREL_LO12_NC.
1533 * bfd-in2.h: Regenerated.
1534 * libbfd.h: Regenerated.
1536 2018-03-28 Eric Botcazou <ebotcazou@adacore.com>
1539 * elfxx-sparc.c (struct _bfd_sparc_elf_link_hash_entry): Add new flag
1540 has_old_style_got_reloc.
1541 (_bfd_sparc_elf_check_relocs) <GOT relocations>: Set it for old-style
1542 relocations. Fix a couple of long lines.
1543 (_bfd_sparc_elf_relocate_section) <R_SPARC_GOTDATA_OP>: Do not generate
1544 a R_SPARC_NONE for the GOT slot if the symbol is also subject to old-style
1547 2018-03-25 H.J. Lu <hongjiu.lu@intel.com>
1550 * elf64-x86-64.c (elf_x86_64_finish_dynamic_sections): Add
1551 ENDBR64 to the TLSDESC PLT entry.
1553 2018-03-21 Alan Modra <amodra@gmail.com>
1555 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Trim uninteresting
1556 symbols. Use size_t counts. Delete redundant opd test.
1558 2018-03-21 Alan Modra <amodra@gmail.com>
1560 * elf32-ppc.c (ppc_elf_tls_optimize): Delete locsyms.
1562 2018-03-21 Alan Modra <amodra@gmail.com>
1564 * elf32-ppc.c (struct ppc_elf_link_hash_entry): Make tls_mask
1566 (update_local_sym_info): Likewise for local_got_tls_masks.
1567 (ppc_elf_tls_optimize): Likewise for lgot_masks.
1569 2018-03-21 Alan Modra <amodra@gmail.com>
1571 * elf64-ppc.c (ppc_size_one_stub): Fix comment typo.
1572 (ppc64_elf_layout_multitoc): Allocate relocs for tprel as we
1573 do in size_dynamic_sections.
1575 2018-03-21 Alan Modra <amodra@gmail.com>
1577 * elf64-ppc.c (ppc64_elf_relocate_section): Don't access rel[1]
1578 without first checking array bounds.
1579 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1581 2018-03-20 H.J. Lu <hongjiu.lu@intel.com>
1584 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Set
1585 non_ir_ref_dynamic if a symbol is made dynamic by --dynamic-list.
1587 2018-03-19 Nick Clifton <nickc@redhat.com>
1589 * po/es.po: Updated Spanish translation.
1591 2018-03-15 Max Filippov <jcmvbkbc@gmail.com>
1593 * elf32-xtensa.c (xlate_map_entry): Change types of address
1594 fields from 'unsigned' to 'bfd_vma'.
1595 (xlate_offset_with_removed_text): Use struct xlate_map_entry as
1596 the key argument to bsearch. Allow offsets past the end of a
1597 section, use the last map entry for translation of such offsets.
1599 2018-03-15 Kuan-Lin Chen <kuanlinchentw@gmail.com>
1601 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Removed.
1602 Not support the target feature.
1603 (nds32_elf_ex9_itb_base): Likewise.
1604 (nds32_elf_ex9_import_table): Likewise.
1605 (nds32_elf_ex9_finish): Likewise.
1606 (nds32_elf_ex9_reloc_jmp): Likewise.
1607 (nds32_elf_get_insn_with_reg): Likewise.
1608 (nds32_get_local_syms): Likewise.
1609 (nds32_elf_ex9_replace_instruction): Likewise.
1610 (nds32_elf_ifc_calc): Likewise.
1611 (nds32_elf_ifc_finish): Likewise.
1612 (nds32_elf_ifc_replace): Likewise.
1613 (nds32_elf_ifc_reloc): Likewise.
1615 2018-03-14 Alan Modra <amodra@gmail.com>
1617 * elf64-ppc.c (sfpr_define): Adjust for stub_sec size having
1618 sfpr size added before defining alias symbols.
1619 (ppc64_elf_build_stubs): Add stub section padding before
1620 copying sfpr contents and defining save/restore alias symbols.
1622 2018-03-14 H.J. Lu <hongjiu.lu@intel.com>
1625 * elflink.c (elf_gc_mark_debug_section): Also check the local
1626 debug definition section.
1628 2018-03-13 Nick Clifton <nickc@redhat.com>
1631 * pei-x86_64.c (pex64_get_unwind_info): Change to a boolean
1632 function. Add an end address parameter. Check access of the data
1633 pointer to make sure that they do not extend beyond the end
1634 address. Return FALSE if any check fails. Add the end address
1635 pointer to the ui structure.
1636 (pex64_xdata_print_uwd_codes): Check accesses of the raw unwind
1637 codes to make sure that they do not extend beyond the end address
1638 pointer. Print an error message and return immediately if any
1641 2018-03-09 Nick Clifton <nickc@redhat.com>
1643 * elf64-s390.c (elf_s390_relocate_section): Move check for
1644 relocations against non-allocated sections to before the code that
1645 handles ifunc relocations.
1646 * elf32-s390.c (elf_s390_relocate_section): Likewise.
1647 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Treat
1648 relocs against IFUNC symbols in non-allocated sections as relocs
1649 against FUNC symbols.
1650 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
1652 2018-03-08 H.J. Lu <hongjiu.lu@intel.com>
1655 * elf32-i386.c (elf_i386_relocate_section): Treat relocation
1656 against IFUNC symbol in SHT_NOTE section without SHF_ALLOC as
1657 relocation against FUNC symbol.
1658 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1660 2018-03-07 Renlin Li <renlin.li@arm.com>
1663 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Check absolute
1664 symbol, and don't emit relocation in specific case.
1666 2018-03-07 Alan Modra <amodra@gmail.com>
1668 * elf64-mips.c (mips_elf64_rtype_to_howto): Return NULL on error.
1669 (mips_elf64_slurp_one_reloc_table): Pass on error.
1671 2018-03-03 James Cowgill <james.cowgill@mips.com>
1672 Maciej W. Rozycki <macro@mips.com>
1675 * elfxx-mips.c (mips_elf_calculate_relocation): Only return
1676 after calling `undefined_symbol' hook if this is an error
1677 condition. Assume the value of 0 for the symbol requested
1680 2018-03-02 Jim Wilson <jimw@sifive.com>
1683 * elfnn-aarch64.c (_bfd_aarch64_resize_stubs): Add 8 bytes for branch
1684 and nop instead of 4.
1685 (elfNN_arch64_build_stubs): Add nop after branch. Increase size by
1688 2018-03-01 Jim Wilson <jimw@sifive.com>
1691 * elfnn-riscv.c (riscv_relax_delete_bytes): When adjust st_size, use
1692 else if instead of if.
1694 2018-03-01 Alan Modra <amodra@gmail.com>
1696 * elf32-ft32.c (ft32_info_to_howto_rela): Correct range test.
1698 2018-02-28 Alan Modra <amodra@gmail.com>
1701 * aoutx.h (swap_std_reloc_in): Correct r_index bound check.
1703 2018-02-28 Nick Clifton <nickc@redhat.com>
1707 * dwarf2.c (read_n_bytes): Replace size parameter with dwarf_block
1708 pointer. Drop unused abfd parameter. Check the size of the block
1709 before initialising the data field. Return the end pointer if the
1711 (read_attribute_value): Adjust invocations of read_n_bytes.
1714 * dwarf1.c (parse_die): Check the length of form blocks before
1715 advancing the data pointer.
1717 2018-02-28 Alan Modra <amodra@gmail.com>
1720 * aoutx.h (translate_symbol_table): Print an error message and set
1721 bfd_error on finding an invalid name string offset.
1723 2018-02-27 H.J. Lu <hongjiu.lu@intel.com>
1725 * config.in: Regenerated.
1726 * configure: Likewise.
1727 * configure.ac: Add --enable-separate-code.
1728 (DEFAULT_LD_Z_SEPARATE_CODE): New AC_DEFINE_UNQUOTED. Default
1729 to 1 for Linux/x86 targets,
1730 * elf64-x86-64.c (ELF_MAXPAGESIZE): Set to 0x1000 if
1731 DEFAULT_LD_Z_SEPARATE_CODE is 1.
1733 2018-02-27 Nick Clifton <nickc@redhat.com>
1735 * aout-cris.c (swap_ext_reloc_out): Standadize error/warning
1737 * elf-hppa.h (elf_hppa_info_to_howto_rel): Likewise.
1738 * elf32-i386.c (elf_i386_reloc_type_lookup): Likewise.
1739 * elf32-xtensa.c (elf_xtensa_reloc_type_lookup): Likewise.
1740 * elf64-ppc.c (ppc64_elf_reloc_type_lookup): Likewise.
1741 * elf64-s390.c (elf_s390_reloc_type_lookup): Likewise.
1742 * elf64-sh64.c (sh_elf64_info_to_howto): Likewise.
1743 * elfxx-ia64.c (ia64_elf_reloc_type_lookup): Likewise.
1744 * elfxx-sparc.c (_bfd_sparc_elf_reloc_type_lookup): Likewise.
1745 * elfxx-tilegx.c (tilegx_reloc_type_lookup): Likewise.
1748 * elf-bfd.h (struct elf_backend_data): Change the return type of
1749 the elf_info_to_howto and elf_info_to_howto_rel function pointers
1751 * elfcode.h (elf_slurp_reloc_table_from_section): Check the return
1752 value from the info_to_howto function and fail if that function
1754 * elf32-h8300.c (elf32_h8_relocate_section): Check return value
1755 from the info_to_howto function.
1756 (elf32_h8_relax_section): Likewise.
1757 * elf32-lm32.c (lm32_elf_relocate_section): Likewise.
1758 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
1759 * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise.
1760 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
1761 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
1762 * elf64-ia64-vms.c (elf64_ia64_relocate_section): Likewise.
1763 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Likewise.
1764 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
1765 * elfnn-ia64.c (elfNN_ia64_relocate_section): Likewise.
1766 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
1767 (riscv_elf_relocate_section): Likewise.
1768 * elf-hppa.h (elf_hppa_info_to_howto): Change return type to
1769 bfd_boolean. Issue an error message, set an error value and
1770 return FALSE if the reloc is not recognized.
1771 (elf_hppa_info_to_howto_rel): Likewise.
1772 * elf-m10200.c (mn10200_info_to_howto): Likewise.
1773 * elf-m10300.c (mn10300_info_to_howto): Likewise.
1774 * elf.c (_bfd_elf_no_info_to_howto): Likewise.
1775 * elf32-arc.c (arc_info_to_howto_rel): Likewise.
1776 * elf32-arm.c (elf32_arm_info_to_howto): Likewise.
1777 * elf32-avr.c (avr_info_to_howto_rela): Likewise.
1778 * elf32-bfin.c (bfin_info_to_howto): Likewise.
1779 * elf32-cr16.c (elf_cr16_info_to_howto): Likewise.
1780 * elf32-cr16c.c (elf_cr16c_info_to_howto): Likewise.
1781 * elf32-cris.c (elf_cr16c_info_to_howto_rel)
1782 (cris_info_to_howto_rela): Likewise.
1783 * elf32-crx.c (elf_crx_info_to_howto): Likewise.
1784 * elf32-d10v.c (d10v_info_to_howto_rel): Likewise.
1785 * elf32-d30v.c (d30v_info_to_howto_rel, d30v_info_to_howto_rela):
1787 * elf32-dlx.c (dlx_rtype_to_howto, elf32_dlx_info_to_howto)
1788 (elf32_dlx_info_to_howto_rel): Likewise.
1789 * elf32-epiphany.c (epiphany_info_to_howto_rela): Likewise.
1790 * elf32-fr30.c (fr30_info_to_howto_rela): Likewise.
1791 * elf32-frv.c (frv_info_to_howto_rela)
1792 (frvfdpic_info_to_howto_rel): Likewise.
1793 * elf32-ft32.c (ft32_info_to_howto_rela): Likewise.
1794 * elf32-gen.c (elf_generic_info_to_howto)
1795 (elf_generic_info_to_howto_rel): Likewise.
1796 * elf32-h8300.c (elf32_h8_info_to_howto)
1797 (elf32_h8_info_to_howto_rel): Likewise.
1798 * elf32-i370.c (i370_elf_info_to_howto): Likewise.
1799 * elf32-i386.c (elf_i386_reloc_type_lookup)
1800 (elf_i386_rtype_to_howto, elf_i386_info_to_howto_rel): Likewise.
1801 * elf32-i860.c (lookup_howto, elf32_i860_info_to_howto_rela):
1803 * elf32-i960.c (elf32_i960_info_to_howto_rel): Likewise.
1804 * elf32-ip2k.c (ip2k_info_to_howto_rela): Likewise.
1805 * elf32-iq2000.c (iq2000_info_to_howto_rela): Likewise.
1806 * elf32-lm32.c (lm32_info_to_howto_rela): Likewise.
1807 * elf32-m32c.c (m32c_info_to_howto_rela): Likewise.
1808 * elf32-m32r.c (m32r_info_to_howto_rel, m32r_info_to_howto):
1810 * elf32-m68hc11.c (m68hc11_info_to_howto_rel): Likewise.
1811 * elf32-m68hc12.c (m68hc11_info_to_howto_rel): Likewise.
1812 * elf32-m68k.c (rtype_to_howto): Likewise.
1813 * elf32-mcore.c (mcore_elf_info_to_howto): Likewise.
1814 * elf32-mep.c (mep_info_to_howto_rela): Likewise.
1815 * elf32-metag.c (metag_info_to_howto_rela): Likewise.
1816 * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise.
1817 * elf32-mips.c (mips_info_to_howto_rel, mips_info_to_howto_rela):
1819 * elf32-moxie.c (moxie_info_to_howto_rela): Likewise.
1820 * elf32-msp430.c (msp430_info_to_howto_rela): Likewise.
1821 * elf32-mt.c (mt_info_to_howto_rela): Likewise.
1822 * elf32-nds32.c (nds32_info_to_howto_rel, nds32_info_to_howto):
1824 * elf32-nios2.c (nios2_elf32_info_to_howto): Likewise.
1825 * elf32-or1k.c (or1k_info_to_howto_rela): Likewise.
1826 * elf32-pj.c (pj_elf_info_to_howto): Likewise.
1827 * elf32-ppc.c (ppc_elf_info_to_howto): Likewise.
1828 * elf32-pru.c (pru_elf32_info_to_howto): Likewise.
1829 * elf32-rl78.c (rl78_info_to_howto_rela): Likewise.
1830 * elf32-rx.c (rx_info_to_howto_rela): Likewise.
1831 * elf32-s390.c (elf_s390_info_to_howto): Likewise.
1832 * elf32-score.c (s3_bfd_score_info_to_howto)
1833 (_bfd_score_info_to_howto): Likewise.
1834 * elf32-score7.c (s7_bfd_score_info_to_howto): Likewise.
1835 * elf32-sh.c (sh_elf_info_to_howto): Likewise.
1836 * elf32-spu.c (spu_elf_info_to_howto): Likewise.
1837 * elf32-tic6x.c (elf32_tic6x_info_to_howto)
1838 (elf32_tic6x_info_to_howto_rel): Likewise.
1839 * elf32-tilepro.c (tilepro_info_to_howto_rela): Likewise.
1840 * elf32-v850.c (v850_elf_info_to_howto_rel)
1841 (v850_elf_info_to_howto_rela, v800_elf_info_to_howto): Likewise.
1842 * elf32-vax.c (rtype_to_howto): Likewise.
1843 * elf32-visium.c (visium_info_to_howto_rela): Likewise.
1844 * elf32-wasm32.c (elf32_wasm32_rtype_to_howto)
1845 (elf32_wasm32_info_to_howto_rela): Likewise.
1846 * elf32-xc16x.c (elf32_xc16x_info_to_howto): Likewise.
1847 * elf32-xgate.c (xgate_info_to_howto_rel): Likewise.
1848 * elf32-xstormy16.c (xstormy16_info_to_howto_rela): Likewise.
1849 * elf32-xtensa.c (elf_xtensa_info_to_howto_rela): Likewise.
1850 * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise.
1851 * elf64-gen.c (elf_generic_info_to_howto)
1852 (elf_generic_info_to_howto_rel): Likewise.
1853 * elf64-ia64-vms.c (elf64_ia64_info_to_howto): Likewise.
1854 * elf64-mips.c (mips_elf64_info_to_howto_rela): Likewise.
1855 * elf64-mmix.c (mmix_info_to_howto_rela): Likewise.
1856 * elf64-ppc.c (ppc64_elf_info_to_howto): Likewise.
1857 * elf64-s390.c (elf_s390_reloc_type_lookup): Likewise.
1858 * elf64-sh64.c (elf_s390_info_to_howto, sh_elf64_info_to_howto):
1860 * elf64-x86-64.c (elf_x86_64_info_to_howto): Likewise.
1861 * elfn32-mips.c (mips_info_to_howto_rel, mips_info_to_howto_rela):
1863 * elfnn-aarch64.c (elfNN_aarch64_info_to_howto): Likewise.
1864 * elfnn-ia64.c (elfNN_ia64_info_to_howto): Likewise.
1865 * elfnn-riscv.c (riscv_info_to_howto_rela): Likewise.
1866 * elfxx-ia64.c (ia64_elf_reloc_type_lookup): Likewise.
1867 * elfxx-sparc.c (_bfd_sparc_elf_info_to_howto): Likewise.
1868 * elfxx-tilegx.c (tilegx_info_to_howto_rela): Likewise.
1869 * elf32-score.h (s7_bfd_score_info_to_howto): Update prototype.
1870 * elfxx-sparc.h (_bfd_sparc_elf_info_to_howto): Update prototype.
1871 * elfxx-tilegx.h (tilegx_info_to_howto_rela): Update prototype.
1872 * elfxx-target.h (elf_info_to_howto, elf_info_to_howto_rel):
1875 2018-02-26 Jim Wilson <jimw@sifive.com>
1876 Stephan Schreiber <info@fs-driver.org>
1879 * elfnn-ia64.c (elfNN_ia64_relax_section): After ia64_elf_relax_brl
1880 call, set changed_contents and changed_relocs. Likewise after
1881 successful ia64_elf_relax_br call.
1883 2018-02-26 Alan Modra <amodra@gmail.com>
1885 * elf.c (assign_file_positions_except_relocs): Don't segfault
1886 when actual number of phdrs is less than allocated. Delete
1887 outdated comment. Formatting.
1889 2018-02-26 Alan Modra <amodra@gmail.com>
1891 * elf-m10300.c, * elf-s390-common.c, * elf32-arc.c, * elf32-cris.c,
1892 * elf32-dlx.c, * elf32-frv.c, * elf32-i370.c, * elf32-lm32.c,
1893 * elf32-m32r.c, * elf32-m68hc1x.c, * elf32-m68k.c,
1894 * elf32-microblaze.c, * elf32-msp430.c, * elf32-nds32.c,
1895 * elf32-nios2.c, * elf32-or1k.c, * elf32-rl78.c, * elf32-rx.c,
1896 * elf32-score.c, * elf32-score7.c, * elf32-sh-symbian.c,
1897 * elf32-sh.c, * elf32-spu.c, * elf32-v850.c, * elf32-xtensa.c,
1898 * elf64-alpha.c, * elf64-ia64-vms.c, * elf64-mmix.c,
1899 * elf64-sh64.c, * elf64-sparc.c, * elfnn-ia64.c, * elfxx-tilegx.c,
1900 * mmo.c, * osf-core.c, * srec.c, * vms-alpha.c: Standardize
1901 error/warning messages.
1903 2018-02-26 Alan Modra <amodra@gmail.com>
1905 * archive.c, * bfd.c, * linker.c, * reloc.c, * stabs.c,
1906 * syms.c: Standardize error/warning messages.
1908 2018-02-26 Alan Modra <amodra@gmail.com>
1910 * aout-adobe.c, * aout-cris.c, * i386linux.c, * m68klinux.c,
1911 * sparclinux.c, * coff-alpha.c, * coff-arm.c, * coff-mcore.c,
1912 * coffcode.h, * coffgen.c, * cofflink.c, * ecoff.c, * pe-mips.c,
1913 * peXXigen.c, * peicode.h: Standardize error/warning messages.
1915 2018-02-26 Alan Modra <amodra@gmail.com>
1917 * elf32-arm.c, * elfnn-aarch64.c: Standardize error/warning messages.
1919 2018-02-26 Alan Modra <amodra@gmail.com>
1921 * elfxx-mips.c: Standardize error/warning messages.
1923 2018-02-26 Alan Modra <amodra@gmail.com>
1925 * dwarf2.c, * elf-attrs.c, * elf-eh-frame.c, * elf.c, * elf32-gen.c,
1926 * elflink.c: Standardize error/warning messages. Replace use of
1927 linker callback einfo with _bfd_error_handler when possible.
1929 2018-02-26 Alan Modra <amodra@gmail.com>
1931 * aoutx.h, * coff-alpha.c, * coff-i860.c, * coff-m68k.c,
1932 * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c,
1933 * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-w65.c,
1934 * elf-bfd.h, * elf-m10300.c, * elf.c, * elf32-avr.c, * elf32-bfin.c,
1935 * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c,
1936 * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c,
1937 * elf32-fr30.c, * elf32-frv.c, * elf32-i370.c, * elf32-i386.c,
1938 * elf32-i960.c, * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c,
1939 * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c,
1940 * elf32-m68k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c,
1941 * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c,
1942 * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-or1k.c,
1943 * elf32-pj.c, * elf32-ppc.c, * elf32-rl78.c, * elf32-rx.c,
1944 * elf32-s390.c, * elf32-sh.c, * elf32-spu.c, * elf32-tic6x.c,
1945 * elf32-v850.c, * elf32-vax.c, * elf32-visium.c, * elf32-wasm32.c,
1946 * elf32-xgate.c, * elf32-xtensa.c, * elf64-alpha.c,
1947 * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c,
1948 * elf64-ppc.c, * elf64-s390.c, * elf64-sparc.c, * elf64-x86-64.c,
1949 * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c,
1950 * elfnn-riscv.c, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-riscv.h,
1951 * elfxx-sparc.c, * elfxx-sparc.h, * reloc.c: Standardize
1952 unrecognized/unsupported reloc message.
1954 2018-02-26 Alan Modra <amodra@gmail.com>
1956 * elf32-ppc.c: Standardize error/warning messages. Use
1957 _bfd_error_handler rather than einfo when einfo features not used.
1958 * elf64-ppc.c: Likewise.
1960 2018-02-23 Alan Modra <amodra@gmail.com>
1963 * elf.c (assign_file_positions_for_non_load_sections): Remove RELRO
1964 segment if no matching LOAD segment.
1966 2018-02-23 Kuan-Lin Chen <kuanlinchentw@gmail.com>
1968 * elf32-nds32.h: Define mask for ict_model.
1970 2018-02-20 Jason Duerstock <jason.duerstock@gmail.com>
1972 * elfnn-ia64.c (elf_backend_can_gc_sections): Enable.
1974 2018-02-19 Maciej W. Rozycki <macro@mips.com>
1977 2018-01-12 Vlad Ivanov <vlad@ivanov.email>
1979 * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when
1980 .reginfo section has wrong size.
1982 2018-02-19 Maciej W. Rozycki <macro@mips.com>
1984 * elfxx-mips.c (_bfd_mips_elf_always_size_sections): Set
1985 SEC_FIXED_SIZE and SEC_HAS_CONTENTS flags for `.reginfo' and
1986 `.MIPS.abiflags' sections.
1987 (_bfd_mips_elf_final_link): Avoid reading beyond `.reginfo'
1990 2018-02-19 Maciej W. Rozycki <macro@mips.com>
1992 * section.c (SEC_FIXED_SIZE): New macro.
1993 * bfd-in2.h: Regenerate.
1995 2018-02-19 Maciej W. Rozycki <macro@mips.com>
1997 * section.c (SEC_HAS_GOT_REF): Remove macro.
1998 * bfd-in2.h: Regenerate.
2000 2018-02-19 Alan Modra <amodra@gmail.com>
2002 * elf-attrs.c (_bfd_elf_parse_attributes): Correct _bfd_error_handler
2004 * elfxx-mips.c (_bfd_mips_elf_final_link): Likewise.
2005 * elfnn-riscv.c (_bfd_riscv_relax_align): Likewise.
2006 (_bfd_riscv_relax_pc): Likewise and fix typos.
2007 * libbfd-in.h (_bfd_error_handler): Add attribute printf.
2008 * libbfd.h: Regenerate.
2010 2018-02-19 Alan Modra <amodra@gmail.com>
2012 * dwarf2.c (read_section): Don't use 'll' format modifier.
2013 (find_abstract_instance): Likewise.
2014 * elfcore.h (elf_core_file_p): Likewise.
2016 2018-02-19 Alan Modra <amodra@gmail.com>
2018 * bfd-in.h: Include inttypes.h or if not available define
2019 PRId64, PRIu64 and PRIx64.
2020 * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Remove support for L
2021 modifier to print bfd_vma.
2022 * coff-arm.c, * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c,
2023 * coff-sh.c, * coff-tic80.c, * coffcode.h, * coffgen.c, * cofflink.c,
2024 * compress.c, * dwarf2.c, * elf-m10300.c, * elf.c, * elf32-arc.c,
2025 * elf32-arm.c, * elf32-bfin.c, * elf32-cris.c, * elf32-hppa.c,
2026 * elf32-i386.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32r.c,
2027 * elf32-m68k.c, * elf32-metag.c, * elf32-nds32.c, * elf32-nios2.c,
2028 * elf32-ppc.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c,
2029 * elf32-score7.c, * elf32-sh.c, * elf32-sh64.c, * elf32-spu.c,
2030 * elf32-tic6x.c, * elf32-tilepro.c, * elf32-v850.c, * elf32-vax.c,
2031 * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c,
2032 * elf64-mmix.c, * elf64-s390.c, * elf64-sh64.c, * elf64-x86-64.c,
2033 * elfcode.h, * elfcore.h, * elflink.c, * elfnn-aarch64.c,
2034 * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-mips.c, * elfxx-sparc.c,
2035 * elfxx-tilegx.c, * ieee.c, * ihex.c, * mach-o.c, * merge.c, * mmo.c,
2036 * peXXigen.c, * xcofflink.c: Replace use of Lx modifier with PRIx64,
2037 and cast input to uint64_t, and similarly for Ld and Lu.
2038 * bfd-in2.h: Regenerate.
2040 2018-02-19 Alan Modra <amodra@gmail.com>
2042 * elf32-arm.c, * elf32-hppa.c, * elf32-lm32.c, * elf32-m32r.c,
2043 * elf32-metag.c, * elf32-nds32.c, * elf32-or1k.c, * elf32-ppc.c,
2044 * elf32-s390.c, * elf32-sh.c, * elf32-tic6x.c, * elf32-tilepro.c,
2045 * elf64-ppc.c, * elf64-s390.c, * elflink.c, * elfnn-aarch64.c,
2046 * elfnn-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c,
2047 * reloc.c: Replace use of %R and %T in format strings passed to
2048 einfo and friends by %pR and %pT.
2050 2018-02-19 Alan Modra <amodra@gmail.com>
2052 * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Handle %pA and %pB in place
2054 * aout-adobe.c: Update all messages using %A and %B.
2055 * aout-cris.c: Likewise.
2056 * aoutx.h: Likewise.
2057 * archive.c: Likewise.
2058 * binary.c: Likewise.
2059 * cache.c: Likewise.
2060 * coff-alpha.c: Likewise.
2061 * coff-arm.c: Likewise.
2062 * coff-i860.c: Likewise.
2063 * coff-mcore.c: Likewise.
2064 * coff-ppc.c: Likewise.
2065 * coff-rs6000.c: Likewise.
2066 * coff-sh.c: Likewise.
2067 * coff-tic4x.c: Likewise.
2068 * coff-tic54x.c: Likewise.
2069 * coff-tic80.c: Likewise.
2070 * coff64-rs6000.c: Likewise.
2071 * coffcode.h: Likewise.
2072 * coffgen.c: Likewise.
2073 * cofflink.c: Likewise.
2074 * coffswap.h: Likewise.
2075 * compress.c: Likewise.
2076 * cpu-arm.c: Likewise.
2077 * ecoff.c: Likewise.
2078 * elf-attrs.c: Likewise.
2079 * elf-eh-frame.c: Likewise.
2080 * elf-ifunc.c: Likewise.
2081 * elf-m10300.c: Likewise.
2082 * elf-properties.c: Likewise.
2083 * elf-s390-common.c: Likewise.
2085 * elf32-arc.c: Likewise.
2086 * elf32-arm.c: Likewise.
2087 * elf32-avr.c: Likewise.
2088 * elf32-bfin.c: Likewise.
2089 * elf32-cr16.c: Likewise.
2090 * elf32-cr16c.c: Likewise.
2091 * elf32-cris.c: Likewise.
2092 * elf32-crx.c: Likewise.
2093 * elf32-d10v.c: Likewise.
2094 * elf32-d30v.c: Likewise.
2095 * elf32-epiphany.c: Likewise.
2096 * elf32-fr30.c: Likewise.
2097 * elf32-frv.c: Likewise.
2098 * elf32-gen.c: Likewise.
2099 * elf32-hppa.c: Likewise.
2100 * elf32-i370.c: Likewise.
2101 * elf32-i386.c: Likewise.
2102 * elf32-i960.c: Likewise.
2103 * elf32-ip2k.c: Likewise.
2104 * elf32-iq2000.c: Likewise.
2105 * elf32-lm32.c: Likewise.
2106 * elf32-m32c.c: Likewise.
2107 * elf32-m32r.c: Likewise.
2108 * elf32-m68hc11.c: Likewise.
2109 * elf32-m68hc12.c: Likewise.
2110 * elf32-m68hc1x.c: Likewise.
2111 * elf32-m68k.c: Likewise.
2112 * elf32-mcore.c: Likewise.
2113 * elf32-mep.c: Likewise.
2114 * elf32-metag.c: Likewise.
2115 * elf32-microblaze.c: Likewise.
2116 * elf32-moxie.c: Likewise.
2117 * elf32-msp430.c: Likewise.
2118 * elf32-mt.c: Likewise.
2119 * elf32-nds32.c: Likewise.
2120 * elf32-nios2.c: Likewise.
2121 * elf32-or1k.c: Likewise.
2122 * elf32-pj.c: Likewise.
2123 * elf32-ppc.c: Likewise.
2124 * elf32-rl78.c: Likewise.
2125 * elf32-rx.c: Likewise.
2126 * elf32-s390.c: Likewise.
2127 * elf32-score.c: Likewise.
2128 * elf32-score7.c: Likewise.
2129 * elf32-sh-symbian.c: Likewise.
2130 * elf32-sh.c: Likewise.
2131 * elf32-sh64.c: Likewise.
2132 * elf32-sparc.c: Likewise.
2133 * elf32-spu.c: Likewise.
2134 * elf32-tic6x.c: Likewise.
2135 * elf32-tilepro.c: Likewise.
2136 * elf32-v850.c: Likewise.
2137 * elf32-vax.c: Likewise.
2138 * elf32-visium.c: Likewise.
2139 * elf32-wasm32.c: Likewise.
2140 * elf32-xgate.c: Likewise.
2141 * elf32-xtensa.c: Likewise.
2142 * elf64-alpha.c: Likewise.
2143 * elf64-gen.c: Likewise.
2144 * elf64-hppa.c: Likewise.
2145 * elf64-ia64-vms.c: Likewise.
2146 * elf64-mmix.c: Likewise.
2147 * elf64-ppc.c: Likewise.
2148 * elf64-s390.c: Likewise.
2149 * elf64-sh64.c: Likewise.
2150 * elf64-sparc.c: Likewise.
2151 * elf64-x86-64.c: Likewise.
2152 * elfcode.h: Likewise.
2153 * elfcore.h: Likewise.
2154 * elflink.c: Likewise.
2155 * elfnn-aarch64.c: Likewise.
2156 * elfnn-ia64.c: Likewise.
2157 * elfnn-riscv.c: Likewise.
2158 * elfxx-mips.c: Likewise.
2159 * elfxx-sparc.c: Likewise.
2160 * elfxx-tilegx.c: Likewise.
2161 * elfxx-x86.c: Likewise.
2162 * hpux-core.c: Likewise.
2165 * libbfd.c: Likewise.
2166 * linker.c: Likewise.
2167 * mach-o.c: Likewise.
2168 * merge.c: Likewise.
2170 * oasys.c: Likewise.
2171 * pdp11.c: Likewise.
2172 * pe-mips.c: Likewise.
2173 * peXXigen.c: Likewise.
2174 * peicode.h: Likewise.
2175 * reloc.c: Likewise.
2176 * rs6000-core.c: Likewise.
2178 * stabs.c: Likewise.
2179 * vms-alpha.c: Likewise.
2180 * xcofflink.c: Likewise.
2182 2018-02-19 Alan Modra <amodra@gmail.com>
2185 * elf.c (IS_TBSS): Define.
2186 (_bfd_elf_map_sections_to_segments): Use IS_TBSS.
2187 (assign_file_positions_for_non_load_sections): Revert last change.
2188 Properly calculate load segment limits to compare against relro limits.
2190 2018-02-17 Alan Modra <amodra@gmail.com>
2193 * elf.c (assign_file_positions_for_non_load_sections): Ignore
2194 degenerate zero size PT_LOAD segments when finding one overlapping
2195 the PT_GNU_RELRO segment.
2197 2018-02-16 Alan Modra <amodra@gmail.com>
2199 * libbfd.c (_bfd_bool_bfd_false_error): Rename from bfd_false.
2200 (_bfd_bool_bfd_true): Rename from bfd_true.
2201 (_bfd_ptr_bfd_null_error): Rename from bfd_nullvoidptr.
2202 (_bfd_int_bfd_0): Rename from bfd_0.
2203 (_bfd_uint_bfd_0): Rename from bfd_0u.
2204 (_bfd_long_bfd_0): Rename from bfd_0l.
2205 (_bfd_long_bfd_n1_error): Rename from _bfd_n1.
2206 (_bfd_void_bfd): Rename from bfd_void.
2207 (_bfd_bool_bfd_false, _bfd_bool_bfd_asymbol_false),
2208 (_bfd_bool_bfd_link_false_error),
2209 (_bfd_bool_bfd_link_true, _bfd_bool_bfd_bfd_true),
2210 (_bfd_bool_bfd_uint_true, _bfd_bool_bfd_ptr_true),
2211 (_bfd_bool_bfd_asection_bfd_asection_true),
2212 (_bfd_bool_bfd_asymbol_bfd_asymbol_true),
2213 (_bfd_void_bfd_link, _bfd_void_bfd_asection): New functions.
2214 * archive.c (_bfd_noarchive_get_elt_at_index),
2215 (_bfd_noarchive_openr_next_archived_file),
2216 (_bfd_noarchive_construct_extended_name_table),
2217 (_bfd_noarchive_write_ar_hdr, _bfd_noarchive_truncate_arname),
2218 (_bfd_noarchive_write_armap): New functions.
2219 * archures.c (_bfd_nowrite_set_arch_mach): New function.
2220 * coff-alpha.c (alpha_ecoff_swap_coff_aux_in),
2221 (alpha_ecoff_swap_coff_sym_in, alpha_ecoff_swap_coff_lineno_in),
2222 (alpha_ecoff_swap_coff_aux_out, alpha_ecoff_swap_coff_sym_out),
2223 (alpha_ecoff_swap_coff_lineno_out),
2224 (alpha_ecoff_swap_coff_reloc_out): New functions.
2225 * coff-mips.c (mips_ecoff_swap_coff_aux_in),
2226 (mips_ecoff_swap_coff_sym_in, mips_ecoff_swap_coff_lineno_in),
2227 (mips_ecoff_swap_coff_aux_out, mips_ecoff_swap_coff_sym_out),
2228 (mips_ecoff_swap_coff_lineno_out),
2229 (mips_ecoff_swap_coff_reloc_out): New functions.
2230 * coffcode.h (coff_set_alignment_hook): Replace define with
2232 (symname_in_debug_hook): Likewise.
2233 * ecoff.c (_bfd_ecoff_set_alignment_hook): New function.
2234 * elfxx-target.h (elf_backend_allow_non_load_phdr): Default to 0.
2235 * elf.c (assign_file_positions_except_relocs): Test
2236 elf_backend_allow_non_load_phdr for NULL.
2237 * elflink.c (_bfd_elf_omit_section_dynsym_default): Rename from
2238 _bfd_elf_link_omit_section_dynsym. Update uses.
2239 (_bfd_elf_omit_section_dynsym_all): New function.
2240 * elf-bfd.h (_bfd_elf_link_omit_section_dynsym): Delete.
2241 (_bfd_elf_omit_section_dynsym_default): Declare.
2242 (_bfd_elf_omit_section_dynsym_all): Declare.
2243 * linker.c (_bfd_nolink_sizeof_headers, _bfd_nolink_bfd_relax_section),
2244 (_bfd_nolink_bfd_get_relocated_section_contents),
2245 (_bfd_nolink_bfd_lookup_section_flags),
2246 (_bfd_nolink_bfd_is_group_section, _bfd_nolink_bfd_discard_group),
2247 (_bfd_nolink_bfd_link_hash_table_create),
2248 (_bfd_nolink_bfd_link_just_syms),
2249 (_bfd_nolink_bfd_copy_link_hash_symbol_type),
2250 (_bfd_nolink_bfd_link_split_section),
2251 (_bfd_nolink_section_already_linked),
2252 (_bfd_nolink_bfd_define_common_symbol),
2253 (_bfd_nolink_bfd_define_start_stop): New functions.
2254 * reloc.c (_bfd_norelocs_bfd_reloc_type_lookup),
2255 (_bfd_norelocs_bfd_reloc_name_lookup),
2256 (_bfd_nodynamic_canonicalize_dynamic_reloc): New functions.
2257 * section.c (_bfd_nowrite_set_section_contents): New function.
2258 * syms.c (_bfd_nosymbols_canonicalize_symtab),
2259 (_bfd_nosymbols_print_symbol, _bfd_nosymbols_get_symbol_info),
2260 (_bfd_nosymbols_get_symbol_version_string),
2261 (_bfd_nosymbols_bfd_is_local_label_name),
2262 (_bfd_nosymbols_get_lineno, _bfd_nosymbols_find_nearest_line),
2263 (_bfd_nosymbols_find_line, _bfd_nosymbols_find_inliner_info),
2264 (_bfd_nosymbols_bfd_make_debug_symbol),
2265 ( _bfd_nosymbols_read_minisymbols),
2266 ( _bfd_nosymbols_minisymbol_to_symbol),
2267 (_bfd_nodynamic_get_synthetic_symtab): New functions.
2268 * libbfd-in.h: Declare new functions. Update existing defines,
2270 * aix386-core.c: Update to use new hooks. Formatting.
2271 * aout-adobe.c: Likewise.
2272 * aout-arm.c: Likewise.
2273 * aout-target.h: Likewise.
2274 * aout-tic30.c: Likewise.
2275 * aoutf1.h: Likewise.
2276 * binary.c: Likewise.
2278 * cisco-core.c: Likewise.
2279 * coff-alpha.c: Likewise.
2280 * coff-i386.c: Likewise.
2281 * coff-i860.c: Likewise.
2282 * coff-i960.c: Likewise.
2283 * coff-ia64.c: Likewise.
2284 * coff-mips.c: Likewise.
2285 * coff-ppc.c: Likewise.
2286 * coff-rs6000.c: Likewise.
2287 * coff-sh.c: Likewise.
2288 * coff-tic30.c: Likewise.
2289 * coff-tic54x.c: Likewise.
2290 * coff-x86_64.c: Likewise.
2291 * coff64-rs6000.c: Likewise.
2292 * coffcode.h: Likewise.
2293 * elf-m10300.c: Likewise.
2294 * elf32-cr16.c: Likewise.
2295 * elf32-lm32.c: Likewise.
2296 * elf32-m32r.c: Likewise.
2297 * elf32-metag.c: Likewise.
2298 * elf32-score.c: Likewise.
2299 * elf32-score7.c: Likewise.
2300 * elf32-tilepro.c: Likewise.
2301 * elf32-xstormy16.c: Likewise.
2302 * elf32-xtensa.c: Likewise.
2303 * elf64-alpha.c: Likewise.
2304 * elf64-hppa.c: Likewise.
2305 * elf64-ia64-vms.c: Likewise.
2306 * elf64-mmix.c: Likewise.
2307 * elf64-sh64.c: Likewise.
2308 * elfnn-ia64.c: Likewise.
2309 * elfxx-sparc.c: Likewise.
2310 * elfxx-target.h: Likewise.
2311 * elfxx-tilegx.c: Likewise.
2312 * elfxx-x86.h: Likewise.
2313 * hp300hpux.c: Likewise.
2314 * hppabsd-core.c: Likewise.
2315 * hpux-core.c: Likewise.
2316 * i386msdos.c: Likewise.
2317 * i386os9k.c: Likewise.
2320 * irix-core.c: Likewise.
2321 * libaout.h: Likewise.
2322 * libecoff.h: Likewise.
2323 * mach-o-target.c: Likewise.
2324 * mach-o.c: Likewise.
2325 * mipsbsd.c: Likewise.
2327 * netbsd-core.c: Likewise.
2328 * nlm-target.h: Likewise.
2329 * oasys.c: Likewise.
2330 * osf-core.c: Likewise.
2331 * pdp11.c: Likewise.
2332 * pe-mips.c: Likewise.
2333 * pe-x86_64.c: Likewise.
2335 * plugin.c: Likewise.
2336 * ppcboot.c: Likewise.
2337 * ptrace-core.c: Likewise.
2338 * sco5-core.c: Likewise.
2340 * sparclynx.c: Likewise.
2342 * tekhex.c: Likewise.
2343 * trad-core.c: Likewise.
2344 * verilog.c: Likewise.
2345 * versados.c: Likewise.
2346 * vms-alpha.c: Likewise.
2347 * vms-lib.c: Likewise.
2348 * wasm-module.c: Likewise.
2350 * libbfd.h: Regenerate.
2352 2018-02-15 Jim Wilson <jimw@sifive.com>
2354 * elfnn-riscv.c (_bfd_riscv_relax_section): Ifdef out check to ignore
2355 symbols whose section address is zero.
2357 * elfnn-riscv.c (riscv_elf_relocate_section): Use bfd_reloc_dangerous
2358 when pcrel_lo reloc has an addend. Use reloc_dangerous callback for
2359 bfd_reloc_dangerous. Use einfo instead of warning callback for errors.
2360 Add %X%P to error messages.
2362 2018-02-15 Eric Botcazou <ebotcazou@adacore.com>
2365 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
2366 Pass FALSE instead of TRUE as 'create' argument to bfd_link_hash_lookup
2367 and assert that the result of the call is not NULL.
2369 2018-02-14 Nick Clifton <nickc@redhat.com>
2372 Revert previous delta. Add extra casts to avoid compile time
2374 * libbfd-in.h (_bfd_generic_bfd_copy_private_bfd_data): Add extra
2375 cast to avoid warning from gcc v8 compiler.
2376 (_bfd_generic_bfd_merge_private_bfd_data): Likewise.
2377 (_bfd_generic_bfd_set_private_flags): Likewise.
2378 (_bfd_generic_bfd_copy_private_section_data): Likewise.
2379 (_bfd_generic_bfd_copy_private_symbol_data): Likewise.
2380 (_bfd_generic_bfd_copy_private_header_data): Likewise.
2381 (_bfd_generic_bfd_print_private_bfd_data): Likewise.
2382 (_bfd_noarchive_construct_extended_name_table): Likewise.
2383 (_bfd_noarchive_truncate_arname): Likewise.
2384 (_bfd_noarchive_write_ar_hdr): Likewise.
2385 (_bfd_noarchive_get_elt_at_index): Likewise.
2386 (_bfd_nosymbols_canonicalize_symtab): Likewise.
2387 (_bfd_nosymbols_print_symbol): Likewise.
2388 (_bfd_nosymbols_get_symbol_info): Likewise.
2389 (_bfd_nosymbols_get_symbol_version_string): Likewise.
2390 (_bfd_nosymbols_bfd_is_local_label_name): Likewise.
2391 (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise.
2392 (_bfd_nosymbols_get_lineno): Likewise.
2393 (_bfd_nosymbols_find_nearest_line): Likewise.
2394 (_bfd_nosymbols_find_line): Likewise.
2395 (_bfd_nosymbols_find_inliner_info): Likewise.
2396 (_bfd_nosymbols_bfd_make_debug_symbol): Likewise.
2397 (_bfd_nosymbols_read_minisymbols): Likewise.
2398 (_bfd_nosymbols_minisymbol_to_symbol): Likewise.
2399 (_bfd_norelocs_bfd_reloc_type_lookup): Likewise.
2400 (_bfd_norelocs_bfd_reloc_name_lookup): Likewise.
2401 (_bfd_nowrite_set_arch_mach): Likewise.
2402 (_bfd_nowrite_set_section_contents): Likewise.
2403 (_bfd_nolink_sizeof_headers): Likewise.
2404 (_bfd_nolink_bfd_get_relocated_section_contents): Likewise.
2405 (_bfd_nolink_bfd_relax_section): Likewise.
2406 (_bfd_nolink_bfd_gc_sections): Likewise.
2407 (_bfd_nolink_bfd_lookup_section_flags): Likewise.
2408 (_bfd_nolink_bfd_merge_sections): Likewise.
2409 (_bfd_nolink_bfd_is_group_section): Likewise.
2410 (_bfd_nolink_bfd_discard_group): Likewise.
2411 (_bfd_nolink_bfd_link_hash_table_create): Likewise.
2412 (_bfd_nolink_bfd_link_add_symbols): Likewise.
2413 (_bfd_nolink_bfd_link_just_syms): Likewise.
2414 (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise.
2415 (_bfd_nolink_bfd_final_link): Likewise.
2416 (_bfd_nolink_bfd_link_split_section): Likewise.
2417 (_bfd_nolink_section_already_linked): Likewise.
2418 (_bfd_nolink_bfd_define_common_symbol): Likewise.
2419 (_bfd_nolink_bfd_define_start_stop): Likewise.
2420 (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise.
2421 (_bfd_nodynamic_get_synthetic_symtab): Likewise.
2422 (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise.
2423 (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise.
2424 * libbfd.c (bfd_false_any): Delete.
2425 (bfd_true_any, bfd_nullvoidptr_any, bfd_0_any): Delete.
2426 (bfd_0u_any, bfd_0l_any, _bfd_n1_any, bfd_void_any): Delete.
2427 * libbfd.h (extern): Regenerate
2428 * aout-target.h (MY_bfd_is_target_special_symbol): Add extra
2429 cast to avoid warning from gcc v8 compiler.
2430 * aout-tic30.c (tic30_aout_set_arch_mach): Likewise.
2431 * binary.c (binary_get_symbol_info): Likewise.
2432 * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
2433 * coff-mips.c (mips_ecoff_backend_data): Likewise.
2434 * coffcode.h (coff_set_alignment_hook): Likewise.
2435 (symname_in_debug_hook): Likewise.
2436 (bfd_coff_backend_data bigobj_swap_table): Likewise.
2437 * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise.
2438 * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise.
2439 * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise.
2440 * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise.
2441 * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise.
2442 * elf32-score.c (elf_backend_omit_section_dynsym): Likewise.
2443 * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise.
2444 * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise.
2445 * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise.
2446 * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise.
2447 * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise.
2448 * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise.
2449 * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise.
2450 * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise.
2451 * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise.
2452 * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise.
2453 (bfd_elfNN_bfd_make_debug_symbol): Likewise.
2454 (bfd_elfNN_bfd_merge_private_bfd_data): Likewise.
2455 (bfd_elfNN_bfd_set_private_flags): Likewise.
2456 (bfd_elfNN_bfd_is_target_special_symbol): Likewise.
2457 (elf_backend_init_index_section): Likewise.
2458 (elf_backend_allow_non_load_phdr): Likewise.
2459 * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise.
2460 * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise.
2461 * ieee.c (ieee_construct_extended_name_table): Likewise.
2462 (ieee_write_armap): Likewise.
2463 (ieee_write_ar_hdr): Likewise.
2464 (ieee_bfd_is_target_special_symbol): Likewise.
2465 * ihex.c (ihex_canonicalize_symtab): Likewise.
2466 (ihex_bfd_is_target_special_symbol): Likewise.
2467 * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise.
2468 * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise.
2469 (_bfd_ecoff_set_alignment_hook): Likewise.
2470 * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise.
2471 * mmo.c (mmo_bfd_is_target_special_symbol): Likewise.
2472 * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise.
2473 * oasys.c (oasys_construct_extended_name_table): Likewise.
2474 (oasys_write_armap): Likewise.
2475 (oasys_write_ar_hdr): Likewise.
2476 (oasys_bfd_is_target_special_symbol): Likewise.
2477 * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise.
2478 * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise.
2479 * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise.
2480 * som.c (som_bfd_is_target_special_symbol): Likewise.
2481 * srec.c (srec_bfd_is_target_special_symbol): Likewise.
2482 * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise.
2483 * verilog.c (verilog_bfd_is_target_special_symbol): Likewise.
2484 * versados.c (versados_bfd_is_target_special_symbol): Likewise.
2485 (versados_bfd_reloc_name_lookup): Likewise.
2486 * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise.
2487 (vms_bfd_define_start_stop): Likewise.
2488 (alpha_vms_bfd_is_target_special_symbol): Likewise.
2489 * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise.
2490 * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise.
2492 2018-02-14 H.J. Lu <hongjiu.lu@intel.com>
2495 * elf32-i386.c (elf_i386_check_relocs): Pass FALSE for non
2496 PC-relative PLT to NEED_DYNAMIC_RELOCATION_P.
2497 * elf64-x86-64.c (elf_x86_64_check_relocs): Create PLT for
2498 R_X86_64_PC32 reloc against dynamic function in data section.
2499 Pass TRUE for PC-relative PLT to NEED_DYNAMIC_RELOCATION_P.
2500 (elf_x86_64_relocate_section): Use PLT for R_X86_64_PC32 reloc
2501 against dynamic function in data section.
2502 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Use PLT in PIE as
2503 function address only if pcrel_plt is true.
2504 (_bfd_x86_elf_link_hash_table_create): Set pcrel_plt.
2505 * elfxx-x86.h (NEED_DYNAMIC_RELOCATION_P): Add PCREL_PLT for
2506 PC-relative PLT. If PLT is PC-relative, don't generate dynamic
2507 PC-relative relocation against a function definition in data
2508 secton in PIE. Remove the obsolete comments.
2509 (elf_x86_link_hash_table): Add pcrel_plt.
2511 2018-02-13 H.J. Lu <hongjiu.lu@intel.com>
2513 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Check bfd_link_dll,
2514 instead of bfd_link_pic, for building shared library.
2516 2018-02-13 H.J. Lu <hongjiu.lu@intel.com>
2519 * elf64-x86-64.c (is_32bit_relative_branch): Removed.
2520 (elf_x86_64_relocate_section): Check PIC relocations in PIE.
2521 Remove is_32bit_relative_branch usage. Disallow PC32 reloc
2522 against protected function in shared object.
2524 2018-02-13 Sergei Trofimovich <slyfox@inbox.ru>
2527 * po/ru.po: Fix typo in Russian translation.
2529 2018-02-13 Maciej W. Rozycki <macro@mips.com>
2531 * wasm-module.c (wasm_scan_name_function_section): Rename
2532 `index' local variable to `idx'.
2534 2018-02-13 Nick Clifton <nickc@redhat.com>
2537 Fix compile time warnings generated by gcc version 8.
2538 * libbfd-in.h: Remove extraneous text from prototypes.
2539 Add prototypes for bfd_false_any, bfd_true_any,
2540 bfd_nullvoidptr_any, bfd_0_any, bfd_0u_any, bfd_0l_any,
2541 bfd_n1_any, bfd_void_any.
2542 (_bfd_generic_bfd_copy_private_bfd_data): Use vararg based dummy
2544 (_bfd_generic_bfd_merge_private_bfd_data): Likewise.
2545 (_bfd_generic_bfd_set_private_flags): Likewise.
2546 (_bfd_generic_bfd_copy_private_section_data): Likewise.
2547 (_bfd_generic_bfd_copy_private_symbol_data): Likewise.
2548 (_bfd_generic_bfd_copy_private_header_data): Likewise.
2549 (_bfd_generic_bfd_print_private_bfd_data): Likewise.
2550 (_bfd_noarchive_construct_extended_name_table): Likewise.
2551 (_bfd_noarchive_truncate_arname): Likewise.
2552 (_bfd_noarchive_write_ar_hdr): Likewise.
2553 (_bfd_noarchive_get_elt_at_index): Likewise.
2554 (_bfd_nosymbols_canonicalize_symtab): Likewise.
2555 (_bfd_nosymbols_print_symbol): Likewise.
2556 (_bfd_nosymbols_get_symbol_info): Likewise.
2557 (_bfd_nosymbols_get_symbol_version_string): Likewise.
2558 (_bfd_nosymbols_bfd_is_local_label_name): Likewise.
2559 (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise.
2560 (_bfd_nosymbols_get_lineno): Likewise.
2561 (_bfd_nosymbols_find_nearest_line): Likewise.
2562 (_bfd_nosymbols_find_line): Likewise.
2563 (_bfd_nosymbols_find_inliner_info): Likewise.
2564 (_bfd_nosymbols_bfd_make_debug_symbol): Likewise.
2565 (_bfd_nosymbols_read_minisymbols): Likewise.
2566 (_bfd_nosymbols_minisymbol_to_symbol): Likewise.
2567 (_bfd_norelocs_bfd_reloc_type_lookup): Likewise.
2568 (_bfd_norelocs_bfd_reloc_name_lookup): Likewise.
2569 (_bfd_nowrite_set_arch_mach): Likewise.
2570 (_bfd_nowrite_set_section_contents): Likewise.
2571 (_bfd_nolink_sizeof_headers): Likewise.
2572 (_bfd_nolink_bfd_get_relocated_section_contents): Likewise.
2573 (_bfd_nolink_bfd_relax_section): Likewise.
2574 (_bfd_nolink_bfd_gc_sections): Likewise.
2575 (_bfd_nolink_bfd_lookup_section_flags): Likewise.
2576 (_bfd_nolink_bfd_merge_sections): Likewise.
2577 (_bfd_nolink_bfd_is_group_section): Likewise.
2578 (_bfd_nolink_bfd_discard_group): Likewise.
2579 (_bfd_nolink_bfd_link_hash_table_create): Likewise.
2580 (_bfd_nolink_bfd_link_add_symbols): Likewise.
2581 (_bfd_nolink_bfd_link_just_syms): Likewise.
2582 (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise.
2583 (_bfd_nolink_bfd_final_link): Likewise.
2584 (_bfd_nolink_bfd_link_split_section): Likewise.
2585 (_bfd_nolink_section_already_linked): Likewise.
2586 (_bfd_nolink_bfd_define_common_symbol): Likewise.
2587 (_bfd_nolink_bfd_define_start_stop): Likewise.
2588 (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise.
2589 (_bfd_nodynamic_get_synthetic_symtab): Likewise.
2590 (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise.
2591 (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise.
2592 * libbfd.c (bfd_false_any): New function. Like bfd_false but
2593 accepts one or more arguments.
2594 (bfd_true_any): Likewise.
2595 (bfd_nullvoidptr_any): Likewise.
2596 (bfd_0_any): Likewise.
2597 (bfd_0u_any): Likewise.
2598 (bfd_0l_any): Likewise.
2599 (_bfd_n1_any): Likewise.
2600 (bfd_void_any): Likewise.
2601 * libbfd.h (extern): Regenerate
2602 * aout-target.h (MY_bfd_is_target_special_symbol): Use vararg
2603 based dummy function.
2604 * aout-tic30.c (tic30_aout_set_arch_mach): Likewise.
2605 * binary.c (binary_get_symbol_info): Likewise.
2606 * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
2607 * coff-mips.c (mips_ecoff_backend_data): Likewise.
2608 * coffcode.h (coff_set_alignment_hook): Likewise.
2609 (symname_in_debug_hook): Likewise.
2610 (bfd_coff_backend_data bigobj_swap_table): Likewise.
2611 * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise.
2612 * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise.
2613 * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise.
2614 * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise.
2615 * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise.
2616 * elf32-score.c (elf_backend_omit_section_dynsym): Likewise.
2617 * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise.
2618 * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise.
2619 * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise.
2620 * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise.
2621 * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise.
2622 * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise.
2623 * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise.
2624 * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise.
2625 * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise.
2626 * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise.
2627 (bfd_elfNN_bfd_make_debug_symbol): Likewise.
2628 (bfd_elfNN_bfd_merge_private_bfd_data): Likewise.
2629 (bfd_elfNN_bfd_set_private_flags): Likewise.
2630 (bfd_elfNN_bfd_is_target_special_symbol): Likewise.
2631 (elf_backend_init_index_section): Likewise.
2632 (elf_backend_allow_non_load_phdr): Likewise.
2633 * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise.
2634 * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise.
2635 * ieee.c (ieee_construct_extended_name_table): Likewise.
2636 (ieee_write_armap): Likewise.
2637 (ieee_write_ar_hdr): Likewise.
2638 (ieee_bfd_is_target_special_symbol): Likewise.
2639 * ihex.c (ihex_canonicalize_symtab): Likewise.
2640 (ihex_bfd_is_target_special_symbol): Likewise.
2641 * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise.
2642 * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise.
2643 (_bfd_ecoff_set_alignment_hook): Likewise.
2644 * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise.
2645 * mmo.c (mmo_bfd_is_target_special_symbol): Likewise.
2646 * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise.
2647 * oasys.c (oasys_construct_extended_name_table): Likewise.
2648 (oasys_write_armap): Likewise.
2649 (oasys_write_ar_hdr): Likewise.
2650 (oasys_bfd_is_target_special_symbol): Likewise.
2651 * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise.
2652 * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise.
2653 * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise.
2654 * som.c (som_bfd_is_target_special_symbol): Likewise.
2655 * srec.c (srec_bfd_is_target_special_symbol): Likewise.
2656 * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise.
2657 * verilog.c (verilog_bfd_is_target_special_symbol): Likewise.
2658 * versados.c (versados_bfd_is_target_special_symbol): Likewise.
2659 (versados_bfd_reloc_name_lookup): Likewise.
2660 * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise.
2661 (vms_bfd_define_start_stop): Likewise.
2662 (alpha_vms_bfd_is_target_special_symbol): Likewise.
2663 * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise.
2664 * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise.
2665 * elf32-arc.c (get_replace_function): Assign replacement function
2667 * elf32-i370.c (i370_noop): Update prototype.
2669 2018-02-13 Alan Modra <amodra@gmail.com>
2672 * elf.c (_bfd_elf_fixup_group_sections): Account for removed
2673 relocation sections. If size reduces to just the flag word,
2674 remove that too and mark with SEC_EXCLUDE.
2675 * elflink.c (bfd_elf_final_link): Strip empty group sections.
2677 2018-02-13 Alan Modra <amodra@gmail.com>
2680 * elf.c (assign_file_positions_for_non_load_sections): Rewrite
2683 2018-02-12 Zebediah Figura <z.figura12@gmail.com>
2685 * i386msdos.c (msdos_mkobject); New function.
2686 (msdos_object_p): New function.
2687 (i386_msdos_vec): Use msdos_object_p as the check_format
2689 * peicode.h: Rename external_PEI_DOS_hdr, DOSMAGIC, and
2690 NT_SIGNATURE to external_DOS_hdr, IMAGE_DOS_SIGNATURE, and
2692 * peXXigen.c: Likewise.
2693 * coff-ia64.c: Likewise.
2695 2018-02-12 Nick Clifton <nickc@redhat.com>
2697 * elf32-nds32.c (nds32_elf_relax_longjump3): Remove redundant
2699 * elf32-arc.c (elf_arc_relocate_section): Likewise.
2701 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
2703 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Reorder conditions.
2704 (sparc_elf_append_rela): Assert that there is enough room in section.
2705 (_bfd_sparc_elf_copy_indirect_symbol): Fix formatting.
2706 (_bfd_sparc_elf_adjust_dynamic_symbol): Minor tweak.
2707 (allocate_dynrelocs): Remove outdated comments and reorder conditions.
2708 For a symbol subject to a GOT relocation, reserve a slot in the
2709 relocation section if the symbol isn't dynamic and we are in PIC mode.
2710 (_bfd_sparc_elf_relocate_section) <R_SPARC_GOTDATA_OP>: If relocation
2711 is relaxed and a slot was reserved, generate a R_SPARC_NONE relocation.
2712 <R_SPARC_GOTDATA_OP_HIX22>: Adjust comments.
2713 <R_SPARC_PC10>: Reorder conditions. Remove always-false assertion.
2714 (_bfd_sparc_elf_finish_dynamic_symbol): Rename local_undefweak into
2715 resolved_to_zero. Do not generate a dynamic GOT relocation for an
2716 undefined weak symbol with non-default visibility. Remove superfluous
2717 'else' and fix formatting.
2719 2018-02-09 H.J. Lu <hongjiu.lu@intel.com>
2721 * elf32-i386.c (elf_i386_get_synthetic_symtab): Also handle
2723 (i386_elf32_sol2_vec): Don't declare.
2724 (elf_i386_link_setup_gnu_properties): Also handle is_solaris.
2725 Don't set need_global_offset_table.
2726 (elf_i386_solaris_arch_bed): New.
2727 (elf_backend_arch_data): Set to elf_i386_solaris_arch_bed for
2729 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Check
2730 target_os != is_nacl instead of target_os == is_normal.
2731 (x86_64_elf64_sol2_vec): Don't declare.
2732 (elf_x86_64_link_setup_gnu_properties): Check target_os !=
2733 is_nacl instead of target_os == is_normal. Don't set
2734 need_global_offset_table.
2735 (elf_x86_64_solaris_arch_bed): New.
2736 (elf_backend_arch_data): Set to elf_x86_64_solaris_arch_bed for
2738 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep
2739 _GLOBAL_OFFSET_TABLE_ for Solaris.
2740 (_bfd_x86_elf_link_setup_gnu_properties): Don't copy
2741 need_global_offset_table.
2742 * elfxx-x86.h (elf_x86_target_os): Add is_solaris.
2743 (elf_x86_link_hash_table): Remove need_global_offset_table.
2744 (elf_x86_init_table): Likewise.
2746 2018-02-08 H.J. Lu <hongjiu.lu@intel.com>
2748 * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
2750 (i386_elf32_sol2_vec): Declared.
2751 (elf_i386_link_setup_gnu_properties): Set
2752 need_global_offset_table with info->output_bfd->xvec.
2753 * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
2755 (x86_64_elf64_sol2_vec): Declared.
2756 (elf_x86_64_link_setup_gnu_properties): Set
2757 need_global_offset_table with info->output_bfd->xvec.
2759 2018-02-08 H.J. Lu <hongjiu.lu@intel.com>
2761 * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
2763 (elf_i386_link_setup_gnu_properties): Set need_global_offset_table
2765 * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
2767 (elf_x86_64_link_setup_gnu_properties): Set
2768 need_global_offset_table for Solaris.
2769 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep the
2770 unused _GLOBAL_OFFSET_TABLE_ for Solaris.
2771 (_bfd_x86_elf_link_setup_gnu_properties): Copy
2772 need_global_offset_table.
2773 * elfxx-x86.h (elf_x86_link_hash_table): Add
2774 need_global_offset_table.
2775 (elf_x86_init_table): Likewise.
2777 2018-02-08 Jim Wilson <jimw@sifive.com>
2779 * elfnn-riscv.c (riscv_elf_relocate_section): Add comment for previous
2782 2018-02-08 Nick Clifton <nickc@redhat.com>
2785 * elf.c (elf_parse_notes): Reject notes with excessuively large
2788 2018-02-07 Alan Modra <amodra@gmail.com>
2790 Revert 2018-01-17 Alan Modra <amodra@gmail.com>
2791 * elf32-ppc.c: Remove speculation barrier support.
2792 * elf32-ppc.h: Likewise.
2793 * elf64-ppc.c: Likewise.
2794 * elf64-ppc.h: Likewise.
2796 2018-02-06 Jim Wilson <jimw@sifive.com>
2798 * elfnn-riscv.c (riscv_elf_relocate_section): Return TRUE if used
2799 callback to report an error.
2801 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
2804 * elfxx-sparc.c (sparc_elf_tls_transition): Turn call to bfd_link_pic
2805 into call to !bfd_link_executable and tidy up.
2806 (_bfd_sparc_elf_check_relocs): Fix formatting and tidy up.
2807 <R_SPARC_TLS_LE_HIX22>: Turn call to bfd_link_pic into call to
2808 !bfd_link_executable.
2809 <R_SPARC_TLS_IE_HI22>: Likewise.
2810 <GOT relocations>: Remove useless code, tidy and merge related blocks.
2811 <R_SPARC_TLS_GD_CALL>: Turn call to bfd_link_pic into call to
2812 !bfd_link_executable.
2813 <R_SPARC_WPLT30>: Tidy up.
2814 (_bfd_sparc_elf_gc_mark_hook): Turn call to bfd_link_pic into call to
2815 !bfd_link_executable.
2816 (allocate_dynrelocs): Likewise.
2817 (_bfd_sparc_elf_relocate_section): Fix formatting and tidy up.
2818 <R_SPARC_TLS_GD_HI22>: Merge into...
2819 <R_SPARC_TLS_GD_LO10>: ...this. Adjust 4th argument in call to
2820 sparc_elf_tls_transition and remove redundant code.
2821 <R_SPARC_TLS_LDM_HI22>: Turn call to bfd_link_pic into call to
2822 !bfd_link_executable.
2823 <R_SPARC_TLS_LDO_HIX22>: Likewise.
2824 <R_SPARC_TLS_LE_HIX22>: Likewise. Tidy up.
2825 <R_SPARC_TLS_LDM_CALL>: Likewise.
2826 <R_SPARC_TLS_GD_CALL>: Likewise. Tidy up.
2827 <R_SPARC_TLS_GD_ADD>: Likewise.
2828 <R_SPARC_TLS_LDM_ADD>: Likewise.
2829 <R_SPARC_TLS_LDO_ADD>: Likewise.
2830 <R_SPARC_TLS_IE_LD>: Likewise.
2832 2018-02-06 Miloš Stojanović <milos.stojanovic@rt-rk.com>
2835 * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): If the dwarf
2836 functions failed to find the function name, try the generic elf
2837 find function instead.
2839 2018-02-06 Sergio Durigan Junior <sergiodj@redhat.com>
2841 * coff-rs6000.c (xcoff_write_archive_contents_old): Use
2842 'memcpy' instead of 'strncpy' when writing the magic number.
2844 2018-02-06 Nick Clifton <nickc@redhat.com>
2847 * opncls.c (bfd_get_debug_link_info_1): Check the size of the
2848 section before attempting to read it in.
2849 (bfd_get_alt_debug_link_info): Likewise.
2851 2018-02-06 Paul Carroll <pcarroll@codesourcery.com>
2853 * bfd/dwarf2.c (find_abstract_name): Modified to return file and
2854 line information in addition to name, if they can be found.
2856 2018-02-05 Renlin Li <renlin.li@arm.com>
2859 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Relax the
2860 R_AARCH64_ABS32 and R_AARCH64_ABS16 for absolute symbol. Apply the
2861 check for writeable section as well.
2863 2018-02-05 H.J. Lu <hongjiu.lu@intel.com>
2866 * elf32-i386.c (elf_i386_check_relocs): Set got_referenced if
2867 _GLOBAL_OFFSET_TABLE_ is referenced or GOT is needed to resolve
2868 undefined weak symbol to 0.
2869 * elf64-x86-64.c (elf_x86_64_check_relocs): Set got_referenced
2870 if _GLOBAL_OFFSET_TABLE_ is referenced.
2871 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Check
2872 got_referenced instead of ref_regular_nonweak. Remove the
2873 unused _GLOBAL_OFFSET_TABLE_ from symbol table.
2874 * elfxx-x86.h (elf_x86_link_hash_table): Add got_referenced.
2876 2018-02-05 Maciej W. Rozycki <macro@mips.com>
2878 * elfnn-riscv.c (_bfd_riscv_relax_pc): Use `memset' to
2879 initialize `hi_reloc'.
2881 2018-02-05 Maciej W. Rozycki <macro@mips.com>
2883 * elfxx-mips.c (_bfd_mips_elf_section_processing): For
2884 SHT_MIPS_REGINFO sections don't assert the correct size and
2885 report an error instead.
2887 2018-02-05 Maciej W. Rozycki <macro@mips.com>
2889 * elf.c (_bfd_elf_write_object_contents): Propagate a failure
2890 status from `->elf_backend_section_processing'.
2892 2018-02-02 Jim Wilson <jimw@sifive.com>
2895 * elfnn-riscv.c (riscv_relax_delete_bytes): New parameter link_info.
2896 If link_info->wrap_hash, check for a duplicate symbol and ignore.
2897 (_bfd_riscv_relax_call, bfd_riscv_relax_lui, _bfd_riscv_relax_tls_le):
2898 Pass new argument to riscv_relax_delete_bytes.
2899 (_bfd_riscv_relax_align, _bfd_riscv_relax_delete): Likewise. Remove
2900 ATTRIBUTE_UNUSED from link_info parameter.
2902 2018-02-02 Alan Modra <amodra@gmail.com>
2904 * elf64-ppc.c (ppc64_elf_relocate_section): Don't relocate nops
2905 emitted for toc sequence optimization. Set and use "howto" later.
2907 2018-02-01 Simon Marchi <simon.marchi@ericsson.com>
2909 * elf64-ppc.c (ppc64_elf_archive_symbol_lookup): Avoid pointer
2910 arithmetic on NULL pointer.
2911 * elflink.c (_bfd_elf_archive_symbol_lookup,
2912 elf_link_add_archive_symbols): Likewise.
2914 2018-01-31 Michael Matz <matz@suse.de>
2916 * elflink.c (bfd_elf_define_start_stop): Fix check of
2919 2018-01-31 H.J. Lu <hongjiu.lu@intel.com>
2922 * elflink.c (bfd_elf_define_start_stop): Check if __start and
2923 __stop symbols are referenced by shared objects.
2925 2018-01-30 Alan Modra <amodra@gmail.com>
2928 * elf.c (_bfd_elf_map_sections_to_segments): Don't start a new
2929 segment when demand paged with lma on the same page. Test this
2930 before load/non-load, executable/non-executable,
2931 writable/non-writable tests and simplify. Delete bogus relro
2932 condition in writable/non-writable test. Delete outdated
2933 comment. Formatting.
2935 2018-01-30 Alan Modra <amodra@gmail.com>
2937 * elflink.c (bfd_elf_define_start_stop): Make __start and __stop
2940 2018-01-29 Alan Modra <amodra@gmail.com>
2943 * coffgen.c (coff_pointerize_aux): Ensure auxent tagndx is in
2944 range before converting to a symbol table pointer.
2946 2018-01-27 Nick Clifton <nickc@redhat.com>
2948 * po/ru.po: Updated Russian translation.
2950 2018-01-26 Alan Modra <amodra@gmail.com>
2952 * elflink.c (bfd_elf_define_start_stop): Override symbols when
2953 they are defined dynamically.
2955 2018-01-26 Alan Modra <amodra@gmail.com>
2957 * elf64-ppc.c (ppc64_elf_size_stubs): Iterate sizing when
2958 .branch_lt changes size.
2960 2018-01-25 Alan Modra <amodra@gmail.com>
2963 * elfcode.h (elf_object_p): Avoid integer overflow.
2965 2018-01-25 Eric Botcazou <ebotcazou@adacore.com>
2968 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
2969 Do a mere lookup of the __tls_get_addr symbol instead of adding it.
2972 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
2975 * elfxx-sparc.c (sparc_elf_tls_transition): Replace
2976 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
2977 bfd_link_executable for TLS check.
2978 (_bfd_sparc_elf_check_relocs): Likewise.
2979 (allocate_dynrelocs): Likewise.
2980 (_bfd_sparc_elf_relocate_section): Likewise.
2982 2018-01-24 Renlin Li <renlin.li@arm.com>
2984 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Add support for
2985 BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
2986 BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
2987 BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
2988 BFD_RELOC_AARCH64_MOVW_PREL_G3.
2989 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
2990 (_bfd_aarch64_elf_resolve_relocation): Likewise.
2992 2018-01-24 Renlin Li <renlin.li@arm.com>
2994 * reloc.c: Add BFD_RELOC_AARCH64_MOVW_PREL_G0,
2995 BFD_RELOC_AARCH64_MOVW_PREL_G0_NC, BFD_RELOC_AARCH64_MOVW_PREL_G1,
2996 BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, BFD_RELOC_AARCH64_MOVW_PREL_G2,
2997 BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, BFD_RELOC_AARCH64_MOVW_PREL_G3.
2998 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Add entries for
2999 BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
3000 BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
3001 BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
3002 BFD_RELOC_AARCH64_MOVW_PREL_G3.
3003 * bfd-in2.h: Regenerate.
3004 * libbfd.h: Regenerate.
3006 2018-01-23 Maciej W. Rozycki <macro@mips.com>
3008 * elfxx-mips.c (_bfd_mips_elf_final_link): Update a stale
3009 `mips_elf32_section_processing' comment reference.
3011 2018-01-20 H.J. Lu <hongjiu.lu@intel.com>
3014 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Check the
3015 versioned __tls_get_addr symbol.
3017 2018-01-19 Nick Clifton <nickc@redhat.com>
3019 * po/fr.po: Updated French translation.
3021 2018-01-18 Alan Modra <amodra@gmail.com>
3023 * elf32-ppc.c (ppc_elf_create_glink): Correct alignment of .glink.
3024 * elf64-ppc.c (ppc64_elf_size_stubs): Handle negative plt_stub_align.
3025 (ppc64_elf_build_stubs): Likewise.
3027 2018-01-17 Nick Clifton <nickc@redhat.com>
3029 * po/ru.po: Updated Russian translation.
3030 * po/uk/po: Updated Ukranian translation.
3032 2018-01-17 Alan Modra <amodra@gmail.com>
3034 * elf64-ppc.c (ppc64_elf_build_stubs): Silence gcc warning.
3036 2018-01-17 Alan Modra <amodra@gmail.com>
3038 * elf32-ppc.c (GLINK_ENTRY_SIZE): Handle speculation barrier.
3039 (CRSETEQ, BEQCTRM): Define.
3040 (is_nonpic_glink_stub): Don't check bctr.
3041 (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
3042 (ppc_elf_relax_section): Size speculation barrier.
3043 (output_bctr): New function.
3044 (write_glink_stub): Use output_bctr.
3045 (ppc_elf_relocate_section): Use output_bctr for long branch stub.
3046 (ppc_elf_finish_dynamic_symbol): Likewise.
3047 (ppc_elf_finish_dynamic_sections): Use output_bctr.
3048 * elf32-ppc.h (struct ppc_elf_params): Add speculate_indirect_jumps.
3049 * elf64-ppc.c (CRSETEQ, BEQCTRM, BEQCTRLM): Define.
3050 (GLINK_PLTRESOLVE_SIZE): Size speculation barrier.
3051 (size_global_entry_stubs): Handle speculation barrier sizing.
3052 (plt_stub_size): Likewise.
3053 (output_bctr): New function.
3054 (build_plt_stub, build_tls_get_addr_stub): Output speculation
3056 (ppc_build_one_stub): Likewise for ppc_stub_plt_branch.
3057 (ppc_size_one_stub): Size speculation barrier in ppc_stub_plt_branch.
3058 (build_global_entry_stubs): Output speculation barrier.
3059 (ppc64_elf_build_stubs): Likewise in __glink_PLTresolve stub.
3060 * elf64-ppc.h (struct ppc64_elf_params): Add speculate_indirect_jumps.
3062 2018-01-17 Alan Modra <amodra@gmail.com>
3064 * elf32-ppc.c (GLINK_ENTRY_SIZE): Add parameters, handle
3065 __tls_get_addr_opt, and alignment sizing.
3066 (TLS_GET_ADDR_GLINK_SIZE): Delete.
3067 (is_nonpic_glink_stub): Don't use GLINK_ENTRY_SIZE.
3068 (ppc_elf_get_synthetic_symtab): Recognize stubs spaced at 4, 6,
3070 (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
3071 (allocate_dynrelocs): Use new GLINK_ENTRY_SIZE.
3072 (ppc_elf_size_dynamic_sections): Likewise. Size branch table
3074 (write_glink_stub): Handle __tls_get_addr_opt stub.
3075 Pad out to size given by GLINK_ENTRY_SIZE.
3076 (ppc_elf_relocate_section): Adjust write_glink_stub call.
3077 (ppc_elf_finish_dynamic_symbol): Likewise.
3078 (ppc_elf_finish_dynamic_sections): Write PLTresolve without using
3079 insn array since so many need rewriting.
3080 * elf32-ppc.h (struct ppc_elf_params): Add plt_stub_align.
3081 * elf64-ppc.c (GLINK_PLTRESOLVE_SIZE): Rename from
3082 GLINK_CALL_STUB_SIZE. Add htab param and evaluate to size without
3083 nops. Adjust all uses.
3084 (ppc64_elf_get_synthetic_symtab): Don't use GLINK_CALL_STUB_SIZE
3085 in glink_vma calculation.
3086 (struct ppc_link_hash_table): Add global_entry section pointer.
3087 (create_linkage_sections): Create separate section for global
3089 (PPC_LO, PPC_HI, PPC_HA): Move earlier.
3090 (size_global_entry_stubs): Handle sizing for aligned stubs.
3091 (ppc64_elf_size_dynamic_sections): Handle global_entry alloc,
3092 and don't stash end of glink branch table in rawsize.
3093 (ppc_build_one_stub): Rewrite stub size calculations.
3094 (build_global_entry_stubs): Use new section.
3095 (ppc64_elf_build_stubs): Don't pad __glink_PLTresolve with nops.
3096 Build lazy link stubs out to end of section. Build global entry
3097 stubs in new section.
3099 2018-01-15 Nick Clifton <nickc@redhat.com>
3101 * po/uk.po: Updated Ukranian translation.
3103 2018-01-13 Nick Clifton <nickc@redhat.com>
3105 * po/bfd.pot: Regenerated.
3107 2018-01-13 Nick Clifton <nickc@redhat.com>
3109 * version.m4: Bump version to 2.30.51
3110 * configure: Regenerate.
3112 2018-01-13 Nick Clifton <nickc@redhat.com>
3114 2.30 branch created.
3116 2018-01-12 Jens Widell <jl@opera.com>
3118 * elf.c (setup_group): Optimize search for group by remembering
3119 last found group and restarting search at that index.
3120 * elf-bfd.h (struct elf_obj_tdata): Add group_search_offset field.
3122 2018-01-12 Gunther Nikl <gnikl@users.sourceforge.net>
3124 * aoutx.h (aout_link_check_ar_symbols): Remove default and handle
3125 bfd_link_common_skip_none in switch.
3127 2018-01-12 Alan Modra <amodra@gmail.com>
3130 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Ignore dynamic
3131 references on forced local symbols.
3133 2018-01-12 Vlad Ivanov <vlad@ivanov.email>
3135 * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when
3136 .reginfo section has wrong size.
3138 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
3141 * elf.c (_bfd_elf_map_sections_to_segments): When generating
3142 separate code and read-only data LOAD segments, create a new
3143 LOAD segment if the previous section contains text and the
3144 current section doesn't or vice versa. Don't put a writable
3145 section in a read-only segment if there is a RELRO segment.
3147 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
3150 * elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Ignore dynamic
3151 references on forced local symbols.
3153 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
3156 * elflink.c (bfd_elf_gc_sections): Keep all PREINIT_ARRAY,
3157 INIT_ARRAY as well as FINI_ARRAY sections for ld -r --gc-section.
3159 2018-01-09 Kuan-Lin Chen <kuanlinchentw@gmail.com>
3162 * elf32-nds32.c (nds32_elf_relax_loadstore): Fix a typographical error.
3164 2018-01-03 John Baldwin <jhb@FreeBSD.org>
3166 * elf.c (elfcore_grok_freebsd_note): Handle
3167 NT_FREEBSD_PROCSTAT_PROC, NT_FREEBSD_PROCSTAT_FILES, and
3168 NT_FREEBSD_PROCSTAT_VMMAP.
3170 2018-01-03 Alan Modra <amodra@gmail.com>
3172 Update year range in copyright notice of all files.
3174 For older changes see ChangeLog-2017
3176 Copyright (C) 2018 Free Software Foundation, Inc.
3178 Copying and distribution of this file, with or without modification,
3179 are permitted in any medium without royalty provided the copyright
3180 notice and this notice are preserved.
3186 version-control: never