1 2018-06-05 Alan Modra <amodra@gmail.com>
4 * plugin.c (bfd_plugin_open_input): Allow for possibility of
5 nested archives. Open file again for plugin.
6 (try_claim): Don't save and restore file position. Close file
8 * sysdep.h (O_BINARY): Define.
10 2018-06-04 Max Filippov <jcmvbkbc@gmail.com>
12 * elf32-xtensa.c (xtensa_read_table_entries): Make global.
13 (compute_fill_extra_space): Drop declaration. Rename function to
14 xtensa_compute_fill_extra_space.
15 (compute_ebb_actions, remove_dead_literal): Update references to
16 compute_fill_extra_space.
18 2018-06-04 Volodymyr Arbatov <arbatov@cadence.com>
20 * elf32-xtensa.c (elf32xtensa_separate_props): New global
22 (xtensa_add_names): New function.
23 (xtensa_property_section_name): Add new parameter
24 separate_sections, use it to choose property section name.
25 (xtensa_get_separate_property_section): New function.
26 (xtensa_get_property_section): Invoke
27 xtensa_get_separate_property_section to get individual property
28 section if it exists, common property section otherwise.
29 (xtensa_make_property_section): Pass elf32xtensa_separate_props
30 to xtensa_property_section_name.
32 2018-06-04 H.J. Lu <hongjiu.lu@intel.com>
35 * bfd-in.h: Include "diagnostics.h".
36 * bfd-in2.h: Regenerated.
37 * elf32-arm.c (elf32_arm_nabi_write_core_note): Use
38 DIAGNOSTIC_PUSH, DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION and
39 DIAGNOSTIC_POP to silence GCC 8.1 warnings with
40 -Wstringop-truncation.
41 * elf32-ppc.c (ppc_elf_write_core_note): Likewse.
42 * elf32-s390.c (elf_s390_write_core_note): Likewse.
43 * elf64-ppc.c (ppc64_elf_write_core_note): Likewse.
44 * elf64-s390.c (elf_s390_write_core_note): Likewse.
45 * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewse.
47 2018-06-03 Jim Wilson <jimw@sifive.com>
50 * elfnn-riscv.c (riscv_elf_relocate_section) <R_RISCV_CALL>: Check
51 for and handle an undefined weak with no PLT.
54 * elfnn-riscv.c (riscv_relax_delete_bytes): Add versioned_hidden check
55 to code that ignores duplicate symbols.
57 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
59 * version.m4: Bump version to 2.30.52
60 * configure: Regenerated.
62 2018-06-01 Alan Modra <amodra@gmail.com>
64 * bfd.c (_bfd_error_handler): Arrange for this function to be
65 declared in bfd-in2.h.
66 * libbfd-in.h (_bfd_error_handler): Don't declare.
67 * libbfd.h: Regenerate.
68 * bfd-in2.h: Regenerate.
70 2018-05-30 Amaan Cheval <amaan.cheval@gmail.com>
72 * config.bfd (x86_64-*-*): Add pei-x86-64 target to x86_64-*-rtems*
73 This is needed to generate UEFI application image files from ELFs.
75 2018-05-28 H.J. Lu <hongjiu.lu@intel.com>
77 * elf32-i386.c (elf_i386_lazy_plt): Add plt_tlsdesc_entry,
78 plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset,
79 plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and
80 plt_tlsdesc_got2_insn_end for TLSDESC entry.
81 (elf_i386_lazy_ibt_plt): Likewise.
82 (elf_i386_nacl_plt): Likewise.
83 * elf64-x86-64.c (tlsdesc_plt_entry): Moved and renamed to ...
84 (elf_x86_64_tlsdesc_plt_entry): This.
85 (elf_x86_64_lazy_plt): Add plt_tlsdesc_entry,
86 plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset,
87 plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and
88 plt_tlsdesc_got2_insn_end for TLSDESC entry.
89 (elf_x86_64_lazy_bnd_plt): Likewise.
90 (elf_x86_64_lazy_ibt_plt): Likewise.
91 (elf_x32_lazy_ibt_plt): Likewise.
92 (elf_x86_64_nacl_plt): Likewise.
93 (elf_x86_64_finish_dynamic_sections): Use plt_tlsdesc_entry,
94 plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset,
95 plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and
96 plt_tlsdesc_got2_insn_end to update TLSDESC entry.
97 * elfxx-x86.h (elf_x86_lazy_plt_layout): Update comments.
98 Add plt_tlsdesc_entry, plt_tlsdesc_entry_size,
99 plt_tlsdesc_got1_offset, plt_tlsdesc_got2_offset,
100 plt_tlsdesc_got1_insn_end and plt_tlsdesc_got2_insn_end.
101 (elf_x86_non_lazy_plt_layout): Update comments.
102 (elf_x86_plt_layout): Likewise.
104 2018-05-28 H.J. Lu <hongjiu.lu@intel.com>
107 * elf-s390-common.c (elf_s390_add_symbol_hook): Removed.
108 * elf32-arc.c (elf_arc_add_symbol_hook): Likewise.
109 (elf_backend_add_symbol_hook): Likewise.
110 * elf32-m68k.c (elf_m68k_add_symbol_hook): Likewise.
111 (elf_backend_add_symbol_hook): Likewise.
112 * elf32-s390.c (elf_backend_add_symbol_hook): Likewise.
113 * elf32-sparc.c (elf32_sparc_add_symbol_hook): Likewise.
114 (elf_backend_add_symbol_hook): Likewise.
115 * elf64-s390.c (elf_backend_add_symbol_hook): Likewise.
116 * elfxx-aarch64.c (_bfd_aarch64_elf_add_symbol_hook): Likewise.
117 * elfxx-aarch64.h (_bfd_aarch64_elf_add_symbol_hook): Likewise.
118 (elf_backend_add_symbol_hook): Likewise.
119 * elf32-arm.c (elf32_arm_add_symbol_hook): Remove STT_GNU_IFUNC
121 * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise.
122 * elf64-ppc.c (ppc64_elf_add_symbol_hook): Likewise.
123 * elf64-sparc.c (elf64_sparc_add_symbol_hook): Likewise.
124 * elflink.c (elf_link_add_object_symbols): Set
125 elf_gnu_symbol_ifunc for STT_GNU_IFUNC symbols.
127 2018-05-26 H.J. Lu <hongjiu.lu@intel.com>
130 * elf-bfd.h (_bfd_elf_link_hide_sym_by_version): New.
131 * elflink.c (_bfd_elf_link_hide_versioned_symbol): New function.
132 Extracted from _bfd_elf_link_assign_sym_version.
133 (_bfd_elf_link_hide_sym_by_version): New function.
134 (_bfd_elf_link_assign_sym_version): Use
135 _bfd_elf_link_hide_versioned_symbol.
136 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Call
137 _bfd_elf_link_hide_sym_by_version instead of
138 bfd_hide_sym_by_version. Don't check unversioned symbol.
140 2018-05-25 Alan Modra <amodra@gmail.com>
142 * Makefile.in: Regenerate.
143 * po/SRC-POTFILES.in: Regenerate.
145 2018-05-25 Alan Modra <amodra@gmail.com>
147 * configure.ac (bfd_cv_hidden): Run test with -Werror in CFLAGS.
148 * configure: Regenerate.
150 2018-05-23 H.J. Lu <hongjiu.lu@intel.com>
152 * elf64-ppc.c (ppc64_elf_write_core_note): Add ATTRIBUTE_NONSTRING
155 2018-05-22 Alan Modra <amodra@gmail.com>
158 * elf32-hppa.c (hppa_get_stub_entry): Return NULL when link_sec
160 (elf32_hppa_size_stubs): Only create stubs for load, alloc, code
162 (final_link_relocate): Revert last change.
164 2018-05-22 Alan Modra <amodra@gmail.com>
167 * elf32-hppa.c (final_link_relocate): Don't look for plt call
168 stubs in non-alloc sections.
170 2018-05-21 H.J. Lu <hongjiu.lu@intel.com>
173 * aout-target.h (MY_bfd_link_hide_symbol): New.
174 * aout-tic30.c (MY_bfd_link_hide_symbol): Likewise.
175 * binary.c (binary_bfd_link_hide_symbol): Likewise.
176 * coff-alpha.c (_bfd_ecoff_bfd_link_hide_symbol): Likewise.
177 * coff-mips.c (_bfd_ecoff_bfd_link_hide_symbol): Likewise.
178 * coff-rs6000.c (_bfd_xcoff_bfd_link_hide_symbol): Likewise.
179 * coffcode.h (coff_bfd_link_hide_symbol): Likewise.
180 * elf-bfd.h (_bfd_elf_link_hide_symbol): Likewise.
181 * elfxx-target.h (bfd_elfNN_bfd_link_hide_symbol): Likewise.
182 * i386msdos.c (msdos_bfd_link_hide_symbol): Likewise.
183 * ihex.c (ihex_bfd_link_hide_symbol): Likewise.
184 * libbfd-in.h (_bfd_nolink_bfd_link_hide_symbol): Likewise.
185 * linker.c (_bfd_generic_link_hide_symbol): Likewise.
186 (bfd_link_hide_symbol): Likewise.
187 * mach-o-target.c (bfd_mach_o_bfd_link_hide_symbol): Likewise.
188 * mmo.c (mmo_bfd_link_hide_symbol): Likewise.
189 * pef.c (bfd_pef_bfd_link_hide_symbol): Likewise.
190 * plugin.c (bfd_plugin_bfd_link_hide_symbol): Likewise.
191 * ppcboot.c (ppcboot_bfd_link_hide_symbol): Likewise.
192 * som.c (som_bfd_link_hide_symbol): Likewise.
193 * srec.c (srec_bfd_link_hide_symbol): Likewise.
194 * tekhex.c (tekhex_bfd_link_hide_symbol): Likewise.
195 * vms-alpha.c (vms_bfd_link_hide_symbol): Likewise.
196 (alpha_vms_bfd_link_hide_symbol): Likewise.
197 * xsym.c (bfd_sym_bfd_link_hide_symbol): Likewise.
198 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
199 _bfd_generic_link_hide_symbol.
200 (rs6000_xcoff64_aix_vec): Likewise.
201 * elflink.c (bfd_elf_record_link_assignment): Don't make forced
202 local symbol dynamic.
203 (_bfd_elf_link_hide_symbol): New function.
204 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
205 check root.ldscript_def.
206 * targets.c (bfd_target): Add _bfd_link_hide_symbol.
207 (BFD_JUMP_TABLE_LINK): Add NAME##_bfd_link_hide_symbol.
208 * bfd-in2.h: Regenerated.
209 * libbfd.h: Likewise.
211 2018-05-21 H.J. Lu <hongjiu.lu@intel.com>
214 * elf.c (setup_group): Mark section in a section group with
217 2018-05-18 H.J. Lu <hongjiu.lu@intel.com>
220 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
221 set eh->local_ref to 1 if a symbol is versioned and there is a
224 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
226 * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Handle
229 2018-05-18 Jim Wilson <jimw@sifive.com>
231 * elfnn-riscv.c (allocate_dynrelocs): Discard dynamic relocations if
232 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
233 (riscv_elf_relocate_section): Don't generate dynamic relocation if
234 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
235 (riscv_elf_finish_dynamic_symbol): Likewise.
237 2018-05-18 John Darrington <john@darrington.wattle.id.au>
239 * Makefile.am: Add s12z files.
240 * Makefile.in: Regenerate.
241 * archures.c: Add bfd_s12z_arch.
242 * bfd-in.h: Add exports of bfd_putb24 and bfd_putl24.
243 * bfd-in2.h: Regenerate.
244 * config.bfd: Add s12z target.
245 * configure.ac: Add s12z target.
246 * configure: Regenerate.
247 * cpu-s12z.c: New file.
248 * elf32-s12z.c: New file.
249 * libbfd.c (bfd_putb24): New function.
250 (bfd_putl24): New function.
251 * libbfd.h: Regenerate.
252 * reloc.c: Add s12z relocations.
253 (bfd_get_reloc_size): Handle size 5 relocs.
254 * targets.c: Add s12z_elf32_vec.
256 2018-05-18 H.J. Lu <hongjiu.lu@intel.com>
259 * elf32-i386.c (elf_i386_relocate_section): Handle R_386_GOT32X
261 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
262 set eh->local_ref to 1 for linker defined symbols.
264 2018-05-18 Alan Modra <amodra@gmail.com>
267 * elf.c (setup_group): Formatting. Check that SHT_GROUP entries
268 don't point at other SHT_GROUP sections. Set shdr corresponding
269 to invalid entry, to NULL rather than section 0. Identify
270 SHT_GROUP section index when reporting an error. Cope with NULL
273 2018-05-18 Alan Modra <amodra@gmail.com>
275 * libbfd-in.h (ATTRIBUTE_HIDDEN): Define and use throughout.
276 * configure.ac (HAVE_HIDDEN): Check compiler support for hidden
278 * libbfd.h: Regenerate.
279 * configure: Regenerate.
280 * config.in: Regenerate.
282 2018-05-18 Alan Modra <amodra@gmail.com>
284 * libbfd-in.h: Add include guard.
285 * libcoff-in.h: Likewise.
286 * doc/Makefile.am (libbfd.h, libcoff.h): Append another #endif.
287 * doc/Makefile.in: Regenerate.
288 * libbfd.h: Regenerate.
289 * libcoff.h: Regenerate.
291 2018-05-16 Maciej W. Rozycki <macro@mips.com>
293 * elf32-nds32.c (nds32_convert_32_to_16): Preset `insn_type'.
295 2018-05-16 Alan Modra <amodra@gmail.com>
298 * format.c (struct bfd_preserve): Add section_id.
299 (bfd_preserve_save, bfd_preserve_restore): Save and restore
301 (bfd_reinit): Set _bfd_section_id.
302 (bfd_check_format_matches): Put all matches of any priority into
303 matching_vector. Save initial section id and start each attempted
304 match at that section id.
305 * libbfd-in.h (_bfd_section_id): Declare.
306 * section.c (_bfd_section_id): Rename from section_id and make
308 (bfd_get_next_section_id): Delete.
309 * elf64-ppc.c (ppc64_elf_setup_section_lists): Replace use of
310 bfd_get_section_id with _bfd_section_id.
311 * libbfd.h: Regenerate.
312 * bfd-in2.h: Regenerate.
314 2018-05-15 Christophe Guillon <christophe.guillon@st.com>
316 * coffcode.h (coff_bigobj_swap_aux_in): Make sure that all fields
317 of the aux structure are initialised.
319 2018-05-15 Francois H. Theron <francois.theron@netronome.com>
321 * targets.c: Wrap nfp_elf64_vec in BFD64 ifdef.
323 2018-05-15 Nick Clifton <nickc@redhat.com>
325 * po/pt.po: New Portuguese translation.
326 * configure.ac (ALL_LINGUAS): Add pt.
327 * configure: Regenerate.
329 2018-05-14 H.J. Lu <hongjiu.lu@intel.com>
332 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Don't issue
333 an error on IFUNC pointer defined in PDE.
334 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Call
335 _bfd_x86_elf_link_fixup_ifunc_symbol.
336 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
337 * elfxx-x86.c (_bfd_x86_elf_link_fixup_ifunc_symbol): New
339 * elfxx-x86.h (_bfd_x86_elf_link_fixup_ifunc_symbol): New.
341 2018-05-14 H.J. Lu <hongjiu.lu@intel.com>
344 * elfxx-x86.c (elf_x86_linker_defined): New function.
345 (_bfd_x86_elf_link_check_relocs): Use it to mark __bss_start,
346 _end and _edata locally defined within executables.
348 2018-05-12 Alan Modra <amodra@gmail.com>
351 * elf.c (rewrite_elf_program_header): Use segment_mark only for
352 PT_LOAD headers. Delete first_matching_lma and first_suggested_lma.
353 Instead make matching_lma and suggested_lma pointers to the
354 sections. Align section vma and lma calculated from segment.
355 Don't clear includes_phdrs or includes_filehdr based on p_paddr
356 test. Try to handle alignment padding before first section by
357 adjusting new segment lma down. Adjust PT_PHDR map p_paddr.
359 2018-05-09 Dimitar Dimitrov <dimitar@dinux.eu>
361 * elf32-pru.c (pru_elf32_do_ldi32_relocate): Make LDI32 relocation
362 conformant to TI ABI.
363 (pru_elf32_relax_section): Likewise.
364 (pru_elf_relax_delete_bytes): Fix offsets for new LDI32 code.
365 * elf32-pru.c (pru_elf32_do_ldi32_relocate): Ignore addend.
366 (pru_elf32_pmem_relocate): Trap - should not get here.
367 (pru_elf32_relocate_section): Add support for REL relocations.
368 (elf_info_to_howto_rel): Enable REL.
369 (elf_backend_may_use_rel_p): Likewise.
370 (elf_backend_may_use_rela_p): Likewise.
371 (elf_backend_default_use_rela_p): Likewise.
373 2018-05-09 Alan Modra <amodra@gmail.com>
376 * peXXigen.c (pe_print_edata): Correct minimum size.
378 2018-05-09 Alan Modra <amodra@gmail.com>
381 * peXXigen.c (pe_print_idata): Bound check hint_addr.
383 2018-05-08 Nick Clifton <nickc@redhat.com>
386 * elf.c (bfd_elf_get_str_section): Check for an excessively large
388 * elf-attrs.c (_bfd_elf_parse_attributes): Issue an error if the
389 attribute section is larger than the size of the file.
391 2018-05-07 Alan Modra <amodra@gmail.com>
393 * cofflink.c (_bfd_coff_link_input_bfd): Use memcmp rather than
394 strncmp when checking for ".bf" special symbol.
395 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Make pe_required_section_flags
396 section name a char array, remove sentinal known_sections entry,
397 and adjust loop over known_sections to suit. Use memcmp rather
400 2018-05-04 Alan Modra <amodra@gmail.com>
402 * elf-linux-core.h (struct elf_external_linux_prpsinfo32_ugid32),
403 (struct elf_external_linux_prpsinfo32_ugid16),
404 (struct elf_external_linux_prpsinfo64_ugid32),
405 (struct elf_external_linux_prpsinfo64_ugid16): Add ATTRIBUTE_NONSTRING
406 to pr_fname and pr_psargs fields. Remove GCC diagnostic pragmas.
408 * elf.c (elfcore_write_prpsinfo): ..here. Indent nested preprocessor
410 * elf32-arm.c (elf32_arm_nabi_write_core_note): Add ATTRIBUTE_NONSTRING
412 * elf32-ppc.c (ppc_elf_write_core_note): Likewise.
413 * elf32-s390.c (elf_s390_write_core_note): Likewise.
414 * elf64-s390.c (elf_s390_write_core_note): Likewise.
415 * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewise.
416 * elf64-x86-64.c (elf_x86_64_write_core_note): Add GCC diagnostic
418 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Use strnlen to avoid
419 false positive gcc-8 warning.
420 * cofflink.c (_bfd_coff_link_input_bfd): Likewise.
422 2018-05-04 Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
424 * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Fix the order
425 of arguments when warning about different long double types.
427 2018-05-03 Simon Atanasyan <simon@atanasyan.com>
429 * elf32-mips.c: (elf32_mips_fixup_symbol): New function.
430 (elf_backend_fixup_symbol): New macro.
431 * elfxx-mips.c: (mips_elf_output_extsym): Discard _gp_disp
433 (_bfd_mips_elf_finish_dynamic_symbol): Likewise.
435 2018-04-30 Francois H. Theron <francois.theron@netronome.com>
437 * Makefile.am: Added NFP files to build.
438 * archures.c: Added bfd_arch_nfp
439 * config.bfd: Added NFP support.
440 * configure.ac: Added NFP support.
441 * cpu-nfp.c: New, for NFP support.
442 * elf-bfd.h: Added elf_section_info()
443 * elf64-nfp.c: New, for NFP support.
444 * po/SRC-POTFILES.in: Added NFP source files.
445 * targets.c: Added nfp_elf64_vec
446 * bfd-in2.h: Regenerate.
447 * Makefile.in: Regenerate.
448 * configure: Regenerate.
450 2018-04-27 Alan Modra <amodra@gmail.com>
452 * bfd-in2.h: Regenerate.
453 * libbfd.h: Regenerate.
455 2018-04-27 Alan Modra <amodra@gmail.com>
459 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't drop plt
461 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Comment fixes.
463 2018-04-26 Pedro Alves <palves@redhat.com>
465 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't consider
466 ifunc and non-ifunc symbols duplicates.
468 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
469 Mickaël Guêné <mickael.guene@st.com>
471 * elf32-arm.c (elf32_arm_fdpic_thumb_plt_entry): New.
472 (elf32_arm_plt_needs_thumb_stub_p): Handle thumb-only case.
473 (elf32_arm_populate_plt_entry): Likewise.
474 (elf32_arm_output_plt_map_1): Likewise.
475 (elf32_arm_output_arch_local_syms): Likewise.
477 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
478 Mickaël Guêné <mickael.guene@st.com>
480 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Handle
481 _GLOBAL_OFFSET_TABLE_ in FDPIC mode.
483 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
484 Mickaël Guêné <mickael.guene@st.com>
486 * elf32-arm.c (bfd_elf32_arm_set_target_params): Handle FDPIC case
489 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
490 Mickaël Guêné <mickael.guene@st.com>
492 * elf32-arm.c (DEFAULT_STACK_SIZE): New.
493 (elf32_arm_always_size_sections): Create stack segment.
495 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
496 Mickaël Guêné <mickael.guene@st.com>
498 * bfd-in2.h (BFD_RELOC_ARM_TLS_GD32_FDPIC)
499 (BFD_RELOC_ARM_TLS_LDM32_FDPIC, BFD_RELOC_ARM_TLS_IE32_FDPIC): New
501 * elf32-arm.c (elf32_arm_howto_table_2): Add R_ARM_TLS_GD32_FDPIC,
502 R_ARM_TLS_LDM32_FDPIC, R_ARM_TLS_IE32_FDPIC relocations.
503 (elf32_arm_reloc_map): Add R_ARM_TLS_GD32_FDPIC,
504 R_ARM_TLS_LDM32_FDPIC, R_ARM_TLS_IE32_FDPIC.
505 (struct elf32_arm_link_hash_table): Update comment.
506 (elf32_arm_final_link_relocate): Handle TLS FDPIC relocations.
507 (IS_ARM_TLS_RELOC): Likewise.
508 (elf32_arm_check_relocs): Likewise.
509 (allocate_dynrelocs_for_symbol): Likewise.
510 (elf32_arm_size_dynamic_sections): Update comment.
511 * reloc.c: Add BFD_RELOC_ARM_TLS_GD32_FDPIC,
512 BFD_RELOC_ARM_TLS_LDM32_FDPIC, BFD_RELOC_ARM_TLS_IE32_FDPIC.
514 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
515 Mickaël Guêné <mickael.guene@st.com>
517 * elf32-arm.c (elf32_arm_fdpic_plt_entry): New.
518 (elf32_arm_create_dynamic_sections): Handle FDPIC.
519 (elf32_arm_allocate_plt_entry): Likewise.
520 (elf32_arm_populate_plt_entry): Likewise.
521 (elf32_arm_output_plt_map_1): Likewise.
523 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
524 Mickaël Guêné <mickael.guene@st.com>
526 * elf32-arm.c (struct fdpic_local): New.
527 (elf_arm_obj_tdata): Add local_fdpic_cnts field.
528 (elf32_arm_local_fdpic_cnts): New.
529 (struct fdpic_global): New.
530 (elf32_arm_link_hash_entry): Add fdpic_cnts field.
531 (elf32_arm_link_hash_table): Add srofixup field.
532 (arm_elf_add_rofixup): New.
533 (arm_elf_fill_funcdesc): New.
534 (elf32_arm_link_hash_newfunc): Handle fdpic_cnts.
535 (elf32_arm_allocate_local_sym_info): Likewise.
536 (create_got_section): Create .rofixup section.
537 (elf32_arm_copy_indirect_symbol): Handle fdpic_cnts.
538 (bfd_elf32_arm_set_target_params): Handle FDPIC.
539 (elf32_arm_final_link_relocate): Likewise.
540 (elf32_arm_check_relocs): Likewise.
541 (allocate_dynrelocs_for_symbol): Likewise.
542 (elf32_arm_size_dynamic_sections): Likewise.
543 (elf32_arm_finish_dynamic_sections): Likewise.
544 (elf32_arm_output_arch_local_syms): Likewise.
545 (elf32_arm_fdpic_omit_section_dynsym): New.
547 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
548 Mickaël Guêné <mickael.guene@st.com>
550 * bfd-in2.c (BFD_RELOC_ARM_GOTFUNCDESC)
551 (BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC)
552 (BFD_RELOC_ARM_FUNCDESC_VALUE): New.
553 * elf32-arm.c (elf32_arm_howto_table_2): Add R_ARM_GOTFUNCDESC,
554 R_ARM_GOTOFFFUNCDESC, R_ARM_FUNCDESC, R_ARM_FUNCDESC_VALUE.
555 (elf32_arm_howto_from_type): Take new members of
556 elf32_arm_howto_table_2 into account.
557 (elf32_arm_reloc_map): Add BFD_RELOC_ARM_GOTFUNCDESC,
558 BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC,
559 BFD_RELOC_ARM_FUNCDESC_VALUE.
560 * reloc.c: Add BFD_RELOC_ARM_GOTFUNCDESC,
561 BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC,
562 BFD_RELOC_ARM_FUNCDESC_VALUE.
564 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
565 Mickaël Guêné <mickael.guene@st.com>
567 * elf32-arm.c (elf32_arm_print_private_bfd_data): Support
568 EF_ARM_PIC and ELFOSABI_ARM_FDPIC.
569 (elf32_arm_post_process_headers): Support ELFOSABI_ARM_FDPIC.
570 (ELF_OSABI): Define to ELFOSABI_ARM_FDPIC.
572 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
573 Mickaël Guêné <mickael.guene@st.com>
575 * config.bfd (arm*-*-linux-*): Add arm_elf32_fdpic_be_vec and
576 arm_elf32_fdpic_le_vec to targ_selvecs. Accept
577 arm*-*-uclinuxfdpiceabi.
578 * configure.ac: Add support for arm_elf32_fdpic_be_vec and
579 arm_elf32_fdpic_le_vec.
580 * configure: Regenerate.
581 * elf32-arm.c (struct elf32_arm_link_hash_table): Add fdpic_p.
582 (elf32_arm_link_hash_table_create): Initialize fdpic_p.
583 (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME, TARGET_BIG_SYM)
584 (TARGET_BIG_NAME, elf_match_priority): Define for FDPIC targets.
585 (elf32_arm_fdpic_link_hash_table_create): New.
586 * targets.c (_bfd_target_vector): Add arm_elf32_fdpic_be_vec and
587 arm_elf32_fdpic_le_vec.
589 2018-04-25 Alan Modra <amodra@gmail.com>
591 * elf-linux-core.h: Disable gcc-8 string truncation warning.
592 * elf.c (elfcore_write_prpsinfo): Likewise.
594 2018-04-25 Alan Modra <amodra@gmail.com>
596 * Makefile.am: Remove arm-aout and arm-coff support.
597 * config.bfd: Likewise.
598 * configure.ac: Likewise.
599 * targets.c: Likewise.
600 * aout-arm.c: Delete.
601 * armnetbsd.c: Delete.
603 * Makefile.in: Regenerate.
604 * configure: Regenerate.
605 * po/SRC-POTFILES.in: Regenerate.
607 2018-04-24 Nick Clifton <nickc@redhat.com>
610 * elf.c (ignore_section_sym): Check for the output_section pointer
611 being NULL before dereferencing it.
614 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Check for
615 a negative PE_DEBUG_DATA size before iterating over the debug data.
617 2018-04-23 Alan Modra <amodra@gmail.com>
619 * elf-linux-core.h: Revert last change.
622 2018-04-23 Nick Clifton <nickc@redhat.com>
625 * aoutx.h (aout_get_external_symbols): Allocate an extra byte at
626 the end of the string table, and zero it.
628 2018-04-23 Alan Modra <amodra@gmail.com>
630 * elf-linux-core.h (swap_linux_prpsinfo32_ugid32_out): Disable
631 gcc-8 string truncation warning.
632 (swap_linux_prpsinfo32_ugid16_out): Likewise.
633 (swap_linux_prpsinfo64_ugid32_out): Likewise.
634 (swap_linux_prpsinfo64_ugid16_out): Likewise.
635 * elf.c (elfcore_write_prpsinfo): Likewise.
637 2018-04-23 Nick Clifton <nickc@redhat.com>
640 * aoutx.h (aout_get_external_symbols): Allocate an extra byte at
641 the end of the string table, and zero it.
643 2018-04-20 Alan Modra <amodra@gmail.com>
646 * elf32-hppa.c (got_relocs_needed): Add extra param to special
647 case both dtprel and tprel relocs.
648 (allocate_dynrelocs): Adjust conditions for got relocs.
649 (elf32_hppa_relocate_section): Likewise for local sym got relocs.
650 Emit dynamic relocs on TLS GOT entries for shared libraries,
651 not when pic. Omit dynamic reloc on dtprel entry when local,
652 and on tprel entry when local and executable.
654 2018-04-19 Alan Modra <amodra@gmail.com>
657 * elf32-hppa.c (elf32_hppa_size_stubs): Init "destination" to -1.
658 (hppa_type_of_stub): Don't return a long branch stub for
659 symbols other than those defined statically.
661 2018-04-19 Alan Modra <amodra@gmail.com>
663 * Makefile.am: Revert 2018-04-18 coff-mips changes.
664 * config.bfd: Add back mips_ecoff_le_vec and mips_ecoff_be_vec
665 to selvecs for mips targets change 2018-04-18.
666 * configure.ac: Reinstate mips_ecoff_le_vec, mips_ecoff_be_vec
667 and mips_ecoff_bele_vec.
668 * targets.c: Likewise.
669 * coff-mips.c: Resurrect.
670 * Makefile.in: Regenerate.
671 * configure: Regenerate.
672 * po/SRC-POTFILES.in: Regenerate.
674 2018-04-18 Alan Modra <amodra@gmail.com>
676 * Makefile.am: Remove mips aout and coff support.
677 * config.bfd: Likewise.
678 * configure.ac: Likewise.
679 * targets.c: Likewise.
680 * coff-mips.c: Delete
684 * Makefile.in: Regenerate.
685 * configure: Regenerate.
686 * po/SRC-POTFILES.in: Regenerate.
688 2018-04-17 H.J. Lu <hongjiu.lu@intel.com>
690 * elf32-i386.c (elf32_bed): Define before including
692 * elf64-x86-64.c (elf64_bed): Define before including
694 (elf32_bed): Define before including "elf32-target.h".
696 2018-04-17 H.J. Lu <hongjiu.lu@intel.com>
699 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Use a
700 normal input file with compatible relocation.
702 2018-04-18 Alan Modra <amodra@gmail.com>
704 * Makefile.am: Remove support for assorted i386 aout and coff targets.
705 * config.bfd: Likewise.
706 * configure.ac: Likewise.
707 * doc/bfdint.texi: Likewise.
708 * targets.c: Likewise.
710 * i386dynix.c: Delete.
711 * i386freebsd.c: Delete.
712 * i386linux.c: Delete.
713 * i386mach3.c: Delete.
714 * i386netbsd.c: Delete.
715 * i386os9k.c: Delete.
716 * Makefile.in: Regenerate.
717 * configure: Regenerate.
718 * po/SRC-POTFILES.in: Regenerate.
720 2018-04-17 Andrew Sadek <andrew.sadek.se@gmail.com>
722 Microblaze Target: PIC data text relative
724 * bfd/reloc.c (2 new BFD relocations):
725 BFD_RELOC_MICROBLAZE_64_TEXTPCREL &
726 BFD_RELOC_MICROBLAZE_64_TEXTPCREL
727 * bfd/bfd-in2.h: Regenerate
728 * bfd/libbfd.h: Regenerate
729 * bfd/elf32-microblaze.c (Handle new relocs): define 'HOWTO' of 3
730 new relocs and handle them in both relocate and relax functions.
731 (microblaze_elf_reloc_type_lookup): add mapping between for new
733 (microblaze_elf_relocate_section): Handle new relocs in case of
735 (microblaze_elf_relax_section): Handle new relocs for elf relaxation.
737 2018-04-17 Nick Clifton <nickc@redhat.com>
740 * aoutx.h (find_nearest_line): Check that the symbol name exists
741 and is long enough, before attempting to see if it is for a .o
743 * hash.c (bfd_hash_hash): Add an assertion that the string is not
745 * linker.c (bfd_link_hash_lookup): Fail if the table or string are
747 (_bfd_generic_link_add_archive_symbols): Fail if an archive entry
751 * dwarf2.c (concat_filename): Check for a NULL table pointer.
753 2018-04-16 Nick Clifton <nickc@redhat.com>
756 * coffgen.c (coff_pointerize_aux): Check for an out of range
759 2018-04-16 Alan Modra <amodra@gmail.com>
761 * Makefile.am: Remove arm-epoc-pe support.
762 * coff-arm.c: Likewise.
763 * config.bfd: Likewise.
764 * configure.ac: Likewise.
765 * targets.c: Likewise.
766 * epoc-pe-arm.c: Delete.
767 * epoc-pei-arm.c: Delete.
768 * Makefile.in: Regenerate.
769 * configure: Regenerate.
770 * po/SRC-POTFILES.in: Regenerate.
772 2018-04-16 Alan Modra <amodra@gmail.com>
774 * Makefile.am: Remove sparc-aout and sparc-coff support.
775 * config.bfd: Likewise.
776 * configure.ac: Likewise.
777 * targets.c: Likewise.
778 * aout-sparcle.c: Delete.
780 * cf-sparclynx.c: Delete.
781 * coff-sparc.c: Delete.
783 * sparclinux.c: Delete.
784 * sparclynx.c: Delete.
785 * sparcnetbsd.c: Delete.
787 * Makefile.in: Regenerate.
788 * configure: Regenerate.
789 * po/SRC-POTFILES.in: Regenerate.
791 2018-04-16 Alan Modra <amodra@gmail.com>
793 * Makefile.am: Remove m68k-aout and m68k-coff support.
794 * aoutf1.h: Likewise.
796 * archive.c: Likewise.
797 * bfd-in.h: Likewise.
799 * coffcode.h: Likewise.
800 * coffswap.h: Likewise.
801 * config.bfd: Likewise.
802 * configure.ac: Likewise.
803 * configure.host: Likewise.
804 * doc/bfd.texinfo: Likewise.
805 * doc/bfdint.texi: Likewise.
806 * freebsd.h: Likewise.
807 * gen-aout.c: Likewise.
808 * hpux-core.c: Likewise.
809 * libaout.h: Likewise.
810 * libbfd-in.h: Likewise.
812 * peicode.h: Likewise.
813 * riscix.c: Likewise.
814 * targets.c: Likewise.
816 * coff-apollo.c: Delete.
817 * coff-aux.c: Delete.
818 * coff-m68k.c: Delete.
819 * coff-svm68k.c: Delete.
820 * coff-u68k.c: Delete.
821 * hosts/delta68.h: Delete.
822 * hosts/hp300bsd.h: Delete.
823 * hosts/m68kaux.h: Delete.
824 * hosts/news.h: Delete.
825 * hp300bsd.c: Delete.
826 * hp300hpux.c: Delete.
827 * liboasys.h: Delete.
828 * m68k4knetbsd.c: Delete.
829 * m68klinux.c: Delete.
830 * m68knetbsd.c: Delete.
832 * versados.c: Delete.
833 * Makefile.in: Regenerate.
834 * bfd-in2.h: Regenerate.
835 * configure: Regenerate.
836 * libbfd.h: Regenerate.
837 * po/SRC-POTFILES.in: Regenerate.
839 2018-04-16 Alan Modra <amodra@gmail.com>
841 * Makefile.am: Remove sh5 and sh64 support.
842 * archures.c: Likewise.
843 * config.bfd: Likewise.
844 * configure.ac: Likewise.
845 * cpu-sh.c: Likewise.
846 * elf32-sh-relocs.h: Likewise.
847 * elf32-sh.c: Likewise.
848 * targets.c: Likewise.
849 * elf32-sh64-com.c: Delete.
850 * elf32-sh64.c: Delete.
851 * elf32-sh64.h: Delete.
852 * elf64-sh64.c: Delete.
853 * Makefile.in: Regenerate.
854 * bfd-in2.h: Regenerate.
855 * configure: Regenerate.
856 * po/SRC-POTFILES.in: Regenerate.
858 2018-04-16 Alan Modra <amodra@gmail.com>
860 * Makefile.am: Remove sh-symbianelf support.
861 * config.bfd: Likewise.
862 * configure.ac: Likewise.
863 * targets.c: Likewise.
864 * elf32-sh-symbian.c: Delete.
865 * Makefile.in: Regenerate.
866 * configure: Regenerate.
867 * po/SRC-POTFILES.in: Regenerate.
869 2018-04-16 Alan Modra <amodra@gmail.com>
871 * Makefile.am: Remove vax-bsd and vax-ultrix support.
872 * config.bfd: Likewise.
873 * configure.ac: Likewise.
874 * targets.c: Likewise.
876 * Makefile.in: Regenerate.
877 * configure: Regenerate.
878 * po/SRC-POTFILES.in: Regenerate.
880 2018-04-16 Alan Modra <amodra@gmail.com>
882 * Makefile.am: Remove w65 support.
883 * archures.c: Likewise.
884 * coffcode.h: Likewise.
885 * config.bfd: Likewise.
886 * configure.ac: Likewise.
887 * targets.c: Likewise.
888 * coff-w65.c: Delete.
890 * Makefile.in: Regenerate.
891 * bfd-in2.h: Regenerate.
892 * configure: Regenerate.
893 * po/SRC-POTFILES.in: Regenerate.
895 2018-04-16 Alan Modra <amodra@gmail.com>
897 * Makefile.am: Remove we32k support.
898 * archures.c: Likewise.
899 * coffcode.h: Likewise.
900 * config.bfd: Likewise.
901 * configure.ac: Likewise.
902 * targets.c: Likewise.
903 * coff-we32k.c: Delete.
904 * cpu-we32k.c: Delete.
905 * Makefile.in: Regenerate.
906 * bfd-in2.h: Regenerate.
907 * configure: Regenerate.
908 * po/SRC-POTFILES.in: Regenerate.
910 2018-04-16 Alan Modra <amodra@gmail.com>
912 * Makefile.am: Remove m88k support.
914 * archures.c: Likewise.
915 * coffcode.h: Likewise.
916 * coffswap.h: Likewise.
917 * config.bfd: Likewise.
918 * configure.ac: Likewise.
919 * cpu-ns32k.c: Likewise.
920 * elf32-nds32.c: Likewise.
921 * mach-o.c: Likewise.
922 * netbsd-core.c: Likewise.
924 * targets.c: Likewise.
925 * coff-m88k.c: Delete.
926 * cpu-m88k.c: Delete.
927 * elf32-m88k.c: Delete.
928 * hosts/m88kmach3.h: Delete.
929 * m88kmach3.c: Delete.
930 * m88kopenbsd.c: Delete.
931 * Makefile.in: Regenerate.
932 * bfd-in2.h: Regenerate.
933 * configure: Regenerate.
934 * po/SRC-POTFILES.in: Regenerate.
936 2018-04-16 Alan Modra <amodra@gmail.com>
938 * Makefile.am: Remove i370 support.
939 * archures.c: Likewise.
940 * config.bfd: Likewise.
941 * configure.ac: Likewise.
942 * targets.c: Likewise.
943 * cpu-i370.c: Delete.
944 * elf32-i370.c: Delete.
945 * Makefile.in: Regenerate.
946 * bfd-in2.h: Regenerate.
947 * configure: Regenerate.
948 * po/SRC-POTFILES.in: Regenerate.
950 2018-04-16 Alan Modra <amodra@gmail.com>
952 * Makefile.am: Remove h8500 support.
953 * archures.c: Likewise.
954 * coffcode.h: Likewise.
955 * config.bfd: Likewise.
956 * configure.ac: Likewise.
957 * targets.c: Likewise.
958 * coff-h8500.c: Delete.
959 * cpu-h8500.c: Delete.
960 * Makefile.in: Regenerate.
961 * bfd-in2.h: Regenerate.
962 * configure: Regenerate.
963 * po/SRC-POTFILES.in: Regenerate.
965 2018-04-16 Alan Modra <amodra@gmail.com>
967 * Makefile.am: Remove h8300-coff support.
968 * coffcode.h: Likewise.
969 * config.bfd: Likewise.
970 * configure.ac: Likewise.
971 * reloc16.c: Likewise.
972 * targets.c: Likewise.
973 * coff-h8300.c: Delete.
974 * Makefile.in: Regenerate.
975 * configure: Regenerate.
976 * po/SRC-POTFILES.in: Regenerate.
978 2018-04-16 Alan Modra <amodra@gmail.com>
980 * Makefile.am: Remove IEEE 695 support.
981 * archures.c: Likewise.
983 * config.bfd: Likewise.
984 * configure.ac: Likewise.
985 * doc/bfd.texinfo: Likewise.
986 * doc/bfdint.texi: Likewise.
987 * doc/bfdsumm.texi: Likewise.
988 * section.c: Likewise.
989 * targets.c: Likewise.
992 * Makefile.in: Regenerate.
993 * bfd-in2.h: Regenerate.
994 * configure: Regenerate.
995 * po/SRC-POTFILES.in: Regenerate.
997 2018-04-16 Alan Modra <amodra@gmail.com>
999 * config.bfd: Remove tandem support.
1001 2018-04-16 Alan Modra <amodra@gmail.com>
1003 * Makefile.am: Remove newsos3 support.
1004 * aoutx.h: Likewise.
1005 * config.bfd: Likewise.
1006 * configure.ac: Likewise.
1007 * targets.c: Likewise.
1008 * newsos3.c: Delete.
1009 * Makefile.in: Regenerate.
1010 * configure: Regenerate.
1011 * po/SRC-POTFILES.in: Regenerate.
1013 2018-04-16 Alan Modra <amodra@gmail.com>
1015 * Makefile.am: Remove netware support.
1016 * bfd-in.h: Likewise.
1018 * config.bfd: Likewise.
1019 * configure.ac: Likewise.
1020 * doc/bfdint.texi: Likewise.
1021 * ecoff.c: Likewise.
1022 * targets.c: Likewise.
1024 * nlm-target.h: Delete.
1026 * nlm32-alpha.c: Delete.
1027 * nlm32-i386.c: Delete.
1028 * nlm32-ppc.c: Delete.
1029 * nlm32-sparc.c: Delete.
1032 * nlmcode.h: Delete.
1033 * nlmswap.h: Delete.
1034 * Makefile.in: Regenerate.
1035 * bfd-in2.h: Regenerate.
1036 * configure: Regenerate.
1037 * po/SRC-POTFILES.in: Regenerate.
1039 2018-04-16 Alan Modra <amodra@gmail.com>
1041 * archures.c: Remove tahoe support.
1042 * config.bfd: Likewise.
1043 * configure.ac: Likewise.
1044 * hosts/tahoe.h: Delete.
1045 * bfd-in2.h: Regenerate.
1046 * configure: Regenerate.
1048 2018-04-14 Alan Modra <amodra@gmail.com>
1050 * elf-bfd.h (struct elf_backend_data): Add relropagesize.
1051 * elfxx-target.h (ELF_RELROPAGESIZE): Provide default and
1053 (elfNN_bed): Init relropagesize.
1054 * bfd.c (bfd_emul_get_commonpagesize): Add boolean param to
1055 select relropagesize.
1056 * elf32-ppc.c (ELF_COMMONPAGESIZE): Define as 0x1000.
1057 (ELF_RELROPAGESIZE): Define as ELF_MAXPAGESIZE.
1058 (ELF_MINPAGESIZE): Don't define.
1059 * elf64-ppc.c (ELF_COMMONPAGESIZE): Define as 0x1000.
1060 (ELF_RELROPAGESIZE): Define as ELF_MAXPAGESIZE.
1061 * bfd-in2.h: Regenerate.
1063 2018-04-14 Alan Modra <amodra@gmail.com>
1065 * elf32-ppc.c (ELF_MAXPAGESIZE, ELF_COMMONPAGESIZE): Don't depend
1066 on __QNXTARGET__ define.
1068 2018-04-14 Alan Modra <amodra@gmail.com>
1070 * config.bfd: Add powerpc-*-lynxos* and powerpc-*-windiss*
1073 2018-04-11 Alan Modra <amodra@gmail.com>
1075 * aout-adobe.c: Delete.
1077 * coff-i860.c: Delete.
1078 * coff-i960.c: Delete.
1079 * cpu-i860.c: Delete.
1080 * cpu-i960.c: Delete.
1081 * elf32-i860.c: Delete.
1082 * elf32-i960.c: Delete.
1083 * hosts/i860mach3.h: Delete.
1084 * Makefile.am: Remove i860, i960, bout, and adobe support.
1085 * archures.c: Remove i860 and i960 support.
1086 * coffcode.h: Likewise.
1087 * reloc.c: Likewise.
1088 * aoutx.h: Comment updates.
1089 * archive.c: Remove BOUT and i960 support.
1090 * bfd.c: Remove BOUT support.
1091 * coffswap.h: Remove i960 support.
1092 * config.bfd: Remove i860, i960 and adobe targets.
1093 * configure.ac: Remove adode, bout, i860, i960, icoff targets.
1094 * targets.c: Likewise.
1095 * ieee.c: Remove i960 support.
1096 * mach-o.c: Remove i860 support.
1097 * Makefile.in: Regenerate.
1098 * bfd-in2.h: Regenerate.
1099 * configure: Regenerate.
1100 * libbfd.h: Regenerate.
1101 * po/SRC-POTFILES.in: Regenerate.
1103 2018-04-09 Maciej W. Rozycki <macro@mips.com>
1105 * elf64-mips.c (mips_elf64_write_rel): Handle a NULL BFD pointer
1106 in the BFD symbol referred by the relocation.
1107 (mips_elf64_write_rela): Likewise.
1109 2018-04-09 Maciej W. Rozycki <macro@mips.com>
1111 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Issue an
1112 error for out-of-range `r_sym' values.
1114 2018-04-09 Alan Modra <amodra@gmail.com>
1116 * elf64-ppc.c (struct _ppc64_elf_section_data): Add has_pltcall field.
1117 (struct ppc_link_hash_table): Add can_convert_all_inline_plt.
1118 (ppc64_elf_check_relocs): Set has_pltcall.
1119 (ppc64_elf_adjust_dynamic_symbol): Discard some PLT entries.
1120 (ppc64_elf_inline_plt): New function.
1121 (ppc64_elf_size_dynamic_sections): Discard some PLT entries for locals.
1122 * elf64-ppc.h (ppc64_elf_inline_plt): Declare.
1123 * elf32-ppc.c (has_pltcall): Define.
1124 (struct ppc_elf_link_hash_table): Add can_convert_all_inline_plt.
1125 (ppc_elf_check_relocs): Set has_pltcall.
1126 (ppc_elf_inline_plt): New function.
1127 (ppc_elf_adjust_dynamic_symbol): Discard some PLT entries.
1128 (ppc_elf_size_dynamic_sections): Likewise.
1129 * elf32-ppc.h (ppc_elf_inline_plt): Declare.
1131 2018-04-09 Alan Modra <amodra@gmail.com>
1133 * elf32-ppc.c (ppc_elf_howto_raw): Add PLTSEQ and PLTCALL howtos.
1134 (is_plt_seq_reloc): New function.
1135 (ppc_elf_check_relocs): Handle PLTSEQ and PLTCALL relocs.
1136 (ppc_elf_tls_optimize): Handle inline plt call sequence.
1137 (ppc_elf_relax_section): Handle PLTCALL reloc.
1138 (ppc_elf_relocate_section): Nop out inline plt call sequence when
1140 * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_PLTSEQ and
1141 R_PPC64_PLTCALL entries. Comment R_PPC64_TOCSAVE.
1142 (has_tls_get_addr_call): Correct comment.
1143 (is_branch_reloc): Add PLTCALL.
1144 (is_plt_seq_reloc): New function.
1145 (ppc64_elf_check_relocs): Handle PLT16_LO_DS reloc. Set
1146 has_tls_reloc for R_PPC64_TLSGD and R_PPC64_TLSLD. Create plt
1147 entry for R_PPC64_PLTCALL.
1148 (ppc64_elf_tls_optimize): Handle inline plt call sequence.
1149 (ppc_type_of_stub): Handle PLTCALL reloc.
1150 (toc_adjusting_stub_needed): Likewise.
1151 (ppc64_elf_relocate_section): Set "can_plt_call" for PLTCALL
1152 reloc insn. Nop out inline plt call sequence when resolving
1153 locally. Handle __tls_get_addr inline plt call optimization.
1155 2018-04-09 Alan Modra <amodra@gmail.com>
1157 * elf64-ppc.c (LOCAL_PLT_ENTRY_SIZE): Define.
1158 (struct ppc_stub_hash_entry): Add symtype field.
1160 (struct ppc_link_hash_table): Add pltlocal and relpltlocal.
1161 (create_linkage_sections): Create pltlocal and relpltlocal.
1162 (ppc64_elf_check_relocs): Allow PLT relocs on local symbols.
1164 (ppc64_elf_adjust_dynamic_symbol): Keep PLT entries for inline calls.
1165 (allocate_dynrelocs): Allocate pltlocal and relpltlocal.
1166 (ppc64_elf_size_dynamic_sections): Size pltlocal and relpltlocal.
1167 Keep PLT entries for inline calls against locals.
1168 (ppc_build_one_stub): Use pltlocal as appropriate.
1169 (ppc_size_one_stub): Likewise.
1170 (ppc64_elf_size_stubs): Set symtype.
1171 (build_global_entry_stubs_and_plt): Init pltlocal and write
1172 relpltlocal for globals.
1173 (write_plt_relocs_for_local_syms): Likewise for local syms.
1174 (ppc64_elf_relocate_section): Support PLT for local syms.
1175 * elf32-ppc.c (PLT_KEEP): Define.
1176 (struct ppc_elf_link_hash_table): Add pltlocal and relpltlocal.
1177 (ppc_elf_create_glink): Create pltlocal and relpltlocal.
1178 (ppc_elf_check_relocs): Allow PLT relocs on local symbols.
1179 Set PLT_KEEP. Adjust update_local_sym_info call.
1180 (ppc_elf_adjust_dynamic_symbol): Keep PLT entries for inline calls.
1181 (allocate_dynrelocs): Allocate pltlocal and relpltlocal.
1182 (ppc_elf_size_dynamic_sections): Size pltlocal and relpltlocal.
1183 (ppc_elf_relocate_section): Support PLT16 relocs for local syms.
1184 (write_global_sym_plt): Init pltlocal and write relpltlocal.
1185 (ppc_finish_symbols): Likewise for locals.
1187 2018-04-09 Alan Modra <amodra@gmail.com>
1189 * elf64-ppc.c (ppc_build_one_stub): Move output of PLT relocs
1190 for local symbols to..
1191 (write_plt_relocs_for_local_syms): ..here. New function.
1192 (ppc64_elf_finish_dynamic_symbol): Move output of PLT relocs for
1194 (build_global_entry_stubs_and_plt): ..here. Rename from
1195 build_global_entry_stubs.
1196 (ppc64_elf_build_stubs): Always call build_global_entry_stubs_and_plt.
1197 Call write_plt_relocs_for_local_syms.
1198 * elf32-ppc.c (get_sym_h): New function.
1199 (ppc_elf_relax_section): Use get_sym_h.
1200 (ppc_elf_relocate_section): Move output of PLT relocs and glink
1201 stubs for local symbols to..
1202 (ppc_finish_symbols): ..here. New function.
1203 (ppc_elf_finish_dynamic_symbol): Move output of PLT relocs for
1205 (write_global_sym_plt): ..here. New function.
1206 * elf32-ppc.h (ppc_elf_modify_segment_map): Delete attribute.
1207 (ppc_finish_symbols): Declare.
1209 2018-04-09 Alan Modra <amodra@gmail.com>
1211 * elf32-ppc.c (ppc_elf_check_relocs): Handle PLT16 relocs.
1212 (ppc_elf_relocate_section): Likewise.
1213 * elf64-ppc.c (ppc64_elf_check_relocs): Handle PLT16_LO_DS.
1214 (ppc64_elf_relocate_section): Likewise. Correct PLT16
1215 resolution to plt entry relative to toc pointer.
1217 2018-04-09 Alan Modra <amodra@gmail.com>
1219 * elf64-ppc.c (TLS_TLS, TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL,
1220 TLS_TPRELGD, TLS_EXPLICIT): Renumber. Test TLS_TLS throughout
1221 file when other TLS flags are tested in a mask.
1222 (TLS_MARK, NON_GOT): Define.
1223 (PLT_IFUNC): Redefine, and test TLS_TLS throughout file as well.
1224 (update_local_sym_info): Don't create got entry when NON_GOT.
1225 (ppc64_elf_check_relocs): Pass NON_GOT with PLT_IFUNC.
1227 (get_tls_mask): Do toc lookup if tls_mask is just TLS_MARK.
1228 (ppc64_elf_relocate_section): Likewise.
1229 (ppc64_elf_tls_optimize): Don't attempt to optimize indirect
1230 __tls_get_addr calls lacking a marker reloc.
1231 * elf32-ppc.c (TLS_TLS, TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL,
1232 TLS_TPRELGD): Renumber. Update comment.
1233 (TLS_MARK, NON_GOT): Define.
1234 (PLT_IFUNC): Redefine, and test TLS_TLS throughout file as well.
1235 (update_local_sym_info): Don't create got entry when NON_GOT.
1236 (ppc_elf_check_relocs): Pass NON_GOT with PLT_IFUNC.
1238 (ppc_elf_tls_optimize): Don't attempt to optimize indirect
1239 __tls_get_addr calls lacking a marker reloc.
1241 2018-04-06 H.J. Lu <hongjiu.lu@intel.com>
1243 * elf64-x86-64.c (elf_x86_64_info_to_howto): Don't mask out
1244 R_X86_64_converted_reloc_bit.
1246 2018-04-05 H.J. Lu <hongjiu.lu@intel.com>
1249 * configure: Regenerated.
1251 2018-04-05 Alan Modra <amodra@gmail.com>
1253 * elf-hppa.h (elf_hppa_info_to_howto): Init howto to NULL.
1254 (elf_hppa_info_to_howto_rel): Likewise.
1256 2018-04-04 Maciej W. Rozycki <macro@mips.com>
1258 * elf-hppa.h (elf_hppa_info_to_howto): Also return
1259 unsuccessfully for unimplemented relocations.
1260 (elf_hppa_info_to_howto_rel): Likewise.
1262 2018-04-04 Maciej W. Rozycki <macro@mips.com>
1264 * elf32-i860.c (lookup_howto): Add `abfd' parameter. Set the
1265 `bfd_error_bad_value' error and call `_bfd_error_handler' on a
1266 howto lookup failure.
1267 (elf32_i860_reloc_type_lookup): Adjust `lookup_howto' call
1269 (elf32_i860_info_to_howto_rela): Likewise.
1270 (elf32_i860_relocate_splitn): Likewise.
1271 (elf32_i860_relocate_pc16): Likewise.
1272 (elf32_i860_relocate_pc26): Likewise.
1273 (elf32_i860_relocate_section): Likewise.
1275 2018-04-04 Maciej W. Rozycki <macro@mips.com>
1277 * elf32-visium.c (visium_info_to_howto_rela): Correct the range
1278 check for `visium_elf_howto_table' table access.
1280 2018-04-04 Maciej W. Rozycki <macro@mips.com>
1282 * elf32-iq2000.c (iq2000_info_to_howto_rela): Correct the range
1283 check for `iq2000_elf_howto_table' table access.
1285 2018-04-04 Maciej W. Rozycki <macro@mips.com>
1287 * elf32-frv.c (frv_info_to_howto_rela): Correct the range check
1288 for `elf32_frv_howto_table' table access.
1290 2018-04-04 Maciej W. Rozycki <macro@mips.com>
1292 * elf32-mips.c (mips_elf32_rtype_to_howto): Also return
1293 unsuccessfully for placeholder howtos.
1294 * elf64-mips.c (mips_elf64_rtype_to_howto): Likewise.
1295 * elfn32-mips.c (mips_elf_n32_rtype_to_howto): Likewise.
1297 2018-03-29 Maciej W. Rozycki <macro@mips.com>
1299 * elf32-mips.c (mips_info_to_howto_rel): Remove the calls to
1300 `_bfd_error_handler' and to set the `bfd_error_bad_value' error.
1302 2018-03-28 Maciej W. Rozycki <macro@mips.com>
1304 * elf-hppa.h (elf_hppa_info_to_howto_rel): Remove
1305 ATTRIBUTE_UNUSED from `abfd'.
1307 2018-03-28 Maciej W. Rozycki <macro@mips.com>
1309 * elf-hppa.h (elf_hppa_info_to_howto_rel): Correct
1310 `_bfd_error_handler' call formatting.
1312 2018-03-28 Maciej W. Rozycki <macro@mips.com>
1314 * elf32-mips.c (mips_info_to_howto_rel): Call
1315 `mips_elf32_rtype_to_howto' directly rather than via
1316 `->elf_backend_mips_rtype_to_howto'.
1318 2018-03-28 Renlin Li <renlin.li@arm.com>
1321 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Add cases for
1322 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12,
1323 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
1324 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12,
1325 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
1326 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12,
1327 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
1328 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12,
1329 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
1330 (elfNN_aarch64_final_link_relocate): Support new relocations.
1331 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Support new
1333 (_bfd_aarch64_elf_resolve_relocation): Support new relocations.
1335 2018-03-28 Renlin Li <renlin.li@arm.com>
1338 * reloc.c: Add BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12
1339 BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12_NC,
1340 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12,
1341 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
1342 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12,
1343 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
1344 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12,
1345 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
1346 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12,
1347 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
1348 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Add table entry for
1349 TLSLE_LDST16_TPREL_LO12,
1350 TLSLE_LDST16_TPREL_LO12_NC,
1351 TLSLE_LDST32_TPREL_LO12,
1352 TLSLE_LDST32_TPREL_LO12_NC,
1353 TLSLE_LDST64_TPREL_LO12,
1354 TLSLE_LDST64_TPREL_LO12_NC,
1355 TLSLE_LDST8_TPREL_LO12,
1356 TLSLE_LDST8_TPREL_LO12_NC.
1357 * bfd-in2.h: Regenerated.
1358 * libbfd.h: Regenerated.
1360 2018-03-28 Eric Botcazou <ebotcazou@adacore.com>
1363 * elfxx-sparc.c (struct _bfd_sparc_elf_link_hash_entry): Add new flag
1364 has_old_style_got_reloc.
1365 (_bfd_sparc_elf_check_relocs) <GOT relocations>: Set it for old-style
1366 relocations. Fix a couple of long lines.
1367 (_bfd_sparc_elf_relocate_section) <R_SPARC_GOTDATA_OP>: Do not generate
1368 a R_SPARC_NONE for the GOT slot if the symbol is also subject to old-style
1371 2018-03-25 H.J. Lu <hongjiu.lu@intel.com>
1374 * elf64-x86-64.c (elf_x86_64_finish_dynamic_sections): Add
1375 ENDBR64 to the TLSDESC PLT entry.
1377 2018-03-21 Alan Modra <amodra@gmail.com>
1379 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Trim uninteresting
1380 symbols. Use size_t counts. Delete redundant opd test.
1382 2018-03-21 Alan Modra <amodra@gmail.com>
1384 * elf32-ppc.c (ppc_elf_tls_optimize): Delete locsyms.
1386 2018-03-21 Alan Modra <amodra@gmail.com>
1388 * elf32-ppc.c (struct ppc_elf_link_hash_entry): Make tls_mask
1390 (update_local_sym_info): Likewise for local_got_tls_masks.
1391 (ppc_elf_tls_optimize): Likewise for lgot_masks.
1393 2018-03-21 Alan Modra <amodra@gmail.com>
1395 * elf64-ppc.c (ppc_size_one_stub): Fix comment typo.
1396 (ppc64_elf_layout_multitoc): Allocate relocs for tprel as we
1397 do in size_dynamic_sections.
1399 2018-03-21 Alan Modra <amodra@gmail.com>
1401 * elf64-ppc.c (ppc64_elf_relocate_section): Don't access rel[1]
1402 without first checking array bounds.
1403 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1405 2018-03-20 H.J. Lu <hongjiu.lu@intel.com>
1408 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Set
1409 non_ir_ref_dynamic if a symbol is made dynamic by --dynamic-list.
1411 2018-03-19 Nick Clifton <nickc@redhat.com>
1413 * po/es.po: Updated Spanish translation.
1415 2018-03-15 Max Filippov <jcmvbkbc@gmail.com>
1417 * elf32-xtensa.c (xlate_map_entry): Change types of address
1418 fields from 'unsigned' to 'bfd_vma'.
1419 (xlate_offset_with_removed_text): Use struct xlate_map_entry as
1420 the key argument to bsearch. Allow offsets past the end of a
1421 section, use the last map entry for translation of such offsets.
1423 2018-03-15 Kuan-Lin Chen <kuanlinchentw@gmail.com>
1425 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Removed.
1426 Not support the target feature.
1427 (nds32_elf_ex9_itb_base): Likewise.
1428 (nds32_elf_ex9_import_table): Likewise.
1429 (nds32_elf_ex9_finish): Likewise.
1430 (nds32_elf_ex9_reloc_jmp): Likewise.
1431 (nds32_elf_get_insn_with_reg): Likewise.
1432 (nds32_get_local_syms): Likewise.
1433 (nds32_elf_ex9_replace_instruction): Likewise.
1434 (nds32_elf_ifc_calc): Likewise.
1435 (nds32_elf_ifc_finish): Likewise.
1436 (nds32_elf_ifc_replace): Likewise.
1437 (nds32_elf_ifc_reloc): Likewise.
1439 2018-03-14 Alan Modra <amodra@gmail.com>
1441 * elf64-ppc.c (sfpr_define): Adjust for stub_sec size having
1442 sfpr size added before defining alias symbols.
1443 (ppc64_elf_build_stubs): Add stub section padding before
1444 copying sfpr contents and defining save/restore alias symbols.
1446 2018-03-14 H.J. Lu <hongjiu.lu@intel.com>
1449 * elflink.c (elf_gc_mark_debug_section): Also check the local
1450 debug definition section.
1452 2018-03-13 Nick Clifton <nickc@redhat.com>
1455 * pei-x86_64.c (pex64_get_unwind_info): Change to a boolean
1456 function. Add an end address parameter. Check access of the data
1457 pointer to make sure that they do not extend beyond the end
1458 address. Return FALSE if any check fails. Add the end address
1459 pointer to the ui structure.
1460 (pex64_xdata_print_uwd_codes): Check accesses of the raw unwind
1461 codes to make sure that they do not extend beyond the end address
1462 pointer. Print an error message and return immediately if any
1465 2018-03-09 Nick Clifton <nickc@redhat.com>
1467 * elf64-s390.c (elf_s390_relocate_section): Move check for
1468 relocations against non-allocated sections to before the code that
1469 handles ifunc relocations.
1470 * elf32-s390.c (elf_s390_relocate_section): Likewise.
1471 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Treat
1472 relocs against IFUNC symbols in non-allocated sections as relocs
1473 against FUNC symbols.
1474 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
1476 2018-03-08 H.J. Lu <hongjiu.lu@intel.com>
1479 * elf32-i386.c (elf_i386_relocate_section): Treat relocation
1480 against IFUNC symbol in SHT_NOTE section without SHF_ALLOC as
1481 relocation against FUNC symbol.
1482 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1484 2018-03-07 Renlin Li <renlin.li@arm.com>
1487 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Check absolute
1488 symbol, and don't emit relocation in specific case.
1490 2018-03-07 Alan Modra <amodra@gmail.com>
1492 * elf64-mips.c (mips_elf64_rtype_to_howto): Return NULL on error.
1493 (mips_elf64_slurp_one_reloc_table): Pass on error.
1495 2018-03-03 James Cowgill <james.cowgill@mips.com>
1496 Maciej W. Rozycki <macro@mips.com>
1499 * elfxx-mips.c (mips_elf_calculate_relocation): Only return
1500 after calling `undefined_symbol' hook if this is an error
1501 condition. Assume the value of 0 for the symbol requested
1504 2018-03-02 Jim Wilson <jimw@sifive.com>
1507 * elfnn-aarch64.c (_bfd_aarch64_resize_stubs): Add 8 bytes for branch
1508 and nop instead of 4.
1509 (elfNN_arch64_build_stubs): Add nop after branch. Increase size by
1512 2018-03-01 Jim Wilson <jimw@sifive.com>
1515 * elfnn-riscv.c (riscv_relax_delete_bytes): When adjust st_size, use
1516 else if instead of if.
1518 2018-03-01 Alan Modra <amodra@gmail.com>
1520 * elf32-ft32.c (ft32_info_to_howto_rela): Correct range test.
1522 2018-02-28 Alan Modra <amodra@gmail.com>
1525 * aoutx.h (swap_std_reloc_in): Correct r_index bound check.
1527 2018-02-28 Nick Clifton <nickc@redhat.com>
1531 * dwarf2.c (read_n_bytes): Replace size parameter with dwarf_block
1532 pointer. Drop unused abfd parameter. Check the size of the block
1533 before initialising the data field. Return the end pointer if the
1535 (read_attribute_value): Adjust invocations of read_n_bytes.
1538 * dwarf1.c (parse_die): Check the length of form blocks before
1539 advancing the data pointer.
1541 2018-02-28 Alan Modra <amodra@gmail.com>
1544 * aoutx.h (translate_symbol_table): Print an error message and set
1545 bfd_error on finding an invalid name string offset.
1547 2018-02-27 H.J. Lu <hongjiu.lu@intel.com>
1549 * config.in: Regenerated.
1550 * configure: Likewise.
1551 * configure.ac: Add --enable-separate-code.
1552 (DEFAULT_LD_Z_SEPARATE_CODE): New AC_DEFINE_UNQUOTED. Default
1553 to 1 for Linux/x86 targets,
1554 * elf64-x86-64.c (ELF_MAXPAGESIZE): Set to 0x1000 if
1555 DEFAULT_LD_Z_SEPARATE_CODE is 1.
1557 2018-02-27 Nick Clifton <nickc@redhat.com>
1559 * aout-cris.c (swap_ext_reloc_out): Standadize error/warning
1561 * elf-hppa.h (elf_hppa_info_to_howto_rel): Likewise.
1562 * elf32-i386.c (elf_i386_reloc_type_lookup): Likewise.
1563 * elf32-xtensa.c (elf_xtensa_reloc_type_lookup): Likewise.
1564 * elf64-ppc.c (ppc64_elf_reloc_type_lookup): Likewise.
1565 * elf64-s390.c (elf_s390_reloc_type_lookup): Likewise.
1566 * elf64-sh64.c (sh_elf64_info_to_howto): Likewise.
1567 * elfxx-ia64.c (ia64_elf_reloc_type_lookup): Likewise.
1568 * elfxx-sparc.c (_bfd_sparc_elf_reloc_type_lookup): Likewise.
1569 * elfxx-tilegx.c (tilegx_reloc_type_lookup): Likewise.
1572 * elf-bfd.h (struct elf_backend_data): Change the return type of
1573 the elf_info_to_howto and elf_info_to_howto_rel function pointers
1575 * elfcode.h (elf_slurp_reloc_table_from_section): Check the return
1576 value from the info_to_howto function and fail if that function
1578 * elf32-h8300.c (elf32_h8_relocate_section): Check return value
1579 from the info_to_howto function.
1580 (elf32_h8_relax_section): Likewise.
1581 * elf32-lm32.c (lm32_elf_relocate_section): Likewise.
1582 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
1583 * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise.
1584 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
1585 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
1586 * elf64-ia64-vms.c (elf64_ia64_relocate_section): Likewise.
1587 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Likewise.
1588 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
1589 * elfnn-ia64.c (elfNN_ia64_relocate_section): Likewise.
1590 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
1591 (riscv_elf_relocate_section): Likewise.
1592 * elf-hppa.h (elf_hppa_info_to_howto): Change return type to
1593 bfd_boolean. Issue an error message, set an error value and
1594 return FALSE if the reloc is not recognized.
1595 (elf_hppa_info_to_howto_rel): Likewise.
1596 * elf-m10200.c (mn10200_info_to_howto): Likewise.
1597 * elf-m10300.c (mn10300_info_to_howto): Likewise.
1598 * elf.c (_bfd_elf_no_info_to_howto): Likewise.
1599 * elf32-arc.c (arc_info_to_howto_rel): Likewise.
1600 * elf32-arm.c (elf32_arm_info_to_howto): Likewise.
1601 * elf32-avr.c (avr_info_to_howto_rela): Likewise.
1602 * elf32-bfin.c (bfin_info_to_howto): Likewise.
1603 * elf32-cr16.c (elf_cr16_info_to_howto): Likewise.
1604 * elf32-cr16c.c (elf_cr16c_info_to_howto): Likewise.
1605 * elf32-cris.c (elf_cr16c_info_to_howto_rel)
1606 (cris_info_to_howto_rela): Likewise.
1607 * elf32-crx.c (elf_crx_info_to_howto): Likewise.
1608 * elf32-d10v.c (d10v_info_to_howto_rel): Likewise.
1609 * elf32-d30v.c (d30v_info_to_howto_rel, d30v_info_to_howto_rela):
1611 * elf32-dlx.c (dlx_rtype_to_howto, elf32_dlx_info_to_howto)
1612 (elf32_dlx_info_to_howto_rel): Likewise.
1613 * elf32-epiphany.c (epiphany_info_to_howto_rela): Likewise.
1614 * elf32-fr30.c (fr30_info_to_howto_rela): Likewise.
1615 * elf32-frv.c (frv_info_to_howto_rela)
1616 (frvfdpic_info_to_howto_rel): Likewise.
1617 * elf32-ft32.c (ft32_info_to_howto_rela): Likewise.
1618 * elf32-gen.c (elf_generic_info_to_howto)
1619 (elf_generic_info_to_howto_rel): Likewise.
1620 * elf32-h8300.c (elf32_h8_info_to_howto)
1621 (elf32_h8_info_to_howto_rel): Likewise.
1622 * elf32-i370.c (i370_elf_info_to_howto): Likewise.
1623 * elf32-i386.c (elf_i386_reloc_type_lookup)
1624 (elf_i386_rtype_to_howto, elf_i386_info_to_howto_rel): Likewise.
1625 * elf32-i860.c (lookup_howto, elf32_i860_info_to_howto_rela):
1627 * elf32-i960.c (elf32_i960_info_to_howto_rel): Likewise.
1628 * elf32-ip2k.c (ip2k_info_to_howto_rela): Likewise.
1629 * elf32-iq2000.c (iq2000_info_to_howto_rela): Likewise.
1630 * elf32-lm32.c (lm32_info_to_howto_rela): Likewise.
1631 * elf32-m32c.c (m32c_info_to_howto_rela): Likewise.
1632 * elf32-m32r.c (m32r_info_to_howto_rel, m32r_info_to_howto):
1634 * elf32-m68hc11.c (m68hc11_info_to_howto_rel): Likewise.
1635 * elf32-m68hc12.c (m68hc11_info_to_howto_rel): Likewise.
1636 * elf32-m68k.c (rtype_to_howto): Likewise.
1637 * elf32-mcore.c (mcore_elf_info_to_howto): Likewise.
1638 * elf32-mep.c (mep_info_to_howto_rela): Likewise.
1639 * elf32-metag.c (metag_info_to_howto_rela): Likewise.
1640 * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise.
1641 * elf32-mips.c (mips_info_to_howto_rel, mips_info_to_howto_rela):
1643 * elf32-moxie.c (moxie_info_to_howto_rela): Likewise.
1644 * elf32-msp430.c (msp430_info_to_howto_rela): Likewise.
1645 * elf32-mt.c (mt_info_to_howto_rela): Likewise.
1646 * elf32-nds32.c (nds32_info_to_howto_rel, nds32_info_to_howto):
1648 * elf32-nios2.c (nios2_elf32_info_to_howto): Likewise.
1649 * elf32-or1k.c (or1k_info_to_howto_rela): Likewise.
1650 * elf32-pj.c (pj_elf_info_to_howto): Likewise.
1651 * elf32-ppc.c (ppc_elf_info_to_howto): Likewise.
1652 * elf32-pru.c (pru_elf32_info_to_howto): Likewise.
1653 * elf32-rl78.c (rl78_info_to_howto_rela): Likewise.
1654 * elf32-rx.c (rx_info_to_howto_rela): Likewise.
1655 * elf32-s390.c (elf_s390_info_to_howto): Likewise.
1656 * elf32-score.c (s3_bfd_score_info_to_howto)
1657 (_bfd_score_info_to_howto): Likewise.
1658 * elf32-score7.c (s7_bfd_score_info_to_howto): Likewise.
1659 * elf32-sh.c (sh_elf_info_to_howto): Likewise.
1660 * elf32-spu.c (spu_elf_info_to_howto): Likewise.
1661 * elf32-tic6x.c (elf32_tic6x_info_to_howto)
1662 (elf32_tic6x_info_to_howto_rel): Likewise.
1663 * elf32-tilepro.c (tilepro_info_to_howto_rela): Likewise.
1664 * elf32-v850.c (v850_elf_info_to_howto_rel)
1665 (v850_elf_info_to_howto_rela, v800_elf_info_to_howto): Likewise.
1666 * elf32-vax.c (rtype_to_howto): Likewise.
1667 * elf32-visium.c (visium_info_to_howto_rela): Likewise.
1668 * elf32-wasm32.c (elf32_wasm32_rtype_to_howto)
1669 (elf32_wasm32_info_to_howto_rela): Likewise.
1670 * elf32-xc16x.c (elf32_xc16x_info_to_howto): Likewise.
1671 * elf32-xgate.c (xgate_info_to_howto_rel): Likewise.
1672 * elf32-xstormy16.c (xstormy16_info_to_howto_rela): Likewise.
1673 * elf32-xtensa.c (elf_xtensa_info_to_howto_rela): Likewise.
1674 * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise.
1675 * elf64-gen.c (elf_generic_info_to_howto)
1676 (elf_generic_info_to_howto_rel): Likewise.
1677 * elf64-ia64-vms.c (elf64_ia64_info_to_howto): Likewise.
1678 * elf64-mips.c (mips_elf64_info_to_howto_rela): Likewise.
1679 * elf64-mmix.c (mmix_info_to_howto_rela): Likewise.
1680 * elf64-ppc.c (ppc64_elf_info_to_howto): Likewise.
1681 * elf64-s390.c (elf_s390_reloc_type_lookup): Likewise.
1682 * elf64-sh64.c (elf_s390_info_to_howto, sh_elf64_info_to_howto):
1684 * elf64-x86-64.c (elf_x86_64_info_to_howto): Likewise.
1685 * elfn32-mips.c (mips_info_to_howto_rel, mips_info_to_howto_rela):
1687 * elfnn-aarch64.c (elfNN_aarch64_info_to_howto): Likewise.
1688 * elfnn-ia64.c (elfNN_ia64_info_to_howto): Likewise.
1689 * elfnn-riscv.c (riscv_info_to_howto_rela): Likewise.
1690 * elfxx-ia64.c (ia64_elf_reloc_type_lookup): Likewise.
1691 * elfxx-sparc.c (_bfd_sparc_elf_info_to_howto): Likewise.
1692 * elfxx-tilegx.c (tilegx_info_to_howto_rela): Likewise.
1693 * elf32-score.h (s7_bfd_score_info_to_howto): Update prototype.
1694 * elfxx-sparc.h (_bfd_sparc_elf_info_to_howto): Update prototype.
1695 * elfxx-tilegx.h (tilegx_info_to_howto_rela): Update prototype.
1696 * elfxx-target.h (elf_info_to_howto, elf_info_to_howto_rel):
1699 2018-02-26 Jim Wilson <jimw@sifive.com>
1700 Stephan Schreiber <info@fs-driver.org>
1703 * elfnn-ia64.c (elfNN_ia64_relax_section): After ia64_elf_relax_brl
1704 call, set changed_contents and changed_relocs. Likewise after
1705 successful ia64_elf_relax_br call.
1707 2018-02-26 Alan Modra <amodra@gmail.com>
1709 * elf.c (assign_file_positions_except_relocs): Don't segfault
1710 when actual number of phdrs is less than allocated. Delete
1711 outdated comment. Formatting.
1713 2018-02-26 Alan Modra <amodra@gmail.com>
1715 * elf-m10300.c, * elf-s390-common.c, * elf32-arc.c, * elf32-cris.c,
1716 * elf32-dlx.c, * elf32-frv.c, * elf32-i370.c, * elf32-lm32.c,
1717 * elf32-m32r.c, * elf32-m68hc1x.c, * elf32-m68k.c,
1718 * elf32-microblaze.c, * elf32-msp430.c, * elf32-nds32.c,
1719 * elf32-nios2.c, * elf32-or1k.c, * elf32-rl78.c, * elf32-rx.c,
1720 * elf32-score.c, * elf32-score7.c, * elf32-sh-symbian.c,
1721 * elf32-sh.c, * elf32-spu.c, * elf32-v850.c, * elf32-xtensa.c,
1722 * elf64-alpha.c, * elf64-ia64-vms.c, * elf64-mmix.c,
1723 * elf64-sh64.c, * elf64-sparc.c, * elfnn-ia64.c, * elfxx-tilegx.c,
1724 * mmo.c, * osf-core.c, * srec.c, * vms-alpha.c: Standardize
1725 error/warning messages.
1727 2018-02-26 Alan Modra <amodra@gmail.com>
1729 * archive.c, * bfd.c, * linker.c, * reloc.c, * stabs.c,
1730 * syms.c: Standardize error/warning messages.
1732 2018-02-26 Alan Modra <amodra@gmail.com>
1734 * aout-adobe.c, * aout-cris.c, * i386linux.c, * m68klinux.c,
1735 * sparclinux.c, * coff-alpha.c, * coff-arm.c, * coff-mcore.c,
1736 * coffcode.h, * coffgen.c, * cofflink.c, * ecoff.c, * pe-mips.c,
1737 * peXXigen.c, * peicode.h: Standardize error/warning messages.
1739 2018-02-26 Alan Modra <amodra@gmail.com>
1741 * elf32-arm.c, * elfnn-aarch64.c: Standardize error/warning messages.
1743 2018-02-26 Alan Modra <amodra@gmail.com>
1745 * elfxx-mips.c: Standardize error/warning messages.
1747 2018-02-26 Alan Modra <amodra@gmail.com>
1749 * dwarf2.c, * elf-attrs.c, * elf-eh-frame.c, * elf.c, * elf32-gen.c,
1750 * elflink.c: Standardize error/warning messages. Replace use of
1751 linker callback einfo with _bfd_error_handler when possible.
1753 2018-02-26 Alan Modra <amodra@gmail.com>
1755 * aoutx.h, * coff-alpha.c, * coff-i860.c, * coff-m68k.c,
1756 * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c,
1757 * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-w65.c,
1758 * elf-bfd.h, * elf-m10300.c, * elf.c, * elf32-avr.c, * elf32-bfin.c,
1759 * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c,
1760 * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c,
1761 * elf32-fr30.c, * elf32-frv.c, * elf32-i370.c, * elf32-i386.c,
1762 * elf32-i960.c, * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c,
1763 * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c,
1764 * elf32-m68k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c,
1765 * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c,
1766 * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-or1k.c,
1767 * elf32-pj.c, * elf32-ppc.c, * elf32-rl78.c, * elf32-rx.c,
1768 * elf32-s390.c, * elf32-sh.c, * elf32-spu.c, * elf32-tic6x.c,
1769 * elf32-v850.c, * elf32-vax.c, * elf32-visium.c, * elf32-wasm32.c,
1770 * elf32-xgate.c, * elf32-xtensa.c, * elf64-alpha.c,
1771 * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c,
1772 * elf64-ppc.c, * elf64-s390.c, * elf64-sparc.c, * elf64-x86-64.c,
1773 * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c,
1774 * elfnn-riscv.c, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-riscv.h,
1775 * elfxx-sparc.c, * elfxx-sparc.h, * reloc.c: Standardize
1776 unrecognized/unsupported reloc message.
1778 2018-02-26 Alan Modra <amodra@gmail.com>
1780 * elf32-ppc.c: Standardize error/warning messages. Use
1781 _bfd_error_handler rather than einfo when einfo features not used.
1782 * elf64-ppc.c: Likewise.
1784 2018-02-23 Alan Modra <amodra@gmail.com>
1787 * elf.c (assign_file_positions_for_non_load_sections): Remove RELRO
1788 segment if no matching LOAD segment.
1790 2018-02-23 Kuan-Lin Chen <kuanlinchentw@gmail.com>
1792 * elf32-nds32.h: Define mask for ict_model.
1794 2018-02-20 Jason Duerstock <jason.duerstock@gmail.com>
1796 * elfnn-ia64.c (elf_backend_can_gc_sections): Enable.
1798 2018-02-19 Maciej W. Rozycki <macro@mips.com>
1801 2018-01-12 Vlad Ivanov <vlad@ivanov.email>
1803 * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when
1804 .reginfo section has wrong size.
1806 2018-02-19 Maciej W. Rozycki <macro@mips.com>
1808 * elfxx-mips.c (_bfd_mips_elf_always_size_sections): Set
1809 SEC_FIXED_SIZE and SEC_HAS_CONTENTS flags for `.reginfo' and
1810 `.MIPS.abiflags' sections.
1811 (_bfd_mips_elf_final_link): Avoid reading beyond `.reginfo'
1814 2018-02-19 Maciej W. Rozycki <macro@mips.com>
1816 * section.c (SEC_FIXED_SIZE): New macro.
1817 * bfd-in2.h: Regenerate.
1819 2018-02-19 Maciej W. Rozycki <macro@mips.com>
1821 * section.c (SEC_HAS_GOT_REF): Remove macro.
1822 * bfd-in2.h: Regenerate.
1824 2018-02-19 Alan Modra <amodra@gmail.com>
1826 * elf-attrs.c (_bfd_elf_parse_attributes): Correct _bfd_error_handler
1828 * elfxx-mips.c (_bfd_mips_elf_final_link): Likewise.
1829 * elfnn-riscv.c (_bfd_riscv_relax_align): Likewise.
1830 (_bfd_riscv_relax_pc): Likewise and fix typos.
1831 * libbfd-in.h (_bfd_error_handler): Add attribute printf.
1832 * libbfd.h: Regenerate.
1834 2018-02-19 Alan Modra <amodra@gmail.com>
1836 * dwarf2.c (read_section): Don't use 'll' format modifier.
1837 (find_abstract_instance): Likewise.
1838 * elfcore.h (elf_core_file_p): Likewise.
1840 2018-02-19 Alan Modra <amodra@gmail.com>
1842 * bfd-in.h: Include inttypes.h or if not available define
1843 PRId64, PRIu64 and PRIx64.
1844 * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Remove support for L
1845 modifier to print bfd_vma.
1846 * coff-arm.c, * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c,
1847 * coff-sh.c, * coff-tic80.c, * coffcode.h, * coffgen.c, * cofflink.c,
1848 * compress.c, * dwarf2.c, * elf-m10300.c, * elf.c, * elf32-arc.c,
1849 * elf32-arm.c, * elf32-bfin.c, * elf32-cris.c, * elf32-hppa.c,
1850 * elf32-i386.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32r.c,
1851 * elf32-m68k.c, * elf32-metag.c, * elf32-nds32.c, * elf32-nios2.c,
1852 * elf32-ppc.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c,
1853 * elf32-score7.c, * elf32-sh.c, * elf32-sh64.c, * elf32-spu.c,
1854 * elf32-tic6x.c, * elf32-tilepro.c, * elf32-v850.c, * elf32-vax.c,
1855 * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c,
1856 * elf64-mmix.c, * elf64-s390.c, * elf64-sh64.c, * elf64-x86-64.c,
1857 * elfcode.h, * elfcore.h, * elflink.c, * elfnn-aarch64.c,
1858 * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-mips.c, * elfxx-sparc.c,
1859 * elfxx-tilegx.c, * ieee.c, * ihex.c, * mach-o.c, * merge.c, * mmo.c,
1860 * peXXigen.c, * xcofflink.c: Replace use of Lx modifier with PRIx64,
1861 and cast input to uint64_t, and similarly for Ld and Lu.
1862 * bfd-in2.h: Regenerate.
1864 2018-02-19 Alan Modra <amodra@gmail.com>
1866 * elf32-arm.c, * elf32-hppa.c, * elf32-lm32.c, * elf32-m32r.c,
1867 * elf32-metag.c, * elf32-nds32.c, * elf32-or1k.c, * elf32-ppc.c,
1868 * elf32-s390.c, * elf32-sh.c, * elf32-tic6x.c, * elf32-tilepro.c,
1869 * elf64-ppc.c, * elf64-s390.c, * elflink.c, * elfnn-aarch64.c,
1870 * elfnn-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c,
1871 * reloc.c: Replace use of %R and %T in format strings passed to
1872 einfo and friends by %pR and %pT.
1874 2018-02-19 Alan Modra <amodra@gmail.com>
1876 * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Handle %pA and %pB in place
1878 * aout-adobe.c: Update all messages using %A and %B.
1879 * aout-cris.c: Likewise.
1880 * aoutx.h: Likewise.
1881 * archive.c: Likewise.
1882 * binary.c: Likewise.
1883 * cache.c: Likewise.
1884 * coff-alpha.c: Likewise.
1885 * coff-arm.c: Likewise.
1886 * coff-i860.c: Likewise.
1887 * coff-mcore.c: Likewise.
1888 * coff-ppc.c: Likewise.
1889 * coff-rs6000.c: Likewise.
1890 * coff-sh.c: Likewise.
1891 * coff-tic4x.c: Likewise.
1892 * coff-tic54x.c: Likewise.
1893 * coff-tic80.c: Likewise.
1894 * coff64-rs6000.c: Likewise.
1895 * coffcode.h: Likewise.
1896 * coffgen.c: Likewise.
1897 * cofflink.c: Likewise.
1898 * coffswap.h: Likewise.
1899 * compress.c: Likewise.
1900 * cpu-arm.c: Likewise.
1901 * ecoff.c: Likewise.
1902 * elf-attrs.c: Likewise.
1903 * elf-eh-frame.c: Likewise.
1904 * elf-ifunc.c: Likewise.
1905 * elf-m10300.c: Likewise.
1906 * elf-properties.c: Likewise.
1907 * elf-s390-common.c: Likewise.
1909 * elf32-arc.c: Likewise.
1910 * elf32-arm.c: Likewise.
1911 * elf32-avr.c: Likewise.
1912 * elf32-bfin.c: Likewise.
1913 * elf32-cr16.c: Likewise.
1914 * elf32-cr16c.c: Likewise.
1915 * elf32-cris.c: Likewise.
1916 * elf32-crx.c: Likewise.
1917 * elf32-d10v.c: Likewise.
1918 * elf32-d30v.c: Likewise.
1919 * elf32-epiphany.c: Likewise.
1920 * elf32-fr30.c: Likewise.
1921 * elf32-frv.c: Likewise.
1922 * elf32-gen.c: Likewise.
1923 * elf32-hppa.c: Likewise.
1924 * elf32-i370.c: Likewise.
1925 * elf32-i386.c: Likewise.
1926 * elf32-i960.c: Likewise.
1927 * elf32-ip2k.c: Likewise.
1928 * elf32-iq2000.c: Likewise.
1929 * elf32-lm32.c: Likewise.
1930 * elf32-m32c.c: Likewise.
1931 * elf32-m32r.c: Likewise.
1932 * elf32-m68hc11.c: Likewise.
1933 * elf32-m68hc12.c: Likewise.
1934 * elf32-m68hc1x.c: Likewise.
1935 * elf32-m68k.c: Likewise.
1936 * elf32-mcore.c: Likewise.
1937 * elf32-mep.c: Likewise.
1938 * elf32-metag.c: Likewise.
1939 * elf32-microblaze.c: Likewise.
1940 * elf32-moxie.c: Likewise.
1941 * elf32-msp430.c: Likewise.
1942 * elf32-mt.c: Likewise.
1943 * elf32-nds32.c: Likewise.
1944 * elf32-nios2.c: Likewise.
1945 * elf32-or1k.c: Likewise.
1946 * elf32-pj.c: Likewise.
1947 * elf32-ppc.c: Likewise.
1948 * elf32-rl78.c: Likewise.
1949 * elf32-rx.c: Likewise.
1950 * elf32-s390.c: Likewise.
1951 * elf32-score.c: Likewise.
1952 * elf32-score7.c: Likewise.
1953 * elf32-sh-symbian.c: Likewise.
1954 * elf32-sh.c: Likewise.
1955 * elf32-sh64.c: Likewise.
1956 * elf32-sparc.c: Likewise.
1957 * elf32-spu.c: Likewise.
1958 * elf32-tic6x.c: Likewise.
1959 * elf32-tilepro.c: Likewise.
1960 * elf32-v850.c: Likewise.
1961 * elf32-vax.c: Likewise.
1962 * elf32-visium.c: Likewise.
1963 * elf32-wasm32.c: Likewise.
1964 * elf32-xgate.c: Likewise.
1965 * elf32-xtensa.c: Likewise.
1966 * elf64-alpha.c: Likewise.
1967 * elf64-gen.c: Likewise.
1968 * elf64-hppa.c: Likewise.
1969 * elf64-ia64-vms.c: Likewise.
1970 * elf64-mmix.c: Likewise.
1971 * elf64-ppc.c: Likewise.
1972 * elf64-s390.c: Likewise.
1973 * elf64-sh64.c: Likewise.
1974 * elf64-sparc.c: Likewise.
1975 * elf64-x86-64.c: Likewise.
1976 * elfcode.h: Likewise.
1977 * elfcore.h: Likewise.
1978 * elflink.c: Likewise.
1979 * elfnn-aarch64.c: Likewise.
1980 * elfnn-ia64.c: Likewise.
1981 * elfnn-riscv.c: Likewise.
1982 * elfxx-mips.c: Likewise.
1983 * elfxx-sparc.c: Likewise.
1984 * elfxx-tilegx.c: Likewise.
1985 * elfxx-x86.c: Likewise.
1986 * hpux-core.c: Likewise.
1989 * libbfd.c: Likewise.
1990 * linker.c: Likewise.
1991 * mach-o.c: Likewise.
1992 * merge.c: Likewise.
1994 * oasys.c: Likewise.
1995 * pdp11.c: Likewise.
1996 * pe-mips.c: Likewise.
1997 * peXXigen.c: Likewise.
1998 * peicode.h: Likewise.
1999 * reloc.c: Likewise.
2000 * rs6000-core.c: Likewise.
2002 * stabs.c: Likewise.
2003 * vms-alpha.c: Likewise.
2004 * xcofflink.c: Likewise.
2006 2018-02-19 Alan Modra <amodra@gmail.com>
2009 * elf.c (IS_TBSS): Define.
2010 (_bfd_elf_map_sections_to_segments): Use IS_TBSS.
2011 (assign_file_positions_for_non_load_sections): Revert last change.
2012 Properly calculate load segment limits to compare against relro limits.
2014 2018-02-17 Alan Modra <amodra@gmail.com>
2017 * elf.c (assign_file_positions_for_non_load_sections): Ignore
2018 degenerate zero size PT_LOAD segments when finding one overlapping
2019 the PT_GNU_RELRO segment.
2021 2018-02-16 Alan Modra <amodra@gmail.com>
2023 * libbfd.c (_bfd_bool_bfd_false_error): Rename from bfd_false.
2024 (_bfd_bool_bfd_true): Rename from bfd_true.
2025 (_bfd_ptr_bfd_null_error): Rename from bfd_nullvoidptr.
2026 (_bfd_int_bfd_0): Rename from bfd_0.
2027 (_bfd_uint_bfd_0): Rename from bfd_0u.
2028 (_bfd_long_bfd_0): Rename from bfd_0l.
2029 (_bfd_long_bfd_n1_error): Rename from _bfd_n1.
2030 (_bfd_void_bfd): Rename from bfd_void.
2031 (_bfd_bool_bfd_false, _bfd_bool_bfd_asymbol_false),
2032 (_bfd_bool_bfd_link_false_error),
2033 (_bfd_bool_bfd_link_true, _bfd_bool_bfd_bfd_true),
2034 (_bfd_bool_bfd_uint_true, _bfd_bool_bfd_ptr_true),
2035 (_bfd_bool_bfd_asection_bfd_asection_true),
2036 (_bfd_bool_bfd_asymbol_bfd_asymbol_true),
2037 (_bfd_void_bfd_link, _bfd_void_bfd_asection): New functions.
2038 * archive.c (_bfd_noarchive_get_elt_at_index),
2039 (_bfd_noarchive_openr_next_archived_file),
2040 (_bfd_noarchive_construct_extended_name_table),
2041 (_bfd_noarchive_write_ar_hdr, _bfd_noarchive_truncate_arname),
2042 (_bfd_noarchive_write_armap): New functions.
2043 * archures.c (_bfd_nowrite_set_arch_mach): New function.
2044 * coff-alpha.c (alpha_ecoff_swap_coff_aux_in),
2045 (alpha_ecoff_swap_coff_sym_in, alpha_ecoff_swap_coff_lineno_in),
2046 (alpha_ecoff_swap_coff_aux_out, alpha_ecoff_swap_coff_sym_out),
2047 (alpha_ecoff_swap_coff_lineno_out),
2048 (alpha_ecoff_swap_coff_reloc_out): New functions.
2049 * coff-mips.c (mips_ecoff_swap_coff_aux_in),
2050 (mips_ecoff_swap_coff_sym_in, mips_ecoff_swap_coff_lineno_in),
2051 (mips_ecoff_swap_coff_aux_out, mips_ecoff_swap_coff_sym_out),
2052 (mips_ecoff_swap_coff_lineno_out),
2053 (mips_ecoff_swap_coff_reloc_out): New functions.
2054 * coffcode.h (coff_set_alignment_hook): Replace define with
2056 (symname_in_debug_hook): Likewise.
2057 * ecoff.c (_bfd_ecoff_set_alignment_hook): New function.
2058 * elfxx-target.h (elf_backend_allow_non_load_phdr): Default to 0.
2059 * elf.c (assign_file_positions_except_relocs): Test
2060 elf_backend_allow_non_load_phdr for NULL.
2061 * elflink.c (_bfd_elf_omit_section_dynsym_default): Rename from
2062 _bfd_elf_link_omit_section_dynsym. Update uses.
2063 (_bfd_elf_omit_section_dynsym_all): New function.
2064 * elf-bfd.h (_bfd_elf_link_omit_section_dynsym): Delete.
2065 (_bfd_elf_omit_section_dynsym_default): Declare.
2066 (_bfd_elf_omit_section_dynsym_all): Declare.
2067 * linker.c (_bfd_nolink_sizeof_headers, _bfd_nolink_bfd_relax_section),
2068 (_bfd_nolink_bfd_get_relocated_section_contents),
2069 (_bfd_nolink_bfd_lookup_section_flags),
2070 (_bfd_nolink_bfd_is_group_section, _bfd_nolink_bfd_discard_group),
2071 (_bfd_nolink_bfd_link_hash_table_create),
2072 (_bfd_nolink_bfd_link_just_syms),
2073 (_bfd_nolink_bfd_copy_link_hash_symbol_type),
2074 (_bfd_nolink_bfd_link_split_section),
2075 (_bfd_nolink_section_already_linked),
2076 (_bfd_nolink_bfd_define_common_symbol),
2077 (_bfd_nolink_bfd_define_start_stop): New functions.
2078 * reloc.c (_bfd_norelocs_bfd_reloc_type_lookup),
2079 (_bfd_norelocs_bfd_reloc_name_lookup),
2080 (_bfd_nodynamic_canonicalize_dynamic_reloc): New functions.
2081 * section.c (_bfd_nowrite_set_section_contents): New function.
2082 * syms.c (_bfd_nosymbols_canonicalize_symtab),
2083 (_bfd_nosymbols_print_symbol, _bfd_nosymbols_get_symbol_info),
2084 (_bfd_nosymbols_get_symbol_version_string),
2085 (_bfd_nosymbols_bfd_is_local_label_name),
2086 (_bfd_nosymbols_get_lineno, _bfd_nosymbols_find_nearest_line),
2087 (_bfd_nosymbols_find_line, _bfd_nosymbols_find_inliner_info),
2088 (_bfd_nosymbols_bfd_make_debug_symbol),
2089 ( _bfd_nosymbols_read_minisymbols),
2090 ( _bfd_nosymbols_minisymbol_to_symbol),
2091 (_bfd_nodynamic_get_synthetic_symtab): New functions.
2092 * libbfd-in.h: Declare new functions. Update existing defines,
2094 * aix386-core.c: Update to use new hooks. Formatting.
2095 * aout-adobe.c: Likewise.
2096 * aout-arm.c: Likewise.
2097 * aout-target.h: Likewise.
2098 * aout-tic30.c: Likewise.
2099 * aoutf1.h: Likewise.
2100 * binary.c: Likewise.
2102 * cisco-core.c: Likewise.
2103 * coff-alpha.c: Likewise.
2104 * coff-i386.c: Likewise.
2105 * coff-i860.c: Likewise.
2106 * coff-i960.c: Likewise.
2107 * coff-ia64.c: Likewise.
2108 * coff-mips.c: Likewise.
2109 * coff-ppc.c: Likewise.
2110 * coff-rs6000.c: Likewise.
2111 * coff-sh.c: Likewise.
2112 * coff-tic30.c: Likewise.
2113 * coff-tic54x.c: Likewise.
2114 * coff-x86_64.c: Likewise.
2115 * coff64-rs6000.c: Likewise.
2116 * coffcode.h: Likewise.
2117 * elf-m10300.c: Likewise.
2118 * elf32-cr16.c: Likewise.
2119 * elf32-lm32.c: Likewise.
2120 * elf32-m32r.c: Likewise.
2121 * elf32-metag.c: Likewise.
2122 * elf32-score.c: Likewise.
2123 * elf32-score7.c: Likewise.
2124 * elf32-tilepro.c: Likewise.
2125 * elf32-xstormy16.c: Likewise.
2126 * elf32-xtensa.c: Likewise.
2127 * elf64-alpha.c: Likewise.
2128 * elf64-hppa.c: Likewise.
2129 * elf64-ia64-vms.c: Likewise.
2130 * elf64-mmix.c: Likewise.
2131 * elf64-sh64.c: Likewise.
2132 * elfnn-ia64.c: Likewise.
2133 * elfxx-sparc.c: Likewise.
2134 * elfxx-target.h: Likewise.
2135 * elfxx-tilegx.c: Likewise.
2136 * elfxx-x86.h: Likewise.
2137 * hp300hpux.c: Likewise.
2138 * hppabsd-core.c: Likewise.
2139 * hpux-core.c: Likewise.
2140 * i386msdos.c: Likewise.
2141 * i386os9k.c: Likewise.
2144 * irix-core.c: Likewise.
2145 * libaout.h: Likewise.
2146 * libecoff.h: Likewise.
2147 * mach-o-target.c: Likewise.
2148 * mach-o.c: Likewise.
2149 * mipsbsd.c: Likewise.
2151 * netbsd-core.c: Likewise.
2152 * nlm-target.h: Likewise.
2153 * oasys.c: Likewise.
2154 * osf-core.c: Likewise.
2155 * pdp11.c: Likewise.
2156 * pe-mips.c: Likewise.
2157 * pe-x86_64.c: Likewise.
2159 * plugin.c: Likewise.
2160 * ppcboot.c: Likewise.
2161 * ptrace-core.c: Likewise.
2162 * sco5-core.c: Likewise.
2164 * sparclynx.c: Likewise.
2166 * tekhex.c: Likewise.
2167 * trad-core.c: Likewise.
2168 * verilog.c: Likewise.
2169 * versados.c: Likewise.
2170 * vms-alpha.c: Likewise.
2171 * vms-lib.c: Likewise.
2172 * wasm-module.c: Likewise.
2174 * libbfd.h: Regenerate.
2176 2018-02-15 Jim Wilson <jimw@sifive.com>
2178 * elfnn-riscv.c (_bfd_riscv_relax_section): Ifdef out check to ignore
2179 symbols whose section address is zero.
2181 * elfnn-riscv.c (riscv_elf_relocate_section): Use bfd_reloc_dangerous
2182 when pcrel_lo reloc has an addend. Use reloc_dangerous callback for
2183 bfd_reloc_dangerous. Use einfo instead of warning callback for errors.
2184 Add %X%P to error messages.
2186 2018-02-15 Eric Botcazou <ebotcazou@adacore.com>
2189 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
2190 Pass FALSE instead of TRUE as 'create' argument to bfd_link_hash_lookup
2191 and assert that the result of the call is not NULL.
2193 2018-02-14 Nick Clifton <nickc@redhat.com>
2196 Revert previous delta. Add extra casts to avoid compile time
2198 * libbfd-in.h (_bfd_generic_bfd_copy_private_bfd_data): Add extra
2199 cast to avoid warning from gcc v8 compiler.
2200 (_bfd_generic_bfd_merge_private_bfd_data): Likewise.
2201 (_bfd_generic_bfd_set_private_flags): Likewise.
2202 (_bfd_generic_bfd_copy_private_section_data): Likewise.
2203 (_bfd_generic_bfd_copy_private_symbol_data): Likewise.
2204 (_bfd_generic_bfd_copy_private_header_data): Likewise.
2205 (_bfd_generic_bfd_print_private_bfd_data): Likewise.
2206 (_bfd_noarchive_construct_extended_name_table): Likewise.
2207 (_bfd_noarchive_truncate_arname): Likewise.
2208 (_bfd_noarchive_write_ar_hdr): Likewise.
2209 (_bfd_noarchive_get_elt_at_index): Likewise.
2210 (_bfd_nosymbols_canonicalize_symtab): Likewise.
2211 (_bfd_nosymbols_print_symbol): Likewise.
2212 (_bfd_nosymbols_get_symbol_info): Likewise.
2213 (_bfd_nosymbols_get_symbol_version_string): Likewise.
2214 (_bfd_nosymbols_bfd_is_local_label_name): Likewise.
2215 (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise.
2216 (_bfd_nosymbols_get_lineno): Likewise.
2217 (_bfd_nosymbols_find_nearest_line): Likewise.
2218 (_bfd_nosymbols_find_line): Likewise.
2219 (_bfd_nosymbols_find_inliner_info): Likewise.
2220 (_bfd_nosymbols_bfd_make_debug_symbol): Likewise.
2221 (_bfd_nosymbols_read_minisymbols): Likewise.
2222 (_bfd_nosymbols_minisymbol_to_symbol): Likewise.
2223 (_bfd_norelocs_bfd_reloc_type_lookup): Likewise.
2224 (_bfd_norelocs_bfd_reloc_name_lookup): Likewise.
2225 (_bfd_nowrite_set_arch_mach): Likewise.
2226 (_bfd_nowrite_set_section_contents): Likewise.
2227 (_bfd_nolink_sizeof_headers): Likewise.
2228 (_bfd_nolink_bfd_get_relocated_section_contents): Likewise.
2229 (_bfd_nolink_bfd_relax_section): Likewise.
2230 (_bfd_nolink_bfd_gc_sections): Likewise.
2231 (_bfd_nolink_bfd_lookup_section_flags): Likewise.
2232 (_bfd_nolink_bfd_merge_sections): Likewise.
2233 (_bfd_nolink_bfd_is_group_section): Likewise.
2234 (_bfd_nolink_bfd_discard_group): Likewise.
2235 (_bfd_nolink_bfd_link_hash_table_create): Likewise.
2236 (_bfd_nolink_bfd_link_add_symbols): Likewise.
2237 (_bfd_nolink_bfd_link_just_syms): Likewise.
2238 (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise.
2239 (_bfd_nolink_bfd_final_link): Likewise.
2240 (_bfd_nolink_bfd_link_split_section): Likewise.
2241 (_bfd_nolink_section_already_linked): Likewise.
2242 (_bfd_nolink_bfd_define_common_symbol): Likewise.
2243 (_bfd_nolink_bfd_define_start_stop): Likewise.
2244 (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise.
2245 (_bfd_nodynamic_get_synthetic_symtab): Likewise.
2246 (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise.
2247 (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise.
2248 * libbfd.c (bfd_false_any): Delete.
2249 (bfd_true_any, bfd_nullvoidptr_any, bfd_0_any): Delete.
2250 (bfd_0u_any, bfd_0l_any, _bfd_n1_any, bfd_void_any): Delete.
2251 * libbfd.h (extern): Regenerate
2252 * aout-target.h (MY_bfd_is_target_special_symbol): Add extra
2253 cast to avoid warning from gcc v8 compiler.
2254 * aout-tic30.c (tic30_aout_set_arch_mach): Likewise.
2255 * binary.c (binary_get_symbol_info): Likewise.
2256 * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
2257 * coff-mips.c (mips_ecoff_backend_data): Likewise.
2258 * coffcode.h (coff_set_alignment_hook): Likewise.
2259 (symname_in_debug_hook): Likewise.
2260 (bfd_coff_backend_data bigobj_swap_table): Likewise.
2261 * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise.
2262 * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise.
2263 * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise.
2264 * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise.
2265 * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise.
2266 * elf32-score.c (elf_backend_omit_section_dynsym): Likewise.
2267 * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise.
2268 * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise.
2269 * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise.
2270 * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise.
2271 * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise.
2272 * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise.
2273 * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise.
2274 * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise.
2275 * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise.
2276 * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise.
2277 (bfd_elfNN_bfd_make_debug_symbol): Likewise.
2278 (bfd_elfNN_bfd_merge_private_bfd_data): Likewise.
2279 (bfd_elfNN_bfd_set_private_flags): Likewise.
2280 (bfd_elfNN_bfd_is_target_special_symbol): Likewise.
2281 (elf_backend_init_index_section): Likewise.
2282 (elf_backend_allow_non_load_phdr): Likewise.
2283 * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise.
2284 * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise.
2285 * ieee.c (ieee_construct_extended_name_table): Likewise.
2286 (ieee_write_armap): Likewise.
2287 (ieee_write_ar_hdr): Likewise.
2288 (ieee_bfd_is_target_special_symbol): Likewise.
2289 * ihex.c (ihex_canonicalize_symtab): Likewise.
2290 (ihex_bfd_is_target_special_symbol): Likewise.
2291 * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise.
2292 * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise.
2293 (_bfd_ecoff_set_alignment_hook): Likewise.
2294 * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise.
2295 * mmo.c (mmo_bfd_is_target_special_symbol): Likewise.
2296 * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise.
2297 * oasys.c (oasys_construct_extended_name_table): Likewise.
2298 (oasys_write_armap): Likewise.
2299 (oasys_write_ar_hdr): Likewise.
2300 (oasys_bfd_is_target_special_symbol): Likewise.
2301 * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise.
2302 * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise.
2303 * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise.
2304 * som.c (som_bfd_is_target_special_symbol): Likewise.
2305 * srec.c (srec_bfd_is_target_special_symbol): Likewise.
2306 * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise.
2307 * verilog.c (verilog_bfd_is_target_special_symbol): Likewise.
2308 * versados.c (versados_bfd_is_target_special_symbol): Likewise.
2309 (versados_bfd_reloc_name_lookup): Likewise.
2310 * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise.
2311 (vms_bfd_define_start_stop): Likewise.
2312 (alpha_vms_bfd_is_target_special_symbol): Likewise.
2313 * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise.
2314 * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise.
2316 2018-02-14 H.J. Lu <hongjiu.lu@intel.com>
2319 * elf32-i386.c (elf_i386_check_relocs): Pass FALSE for non
2320 PC-relative PLT to NEED_DYNAMIC_RELOCATION_P.
2321 * elf64-x86-64.c (elf_x86_64_check_relocs): Create PLT for
2322 R_X86_64_PC32 reloc against dynamic function in data section.
2323 Pass TRUE for PC-relative PLT to NEED_DYNAMIC_RELOCATION_P.
2324 (elf_x86_64_relocate_section): Use PLT for R_X86_64_PC32 reloc
2325 against dynamic function in data section.
2326 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Use PLT in PIE as
2327 function address only if pcrel_plt is true.
2328 (_bfd_x86_elf_link_hash_table_create): Set pcrel_plt.
2329 * elfxx-x86.h (NEED_DYNAMIC_RELOCATION_P): Add PCREL_PLT for
2330 PC-relative PLT. If PLT is PC-relative, don't generate dynamic
2331 PC-relative relocation against a function definition in data
2332 secton in PIE. Remove the obsolete comments.
2333 (elf_x86_link_hash_table): Add pcrel_plt.
2335 2018-02-13 H.J. Lu <hongjiu.lu@intel.com>
2337 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Check bfd_link_dll,
2338 instead of bfd_link_pic, for building shared library.
2340 2018-02-13 H.J. Lu <hongjiu.lu@intel.com>
2343 * elf64-x86-64.c (is_32bit_relative_branch): Removed.
2344 (elf_x86_64_relocate_section): Check PIC relocations in PIE.
2345 Remove is_32bit_relative_branch usage. Disallow PC32 reloc
2346 against protected function in shared object.
2348 2018-02-13 Sergei Trofimovich <slyfox@inbox.ru>
2351 * po/ru.po: Fix typo in Russian translation.
2353 2018-02-13 Maciej W. Rozycki <macro@mips.com>
2355 * wasm-module.c (wasm_scan_name_function_section): Rename
2356 `index' local variable to `idx'.
2358 2018-02-13 Nick Clifton <nickc@redhat.com>
2361 Fix compile time warnings generated by gcc version 8.
2362 * libbfd-in.h: Remove extraneous text from prototypes.
2363 Add prototypes for bfd_false_any, bfd_true_any,
2364 bfd_nullvoidptr_any, bfd_0_any, bfd_0u_any, bfd_0l_any,
2365 bfd_n1_any, bfd_void_any.
2366 (_bfd_generic_bfd_copy_private_bfd_data): Use vararg based dummy
2368 (_bfd_generic_bfd_merge_private_bfd_data): Likewise.
2369 (_bfd_generic_bfd_set_private_flags): Likewise.
2370 (_bfd_generic_bfd_copy_private_section_data): Likewise.
2371 (_bfd_generic_bfd_copy_private_symbol_data): Likewise.
2372 (_bfd_generic_bfd_copy_private_header_data): Likewise.
2373 (_bfd_generic_bfd_print_private_bfd_data): Likewise.
2374 (_bfd_noarchive_construct_extended_name_table): Likewise.
2375 (_bfd_noarchive_truncate_arname): Likewise.
2376 (_bfd_noarchive_write_ar_hdr): Likewise.
2377 (_bfd_noarchive_get_elt_at_index): Likewise.
2378 (_bfd_nosymbols_canonicalize_symtab): Likewise.
2379 (_bfd_nosymbols_print_symbol): Likewise.
2380 (_bfd_nosymbols_get_symbol_info): Likewise.
2381 (_bfd_nosymbols_get_symbol_version_string): Likewise.
2382 (_bfd_nosymbols_bfd_is_local_label_name): Likewise.
2383 (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise.
2384 (_bfd_nosymbols_get_lineno): Likewise.
2385 (_bfd_nosymbols_find_nearest_line): Likewise.
2386 (_bfd_nosymbols_find_line): Likewise.
2387 (_bfd_nosymbols_find_inliner_info): Likewise.
2388 (_bfd_nosymbols_bfd_make_debug_symbol): Likewise.
2389 (_bfd_nosymbols_read_minisymbols): Likewise.
2390 (_bfd_nosymbols_minisymbol_to_symbol): Likewise.
2391 (_bfd_norelocs_bfd_reloc_type_lookup): Likewise.
2392 (_bfd_norelocs_bfd_reloc_name_lookup): Likewise.
2393 (_bfd_nowrite_set_arch_mach): Likewise.
2394 (_bfd_nowrite_set_section_contents): Likewise.
2395 (_bfd_nolink_sizeof_headers): Likewise.
2396 (_bfd_nolink_bfd_get_relocated_section_contents): Likewise.
2397 (_bfd_nolink_bfd_relax_section): Likewise.
2398 (_bfd_nolink_bfd_gc_sections): Likewise.
2399 (_bfd_nolink_bfd_lookup_section_flags): Likewise.
2400 (_bfd_nolink_bfd_merge_sections): Likewise.
2401 (_bfd_nolink_bfd_is_group_section): Likewise.
2402 (_bfd_nolink_bfd_discard_group): Likewise.
2403 (_bfd_nolink_bfd_link_hash_table_create): Likewise.
2404 (_bfd_nolink_bfd_link_add_symbols): Likewise.
2405 (_bfd_nolink_bfd_link_just_syms): Likewise.
2406 (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise.
2407 (_bfd_nolink_bfd_final_link): Likewise.
2408 (_bfd_nolink_bfd_link_split_section): Likewise.
2409 (_bfd_nolink_section_already_linked): Likewise.
2410 (_bfd_nolink_bfd_define_common_symbol): Likewise.
2411 (_bfd_nolink_bfd_define_start_stop): Likewise.
2412 (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise.
2413 (_bfd_nodynamic_get_synthetic_symtab): Likewise.
2414 (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise.
2415 (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise.
2416 * libbfd.c (bfd_false_any): New function. Like bfd_false but
2417 accepts one or more arguments.
2418 (bfd_true_any): Likewise.
2419 (bfd_nullvoidptr_any): Likewise.
2420 (bfd_0_any): Likewise.
2421 (bfd_0u_any): Likewise.
2422 (bfd_0l_any): Likewise.
2423 (_bfd_n1_any): Likewise.
2424 (bfd_void_any): Likewise.
2425 * libbfd.h (extern): Regenerate
2426 * aout-target.h (MY_bfd_is_target_special_symbol): Use vararg
2427 based dummy function.
2428 * aout-tic30.c (tic30_aout_set_arch_mach): Likewise.
2429 * binary.c (binary_get_symbol_info): Likewise.
2430 * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
2431 * coff-mips.c (mips_ecoff_backend_data): Likewise.
2432 * coffcode.h (coff_set_alignment_hook): Likewise.
2433 (symname_in_debug_hook): Likewise.
2434 (bfd_coff_backend_data bigobj_swap_table): Likewise.
2435 * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise.
2436 * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise.
2437 * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise.
2438 * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise.
2439 * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise.
2440 * elf32-score.c (elf_backend_omit_section_dynsym): Likewise.
2441 * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise.
2442 * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise.
2443 * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise.
2444 * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise.
2445 * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise.
2446 * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise.
2447 * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise.
2448 * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise.
2449 * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise.
2450 * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise.
2451 (bfd_elfNN_bfd_make_debug_symbol): Likewise.
2452 (bfd_elfNN_bfd_merge_private_bfd_data): Likewise.
2453 (bfd_elfNN_bfd_set_private_flags): Likewise.
2454 (bfd_elfNN_bfd_is_target_special_symbol): Likewise.
2455 (elf_backend_init_index_section): Likewise.
2456 (elf_backend_allow_non_load_phdr): Likewise.
2457 * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise.
2458 * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise.
2459 * ieee.c (ieee_construct_extended_name_table): Likewise.
2460 (ieee_write_armap): Likewise.
2461 (ieee_write_ar_hdr): Likewise.
2462 (ieee_bfd_is_target_special_symbol): Likewise.
2463 * ihex.c (ihex_canonicalize_symtab): Likewise.
2464 (ihex_bfd_is_target_special_symbol): Likewise.
2465 * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise.
2466 * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise.
2467 (_bfd_ecoff_set_alignment_hook): Likewise.
2468 * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise.
2469 * mmo.c (mmo_bfd_is_target_special_symbol): Likewise.
2470 * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise.
2471 * oasys.c (oasys_construct_extended_name_table): Likewise.
2472 (oasys_write_armap): Likewise.
2473 (oasys_write_ar_hdr): Likewise.
2474 (oasys_bfd_is_target_special_symbol): Likewise.
2475 * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise.
2476 * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise.
2477 * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise.
2478 * som.c (som_bfd_is_target_special_symbol): Likewise.
2479 * srec.c (srec_bfd_is_target_special_symbol): Likewise.
2480 * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise.
2481 * verilog.c (verilog_bfd_is_target_special_symbol): Likewise.
2482 * versados.c (versados_bfd_is_target_special_symbol): Likewise.
2483 (versados_bfd_reloc_name_lookup): Likewise.
2484 * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise.
2485 (vms_bfd_define_start_stop): Likewise.
2486 (alpha_vms_bfd_is_target_special_symbol): Likewise.
2487 * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise.
2488 * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise.
2489 * elf32-arc.c (get_replace_function): Assign replacement function
2491 * elf32-i370.c (i370_noop): Update prototype.
2493 2018-02-13 Alan Modra <amodra@gmail.com>
2496 * elf.c (_bfd_elf_fixup_group_sections): Account for removed
2497 relocation sections. If size reduces to just the flag word,
2498 remove that too and mark with SEC_EXCLUDE.
2499 * elflink.c (bfd_elf_final_link): Strip empty group sections.
2501 2018-02-13 Alan Modra <amodra@gmail.com>
2504 * elf.c (assign_file_positions_for_non_load_sections): Rewrite
2507 2018-02-12 Zebediah Figura <z.figura12@gmail.com>
2509 * i386msdos.c (msdos_mkobject); New function.
2510 (msdos_object_p): New function.
2511 (i386_msdos_vec): Use msdos_object_p as the check_format
2513 * peicode.h: Rename external_PEI_DOS_hdr, DOSMAGIC, and
2514 NT_SIGNATURE to external_DOS_hdr, IMAGE_DOS_SIGNATURE, and
2516 * peXXigen.c: Likewise.
2517 * coff-ia64.c: Likewise.
2519 2018-02-12 Nick Clifton <nickc@redhat.com>
2521 * elf32-nds32.c (nds32_elf_relax_longjump3): Remove redundant
2523 * elf32-arc.c (elf_arc_relocate_section): Likewise.
2525 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
2527 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Reorder conditions.
2528 (sparc_elf_append_rela): Assert that there is enough room in section.
2529 (_bfd_sparc_elf_copy_indirect_symbol): Fix formatting.
2530 (_bfd_sparc_elf_adjust_dynamic_symbol): Minor tweak.
2531 (allocate_dynrelocs): Remove outdated comments and reorder conditions.
2532 For a symbol subject to a GOT relocation, reserve a slot in the
2533 relocation section if the symbol isn't dynamic and we are in PIC mode.
2534 (_bfd_sparc_elf_relocate_section) <R_SPARC_GOTDATA_OP>: If relocation
2535 is relaxed and a slot was reserved, generate a R_SPARC_NONE relocation.
2536 <R_SPARC_GOTDATA_OP_HIX22>: Adjust comments.
2537 <R_SPARC_PC10>: Reorder conditions. Remove always-false assertion.
2538 (_bfd_sparc_elf_finish_dynamic_symbol): Rename local_undefweak into
2539 resolved_to_zero. Do not generate a dynamic GOT relocation for an
2540 undefined weak symbol with non-default visibility. Remove superfluous
2541 'else' and fix formatting.
2543 2018-02-09 H.J. Lu <hongjiu.lu@intel.com>
2545 * elf32-i386.c (elf_i386_get_synthetic_symtab): Also handle
2547 (i386_elf32_sol2_vec): Don't declare.
2548 (elf_i386_link_setup_gnu_properties): Also handle is_solaris.
2549 Don't set need_global_offset_table.
2550 (elf_i386_solaris_arch_bed): New.
2551 (elf_backend_arch_data): Set to elf_i386_solaris_arch_bed for
2553 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Check
2554 target_os != is_nacl instead of target_os == is_normal.
2555 (x86_64_elf64_sol2_vec): Don't declare.
2556 (elf_x86_64_link_setup_gnu_properties): Check target_os !=
2557 is_nacl instead of target_os == is_normal. Don't set
2558 need_global_offset_table.
2559 (elf_x86_64_solaris_arch_bed): New.
2560 (elf_backend_arch_data): Set to elf_x86_64_solaris_arch_bed for
2562 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep
2563 _GLOBAL_OFFSET_TABLE_ for Solaris.
2564 (_bfd_x86_elf_link_setup_gnu_properties): Don't copy
2565 need_global_offset_table.
2566 * elfxx-x86.h (elf_x86_target_os): Add is_solaris.
2567 (elf_x86_link_hash_table): Remove need_global_offset_table.
2568 (elf_x86_init_table): Likewise.
2570 2018-02-08 H.J. Lu <hongjiu.lu@intel.com>
2572 * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
2574 (i386_elf32_sol2_vec): Declared.
2575 (elf_i386_link_setup_gnu_properties): Set
2576 need_global_offset_table with info->output_bfd->xvec.
2577 * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
2579 (x86_64_elf64_sol2_vec): Declared.
2580 (elf_x86_64_link_setup_gnu_properties): Set
2581 need_global_offset_table with info->output_bfd->xvec.
2583 2018-02-08 H.J. Lu <hongjiu.lu@intel.com>
2585 * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
2587 (elf_i386_link_setup_gnu_properties): Set need_global_offset_table
2589 * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
2591 (elf_x86_64_link_setup_gnu_properties): Set
2592 need_global_offset_table for Solaris.
2593 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep the
2594 unused _GLOBAL_OFFSET_TABLE_ for Solaris.
2595 (_bfd_x86_elf_link_setup_gnu_properties): Copy
2596 need_global_offset_table.
2597 * elfxx-x86.h (elf_x86_link_hash_table): Add
2598 need_global_offset_table.
2599 (elf_x86_init_table): Likewise.
2601 2018-02-08 Jim Wilson <jimw@sifive.com>
2603 * elfnn-riscv.c (riscv_elf_relocate_section): Add comment for previous
2606 2018-02-08 Nick Clifton <nickc@redhat.com>
2609 * elf.c (elf_parse_notes): Reject notes with excessuively large
2612 2018-02-07 Alan Modra <amodra@gmail.com>
2614 Revert 2018-01-17 Alan Modra <amodra@gmail.com>
2615 * elf32-ppc.c: Remove speculation barrier support.
2616 * elf32-ppc.h: Likewise.
2617 * elf64-ppc.c: Likewise.
2618 * elf64-ppc.h: Likewise.
2620 2018-02-06 Jim Wilson <jimw@sifive.com>
2622 * elfnn-riscv.c (riscv_elf_relocate_section): Return TRUE if used
2623 callback to report an error.
2625 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
2628 * elfxx-sparc.c (sparc_elf_tls_transition): Turn call to bfd_link_pic
2629 into call to !bfd_link_executable and tidy up.
2630 (_bfd_sparc_elf_check_relocs): Fix formatting and tidy up.
2631 <R_SPARC_TLS_LE_HIX22>: Turn call to bfd_link_pic into call to
2632 !bfd_link_executable.
2633 <R_SPARC_TLS_IE_HI22>: Likewise.
2634 <GOT relocations>: Remove useless code, tidy and merge related blocks.
2635 <R_SPARC_TLS_GD_CALL>: Turn call to bfd_link_pic into call to
2636 !bfd_link_executable.
2637 <R_SPARC_WPLT30>: Tidy up.
2638 (_bfd_sparc_elf_gc_mark_hook): Turn call to bfd_link_pic into call to
2639 !bfd_link_executable.
2640 (allocate_dynrelocs): Likewise.
2641 (_bfd_sparc_elf_relocate_section): Fix formatting and tidy up.
2642 <R_SPARC_TLS_GD_HI22>: Merge into...
2643 <R_SPARC_TLS_GD_LO10>: ...this. Adjust 4th argument in call to
2644 sparc_elf_tls_transition and remove redundant code.
2645 <R_SPARC_TLS_LDM_HI22>: Turn call to bfd_link_pic into call to
2646 !bfd_link_executable.
2647 <R_SPARC_TLS_LDO_HIX22>: Likewise.
2648 <R_SPARC_TLS_LE_HIX22>: Likewise. Tidy up.
2649 <R_SPARC_TLS_LDM_CALL>: Likewise.
2650 <R_SPARC_TLS_GD_CALL>: Likewise. Tidy up.
2651 <R_SPARC_TLS_GD_ADD>: Likewise.
2652 <R_SPARC_TLS_LDM_ADD>: Likewise.
2653 <R_SPARC_TLS_LDO_ADD>: Likewise.
2654 <R_SPARC_TLS_IE_LD>: Likewise.
2656 2018-02-06 Miloš Stojanović <milos.stojanovic@rt-rk.com>
2659 * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): If the dwarf
2660 functions failed to find the function name, try the generic elf
2661 find function instead.
2663 2018-02-06 Sergio Durigan Junior <sergiodj@redhat.com>
2665 * coff-rs6000.c (xcoff_write_archive_contents_old): Use
2666 'memcpy' instead of 'strncpy' when writing the magic number.
2668 2018-02-06 Nick Clifton <nickc@redhat.com>
2671 * opncls.c (bfd_get_debug_link_info_1): Check the size of the
2672 section before attempting to read it in.
2673 (bfd_get_alt_debug_link_info): Likewise.
2675 2018-02-06 Paul Carroll <pcarroll@codesourcery.com>
2677 * bfd/dwarf2.c (find_abstract_name): Modified to return file and
2678 line information in addition to name, if they can be found.
2680 2018-02-05 Renlin Li <renlin.li@arm.com>
2683 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Relax the
2684 R_AARCH64_ABS32 and R_AARCH64_ABS16 for absolute symbol. Apply the
2685 check for writeable section as well.
2687 2018-02-05 H.J. Lu <hongjiu.lu@intel.com>
2690 * elf32-i386.c (elf_i386_check_relocs): Set got_referenced if
2691 _GLOBAL_OFFSET_TABLE_ is referenced or GOT is needed to resolve
2692 undefined weak symbol to 0.
2693 * elf64-x86-64.c (elf_x86_64_check_relocs): Set got_referenced
2694 if _GLOBAL_OFFSET_TABLE_ is referenced.
2695 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Check
2696 got_referenced instead of ref_regular_nonweak. Remove the
2697 unused _GLOBAL_OFFSET_TABLE_ from symbol table.
2698 * elfxx-x86.h (elf_x86_link_hash_table): Add got_referenced.
2700 2018-02-05 Maciej W. Rozycki <macro@mips.com>
2702 * elfnn-riscv.c (_bfd_riscv_relax_pc): Use `memset' to
2703 initialize `hi_reloc'.
2705 2018-02-05 Maciej W. Rozycki <macro@mips.com>
2707 * elfxx-mips.c (_bfd_mips_elf_section_processing): For
2708 SHT_MIPS_REGINFO sections don't assert the correct size and
2709 report an error instead.
2711 2018-02-05 Maciej W. Rozycki <macro@mips.com>
2713 * elf.c (_bfd_elf_write_object_contents): Propagate a failure
2714 status from `->elf_backend_section_processing'.
2716 2018-02-02 Jim Wilson <jimw@sifive.com>
2719 * elfnn-riscv.c (riscv_relax_delete_bytes): New parameter link_info.
2720 If link_info->wrap_hash, check for a duplicate symbol and ignore.
2721 (_bfd_riscv_relax_call, bfd_riscv_relax_lui, _bfd_riscv_relax_tls_le):
2722 Pass new argument to riscv_relax_delete_bytes.
2723 (_bfd_riscv_relax_align, _bfd_riscv_relax_delete): Likewise. Remove
2724 ATTRIBUTE_UNUSED from link_info parameter.
2726 2018-02-02 Alan Modra <amodra@gmail.com>
2728 * elf64-ppc.c (ppc64_elf_relocate_section): Don't relocate nops
2729 emitted for toc sequence optimization. Set and use "howto" later.
2731 2018-02-01 Simon Marchi <simon.marchi@ericsson.com>
2733 * elf64-ppc.c (ppc64_elf_archive_symbol_lookup): Avoid pointer
2734 arithmetic on NULL pointer.
2735 * elflink.c (_bfd_elf_archive_symbol_lookup,
2736 elf_link_add_archive_symbols): Likewise.
2738 2018-01-31 Michael Matz <matz@suse.de>
2740 * elflink.c (bfd_elf_define_start_stop): Fix check of
2743 2018-01-31 H.J. Lu <hongjiu.lu@intel.com>
2746 * elflink.c (bfd_elf_define_start_stop): Check if __start and
2747 __stop symbols are referenced by shared objects.
2749 2018-01-30 Alan Modra <amodra@gmail.com>
2752 * elf.c (_bfd_elf_map_sections_to_segments): Don't start a new
2753 segment when demand paged with lma on the same page. Test this
2754 before load/non-load, executable/non-executable,
2755 writable/non-writable tests and simplify. Delete bogus relro
2756 condition in writable/non-writable test. Delete outdated
2757 comment. Formatting.
2759 2018-01-30 Alan Modra <amodra@gmail.com>
2761 * elflink.c (bfd_elf_define_start_stop): Make __start and __stop
2764 2018-01-29 Alan Modra <amodra@gmail.com>
2767 * coffgen.c (coff_pointerize_aux): Ensure auxent tagndx is in
2768 range before converting to a symbol table pointer.
2770 2018-01-27 Nick Clifton <nickc@redhat.com>
2772 * po/ru.po: Updated Russian translation.
2774 2018-01-26 Alan Modra <amodra@gmail.com>
2776 * elflink.c (bfd_elf_define_start_stop): Override symbols when
2777 they are defined dynamically.
2779 2018-01-26 Alan Modra <amodra@gmail.com>
2781 * elf64-ppc.c (ppc64_elf_size_stubs): Iterate sizing when
2782 .branch_lt changes size.
2784 2018-01-25 Alan Modra <amodra@gmail.com>
2787 * elfcode.h (elf_object_p): Avoid integer overflow.
2789 2018-01-25 Eric Botcazou <ebotcazou@adacore.com>
2792 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
2793 Do a mere lookup of the __tls_get_addr symbol instead of adding it.
2796 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
2799 * elfxx-sparc.c (sparc_elf_tls_transition): Replace
2800 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
2801 bfd_link_executable for TLS check.
2802 (_bfd_sparc_elf_check_relocs): Likewise.
2803 (allocate_dynrelocs): Likewise.
2804 (_bfd_sparc_elf_relocate_section): Likewise.
2806 2018-01-24 Renlin Li <renlin.li@arm.com>
2808 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Add support for
2809 BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
2810 BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
2811 BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
2812 BFD_RELOC_AARCH64_MOVW_PREL_G3.
2813 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
2814 (_bfd_aarch64_elf_resolve_relocation): Likewise.
2816 2018-01-24 Renlin Li <renlin.li@arm.com>
2818 * reloc.c: Add BFD_RELOC_AARCH64_MOVW_PREL_G0,
2819 BFD_RELOC_AARCH64_MOVW_PREL_G0_NC, BFD_RELOC_AARCH64_MOVW_PREL_G1,
2820 BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, BFD_RELOC_AARCH64_MOVW_PREL_G2,
2821 BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, BFD_RELOC_AARCH64_MOVW_PREL_G3.
2822 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Add entries for
2823 BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
2824 BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
2825 BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
2826 BFD_RELOC_AARCH64_MOVW_PREL_G3.
2827 * bfd-in2.h: Regenerate.
2828 * libbfd.h: Regenerate.
2830 2018-01-23 Maciej W. Rozycki <macro@mips.com>
2832 * elfxx-mips.c (_bfd_mips_elf_final_link): Update a stale
2833 `mips_elf32_section_processing' comment reference.
2835 2018-01-20 H.J. Lu <hongjiu.lu@intel.com>
2838 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Check the
2839 versioned __tls_get_addr symbol.
2841 2018-01-19 Nick Clifton <nickc@redhat.com>
2843 * po/fr.po: Updated French translation.
2845 2018-01-18 Alan Modra <amodra@gmail.com>
2847 * elf32-ppc.c (ppc_elf_create_glink): Correct alignment of .glink.
2848 * elf64-ppc.c (ppc64_elf_size_stubs): Handle negative plt_stub_align.
2849 (ppc64_elf_build_stubs): Likewise.
2851 2018-01-17 Nick Clifton <nickc@redhat.com>
2853 * po/ru.po: Updated Russian translation.
2854 * po/uk/po: Updated Ukranian translation.
2856 2018-01-17 Alan Modra <amodra@gmail.com>
2858 * elf64-ppc.c (ppc64_elf_build_stubs): Silence gcc warning.
2860 2018-01-17 Alan Modra <amodra@gmail.com>
2862 * elf32-ppc.c (GLINK_ENTRY_SIZE): Handle speculation barrier.
2863 (CRSETEQ, BEQCTRM): Define.
2864 (is_nonpic_glink_stub): Don't check bctr.
2865 (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
2866 (ppc_elf_relax_section): Size speculation barrier.
2867 (output_bctr): New function.
2868 (write_glink_stub): Use output_bctr.
2869 (ppc_elf_relocate_section): Use output_bctr for long branch stub.
2870 (ppc_elf_finish_dynamic_symbol): Likewise.
2871 (ppc_elf_finish_dynamic_sections): Use output_bctr.
2872 * elf32-ppc.h (struct ppc_elf_params): Add speculate_indirect_jumps.
2873 * elf64-ppc.c (CRSETEQ, BEQCTRM, BEQCTRLM): Define.
2874 (GLINK_PLTRESOLVE_SIZE): Size speculation barrier.
2875 (size_global_entry_stubs): Handle speculation barrier sizing.
2876 (plt_stub_size): Likewise.
2877 (output_bctr): New function.
2878 (build_plt_stub, build_tls_get_addr_stub): Output speculation
2880 (ppc_build_one_stub): Likewise for ppc_stub_plt_branch.
2881 (ppc_size_one_stub): Size speculation barrier in ppc_stub_plt_branch.
2882 (build_global_entry_stubs): Output speculation barrier.
2883 (ppc64_elf_build_stubs): Likewise in __glink_PLTresolve stub.
2884 * elf64-ppc.h (struct ppc64_elf_params): Add speculate_indirect_jumps.
2886 2018-01-17 Alan Modra <amodra@gmail.com>
2888 * elf32-ppc.c (GLINK_ENTRY_SIZE): Add parameters, handle
2889 __tls_get_addr_opt, and alignment sizing.
2890 (TLS_GET_ADDR_GLINK_SIZE): Delete.
2891 (is_nonpic_glink_stub): Don't use GLINK_ENTRY_SIZE.
2892 (ppc_elf_get_synthetic_symtab): Recognize stubs spaced at 4, 6,
2894 (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
2895 (allocate_dynrelocs): Use new GLINK_ENTRY_SIZE.
2896 (ppc_elf_size_dynamic_sections): Likewise. Size branch table
2898 (write_glink_stub): Handle __tls_get_addr_opt stub.
2899 Pad out to size given by GLINK_ENTRY_SIZE.
2900 (ppc_elf_relocate_section): Adjust write_glink_stub call.
2901 (ppc_elf_finish_dynamic_symbol): Likewise.
2902 (ppc_elf_finish_dynamic_sections): Write PLTresolve without using
2903 insn array since so many need rewriting.
2904 * elf32-ppc.h (struct ppc_elf_params): Add plt_stub_align.
2905 * elf64-ppc.c (GLINK_PLTRESOLVE_SIZE): Rename from
2906 GLINK_CALL_STUB_SIZE. Add htab param and evaluate to size without
2907 nops. Adjust all uses.
2908 (ppc64_elf_get_synthetic_symtab): Don't use GLINK_CALL_STUB_SIZE
2909 in glink_vma calculation.
2910 (struct ppc_link_hash_table): Add global_entry section pointer.
2911 (create_linkage_sections): Create separate section for global
2913 (PPC_LO, PPC_HI, PPC_HA): Move earlier.
2914 (size_global_entry_stubs): Handle sizing for aligned stubs.
2915 (ppc64_elf_size_dynamic_sections): Handle global_entry alloc,
2916 and don't stash end of glink branch table in rawsize.
2917 (ppc_build_one_stub): Rewrite stub size calculations.
2918 (build_global_entry_stubs): Use new section.
2919 (ppc64_elf_build_stubs): Don't pad __glink_PLTresolve with nops.
2920 Build lazy link stubs out to end of section. Build global entry
2921 stubs in new section.
2923 2018-01-15 Nick Clifton <nickc@redhat.com>
2925 * po/uk.po: Updated Ukranian translation.
2927 2018-01-13 Nick Clifton <nickc@redhat.com>
2929 * po/bfd.pot: Regenerated.
2931 2018-01-13 Nick Clifton <nickc@redhat.com>
2933 * version.m4: Bump version to 2.30.51
2934 * configure: Regenerate.
2936 2018-01-13 Nick Clifton <nickc@redhat.com>
2938 2.30 branch created.
2940 2018-01-12 Jens Widell <jl@opera.com>
2942 * elf.c (setup_group): Optimize search for group by remembering
2943 last found group and restarting search at that index.
2944 * elf-bfd.h (struct elf_obj_tdata): Add group_search_offset field.
2946 2018-01-12 Gunther Nikl <gnikl@users.sourceforge.net>
2948 * aoutx.h (aout_link_check_ar_symbols): Remove default and handle
2949 bfd_link_common_skip_none in switch.
2951 2018-01-12 Alan Modra <amodra@gmail.com>
2954 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Ignore dynamic
2955 references on forced local symbols.
2957 2018-01-12 Vlad Ivanov <vlad@ivanov.email>
2959 * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when
2960 .reginfo section has wrong size.
2962 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
2965 * elf.c (_bfd_elf_map_sections_to_segments): When generating
2966 separate code and read-only data LOAD segments, create a new
2967 LOAD segment if the previous section contains text and the
2968 current section doesn't or vice versa. Don't put a writable
2969 section in a read-only segment if there is a RELRO segment.
2971 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
2974 * elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Ignore dynamic
2975 references on forced local symbols.
2977 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
2980 * elflink.c (bfd_elf_gc_sections): Keep all PREINIT_ARRAY,
2981 INIT_ARRAY as well as FINI_ARRAY sections for ld -r --gc-section.
2983 2018-01-09 Kuan-Lin Chen <kuanlinchentw@gmail.com>
2986 * elf32-nds32.c (nds32_elf_relax_loadstore): Fix a typographical error.
2988 2018-01-03 John Baldwin <jhb@FreeBSD.org>
2990 * elf.c (elfcore_grok_freebsd_note): Handle
2991 NT_FREEBSD_PROCSTAT_PROC, NT_FREEBSD_PROCSTAT_FILES, and
2992 NT_FREEBSD_PROCSTAT_VMMAP.
2994 2018-01-03 Alan Modra <amodra@gmail.com>
2996 Update year range in copyright notice of all files.
2998 For older changes see ChangeLog-2017
3000 Copyright (C) 2018 Free Software Foundation, Inc.
3002 Copying and distribution of this file, with or without modification,
3003 are permitted in any medium without royalty provided the copyright
3004 notice and this notice are preserved.
3010 version-control: never