1 2018-07-26 Alan Modra <amodra@gmail.com>
3 * elf64-ppc.c (ppc64_elf_size_stubs): Use a ppc_stub_long_branch_r2off
4 for calls to symbols with STO_PPC64_LOCAL_MASK bits set to 1.
6 2018-07-25 Alan Modra <amodra@gmail.com>
8 * elf32-ppc.c (ppc_elf_relax_section): Ignore common or undef locals.
9 Avoid trashing toff with added when used as a symbol index.
10 Ignore R_PPC_PLTREL24 addends in unused example code. Avoid
11 creating unnecessary fixups when relocatable.
13 2018-07-25 Alan Modra <amodra@gmail.com>
15 * elf32-arm.c (elf32_arm_nabi_write_core_note): Disable
16 -Wstringop-truncation warning for gcc-8.0 too.
17 * elf32-ppc.c (ppc_elf_write_core_note): Likewise.
18 * elf64-ppc.c (ppc64_elf_write_core_note): Likewise.
19 * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewise.
20 * elf32-s390.c (elf_s390_write_core_note): Comment fix.
21 * elf64-s390.c (elf_s390_write_core_note): Likewise.
23 2018-07-24 Alan Modra <amodra@gmail.com>
26 * dwarf2.c (dwarf_debug_section_enum): Fix comment typo.
27 * elf.c (bfd_section_from_shdr, elf_sort_sections): Likewise.
29 2018-07-23 Max Filippov <jcmvbkbc@gmail.com>
31 * elf32-xtensa.c (elf_xtensa_finish_dynamic_sections): Move
32 relocation sections consistency check to always check both
33 .rela.dyn and .rela.plt when they exist. Rearrange variable
34 definition and assignment places.
36 2018-07-23 Max Filippov <jcmvbkbc@gmail.com>
38 * elf32-xtensa.c (shrink_dynamic_reloc_sections): Shrink dynamic
39 relocations section for dynamic undefined weak symbols when
40 linking a shared object.
42 2018-07-23 Tom Tromey <tom@tromey.com>
44 * elf.c (bfd_get_elf_phdrs): Don't call memcpy with size 0.
46 2018-07-21 Eric Botcazou <ebotcazou@adacore.com>
48 * elf32-arm.c (elf32_arm_final_link_relocate) <R_ARM_GOT32>: Small
49 cleanup for the case of a global symbol that binds locally. Also
50 install a value in the GOT slot in the case of a local symbol in
53 2018-07-20 H.J. Lu <hongjiu.lu@intel.com>
56 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): If the
57 separate code program header is needed, make sure that the first
58 read-only PT_LOAD segment has no code by adding a
59 GNU_PROPERTY_X86_ISA_1_USED note.
61 2018-07-20 Chenghua Xu <paul.hua.gm@gmail.com>
62 Maciej W. Rozycki <macro@mips.com>
64 * elfxx-mips.c (print_mips_ases): Add MMI extension.
66 2018-07-20 Maciej W. Rozycki <macro@mips.com>
68 * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Do not
69 create DT_REL, DT_RELSZ or DT_RELENT dynamic entries if the
70 dynamic relocation section will be discarded from output.
71 (_bfd_mips_elf_finish_dynamic_sections) <DT_RELSZ>: Assert that
72 the dynamic relocation section will be retained in output.
74 2018-07-18 Maciej W. Rozycki <macro@mips.com>
76 * xcofflink.c (xcoff_write_global_symbol): Fix symbol type
77 checks for defined weak symbols.
79 2018-07-17 Maciej W. Rozycki <macro@mips.com>
81 * elf32-nds32.c (nds32_elf_relax_loadstore): Use
82 `bfd_is_abs_symbol' rather than `bfd_is_abs_section' in checking
83 whether the symbol is absolute.
84 (nds32_elf_relax_lo12): Likewise.
85 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
86 (elfNN_aarch64_check_relocs): Likewise.
87 * xcofflink.c (xcoff_need_ldrel_p): Likewise.
88 (bfd_xcoff_import_symbol): Likewise.
89 (xcoff_write_global_symbol): Likewise.
91 2018-07-17 Maciej W. Rozycki <macro@mips.com>
93 * linker.c (bfd_is_abs_symbol): New macro.
94 * bfd-in2.h: Regenerate.
96 2018-07-16 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
98 * elf-bfd.h (elfcore_write_ppc_tar): Add prototype.
99 (elfcore_write_ppc_ppr): Likewise.
100 (elfcore_write_ppc_dscr): Likewise.
101 (elfcore_write_ppc_ebb): Likewise.
102 (elfcore_write_ppc_pmu): Likewise.
103 (elfcore_write_ppc_tm_cgpr): Likewise.
104 (elfcore_write_ppc_tm_cfpr): Likewise.
105 (elfcore_write_ppc_tm_cvmx): Likewise.
106 (elfcore_write_ppc_tm_cvsx): Likewise.
107 (elfcore_write_ppc_tm_spr): Likewise.
108 (elfcore_write_ppc_tm_ctar): Likewise.
109 (elfcore_write_ppc_tm_cppr): Likewise.
110 (elfcore_write_ppc_tm_cdscr): Likewise.
111 * elf.c (elfcore_write_ppc_tar): New function.
112 (elfcore_write_ppc_ppr): Likewise.
113 (elfcore_write_ppc_dscr): Likewise.
114 (elfcore_write_ppc_ebb): Likewise.
115 (elfcore_write_ppc_pmu): Likewise.
116 (elfcore_write_ppc_tm_cgpr): Likewise.
117 (elfcore_write_ppc_tm_cfpr): Likewise.
118 (elfcore_write_ppc_tm_cvmx): Likewise.
119 (elfcore_write_ppc_tm_cvsx): Likewise.
120 (elfcore_write_ppc_tm_spr): Likewise.
121 (elfcore_write_ppc_tm_ctar): Likewise.
122 (elfcore_write_ppc_tm_cppr): Likewise.
123 (elfcore_write_ppc_tm_cdscr): Likewise.
124 (elfcore_write_register_note): Call them.
125 (elfcore_grok_ppc_tar): New function.
126 (elfcore_grok_ppc_ppr): Likewise.
127 (elfcore_grok_ppc_dscr): Likewise.
128 (elfcore_grok_ppc_ebb): Likewise.
129 (elfcore_grok_ppc_pmu): Likewise.
130 (elfcore_grok_ppc_tm_cgpr): Likewise.
131 (elfcore_grok_ppc_tm_cfpr): Likewise.
132 (elfcore_grok_ppc_tm_cvmx): Likewise.
133 (elfcore_grok_ppc_tm_cvsx): Likewise.
134 (elfcore_grok_ppc_tm_spr): Likewise.
135 (elfcore_grok_ppc_tm_ctar): Likewise.
136 (elfcore_grok_ppc_tm_cppr): Likewise.
137 (elfcore_grok_ppc_tm_cdscr): Likewise.
138 (elfcore_grok_note): Call them.
140 2018-07-11 Maciej W. Rozycki <macro@mips.com>
142 * elfxx-mips.c (mips_tls_got_relocs): Use `bfd_link_dll' rather
143 than `!bfd_link_pic' in determining the dynamic symbol index.
144 Avoid the index of -1.
145 (mips_elf_initialize_tls_slots): Likewise. Flatten code by
146 moving `dyn' to the beginning of the function block.
148 2018-07-11 Maciej W. Rozycki <macro@mips.com>
149 Rich Felker <bugdal@aerifal.cx>
152 * elfxx-mips.c (mips_tls_got_relocs): Use `bfd_link_dll' rather
153 than `bfd_link_pic' to determine whether dynamic relocations are
155 (mips_elf_initialize_tls_slots): Likewise.
157 2018-07-10 Maciej W. Rozycki <macro@mips.com>
159 * elflink.c (bfd_elf_final_link): Rename `remove' local variable
162 2018-07-10 Alan Modra <amodra@gmail.com>
164 * elf32-xgate.h: Delete.
165 * elf32-xgate.c: Delete unnecessary forward declarations, add two
167 (xgate_elf_bfd_link_hash_table_create)
168 (xgate_elf_bfd_link_hash_table_free)
169 (xgate_elf_set_mach_from_flags, struct xgate_scan_param)
170 (stub_hash_newfunc, elf32_xgate_add_symbol_hook)
171 (elf32_xgate_setup_section_lists, elf32_xgate_size_stubs)
172 (elf32_xgate_build_stubs, elf32_xgate_check_relocs)
173 (elf32_xgate_relocate_section, _bfd_xgate_elf_set_private_flags)
174 (elf32_xgate_post_process_headers): Delete.
175 (elf32_xgate_backend_symbol_processing): New function.
176 (xgate_elf_ignore_reloc, xgate_elf_special_reloc)
177 (_bfd_xgate_elf_print_private_bfd_data): Make static.
178 (ELF_TARGET_ID, elf_info_to_howto, elf_backend_check_relocs)
179 (elf_backend_relocate_section, elf_backend_object_p)
180 (elf_backend_final_write_processing, elf_backend_can_gc_sections)
181 (elf_backend_post_process_headers, elf_backend_add_symbol_hook)
182 (bfd_elf32_bfd_link_hash_table_create)
183 (bfd_elf32_bfd_set_private_flags)
184 (xgate_stub_hash_lookup): Don't define.
185 (elf_backend_symbol_processing): Define.
186 * elf-bfd.h (elf_target_id): Delete XGATE_ELF_DATA.
188 2018-07-09 Maciej W. Rozycki <macro@mips.com>
190 * elfxx-mips.c (_bfd_mips_elf_adjust_dynamic_symbol): Don't set
191 `->needs_lazy_stub' if the stubs output section is the absolute
194 2018-07-09 H.J. Lu <hongjiu.lu@intel.com>
197 * configure.ac: Use changequote for "i[3-7]86-*-linux-*".
198 * configure: Regenerated.
200 2018-07-09 Alan Modra <amodra@gmail.com>
202 * elf32-m68hc1x.c (elf32_m68hc11_post_process_headers): Call
203 _bfd_elf_post_process_headers.
205 2018-07-06 Max Filippov <jcmvbkbc@gmail.com>
207 * elf32-xtensa.c (elf_xtensa_allocate_dynrelocs): Don't allocate
208 space for dynamic relocation for undefined weak symbol.
209 (elf_xtensa_relocate_section): Don't emit R_XTENSA_RELATIVE
210 relocation for undefined weak symbols.
211 (shrink_dynamic_reloc_sections): Don't shrink dynamic relocation
212 section for relocations against undefined weak symbols.
214 2018-07-06 Alan Hayward <alan.hayward@arm.com>
216 * elf.c (elfcore_grok_aarch_sve): New function.
217 (elfcore_grok_note): Check for Aarch64 SVE.
218 (elfcore_write_aarch_sve): New function.
219 (elfcore_write_register_note): Check for Aarch64 SVE.
220 * elf-bfd.h(elfcore_grok_aarch_sve): New declaration.
222 2018-07-06 Alan Modra <amodra@gmail.com>
224 * elf32-arm.c (elf32_arm_nabi_write_core_note): Don't use
225 DIAGNOTIC_PUSH and DIAGNOSTIC_POP unconditionally.
226 * elf32-ppc.c (ppc_elf_write_core_note): Likewise.
227 * elf32-s390.c (elf_s390_write_core_note): Likewise.
228 * elf64-ppc.c (ppc64_elf_write_core_note): Likewise.
229 * elf64-s390.c (elf_s390_write_core_note): Likewise.
230 * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewise.
232 2018-07-05 Jim Wilson <jimw@sifive.com>
234 * config.bfd (riscv32*-*-*): Renamed from riscv32-*-*.
235 (riscv64*-*-*): Likewise.
236 (riscv-*-*): Add as an alias for riscv32*-*-*.
238 2018-07-05 H.J. Lu <hongjiu.lu@intel.com>
241 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Remove x86
242 ISA properties with empty bits.
244 2018-07-05 Nick Clifton <nickc@redhat.com>
246 * po/ru.po: Updated Russian translation.
248 2018-07-05 Alan Modra <amodra@gmail.com>
250 * elf-bfd.h (_bfd_elf_ppc_merge_fp_attributes): Update prototype.
251 * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Return error
252 on mismatch. Remove "warning: " from messages. Track last bfd
254 (ppc_elf_merge_obj_attributes): Likewise. Handle status from
255 _bfd_elf_ppc_merge_fp_attributes.
256 * elf64-ppc.c (ppc64_elf_merge_private_bfd_data): Handle status
257 from _bfd_elf_ppc_merge_fp_attributes.
259 2018-07-04 H.J. Lu <hongjiu.lu@intel.com>
261 * Makefile.am (bfdinclude_HEADERS): Add $(INCDIR)/diagnostics.h.
262 * Makefile.in: Regenerated.
264 2018-07-03 Alan Modra <amodra@gmail.com>
266 * elflink.c (bfd_elf_final_link): Remove zero size .gnu.attributes
269 2018-07-03 Alan Modra <amodra@gmail.com>
271 * elf-bfd.h (ATTR_TYPE_FLAG_ERROR, ATTR_TYPE_HAS_ERROR): Define.
272 * elf-attrs.c (is_default_attr): Handle ATTR_TYPE_HAS_ERROR.
273 * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Use
274 ATTR_TYPE_FLAG_INT_VAL. Set ATTR_TYPE_HAS_ERROR on finding
275 incompatible attribute.
276 (ppc_elf_merge_obj_attributes): Likewise. Return
277 _bfd_elf_merge_object_attributes result.
278 * elf64-ppc.c (ppc64_elf_merge_private_bfd_data): Return
279 _bfd_elf_merge_object_attributes result.
281 2018-07-03 Alan Modra <amodra@gmail.com>
284 * elflink.c (_bfd_elf_fix_symbol_flags): Hide dynamic symbols
285 in discarded sections.
287 2018-07-02 Maciej W. Rozycki <macro@mips.com>
289 * elfxx-mips.c (_bfd_mips_elf_create_dynamic_sections): Set
290 `mark' for symbols created from `mips_elf_dynsym_rtproc_names'
293 2018-07-02 Maciej W. Rozycki <macro@mips.com>
295 * elf64-mips.c (micromips_elf64_howto_table_rel): Add
296 R_MICROMIPS_HI0_LO16, R_MICROMIPS_TLS_GD, R_MICROMIPS_TLS_LDM,
297 R_MICROMIPS_TLS_DTPREL_HI16, R_MICROMIPS_TLS_DTPREL_LO16,
298 R_MICROMIPS_TLS_GOTTPREL, R_MICROMIPS_TLS_TPREL_HI16,
299 R_MICROMIPS_TLS_TPREL_LO16, R_MICROMIPS_GPREL7_S2 and
300 R_MICROMIPS_PC23_S2 relocation entries.
301 (micromips_elf64_howto_table_rela): Likewise.
302 (micromips_reloc_map): Likewise.
303 * elfn32-mips.c (elf_micromips_howto_table_rel): Likewise.
304 (elf_micromips_howto_table_rela): Likewise.
305 (micromips_reloc_map): Likewise.
307 2018-07-02 H.J. Lu <hongjiu.lu@intel.com>
310 * elf64-x86-64.c (elf_x86_64_relocate_section): Clear the
311 R_X86_64_converted_reloc_bit bit.
313 2018-07-02 Jeff Muizelaar <jrmuizel@gmail.com>
314 Tom Tromey <tom@tromey.com>
318 * mach-o.c (bfd_mach_o_fat_close_and_cleanup): New function.
319 (bfd_mach_o_close_and_cleanup): Redefine.
320 * archive.c (_bfd_unlink_from_archive_parent): New function,
322 (_bfd_archive_close_and_cleanup): ..here.
323 (bfd_generic_archive_p): Do not clear archive's format.
324 * libbfd-in.h (_bfd_unlink_from_archive_parent): Declare.
325 * libbfd.h: Regenerate.
327 2018-07-02 Thomas Preud'homme <thomas.preudhomme@arm.com>
329 * archures.c (bfd_mach_arm_5TEJ, bfd_mach_arm_6, bfd_mach_arm_6KZ,
330 bfd_mach_arm_6T2, bfd_mach_arm_6K, bfd_mach_arm_7, bfd_mach_arm_6M,
331 bfd_mach_arm_6SM, bfd_mach_arm_7EM, bfd_mach_arm_8, bfd_mach_arm_8R,
332 bfd_mach_arm_8M_BASE, bfd_mach_arm_8M_MAIN): Define.
333 * bfd-in2.h: Regenerate.
334 * cpu-arm.c (arch_info_struct): Add entries for above new
336 * elf32-arm.c (bfd_arm_get_mach_from_attributes): Add Tag_CPU_arch to
337 bfd_mach_arm mapping logic for pre Armv4 and Armv5TEJ and later
338 architectures. Force assert failure for any new Tag_CPU_arch value.
340 2018-07-02 Thomas Preud'homme <thomas.preudhomme@arm.com>
342 * doc/bfdint.texi: Use command-line consistently when used in a
344 * doc/bfdsumm.texi: Likewise.
346 2018-06-29 Maciej W. Rozycki <macro@mips.com>
348 * elfxx-mips.c (allocate_dynrelocs): Remove extraneous symbol
349 visibility check made for undefined weak symbols.
351 2018-06-26 Nick Clifton <nickc@redhat.com>
353 * po/uk.po: Updated Ukranian translation.
355 2018-06-25 Nick Clifton <nickc@redhat.com>
357 * elfnn-aarch64.c (_bfd_aarch64_erratum_835769_stub_name): Check
358 for malloc returning NULL.
359 (_bfd_aarch64_erratum_843419_fixup): Check for
360 _bfd_aarch64_erratum_835769_stub_name returning NULL.
362 2018-06-24 Nick Clifton <nickc@redhat.com>
364 * po/bfd.pot: Regenerate.
366 2018-06-24 Nick Clifton <nickc@redhat.com>
368 * version.m4: Update version string to 2.31.51.
369 * configure: Regenerate.
371 2018-06-24 Nick Clifton <nickc@redhat.com>
375 2018-06-21 Maciej W. Rozycki <macro@mips.com>
377 * elfxx-mips.c (_bfd_mips_elf_compact_eh_encoding)
378 (_bfd_mips_elf_cant_unwind_opcode): Correct formatting.
380 2018-06-21 Maciej W. Rozycki <macro@mips.com>
382 * elfxx-mips.c (_bfd_mips_post_process_headers): Keep
383 EI_ABIVERSION setting together.
385 2018-06-21 Maciej W. Rozycki <macro@mips.com>
387 * elfxx-mips.c (MIPS_LIBC_ABI_DEFAULT, MIPS_LIBC_ABI_MIPS_PLT)
388 (MIPS_LIBC_ABI_UNIQUE, MIPS_LIBC_ABI_MIPS_O32_FP64)
389 (MIPS_LIBC_ABI_MAX): New enumeration constants.
390 (_bfd_mips_post_process_headers): Use them in place of magic
393 2018-06-21 Jim Wilson <jimw@sifive.com>
395 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Update comment.
396 Use SYMBOL_REFERENCES_LOCAL. Add asserts for h->got.offset.
398 2018-06-21 Alan Modra <amodra@gmail.com>
400 * doc/Makefile.am (AUTOMAKE_OPTIONS): Add "foreign".
401 * doc/Makefile.in: Regenerate.
403 2018-06-20 Renlin Li <renlin.li@arm.com>
405 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Use PG_OFFSET
406 to resolve BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC,
407 BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC,
408 BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC,
409 BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC,
410 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
411 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
412 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
413 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
415 2018-06-20 Nick Clifton <nickc@redhat.com>
418 * opncls.c (get_build_id): Check for a negative or excessive data
419 size in the build-id note.
421 2018-06-20 Nick Clifton <nickc@redhat.com>
424 * mach-o.c (cputype): New function.
425 (cpusubtype): New function.
426 (bfd_mach_o_bfd_print_private_data): New function. Dispalys the
427 values in the MACH-O file header.
428 (bfd_mach_o_bfd_copy_private_header_data): Copy the cputype and
429 cpusubtype fields from the input bfd's mach-o header to the output
431 * mach-o-target.c (bfd_mach_o_bfd_print_private_bfd_data):
432 Redefine to bfd_mach_o_bfd_print_private_data.
433 * mach-o.h (bfd_mach_o_bfd_print_private_bfd_data): Prototype.
435 2018-06-19 Maciej W. Rozycki <macro@mips.com>
438 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Verify the
439 `.got.plt' entry referred is in range.
440 (mips_finish_exec_plt): Correct the range check for `.got.plt'
441 start. Replace the assertion used for that with a proper error
444 2018-06-19 Maciej W. Rozycki <macro@mips.com>
446 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Fix
449 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
451 * Makefile.am (AUTOMAKE_OPTIONS): Remove 1.11.
452 (INCLUDES): Rename to ...
453 (AM_CPPFLAGS): ... this.
454 * configure.ac: Remove AC_PREREQ.
455 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove 1.9, cygnus, add
456 info-in-builddir no-texinfo.tex.
457 (info_TEXINFOS): Rename bfd.texinfo to bfd.texi.
458 * doc/bfd.texinfo: Rename to ...
459 * doc/bfd.texi: ... this.
460 * Makefile.in: Re-generate.
461 * aclocal.m4: Re-generate.
462 * config.in: Re-generate.
463 * configure: Re-generate.
464 * doc/Makefile.in: Re-generate.
466 2018-06-18 Mephi <mephi42@gmail.com>
469 * mach-o-x86-64.c (x86_64_howto_table): Add entry for
470 BFD_RELOC_MACH_O_X86_64_RELOC_TLV.
471 (bfd_mach_o_x86_64_canonicalize_one_reloc): Handle the new reloc.
472 (bfd_mach_o_x86_64_swap_reloc_out): Likewise.
473 * reloc.c (BFD_RELOC_MACH_O_X86_64_TV): New entry.
474 * bfd-in2.h: Regenerate.
475 * libbfd.h: Regenerate.
477 2018-06-14 Faraz Shahbazker <Faraz.Shahbazker@mips.com>
479 * elfxx-mips.c (print_mips_ases): Add GINV extension.
481 2018-06-14 H.J. Lu <hongjiu.lu@intel.com>
484 * elf.c (_bfd_elf_get_symbol_version_string): Check if the first
485 symbol version is base version.
487 2018-06-14 Alan Modra <amodra@gmail.com>
489 * elf-bfd.h (struct elf_link_hash_table): Add "dynamic_relocs".
490 * elflink.c (_bfd_elf_init_2_index_sections): Comment fix.
491 (_bfd_elf_add_dynamic_entry): Set "dynamic_relocs".
492 (_bfd_elf_link_renumber_dynsyms): Exclude all section symbols when
493 "dynamic_relocs" is not set.
494 * elfxx-mips.c (count_section_dynsyms): Likewise.
496 2018-06-14 Alan Modra <amodra@gmail.com>
499 * bfdio.c (bfd_seek): Optimize away seeks to current position.
501 2018-06-13 Scott Egerton <scott.egerton@imgtec.com>
502 Faraz Shahbazker <Faraz.Shahbazker@mips.com>
504 * elfxx-mips.c (print_mips_ases): Add CRC.
506 2018-06-08 H.J. Lu <hongjiu.lu@intel.com>
509 * elfxx-x86.c (elf_x86_hide_linker_defined): New function.
510 (_bfd_x86_elf_link_check_relocs): Use it to hide hidden
511 __bss_start, _end and _edata in shared libraries.
513 2018-06-07 Alan Modra <amodra@gmail.com>
515 * elf32-tic6x.c (elf32_tic6x_check_relocs): Reference
516 __c6xabi_DSBT_BASE explicitly for R_C6000_SBR_* relocs.
518 2018-06-05 Alan Modra <amodra@gmail.com>
520 * bfd.c (struct bfd): Update comment on "where" usage.
521 * bfdio.c (bfd_bwrite, bfd_stat): Use and update "iovec",
522 "iostream", and "where" from containing archive file. Return
524 (bfd_bread): Similarly, and return error attempted out of
525 bounds archive element access.
526 (bfd_tell, bfd_flush): Use and update "iovec", "iostream", and
527 "where" from containing archive file.
528 (bfd_seek): Likewise. Return error on NULL iovec. Don't
529 attempt to optimize away seeks. Don't paper over errors by
531 (bfd_get_mtime): Call bfd_stat rather than iovec->bstat.
532 (bfd_get_size): Likewise.
533 (bfd_mmap): Operate on and use iovec of containing archive
534 file. Return error on NULL iovec.
535 * cache.c (bfd_cache_lookup_worker): Abort if working on
537 (cache_bread_1): Delete bfd parameter, add FILE* parameter.
538 Don't ignore zero byte reads.
539 (cache_bread): Look up FILE* in cache here. Error on NULL
541 (cache_bwrite): Rename "where" to "from".
542 (cache_bmmap): Don't handle archive elements.
543 * coffcode.h (coff_slurp_line_table): Exit early on zero
545 * bfd-in2.h: Regenerate.
547 2018-06-05 Alan Modra <amodra@gmail.com>
550 * plugin.c (bfd_plugin_open_input): Allow for possibility of
551 nested archives. Open file again for plugin.
552 (try_claim): Don't save and restore file position. Close file
554 * sysdep.h (O_BINARY): Define.
556 2018-06-04 Max Filippov <jcmvbkbc@gmail.com>
558 * elf32-xtensa.c (xtensa_read_table_entries): Make global.
559 (compute_fill_extra_space): Drop declaration. Rename function to
560 xtensa_compute_fill_extra_space.
561 (compute_ebb_actions, remove_dead_literal): Update references to
562 compute_fill_extra_space.
564 2018-06-04 Volodymyr Arbatov <arbatov@cadence.com>
566 * elf32-xtensa.c (elf32xtensa_separate_props): New global
568 (xtensa_add_names): New function.
569 (xtensa_property_section_name): Add new parameter
570 separate_sections, use it to choose property section name.
571 (xtensa_get_separate_property_section): New function.
572 (xtensa_get_property_section): Invoke
573 xtensa_get_separate_property_section to get individual property
574 section if it exists, common property section otherwise.
575 (xtensa_make_property_section): Pass elf32xtensa_separate_props
576 to xtensa_property_section_name.
578 2018-06-04 H.J. Lu <hongjiu.lu@intel.com>
581 * bfd-in.h: Include "diagnostics.h".
582 * bfd-in2.h: Regenerated.
583 * elf32-arm.c (elf32_arm_nabi_write_core_note): Use
584 DIAGNOSTIC_PUSH, DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION and
585 DIAGNOSTIC_POP to silence GCC 8.1 warnings with
586 -Wstringop-truncation.
587 * elf32-ppc.c (ppc_elf_write_core_note): Likewse.
588 * elf32-s390.c (elf_s390_write_core_note): Likewse.
589 * elf64-ppc.c (ppc64_elf_write_core_note): Likewse.
590 * elf64-s390.c (elf_s390_write_core_note): Likewse.
591 * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewse.
593 2018-06-03 Jim Wilson <jimw@sifive.com>
596 * elfnn-riscv.c (riscv_elf_relocate_section) <R_RISCV_CALL>: Check
597 for and handle an undefined weak with no PLT.
600 * elfnn-riscv.c (riscv_relax_delete_bytes): Add versioned_hidden check
601 to code that ignores duplicate symbols.
603 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
605 * version.m4: Bump version to 2.30.52
606 * configure: Regenerated.
608 2018-06-01 Alan Modra <amodra@gmail.com>
610 * bfd.c (_bfd_error_handler): Arrange for this function to be
611 declared in bfd-in2.h.
612 * libbfd-in.h (_bfd_error_handler): Don't declare.
613 * libbfd.h: Regenerate.
614 * bfd-in2.h: Regenerate.
616 2018-05-30 Amaan Cheval <amaan.cheval@gmail.com>
618 * config.bfd (x86_64-*-*): Add pei-x86-64 target to x86_64-*-rtems*
619 This is needed to generate UEFI application image files from ELFs.
621 2018-05-28 H.J. Lu <hongjiu.lu@intel.com>
623 * elf32-i386.c (elf_i386_lazy_plt): Add plt_tlsdesc_entry,
624 plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset,
625 plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and
626 plt_tlsdesc_got2_insn_end for TLSDESC entry.
627 (elf_i386_lazy_ibt_plt): Likewise.
628 (elf_i386_nacl_plt): Likewise.
629 * elf64-x86-64.c (tlsdesc_plt_entry): Moved and renamed to ...
630 (elf_x86_64_tlsdesc_plt_entry): This.
631 (elf_x86_64_lazy_plt): Add plt_tlsdesc_entry,
632 plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset,
633 plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and
634 plt_tlsdesc_got2_insn_end for TLSDESC entry.
635 (elf_x86_64_lazy_bnd_plt): Likewise.
636 (elf_x86_64_lazy_ibt_plt): Likewise.
637 (elf_x32_lazy_ibt_plt): Likewise.
638 (elf_x86_64_nacl_plt): Likewise.
639 (elf_x86_64_finish_dynamic_sections): Use plt_tlsdesc_entry,
640 plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset,
641 plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and
642 plt_tlsdesc_got2_insn_end to update TLSDESC entry.
643 * elfxx-x86.h (elf_x86_lazy_plt_layout): Update comments.
644 Add plt_tlsdesc_entry, plt_tlsdesc_entry_size,
645 plt_tlsdesc_got1_offset, plt_tlsdesc_got2_offset,
646 plt_tlsdesc_got1_insn_end and plt_tlsdesc_got2_insn_end.
647 (elf_x86_non_lazy_plt_layout): Update comments.
648 (elf_x86_plt_layout): Likewise.
650 2018-05-28 H.J. Lu <hongjiu.lu@intel.com>
653 * elf-s390-common.c (elf_s390_add_symbol_hook): Removed.
654 * elf32-arc.c (elf_arc_add_symbol_hook): Likewise.
655 (elf_backend_add_symbol_hook): Likewise.
656 * elf32-m68k.c (elf_m68k_add_symbol_hook): Likewise.
657 (elf_backend_add_symbol_hook): Likewise.
658 * elf32-s390.c (elf_backend_add_symbol_hook): Likewise.
659 * elf32-sparc.c (elf32_sparc_add_symbol_hook): Likewise.
660 (elf_backend_add_symbol_hook): Likewise.
661 * elf64-s390.c (elf_backend_add_symbol_hook): Likewise.
662 * elfxx-aarch64.c (_bfd_aarch64_elf_add_symbol_hook): Likewise.
663 * elfxx-aarch64.h (_bfd_aarch64_elf_add_symbol_hook): Likewise.
664 (elf_backend_add_symbol_hook): Likewise.
665 * elf32-arm.c (elf32_arm_add_symbol_hook): Remove STT_GNU_IFUNC
667 * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise.
668 * elf64-ppc.c (ppc64_elf_add_symbol_hook): Likewise.
669 * elf64-sparc.c (elf64_sparc_add_symbol_hook): Likewise.
670 * elflink.c (elf_link_add_object_symbols): Set
671 elf_gnu_symbol_ifunc for STT_GNU_IFUNC symbols.
673 2018-05-26 H.J. Lu <hongjiu.lu@intel.com>
676 * elf-bfd.h (_bfd_elf_link_hide_sym_by_version): New.
677 * elflink.c (_bfd_elf_link_hide_versioned_symbol): New function.
678 Extracted from _bfd_elf_link_assign_sym_version.
679 (_bfd_elf_link_hide_sym_by_version): New function.
680 (_bfd_elf_link_assign_sym_version): Use
681 _bfd_elf_link_hide_versioned_symbol.
682 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Call
683 _bfd_elf_link_hide_sym_by_version instead of
684 bfd_hide_sym_by_version. Don't check unversioned symbol.
686 2018-05-25 Alan Modra <amodra@gmail.com>
688 * Makefile.in: Regenerate.
689 * po/SRC-POTFILES.in: Regenerate.
691 2018-05-25 Alan Modra <amodra@gmail.com>
693 * configure.ac (bfd_cv_hidden): Run test with -Werror in CFLAGS.
694 * configure: Regenerate.
696 2018-05-23 H.J. Lu <hongjiu.lu@intel.com>
698 * elf64-ppc.c (ppc64_elf_write_core_note): Add ATTRIBUTE_NONSTRING
701 2018-05-22 Alan Modra <amodra@gmail.com>
704 * elf32-hppa.c (hppa_get_stub_entry): Return NULL when link_sec
706 (elf32_hppa_size_stubs): Only create stubs for load, alloc, code
708 (final_link_relocate): Revert last change.
710 2018-05-22 Alan Modra <amodra@gmail.com>
713 * elf32-hppa.c (final_link_relocate): Don't look for plt call
714 stubs in non-alloc sections.
716 2018-05-21 H.J. Lu <hongjiu.lu@intel.com>
719 * aout-target.h (MY_bfd_link_hide_symbol): New.
720 * aout-tic30.c (MY_bfd_link_hide_symbol): Likewise.
721 * binary.c (binary_bfd_link_hide_symbol): Likewise.
722 * coff-alpha.c (_bfd_ecoff_bfd_link_hide_symbol): Likewise.
723 * coff-mips.c (_bfd_ecoff_bfd_link_hide_symbol): Likewise.
724 * coff-rs6000.c (_bfd_xcoff_bfd_link_hide_symbol): Likewise.
725 * coffcode.h (coff_bfd_link_hide_symbol): Likewise.
726 * elf-bfd.h (_bfd_elf_link_hide_symbol): Likewise.
727 * elfxx-target.h (bfd_elfNN_bfd_link_hide_symbol): Likewise.
728 * i386msdos.c (msdos_bfd_link_hide_symbol): Likewise.
729 * ihex.c (ihex_bfd_link_hide_symbol): Likewise.
730 * libbfd-in.h (_bfd_nolink_bfd_link_hide_symbol): Likewise.
731 * linker.c (_bfd_generic_link_hide_symbol): Likewise.
732 (bfd_link_hide_symbol): Likewise.
733 * mach-o-target.c (bfd_mach_o_bfd_link_hide_symbol): Likewise.
734 * mmo.c (mmo_bfd_link_hide_symbol): Likewise.
735 * pef.c (bfd_pef_bfd_link_hide_symbol): Likewise.
736 * plugin.c (bfd_plugin_bfd_link_hide_symbol): Likewise.
737 * ppcboot.c (ppcboot_bfd_link_hide_symbol): Likewise.
738 * som.c (som_bfd_link_hide_symbol): Likewise.
739 * srec.c (srec_bfd_link_hide_symbol): Likewise.
740 * tekhex.c (tekhex_bfd_link_hide_symbol): Likewise.
741 * vms-alpha.c (vms_bfd_link_hide_symbol): Likewise.
742 (alpha_vms_bfd_link_hide_symbol): Likewise.
743 * xsym.c (bfd_sym_bfd_link_hide_symbol): Likewise.
744 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
745 _bfd_generic_link_hide_symbol.
746 (rs6000_xcoff64_aix_vec): Likewise.
747 * elflink.c (bfd_elf_record_link_assignment): Don't make forced
748 local symbol dynamic.
749 (_bfd_elf_link_hide_symbol): New function.
750 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
751 check root.ldscript_def.
752 * targets.c (bfd_target): Add _bfd_link_hide_symbol.
753 (BFD_JUMP_TABLE_LINK): Add NAME##_bfd_link_hide_symbol.
754 * bfd-in2.h: Regenerated.
755 * libbfd.h: Likewise.
757 2018-05-21 H.J. Lu <hongjiu.lu@intel.com>
760 * elf.c (setup_group): Mark section in a section group with
763 2018-05-18 H.J. Lu <hongjiu.lu@intel.com>
766 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
767 set eh->local_ref to 1 if a symbol is versioned and there is a
770 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
772 * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Handle
775 2018-05-18 Jim Wilson <jimw@sifive.com>
777 * elfnn-riscv.c (allocate_dynrelocs): Discard dynamic relocations if
778 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
779 (riscv_elf_relocate_section): Don't generate dynamic relocation if
780 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
781 (riscv_elf_finish_dynamic_symbol): Likewise.
783 2018-05-18 John Darrington <john@darrington.wattle.id.au>
785 * Makefile.am: Add s12z files.
786 * Makefile.in: Regenerate.
787 * archures.c: Add bfd_s12z_arch.
788 * bfd-in.h: Add exports of bfd_putb24 and bfd_putl24.
789 * bfd-in2.h: Regenerate.
790 * config.bfd: Add s12z target.
791 * configure.ac: Add s12z target.
792 * configure: Regenerate.
793 * cpu-s12z.c: New file.
794 * elf32-s12z.c: New file.
795 * libbfd.c (bfd_putb24): New function.
796 (bfd_putl24): New function.
797 * libbfd.h: Regenerate.
798 * reloc.c: Add s12z relocations.
799 (bfd_get_reloc_size): Handle size 5 relocs.
800 * targets.c: Add s12z_elf32_vec.
802 2018-05-18 H.J. Lu <hongjiu.lu@intel.com>
805 * elf32-i386.c (elf_i386_relocate_section): Handle R_386_GOT32X
807 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
808 set eh->local_ref to 1 for linker defined symbols.
810 2018-05-18 Alan Modra <amodra@gmail.com>
813 * elf.c (setup_group): Formatting. Check that SHT_GROUP entries
814 don't point at other SHT_GROUP sections. Set shdr corresponding
815 to invalid entry, to NULL rather than section 0. Identify
816 SHT_GROUP section index when reporting an error. Cope with NULL
819 2018-05-18 Alan Modra <amodra@gmail.com>
821 * libbfd-in.h (ATTRIBUTE_HIDDEN): Define and use throughout.
822 * configure.ac (HAVE_HIDDEN): Check compiler support for hidden
824 * libbfd.h: Regenerate.
825 * configure: Regenerate.
826 * config.in: Regenerate.
828 2018-05-18 Alan Modra <amodra@gmail.com>
830 * libbfd-in.h: Add include guard.
831 * libcoff-in.h: Likewise.
832 * doc/Makefile.am (libbfd.h, libcoff.h): Append another #endif.
833 * doc/Makefile.in: Regenerate.
834 * libbfd.h: Regenerate.
835 * libcoff.h: Regenerate.
837 2018-05-16 Maciej W. Rozycki <macro@mips.com>
839 * elf32-nds32.c (nds32_convert_32_to_16): Preset `insn_type'.
841 2018-05-16 Alan Modra <amodra@gmail.com>
844 * format.c (struct bfd_preserve): Add section_id.
845 (bfd_preserve_save, bfd_preserve_restore): Save and restore
847 (bfd_reinit): Set _bfd_section_id.
848 (bfd_check_format_matches): Put all matches of any priority into
849 matching_vector. Save initial section id and start each attempted
850 match at that section id.
851 * libbfd-in.h (_bfd_section_id): Declare.
852 * section.c (_bfd_section_id): Rename from section_id and make
854 (bfd_get_next_section_id): Delete.
855 * elf64-ppc.c (ppc64_elf_setup_section_lists): Replace use of
856 bfd_get_section_id with _bfd_section_id.
857 * libbfd.h: Regenerate.
858 * bfd-in2.h: Regenerate.
860 2018-05-15 Christophe Guillon <christophe.guillon@st.com>
862 * coffcode.h (coff_bigobj_swap_aux_in): Make sure that all fields
863 of the aux structure are initialised.
865 2018-05-15 Francois H. Theron <francois.theron@netronome.com>
867 * targets.c: Wrap nfp_elf64_vec in BFD64 ifdef.
869 2018-05-15 Nick Clifton <nickc@redhat.com>
871 * po/pt.po: New Portuguese translation.
872 * configure.ac (ALL_LINGUAS): Add pt.
873 * configure: Regenerate.
875 2018-05-14 H.J. Lu <hongjiu.lu@intel.com>
878 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Don't issue
879 an error on IFUNC pointer defined in PDE.
880 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Call
881 _bfd_x86_elf_link_fixup_ifunc_symbol.
882 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
883 * elfxx-x86.c (_bfd_x86_elf_link_fixup_ifunc_symbol): New
885 * elfxx-x86.h (_bfd_x86_elf_link_fixup_ifunc_symbol): New.
887 2018-05-14 H.J. Lu <hongjiu.lu@intel.com>
890 * elfxx-x86.c (elf_x86_linker_defined): New function.
891 (_bfd_x86_elf_link_check_relocs): Use it to mark __bss_start,
892 _end and _edata locally defined within executables.
894 2018-05-12 Alan Modra <amodra@gmail.com>
897 * elf.c (rewrite_elf_program_header): Use segment_mark only for
898 PT_LOAD headers. Delete first_matching_lma and first_suggested_lma.
899 Instead make matching_lma and suggested_lma pointers to the
900 sections. Align section vma and lma calculated from segment.
901 Don't clear includes_phdrs or includes_filehdr based on p_paddr
902 test. Try to handle alignment padding before first section by
903 adjusting new segment lma down. Adjust PT_PHDR map p_paddr.
905 2018-05-09 Dimitar Dimitrov <dimitar@dinux.eu>
907 * elf32-pru.c (pru_elf32_do_ldi32_relocate): Make LDI32 relocation
908 conformant to TI ABI.
909 (pru_elf32_relax_section): Likewise.
910 (pru_elf_relax_delete_bytes): Fix offsets for new LDI32 code.
911 * elf32-pru.c (pru_elf32_do_ldi32_relocate): Ignore addend.
912 (pru_elf32_pmem_relocate): Trap - should not get here.
913 (pru_elf32_relocate_section): Add support for REL relocations.
914 (elf_info_to_howto_rel): Enable REL.
915 (elf_backend_may_use_rel_p): Likewise.
916 (elf_backend_may_use_rela_p): Likewise.
917 (elf_backend_default_use_rela_p): Likewise.
919 2018-05-09 Alan Modra <amodra@gmail.com>
922 * peXXigen.c (pe_print_edata): Correct minimum size.
924 2018-05-09 Alan Modra <amodra@gmail.com>
927 * peXXigen.c (pe_print_idata): Bound check hint_addr.
929 2018-05-08 Nick Clifton <nickc@redhat.com>
932 * elf.c (bfd_elf_get_str_section): Check for an excessively large
934 * elf-attrs.c (_bfd_elf_parse_attributes): Issue an error if the
935 attribute section is larger than the size of the file.
937 2018-05-07 Alan Modra <amodra@gmail.com>
939 * cofflink.c (_bfd_coff_link_input_bfd): Use memcmp rather than
940 strncmp when checking for ".bf" special symbol.
941 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Make pe_required_section_flags
942 section name a char array, remove sentinal known_sections entry,
943 and adjust loop over known_sections to suit. Use memcmp rather
946 2018-05-04 Alan Modra <amodra@gmail.com>
948 * elf-linux-core.h (struct elf_external_linux_prpsinfo32_ugid32),
949 (struct elf_external_linux_prpsinfo32_ugid16),
950 (struct elf_external_linux_prpsinfo64_ugid32),
951 (struct elf_external_linux_prpsinfo64_ugid16): Add ATTRIBUTE_NONSTRING
952 to pr_fname and pr_psargs fields. Remove GCC diagnostic pragmas.
954 * elf.c (elfcore_write_prpsinfo): ..here. Indent nested preprocessor
956 * elf32-arm.c (elf32_arm_nabi_write_core_note): Add ATTRIBUTE_NONSTRING
958 * elf32-ppc.c (ppc_elf_write_core_note): Likewise.
959 * elf32-s390.c (elf_s390_write_core_note): Likewise.
960 * elf64-s390.c (elf_s390_write_core_note): Likewise.
961 * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewise.
962 * elf64-x86-64.c (elf_x86_64_write_core_note): Add GCC diagnostic
964 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Use strnlen to avoid
965 false positive gcc-8 warning.
966 * cofflink.c (_bfd_coff_link_input_bfd): Likewise.
968 2018-05-04 Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
970 * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Fix the order
971 of arguments when warning about different long double types.
973 2018-05-03 Simon Atanasyan <simon@atanasyan.com>
975 * elf32-mips.c: (elf32_mips_fixup_symbol): New function.
976 (elf_backend_fixup_symbol): New macro.
977 * elfxx-mips.c: (mips_elf_output_extsym): Discard _gp_disp
979 (_bfd_mips_elf_finish_dynamic_symbol): Likewise.
981 2018-04-30 Francois H. Theron <francois.theron@netronome.com>
983 * Makefile.am: Added NFP files to build.
984 * archures.c: Added bfd_arch_nfp
985 * config.bfd: Added NFP support.
986 * configure.ac: Added NFP support.
987 * cpu-nfp.c: New, for NFP support.
988 * elf-bfd.h: Added elf_section_info()
989 * elf64-nfp.c: New, for NFP support.
990 * po/SRC-POTFILES.in: Added NFP source files.
991 * targets.c: Added nfp_elf64_vec
992 * bfd-in2.h: Regenerate.
993 * Makefile.in: Regenerate.
994 * configure: Regenerate.
996 2018-04-27 Alan Modra <amodra@gmail.com>
998 * bfd-in2.h: Regenerate.
999 * libbfd.h: Regenerate.
1001 2018-04-27 Alan Modra <amodra@gmail.com>
1005 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't drop plt
1007 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Comment fixes.
1009 2018-04-26 Pedro Alves <palves@redhat.com>
1011 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't consider
1012 ifunc and non-ifunc symbols duplicates.
1014 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1015 Mickaël Guêné <mickael.guene@st.com>
1017 * elf32-arm.c (elf32_arm_fdpic_thumb_plt_entry): New.
1018 (elf32_arm_plt_needs_thumb_stub_p): Handle thumb-only case.
1019 (elf32_arm_populate_plt_entry): Likewise.
1020 (elf32_arm_output_plt_map_1): Likewise.
1021 (elf32_arm_output_arch_local_syms): Likewise.
1023 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1024 Mickaël Guêné <mickael.guene@st.com>
1026 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Handle
1027 _GLOBAL_OFFSET_TABLE_ in FDPIC mode.
1029 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1030 Mickaël Guêné <mickael.guene@st.com>
1032 * elf32-arm.c (bfd_elf32_arm_set_target_params): Handle FDPIC case
1035 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1036 Mickaël Guêné <mickael.guene@st.com>
1038 * elf32-arm.c (DEFAULT_STACK_SIZE): New.
1039 (elf32_arm_always_size_sections): Create stack segment.
1041 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1042 Mickaël Guêné <mickael.guene@st.com>
1044 * bfd-in2.h (BFD_RELOC_ARM_TLS_GD32_FDPIC)
1045 (BFD_RELOC_ARM_TLS_LDM32_FDPIC, BFD_RELOC_ARM_TLS_IE32_FDPIC): New
1047 * elf32-arm.c (elf32_arm_howto_table_2): Add R_ARM_TLS_GD32_FDPIC,
1048 R_ARM_TLS_LDM32_FDPIC, R_ARM_TLS_IE32_FDPIC relocations.
1049 (elf32_arm_reloc_map): Add R_ARM_TLS_GD32_FDPIC,
1050 R_ARM_TLS_LDM32_FDPIC, R_ARM_TLS_IE32_FDPIC.
1051 (struct elf32_arm_link_hash_table): Update comment.
1052 (elf32_arm_final_link_relocate): Handle TLS FDPIC relocations.
1053 (IS_ARM_TLS_RELOC): Likewise.
1054 (elf32_arm_check_relocs): Likewise.
1055 (allocate_dynrelocs_for_symbol): Likewise.
1056 (elf32_arm_size_dynamic_sections): Update comment.
1057 * reloc.c: Add BFD_RELOC_ARM_TLS_GD32_FDPIC,
1058 BFD_RELOC_ARM_TLS_LDM32_FDPIC, BFD_RELOC_ARM_TLS_IE32_FDPIC.
1060 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1061 Mickaël Guêné <mickael.guene@st.com>
1063 * elf32-arm.c (elf32_arm_fdpic_plt_entry): New.
1064 (elf32_arm_create_dynamic_sections): Handle FDPIC.
1065 (elf32_arm_allocate_plt_entry): Likewise.
1066 (elf32_arm_populate_plt_entry): Likewise.
1067 (elf32_arm_output_plt_map_1): Likewise.
1069 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1070 Mickaël Guêné <mickael.guene@st.com>
1072 * elf32-arm.c (struct fdpic_local): New.
1073 (elf_arm_obj_tdata): Add local_fdpic_cnts field.
1074 (elf32_arm_local_fdpic_cnts): New.
1075 (struct fdpic_global): New.
1076 (elf32_arm_link_hash_entry): Add fdpic_cnts field.
1077 (elf32_arm_link_hash_table): Add srofixup field.
1078 (arm_elf_add_rofixup): New.
1079 (arm_elf_fill_funcdesc): New.
1080 (elf32_arm_link_hash_newfunc): Handle fdpic_cnts.
1081 (elf32_arm_allocate_local_sym_info): Likewise.
1082 (create_got_section): Create .rofixup section.
1083 (elf32_arm_copy_indirect_symbol): Handle fdpic_cnts.
1084 (bfd_elf32_arm_set_target_params): Handle FDPIC.
1085 (elf32_arm_final_link_relocate): Likewise.
1086 (elf32_arm_check_relocs): Likewise.
1087 (allocate_dynrelocs_for_symbol): Likewise.
1088 (elf32_arm_size_dynamic_sections): Likewise.
1089 (elf32_arm_finish_dynamic_sections): Likewise.
1090 (elf32_arm_output_arch_local_syms): Likewise.
1091 (elf32_arm_fdpic_omit_section_dynsym): New.
1093 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1094 Mickaël Guêné <mickael.guene@st.com>
1096 * bfd-in2.c (BFD_RELOC_ARM_GOTFUNCDESC)
1097 (BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC)
1098 (BFD_RELOC_ARM_FUNCDESC_VALUE): New.
1099 * elf32-arm.c (elf32_arm_howto_table_2): Add R_ARM_GOTFUNCDESC,
1100 R_ARM_GOTOFFFUNCDESC, R_ARM_FUNCDESC, R_ARM_FUNCDESC_VALUE.
1101 (elf32_arm_howto_from_type): Take new members of
1102 elf32_arm_howto_table_2 into account.
1103 (elf32_arm_reloc_map): Add BFD_RELOC_ARM_GOTFUNCDESC,
1104 BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC,
1105 BFD_RELOC_ARM_FUNCDESC_VALUE.
1106 * reloc.c: Add BFD_RELOC_ARM_GOTFUNCDESC,
1107 BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC,
1108 BFD_RELOC_ARM_FUNCDESC_VALUE.
1110 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1111 Mickaël Guêné <mickael.guene@st.com>
1113 * elf32-arm.c (elf32_arm_print_private_bfd_data): Support
1114 EF_ARM_PIC and ELFOSABI_ARM_FDPIC.
1115 (elf32_arm_post_process_headers): Support ELFOSABI_ARM_FDPIC.
1116 (ELF_OSABI): Define to ELFOSABI_ARM_FDPIC.
1118 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1119 Mickaël Guêné <mickael.guene@st.com>
1121 * config.bfd (arm*-*-linux-*): Add arm_elf32_fdpic_be_vec and
1122 arm_elf32_fdpic_le_vec to targ_selvecs. Accept
1123 arm*-*-uclinuxfdpiceabi.
1124 * configure.ac: Add support for arm_elf32_fdpic_be_vec and
1125 arm_elf32_fdpic_le_vec.
1126 * configure: Regenerate.
1127 * elf32-arm.c (struct elf32_arm_link_hash_table): Add fdpic_p.
1128 (elf32_arm_link_hash_table_create): Initialize fdpic_p.
1129 (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME, TARGET_BIG_SYM)
1130 (TARGET_BIG_NAME, elf_match_priority): Define for FDPIC targets.
1131 (elf32_arm_fdpic_link_hash_table_create): New.
1132 * targets.c (_bfd_target_vector): Add arm_elf32_fdpic_be_vec and
1133 arm_elf32_fdpic_le_vec.
1135 2018-04-25 Alan Modra <amodra@gmail.com>
1137 * elf-linux-core.h: Disable gcc-8 string truncation warning.
1138 * elf.c (elfcore_write_prpsinfo): Likewise.
1140 2018-04-25 Alan Modra <amodra@gmail.com>
1142 * Makefile.am: Remove arm-aout and arm-coff support.
1143 * config.bfd: Likewise.
1144 * configure.ac: Likewise.
1145 * targets.c: Likewise.
1146 * aout-arm.c: Delete.
1147 * armnetbsd.c: Delete.
1149 * Makefile.in: Regenerate.
1150 * configure: Regenerate.
1151 * po/SRC-POTFILES.in: Regenerate.
1153 2018-04-24 Nick Clifton <nickc@redhat.com>
1156 * elf.c (ignore_section_sym): Check for the output_section pointer
1157 being NULL before dereferencing it.
1160 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Check for
1161 a negative PE_DEBUG_DATA size before iterating over the debug data.
1163 2018-04-23 Alan Modra <amodra@gmail.com>
1165 * elf-linux-core.h: Revert last change.
1168 2018-04-23 Nick Clifton <nickc@redhat.com>
1171 * aoutx.h (aout_get_external_symbols): Allocate an extra byte at
1172 the end of the string table, and zero it.
1174 2018-04-23 Alan Modra <amodra@gmail.com>
1176 * elf-linux-core.h (swap_linux_prpsinfo32_ugid32_out): Disable
1177 gcc-8 string truncation warning.
1178 (swap_linux_prpsinfo32_ugid16_out): Likewise.
1179 (swap_linux_prpsinfo64_ugid32_out): Likewise.
1180 (swap_linux_prpsinfo64_ugid16_out): Likewise.
1181 * elf.c (elfcore_write_prpsinfo): Likewise.
1183 2018-04-23 Nick Clifton <nickc@redhat.com>
1186 * aoutx.h (aout_get_external_symbols): Allocate an extra byte at
1187 the end of the string table, and zero it.
1189 2018-04-20 Alan Modra <amodra@gmail.com>
1192 * elf32-hppa.c (got_relocs_needed): Add extra param to special
1193 case both dtprel and tprel relocs.
1194 (allocate_dynrelocs): Adjust conditions for got relocs.
1195 (elf32_hppa_relocate_section): Likewise for local sym got relocs.
1196 Emit dynamic relocs on TLS GOT entries for shared libraries,
1197 not when pic. Omit dynamic reloc on dtprel entry when local,
1198 and on tprel entry when local and executable.
1200 2018-04-19 Alan Modra <amodra@gmail.com>
1203 * elf32-hppa.c (elf32_hppa_size_stubs): Init "destination" to -1.
1204 (hppa_type_of_stub): Don't return a long branch stub for
1205 symbols other than those defined statically.
1207 2018-04-19 Alan Modra <amodra@gmail.com>
1209 * Makefile.am: Revert 2018-04-18 coff-mips changes.
1210 * config.bfd: Add back mips_ecoff_le_vec and mips_ecoff_be_vec
1211 to selvecs for mips targets change 2018-04-18.
1212 * configure.ac: Reinstate mips_ecoff_le_vec, mips_ecoff_be_vec
1213 and mips_ecoff_bele_vec.
1214 * targets.c: Likewise.
1215 * coff-mips.c: Resurrect.
1216 * Makefile.in: Regenerate.
1217 * configure: Regenerate.
1218 * po/SRC-POTFILES.in: Regenerate.
1220 2018-04-18 Alan Modra <amodra@gmail.com>
1222 * Makefile.am: Remove mips aout and coff support.
1223 * config.bfd: Likewise.
1224 * configure.ac: Likewise.
1225 * targets.c: Likewise.
1226 * coff-mips.c: Delete
1229 * pei-mips.c: Delete
1230 * Makefile.in: Regenerate.
1231 * configure: Regenerate.
1232 * po/SRC-POTFILES.in: Regenerate.
1234 2018-04-17 H.J. Lu <hongjiu.lu@intel.com>
1236 * elf32-i386.c (elf32_bed): Define before including
1238 * elf64-x86-64.c (elf64_bed): Define before including
1240 (elf32_bed): Define before including "elf32-target.h".
1242 2018-04-17 H.J. Lu <hongjiu.lu@intel.com>
1245 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Use a
1246 normal input file with compatible relocation.
1248 2018-04-18 Alan Modra <amodra@gmail.com>
1250 * Makefile.am: Remove support for assorted i386 aout and coff targets.
1251 * config.bfd: Likewise.
1252 * configure.ac: Likewise.
1253 * doc/bfdint.texi: Likewise.
1254 * targets.c: Likewise.
1255 * freebsd.h: Delete.
1256 * i386dynix.c: Delete.
1257 * i386freebsd.c: Delete.
1258 * i386linux.c: Delete.
1259 * i386mach3.c: Delete.
1260 * i386netbsd.c: Delete.
1261 * i386os9k.c: Delete.
1262 * Makefile.in: Regenerate.
1263 * configure: Regenerate.
1264 * po/SRC-POTFILES.in: Regenerate.
1266 2018-04-17 Andrew Sadek <andrew.sadek.se@gmail.com>
1268 Microblaze Target: PIC data text relative
1270 * bfd/reloc.c (2 new BFD relocations):
1271 BFD_RELOC_MICROBLAZE_64_TEXTPCREL &
1272 BFD_RELOC_MICROBLAZE_64_TEXTPCREL
1273 * bfd/bfd-in2.h: Regenerate
1274 * bfd/libbfd.h: Regenerate
1275 * bfd/elf32-microblaze.c (Handle new relocs): define 'HOWTO' of 3
1276 new relocs and handle them in both relocate and relax functions.
1277 (microblaze_elf_reloc_type_lookup): add mapping between for new
1279 (microblaze_elf_relocate_section): Handle new relocs in case of
1281 (microblaze_elf_relax_section): Handle new relocs for elf relaxation.
1283 2018-04-17 Nick Clifton <nickc@redhat.com>
1286 * aoutx.h (find_nearest_line): Check that the symbol name exists
1287 and is long enough, before attempting to see if it is for a .o
1289 * hash.c (bfd_hash_hash): Add an assertion that the string is not
1291 * linker.c (bfd_link_hash_lookup): Fail if the table or string are
1293 (_bfd_generic_link_add_archive_symbols): Fail if an archive entry
1297 * dwarf2.c (concat_filename): Check for a NULL table pointer.
1299 2018-04-16 Nick Clifton <nickc@redhat.com>
1302 * coffgen.c (coff_pointerize_aux): Check for an out of range
1305 2018-04-16 Alan Modra <amodra@gmail.com>
1307 * Makefile.am: Remove arm-epoc-pe support.
1308 * coff-arm.c: Likewise.
1309 * config.bfd: Likewise.
1310 * configure.ac: Likewise.
1311 * targets.c: Likewise.
1312 * epoc-pe-arm.c: Delete.
1313 * epoc-pei-arm.c: Delete.
1314 * Makefile.in: Regenerate.
1315 * configure: Regenerate.
1316 * po/SRC-POTFILES.in: Regenerate.
1318 2018-04-16 Alan Modra <amodra@gmail.com>
1320 * Makefile.am: Remove sparc-aout and sparc-coff support.
1321 * config.bfd: Likewise.
1322 * configure.ac: Likewise.
1323 * targets.c: Likewise.
1324 * aout-sparcle.c: Delete.
1326 * cf-sparclynx.c: Delete.
1327 * coff-sparc.c: Delete.
1329 * sparclinux.c: Delete.
1330 * sparclynx.c: Delete.
1331 * sparcnetbsd.c: Delete.
1333 * Makefile.in: Regenerate.
1334 * configure: Regenerate.
1335 * po/SRC-POTFILES.in: Regenerate.
1337 2018-04-16 Alan Modra <amodra@gmail.com>
1339 * Makefile.am: Remove m68k-aout and m68k-coff support.
1340 * aoutf1.h: Likewise.
1341 * aoutx.h: Likewise.
1342 * archive.c: Likewise.
1343 * bfd-in.h: Likewise.
1345 * coffcode.h: Likewise.
1346 * coffswap.h: Likewise.
1347 * config.bfd: Likewise.
1348 * configure.ac: Likewise.
1349 * configure.host: Likewise.
1350 * doc/bfd.texinfo: Likewise.
1351 * doc/bfdint.texi: Likewise.
1352 * freebsd.h: Likewise.
1353 * gen-aout.c: Likewise.
1354 * hpux-core.c: Likewise.
1355 * libaout.h: Likewise.
1356 * libbfd-in.h: Likewise.
1357 * pdp11.c: Likewise.
1358 * peicode.h: Likewise.
1359 * riscix.c: Likewise.
1360 * targets.c: Likewise.
1362 * coff-apollo.c: Delete.
1363 * coff-aux.c: Delete.
1364 * coff-m68k.c: Delete.
1365 * coff-svm68k.c: Delete.
1366 * coff-u68k.c: Delete.
1367 * hosts/delta68.h: Delete.
1368 * hosts/hp300bsd.h: Delete.
1369 * hosts/m68kaux.h: Delete.
1370 * hosts/news.h: Delete.
1371 * hp300bsd.c: Delete.
1372 * hp300hpux.c: Delete.
1373 * liboasys.h: Delete.
1374 * m68k4knetbsd.c: Delete.
1375 * m68klinux.c: Delete.
1376 * m68knetbsd.c: Delete.
1378 * versados.c: Delete.
1379 * Makefile.in: Regenerate.
1380 * bfd-in2.h: Regenerate.
1381 * configure: Regenerate.
1382 * libbfd.h: Regenerate.
1383 * po/SRC-POTFILES.in: Regenerate.
1385 2018-04-16 Alan Modra <amodra@gmail.com>
1387 * Makefile.am: Remove sh5 and sh64 support.
1388 * archures.c: Likewise.
1389 * config.bfd: Likewise.
1390 * configure.ac: Likewise.
1391 * cpu-sh.c: Likewise.
1392 * elf32-sh-relocs.h: Likewise.
1393 * elf32-sh.c: Likewise.
1394 * targets.c: Likewise.
1395 * elf32-sh64-com.c: Delete.
1396 * elf32-sh64.c: Delete.
1397 * elf32-sh64.h: Delete.
1398 * elf64-sh64.c: Delete.
1399 * Makefile.in: Regenerate.
1400 * bfd-in2.h: Regenerate.
1401 * configure: Regenerate.
1402 * po/SRC-POTFILES.in: Regenerate.
1404 2018-04-16 Alan Modra <amodra@gmail.com>
1406 * Makefile.am: Remove sh-symbianelf support.
1407 * config.bfd: Likewise.
1408 * configure.ac: Likewise.
1409 * targets.c: Likewise.
1410 * elf32-sh-symbian.c: Delete.
1411 * Makefile.in: Regenerate.
1412 * configure: Regenerate.
1413 * po/SRC-POTFILES.in: Regenerate.
1415 2018-04-16 Alan Modra <amodra@gmail.com>
1417 * Makefile.am: Remove vax-bsd and vax-ultrix support.
1418 * config.bfd: Likewise.
1419 * configure.ac: Likewise.
1420 * targets.c: Likewise.
1422 * Makefile.in: Regenerate.
1423 * configure: Regenerate.
1424 * po/SRC-POTFILES.in: Regenerate.
1426 2018-04-16 Alan Modra <amodra@gmail.com>
1428 * Makefile.am: Remove w65 support.
1429 * archures.c: Likewise.
1430 * coffcode.h: Likewise.
1431 * config.bfd: Likewise.
1432 * configure.ac: Likewise.
1433 * targets.c: Likewise.
1434 * coff-w65.c: Delete.
1435 * cpu-w65.c: Delete.
1436 * Makefile.in: Regenerate.
1437 * bfd-in2.h: Regenerate.
1438 * configure: Regenerate.
1439 * po/SRC-POTFILES.in: Regenerate.
1441 2018-04-16 Alan Modra <amodra@gmail.com>
1443 * Makefile.am: Remove we32k support.
1444 * archures.c: Likewise.
1445 * coffcode.h: Likewise.
1446 * config.bfd: Likewise.
1447 * configure.ac: Likewise.
1448 * targets.c: Likewise.
1449 * coff-we32k.c: Delete.
1450 * cpu-we32k.c: Delete.
1451 * Makefile.in: Regenerate.
1452 * bfd-in2.h: Regenerate.
1453 * configure: Regenerate.
1454 * po/SRC-POTFILES.in: Regenerate.
1456 2018-04-16 Alan Modra <amodra@gmail.com>
1458 * Makefile.am: Remove m88k support.
1459 * aoutx.h: Likewise.
1460 * archures.c: Likewise.
1461 * coffcode.h: Likewise.
1462 * coffswap.h: Likewise.
1463 * config.bfd: Likewise.
1464 * configure.ac: Likewise.
1465 * cpu-ns32k.c: Likewise.
1466 * elf32-nds32.c: Likewise.
1467 * mach-o.c: Likewise.
1468 * netbsd-core.c: Likewise.
1469 * reloc.c: Likewise.
1470 * targets.c: Likewise.
1471 * coff-m88k.c: Delete.
1472 * cpu-m88k.c: Delete.
1473 * elf32-m88k.c: Delete.
1474 * hosts/m88kmach3.h: Delete.
1475 * m88kmach3.c: Delete.
1476 * m88kopenbsd.c: Delete.
1477 * Makefile.in: Regenerate.
1478 * bfd-in2.h: Regenerate.
1479 * configure: Regenerate.
1480 * po/SRC-POTFILES.in: Regenerate.
1482 2018-04-16 Alan Modra <amodra@gmail.com>
1484 * Makefile.am: Remove i370 support.
1485 * archures.c: Likewise.
1486 * config.bfd: Likewise.
1487 * configure.ac: Likewise.
1488 * targets.c: Likewise.
1489 * cpu-i370.c: Delete.
1490 * elf32-i370.c: Delete.
1491 * Makefile.in: Regenerate.
1492 * bfd-in2.h: Regenerate.
1493 * configure: Regenerate.
1494 * po/SRC-POTFILES.in: Regenerate.
1496 2018-04-16 Alan Modra <amodra@gmail.com>
1498 * Makefile.am: Remove h8500 support.
1499 * archures.c: Likewise.
1500 * coffcode.h: Likewise.
1501 * config.bfd: Likewise.
1502 * configure.ac: Likewise.
1503 * targets.c: Likewise.
1504 * coff-h8500.c: Delete.
1505 * cpu-h8500.c: Delete.
1506 * Makefile.in: Regenerate.
1507 * bfd-in2.h: Regenerate.
1508 * configure: Regenerate.
1509 * po/SRC-POTFILES.in: Regenerate.
1511 2018-04-16 Alan Modra <amodra@gmail.com>
1513 * Makefile.am: Remove h8300-coff support.
1514 * coffcode.h: Likewise.
1515 * config.bfd: Likewise.
1516 * configure.ac: Likewise.
1517 * reloc16.c: Likewise.
1518 * targets.c: Likewise.
1519 * coff-h8300.c: Delete.
1520 * Makefile.in: Regenerate.
1521 * configure: Regenerate.
1522 * po/SRC-POTFILES.in: Regenerate.
1524 2018-04-16 Alan Modra <amodra@gmail.com>
1526 * Makefile.am: Remove IEEE 695 support.
1527 * archures.c: Likewise.
1529 * config.bfd: Likewise.
1530 * configure.ac: Likewise.
1531 * doc/bfd.texinfo: Likewise.
1532 * doc/bfdint.texi: Likewise.
1533 * doc/bfdsumm.texi: Likewise.
1534 * section.c: Likewise.
1535 * targets.c: Likewise.
1537 * libieee.h: Delete.
1538 * Makefile.in: Regenerate.
1539 * bfd-in2.h: Regenerate.
1540 * configure: Regenerate.
1541 * po/SRC-POTFILES.in: Regenerate.
1543 2018-04-16 Alan Modra <amodra@gmail.com>
1545 * config.bfd: Remove tandem support.
1547 2018-04-16 Alan Modra <amodra@gmail.com>
1549 * Makefile.am: Remove newsos3 support.
1550 * aoutx.h: Likewise.
1551 * config.bfd: Likewise.
1552 * configure.ac: Likewise.
1553 * targets.c: Likewise.
1554 * newsos3.c: Delete.
1555 * Makefile.in: Regenerate.
1556 * configure: Regenerate.
1557 * po/SRC-POTFILES.in: Regenerate.
1559 2018-04-16 Alan Modra <amodra@gmail.com>
1561 * Makefile.am: Remove netware support.
1562 * bfd-in.h: Likewise.
1564 * config.bfd: Likewise.
1565 * configure.ac: Likewise.
1566 * doc/bfdint.texi: Likewise.
1567 * ecoff.c: Likewise.
1568 * targets.c: Likewise.
1570 * nlm-target.h: Delete.
1572 * nlm32-alpha.c: Delete.
1573 * nlm32-i386.c: Delete.
1574 * nlm32-ppc.c: Delete.
1575 * nlm32-sparc.c: Delete.
1578 * nlmcode.h: Delete.
1579 * nlmswap.h: Delete.
1580 * Makefile.in: Regenerate.
1581 * bfd-in2.h: Regenerate.
1582 * configure: Regenerate.
1583 * po/SRC-POTFILES.in: Regenerate.
1585 2018-04-16 Alan Modra <amodra@gmail.com>
1587 * archures.c: Remove tahoe support.
1588 * config.bfd: Likewise.
1589 * configure.ac: Likewise.
1590 * hosts/tahoe.h: Delete.
1591 * bfd-in2.h: Regenerate.
1592 * configure: Regenerate.
1594 2018-04-14 Alan Modra <amodra@gmail.com>
1596 * elf-bfd.h (struct elf_backend_data): Add relropagesize.
1597 * elfxx-target.h (ELF_RELROPAGESIZE): Provide default and
1599 (elfNN_bed): Init relropagesize.
1600 * bfd.c (bfd_emul_get_commonpagesize): Add boolean param to
1601 select relropagesize.
1602 * elf32-ppc.c (ELF_COMMONPAGESIZE): Define as 0x1000.
1603 (ELF_RELROPAGESIZE): Define as ELF_MAXPAGESIZE.
1604 (ELF_MINPAGESIZE): Don't define.
1605 * elf64-ppc.c (ELF_COMMONPAGESIZE): Define as 0x1000.
1606 (ELF_RELROPAGESIZE): Define as ELF_MAXPAGESIZE.
1607 * bfd-in2.h: Regenerate.
1609 2018-04-14 Alan Modra <amodra@gmail.com>
1611 * elf32-ppc.c (ELF_MAXPAGESIZE, ELF_COMMONPAGESIZE): Don't depend
1612 on __QNXTARGET__ define.
1614 2018-04-14 Alan Modra <amodra@gmail.com>
1616 * config.bfd: Add powerpc-*-lynxos* and powerpc-*-windiss*
1619 2018-04-11 Alan Modra <amodra@gmail.com>
1621 * aout-adobe.c: Delete.
1623 * coff-i860.c: Delete.
1624 * coff-i960.c: Delete.
1625 * cpu-i860.c: Delete.
1626 * cpu-i960.c: Delete.
1627 * elf32-i860.c: Delete.
1628 * elf32-i960.c: Delete.
1629 * hosts/i860mach3.h: Delete.
1630 * Makefile.am: Remove i860, i960, bout, and adobe support.
1631 * archures.c: Remove i860 and i960 support.
1632 * coffcode.h: Likewise.
1633 * reloc.c: Likewise.
1634 * aoutx.h: Comment updates.
1635 * archive.c: Remove BOUT and i960 support.
1636 * bfd.c: Remove BOUT support.
1637 * coffswap.h: Remove i960 support.
1638 * config.bfd: Remove i860, i960 and adobe targets.
1639 * configure.ac: Remove adode, bout, i860, i960, icoff targets.
1640 * targets.c: Likewise.
1641 * ieee.c: Remove i960 support.
1642 * mach-o.c: Remove i860 support.
1643 * Makefile.in: Regenerate.
1644 * bfd-in2.h: Regenerate.
1645 * configure: Regenerate.
1646 * libbfd.h: Regenerate.
1647 * po/SRC-POTFILES.in: Regenerate.
1649 2018-04-09 Maciej W. Rozycki <macro@mips.com>
1651 * elf64-mips.c (mips_elf64_write_rel): Handle a NULL BFD pointer
1652 in the BFD symbol referred by the relocation.
1653 (mips_elf64_write_rela): Likewise.
1655 2018-04-09 Maciej W. Rozycki <macro@mips.com>
1657 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Issue an
1658 error for out-of-range `r_sym' values.
1660 2018-04-09 Alan Modra <amodra@gmail.com>
1662 * elf64-ppc.c (struct _ppc64_elf_section_data): Add has_pltcall field.
1663 (struct ppc_link_hash_table): Add can_convert_all_inline_plt.
1664 (ppc64_elf_check_relocs): Set has_pltcall.
1665 (ppc64_elf_adjust_dynamic_symbol): Discard some PLT entries.
1666 (ppc64_elf_inline_plt): New function.
1667 (ppc64_elf_size_dynamic_sections): Discard some PLT entries for locals.
1668 * elf64-ppc.h (ppc64_elf_inline_plt): Declare.
1669 * elf32-ppc.c (has_pltcall): Define.
1670 (struct ppc_elf_link_hash_table): Add can_convert_all_inline_plt.
1671 (ppc_elf_check_relocs): Set has_pltcall.
1672 (ppc_elf_inline_plt): New function.
1673 (ppc_elf_adjust_dynamic_symbol): Discard some PLT entries.
1674 (ppc_elf_size_dynamic_sections): Likewise.
1675 * elf32-ppc.h (ppc_elf_inline_plt): Declare.
1677 2018-04-09 Alan Modra <amodra@gmail.com>
1679 * elf32-ppc.c (ppc_elf_howto_raw): Add PLTSEQ and PLTCALL howtos.
1680 (is_plt_seq_reloc): New function.
1681 (ppc_elf_check_relocs): Handle PLTSEQ and PLTCALL relocs.
1682 (ppc_elf_tls_optimize): Handle inline plt call sequence.
1683 (ppc_elf_relax_section): Handle PLTCALL reloc.
1684 (ppc_elf_relocate_section): Nop out inline plt call sequence when
1686 * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_PLTSEQ and
1687 R_PPC64_PLTCALL entries. Comment R_PPC64_TOCSAVE.
1688 (has_tls_get_addr_call): Correct comment.
1689 (is_branch_reloc): Add PLTCALL.
1690 (is_plt_seq_reloc): New function.
1691 (ppc64_elf_check_relocs): Handle PLT16_LO_DS reloc. Set
1692 has_tls_reloc for R_PPC64_TLSGD and R_PPC64_TLSLD. Create plt
1693 entry for R_PPC64_PLTCALL.
1694 (ppc64_elf_tls_optimize): Handle inline plt call sequence.
1695 (ppc_type_of_stub): Handle PLTCALL reloc.
1696 (toc_adjusting_stub_needed): Likewise.
1697 (ppc64_elf_relocate_section): Set "can_plt_call" for PLTCALL
1698 reloc insn. Nop out inline plt call sequence when resolving
1699 locally. Handle __tls_get_addr inline plt call optimization.
1701 2018-04-09 Alan Modra <amodra@gmail.com>
1703 * elf64-ppc.c (LOCAL_PLT_ENTRY_SIZE): Define.
1704 (struct ppc_stub_hash_entry): Add symtype field.
1706 (struct ppc_link_hash_table): Add pltlocal and relpltlocal.
1707 (create_linkage_sections): Create pltlocal and relpltlocal.
1708 (ppc64_elf_check_relocs): Allow PLT relocs on local symbols.
1710 (ppc64_elf_adjust_dynamic_symbol): Keep PLT entries for inline calls.
1711 (allocate_dynrelocs): Allocate pltlocal and relpltlocal.
1712 (ppc64_elf_size_dynamic_sections): Size pltlocal and relpltlocal.
1713 Keep PLT entries for inline calls against locals.
1714 (ppc_build_one_stub): Use pltlocal as appropriate.
1715 (ppc_size_one_stub): Likewise.
1716 (ppc64_elf_size_stubs): Set symtype.
1717 (build_global_entry_stubs_and_plt): Init pltlocal and write
1718 relpltlocal for globals.
1719 (write_plt_relocs_for_local_syms): Likewise for local syms.
1720 (ppc64_elf_relocate_section): Support PLT for local syms.
1721 * elf32-ppc.c (PLT_KEEP): Define.
1722 (struct ppc_elf_link_hash_table): Add pltlocal and relpltlocal.
1723 (ppc_elf_create_glink): Create pltlocal and relpltlocal.
1724 (ppc_elf_check_relocs): Allow PLT relocs on local symbols.
1725 Set PLT_KEEP. Adjust update_local_sym_info call.
1726 (ppc_elf_adjust_dynamic_symbol): Keep PLT entries for inline calls.
1727 (allocate_dynrelocs): Allocate pltlocal and relpltlocal.
1728 (ppc_elf_size_dynamic_sections): Size pltlocal and relpltlocal.
1729 (ppc_elf_relocate_section): Support PLT16 relocs for local syms.
1730 (write_global_sym_plt): Init pltlocal and write relpltlocal.
1731 (ppc_finish_symbols): Likewise for locals.
1733 2018-04-09 Alan Modra <amodra@gmail.com>
1735 * elf64-ppc.c (ppc_build_one_stub): Move output of PLT relocs
1736 for local symbols to..
1737 (write_plt_relocs_for_local_syms): ..here. New function.
1738 (ppc64_elf_finish_dynamic_symbol): Move output of PLT relocs for
1740 (build_global_entry_stubs_and_plt): ..here. Rename from
1741 build_global_entry_stubs.
1742 (ppc64_elf_build_stubs): Always call build_global_entry_stubs_and_plt.
1743 Call write_plt_relocs_for_local_syms.
1744 * elf32-ppc.c (get_sym_h): New function.
1745 (ppc_elf_relax_section): Use get_sym_h.
1746 (ppc_elf_relocate_section): Move output of PLT relocs and glink
1747 stubs for local symbols to..
1748 (ppc_finish_symbols): ..here. New function.
1749 (ppc_elf_finish_dynamic_symbol): Move output of PLT relocs for
1751 (write_global_sym_plt): ..here. New function.
1752 * elf32-ppc.h (ppc_elf_modify_segment_map): Delete attribute.
1753 (ppc_finish_symbols): Declare.
1755 2018-04-09 Alan Modra <amodra@gmail.com>
1757 * elf32-ppc.c (ppc_elf_check_relocs): Handle PLT16 relocs.
1758 (ppc_elf_relocate_section): Likewise.
1759 * elf64-ppc.c (ppc64_elf_check_relocs): Handle PLT16_LO_DS.
1760 (ppc64_elf_relocate_section): Likewise. Correct PLT16
1761 resolution to plt entry relative to toc pointer.
1763 2018-04-09 Alan Modra <amodra@gmail.com>
1765 * elf64-ppc.c (TLS_TLS, TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL,
1766 TLS_TPRELGD, TLS_EXPLICIT): Renumber. Test TLS_TLS throughout
1767 file when other TLS flags are tested in a mask.
1768 (TLS_MARK, NON_GOT): Define.
1769 (PLT_IFUNC): Redefine, and test TLS_TLS throughout file as well.
1770 (update_local_sym_info): Don't create got entry when NON_GOT.
1771 (ppc64_elf_check_relocs): Pass NON_GOT with PLT_IFUNC.
1773 (get_tls_mask): Do toc lookup if tls_mask is just TLS_MARK.
1774 (ppc64_elf_relocate_section): Likewise.
1775 (ppc64_elf_tls_optimize): Don't attempt to optimize indirect
1776 __tls_get_addr calls lacking a marker reloc.
1777 * elf32-ppc.c (TLS_TLS, TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL,
1778 TLS_TPRELGD): Renumber. Update comment.
1779 (TLS_MARK, NON_GOT): Define.
1780 (PLT_IFUNC): Redefine, and test TLS_TLS throughout file as well.
1781 (update_local_sym_info): Don't create got entry when NON_GOT.
1782 (ppc_elf_check_relocs): Pass NON_GOT with PLT_IFUNC.
1784 (ppc_elf_tls_optimize): Don't attempt to optimize indirect
1785 __tls_get_addr calls lacking a marker reloc.
1787 2018-04-06 H.J. Lu <hongjiu.lu@intel.com>
1789 * elf64-x86-64.c (elf_x86_64_info_to_howto): Don't mask out
1790 R_X86_64_converted_reloc_bit.
1792 2018-04-05 H.J. Lu <hongjiu.lu@intel.com>
1795 * configure: Regenerated.
1797 2018-04-05 Alan Modra <amodra@gmail.com>
1799 * elf-hppa.h (elf_hppa_info_to_howto): Init howto to NULL.
1800 (elf_hppa_info_to_howto_rel): Likewise.
1802 2018-04-04 Maciej W. Rozycki <macro@mips.com>
1804 * elf-hppa.h (elf_hppa_info_to_howto): Also return
1805 unsuccessfully for unimplemented relocations.
1806 (elf_hppa_info_to_howto_rel): Likewise.
1808 2018-04-04 Maciej W. Rozycki <macro@mips.com>
1810 * elf32-i860.c (lookup_howto): Add `abfd' parameter. Set the
1811 `bfd_error_bad_value' error and call `_bfd_error_handler' on a
1812 howto lookup failure.
1813 (elf32_i860_reloc_type_lookup): Adjust `lookup_howto' call
1815 (elf32_i860_info_to_howto_rela): Likewise.
1816 (elf32_i860_relocate_splitn): Likewise.
1817 (elf32_i860_relocate_pc16): Likewise.
1818 (elf32_i860_relocate_pc26): Likewise.
1819 (elf32_i860_relocate_section): Likewise.
1821 2018-04-04 Maciej W. Rozycki <macro@mips.com>
1823 * elf32-visium.c (visium_info_to_howto_rela): Correct the range
1824 check for `visium_elf_howto_table' table access.
1826 2018-04-04 Maciej W. Rozycki <macro@mips.com>
1828 * elf32-iq2000.c (iq2000_info_to_howto_rela): Correct the range
1829 check for `iq2000_elf_howto_table' table access.
1831 2018-04-04 Maciej W. Rozycki <macro@mips.com>
1833 * elf32-frv.c (frv_info_to_howto_rela): Correct the range check
1834 for `elf32_frv_howto_table' table access.
1836 2018-04-04 Maciej W. Rozycki <macro@mips.com>
1838 * elf32-mips.c (mips_elf32_rtype_to_howto): Also return
1839 unsuccessfully for placeholder howtos.
1840 * elf64-mips.c (mips_elf64_rtype_to_howto): Likewise.
1841 * elfn32-mips.c (mips_elf_n32_rtype_to_howto): Likewise.
1843 2018-03-29 Maciej W. Rozycki <macro@mips.com>
1845 * elf32-mips.c (mips_info_to_howto_rel): Remove the calls to
1846 `_bfd_error_handler' and to set the `bfd_error_bad_value' error.
1848 2018-03-28 Maciej W. Rozycki <macro@mips.com>
1850 * elf-hppa.h (elf_hppa_info_to_howto_rel): Remove
1851 ATTRIBUTE_UNUSED from `abfd'.
1853 2018-03-28 Maciej W. Rozycki <macro@mips.com>
1855 * elf-hppa.h (elf_hppa_info_to_howto_rel): Correct
1856 `_bfd_error_handler' call formatting.
1858 2018-03-28 Maciej W. Rozycki <macro@mips.com>
1860 * elf32-mips.c (mips_info_to_howto_rel): Call
1861 `mips_elf32_rtype_to_howto' directly rather than via
1862 `->elf_backend_mips_rtype_to_howto'.
1864 2018-03-28 Renlin Li <renlin.li@arm.com>
1867 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Add cases for
1868 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12,
1869 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
1870 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12,
1871 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
1872 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12,
1873 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
1874 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12,
1875 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
1876 (elfNN_aarch64_final_link_relocate): Support new relocations.
1877 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Support new
1879 (_bfd_aarch64_elf_resolve_relocation): Support new relocations.
1881 2018-03-28 Renlin Li <renlin.li@arm.com>
1884 * reloc.c: Add BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12
1885 BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12_NC,
1886 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12,
1887 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
1888 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12,
1889 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
1890 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12,
1891 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
1892 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12,
1893 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
1894 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Add table entry for
1895 TLSLE_LDST16_TPREL_LO12,
1896 TLSLE_LDST16_TPREL_LO12_NC,
1897 TLSLE_LDST32_TPREL_LO12,
1898 TLSLE_LDST32_TPREL_LO12_NC,
1899 TLSLE_LDST64_TPREL_LO12,
1900 TLSLE_LDST64_TPREL_LO12_NC,
1901 TLSLE_LDST8_TPREL_LO12,
1902 TLSLE_LDST8_TPREL_LO12_NC.
1903 * bfd-in2.h: Regenerated.
1904 * libbfd.h: Regenerated.
1906 2018-03-28 Eric Botcazou <ebotcazou@adacore.com>
1909 * elfxx-sparc.c (struct _bfd_sparc_elf_link_hash_entry): Add new flag
1910 has_old_style_got_reloc.
1911 (_bfd_sparc_elf_check_relocs) <GOT relocations>: Set it for old-style
1912 relocations. Fix a couple of long lines.
1913 (_bfd_sparc_elf_relocate_section) <R_SPARC_GOTDATA_OP>: Do not generate
1914 a R_SPARC_NONE for the GOT slot if the symbol is also subject to old-style
1917 2018-03-25 H.J. Lu <hongjiu.lu@intel.com>
1920 * elf64-x86-64.c (elf_x86_64_finish_dynamic_sections): Add
1921 ENDBR64 to the TLSDESC PLT entry.
1923 2018-03-21 Alan Modra <amodra@gmail.com>
1925 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Trim uninteresting
1926 symbols. Use size_t counts. Delete redundant opd test.
1928 2018-03-21 Alan Modra <amodra@gmail.com>
1930 * elf32-ppc.c (ppc_elf_tls_optimize): Delete locsyms.
1932 2018-03-21 Alan Modra <amodra@gmail.com>
1934 * elf32-ppc.c (struct ppc_elf_link_hash_entry): Make tls_mask
1936 (update_local_sym_info): Likewise for local_got_tls_masks.
1937 (ppc_elf_tls_optimize): Likewise for lgot_masks.
1939 2018-03-21 Alan Modra <amodra@gmail.com>
1941 * elf64-ppc.c (ppc_size_one_stub): Fix comment typo.
1942 (ppc64_elf_layout_multitoc): Allocate relocs for tprel as we
1943 do in size_dynamic_sections.
1945 2018-03-21 Alan Modra <amodra@gmail.com>
1947 * elf64-ppc.c (ppc64_elf_relocate_section): Don't access rel[1]
1948 without first checking array bounds.
1949 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1951 2018-03-20 H.J. Lu <hongjiu.lu@intel.com>
1954 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Set
1955 non_ir_ref_dynamic if a symbol is made dynamic by --dynamic-list.
1957 2018-03-19 Nick Clifton <nickc@redhat.com>
1959 * po/es.po: Updated Spanish translation.
1961 2018-03-15 Max Filippov <jcmvbkbc@gmail.com>
1963 * elf32-xtensa.c (xlate_map_entry): Change types of address
1964 fields from 'unsigned' to 'bfd_vma'.
1965 (xlate_offset_with_removed_text): Use struct xlate_map_entry as
1966 the key argument to bsearch. Allow offsets past the end of a
1967 section, use the last map entry for translation of such offsets.
1969 2018-03-15 Kuan-Lin Chen <kuanlinchentw@gmail.com>
1971 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Removed.
1972 Not support the target feature.
1973 (nds32_elf_ex9_itb_base): Likewise.
1974 (nds32_elf_ex9_import_table): Likewise.
1975 (nds32_elf_ex9_finish): Likewise.
1976 (nds32_elf_ex9_reloc_jmp): Likewise.
1977 (nds32_elf_get_insn_with_reg): Likewise.
1978 (nds32_get_local_syms): Likewise.
1979 (nds32_elf_ex9_replace_instruction): Likewise.
1980 (nds32_elf_ifc_calc): Likewise.
1981 (nds32_elf_ifc_finish): Likewise.
1982 (nds32_elf_ifc_replace): Likewise.
1983 (nds32_elf_ifc_reloc): Likewise.
1985 2018-03-14 Alan Modra <amodra@gmail.com>
1987 * elf64-ppc.c (sfpr_define): Adjust for stub_sec size having
1988 sfpr size added before defining alias symbols.
1989 (ppc64_elf_build_stubs): Add stub section padding before
1990 copying sfpr contents and defining save/restore alias symbols.
1992 2018-03-14 H.J. Lu <hongjiu.lu@intel.com>
1995 * elflink.c (elf_gc_mark_debug_section): Also check the local
1996 debug definition section.
1998 2018-03-13 Nick Clifton <nickc@redhat.com>
2001 * pei-x86_64.c (pex64_get_unwind_info): Change to a boolean
2002 function. Add an end address parameter. Check access of the data
2003 pointer to make sure that they do not extend beyond the end
2004 address. Return FALSE if any check fails. Add the end address
2005 pointer to the ui structure.
2006 (pex64_xdata_print_uwd_codes): Check accesses of the raw unwind
2007 codes to make sure that they do not extend beyond the end address
2008 pointer. Print an error message and return immediately if any
2011 2018-03-09 Nick Clifton <nickc@redhat.com>
2013 * elf64-s390.c (elf_s390_relocate_section): Move check for
2014 relocations against non-allocated sections to before the code that
2015 handles ifunc relocations.
2016 * elf32-s390.c (elf_s390_relocate_section): Likewise.
2017 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Treat
2018 relocs against IFUNC symbols in non-allocated sections as relocs
2019 against FUNC symbols.
2020 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
2022 2018-03-08 H.J. Lu <hongjiu.lu@intel.com>
2025 * elf32-i386.c (elf_i386_relocate_section): Treat relocation
2026 against IFUNC symbol in SHT_NOTE section without SHF_ALLOC as
2027 relocation against FUNC symbol.
2028 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
2030 2018-03-07 Renlin Li <renlin.li@arm.com>
2033 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Check absolute
2034 symbol, and don't emit relocation in specific case.
2036 2018-03-07 Alan Modra <amodra@gmail.com>
2038 * elf64-mips.c (mips_elf64_rtype_to_howto): Return NULL on error.
2039 (mips_elf64_slurp_one_reloc_table): Pass on error.
2041 2018-03-03 James Cowgill <james.cowgill@mips.com>
2042 Maciej W. Rozycki <macro@mips.com>
2045 * elfxx-mips.c (mips_elf_calculate_relocation): Only return
2046 after calling `undefined_symbol' hook if this is an error
2047 condition. Assume the value of 0 for the symbol requested
2050 2018-03-02 Jim Wilson <jimw@sifive.com>
2053 * elfnn-aarch64.c (_bfd_aarch64_resize_stubs): Add 8 bytes for branch
2054 and nop instead of 4.
2055 (elfNN_arch64_build_stubs): Add nop after branch. Increase size by
2058 2018-03-01 Jim Wilson <jimw@sifive.com>
2061 * elfnn-riscv.c (riscv_relax_delete_bytes): When adjust st_size, use
2062 else if instead of if.
2064 2018-03-01 Alan Modra <amodra@gmail.com>
2066 * elf32-ft32.c (ft32_info_to_howto_rela): Correct range test.
2068 2018-02-28 Alan Modra <amodra@gmail.com>
2071 * aoutx.h (swap_std_reloc_in): Correct r_index bound check.
2073 2018-02-28 Nick Clifton <nickc@redhat.com>
2077 * dwarf2.c (read_n_bytes): Replace size parameter with dwarf_block
2078 pointer. Drop unused abfd parameter. Check the size of the block
2079 before initialising the data field. Return the end pointer if the
2081 (read_attribute_value): Adjust invocations of read_n_bytes.
2084 * dwarf1.c (parse_die): Check the length of form blocks before
2085 advancing the data pointer.
2087 2018-02-28 Alan Modra <amodra@gmail.com>
2090 * aoutx.h (translate_symbol_table): Print an error message and set
2091 bfd_error on finding an invalid name string offset.
2093 2018-02-27 H.J. Lu <hongjiu.lu@intel.com>
2095 * config.in: Regenerated.
2096 * configure: Likewise.
2097 * configure.ac: Add --enable-separate-code.
2098 (DEFAULT_LD_Z_SEPARATE_CODE): New AC_DEFINE_UNQUOTED. Default
2099 to 1 for Linux/x86 targets,
2100 * elf64-x86-64.c (ELF_MAXPAGESIZE): Set to 0x1000 if
2101 DEFAULT_LD_Z_SEPARATE_CODE is 1.
2103 2018-02-27 Nick Clifton <nickc@redhat.com>
2105 * aout-cris.c (swap_ext_reloc_out): Standadize error/warning
2107 * elf-hppa.h (elf_hppa_info_to_howto_rel): Likewise.
2108 * elf32-i386.c (elf_i386_reloc_type_lookup): Likewise.
2109 * elf32-xtensa.c (elf_xtensa_reloc_type_lookup): Likewise.
2110 * elf64-ppc.c (ppc64_elf_reloc_type_lookup): Likewise.
2111 * elf64-s390.c (elf_s390_reloc_type_lookup): Likewise.
2112 * elf64-sh64.c (sh_elf64_info_to_howto): Likewise.
2113 * elfxx-ia64.c (ia64_elf_reloc_type_lookup): Likewise.
2114 * elfxx-sparc.c (_bfd_sparc_elf_reloc_type_lookup): Likewise.
2115 * elfxx-tilegx.c (tilegx_reloc_type_lookup): Likewise.
2118 * elf-bfd.h (struct elf_backend_data): Change the return type of
2119 the elf_info_to_howto and elf_info_to_howto_rel function pointers
2121 * elfcode.h (elf_slurp_reloc_table_from_section): Check the return
2122 value from the info_to_howto function and fail if that function
2124 * elf32-h8300.c (elf32_h8_relocate_section): Check return value
2125 from the info_to_howto function.
2126 (elf32_h8_relax_section): Likewise.
2127 * elf32-lm32.c (lm32_elf_relocate_section): Likewise.
2128 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
2129 * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise.
2130 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
2131 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
2132 * elf64-ia64-vms.c (elf64_ia64_relocate_section): Likewise.
2133 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Likewise.
2134 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
2135 * elfnn-ia64.c (elfNN_ia64_relocate_section): Likewise.
2136 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
2137 (riscv_elf_relocate_section): Likewise.
2138 * elf-hppa.h (elf_hppa_info_to_howto): Change return type to
2139 bfd_boolean. Issue an error message, set an error value and
2140 return FALSE if the reloc is not recognized.
2141 (elf_hppa_info_to_howto_rel): Likewise.
2142 * elf-m10200.c (mn10200_info_to_howto): Likewise.
2143 * elf-m10300.c (mn10300_info_to_howto): Likewise.
2144 * elf.c (_bfd_elf_no_info_to_howto): Likewise.
2145 * elf32-arc.c (arc_info_to_howto_rel): Likewise.
2146 * elf32-arm.c (elf32_arm_info_to_howto): Likewise.
2147 * elf32-avr.c (avr_info_to_howto_rela): Likewise.
2148 * elf32-bfin.c (bfin_info_to_howto): Likewise.
2149 * elf32-cr16.c (elf_cr16_info_to_howto): Likewise.
2150 * elf32-cr16c.c (elf_cr16c_info_to_howto): Likewise.
2151 * elf32-cris.c (elf_cr16c_info_to_howto_rel)
2152 (cris_info_to_howto_rela): Likewise.
2153 * elf32-crx.c (elf_crx_info_to_howto): Likewise.
2154 * elf32-d10v.c (d10v_info_to_howto_rel): Likewise.
2155 * elf32-d30v.c (d30v_info_to_howto_rel, d30v_info_to_howto_rela):
2157 * elf32-dlx.c (dlx_rtype_to_howto, elf32_dlx_info_to_howto)
2158 (elf32_dlx_info_to_howto_rel): Likewise.
2159 * elf32-epiphany.c (epiphany_info_to_howto_rela): Likewise.
2160 * elf32-fr30.c (fr30_info_to_howto_rela): Likewise.
2161 * elf32-frv.c (frv_info_to_howto_rela)
2162 (frvfdpic_info_to_howto_rel): Likewise.
2163 * elf32-ft32.c (ft32_info_to_howto_rela): Likewise.
2164 * elf32-gen.c (elf_generic_info_to_howto)
2165 (elf_generic_info_to_howto_rel): Likewise.
2166 * elf32-h8300.c (elf32_h8_info_to_howto)
2167 (elf32_h8_info_to_howto_rel): Likewise.
2168 * elf32-i370.c (i370_elf_info_to_howto): Likewise.
2169 * elf32-i386.c (elf_i386_reloc_type_lookup)
2170 (elf_i386_rtype_to_howto, elf_i386_info_to_howto_rel): Likewise.
2171 * elf32-i860.c (lookup_howto, elf32_i860_info_to_howto_rela):
2173 * elf32-i960.c (elf32_i960_info_to_howto_rel): Likewise.
2174 * elf32-ip2k.c (ip2k_info_to_howto_rela): Likewise.
2175 * elf32-iq2000.c (iq2000_info_to_howto_rela): Likewise.
2176 * elf32-lm32.c (lm32_info_to_howto_rela): Likewise.
2177 * elf32-m32c.c (m32c_info_to_howto_rela): Likewise.
2178 * elf32-m32r.c (m32r_info_to_howto_rel, m32r_info_to_howto):
2180 * elf32-m68hc11.c (m68hc11_info_to_howto_rel): Likewise.
2181 * elf32-m68hc12.c (m68hc11_info_to_howto_rel): Likewise.
2182 * elf32-m68k.c (rtype_to_howto): Likewise.
2183 * elf32-mcore.c (mcore_elf_info_to_howto): Likewise.
2184 * elf32-mep.c (mep_info_to_howto_rela): Likewise.
2185 * elf32-metag.c (metag_info_to_howto_rela): Likewise.
2186 * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise.
2187 * elf32-mips.c (mips_info_to_howto_rel, mips_info_to_howto_rela):
2189 * elf32-moxie.c (moxie_info_to_howto_rela): Likewise.
2190 * elf32-msp430.c (msp430_info_to_howto_rela): Likewise.
2191 * elf32-mt.c (mt_info_to_howto_rela): Likewise.
2192 * elf32-nds32.c (nds32_info_to_howto_rel, nds32_info_to_howto):
2194 * elf32-nios2.c (nios2_elf32_info_to_howto): Likewise.
2195 * elf32-or1k.c (or1k_info_to_howto_rela): Likewise.
2196 * elf32-pj.c (pj_elf_info_to_howto): Likewise.
2197 * elf32-ppc.c (ppc_elf_info_to_howto): Likewise.
2198 * elf32-pru.c (pru_elf32_info_to_howto): Likewise.
2199 * elf32-rl78.c (rl78_info_to_howto_rela): Likewise.
2200 * elf32-rx.c (rx_info_to_howto_rela): Likewise.
2201 * elf32-s390.c (elf_s390_info_to_howto): Likewise.
2202 * elf32-score.c (s3_bfd_score_info_to_howto)
2203 (_bfd_score_info_to_howto): Likewise.
2204 * elf32-score7.c (s7_bfd_score_info_to_howto): Likewise.
2205 * elf32-sh.c (sh_elf_info_to_howto): Likewise.
2206 * elf32-spu.c (spu_elf_info_to_howto): Likewise.
2207 * elf32-tic6x.c (elf32_tic6x_info_to_howto)
2208 (elf32_tic6x_info_to_howto_rel): Likewise.
2209 * elf32-tilepro.c (tilepro_info_to_howto_rela): Likewise.
2210 * elf32-v850.c (v850_elf_info_to_howto_rel)
2211 (v850_elf_info_to_howto_rela, v800_elf_info_to_howto): Likewise.
2212 * elf32-vax.c (rtype_to_howto): Likewise.
2213 * elf32-visium.c (visium_info_to_howto_rela): Likewise.
2214 * elf32-wasm32.c (elf32_wasm32_rtype_to_howto)
2215 (elf32_wasm32_info_to_howto_rela): Likewise.
2216 * elf32-xc16x.c (elf32_xc16x_info_to_howto): Likewise.
2217 * elf32-xgate.c (xgate_info_to_howto_rel): Likewise.
2218 * elf32-xstormy16.c (xstormy16_info_to_howto_rela): Likewise.
2219 * elf32-xtensa.c (elf_xtensa_info_to_howto_rela): Likewise.
2220 * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise.
2221 * elf64-gen.c (elf_generic_info_to_howto)
2222 (elf_generic_info_to_howto_rel): Likewise.
2223 * elf64-ia64-vms.c (elf64_ia64_info_to_howto): Likewise.
2224 * elf64-mips.c (mips_elf64_info_to_howto_rela): Likewise.
2225 * elf64-mmix.c (mmix_info_to_howto_rela): Likewise.
2226 * elf64-ppc.c (ppc64_elf_info_to_howto): Likewise.
2227 * elf64-s390.c (elf_s390_reloc_type_lookup): Likewise.
2228 * elf64-sh64.c (elf_s390_info_to_howto, sh_elf64_info_to_howto):
2230 * elf64-x86-64.c (elf_x86_64_info_to_howto): Likewise.
2231 * elfn32-mips.c (mips_info_to_howto_rel, mips_info_to_howto_rela):
2233 * elfnn-aarch64.c (elfNN_aarch64_info_to_howto): Likewise.
2234 * elfnn-ia64.c (elfNN_ia64_info_to_howto): Likewise.
2235 * elfnn-riscv.c (riscv_info_to_howto_rela): Likewise.
2236 * elfxx-ia64.c (ia64_elf_reloc_type_lookup): Likewise.
2237 * elfxx-sparc.c (_bfd_sparc_elf_info_to_howto): Likewise.
2238 * elfxx-tilegx.c (tilegx_info_to_howto_rela): Likewise.
2239 * elf32-score.h (s7_bfd_score_info_to_howto): Update prototype.
2240 * elfxx-sparc.h (_bfd_sparc_elf_info_to_howto): Update prototype.
2241 * elfxx-tilegx.h (tilegx_info_to_howto_rela): Update prototype.
2242 * elfxx-target.h (elf_info_to_howto, elf_info_to_howto_rel):
2245 2018-02-26 Jim Wilson <jimw@sifive.com>
2246 Stephan Schreiber <info@fs-driver.org>
2249 * elfnn-ia64.c (elfNN_ia64_relax_section): After ia64_elf_relax_brl
2250 call, set changed_contents and changed_relocs. Likewise after
2251 successful ia64_elf_relax_br call.
2253 2018-02-26 Alan Modra <amodra@gmail.com>
2255 * elf.c (assign_file_positions_except_relocs): Don't segfault
2256 when actual number of phdrs is less than allocated. Delete
2257 outdated comment. Formatting.
2259 2018-02-26 Alan Modra <amodra@gmail.com>
2261 * elf-m10300.c, * elf-s390-common.c, * elf32-arc.c, * elf32-cris.c,
2262 * elf32-dlx.c, * elf32-frv.c, * elf32-i370.c, * elf32-lm32.c,
2263 * elf32-m32r.c, * elf32-m68hc1x.c, * elf32-m68k.c,
2264 * elf32-microblaze.c, * elf32-msp430.c, * elf32-nds32.c,
2265 * elf32-nios2.c, * elf32-or1k.c, * elf32-rl78.c, * elf32-rx.c,
2266 * elf32-score.c, * elf32-score7.c, * elf32-sh-symbian.c,
2267 * elf32-sh.c, * elf32-spu.c, * elf32-v850.c, * elf32-xtensa.c,
2268 * elf64-alpha.c, * elf64-ia64-vms.c, * elf64-mmix.c,
2269 * elf64-sh64.c, * elf64-sparc.c, * elfnn-ia64.c, * elfxx-tilegx.c,
2270 * mmo.c, * osf-core.c, * srec.c, * vms-alpha.c: Standardize
2271 error/warning messages.
2273 2018-02-26 Alan Modra <amodra@gmail.com>
2275 * archive.c, * bfd.c, * linker.c, * reloc.c, * stabs.c,
2276 * syms.c: Standardize error/warning messages.
2278 2018-02-26 Alan Modra <amodra@gmail.com>
2280 * aout-adobe.c, * aout-cris.c, * i386linux.c, * m68klinux.c,
2281 * sparclinux.c, * coff-alpha.c, * coff-arm.c, * coff-mcore.c,
2282 * coffcode.h, * coffgen.c, * cofflink.c, * ecoff.c, * pe-mips.c,
2283 * peXXigen.c, * peicode.h: Standardize error/warning messages.
2285 2018-02-26 Alan Modra <amodra@gmail.com>
2287 * elf32-arm.c, * elfnn-aarch64.c: Standardize error/warning messages.
2289 2018-02-26 Alan Modra <amodra@gmail.com>
2291 * elfxx-mips.c: Standardize error/warning messages.
2293 2018-02-26 Alan Modra <amodra@gmail.com>
2295 * dwarf2.c, * elf-attrs.c, * elf-eh-frame.c, * elf.c, * elf32-gen.c,
2296 * elflink.c: Standardize error/warning messages. Replace use of
2297 linker callback einfo with _bfd_error_handler when possible.
2299 2018-02-26 Alan Modra <amodra@gmail.com>
2301 * aoutx.h, * coff-alpha.c, * coff-i860.c, * coff-m68k.c,
2302 * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c,
2303 * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-w65.c,
2304 * elf-bfd.h, * elf-m10300.c, * elf.c, * elf32-avr.c, * elf32-bfin.c,
2305 * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c,
2306 * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c,
2307 * elf32-fr30.c, * elf32-frv.c, * elf32-i370.c, * elf32-i386.c,
2308 * elf32-i960.c, * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c,
2309 * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c,
2310 * elf32-m68k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c,
2311 * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c,
2312 * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-or1k.c,
2313 * elf32-pj.c, * elf32-ppc.c, * elf32-rl78.c, * elf32-rx.c,
2314 * elf32-s390.c, * elf32-sh.c, * elf32-spu.c, * elf32-tic6x.c,
2315 * elf32-v850.c, * elf32-vax.c, * elf32-visium.c, * elf32-wasm32.c,
2316 * elf32-xgate.c, * elf32-xtensa.c, * elf64-alpha.c,
2317 * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c,
2318 * elf64-ppc.c, * elf64-s390.c, * elf64-sparc.c, * elf64-x86-64.c,
2319 * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c,
2320 * elfnn-riscv.c, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-riscv.h,
2321 * elfxx-sparc.c, * elfxx-sparc.h, * reloc.c: Standardize
2322 unrecognized/unsupported reloc message.
2324 2018-02-26 Alan Modra <amodra@gmail.com>
2326 * elf32-ppc.c: Standardize error/warning messages. Use
2327 _bfd_error_handler rather than einfo when einfo features not used.
2328 * elf64-ppc.c: Likewise.
2330 2018-02-23 Alan Modra <amodra@gmail.com>
2333 * elf.c (assign_file_positions_for_non_load_sections): Remove RELRO
2334 segment if no matching LOAD segment.
2336 2018-02-23 Kuan-Lin Chen <kuanlinchentw@gmail.com>
2338 * elf32-nds32.h: Define mask for ict_model.
2340 2018-02-20 Jason Duerstock <jason.duerstock@gmail.com>
2342 * elfnn-ia64.c (elf_backend_can_gc_sections): Enable.
2344 2018-02-19 Maciej W. Rozycki <macro@mips.com>
2347 2018-01-12 Vlad Ivanov <vlad@ivanov.email>
2349 * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when
2350 .reginfo section has wrong size.
2352 2018-02-19 Maciej W. Rozycki <macro@mips.com>
2354 * elfxx-mips.c (_bfd_mips_elf_always_size_sections): Set
2355 SEC_FIXED_SIZE and SEC_HAS_CONTENTS flags for `.reginfo' and
2356 `.MIPS.abiflags' sections.
2357 (_bfd_mips_elf_final_link): Avoid reading beyond `.reginfo'
2360 2018-02-19 Maciej W. Rozycki <macro@mips.com>
2362 * section.c (SEC_FIXED_SIZE): New macro.
2363 * bfd-in2.h: Regenerate.
2365 2018-02-19 Maciej W. Rozycki <macro@mips.com>
2367 * section.c (SEC_HAS_GOT_REF): Remove macro.
2368 * bfd-in2.h: Regenerate.
2370 2018-02-19 Alan Modra <amodra@gmail.com>
2372 * elf-attrs.c (_bfd_elf_parse_attributes): Correct _bfd_error_handler
2374 * elfxx-mips.c (_bfd_mips_elf_final_link): Likewise.
2375 * elfnn-riscv.c (_bfd_riscv_relax_align): Likewise.
2376 (_bfd_riscv_relax_pc): Likewise and fix typos.
2377 * libbfd-in.h (_bfd_error_handler): Add attribute printf.
2378 * libbfd.h: Regenerate.
2380 2018-02-19 Alan Modra <amodra@gmail.com>
2382 * dwarf2.c (read_section): Don't use 'll' format modifier.
2383 (find_abstract_instance): Likewise.
2384 * elfcore.h (elf_core_file_p): Likewise.
2386 2018-02-19 Alan Modra <amodra@gmail.com>
2388 * bfd-in.h: Include inttypes.h or if not available define
2389 PRId64, PRIu64 and PRIx64.
2390 * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Remove support for L
2391 modifier to print bfd_vma.
2392 * coff-arm.c, * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c,
2393 * coff-sh.c, * coff-tic80.c, * coffcode.h, * coffgen.c, * cofflink.c,
2394 * compress.c, * dwarf2.c, * elf-m10300.c, * elf.c, * elf32-arc.c,
2395 * elf32-arm.c, * elf32-bfin.c, * elf32-cris.c, * elf32-hppa.c,
2396 * elf32-i386.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32r.c,
2397 * elf32-m68k.c, * elf32-metag.c, * elf32-nds32.c, * elf32-nios2.c,
2398 * elf32-ppc.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c,
2399 * elf32-score7.c, * elf32-sh.c, * elf32-sh64.c, * elf32-spu.c,
2400 * elf32-tic6x.c, * elf32-tilepro.c, * elf32-v850.c, * elf32-vax.c,
2401 * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c,
2402 * elf64-mmix.c, * elf64-s390.c, * elf64-sh64.c, * elf64-x86-64.c,
2403 * elfcode.h, * elfcore.h, * elflink.c, * elfnn-aarch64.c,
2404 * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-mips.c, * elfxx-sparc.c,
2405 * elfxx-tilegx.c, * ieee.c, * ihex.c, * mach-o.c, * merge.c, * mmo.c,
2406 * peXXigen.c, * xcofflink.c: Replace use of Lx modifier with PRIx64,
2407 and cast input to uint64_t, and similarly for Ld and Lu.
2408 * bfd-in2.h: Regenerate.
2410 2018-02-19 Alan Modra <amodra@gmail.com>
2412 * elf32-arm.c, * elf32-hppa.c, * elf32-lm32.c, * elf32-m32r.c,
2413 * elf32-metag.c, * elf32-nds32.c, * elf32-or1k.c, * elf32-ppc.c,
2414 * elf32-s390.c, * elf32-sh.c, * elf32-tic6x.c, * elf32-tilepro.c,
2415 * elf64-ppc.c, * elf64-s390.c, * elflink.c, * elfnn-aarch64.c,
2416 * elfnn-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c,
2417 * reloc.c: Replace use of %R and %T in format strings passed to
2418 einfo and friends by %pR and %pT.
2420 2018-02-19 Alan Modra <amodra@gmail.com>
2422 * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Handle %pA and %pB in place
2424 * aout-adobe.c: Update all messages using %A and %B.
2425 * aout-cris.c: Likewise.
2426 * aoutx.h: Likewise.
2427 * archive.c: Likewise.
2428 * binary.c: Likewise.
2429 * cache.c: Likewise.
2430 * coff-alpha.c: Likewise.
2431 * coff-arm.c: Likewise.
2432 * coff-i860.c: Likewise.
2433 * coff-mcore.c: Likewise.
2434 * coff-ppc.c: Likewise.
2435 * coff-rs6000.c: Likewise.
2436 * coff-sh.c: Likewise.
2437 * coff-tic4x.c: Likewise.
2438 * coff-tic54x.c: Likewise.
2439 * coff-tic80.c: Likewise.
2440 * coff64-rs6000.c: Likewise.
2441 * coffcode.h: Likewise.
2442 * coffgen.c: Likewise.
2443 * cofflink.c: Likewise.
2444 * coffswap.h: Likewise.
2445 * compress.c: Likewise.
2446 * cpu-arm.c: Likewise.
2447 * ecoff.c: Likewise.
2448 * elf-attrs.c: Likewise.
2449 * elf-eh-frame.c: Likewise.
2450 * elf-ifunc.c: Likewise.
2451 * elf-m10300.c: Likewise.
2452 * elf-properties.c: Likewise.
2453 * elf-s390-common.c: Likewise.
2455 * elf32-arc.c: Likewise.
2456 * elf32-arm.c: Likewise.
2457 * elf32-avr.c: Likewise.
2458 * elf32-bfin.c: Likewise.
2459 * elf32-cr16.c: Likewise.
2460 * elf32-cr16c.c: Likewise.
2461 * elf32-cris.c: Likewise.
2462 * elf32-crx.c: Likewise.
2463 * elf32-d10v.c: Likewise.
2464 * elf32-d30v.c: Likewise.
2465 * elf32-epiphany.c: Likewise.
2466 * elf32-fr30.c: Likewise.
2467 * elf32-frv.c: Likewise.
2468 * elf32-gen.c: Likewise.
2469 * elf32-hppa.c: Likewise.
2470 * elf32-i370.c: Likewise.
2471 * elf32-i386.c: Likewise.
2472 * elf32-i960.c: Likewise.
2473 * elf32-ip2k.c: Likewise.
2474 * elf32-iq2000.c: Likewise.
2475 * elf32-lm32.c: Likewise.
2476 * elf32-m32c.c: Likewise.
2477 * elf32-m32r.c: Likewise.
2478 * elf32-m68hc11.c: Likewise.
2479 * elf32-m68hc12.c: Likewise.
2480 * elf32-m68hc1x.c: Likewise.
2481 * elf32-m68k.c: Likewise.
2482 * elf32-mcore.c: Likewise.
2483 * elf32-mep.c: Likewise.
2484 * elf32-metag.c: Likewise.
2485 * elf32-microblaze.c: Likewise.
2486 * elf32-moxie.c: Likewise.
2487 * elf32-msp430.c: Likewise.
2488 * elf32-mt.c: Likewise.
2489 * elf32-nds32.c: Likewise.
2490 * elf32-nios2.c: Likewise.
2491 * elf32-or1k.c: Likewise.
2492 * elf32-pj.c: Likewise.
2493 * elf32-ppc.c: Likewise.
2494 * elf32-rl78.c: Likewise.
2495 * elf32-rx.c: Likewise.
2496 * elf32-s390.c: Likewise.
2497 * elf32-score.c: Likewise.
2498 * elf32-score7.c: Likewise.
2499 * elf32-sh-symbian.c: Likewise.
2500 * elf32-sh.c: Likewise.
2501 * elf32-sh64.c: Likewise.
2502 * elf32-sparc.c: Likewise.
2503 * elf32-spu.c: Likewise.
2504 * elf32-tic6x.c: Likewise.
2505 * elf32-tilepro.c: Likewise.
2506 * elf32-v850.c: Likewise.
2507 * elf32-vax.c: Likewise.
2508 * elf32-visium.c: Likewise.
2509 * elf32-wasm32.c: Likewise.
2510 * elf32-xgate.c: Likewise.
2511 * elf32-xtensa.c: Likewise.
2512 * elf64-alpha.c: Likewise.
2513 * elf64-gen.c: Likewise.
2514 * elf64-hppa.c: Likewise.
2515 * elf64-ia64-vms.c: Likewise.
2516 * elf64-mmix.c: Likewise.
2517 * elf64-ppc.c: Likewise.
2518 * elf64-s390.c: Likewise.
2519 * elf64-sh64.c: Likewise.
2520 * elf64-sparc.c: Likewise.
2521 * elf64-x86-64.c: Likewise.
2522 * elfcode.h: Likewise.
2523 * elfcore.h: Likewise.
2524 * elflink.c: Likewise.
2525 * elfnn-aarch64.c: Likewise.
2526 * elfnn-ia64.c: Likewise.
2527 * elfnn-riscv.c: Likewise.
2528 * elfxx-mips.c: Likewise.
2529 * elfxx-sparc.c: Likewise.
2530 * elfxx-tilegx.c: Likewise.
2531 * elfxx-x86.c: Likewise.
2532 * hpux-core.c: Likewise.
2535 * libbfd.c: Likewise.
2536 * linker.c: Likewise.
2537 * mach-o.c: Likewise.
2538 * merge.c: Likewise.
2540 * oasys.c: Likewise.
2541 * pdp11.c: Likewise.
2542 * pe-mips.c: Likewise.
2543 * peXXigen.c: Likewise.
2544 * peicode.h: Likewise.
2545 * reloc.c: Likewise.
2546 * rs6000-core.c: Likewise.
2548 * stabs.c: Likewise.
2549 * vms-alpha.c: Likewise.
2550 * xcofflink.c: Likewise.
2552 2018-02-19 Alan Modra <amodra@gmail.com>
2555 * elf.c (IS_TBSS): Define.
2556 (_bfd_elf_map_sections_to_segments): Use IS_TBSS.
2557 (assign_file_positions_for_non_load_sections): Revert last change.
2558 Properly calculate load segment limits to compare against relro limits.
2560 2018-02-17 Alan Modra <amodra@gmail.com>
2563 * elf.c (assign_file_positions_for_non_load_sections): Ignore
2564 degenerate zero size PT_LOAD segments when finding one overlapping
2565 the PT_GNU_RELRO segment.
2567 2018-02-16 Alan Modra <amodra@gmail.com>
2569 * libbfd.c (_bfd_bool_bfd_false_error): Rename from bfd_false.
2570 (_bfd_bool_bfd_true): Rename from bfd_true.
2571 (_bfd_ptr_bfd_null_error): Rename from bfd_nullvoidptr.
2572 (_bfd_int_bfd_0): Rename from bfd_0.
2573 (_bfd_uint_bfd_0): Rename from bfd_0u.
2574 (_bfd_long_bfd_0): Rename from bfd_0l.
2575 (_bfd_long_bfd_n1_error): Rename from _bfd_n1.
2576 (_bfd_void_bfd): Rename from bfd_void.
2577 (_bfd_bool_bfd_false, _bfd_bool_bfd_asymbol_false),
2578 (_bfd_bool_bfd_link_false_error),
2579 (_bfd_bool_bfd_link_true, _bfd_bool_bfd_bfd_true),
2580 (_bfd_bool_bfd_uint_true, _bfd_bool_bfd_ptr_true),
2581 (_bfd_bool_bfd_asection_bfd_asection_true),
2582 (_bfd_bool_bfd_asymbol_bfd_asymbol_true),
2583 (_bfd_void_bfd_link, _bfd_void_bfd_asection): New functions.
2584 * archive.c (_bfd_noarchive_get_elt_at_index),
2585 (_bfd_noarchive_openr_next_archived_file),
2586 (_bfd_noarchive_construct_extended_name_table),
2587 (_bfd_noarchive_write_ar_hdr, _bfd_noarchive_truncate_arname),
2588 (_bfd_noarchive_write_armap): New functions.
2589 * archures.c (_bfd_nowrite_set_arch_mach): New function.
2590 * coff-alpha.c (alpha_ecoff_swap_coff_aux_in),
2591 (alpha_ecoff_swap_coff_sym_in, alpha_ecoff_swap_coff_lineno_in),
2592 (alpha_ecoff_swap_coff_aux_out, alpha_ecoff_swap_coff_sym_out),
2593 (alpha_ecoff_swap_coff_lineno_out),
2594 (alpha_ecoff_swap_coff_reloc_out): New functions.
2595 * coff-mips.c (mips_ecoff_swap_coff_aux_in),
2596 (mips_ecoff_swap_coff_sym_in, mips_ecoff_swap_coff_lineno_in),
2597 (mips_ecoff_swap_coff_aux_out, mips_ecoff_swap_coff_sym_out),
2598 (mips_ecoff_swap_coff_lineno_out),
2599 (mips_ecoff_swap_coff_reloc_out): New functions.
2600 * coffcode.h (coff_set_alignment_hook): Replace define with
2602 (symname_in_debug_hook): Likewise.
2603 * ecoff.c (_bfd_ecoff_set_alignment_hook): New function.
2604 * elfxx-target.h (elf_backend_allow_non_load_phdr): Default to 0.
2605 * elf.c (assign_file_positions_except_relocs): Test
2606 elf_backend_allow_non_load_phdr for NULL.
2607 * elflink.c (_bfd_elf_omit_section_dynsym_default): Rename from
2608 _bfd_elf_link_omit_section_dynsym. Update uses.
2609 (_bfd_elf_omit_section_dynsym_all): New function.
2610 * elf-bfd.h (_bfd_elf_link_omit_section_dynsym): Delete.
2611 (_bfd_elf_omit_section_dynsym_default): Declare.
2612 (_bfd_elf_omit_section_dynsym_all): Declare.
2613 * linker.c (_bfd_nolink_sizeof_headers, _bfd_nolink_bfd_relax_section),
2614 (_bfd_nolink_bfd_get_relocated_section_contents),
2615 (_bfd_nolink_bfd_lookup_section_flags),
2616 (_bfd_nolink_bfd_is_group_section, _bfd_nolink_bfd_discard_group),
2617 (_bfd_nolink_bfd_link_hash_table_create),
2618 (_bfd_nolink_bfd_link_just_syms),
2619 (_bfd_nolink_bfd_copy_link_hash_symbol_type),
2620 (_bfd_nolink_bfd_link_split_section),
2621 (_bfd_nolink_section_already_linked),
2622 (_bfd_nolink_bfd_define_common_symbol),
2623 (_bfd_nolink_bfd_define_start_stop): New functions.
2624 * reloc.c (_bfd_norelocs_bfd_reloc_type_lookup),
2625 (_bfd_norelocs_bfd_reloc_name_lookup),
2626 (_bfd_nodynamic_canonicalize_dynamic_reloc): New functions.
2627 * section.c (_bfd_nowrite_set_section_contents): New function.
2628 * syms.c (_bfd_nosymbols_canonicalize_symtab),
2629 (_bfd_nosymbols_print_symbol, _bfd_nosymbols_get_symbol_info),
2630 (_bfd_nosymbols_get_symbol_version_string),
2631 (_bfd_nosymbols_bfd_is_local_label_name),
2632 (_bfd_nosymbols_get_lineno, _bfd_nosymbols_find_nearest_line),
2633 (_bfd_nosymbols_find_line, _bfd_nosymbols_find_inliner_info),
2634 (_bfd_nosymbols_bfd_make_debug_symbol),
2635 ( _bfd_nosymbols_read_minisymbols),
2636 ( _bfd_nosymbols_minisymbol_to_symbol),
2637 (_bfd_nodynamic_get_synthetic_symtab): New functions.
2638 * libbfd-in.h: Declare new functions. Update existing defines,
2640 * aix386-core.c: Update to use new hooks. Formatting.
2641 * aout-adobe.c: Likewise.
2642 * aout-arm.c: Likewise.
2643 * aout-target.h: Likewise.
2644 * aout-tic30.c: Likewise.
2645 * aoutf1.h: Likewise.
2646 * binary.c: Likewise.
2648 * cisco-core.c: Likewise.
2649 * coff-alpha.c: Likewise.
2650 * coff-i386.c: Likewise.
2651 * coff-i860.c: Likewise.
2652 * coff-i960.c: Likewise.
2653 * coff-ia64.c: Likewise.
2654 * coff-mips.c: Likewise.
2655 * coff-ppc.c: Likewise.
2656 * coff-rs6000.c: Likewise.
2657 * coff-sh.c: Likewise.
2658 * coff-tic30.c: Likewise.
2659 * coff-tic54x.c: Likewise.
2660 * coff-x86_64.c: Likewise.
2661 * coff64-rs6000.c: Likewise.
2662 * coffcode.h: Likewise.
2663 * elf-m10300.c: Likewise.
2664 * elf32-cr16.c: Likewise.
2665 * elf32-lm32.c: Likewise.
2666 * elf32-m32r.c: Likewise.
2667 * elf32-metag.c: Likewise.
2668 * elf32-score.c: Likewise.
2669 * elf32-score7.c: Likewise.
2670 * elf32-tilepro.c: Likewise.
2671 * elf32-xstormy16.c: Likewise.
2672 * elf32-xtensa.c: Likewise.
2673 * elf64-alpha.c: Likewise.
2674 * elf64-hppa.c: Likewise.
2675 * elf64-ia64-vms.c: Likewise.
2676 * elf64-mmix.c: Likewise.
2677 * elf64-sh64.c: Likewise.
2678 * elfnn-ia64.c: Likewise.
2679 * elfxx-sparc.c: Likewise.
2680 * elfxx-target.h: Likewise.
2681 * elfxx-tilegx.c: Likewise.
2682 * elfxx-x86.h: Likewise.
2683 * hp300hpux.c: Likewise.
2684 * hppabsd-core.c: Likewise.
2685 * hpux-core.c: Likewise.
2686 * i386msdos.c: Likewise.
2687 * i386os9k.c: Likewise.
2690 * irix-core.c: Likewise.
2691 * libaout.h: Likewise.
2692 * libecoff.h: Likewise.
2693 * mach-o-target.c: Likewise.
2694 * mach-o.c: Likewise.
2695 * mipsbsd.c: Likewise.
2697 * netbsd-core.c: Likewise.
2698 * nlm-target.h: Likewise.
2699 * oasys.c: Likewise.
2700 * osf-core.c: Likewise.
2701 * pdp11.c: Likewise.
2702 * pe-mips.c: Likewise.
2703 * pe-x86_64.c: Likewise.
2705 * plugin.c: Likewise.
2706 * ppcboot.c: Likewise.
2707 * ptrace-core.c: Likewise.
2708 * sco5-core.c: Likewise.
2710 * sparclynx.c: Likewise.
2712 * tekhex.c: Likewise.
2713 * trad-core.c: Likewise.
2714 * verilog.c: Likewise.
2715 * versados.c: Likewise.
2716 * vms-alpha.c: Likewise.
2717 * vms-lib.c: Likewise.
2718 * wasm-module.c: Likewise.
2720 * libbfd.h: Regenerate.
2722 2018-02-15 Jim Wilson <jimw@sifive.com>
2724 * elfnn-riscv.c (_bfd_riscv_relax_section): Ifdef out check to ignore
2725 symbols whose section address is zero.
2727 * elfnn-riscv.c (riscv_elf_relocate_section): Use bfd_reloc_dangerous
2728 when pcrel_lo reloc has an addend. Use reloc_dangerous callback for
2729 bfd_reloc_dangerous. Use einfo instead of warning callback for errors.
2730 Add %X%P to error messages.
2732 2018-02-15 Eric Botcazou <ebotcazou@adacore.com>
2735 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
2736 Pass FALSE instead of TRUE as 'create' argument to bfd_link_hash_lookup
2737 and assert that the result of the call is not NULL.
2739 2018-02-14 Nick Clifton <nickc@redhat.com>
2742 Revert previous delta. Add extra casts to avoid compile time
2744 * libbfd-in.h (_bfd_generic_bfd_copy_private_bfd_data): Add extra
2745 cast to avoid warning from gcc v8 compiler.
2746 (_bfd_generic_bfd_merge_private_bfd_data): Likewise.
2747 (_bfd_generic_bfd_set_private_flags): Likewise.
2748 (_bfd_generic_bfd_copy_private_section_data): Likewise.
2749 (_bfd_generic_bfd_copy_private_symbol_data): Likewise.
2750 (_bfd_generic_bfd_copy_private_header_data): Likewise.
2751 (_bfd_generic_bfd_print_private_bfd_data): Likewise.
2752 (_bfd_noarchive_construct_extended_name_table): Likewise.
2753 (_bfd_noarchive_truncate_arname): Likewise.
2754 (_bfd_noarchive_write_ar_hdr): Likewise.
2755 (_bfd_noarchive_get_elt_at_index): Likewise.
2756 (_bfd_nosymbols_canonicalize_symtab): Likewise.
2757 (_bfd_nosymbols_print_symbol): Likewise.
2758 (_bfd_nosymbols_get_symbol_info): Likewise.
2759 (_bfd_nosymbols_get_symbol_version_string): Likewise.
2760 (_bfd_nosymbols_bfd_is_local_label_name): Likewise.
2761 (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise.
2762 (_bfd_nosymbols_get_lineno): Likewise.
2763 (_bfd_nosymbols_find_nearest_line): Likewise.
2764 (_bfd_nosymbols_find_line): Likewise.
2765 (_bfd_nosymbols_find_inliner_info): Likewise.
2766 (_bfd_nosymbols_bfd_make_debug_symbol): Likewise.
2767 (_bfd_nosymbols_read_minisymbols): Likewise.
2768 (_bfd_nosymbols_minisymbol_to_symbol): Likewise.
2769 (_bfd_norelocs_bfd_reloc_type_lookup): Likewise.
2770 (_bfd_norelocs_bfd_reloc_name_lookup): Likewise.
2771 (_bfd_nowrite_set_arch_mach): Likewise.
2772 (_bfd_nowrite_set_section_contents): Likewise.
2773 (_bfd_nolink_sizeof_headers): Likewise.
2774 (_bfd_nolink_bfd_get_relocated_section_contents): Likewise.
2775 (_bfd_nolink_bfd_relax_section): Likewise.
2776 (_bfd_nolink_bfd_gc_sections): Likewise.
2777 (_bfd_nolink_bfd_lookup_section_flags): Likewise.
2778 (_bfd_nolink_bfd_merge_sections): Likewise.
2779 (_bfd_nolink_bfd_is_group_section): Likewise.
2780 (_bfd_nolink_bfd_discard_group): Likewise.
2781 (_bfd_nolink_bfd_link_hash_table_create): Likewise.
2782 (_bfd_nolink_bfd_link_add_symbols): Likewise.
2783 (_bfd_nolink_bfd_link_just_syms): Likewise.
2784 (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise.
2785 (_bfd_nolink_bfd_final_link): Likewise.
2786 (_bfd_nolink_bfd_link_split_section): Likewise.
2787 (_bfd_nolink_section_already_linked): Likewise.
2788 (_bfd_nolink_bfd_define_common_symbol): Likewise.
2789 (_bfd_nolink_bfd_define_start_stop): Likewise.
2790 (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise.
2791 (_bfd_nodynamic_get_synthetic_symtab): Likewise.
2792 (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise.
2793 (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise.
2794 * libbfd.c (bfd_false_any): Delete.
2795 (bfd_true_any, bfd_nullvoidptr_any, bfd_0_any): Delete.
2796 (bfd_0u_any, bfd_0l_any, _bfd_n1_any, bfd_void_any): Delete.
2797 * libbfd.h (extern): Regenerate
2798 * aout-target.h (MY_bfd_is_target_special_symbol): Add extra
2799 cast to avoid warning from gcc v8 compiler.
2800 * aout-tic30.c (tic30_aout_set_arch_mach): Likewise.
2801 * binary.c (binary_get_symbol_info): Likewise.
2802 * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
2803 * coff-mips.c (mips_ecoff_backend_data): Likewise.
2804 * coffcode.h (coff_set_alignment_hook): Likewise.
2805 (symname_in_debug_hook): Likewise.
2806 (bfd_coff_backend_data bigobj_swap_table): Likewise.
2807 * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise.
2808 * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise.
2809 * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise.
2810 * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise.
2811 * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise.
2812 * elf32-score.c (elf_backend_omit_section_dynsym): Likewise.
2813 * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise.
2814 * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise.
2815 * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise.
2816 * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise.
2817 * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise.
2818 * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise.
2819 * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise.
2820 * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise.
2821 * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise.
2822 * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise.
2823 (bfd_elfNN_bfd_make_debug_symbol): Likewise.
2824 (bfd_elfNN_bfd_merge_private_bfd_data): Likewise.
2825 (bfd_elfNN_bfd_set_private_flags): Likewise.
2826 (bfd_elfNN_bfd_is_target_special_symbol): Likewise.
2827 (elf_backend_init_index_section): Likewise.
2828 (elf_backend_allow_non_load_phdr): Likewise.
2829 * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise.
2830 * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise.
2831 * ieee.c (ieee_construct_extended_name_table): Likewise.
2832 (ieee_write_armap): Likewise.
2833 (ieee_write_ar_hdr): Likewise.
2834 (ieee_bfd_is_target_special_symbol): Likewise.
2835 * ihex.c (ihex_canonicalize_symtab): Likewise.
2836 (ihex_bfd_is_target_special_symbol): Likewise.
2837 * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise.
2838 * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise.
2839 (_bfd_ecoff_set_alignment_hook): Likewise.
2840 * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise.
2841 * mmo.c (mmo_bfd_is_target_special_symbol): Likewise.
2842 * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise.
2843 * oasys.c (oasys_construct_extended_name_table): Likewise.
2844 (oasys_write_armap): Likewise.
2845 (oasys_write_ar_hdr): Likewise.
2846 (oasys_bfd_is_target_special_symbol): Likewise.
2847 * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise.
2848 * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise.
2849 * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise.
2850 * som.c (som_bfd_is_target_special_symbol): Likewise.
2851 * srec.c (srec_bfd_is_target_special_symbol): Likewise.
2852 * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise.
2853 * verilog.c (verilog_bfd_is_target_special_symbol): Likewise.
2854 * versados.c (versados_bfd_is_target_special_symbol): Likewise.
2855 (versados_bfd_reloc_name_lookup): Likewise.
2856 * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise.
2857 (vms_bfd_define_start_stop): Likewise.
2858 (alpha_vms_bfd_is_target_special_symbol): Likewise.
2859 * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise.
2860 * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise.
2862 2018-02-14 H.J. Lu <hongjiu.lu@intel.com>
2865 * elf32-i386.c (elf_i386_check_relocs): Pass FALSE for non
2866 PC-relative PLT to NEED_DYNAMIC_RELOCATION_P.
2867 * elf64-x86-64.c (elf_x86_64_check_relocs): Create PLT for
2868 R_X86_64_PC32 reloc against dynamic function in data section.
2869 Pass TRUE for PC-relative PLT to NEED_DYNAMIC_RELOCATION_P.
2870 (elf_x86_64_relocate_section): Use PLT for R_X86_64_PC32 reloc
2871 against dynamic function in data section.
2872 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Use PLT in PIE as
2873 function address only if pcrel_plt is true.
2874 (_bfd_x86_elf_link_hash_table_create): Set pcrel_plt.
2875 * elfxx-x86.h (NEED_DYNAMIC_RELOCATION_P): Add PCREL_PLT for
2876 PC-relative PLT. If PLT is PC-relative, don't generate dynamic
2877 PC-relative relocation against a function definition in data
2878 secton in PIE. Remove the obsolete comments.
2879 (elf_x86_link_hash_table): Add pcrel_plt.
2881 2018-02-13 H.J. Lu <hongjiu.lu@intel.com>
2883 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Check bfd_link_dll,
2884 instead of bfd_link_pic, for building shared library.
2886 2018-02-13 H.J. Lu <hongjiu.lu@intel.com>
2889 * elf64-x86-64.c (is_32bit_relative_branch): Removed.
2890 (elf_x86_64_relocate_section): Check PIC relocations in PIE.
2891 Remove is_32bit_relative_branch usage. Disallow PC32 reloc
2892 against protected function in shared object.
2894 2018-02-13 Sergei Trofimovich <slyfox@inbox.ru>
2897 * po/ru.po: Fix typo in Russian translation.
2899 2018-02-13 Maciej W. Rozycki <macro@mips.com>
2901 * wasm-module.c (wasm_scan_name_function_section): Rename
2902 `index' local variable to `idx'.
2904 2018-02-13 Nick Clifton <nickc@redhat.com>
2907 Fix compile time warnings generated by gcc version 8.
2908 * libbfd-in.h: Remove extraneous text from prototypes.
2909 Add prototypes for bfd_false_any, bfd_true_any,
2910 bfd_nullvoidptr_any, bfd_0_any, bfd_0u_any, bfd_0l_any,
2911 bfd_n1_any, bfd_void_any.
2912 (_bfd_generic_bfd_copy_private_bfd_data): Use vararg based dummy
2914 (_bfd_generic_bfd_merge_private_bfd_data): Likewise.
2915 (_bfd_generic_bfd_set_private_flags): Likewise.
2916 (_bfd_generic_bfd_copy_private_section_data): Likewise.
2917 (_bfd_generic_bfd_copy_private_symbol_data): Likewise.
2918 (_bfd_generic_bfd_copy_private_header_data): Likewise.
2919 (_bfd_generic_bfd_print_private_bfd_data): Likewise.
2920 (_bfd_noarchive_construct_extended_name_table): Likewise.
2921 (_bfd_noarchive_truncate_arname): Likewise.
2922 (_bfd_noarchive_write_ar_hdr): Likewise.
2923 (_bfd_noarchive_get_elt_at_index): Likewise.
2924 (_bfd_nosymbols_canonicalize_symtab): Likewise.
2925 (_bfd_nosymbols_print_symbol): Likewise.
2926 (_bfd_nosymbols_get_symbol_info): Likewise.
2927 (_bfd_nosymbols_get_symbol_version_string): Likewise.
2928 (_bfd_nosymbols_bfd_is_local_label_name): Likewise.
2929 (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise.
2930 (_bfd_nosymbols_get_lineno): Likewise.
2931 (_bfd_nosymbols_find_nearest_line): Likewise.
2932 (_bfd_nosymbols_find_line): Likewise.
2933 (_bfd_nosymbols_find_inliner_info): Likewise.
2934 (_bfd_nosymbols_bfd_make_debug_symbol): Likewise.
2935 (_bfd_nosymbols_read_minisymbols): Likewise.
2936 (_bfd_nosymbols_minisymbol_to_symbol): Likewise.
2937 (_bfd_norelocs_bfd_reloc_type_lookup): Likewise.
2938 (_bfd_norelocs_bfd_reloc_name_lookup): Likewise.
2939 (_bfd_nowrite_set_arch_mach): Likewise.
2940 (_bfd_nowrite_set_section_contents): Likewise.
2941 (_bfd_nolink_sizeof_headers): Likewise.
2942 (_bfd_nolink_bfd_get_relocated_section_contents): Likewise.
2943 (_bfd_nolink_bfd_relax_section): Likewise.
2944 (_bfd_nolink_bfd_gc_sections): Likewise.
2945 (_bfd_nolink_bfd_lookup_section_flags): Likewise.
2946 (_bfd_nolink_bfd_merge_sections): Likewise.
2947 (_bfd_nolink_bfd_is_group_section): Likewise.
2948 (_bfd_nolink_bfd_discard_group): Likewise.
2949 (_bfd_nolink_bfd_link_hash_table_create): Likewise.
2950 (_bfd_nolink_bfd_link_add_symbols): Likewise.
2951 (_bfd_nolink_bfd_link_just_syms): Likewise.
2952 (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise.
2953 (_bfd_nolink_bfd_final_link): Likewise.
2954 (_bfd_nolink_bfd_link_split_section): Likewise.
2955 (_bfd_nolink_section_already_linked): Likewise.
2956 (_bfd_nolink_bfd_define_common_symbol): Likewise.
2957 (_bfd_nolink_bfd_define_start_stop): Likewise.
2958 (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise.
2959 (_bfd_nodynamic_get_synthetic_symtab): Likewise.
2960 (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise.
2961 (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise.
2962 * libbfd.c (bfd_false_any): New function. Like bfd_false but
2963 accepts one or more arguments.
2964 (bfd_true_any): Likewise.
2965 (bfd_nullvoidptr_any): Likewise.
2966 (bfd_0_any): Likewise.
2967 (bfd_0u_any): Likewise.
2968 (bfd_0l_any): Likewise.
2969 (_bfd_n1_any): Likewise.
2970 (bfd_void_any): Likewise.
2971 * libbfd.h (extern): Regenerate
2972 * aout-target.h (MY_bfd_is_target_special_symbol): Use vararg
2973 based dummy function.
2974 * aout-tic30.c (tic30_aout_set_arch_mach): Likewise.
2975 * binary.c (binary_get_symbol_info): Likewise.
2976 * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
2977 * coff-mips.c (mips_ecoff_backend_data): Likewise.
2978 * coffcode.h (coff_set_alignment_hook): Likewise.
2979 (symname_in_debug_hook): Likewise.
2980 (bfd_coff_backend_data bigobj_swap_table): Likewise.
2981 * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise.
2982 * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise.
2983 * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise.
2984 * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise.
2985 * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise.
2986 * elf32-score.c (elf_backend_omit_section_dynsym): Likewise.
2987 * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise.
2988 * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise.
2989 * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise.
2990 * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise.
2991 * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise.
2992 * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise.
2993 * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise.
2994 * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise.
2995 * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise.
2996 * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise.
2997 (bfd_elfNN_bfd_make_debug_symbol): Likewise.
2998 (bfd_elfNN_bfd_merge_private_bfd_data): Likewise.
2999 (bfd_elfNN_bfd_set_private_flags): Likewise.
3000 (bfd_elfNN_bfd_is_target_special_symbol): Likewise.
3001 (elf_backend_init_index_section): Likewise.
3002 (elf_backend_allow_non_load_phdr): Likewise.
3003 * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise.
3004 * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise.
3005 * ieee.c (ieee_construct_extended_name_table): Likewise.
3006 (ieee_write_armap): Likewise.
3007 (ieee_write_ar_hdr): Likewise.
3008 (ieee_bfd_is_target_special_symbol): Likewise.
3009 * ihex.c (ihex_canonicalize_symtab): Likewise.
3010 (ihex_bfd_is_target_special_symbol): Likewise.
3011 * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise.
3012 * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise.
3013 (_bfd_ecoff_set_alignment_hook): Likewise.
3014 * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise.
3015 * mmo.c (mmo_bfd_is_target_special_symbol): Likewise.
3016 * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise.
3017 * oasys.c (oasys_construct_extended_name_table): Likewise.
3018 (oasys_write_armap): Likewise.
3019 (oasys_write_ar_hdr): Likewise.
3020 (oasys_bfd_is_target_special_symbol): Likewise.
3021 * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise.
3022 * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise.
3023 * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise.
3024 * som.c (som_bfd_is_target_special_symbol): Likewise.
3025 * srec.c (srec_bfd_is_target_special_symbol): Likewise.
3026 * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise.
3027 * verilog.c (verilog_bfd_is_target_special_symbol): Likewise.
3028 * versados.c (versados_bfd_is_target_special_symbol): Likewise.
3029 (versados_bfd_reloc_name_lookup): Likewise.
3030 * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise.
3031 (vms_bfd_define_start_stop): Likewise.
3032 (alpha_vms_bfd_is_target_special_symbol): Likewise.
3033 * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise.
3034 * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise.
3035 * elf32-arc.c (get_replace_function): Assign replacement function
3037 * elf32-i370.c (i370_noop): Update prototype.
3039 2018-02-13 Alan Modra <amodra@gmail.com>
3042 * elf.c (_bfd_elf_fixup_group_sections): Account for removed
3043 relocation sections. If size reduces to just the flag word,
3044 remove that too and mark with SEC_EXCLUDE.
3045 * elflink.c (bfd_elf_final_link): Strip empty group sections.
3047 2018-02-13 Alan Modra <amodra@gmail.com>
3050 * elf.c (assign_file_positions_for_non_load_sections): Rewrite
3053 2018-02-12 Zebediah Figura <z.figura12@gmail.com>
3055 * i386msdos.c (msdos_mkobject); New function.
3056 (msdos_object_p): New function.
3057 (i386_msdos_vec): Use msdos_object_p as the check_format
3059 * peicode.h: Rename external_PEI_DOS_hdr, DOSMAGIC, and
3060 NT_SIGNATURE to external_DOS_hdr, IMAGE_DOS_SIGNATURE, and
3062 * peXXigen.c: Likewise.
3063 * coff-ia64.c: Likewise.
3065 2018-02-12 Nick Clifton <nickc@redhat.com>
3067 * elf32-nds32.c (nds32_elf_relax_longjump3): Remove redundant
3069 * elf32-arc.c (elf_arc_relocate_section): Likewise.
3071 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
3073 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Reorder conditions.
3074 (sparc_elf_append_rela): Assert that there is enough room in section.
3075 (_bfd_sparc_elf_copy_indirect_symbol): Fix formatting.
3076 (_bfd_sparc_elf_adjust_dynamic_symbol): Minor tweak.
3077 (allocate_dynrelocs): Remove outdated comments and reorder conditions.
3078 For a symbol subject to a GOT relocation, reserve a slot in the
3079 relocation section if the symbol isn't dynamic and we are in PIC mode.
3080 (_bfd_sparc_elf_relocate_section) <R_SPARC_GOTDATA_OP>: If relocation
3081 is relaxed and a slot was reserved, generate a R_SPARC_NONE relocation.
3082 <R_SPARC_GOTDATA_OP_HIX22>: Adjust comments.
3083 <R_SPARC_PC10>: Reorder conditions. Remove always-false assertion.
3084 (_bfd_sparc_elf_finish_dynamic_symbol): Rename local_undefweak into
3085 resolved_to_zero. Do not generate a dynamic GOT relocation for an
3086 undefined weak symbol with non-default visibility. Remove superfluous
3087 'else' and fix formatting.
3089 2018-02-09 H.J. Lu <hongjiu.lu@intel.com>
3091 * elf32-i386.c (elf_i386_get_synthetic_symtab): Also handle
3093 (i386_elf32_sol2_vec): Don't declare.
3094 (elf_i386_link_setup_gnu_properties): Also handle is_solaris.
3095 Don't set need_global_offset_table.
3096 (elf_i386_solaris_arch_bed): New.
3097 (elf_backend_arch_data): Set to elf_i386_solaris_arch_bed for
3099 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Check
3100 target_os != is_nacl instead of target_os == is_normal.
3101 (x86_64_elf64_sol2_vec): Don't declare.
3102 (elf_x86_64_link_setup_gnu_properties): Check target_os !=
3103 is_nacl instead of target_os == is_normal. Don't set
3104 need_global_offset_table.
3105 (elf_x86_64_solaris_arch_bed): New.
3106 (elf_backend_arch_data): Set to elf_x86_64_solaris_arch_bed for
3108 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep
3109 _GLOBAL_OFFSET_TABLE_ for Solaris.
3110 (_bfd_x86_elf_link_setup_gnu_properties): Don't copy
3111 need_global_offset_table.
3112 * elfxx-x86.h (elf_x86_target_os): Add is_solaris.
3113 (elf_x86_link_hash_table): Remove need_global_offset_table.
3114 (elf_x86_init_table): Likewise.
3116 2018-02-08 H.J. Lu <hongjiu.lu@intel.com>
3118 * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
3120 (i386_elf32_sol2_vec): Declared.
3121 (elf_i386_link_setup_gnu_properties): Set
3122 need_global_offset_table with info->output_bfd->xvec.
3123 * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
3125 (x86_64_elf64_sol2_vec): Declared.
3126 (elf_x86_64_link_setup_gnu_properties): Set
3127 need_global_offset_table with info->output_bfd->xvec.
3129 2018-02-08 H.J. Lu <hongjiu.lu@intel.com>
3131 * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
3133 (elf_i386_link_setup_gnu_properties): Set need_global_offset_table
3135 * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
3137 (elf_x86_64_link_setup_gnu_properties): Set
3138 need_global_offset_table for Solaris.
3139 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep the
3140 unused _GLOBAL_OFFSET_TABLE_ for Solaris.
3141 (_bfd_x86_elf_link_setup_gnu_properties): Copy
3142 need_global_offset_table.
3143 * elfxx-x86.h (elf_x86_link_hash_table): Add
3144 need_global_offset_table.
3145 (elf_x86_init_table): Likewise.
3147 2018-02-08 Jim Wilson <jimw@sifive.com>
3149 * elfnn-riscv.c (riscv_elf_relocate_section): Add comment for previous
3152 2018-02-08 Nick Clifton <nickc@redhat.com>
3155 * elf.c (elf_parse_notes): Reject notes with excessuively large
3158 2018-02-07 Alan Modra <amodra@gmail.com>
3160 Revert 2018-01-17 Alan Modra <amodra@gmail.com>
3161 * elf32-ppc.c: Remove speculation barrier support.
3162 * elf32-ppc.h: Likewise.
3163 * elf64-ppc.c: Likewise.
3164 * elf64-ppc.h: Likewise.
3166 2018-02-06 Jim Wilson <jimw@sifive.com>
3168 * elfnn-riscv.c (riscv_elf_relocate_section): Return TRUE if used
3169 callback to report an error.
3171 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
3174 * elfxx-sparc.c (sparc_elf_tls_transition): Turn call to bfd_link_pic
3175 into call to !bfd_link_executable and tidy up.
3176 (_bfd_sparc_elf_check_relocs): Fix formatting and tidy up.
3177 <R_SPARC_TLS_LE_HIX22>: Turn call to bfd_link_pic into call to
3178 !bfd_link_executable.
3179 <R_SPARC_TLS_IE_HI22>: Likewise.
3180 <GOT relocations>: Remove useless code, tidy and merge related blocks.
3181 <R_SPARC_TLS_GD_CALL>: Turn call to bfd_link_pic into call to
3182 !bfd_link_executable.
3183 <R_SPARC_WPLT30>: Tidy up.
3184 (_bfd_sparc_elf_gc_mark_hook): Turn call to bfd_link_pic into call to
3185 !bfd_link_executable.
3186 (allocate_dynrelocs): Likewise.
3187 (_bfd_sparc_elf_relocate_section): Fix formatting and tidy up.
3188 <R_SPARC_TLS_GD_HI22>: Merge into...
3189 <R_SPARC_TLS_GD_LO10>: ...this. Adjust 4th argument in call to
3190 sparc_elf_tls_transition and remove redundant code.
3191 <R_SPARC_TLS_LDM_HI22>: Turn call to bfd_link_pic into call to
3192 !bfd_link_executable.
3193 <R_SPARC_TLS_LDO_HIX22>: Likewise.
3194 <R_SPARC_TLS_LE_HIX22>: Likewise. Tidy up.
3195 <R_SPARC_TLS_LDM_CALL>: Likewise.
3196 <R_SPARC_TLS_GD_CALL>: Likewise. Tidy up.
3197 <R_SPARC_TLS_GD_ADD>: Likewise.
3198 <R_SPARC_TLS_LDM_ADD>: Likewise.
3199 <R_SPARC_TLS_LDO_ADD>: Likewise.
3200 <R_SPARC_TLS_IE_LD>: Likewise.
3202 2018-02-06 Miloš Stojanović <milos.stojanovic@rt-rk.com>
3205 * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): If the dwarf
3206 functions failed to find the function name, try the generic elf
3207 find function instead.
3209 2018-02-06 Sergio Durigan Junior <sergiodj@redhat.com>
3211 * coff-rs6000.c (xcoff_write_archive_contents_old): Use
3212 'memcpy' instead of 'strncpy' when writing the magic number.
3214 2018-02-06 Nick Clifton <nickc@redhat.com>
3217 * opncls.c (bfd_get_debug_link_info_1): Check the size of the
3218 section before attempting to read it in.
3219 (bfd_get_alt_debug_link_info): Likewise.
3221 2018-02-06 Paul Carroll <pcarroll@codesourcery.com>
3223 * bfd/dwarf2.c (find_abstract_name): Modified to return file and
3224 line information in addition to name, if they can be found.
3226 2018-02-05 Renlin Li <renlin.li@arm.com>
3229 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Relax the
3230 R_AARCH64_ABS32 and R_AARCH64_ABS16 for absolute symbol. Apply the
3231 check for writeable section as well.
3233 2018-02-05 H.J. Lu <hongjiu.lu@intel.com>
3236 * elf32-i386.c (elf_i386_check_relocs): Set got_referenced if
3237 _GLOBAL_OFFSET_TABLE_ is referenced or GOT is needed to resolve
3238 undefined weak symbol to 0.
3239 * elf64-x86-64.c (elf_x86_64_check_relocs): Set got_referenced
3240 if _GLOBAL_OFFSET_TABLE_ is referenced.
3241 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Check
3242 got_referenced instead of ref_regular_nonweak. Remove the
3243 unused _GLOBAL_OFFSET_TABLE_ from symbol table.
3244 * elfxx-x86.h (elf_x86_link_hash_table): Add got_referenced.
3246 2018-02-05 Maciej W. Rozycki <macro@mips.com>
3248 * elfnn-riscv.c (_bfd_riscv_relax_pc): Use `memset' to
3249 initialize `hi_reloc'.
3251 2018-02-05 Maciej W. Rozycki <macro@mips.com>
3253 * elfxx-mips.c (_bfd_mips_elf_section_processing): For
3254 SHT_MIPS_REGINFO sections don't assert the correct size and
3255 report an error instead.
3257 2018-02-05 Maciej W. Rozycki <macro@mips.com>
3259 * elf.c (_bfd_elf_write_object_contents): Propagate a failure
3260 status from `->elf_backend_section_processing'.
3262 2018-02-02 Jim Wilson <jimw@sifive.com>
3265 * elfnn-riscv.c (riscv_relax_delete_bytes): New parameter link_info.
3266 If link_info->wrap_hash, check for a duplicate symbol and ignore.
3267 (_bfd_riscv_relax_call, bfd_riscv_relax_lui, _bfd_riscv_relax_tls_le):
3268 Pass new argument to riscv_relax_delete_bytes.
3269 (_bfd_riscv_relax_align, _bfd_riscv_relax_delete): Likewise. Remove
3270 ATTRIBUTE_UNUSED from link_info parameter.
3272 2018-02-02 Alan Modra <amodra@gmail.com>
3274 * elf64-ppc.c (ppc64_elf_relocate_section): Don't relocate nops
3275 emitted for toc sequence optimization. Set and use "howto" later.
3277 2018-02-01 Simon Marchi <simon.marchi@ericsson.com>
3279 * elf64-ppc.c (ppc64_elf_archive_symbol_lookup): Avoid pointer
3280 arithmetic on NULL pointer.
3281 * elflink.c (_bfd_elf_archive_symbol_lookup,
3282 elf_link_add_archive_symbols): Likewise.
3284 2018-01-31 Michael Matz <matz@suse.de>
3286 * elflink.c (bfd_elf_define_start_stop): Fix check of
3289 2018-01-31 H.J. Lu <hongjiu.lu@intel.com>
3292 * elflink.c (bfd_elf_define_start_stop): Check if __start and
3293 __stop symbols are referenced by shared objects.
3295 2018-01-30 Alan Modra <amodra@gmail.com>
3298 * elf.c (_bfd_elf_map_sections_to_segments): Don't start a new
3299 segment when demand paged with lma on the same page. Test this
3300 before load/non-load, executable/non-executable,
3301 writable/non-writable tests and simplify. Delete bogus relro
3302 condition in writable/non-writable test. Delete outdated
3303 comment. Formatting.
3305 2018-01-30 Alan Modra <amodra@gmail.com>
3307 * elflink.c (bfd_elf_define_start_stop): Make __start and __stop
3310 2018-01-29 Alan Modra <amodra@gmail.com>
3313 * coffgen.c (coff_pointerize_aux): Ensure auxent tagndx is in
3314 range before converting to a symbol table pointer.
3316 2018-01-27 Nick Clifton <nickc@redhat.com>
3318 * po/ru.po: Updated Russian translation.
3320 2018-01-26 Alan Modra <amodra@gmail.com>
3322 * elflink.c (bfd_elf_define_start_stop): Override symbols when
3323 they are defined dynamically.
3325 2018-01-26 Alan Modra <amodra@gmail.com>
3327 * elf64-ppc.c (ppc64_elf_size_stubs): Iterate sizing when
3328 .branch_lt changes size.
3330 2018-01-25 Alan Modra <amodra@gmail.com>
3333 * elfcode.h (elf_object_p): Avoid integer overflow.
3335 2018-01-25 Eric Botcazou <ebotcazou@adacore.com>
3338 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
3339 Do a mere lookup of the __tls_get_addr symbol instead of adding it.
3342 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
3345 * elfxx-sparc.c (sparc_elf_tls_transition): Replace
3346 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
3347 bfd_link_executable for TLS check.
3348 (_bfd_sparc_elf_check_relocs): Likewise.
3349 (allocate_dynrelocs): Likewise.
3350 (_bfd_sparc_elf_relocate_section): Likewise.
3352 2018-01-24 Renlin Li <renlin.li@arm.com>
3354 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Add support for
3355 BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
3356 BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
3357 BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
3358 BFD_RELOC_AARCH64_MOVW_PREL_G3.
3359 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
3360 (_bfd_aarch64_elf_resolve_relocation): Likewise.
3362 2018-01-24 Renlin Li <renlin.li@arm.com>
3364 * reloc.c: Add BFD_RELOC_AARCH64_MOVW_PREL_G0,
3365 BFD_RELOC_AARCH64_MOVW_PREL_G0_NC, BFD_RELOC_AARCH64_MOVW_PREL_G1,
3366 BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, BFD_RELOC_AARCH64_MOVW_PREL_G2,
3367 BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, BFD_RELOC_AARCH64_MOVW_PREL_G3.
3368 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Add entries for
3369 BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
3370 BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
3371 BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
3372 BFD_RELOC_AARCH64_MOVW_PREL_G3.
3373 * bfd-in2.h: Regenerate.
3374 * libbfd.h: Regenerate.
3376 2018-01-23 Maciej W. Rozycki <macro@mips.com>
3378 * elfxx-mips.c (_bfd_mips_elf_final_link): Update a stale
3379 `mips_elf32_section_processing' comment reference.
3381 2018-01-20 H.J. Lu <hongjiu.lu@intel.com>
3384 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Check the
3385 versioned __tls_get_addr symbol.
3387 2018-01-19 Nick Clifton <nickc@redhat.com>
3389 * po/fr.po: Updated French translation.
3391 2018-01-18 Alan Modra <amodra@gmail.com>
3393 * elf32-ppc.c (ppc_elf_create_glink): Correct alignment of .glink.
3394 * elf64-ppc.c (ppc64_elf_size_stubs): Handle negative plt_stub_align.
3395 (ppc64_elf_build_stubs): Likewise.
3397 2018-01-17 Nick Clifton <nickc@redhat.com>
3399 * po/ru.po: Updated Russian translation.
3400 * po/uk/po: Updated Ukranian translation.
3402 2018-01-17 Alan Modra <amodra@gmail.com>
3404 * elf64-ppc.c (ppc64_elf_build_stubs): Silence gcc warning.
3406 2018-01-17 Alan Modra <amodra@gmail.com>
3408 * elf32-ppc.c (GLINK_ENTRY_SIZE): Handle speculation barrier.
3409 (CRSETEQ, BEQCTRM): Define.
3410 (is_nonpic_glink_stub): Don't check bctr.
3411 (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
3412 (ppc_elf_relax_section): Size speculation barrier.
3413 (output_bctr): New function.
3414 (write_glink_stub): Use output_bctr.
3415 (ppc_elf_relocate_section): Use output_bctr for long branch stub.
3416 (ppc_elf_finish_dynamic_symbol): Likewise.
3417 (ppc_elf_finish_dynamic_sections): Use output_bctr.
3418 * elf32-ppc.h (struct ppc_elf_params): Add speculate_indirect_jumps.
3419 * elf64-ppc.c (CRSETEQ, BEQCTRM, BEQCTRLM): Define.
3420 (GLINK_PLTRESOLVE_SIZE): Size speculation barrier.
3421 (size_global_entry_stubs): Handle speculation barrier sizing.
3422 (plt_stub_size): Likewise.
3423 (output_bctr): New function.
3424 (build_plt_stub, build_tls_get_addr_stub): Output speculation
3426 (ppc_build_one_stub): Likewise for ppc_stub_plt_branch.
3427 (ppc_size_one_stub): Size speculation barrier in ppc_stub_plt_branch.
3428 (build_global_entry_stubs): Output speculation barrier.
3429 (ppc64_elf_build_stubs): Likewise in __glink_PLTresolve stub.
3430 * elf64-ppc.h (struct ppc64_elf_params): Add speculate_indirect_jumps.
3432 2018-01-17 Alan Modra <amodra@gmail.com>
3434 * elf32-ppc.c (GLINK_ENTRY_SIZE): Add parameters, handle
3435 __tls_get_addr_opt, and alignment sizing.
3436 (TLS_GET_ADDR_GLINK_SIZE): Delete.
3437 (is_nonpic_glink_stub): Don't use GLINK_ENTRY_SIZE.
3438 (ppc_elf_get_synthetic_symtab): Recognize stubs spaced at 4, 6,
3440 (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
3441 (allocate_dynrelocs): Use new GLINK_ENTRY_SIZE.
3442 (ppc_elf_size_dynamic_sections): Likewise. Size branch table
3444 (write_glink_stub): Handle __tls_get_addr_opt stub.
3445 Pad out to size given by GLINK_ENTRY_SIZE.
3446 (ppc_elf_relocate_section): Adjust write_glink_stub call.
3447 (ppc_elf_finish_dynamic_symbol): Likewise.
3448 (ppc_elf_finish_dynamic_sections): Write PLTresolve without using
3449 insn array since so many need rewriting.
3450 * elf32-ppc.h (struct ppc_elf_params): Add plt_stub_align.
3451 * elf64-ppc.c (GLINK_PLTRESOLVE_SIZE): Rename from
3452 GLINK_CALL_STUB_SIZE. Add htab param and evaluate to size without
3453 nops. Adjust all uses.
3454 (ppc64_elf_get_synthetic_symtab): Don't use GLINK_CALL_STUB_SIZE
3455 in glink_vma calculation.
3456 (struct ppc_link_hash_table): Add global_entry section pointer.
3457 (create_linkage_sections): Create separate section for global
3459 (PPC_LO, PPC_HI, PPC_HA): Move earlier.
3460 (size_global_entry_stubs): Handle sizing for aligned stubs.
3461 (ppc64_elf_size_dynamic_sections): Handle global_entry alloc,
3462 and don't stash end of glink branch table in rawsize.
3463 (ppc_build_one_stub): Rewrite stub size calculations.
3464 (build_global_entry_stubs): Use new section.
3465 (ppc64_elf_build_stubs): Don't pad __glink_PLTresolve with nops.
3466 Build lazy link stubs out to end of section. Build global entry
3467 stubs in new section.
3469 2018-01-15 Nick Clifton <nickc@redhat.com>
3471 * po/uk.po: Updated Ukranian translation.
3473 2018-01-13 Nick Clifton <nickc@redhat.com>
3475 * po/bfd.pot: Regenerated.
3477 2018-01-13 Nick Clifton <nickc@redhat.com>
3479 * version.m4: Bump version to 2.30.51
3480 * configure: Regenerate.
3482 2018-01-13 Nick Clifton <nickc@redhat.com>
3484 2.30 branch created.
3486 2018-01-12 Jens Widell <jl@opera.com>
3488 * elf.c (setup_group): Optimize search for group by remembering
3489 last found group and restarting search at that index.
3490 * elf-bfd.h (struct elf_obj_tdata): Add group_search_offset field.
3492 2018-01-12 Gunther Nikl <gnikl@users.sourceforge.net>
3494 * aoutx.h (aout_link_check_ar_symbols): Remove default and handle
3495 bfd_link_common_skip_none in switch.
3497 2018-01-12 Alan Modra <amodra@gmail.com>
3500 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Ignore dynamic
3501 references on forced local symbols.
3503 2018-01-12 Vlad Ivanov <vlad@ivanov.email>
3505 * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when
3506 .reginfo section has wrong size.
3508 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
3511 * elf.c (_bfd_elf_map_sections_to_segments): When generating
3512 separate code and read-only data LOAD segments, create a new
3513 LOAD segment if the previous section contains text and the
3514 current section doesn't or vice versa. Don't put a writable
3515 section in a read-only segment if there is a RELRO segment.
3517 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
3520 * elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Ignore dynamic
3521 references on forced local symbols.
3523 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
3526 * elflink.c (bfd_elf_gc_sections): Keep all PREINIT_ARRAY,
3527 INIT_ARRAY as well as FINI_ARRAY sections for ld -r --gc-section.
3529 2018-01-09 Kuan-Lin Chen <kuanlinchentw@gmail.com>
3532 * elf32-nds32.c (nds32_elf_relax_loadstore): Fix a typographical error.
3534 2018-01-03 John Baldwin <jhb@FreeBSD.org>
3536 * elf.c (elfcore_grok_freebsd_note): Handle
3537 NT_FREEBSD_PROCSTAT_PROC, NT_FREEBSD_PROCSTAT_FILES, and
3538 NT_FREEBSD_PROCSTAT_VMMAP.
3540 2018-01-03 Alan Modra <amodra@gmail.com>
3542 Update year range in copyright notice of all files.
3544 For older changes see ChangeLog-2017
3546 Copyright (C) 2018 Free Software Foundation, Inc.
3548 Copying and distribution of this file, with or without modification,
3549 are permitted in any medium without royalty provided the copyright
3550 notice and this notice are preserved.
3556 version-control: never