1 2018-08-01 Nick Clifton <nickc@redhat.com>
3 * coff-rs6000.c (_bfd_xcoff_put_ldsymbol_name): Suppress warnings
4 about potentially truncated strncpy operations.
5 (_bfd_xcoff_put_symbol_name): Likewise.
7 * elf32-avr.c (avr_stub_name): Check for a NULL return from
10 2018-08-01 Zenith <zenith432@users.sourceforge.net>
13 * plugin.c (bfd_plugin_open_input): Close file descriptor if the
15 (try_claim): Always close the file descriptor at the end of the
17 (try_load_plugin): If a plugin has already been registered, then
18 skip the dlopen and onload steps and go straight to claiming the
19 file. If these is an error, close the plugin.
21 2018-08-01 Alan Modra <amodra@gmail.com>
23 * elf64-ppc.c (plt_stub_pad): Delay plt_stub_size call until needed.
24 (ppc_build_one_stub): Don't set stub_offset, instead assert that
25 it is sane. Don't adjust stub_offset for alignment. Adjust size
26 calculation. Use "targ" temp when calculating offsets.
27 (ppc_size_one_stub): Set stub_offset here. Use "targ" temp when
28 calculating offsets. Adjust for alignment before setting
29 tls_get_addr_opt_bctrl.
31 2018-08-01 Alan Modra <amodra@gmail.com>
33 * po/SRC-POTFILES.in: Regenerate.
35 2018-07-30 Nick Clifton <nickc@redhat.com>
38 * elf32-sh.c (sh_elf_relocate_section): When processing
39 translation relocs, fail if the relocation offset is too small.
40 Replace BFD_ASSERTs with more helpful error messages.
42 2018-07-30 Andrew Jenner <andrew@codesourcery.com>
44 * Makefile.am (ALL_MACHINES, ALL_MACHINES_CFILES): Add C-SKY.
45 (BFD32_BACKENDS, BFD_BACKENDS_CFILES): Likewise.
46 * Makefile.in: Regenerated.
47 * archures.c (enum bfd_architecture): Add bfd_arch_csky and
48 related bfd_mach defines.
49 (bfd_csky_arch): Declare.
50 (bfd_archures_list): Add C-SKY.
51 * bfd-in.h (elf32_csky_build_stubs): Declare.
52 (elf32_csky_size_stubs): Declare.
53 (elf32_csky_next_input_section: Declare.
54 (elf32_csky_setup_section_lists): Declare.
55 * bfd-in2.h: Regenerated.
56 * config.bfd: Add C-SKY.
57 * configure.ac: Likewise.
58 * configure: Regenerated.
59 * cpu-csky.c: New file.
60 * elf-bfd.h (enum elf_target_id): Add C-SKY.
61 * elf32-csky.c: New file.
62 * libbfd.h: Regenerated.
63 * reloc.c: Add C-SKY relocations.
64 * targets.c (csky_elf32_be_vec, csky_elf32_le_vec): Declare.
65 (_bfd_target_vector): Add C-SKY target vector entries.
67 2018-07-27 John Darrington <john@darrington.wattle.id.au>
69 * elf32-s12z.c (ELF_TARGET_ID): Don't define.
71 2018-07-27 John Darrington <john@darrington.wattle.id.au>
73 * libbfd.c (bfd_getb24, bfd_getl24): New functions.
74 (bfd_get_24, bfd_put_24): New macros.
75 * bfd-in2.h: Regenerate.
77 2018-07-27 John Darrington <john@darrington.wattle.id.au>
79 * elf32-s12z.c (s12z_elf_set_mach_from_flags): Remove comment.
81 2018-07-26 Alan Modra <amodra@gmail.com>
83 * elf64-ppc.c (ppc64_elf_size_stubs): Use a ppc_stub_long_branch_r2off
84 for calls to symbols with STO_PPC64_LOCAL_MASK bits set to 1.
86 2018-07-25 Alan Modra <amodra@gmail.com>
88 * elf32-ppc.c (ppc_elf_relax_section): Ignore common or undef locals.
89 Avoid trashing toff with added when used as a symbol index.
90 Ignore R_PPC_PLTREL24 addends in unused example code. Avoid
91 creating unnecessary fixups when relocatable.
93 2018-07-25 Alan Modra <amodra@gmail.com>
95 * elf32-arm.c (elf32_arm_nabi_write_core_note): Disable
96 -Wstringop-truncation warning for gcc-8.0 too.
97 * elf32-ppc.c (ppc_elf_write_core_note): Likewise.
98 * elf64-ppc.c (ppc64_elf_write_core_note): Likewise.
99 * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewise.
100 * elf32-s390.c (elf_s390_write_core_note): Comment fix.
101 * elf64-s390.c (elf_s390_write_core_note): Likewise.
103 2018-07-24 Alan Modra <amodra@gmail.com>
106 * dwarf2.c (dwarf_debug_section_enum): Fix comment typo.
107 * elf.c (bfd_section_from_shdr, elf_sort_sections): Likewise.
109 2018-07-23 Max Filippov <jcmvbkbc@gmail.com>
111 * elf32-xtensa.c (elf_xtensa_finish_dynamic_sections): Move
112 relocation sections consistency check to always check both
113 .rela.dyn and .rela.plt when they exist. Rearrange variable
114 definition and assignment places.
116 2018-07-23 Max Filippov <jcmvbkbc@gmail.com>
118 * elf32-xtensa.c (shrink_dynamic_reloc_sections): Shrink dynamic
119 relocations section for dynamic undefined weak symbols when
120 linking a shared object.
122 2018-07-23 Tom Tromey <tom@tromey.com>
124 * elf.c (bfd_get_elf_phdrs): Don't call memcpy with size 0.
126 2018-07-21 Eric Botcazou <ebotcazou@adacore.com>
128 * elf32-arm.c (elf32_arm_final_link_relocate) <R_ARM_GOT32>: Small
129 cleanup for the case of a global symbol that binds locally. Also
130 install a value in the GOT slot in the case of a local symbol in
133 2018-07-20 H.J. Lu <hongjiu.lu@intel.com>
136 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): If the
137 separate code program header is needed, make sure that the first
138 read-only PT_LOAD segment has no code by adding a
139 GNU_PROPERTY_X86_ISA_1_USED note.
141 2018-07-20 Chenghua Xu <paul.hua.gm@gmail.com>
142 Maciej W. Rozycki <macro@mips.com>
144 * elfxx-mips.c (print_mips_ases): Add MMI extension.
146 2018-07-20 Maciej W. Rozycki <macro@mips.com>
148 * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Do not
149 create DT_REL, DT_RELSZ or DT_RELENT dynamic entries if the
150 dynamic relocation section will be discarded from output.
151 (_bfd_mips_elf_finish_dynamic_sections) <DT_RELSZ>: Assert that
152 the dynamic relocation section will be retained in output.
154 2018-07-18 Maciej W. Rozycki <macro@mips.com>
156 * xcofflink.c (xcoff_write_global_symbol): Fix symbol type
157 checks for defined weak symbols.
159 2018-07-17 Maciej W. Rozycki <macro@mips.com>
161 * elf32-nds32.c (nds32_elf_relax_loadstore): Use
162 `bfd_is_abs_symbol' rather than `bfd_is_abs_section' in checking
163 whether the symbol is absolute.
164 (nds32_elf_relax_lo12): Likewise.
165 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
166 (elfNN_aarch64_check_relocs): Likewise.
167 * xcofflink.c (xcoff_need_ldrel_p): Likewise.
168 (bfd_xcoff_import_symbol): Likewise.
169 (xcoff_write_global_symbol): Likewise.
171 2018-07-17 Maciej W. Rozycki <macro@mips.com>
173 * linker.c (bfd_is_abs_symbol): New macro.
174 * bfd-in2.h: Regenerate.
176 2018-07-16 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
178 * elf-bfd.h (elfcore_write_ppc_tar): Add prototype.
179 (elfcore_write_ppc_ppr): Likewise.
180 (elfcore_write_ppc_dscr): Likewise.
181 (elfcore_write_ppc_ebb): Likewise.
182 (elfcore_write_ppc_pmu): Likewise.
183 (elfcore_write_ppc_tm_cgpr): Likewise.
184 (elfcore_write_ppc_tm_cfpr): Likewise.
185 (elfcore_write_ppc_tm_cvmx): Likewise.
186 (elfcore_write_ppc_tm_cvsx): Likewise.
187 (elfcore_write_ppc_tm_spr): Likewise.
188 (elfcore_write_ppc_tm_ctar): Likewise.
189 (elfcore_write_ppc_tm_cppr): Likewise.
190 (elfcore_write_ppc_tm_cdscr): Likewise.
191 * elf.c (elfcore_write_ppc_tar): New function.
192 (elfcore_write_ppc_ppr): Likewise.
193 (elfcore_write_ppc_dscr): Likewise.
194 (elfcore_write_ppc_ebb): Likewise.
195 (elfcore_write_ppc_pmu): Likewise.
196 (elfcore_write_ppc_tm_cgpr): Likewise.
197 (elfcore_write_ppc_tm_cfpr): Likewise.
198 (elfcore_write_ppc_tm_cvmx): Likewise.
199 (elfcore_write_ppc_tm_cvsx): Likewise.
200 (elfcore_write_ppc_tm_spr): Likewise.
201 (elfcore_write_ppc_tm_ctar): Likewise.
202 (elfcore_write_ppc_tm_cppr): Likewise.
203 (elfcore_write_ppc_tm_cdscr): Likewise.
204 (elfcore_write_register_note): Call them.
205 (elfcore_grok_ppc_tar): New function.
206 (elfcore_grok_ppc_ppr): Likewise.
207 (elfcore_grok_ppc_dscr): Likewise.
208 (elfcore_grok_ppc_ebb): Likewise.
209 (elfcore_grok_ppc_pmu): Likewise.
210 (elfcore_grok_ppc_tm_cgpr): Likewise.
211 (elfcore_grok_ppc_tm_cfpr): Likewise.
212 (elfcore_grok_ppc_tm_cvmx): Likewise.
213 (elfcore_grok_ppc_tm_cvsx): Likewise.
214 (elfcore_grok_ppc_tm_spr): Likewise.
215 (elfcore_grok_ppc_tm_ctar): Likewise.
216 (elfcore_grok_ppc_tm_cppr): Likewise.
217 (elfcore_grok_ppc_tm_cdscr): Likewise.
218 (elfcore_grok_note): Call them.
220 2018-07-11 Maciej W. Rozycki <macro@mips.com>
222 * elfxx-mips.c (mips_tls_got_relocs): Use `bfd_link_dll' rather
223 than `!bfd_link_pic' in determining the dynamic symbol index.
224 Avoid the index of -1.
225 (mips_elf_initialize_tls_slots): Likewise. Flatten code by
226 moving `dyn' to the beginning of the function block.
228 2018-07-11 Maciej W. Rozycki <macro@mips.com>
229 Rich Felker <bugdal@aerifal.cx>
232 * elfxx-mips.c (mips_tls_got_relocs): Use `bfd_link_dll' rather
233 than `bfd_link_pic' to determine whether dynamic relocations are
235 (mips_elf_initialize_tls_slots): Likewise.
237 2018-07-10 Maciej W. Rozycki <macro@mips.com>
239 * elflink.c (bfd_elf_final_link): Rename `remove' local variable
242 2018-07-10 Alan Modra <amodra@gmail.com>
244 * elf32-xgate.h: Delete.
245 * elf32-xgate.c: Delete unnecessary forward declarations, add two
247 (xgate_elf_bfd_link_hash_table_create)
248 (xgate_elf_bfd_link_hash_table_free)
249 (xgate_elf_set_mach_from_flags, struct xgate_scan_param)
250 (stub_hash_newfunc, elf32_xgate_add_symbol_hook)
251 (elf32_xgate_setup_section_lists, elf32_xgate_size_stubs)
252 (elf32_xgate_build_stubs, elf32_xgate_check_relocs)
253 (elf32_xgate_relocate_section, _bfd_xgate_elf_set_private_flags)
254 (elf32_xgate_post_process_headers): Delete.
255 (elf32_xgate_backend_symbol_processing): New function.
256 (xgate_elf_ignore_reloc, xgate_elf_special_reloc)
257 (_bfd_xgate_elf_print_private_bfd_data): Make static.
258 (ELF_TARGET_ID, elf_info_to_howto, elf_backend_check_relocs)
259 (elf_backend_relocate_section, elf_backend_object_p)
260 (elf_backend_final_write_processing, elf_backend_can_gc_sections)
261 (elf_backend_post_process_headers, elf_backend_add_symbol_hook)
262 (bfd_elf32_bfd_link_hash_table_create)
263 (bfd_elf32_bfd_set_private_flags)
264 (xgate_stub_hash_lookup): Don't define.
265 (elf_backend_symbol_processing): Define.
266 * elf-bfd.h (elf_target_id): Delete XGATE_ELF_DATA.
268 2018-07-09 Maciej W. Rozycki <macro@mips.com>
270 * elfxx-mips.c (_bfd_mips_elf_adjust_dynamic_symbol): Don't set
271 `->needs_lazy_stub' if the stubs output section is the absolute
274 2018-07-09 H.J. Lu <hongjiu.lu@intel.com>
277 * configure.ac: Use changequote for "i[3-7]86-*-linux-*".
278 * configure: Regenerated.
280 2018-07-09 Alan Modra <amodra@gmail.com>
282 * elf32-m68hc1x.c (elf32_m68hc11_post_process_headers): Call
283 _bfd_elf_post_process_headers.
285 2018-07-06 Max Filippov <jcmvbkbc@gmail.com>
287 * elf32-xtensa.c (elf_xtensa_allocate_dynrelocs): Don't allocate
288 space for dynamic relocation for undefined weak symbol.
289 (elf_xtensa_relocate_section): Don't emit R_XTENSA_RELATIVE
290 relocation for undefined weak symbols.
291 (shrink_dynamic_reloc_sections): Don't shrink dynamic relocation
292 section for relocations against undefined weak symbols.
294 2018-07-06 Alan Hayward <alan.hayward@arm.com>
296 * elf.c (elfcore_grok_aarch_sve): New function.
297 (elfcore_grok_note): Check for Aarch64 SVE.
298 (elfcore_write_aarch_sve): New function.
299 (elfcore_write_register_note): Check for Aarch64 SVE.
300 * elf-bfd.h(elfcore_grok_aarch_sve): New declaration.
302 2018-07-06 Alan Modra <amodra@gmail.com>
304 * elf32-arm.c (elf32_arm_nabi_write_core_note): Don't use
305 DIAGNOTIC_PUSH and DIAGNOSTIC_POP unconditionally.
306 * elf32-ppc.c (ppc_elf_write_core_note): Likewise.
307 * elf32-s390.c (elf_s390_write_core_note): Likewise.
308 * elf64-ppc.c (ppc64_elf_write_core_note): Likewise.
309 * elf64-s390.c (elf_s390_write_core_note): Likewise.
310 * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewise.
312 2018-07-05 Jim Wilson <jimw@sifive.com>
314 * config.bfd (riscv32*-*-*): Renamed from riscv32-*-*.
315 (riscv64*-*-*): Likewise.
316 (riscv-*-*): Add as an alias for riscv32*-*-*.
318 2018-07-05 H.J. Lu <hongjiu.lu@intel.com>
321 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Remove x86
322 ISA properties with empty bits.
324 2018-07-05 Nick Clifton <nickc@redhat.com>
326 * po/ru.po: Updated Russian translation.
328 2018-07-05 Alan Modra <amodra@gmail.com>
330 * elf-bfd.h (_bfd_elf_ppc_merge_fp_attributes): Update prototype.
331 * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Return error
332 on mismatch. Remove "warning: " from messages. Track last bfd
334 (ppc_elf_merge_obj_attributes): Likewise. Handle status from
335 _bfd_elf_ppc_merge_fp_attributes.
336 * elf64-ppc.c (ppc64_elf_merge_private_bfd_data): Handle status
337 from _bfd_elf_ppc_merge_fp_attributes.
339 2018-07-04 H.J. Lu <hongjiu.lu@intel.com>
341 * Makefile.am (bfdinclude_HEADERS): Add $(INCDIR)/diagnostics.h.
342 * Makefile.in: Regenerated.
344 2018-07-03 Alan Modra <amodra@gmail.com>
346 * elflink.c (bfd_elf_final_link): Remove zero size .gnu.attributes
349 2018-07-03 Alan Modra <amodra@gmail.com>
351 * elf-bfd.h (ATTR_TYPE_FLAG_ERROR, ATTR_TYPE_HAS_ERROR): Define.
352 * elf-attrs.c (is_default_attr): Handle ATTR_TYPE_HAS_ERROR.
353 * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Use
354 ATTR_TYPE_FLAG_INT_VAL. Set ATTR_TYPE_HAS_ERROR on finding
355 incompatible attribute.
356 (ppc_elf_merge_obj_attributes): Likewise. Return
357 _bfd_elf_merge_object_attributes result.
358 * elf64-ppc.c (ppc64_elf_merge_private_bfd_data): Return
359 _bfd_elf_merge_object_attributes result.
361 2018-07-03 Alan Modra <amodra@gmail.com>
364 * elflink.c (_bfd_elf_fix_symbol_flags): Hide dynamic symbols
365 in discarded sections.
367 2018-07-02 Maciej W. Rozycki <macro@mips.com>
369 * elfxx-mips.c (_bfd_mips_elf_create_dynamic_sections): Set
370 `mark' for symbols created from `mips_elf_dynsym_rtproc_names'
373 2018-07-02 Maciej W. Rozycki <macro@mips.com>
375 * elf64-mips.c (micromips_elf64_howto_table_rel): Add
376 R_MICROMIPS_HI0_LO16, R_MICROMIPS_TLS_GD, R_MICROMIPS_TLS_LDM,
377 R_MICROMIPS_TLS_DTPREL_HI16, R_MICROMIPS_TLS_DTPREL_LO16,
378 R_MICROMIPS_TLS_GOTTPREL, R_MICROMIPS_TLS_TPREL_HI16,
379 R_MICROMIPS_TLS_TPREL_LO16, R_MICROMIPS_GPREL7_S2 and
380 R_MICROMIPS_PC23_S2 relocation entries.
381 (micromips_elf64_howto_table_rela): Likewise.
382 (micromips_reloc_map): Likewise.
383 * elfn32-mips.c (elf_micromips_howto_table_rel): Likewise.
384 (elf_micromips_howto_table_rela): Likewise.
385 (micromips_reloc_map): Likewise.
387 2018-07-02 H.J. Lu <hongjiu.lu@intel.com>
390 * elf64-x86-64.c (elf_x86_64_relocate_section): Clear the
391 R_X86_64_converted_reloc_bit bit.
393 2018-07-02 Jeff Muizelaar <jrmuizel@gmail.com>
394 Tom Tromey <tom@tromey.com>
398 * mach-o.c (bfd_mach_o_fat_close_and_cleanup): New function.
399 (bfd_mach_o_close_and_cleanup): Redefine.
400 * archive.c (_bfd_unlink_from_archive_parent): New function,
402 (_bfd_archive_close_and_cleanup): ..here.
403 (bfd_generic_archive_p): Do not clear archive's format.
404 * libbfd-in.h (_bfd_unlink_from_archive_parent): Declare.
405 * libbfd.h: Regenerate.
407 2018-07-02 Thomas Preud'homme <thomas.preudhomme@arm.com>
409 * archures.c (bfd_mach_arm_5TEJ, bfd_mach_arm_6, bfd_mach_arm_6KZ,
410 bfd_mach_arm_6T2, bfd_mach_arm_6K, bfd_mach_arm_7, bfd_mach_arm_6M,
411 bfd_mach_arm_6SM, bfd_mach_arm_7EM, bfd_mach_arm_8, bfd_mach_arm_8R,
412 bfd_mach_arm_8M_BASE, bfd_mach_arm_8M_MAIN): Define.
413 * bfd-in2.h: Regenerate.
414 * cpu-arm.c (arch_info_struct): Add entries for above new
416 * elf32-arm.c (bfd_arm_get_mach_from_attributes): Add Tag_CPU_arch to
417 bfd_mach_arm mapping logic for pre Armv4 and Armv5TEJ and later
418 architectures. Force assert failure for any new Tag_CPU_arch value.
420 2018-07-02 Thomas Preud'homme <thomas.preudhomme@arm.com>
422 * doc/bfdint.texi: Use command-line consistently when used in a
424 * doc/bfdsumm.texi: Likewise.
426 2018-06-29 Maciej W. Rozycki <macro@mips.com>
428 * elfxx-mips.c (allocate_dynrelocs): Remove extraneous symbol
429 visibility check made for undefined weak symbols.
431 2018-06-26 Nick Clifton <nickc@redhat.com>
433 * po/uk.po: Updated Ukranian translation.
435 2018-06-25 Nick Clifton <nickc@redhat.com>
437 * elfnn-aarch64.c (_bfd_aarch64_erratum_835769_stub_name): Check
438 for malloc returning NULL.
439 (_bfd_aarch64_erratum_843419_fixup): Check for
440 _bfd_aarch64_erratum_835769_stub_name returning NULL.
442 2018-06-24 Nick Clifton <nickc@redhat.com>
444 * po/bfd.pot: Regenerate.
446 2018-06-24 Nick Clifton <nickc@redhat.com>
448 * version.m4: Update version string to 2.31.51.
449 * configure: Regenerate.
451 2018-06-24 Nick Clifton <nickc@redhat.com>
455 2018-06-21 Maciej W. Rozycki <macro@mips.com>
457 * elfxx-mips.c (_bfd_mips_elf_compact_eh_encoding)
458 (_bfd_mips_elf_cant_unwind_opcode): Correct formatting.
460 2018-06-21 Maciej W. Rozycki <macro@mips.com>
462 * elfxx-mips.c (_bfd_mips_post_process_headers): Keep
463 EI_ABIVERSION setting together.
465 2018-06-21 Maciej W. Rozycki <macro@mips.com>
467 * elfxx-mips.c (MIPS_LIBC_ABI_DEFAULT, MIPS_LIBC_ABI_MIPS_PLT)
468 (MIPS_LIBC_ABI_UNIQUE, MIPS_LIBC_ABI_MIPS_O32_FP64)
469 (MIPS_LIBC_ABI_MAX): New enumeration constants.
470 (_bfd_mips_post_process_headers): Use them in place of magic
473 2018-06-21 Jim Wilson <jimw@sifive.com>
475 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Update comment.
476 Use SYMBOL_REFERENCES_LOCAL. Add asserts for h->got.offset.
478 2018-06-21 Alan Modra <amodra@gmail.com>
480 * doc/Makefile.am (AUTOMAKE_OPTIONS): Add "foreign".
481 * doc/Makefile.in: Regenerate.
483 2018-06-20 Renlin Li <renlin.li@arm.com>
485 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Use PG_OFFSET
486 to resolve BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC,
487 BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC,
488 BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC,
489 BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC,
490 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
491 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
492 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
493 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
495 2018-06-20 Nick Clifton <nickc@redhat.com>
498 * opncls.c (get_build_id): Check for a negative or excessive data
499 size in the build-id note.
501 2018-06-20 Nick Clifton <nickc@redhat.com>
504 * mach-o.c (cputype): New function.
505 (cpusubtype): New function.
506 (bfd_mach_o_bfd_print_private_data): New function. Dispalys the
507 values in the MACH-O file header.
508 (bfd_mach_o_bfd_copy_private_header_data): Copy the cputype and
509 cpusubtype fields from the input bfd's mach-o header to the output
511 * mach-o-target.c (bfd_mach_o_bfd_print_private_bfd_data):
512 Redefine to bfd_mach_o_bfd_print_private_data.
513 * mach-o.h (bfd_mach_o_bfd_print_private_bfd_data): Prototype.
515 2018-06-19 Maciej W. Rozycki <macro@mips.com>
518 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Verify the
519 `.got.plt' entry referred is in range.
520 (mips_finish_exec_plt): Correct the range check for `.got.plt'
521 start. Replace the assertion used for that with a proper error
524 2018-06-19 Maciej W. Rozycki <macro@mips.com>
526 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Fix
529 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
531 * Makefile.am (AUTOMAKE_OPTIONS): Remove 1.11.
532 (INCLUDES): Rename to ...
533 (AM_CPPFLAGS): ... this.
534 * configure.ac: Remove AC_PREREQ.
535 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove 1.9, cygnus, add
536 info-in-builddir no-texinfo.tex.
537 (info_TEXINFOS): Rename bfd.texinfo to bfd.texi.
538 * doc/bfd.texinfo: Rename to ...
539 * doc/bfd.texi: ... this.
540 * Makefile.in: Re-generate.
541 * aclocal.m4: Re-generate.
542 * config.in: Re-generate.
543 * configure: Re-generate.
544 * doc/Makefile.in: Re-generate.
546 2018-06-18 Mephi <mephi42@gmail.com>
549 * mach-o-x86-64.c (x86_64_howto_table): Add entry for
550 BFD_RELOC_MACH_O_X86_64_RELOC_TLV.
551 (bfd_mach_o_x86_64_canonicalize_one_reloc): Handle the new reloc.
552 (bfd_mach_o_x86_64_swap_reloc_out): Likewise.
553 * reloc.c (BFD_RELOC_MACH_O_X86_64_TV): New entry.
554 * bfd-in2.h: Regenerate.
555 * libbfd.h: Regenerate.
557 2018-06-14 Faraz Shahbazker <Faraz.Shahbazker@mips.com>
559 * elfxx-mips.c (print_mips_ases): Add GINV extension.
561 2018-06-14 H.J. Lu <hongjiu.lu@intel.com>
564 * elf.c (_bfd_elf_get_symbol_version_string): Check if the first
565 symbol version is base version.
567 2018-06-14 Alan Modra <amodra@gmail.com>
569 * elf-bfd.h (struct elf_link_hash_table): Add "dynamic_relocs".
570 * elflink.c (_bfd_elf_init_2_index_sections): Comment fix.
571 (_bfd_elf_add_dynamic_entry): Set "dynamic_relocs".
572 (_bfd_elf_link_renumber_dynsyms): Exclude all section symbols when
573 "dynamic_relocs" is not set.
574 * elfxx-mips.c (count_section_dynsyms): Likewise.
576 2018-06-14 Alan Modra <amodra@gmail.com>
579 * bfdio.c (bfd_seek): Optimize away seeks to current position.
581 2018-06-13 Scott Egerton <scott.egerton@imgtec.com>
582 Faraz Shahbazker <Faraz.Shahbazker@mips.com>
584 * elfxx-mips.c (print_mips_ases): Add CRC.
586 2018-06-08 H.J. Lu <hongjiu.lu@intel.com>
589 * elfxx-x86.c (elf_x86_hide_linker_defined): New function.
590 (_bfd_x86_elf_link_check_relocs): Use it to hide hidden
591 __bss_start, _end and _edata in shared libraries.
593 2018-06-07 Alan Modra <amodra@gmail.com>
595 * elf32-tic6x.c (elf32_tic6x_check_relocs): Reference
596 __c6xabi_DSBT_BASE explicitly for R_C6000_SBR_* relocs.
598 2018-06-05 Alan Modra <amodra@gmail.com>
600 * bfd.c (struct bfd): Update comment on "where" usage.
601 * bfdio.c (bfd_bwrite, bfd_stat): Use and update "iovec",
602 "iostream", and "where" from containing archive file. Return
604 (bfd_bread): Similarly, and return error attempted out of
605 bounds archive element access.
606 (bfd_tell, bfd_flush): Use and update "iovec", "iostream", and
607 "where" from containing archive file.
608 (bfd_seek): Likewise. Return error on NULL iovec. Don't
609 attempt to optimize away seeks. Don't paper over errors by
611 (bfd_get_mtime): Call bfd_stat rather than iovec->bstat.
612 (bfd_get_size): Likewise.
613 (bfd_mmap): Operate on and use iovec of containing archive
614 file. Return error on NULL iovec.
615 * cache.c (bfd_cache_lookup_worker): Abort if working on
617 (cache_bread_1): Delete bfd parameter, add FILE* parameter.
618 Don't ignore zero byte reads.
619 (cache_bread): Look up FILE* in cache here. Error on NULL
621 (cache_bwrite): Rename "where" to "from".
622 (cache_bmmap): Don't handle archive elements.
623 * coffcode.h (coff_slurp_line_table): Exit early on zero
625 * bfd-in2.h: Regenerate.
627 2018-06-05 Alan Modra <amodra@gmail.com>
630 * plugin.c (bfd_plugin_open_input): Allow for possibility of
631 nested archives. Open file again for plugin.
632 (try_claim): Don't save and restore file position. Close file
634 * sysdep.h (O_BINARY): Define.
636 2018-06-04 Max Filippov <jcmvbkbc@gmail.com>
638 * elf32-xtensa.c (xtensa_read_table_entries): Make global.
639 (compute_fill_extra_space): Drop declaration. Rename function to
640 xtensa_compute_fill_extra_space.
641 (compute_ebb_actions, remove_dead_literal): Update references to
642 compute_fill_extra_space.
644 2018-06-04 Volodymyr Arbatov <arbatov@cadence.com>
646 * elf32-xtensa.c (elf32xtensa_separate_props): New global
648 (xtensa_add_names): New function.
649 (xtensa_property_section_name): Add new parameter
650 separate_sections, use it to choose property section name.
651 (xtensa_get_separate_property_section): New function.
652 (xtensa_get_property_section): Invoke
653 xtensa_get_separate_property_section to get individual property
654 section if it exists, common property section otherwise.
655 (xtensa_make_property_section): Pass elf32xtensa_separate_props
656 to xtensa_property_section_name.
658 2018-06-04 H.J. Lu <hongjiu.lu@intel.com>
661 * bfd-in.h: Include "diagnostics.h".
662 * bfd-in2.h: Regenerated.
663 * elf32-arm.c (elf32_arm_nabi_write_core_note): Use
664 DIAGNOSTIC_PUSH, DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION and
665 DIAGNOSTIC_POP to silence GCC 8.1 warnings with
666 -Wstringop-truncation.
667 * elf32-ppc.c (ppc_elf_write_core_note): Likewse.
668 * elf32-s390.c (elf_s390_write_core_note): Likewse.
669 * elf64-ppc.c (ppc64_elf_write_core_note): Likewse.
670 * elf64-s390.c (elf_s390_write_core_note): Likewse.
671 * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewse.
673 2018-06-03 Jim Wilson <jimw@sifive.com>
676 * elfnn-riscv.c (riscv_elf_relocate_section) <R_RISCV_CALL>: Check
677 for and handle an undefined weak with no PLT.
680 * elfnn-riscv.c (riscv_relax_delete_bytes): Add versioned_hidden check
681 to code that ignores duplicate symbols.
683 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
685 * version.m4: Bump version to 2.30.52
686 * configure: Regenerated.
688 2018-06-01 Alan Modra <amodra@gmail.com>
690 * bfd.c (_bfd_error_handler): Arrange for this function to be
691 declared in bfd-in2.h.
692 * libbfd-in.h (_bfd_error_handler): Don't declare.
693 * libbfd.h: Regenerate.
694 * bfd-in2.h: Regenerate.
696 2018-05-30 Amaan Cheval <amaan.cheval@gmail.com>
698 * config.bfd (x86_64-*-*): Add pei-x86-64 target to x86_64-*-rtems*
699 This is needed to generate UEFI application image files from ELFs.
701 2018-05-28 H.J. Lu <hongjiu.lu@intel.com>
703 * elf32-i386.c (elf_i386_lazy_plt): Add plt_tlsdesc_entry,
704 plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset,
705 plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and
706 plt_tlsdesc_got2_insn_end for TLSDESC entry.
707 (elf_i386_lazy_ibt_plt): Likewise.
708 (elf_i386_nacl_plt): Likewise.
709 * elf64-x86-64.c (tlsdesc_plt_entry): Moved and renamed to ...
710 (elf_x86_64_tlsdesc_plt_entry): This.
711 (elf_x86_64_lazy_plt): Add plt_tlsdesc_entry,
712 plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset,
713 plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and
714 plt_tlsdesc_got2_insn_end for TLSDESC entry.
715 (elf_x86_64_lazy_bnd_plt): Likewise.
716 (elf_x86_64_lazy_ibt_plt): Likewise.
717 (elf_x32_lazy_ibt_plt): Likewise.
718 (elf_x86_64_nacl_plt): Likewise.
719 (elf_x86_64_finish_dynamic_sections): Use plt_tlsdesc_entry,
720 plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset,
721 plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and
722 plt_tlsdesc_got2_insn_end to update TLSDESC entry.
723 * elfxx-x86.h (elf_x86_lazy_plt_layout): Update comments.
724 Add plt_tlsdesc_entry, plt_tlsdesc_entry_size,
725 plt_tlsdesc_got1_offset, plt_tlsdesc_got2_offset,
726 plt_tlsdesc_got1_insn_end and plt_tlsdesc_got2_insn_end.
727 (elf_x86_non_lazy_plt_layout): Update comments.
728 (elf_x86_plt_layout): Likewise.
730 2018-05-28 H.J. Lu <hongjiu.lu@intel.com>
733 * elf-s390-common.c (elf_s390_add_symbol_hook): Removed.
734 * elf32-arc.c (elf_arc_add_symbol_hook): Likewise.
735 (elf_backend_add_symbol_hook): Likewise.
736 * elf32-m68k.c (elf_m68k_add_symbol_hook): Likewise.
737 (elf_backend_add_symbol_hook): Likewise.
738 * elf32-s390.c (elf_backend_add_symbol_hook): Likewise.
739 * elf32-sparc.c (elf32_sparc_add_symbol_hook): Likewise.
740 (elf_backend_add_symbol_hook): Likewise.
741 * elf64-s390.c (elf_backend_add_symbol_hook): Likewise.
742 * elfxx-aarch64.c (_bfd_aarch64_elf_add_symbol_hook): Likewise.
743 * elfxx-aarch64.h (_bfd_aarch64_elf_add_symbol_hook): Likewise.
744 (elf_backend_add_symbol_hook): Likewise.
745 * elf32-arm.c (elf32_arm_add_symbol_hook): Remove STT_GNU_IFUNC
747 * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise.
748 * elf64-ppc.c (ppc64_elf_add_symbol_hook): Likewise.
749 * elf64-sparc.c (elf64_sparc_add_symbol_hook): Likewise.
750 * elflink.c (elf_link_add_object_symbols): Set
751 elf_gnu_symbol_ifunc for STT_GNU_IFUNC symbols.
753 2018-05-26 H.J. Lu <hongjiu.lu@intel.com>
756 * elf-bfd.h (_bfd_elf_link_hide_sym_by_version): New.
757 * elflink.c (_bfd_elf_link_hide_versioned_symbol): New function.
758 Extracted from _bfd_elf_link_assign_sym_version.
759 (_bfd_elf_link_hide_sym_by_version): New function.
760 (_bfd_elf_link_assign_sym_version): Use
761 _bfd_elf_link_hide_versioned_symbol.
762 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Call
763 _bfd_elf_link_hide_sym_by_version instead of
764 bfd_hide_sym_by_version. Don't check unversioned symbol.
766 2018-05-25 Alan Modra <amodra@gmail.com>
768 * Makefile.in: Regenerate.
769 * po/SRC-POTFILES.in: Regenerate.
771 2018-05-25 Alan Modra <amodra@gmail.com>
773 * configure.ac (bfd_cv_hidden): Run test with -Werror in CFLAGS.
774 * configure: Regenerate.
776 2018-05-23 H.J. Lu <hongjiu.lu@intel.com>
778 * elf64-ppc.c (ppc64_elf_write_core_note): Add ATTRIBUTE_NONSTRING
781 2018-05-22 Alan Modra <amodra@gmail.com>
784 * elf32-hppa.c (hppa_get_stub_entry): Return NULL when link_sec
786 (elf32_hppa_size_stubs): Only create stubs for load, alloc, code
788 (final_link_relocate): Revert last change.
790 2018-05-22 Alan Modra <amodra@gmail.com>
793 * elf32-hppa.c (final_link_relocate): Don't look for plt call
794 stubs in non-alloc sections.
796 2018-05-21 H.J. Lu <hongjiu.lu@intel.com>
799 * aout-target.h (MY_bfd_link_hide_symbol): New.
800 * aout-tic30.c (MY_bfd_link_hide_symbol): Likewise.
801 * binary.c (binary_bfd_link_hide_symbol): Likewise.
802 * coff-alpha.c (_bfd_ecoff_bfd_link_hide_symbol): Likewise.
803 * coff-mips.c (_bfd_ecoff_bfd_link_hide_symbol): Likewise.
804 * coff-rs6000.c (_bfd_xcoff_bfd_link_hide_symbol): Likewise.
805 * coffcode.h (coff_bfd_link_hide_symbol): Likewise.
806 * elf-bfd.h (_bfd_elf_link_hide_symbol): Likewise.
807 * elfxx-target.h (bfd_elfNN_bfd_link_hide_symbol): Likewise.
808 * i386msdos.c (msdos_bfd_link_hide_symbol): Likewise.
809 * ihex.c (ihex_bfd_link_hide_symbol): Likewise.
810 * libbfd-in.h (_bfd_nolink_bfd_link_hide_symbol): Likewise.
811 * linker.c (_bfd_generic_link_hide_symbol): Likewise.
812 (bfd_link_hide_symbol): Likewise.
813 * mach-o-target.c (bfd_mach_o_bfd_link_hide_symbol): Likewise.
814 * mmo.c (mmo_bfd_link_hide_symbol): Likewise.
815 * pef.c (bfd_pef_bfd_link_hide_symbol): Likewise.
816 * plugin.c (bfd_plugin_bfd_link_hide_symbol): Likewise.
817 * ppcboot.c (ppcboot_bfd_link_hide_symbol): Likewise.
818 * som.c (som_bfd_link_hide_symbol): Likewise.
819 * srec.c (srec_bfd_link_hide_symbol): Likewise.
820 * tekhex.c (tekhex_bfd_link_hide_symbol): Likewise.
821 * vms-alpha.c (vms_bfd_link_hide_symbol): Likewise.
822 (alpha_vms_bfd_link_hide_symbol): Likewise.
823 * xsym.c (bfd_sym_bfd_link_hide_symbol): Likewise.
824 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
825 _bfd_generic_link_hide_symbol.
826 (rs6000_xcoff64_aix_vec): Likewise.
827 * elflink.c (bfd_elf_record_link_assignment): Don't make forced
828 local symbol dynamic.
829 (_bfd_elf_link_hide_symbol): New function.
830 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
831 check root.ldscript_def.
832 * targets.c (bfd_target): Add _bfd_link_hide_symbol.
833 (BFD_JUMP_TABLE_LINK): Add NAME##_bfd_link_hide_symbol.
834 * bfd-in2.h: Regenerated.
835 * libbfd.h: Likewise.
837 2018-05-21 H.J. Lu <hongjiu.lu@intel.com>
840 * elf.c (setup_group): Mark section in a section group with
843 2018-05-18 H.J. Lu <hongjiu.lu@intel.com>
846 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
847 set eh->local_ref to 1 if a symbol is versioned and there is a
850 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
852 * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Handle
855 2018-05-18 Jim Wilson <jimw@sifive.com>
857 * elfnn-riscv.c (allocate_dynrelocs): Discard dynamic relocations if
858 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
859 (riscv_elf_relocate_section): Don't generate dynamic relocation if
860 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
861 (riscv_elf_finish_dynamic_symbol): Likewise.
863 2018-05-18 John Darrington <john@darrington.wattle.id.au>
865 * Makefile.am: Add s12z files.
866 * Makefile.in: Regenerate.
867 * archures.c: Add bfd_s12z_arch.
868 * bfd-in.h: Add exports of bfd_putb24 and bfd_putl24.
869 * bfd-in2.h: Regenerate.
870 * config.bfd: Add s12z target.
871 * configure.ac: Add s12z target.
872 * configure: Regenerate.
873 * cpu-s12z.c: New file.
874 * elf32-s12z.c: New file.
875 * libbfd.c (bfd_putb24): New function.
876 (bfd_putl24): New function.
877 * libbfd.h: Regenerate.
878 * reloc.c: Add s12z relocations.
879 (bfd_get_reloc_size): Handle size 5 relocs.
880 * targets.c: Add s12z_elf32_vec.
882 2018-05-18 H.J. Lu <hongjiu.lu@intel.com>
885 * elf32-i386.c (elf_i386_relocate_section): Handle R_386_GOT32X
887 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
888 set eh->local_ref to 1 for linker defined symbols.
890 2018-05-18 Alan Modra <amodra@gmail.com>
893 * elf.c (setup_group): Formatting. Check that SHT_GROUP entries
894 don't point at other SHT_GROUP sections. Set shdr corresponding
895 to invalid entry, to NULL rather than section 0. Identify
896 SHT_GROUP section index when reporting an error. Cope with NULL
899 2018-05-18 Alan Modra <amodra@gmail.com>
901 * libbfd-in.h (ATTRIBUTE_HIDDEN): Define and use throughout.
902 * configure.ac (HAVE_HIDDEN): Check compiler support for hidden
904 * libbfd.h: Regenerate.
905 * configure: Regenerate.
906 * config.in: Regenerate.
908 2018-05-18 Alan Modra <amodra@gmail.com>
910 * libbfd-in.h: Add include guard.
911 * libcoff-in.h: Likewise.
912 * doc/Makefile.am (libbfd.h, libcoff.h): Append another #endif.
913 * doc/Makefile.in: Regenerate.
914 * libbfd.h: Regenerate.
915 * libcoff.h: Regenerate.
917 2018-05-16 Maciej W. Rozycki <macro@mips.com>
919 * elf32-nds32.c (nds32_convert_32_to_16): Preset `insn_type'.
921 2018-05-16 Alan Modra <amodra@gmail.com>
924 * format.c (struct bfd_preserve): Add section_id.
925 (bfd_preserve_save, bfd_preserve_restore): Save and restore
927 (bfd_reinit): Set _bfd_section_id.
928 (bfd_check_format_matches): Put all matches of any priority into
929 matching_vector. Save initial section id and start each attempted
930 match at that section id.
931 * libbfd-in.h (_bfd_section_id): Declare.
932 * section.c (_bfd_section_id): Rename from section_id and make
934 (bfd_get_next_section_id): Delete.
935 * elf64-ppc.c (ppc64_elf_setup_section_lists): Replace use of
936 bfd_get_section_id with _bfd_section_id.
937 * libbfd.h: Regenerate.
938 * bfd-in2.h: Regenerate.
940 2018-05-15 Christophe Guillon <christophe.guillon@st.com>
942 * coffcode.h (coff_bigobj_swap_aux_in): Make sure that all fields
943 of the aux structure are initialised.
945 2018-05-15 Francois H. Theron <francois.theron@netronome.com>
947 * targets.c: Wrap nfp_elf64_vec in BFD64 ifdef.
949 2018-05-15 Nick Clifton <nickc@redhat.com>
951 * po/pt.po: New Portuguese translation.
952 * configure.ac (ALL_LINGUAS): Add pt.
953 * configure: Regenerate.
955 2018-05-14 H.J. Lu <hongjiu.lu@intel.com>
958 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Don't issue
959 an error on IFUNC pointer defined in PDE.
960 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Call
961 _bfd_x86_elf_link_fixup_ifunc_symbol.
962 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
963 * elfxx-x86.c (_bfd_x86_elf_link_fixup_ifunc_symbol): New
965 * elfxx-x86.h (_bfd_x86_elf_link_fixup_ifunc_symbol): New.
967 2018-05-14 H.J. Lu <hongjiu.lu@intel.com>
970 * elfxx-x86.c (elf_x86_linker_defined): New function.
971 (_bfd_x86_elf_link_check_relocs): Use it to mark __bss_start,
972 _end and _edata locally defined within executables.
974 2018-05-12 Alan Modra <amodra@gmail.com>
977 * elf.c (rewrite_elf_program_header): Use segment_mark only for
978 PT_LOAD headers. Delete first_matching_lma and first_suggested_lma.
979 Instead make matching_lma and suggested_lma pointers to the
980 sections. Align section vma and lma calculated from segment.
981 Don't clear includes_phdrs or includes_filehdr based on p_paddr
982 test. Try to handle alignment padding before first section by
983 adjusting new segment lma down. Adjust PT_PHDR map p_paddr.
985 2018-05-09 Dimitar Dimitrov <dimitar@dinux.eu>
987 * elf32-pru.c (pru_elf32_do_ldi32_relocate): Make LDI32 relocation
988 conformant to TI ABI.
989 (pru_elf32_relax_section): Likewise.
990 (pru_elf_relax_delete_bytes): Fix offsets for new LDI32 code.
991 * elf32-pru.c (pru_elf32_do_ldi32_relocate): Ignore addend.
992 (pru_elf32_pmem_relocate): Trap - should not get here.
993 (pru_elf32_relocate_section): Add support for REL relocations.
994 (elf_info_to_howto_rel): Enable REL.
995 (elf_backend_may_use_rel_p): Likewise.
996 (elf_backend_may_use_rela_p): Likewise.
997 (elf_backend_default_use_rela_p): Likewise.
999 2018-05-09 Alan Modra <amodra@gmail.com>
1002 * peXXigen.c (pe_print_edata): Correct minimum size.
1004 2018-05-09 Alan Modra <amodra@gmail.com>
1007 * peXXigen.c (pe_print_idata): Bound check hint_addr.
1009 2018-05-08 Nick Clifton <nickc@redhat.com>
1012 * elf.c (bfd_elf_get_str_section): Check for an excessively large
1014 * elf-attrs.c (_bfd_elf_parse_attributes): Issue an error if the
1015 attribute section is larger than the size of the file.
1017 2018-05-07 Alan Modra <amodra@gmail.com>
1019 * cofflink.c (_bfd_coff_link_input_bfd): Use memcmp rather than
1020 strncmp when checking for ".bf" special symbol.
1021 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Make pe_required_section_flags
1022 section name a char array, remove sentinal known_sections entry,
1023 and adjust loop over known_sections to suit. Use memcmp rather
1026 2018-05-04 Alan Modra <amodra@gmail.com>
1028 * elf-linux-core.h (struct elf_external_linux_prpsinfo32_ugid32),
1029 (struct elf_external_linux_prpsinfo32_ugid16),
1030 (struct elf_external_linux_prpsinfo64_ugid32),
1031 (struct elf_external_linux_prpsinfo64_ugid16): Add ATTRIBUTE_NONSTRING
1032 to pr_fname and pr_psargs fields. Remove GCC diagnostic pragmas.
1034 * elf.c (elfcore_write_prpsinfo): ..here. Indent nested preprocessor
1036 * elf32-arm.c (elf32_arm_nabi_write_core_note): Add ATTRIBUTE_NONSTRING
1038 * elf32-ppc.c (ppc_elf_write_core_note): Likewise.
1039 * elf32-s390.c (elf_s390_write_core_note): Likewise.
1040 * elf64-s390.c (elf_s390_write_core_note): Likewise.
1041 * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewise.
1042 * elf64-x86-64.c (elf_x86_64_write_core_note): Add GCC diagnostic
1044 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Use strnlen to avoid
1045 false positive gcc-8 warning.
1046 * cofflink.c (_bfd_coff_link_input_bfd): Likewise.
1048 2018-05-04 Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
1050 * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Fix the order
1051 of arguments when warning about different long double types.
1053 2018-05-03 Simon Atanasyan <simon@atanasyan.com>
1055 * elf32-mips.c: (elf32_mips_fixup_symbol): New function.
1056 (elf_backend_fixup_symbol): New macro.
1057 * elfxx-mips.c: (mips_elf_output_extsym): Discard _gp_disp
1059 (_bfd_mips_elf_finish_dynamic_symbol): Likewise.
1061 2018-04-30 Francois H. Theron <francois.theron@netronome.com>
1063 * Makefile.am: Added NFP files to build.
1064 * archures.c: Added bfd_arch_nfp
1065 * config.bfd: Added NFP support.
1066 * configure.ac: Added NFP support.
1067 * cpu-nfp.c: New, for NFP support.
1068 * elf-bfd.h: Added elf_section_info()
1069 * elf64-nfp.c: New, for NFP support.
1070 * po/SRC-POTFILES.in: Added NFP source files.
1071 * targets.c: Added nfp_elf64_vec
1072 * bfd-in2.h: Regenerate.
1073 * Makefile.in: Regenerate.
1074 * configure: Regenerate.
1076 2018-04-27 Alan Modra <amodra@gmail.com>
1078 * bfd-in2.h: Regenerate.
1079 * libbfd.h: Regenerate.
1081 2018-04-27 Alan Modra <amodra@gmail.com>
1085 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't drop plt
1087 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Comment fixes.
1089 2018-04-26 Pedro Alves <palves@redhat.com>
1091 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't consider
1092 ifunc and non-ifunc symbols duplicates.
1094 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1095 Mickaël Guêné <mickael.guene@st.com>
1097 * elf32-arm.c (elf32_arm_fdpic_thumb_plt_entry): New.
1098 (elf32_arm_plt_needs_thumb_stub_p): Handle thumb-only case.
1099 (elf32_arm_populate_plt_entry): Likewise.
1100 (elf32_arm_output_plt_map_1): Likewise.
1101 (elf32_arm_output_arch_local_syms): Likewise.
1103 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1104 Mickaël Guêné <mickael.guene@st.com>
1106 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Handle
1107 _GLOBAL_OFFSET_TABLE_ in FDPIC mode.
1109 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1110 Mickaël Guêné <mickael.guene@st.com>
1112 * elf32-arm.c (bfd_elf32_arm_set_target_params): Handle FDPIC case
1115 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1116 Mickaël Guêné <mickael.guene@st.com>
1118 * elf32-arm.c (DEFAULT_STACK_SIZE): New.
1119 (elf32_arm_always_size_sections): Create stack segment.
1121 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1122 Mickaël Guêné <mickael.guene@st.com>
1124 * bfd-in2.h (BFD_RELOC_ARM_TLS_GD32_FDPIC)
1125 (BFD_RELOC_ARM_TLS_LDM32_FDPIC, BFD_RELOC_ARM_TLS_IE32_FDPIC): New
1127 * elf32-arm.c (elf32_arm_howto_table_2): Add R_ARM_TLS_GD32_FDPIC,
1128 R_ARM_TLS_LDM32_FDPIC, R_ARM_TLS_IE32_FDPIC relocations.
1129 (elf32_arm_reloc_map): Add R_ARM_TLS_GD32_FDPIC,
1130 R_ARM_TLS_LDM32_FDPIC, R_ARM_TLS_IE32_FDPIC.
1131 (struct elf32_arm_link_hash_table): Update comment.
1132 (elf32_arm_final_link_relocate): Handle TLS FDPIC relocations.
1133 (IS_ARM_TLS_RELOC): Likewise.
1134 (elf32_arm_check_relocs): Likewise.
1135 (allocate_dynrelocs_for_symbol): Likewise.
1136 (elf32_arm_size_dynamic_sections): Update comment.
1137 * reloc.c: Add BFD_RELOC_ARM_TLS_GD32_FDPIC,
1138 BFD_RELOC_ARM_TLS_LDM32_FDPIC, BFD_RELOC_ARM_TLS_IE32_FDPIC.
1140 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1141 Mickaël Guêné <mickael.guene@st.com>
1143 * elf32-arm.c (elf32_arm_fdpic_plt_entry): New.
1144 (elf32_arm_create_dynamic_sections): Handle FDPIC.
1145 (elf32_arm_allocate_plt_entry): Likewise.
1146 (elf32_arm_populate_plt_entry): Likewise.
1147 (elf32_arm_output_plt_map_1): Likewise.
1149 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1150 Mickaël Guêné <mickael.guene@st.com>
1152 * elf32-arm.c (struct fdpic_local): New.
1153 (elf_arm_obj_tdata): Add local_fdpic_cnts field.
1154 (elf32_arm_local_fdpic_cnts): New.
1155 (struct fdpic_global): New.
1156 (elf32_arm_link_hash_entry): Add fdpic_cnts field.
1157 (elf32_arm_link_hash_table): Add srofixup field.
1158 (arm_elf_add_rofixup): New.
1159 (arm_elf_fill_funcdesc): New.
1160 (elf32_arm_link_hash_newfunc): Handle fdpic_cnts.
1161 (elf32_arm_allocate_local_sym_info): Likewise.
1162 (create_got_section): Create .rofixup section.
1163 (elf32_arm_copy_indirect_symbol): Handle fdpic_cnts.
1164 (bfd_elf32_arm_set_target_params): Handle FDPIC.
1165 (elf32_arm_final_link_relocate): Likewise.
1166 (elf32_arm_check_relocs): Likewise.
1167 (allocate_dynrelocs_for_symbol): Likewise.
1168 (elf32_arm_size_dynamic_sections): Likewise.
1169 (elf32_arm_finish_dynamic_sections): Likewise.
1170 (elf32_arm_output_arch_local_syms): Likewise.
1171 (elf32_arm_fdpic_omit_section_dynsym): New.
1173 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1174 Mickaël Guêné <mickael.guene@st.com>
1176 * bfd-in2.c (BFD_RELOC_ARM_GOTFUNCDESC)
1177 (BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC)
1178 (BFD_RELOC_ARM_FUNCDESC_VALUE): New.
1179 * elf32-arm.c (elf32_arm_howto_table_2): Add R_ARM_GOTFUNCDESC,
1180 R_ARM_GOTOFFFUNCDESC, R_ARM_FUNCDESC, R_ARM_FUNCDESC_VALUE.
1181 (elf32_arm_howto_from_type): Take new members of
1182 elf32_arm_howto_table_2 into account.
1183 (elf32_arm_reloc_map): Add BFD_RELOC_ARM_GOTFUNCDESC,
1184 BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC,
1185 BFD_RELOC_ARM_FUNCDESC_VALUE.
1186 * reloc.c: Add BFD_RELOC_ARM_GOTFUNCDESC,
1187 BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC,
1188 BFD_RELOC_ARM_FUNCDESC_VALUE.
1190 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1191 Mickaël Guêné <mickael.guene@st.com>
1193 * elf32-arm.c (elf32_arm_print_private_bfd_data): Support
1194 EF_ARM_PIC and ELFOSABI_ARM_FDPIC.
1195 (elf32_arm_post_process_headers): Support ELFOSABI_ARM_FDPIC.
1196 (ELF_OSABI): Define to ELFOSABI_ARM_FDPIC.
1198 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1199 Mickaël Guêné <mickael.guene@st.com>
1201 * config.bfd (arm*-*-linux-*): Add arm_elf32_fdpic_be_vec and
1202 arm_elf32_fdpic_le_vec to targ_selvecs. Accept
1203 arm*-*-uclinuxfdpiceabi.
1204 * configure.ac: Add support for arm_elf32_fdpic_be_vec and
1205 arm_elf32_fdpic_le_vec.
1206 * configure: Regenerate.
1207 * elf32-arm.c (struct elf32_arm_link_hash_table): Add fdpic_p.
1208 (elf32_arm_link_hash_table_create): Initialize fdpic_p.
1209 (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME, TARGET_BIG_SYM)
1210 (TARGET_BIG_NAME, elf_match_priority): Define for FDPIC targets.
1211 (elf32_arm_fdpic_link_hash_table_create): New.
1212 * targets.c (_bfd_target_vector): Add arm_elf32_fdpic_be_vec and
1213 arm_elf32_fdpic_le_vec.
1215 2018-04-25 Alan Modra <amodra@gmail.com>
1217 * elf-linux-core.h: Disable gcc-8 string truncation warning.
1218 * elf.c (elfcore_write_prpsinfo): Likewise.
1220 2018-04-25 Alan Modra <amodra@gmail.com>
1222 * Makefile.am: Remove arm-aout and arm-coff support.
1223 * config.bfd: Likewise.
1224 * configure.ac: Likewise.
1225 * targets.c: Likewise.
1226 * aout-arm.c: Delete.
1227 * armnetbsd.c: Delete.
1229 * Makefile.in: Regenerate.
1230 * configure: Regenerate.
1231 * po/SRC-POTFILES.in: Regenerate.
1233 2018-04-24 Nick Clifton <nickc@redhat.com>
1236 * elf.c (ignore_section_sym): Check for the output_section pointer
1237 being NULL before dereferencing it.
1240 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Check for
1241 a negative PE_DEBUG_DATA size before iterating over the debug data.
1243 2018-04-23 Alan Modra <amodra@gmail.com>
1245 * elf-linux-core.h: Revert last change.
1248 2018-04-23 Nick Clifton <nickc@redhat.com>
1251 * aoutx.h (aout_get_external_symbols): Allocate an extra byte at
1252 the end of the string table, and zero it.
1254 2018-04-23 Alan Modra <amodra@gmail.com>
1256 * elf-linux-core.h (swap_linux_prpsinfo32_ugid32_out): Disable
1257 gcc-8 string truncation warning.
1258 (swap_linux_prpsinfo32_ugid16_out): Likewise.
1259 (swap_linux_prpsinfo64_ugid32_out): Likewise.
1260 (swap_linux_prpsinfo64_ugid16_out): Likewise.
1261 * elf.c (elfcore_write_prpsinfo): Likewise.
1263 2018-04-23 Nick Clifton <nickc@redhat.com>
1266 * aoutx.h (aout_get_external_symbols): Allocate an extra byte at
1267 the end of the string table, and zero it.
1269 2018-04-20 Alan Modra <amodra@gmail.com>
1272 * elf32-hppa.c (got_relocs_needed): Add extra param to special
1273 case both dtprel and tprel relocs.
1274 (allocate_dynrelocs): Adjust conditions for got relocs.
1275 (elf32_hppa_relocate_section): Likewise for local sym got relocs.
1276 Emit dynamic relocs on TLS GOT entries for shared libraries,
1277 not when pic. Omit dynamic reloc on dtprel entry when local,
1278 and on tprel entry when local and executable.
1280 2018-04-19 Alan Modra <amodra@gmail.com>
1283 * elf32-hppa.c (elf32_hppa_size_stubs): Init "destination" to -1.
1284 (hppa_type_of_stub): Don't return a long branch stub for
1285 symbols other than those defined statically.
1287 2018-04-19 Alan Modra <amodra@gmail.com>
1289 * Makefile.am: Revert 2018-04-18 coff-mips changes.
1290 * config.bfd: Add back mips_ecoff_le_vec and mips_ecoff_be_vec
1291 to selvecs for mips targets change 2018-04-18.
1292 * configure.ac: Reinstate mips_ecoff_le_vec, mips_ecoff_be_vec
1293 and mips_ecoff_bele_vec.
1294 * targets.c: Likewise.
1295 * coff-mips.c: Resurrect.
1296 * Makefile.in: Regenerate.
1297 * configure: Regenerate.
1298 * po/SRC-POTFILES.in: Regenerate.
1300 2018-04-18 Alan Modra <amodra@gmail.com>
1302 * Makefile.am: Remove mips aout and coff support.
1303 * config.bfd: Likewise.
1304 * configure.ac: Likewise.
1305 * targets.c: Likewise.
1306 * coff-mips.c: Delete
1309 * pei-mips.c: Delete
1310 * Makefile.in: Regenerate.
1311 * configure: Regenerate.
1312 * po/SRC-POTFILES.in: Regenerate.
1314 2018-04-17 H.J. Lu <hongjiu.lu@intel.com>
1316 * elf32-i386.c (elf32_bed): Define before including
1318 * elf64-x86-64.c (elf64_bed): Define before including
1320 (elf32_bed): Define before including "elf32-target.h".
1322 2018-04-17 H.J. Lu <hongjiu.lu@intel.com>
1325 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Use a
1326 normal input file with compatible relocation.
1328 2018-04-18 Alan Modra <amodra@gmail.com>
1330 * Makefile.am: Remove support for assorted i386 aout and coff targets.
1331 * config.bfd: Likewise.
1332 * configure.ac: Likewise.
1333 * doc/bfdint.texi: Likewise.
1334 * targets.c: Likewise.
1335 * freebsd.h: Delete.
1336 * i386dynix.c: Delete.
1337 * i386freebsd.c: Delete.
1338 * i386linux.c: Delete.
1339 * i386mach3.c: Delete.
1340 * i386netbsd.c: Delete.
1341 * i386os9k.c: Delete.
1342 * Makefile.in: Regenerate.
1343 * configure: Regenerate.
1344 * po/SRC-POTFILES.in: Regenerate.
1346 2018-04-17 Andrew Sadek <andrew.sadek.se@gmail.com>
1348 Microblaze Target: PIC data text relative
1350 * bfd/reloc.c (2 new BFD relocations):
1351 BFD_RELOC_MICROBLAZE_64_TEXTPCREL &
1352 BFD_RELOC_MICROBLAZE_64_TEXTPCREL
1353 * bfd/bfd-in2.h: Regenerate
1354 * bfd/libbfd.h: Regenerate
1355 * bfd/elf32-microblaze.c (Handle new relocs): define 'HOWTO' of 3
1356 new relocs and handle them in both relocate and relax functions.
1357 (microblaze_elf_reloc_type_lookup): add mapping between for new
1359 (microblaze_elf_relocate_section): Handle new relocs in case of
1361 (microblaze_elf_relax_section): Handle new relocs for elf relaxation.
1363 2018-04-17 Nick Clifton <nickc@redhat.com>
1366 * aoutx.h (find_nearest_line): Check that the symbol name exists
1367 and is long enough, before attempting to see if it is for a .o
1369 * hash.c (bfd_hash_hash): Add an assertion that the string is not
1371 * linker.c (bfd_link_hash_lookup): Fail if the table or string are
1373 (_bfd_generic_link_add_archive_symbols): Fail if an archive entry
1377 * dwarf2.c (concat_filename): Check for a NULL table pointer.
1379 2018-04-16 Nick Clifton <nickc@redhat.com>
1382 * coffgen.c (coff_pointerize_aux): Check for an out of range
1385 2018-04-16 Alan Modra <amodra@gmail.com>
1387 * Makefile.am: Remove arm-epoc-pe support.
1388 * coff-arm.c: Likewise.
1389 * config.bfd: Likewise.
1390 * configure.ac: Likewise.
1391 * targets.c: Likewise.
1392 * epoc-pe-arm.c: Delete.
1393 * epoc-pei-arm.c: Delete.
1394 * Makefile.in: Regenerate.
1395 * configure: Regenerate.
1396 * po/SRC-POTFILES.in: Regenerate.
1398 2018-04-16 Alan Modra <amodra@gmail.com>
1400 * Makefile.am: Remove sparc-aout and sparc-coff support.
1401 * config.bfd: Likewise.
1402 * configure.ac: Likewise.
1403 * targets.c: Likewise.
1404 * aout-sparcle.c: Delete.
1406 * cf-sparclynx.c: Delete.
1407 * coff-sparc.c: Delete.
1409 * sparclinux.c: Delete.
1410 * sparclynx.c: Delete.
1411 * sparcnetbsd.c: Delete.
1413 * Makefile.in: Regenerate.
1414 * configure: Regenerate.
1415 * po/SRC-POTFILES.in: Regenerate.
1417 2018-04-16 Alan Modra <amodra@gmail.com>
1419 * Makefile.am: Remove m68k-aout and m68k-coff support.
1420 * aoutf1.h: Likewise.
1421 * aoutx.h: Likewise.
1422 * archive.c: Likewise.
1423 * bfd-in.h: Likewise.
1425 * coffcode.h: Likewise.
1426 * coffswap.h: Likewise.
1427 * config.bfd: Likewise.
1428 * configure.ac: Likewise.
1429 * configure.host: Likewise.
1430 * doc/bfd.texinfo: Likewise.
1431 * doc/bfdint.texi: Likewise.
1432 * freebsd.h: Likewise.
1433 * gen-aout.c: Likewise.
1434 * hpux-core.c: Likewise.
1435 * libaout.h: Likewise.
1436 * libbfd-in.h: Likewise.
1437 * pdp11.c: Likewise.
1438 * peicode.h: Likewise.
1439 * riscix.c: Likewise.
1440 * targets.c: Likewise.
1442 * coff-apollo.c: Delete.
1443 * coff-aux.c: Delete.
1444 * coff-m68k.c: Delete.
1445 * coff-svm68k.c: Delete.
1446 * coff-u68k.c: Delete.
1447 * hosts/delta68.h: Delete.
1448 * hosts/hp300bsd.h: Delete.
1449 * hosts/m68kaux.h: Delete.
1450 * hosts/news.h: Delete.
1451 * hp300bsd.c: Delete.
1452 * hp300hpux.c: Delete.
1453 * liboasys.h: Delete.
1454 * m68k4knetbsd.c: Delete.
1455 * m68klinux.c: Delete.
1456 * m68knetbsd.c: Delete.
1458 * versados.c: Delete.
1459 * Makefile.in: Regenerate.
1460 * bfd-in2.h: Regenerate.
1461 * configure: Regenerate.
1462 * libbfd.h: Regenerate.
1463 * po/SRC-POTFILES.in: Regenerate.
1465 2018-04-16 Alan Modra <amodra@gmail.com>
1467 * Makefile.am: Remove sh5 and sh64 support.
1468 * archures.c: Likewise.
1469 * config.bfd: Likewise.
1470 * configure.ac: Likewise.
1471 * cpu-sh.c: Likewise.
1472 * elf32-sh-relocs.h: Likewise.
1473 * elf32-sh.c: Likewise.
1474 * targets.c: Likewise.
1475 * elf32-sh64-com.c: Delete.
1476 * elf32-sh64.c: Delete.
1477 * elf32-sh64.h: Delete.
1478 * elf64-sh64.c: Delete.
1479 * Makefile.in: Regenerate.
1480 * bfd-in2.h: Regenerate.
1481 * configure: Regenerate.
1482 * po/SRC-POTFILES.in: Regenerate.
1484 2018-04-16 Alan Modra <amodra@gmail.com>
1486 * Makefile.am: Remove sh-symbianelf support.
1487 * config.bfd: Likewise.
1488 * configure.ac: Likewise.
1489 * targets.c: Likewise.
1490 * elf32-sh-symbian.c: Delete.
1491 * Makefile.in: Regenerate.
1492 * configure: Regenerate.
1493 * po/SRC-POTFILES.in: Regenerate.
1495 2018-04-16 Alan Modra <amodra@gmail.com>
1497 * Makefile.am: Remove vax-bsd and vax-ultrix support.
1498 * config.bfd: Likewise.
1499 * configure.ac: Likewise.
1500 * targets.c: Likewise.
1502 * Makefile.in: Regenerate.
1503 * configure: Regenerate.
1504 * po/SRC-POTFILES.in: Regenerate.
1506 2018-04-16 Alan Modra <amodra@gmail.com>
1508 * Makefile.am: Remove w65 support.
1509 * archures.c: Likewise.
1510 * coffcode.h: Likewise.
1511 * config.bfd: Likewise.
1512 * configure.ac: Likewise.
1513 * targets.c: Likewise.
1514 * coff-w65.c: Delete.
1515 * cpu-w65.c: Delete.
1516 * Makefile.in: Regenerate.
1517 * bfd-in2.h: Regenerate.
1518 * configure: Regenerate.
1519 * po/SRC-POTFILES.in: Regenerate.
1521 2018-04-16 Alan Modra <amodra@gmail.com>
1523 * Makefile.am: Remove we32k support.
1524 * archures.c: Likewise.
1525 * coffcode.h: Likewise.
1526 * config.bfd: Likewise.
1527 * configure.ac: Likewise.
1528 * targets.c: Likewise.
1529 * coff-we32k.c: Delete.
1530 * cpu-we32k.c: Delete.
1531 * Makefile.in: Regenerate.
1532 * bfd-in2.h: Regenerate.
1533 * configure: Regenerate.
1534 * po/SRC-POTFILES.in: Regenerate.
1536 2018-04-16 Alan Modra <amodra@gmail.com>
1538 * Makefile.am: Remove m88k support.
1539 * aoutx.h: Likewise.
1540 * archures.c: Likewise.
1541 * coffcode.h: Likewise.
1542 * coffswap.h: Likewise.
1543 * config.bfd: Likewise.
1544 * configure.ac: Likewise.
1545 * cpu-ns32k.c: Likewise.
1546 * elf32-nds32.c: Likewise.
1547 * mach-o.c: Likewise.
1548 * netbsd-core.c: Likewise.
1549 * reloc.c: Likewise.
1550 * targets.c: Likewise.
1551 * coff-m88k.c: Delete.
1552 * cpu-m88k.c: Delete.
1553 * elf32-m88k.c: Delete.
1554 * hosts/m88kmach3.h: Delete.
1555 * m88kmach3.c: Delete.
1556 * m88kopenbsd.c: Delete.
1557 * Makefile.in: Regenerate.
1558 * bfd-in2.h: Regenerate.
1559 * configure: Regenerate.
1560 * po/SRC-POTFILES.in: Regenerate.
1562 2018-04-16 Alan Modra <amodra@gmail.com>
1564 * Makefile.am: Remove i370 support.
1565 * archures.c: Likewise.
1566 * config.bfd: Likewise.
1567 * configure.ac: Likewise.
1568 * targets.c: Likewise.
1569 * cpu-i370.c: Delete.
1570 * elf32-i370.c: Delete.
1571 * Makefile.in: Regenerate.
1572 * bfd-in2.h: Regenerate.
1573 * configure: Regenerate.
1574 * po/SRC-POTFILES.in: Regenerate.
1576 2018-04-16 Alan Modra <amodra@gmail.com>
1578 * Makefile.am: Remove h8500 support.
1579 * archures.c: Likewise.
1580 * coffcode.h: Likewise.
1581 * config.bfd: Likewise.
1582 * configure.ac: Likewise.
1583 * targets.c: Likewise.
1584 * coff-h8500.c: Delete.
1585 * cpu-h8500.c: Delete.
1586 * Makefile.in: Regenerate.
1587 * bfd-in2.h: Regenerate.
1588 * configure: Regenerate.
1589 * po/SRC-POTFILES.in: Regenerate.
1591 2018-04-16 Alan Modra <amodra@gmail.com>
1593 * Makefile.am: Remove h8300-coff support.
1594 * coffcode.h: Likewise.
1595 * config.bfd: Likewise.
1596 * configure.ac: Likewise.
1597 * reloc16.c: Likewise.
1598 * targets.c: Likewise.
1599 * coff-h8300.c: Delete.
1600 * Makefile.in: Regenerate.
1601 * configure: Regenerate.
1602 * po/SRC-POTFILES.in: Regenerate.
1604 2018-04-16 Alan Modra <amodra@gmail.com>
1606 * Makefile.am: Remove IEEE 695 support.
1607 * archures.c: Likewise.
1609 * config.bfd: Likewise.
1610 * configure.ac: Likewise.
1611 * doc/bfd.texinfo: Likewise.
1612 * doc/bfdint.texi: Likewise.
1613 * doc/bfdsumm.texi: Likewise.
1614 * section.c: Likewise.
1615 * targets.c: Likewise.
1617 * libieee.h: Delete.
1618 * Makefile.in: Regenerate.
1619 * bfd-in2.h: Regenerate.
1620 * configure: Regenerate.
1621 * po/SRC-POTFILES.in: Regenerate.
1623 2018-04-16 Alan Modra <amodra@gmail.com>
1625 * config.bfd: Remove tandem support.
1627 2018-04-16 Alan Modra <amodra@gmail.com>
1629 * Makefile.am: Remove newsos3 support.
1630 * aoutx.h: Likewise.
1631 * config.bfd: Likewise.
1632 * configure.ac: Likewise.
1633 * targets.c: Likewise.
1634 * newsos3.c: Delete.
1635 * Makefile.in: Regenerate.
1636 * configure: Regenerate.
1637 * po/SRC-POTFILES.in: Regenerate.
1639 2018-04-16 Alan Modra <amodra@gmail.com>
1641 * Makefile.am: Remove netware support.
1642 * bfd-in.h: Likewise.
1644 * config.bfd: Likewise.
1645 * configure.ac: Likewise.
1646 * doc/bfdint.texi: Likewise.
1647 * ecoff.c: Likewise.
1648 * targets.c: Likewise.
1650 * nlm-target.h: Delete.
1652 * nlm32-alpha.c: Delete.
1653 * nlm32-i386.c: Delete.
1654 * nlm32-ppc.c: Delete.
1655 * nlm32-sparc.c: Delete.
1658 * nlmcode.h: Delete.
1659 * nlmswap.h: Delete.
1660 * Makefile.in: Regenerate.
1661 * bfd-in2.h: Regenerate.
1662 * configure: Regenerate.
1663 * po/SRC-POTFILES.in: Regenerate.
1665 2018-04-16 Alan Modra <amodra@gmail.com>
1667 * archures.c: Remove tahoe support.
1668 * config.bfd: Likewise.
1669 * configure.ac: Likewise.
1670 * hosts/tahoe.h: Delete.
1671 * bfd-in2.h: Regenerate.
1672 * configure: Regenerate.
1674 2018-04-14 Alan Modra <amodra@gmail.com>
1676 * elf-bfd.h (struct elf_backend_data): Add relropagesize.
1677 * elfxx-target.h (ELF_RELROPAGESIZE): Provide default and
1679 (elfNN_bed): Init relropagesize.
1680 * bfd.c (bfd_emul_get_commonpagesize): Add boolean param to
1681 select relropagesize.
1682 * elf32-ppc.c (ELF_COMMONPAGESIZE): Define as 0x1000.
1683 (ELF_RELROPAGESIZE): Define as ELF_MAXPAGESIZE.
1684 (ELF_MINPAGESIZE): Don't define.
1685 * elf64-ppc.c (ELF_COMMONPAGESIZE): Define as 0x1000.
1686 (ELF_RELROPAGESIZE): Define as ELF_MAXPAGESIZE.
1687 * bfd-in2.h: Regenerate.
1689 2018-04-14 Alan Modra <amodra@gmail.com>
1691 * elf32-ppc.c (ELF_MAXPAGESIZE, ELF_COMMONPAGESIZE): Don't depend
1692 on __QNXTARGET__ define.
1694 2018-04-14 Alan Modra <amodra@gmail.com>
1696 * config.bfd: Add powerpc-*-lynxos* and powerpc-*-windiss*
1699 2018-04-11 Alan Modra <amodra@gmail.com>
1701 * aout-adobe.c: Delete.
1703 * coff-i860.c: Delete.
1704 * coff-i960.c: Delete.
1705 * cpu-i860.c: Delete.
1706 * cpu-i960.c: Delete.
1707 * elf32-i860.c: Delete.
1708 * elf32-i960.c: Delete.
1709 * hosts/i860mach3.h: Delete.
1710 * Makefile.am: Remove i860, i960, bout, and adobe support.
1711 * archures.c: Remove i860 and i960 support.
1712 * coffcode.h: Likewise.
1713 * reloc.c: Likewise.
1714 * aoutx.h: Comment updates.
1715 * archive.c: Remove BOUT and i960 support.
1716 * bfd.c: Remove BOUT support.
1717 * coffswap.h: Remove i960 support.
1718 * config.bfd: Remove i860, i960 and adobe targets.
1719 * configure.ac: Remove adode, bout, i860, i960, icoff targets.
1720 * targets.c: Likewise.
1721 * ieee.c: Remove i960 support.
1722 * mach-o.c: Remove i860 support.
1723 * Makefile.in: Regenerate.
1724 * bfd-in2.h: Regenerate.
1725 * configure: Regenerate.
1726 * libbfd.h: Regenerate.
1727 * po/SRC-POTFILES.in: Regenerate.
1729 2018-04-09 Maciej W. Rozycki <macro@mips.com>
1731 * elf64-mips.c (mips_elf64_write_rel): Handle a NULL BFD pointer
1732 in the BFD symbol referred by the relocation.
1733 (mips_elf64_write_rela): Likewise.
1735 2018-04-09 Maciej W. Rozycki <macro@mips.com>
1737 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Issue an
1738 error for out-of-range `r_sym' values.
1740 2018-04-09 Alan Modra <amodra@gmail.com>
1742 * elf64-ppc.c (struct _ppc64_elf_section_data): Add has_pltcall field.
1743 (struct ppc_link_hash_table): Add can_convert_all_inline_plt.
1744 (ppc64_elf_check_relocs): Set has_pltcall.
1745 (ppc64_elf_adjust_dynamic_symbol): Discard some PLT entries.
1746 (ppc64_elf_inline_plt): New function.
1747 (ppc64_elf_size_dynamic_sections): Discard some PLT entries for locals.
1748 * elf64-ppc.h (ppc64_elf_inline_plt): Declare.
1749 * elf32-ppc.c (has_pltcall): Define.
1750 (struct ppc_elf_link_hash_table): Add can_convert_all_inline_plt.
1751 (ppc_elf_check_relocs): Set has_pltcall.
1752 (ppc_elf_inline_plt): New function.
1753 (ppc_elf_adjust_dynamic_symbol): Discard some PLT entries.
1754 (ppc_elf_size_dynamic_sections): Likewise.
1755 * elf32-ppc.h (ppc_elf_inline_plt): Declare.
1757 2018-04-09 Alan Modra <amodra@gmail.com>
1759 * elf32-ppc.c (ppc_elf_howto_raw): Add PLTSEQ and PLTCALL howtos.
1760 (is_plt_seq_reloc): New function.
1761 (ppc_elf_check_relocs): Handle PLTSEQ and PLTCALL relocs.
1762 (ppc_elf_tls_optimize): Handle inline plt call sequence.
1763 (ppc_elf_relax_section): Handle PLTCALL reloc.
1764 (ppc_elf_relocate_section): Nop out inline plt call sequence when
1766 * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_PLTSEQ and
1767 R_PPC64_PLTCALL entries. Comment R_PPC64_TOCSAVE.
1768 (has_tls_get_addr_call): Correct comment.
1769 (is_branch_reloc): Add PLTCALL.
1770 (is_plt_seq_reloc): New function.
1771 (ppc64_elf_check_relocs): Handle PLT16_LO_DS reloc. Set
1772 has_tls_reloc for R_PPC64_TLSGD and R_PPC64_TLSLD. Create plt
1773 entry for R_PPC64_PLTCALL.
1774 (ppc64_elf_tls_optimize): Handle inline plt call sequence.
1775 (ppc_type_of_stub): Handle PLTCALL reloc.
1776 (toc_adjusting_stub_needed): Likewise.
1777 (ppc64_elf_relocate_section): Set "can_plt_call" for PLTCALL
1778 reloc insn. Nop out inline plt call sequence when resolving
1779 locally. Handle __tls_get_addr inline plt call optimization.
1781 2018-04-09 Alan Modra <amodra@gmail.com>
1783 * elf64-ppc.c (LOCAL_PLT_ENTRY_SIZE): Define.
1784 (struct ppc_stub_hash_entry): Add symtype field.
1786 (struct ppc_link_hash_table): Add pltlocal and relpltlocal.
1787 (create_linkage_sections): Create pltlocal and relpltlocal.
1788 (ppc64_elf_check_relocs): Allow PLT relocs on local symbols.
1790 (ppc64_elf_adjust_dynamic_symbol): Keep PLT entries for inline calls.
1791 (allocate_dynrelocs): Allocate pltlocal and relpltlocal.
1792 (ppc64_elf_size_dynamic_sections): Size pltlocal and relpltlocal.
1793 Keep PLT entries for inline calls against locals.
1794 (ppc_build_one_stub): Use pltlocal as appropriate.
1795 (ppc_size_one_stub): Likewise.
1796 (ppc64_elf_size_stubs): Set symtype.
1797 (build_global_entry_stubs_and_plt): Init pltlocal and write
1798 relpltlocal for globals.
1799 (write_plt_relocs_for_local_syms): Likewise for local syms.
1800 (ppc64_elf_relocate_section): Support PLT for local syms.
1801 * elf32-ppc.c (PLT_KEEP): Define.
1802 (struct ppc_elf_link_hash_table): Add pltlocal and relpltlocal.
1803 (ppc_elf_create_glink): Create pltlocal and relpltlocal.
1804 (ppc_elf_check_relocs): Allow PLT relocs on local symbols.
1805 Set PLT_KEEP. Adjust update_local_sym_info call.
1806 (ppc_elf_adjust_dynamic_symbol): Keep PLT entries for inline calls.
1807 (allocate_dynrelocs): Allocate pltlocal and relpltlocal.
1808 (ppc_elf_size_dynamic_sections): Size pltlocal and relpltlocal.
1809 (ppc_elf_relocate_section): Support PLT16 relocs for local syms.
1810 (write_global_sym_plt): Init pltlocal and write relpltlocal.
1811 (ppc_finish_symbols): Likewise for locals.
1813 2018-04-09 Alan Modra <amodra@gmail.com>
1815 * elf64-ppc.c (ppc_build_one_stub): Move output of PLT relocs
1816 for local symbols to..
1817 (write_plt_relocs_for_local_syms): ..here. New function.
1818 (ppc64_elf_finish_dynamic_symbol): Move output of PLT relocs for
1820 (build_global_entry_stubs_and_plt): ..here. Rename from
1821 build_global_entry_stubs.
1822 (ppc64_elf_build_stubs): Always call build_global_entry_stubs_and_plt.
1823 Call write_plt_relocs_for_local_syms.
1824 * elf32-ppc.c (get_sym_h): New function.
1825 (ppc_elf_relax_section): Use get_sym_h.
1826 (ppc_elf_relocate_section): Move output of PLT relocs and glink
1827 stubs for local symbols to..
1828 (ppc_finish_symbols): ..here. New function.
1829 (ppc_elf_finish_dynamic_symbol): Move output of PLT relocs for
1831 (write_global_sym_plt): ..here. New function.
1832 * elf32-ppc.h (ppc_elf_modify_segment_map): Delete attribute.
1833 (ppc_finish_symbols): Declare.
1835 2018-04-09 Alan Modra <amodra@gmail.com>
1837 * elf32-ppc.c (ppc_elf_check_relocs): Handle PLT16 relocs.
1838 (ppc_elf_relocate_section): Likewise.
1839 * elf64-ppc.c (ppc64_elf_check_relocs): Handle PLT16_LO_DS.
1840 (ppc64_elf_relocate_section): Likewise. Correct PLT16
1841 resolution to plt entry relative to toc pointer.
1843 2018-04-09 Alan Modra <amodra@gmail.com>
1845 * elf64-ppc.c (TLS_TLS, TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL,
1846 TLS_TPRELGD, TLS_EXPLICIT): Renumber. Test TLS_TLS throughout
1847 file when other TLS flags are tested in a mask.
1848 (TLS_MARK, NON_GOT): Define.
1849 (PLT_IFUNC): Redefine, and test TLS_TLS throughout file as well.
1850 (update_local_sym_info): Don't create got entry when NON_GOT.
1851 (ppc64_elf_check_relocs): Pass NON_GOT with PLT_IFUNC.
1853 (get_tls_mask): Do toc lookup if tls_mask is just TLS_MARK.
1854 (ppc64_elf_relocate_section): Likewise.
1855 (ppc64_elf_tls_optimize): Don't attempt to optimize indirect
1856 __tls_get_addr calls lacking a marker reloc.
1857 * elf32-ppc.c (TLS_TLS, TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL,
1858 TLS_TPRELGD): Renumber. Update comment.
1859 (TLS_MARK, NON_GOT): Define.
1860 (PLT_IFUNC): Redefine, and test TLS_TLS throughout file as well.
1861 (update_local_sym_info): Don't create got entry when NON_GOT.
1862 (ppc_elf_check_relocs): Pass NON_GOT with PLT_IFUNC.
1864 (ppc_elf_tls_optimize): Don't attempt to optimize indirect
1865 __tls_get_addr calls lacking a marker reloc.
1867 2018-04-06 H.J. Lu <hongjiu.lu@intel.com>
1869 * elf64-x86-64.c (elf_x86_64_info_to_howto): Don't mask out
1870 R_X86_64_converted_reloc_bit.
1872 2018-04-05 H.J. Lu <hongjiu.lu@intel.com>
1875 * configure: Regenerated.
1877 2018-04-05 Alan Modra <amodra@gmail.com>
1879 * elf-hppa.h (elf_hppa_info_to_howto): Init howto to NULL.
1880 (elf_hppa_info_to_howto_rel): Likewise.
1882 2018-04-04 Maciej W. Rozycki <macro@mips.com>
1884 * elf-hppa.h (elf_hppa_info_to_howto): Also return
1885 unsuccessfully for unimplemented relocations.
1886 (elf_hppa_info_to_howto_rel): Likewise.
1888 2018-04-04 Maciej W. Rozycki <macro@mips.com>
1890 * elf32-i860.c (lookup_howto): Add `abfd' parameter. Set the
1891 `bfd_error_bad_value' error and call `_bfd_error_handler' on a
1892 howto lookup failure.
1893 (elf32_i860_reloc_type_lookup): Adjust `lookup_howto' call
1895 (elf32_i860_info_to_howto_rela): Likewise.
1896 (elf32_i860_relocate_splitn): Likewise.
1897 (elf32_i860_relocate_pc16): Likewise.
1898 (elf32_i860_relocate_pc26): Likewise.
1899 (elf32_i860_relocate_section): Likewise.
1901 2018-04-04 Maciej W. Rozycki <macro@mips.com>
1903 * elf32-visium.c (visium_info_to_howto_rela): Correct the range
1904 check for `visium_elf_howto_table' table access.
1906 2018-04-04 Maciej W. Rozycki <macro@mips.com>
1908 * elf32-iq2000.c (iq2000_info_to_howto_rela): Correct the range
1909 check for `iq2000_elf_howto_table' table access.
1911 2018-04-04 Maciej W. Rozycki <macro@mips.com>
1913 * elf32-frv.c (frv_info_to_howto_rela): Correct the range check
1914 for `elf32_frv_howto_table' table access.
1916 2018-04-04 Maciej W. Rozycki <macro@mips.com>
1918 * elf32-mips.c (mips_elf32_rtype_to_howto): Also return
1919 unsuccessfully for placeholder howtos.
1920 * elf64-mips.c (mips_elf64_rtype_to_howto): Likewise.
1921 * elfn32-mips.c (mips_elf_n32_rtype_to_howto): Likewise.
1923 2018-03-29 Maciej W. Rozycki <macro@mips.com>
1925 * elf32-mips.c (mips_info_to_howto_rel): Remove the calls to
1926 `_bfd_error_handler' and to set the `bfd_error_bad_value' error.
1928 2018-03-28 Maciej W. Rozycki <macro@mips.com>
1930 * elf-hppa.h (elf_hppa_info_to_howto_rel): Remove
1931 ATTRIBUTE_UNUSED from `abfd'.
1933 2018-03-28 Maciej W. Rozycki <macro@mips.com>
1935 * elf-hppa.h (elf_hppa_info_to_howto_rel): Correct
1936 `_bfd_error_handler' call formatting.
1938 2018-03-28 Maciej W. Rozycki <macro@mips.com>
1940 * elf32-mips.c (mips_info_to_howto_rel): Call
1941 `mips_elf32_rtype_to_howto' directly rather than via
1942 `->elf_backend_mips_rtype_to_howto'.
1944 2018-03-28 Renlin Li <renlin.li@arm.com>
1947 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Add cases for
1948 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12,
1949 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
1950 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12,
1951 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
1952 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12,
1953 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
1954 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12,
1955 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
1956 (elfNN_aarch64_final_link_relocate): Support new relocations.
1957 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Support new
1959 (_bfd_aarch64_elf_resolve_relocation): Support new relocations.
1961 2018-03-28 Renlin Li <renlin.li@arm.com>
1964 * reloc.c: Add BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12
1965 BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12_NC,
1966 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12,
1967 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
1968 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12,
1969 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
1970 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12,
1971 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
1972 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12,
1973 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
1974 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Add table entry for
1975 TLSLE_LDST16_TPREL_LO12,
1976 TLSLE_LDST16_TPREL_LO12_NC,
1977 TLSLE_LDST32_TPREL_LO12,
1978 TLSLE_LDST32_TPREL_LO12_NC,
1979 TLSLE_LDST64_TPREL_LO12,
1980 TLSLE_LDST64_TPREL_LO12_NC,
1981 TLSLE_LDST8_TPREL_LO12,
1982 TLSLE_LDST8_TPREL_LO12_NC.
1983 * bfd-in2.h: Regenerated.
1984 * libbfd.h: Regenerated.
1986 2018-03-28 Eric Botcazou <ebotcazou@adacore.com>
1989 * elfxx-sparc.c (struct _bfd_sparc_elf_link_hash_entry): Add new flag
1990 has_old_style_got_reloc.
1991 (_bfd_sparc_elf_check_relocs) <GOT relocations>: Set it for old-style
1992 relocations. Fix a couple of long lines.
1993 (_bfd_sparc_elf_relocate_section) <R_SPARC_GOTDATA_OP>: Do not generate
1994 a R_SPARC_NONE for the GOT slot if the symbol is also subject to old-style
1997 2018-03-25 H.J. Lu <hongjiu.lu@intel.com>
2000 * elf64-x86-64.c (elf_x86_64_finish_dynamic_sections): Add
2001 ENDBR64 to the TLSDESC PLT entry.
2003 2018-03-21 Alan Modra <amodra@gmail.com>
2005 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Trim uninteresting
2006 symbols. Use size_t counts. Delete redundant opd test.
2008 2018-03-21 Alan Modra <amodra@gmail.com>
2010 * elf32-ppc.c (ppc_elf_tls_optimize): Delete locsyms.
2012 2018-03-21 Alan Modra <amodra@gmail.com>
2014 * elf32-ppc.c (struct ppc_elf_link_hash_entry): Make tls_mask
2016 (update_local_sym_info): Likewise for local_got_tls_masks.
2017 (ppc_elf_tls_optimize): Likewise for lgot_masks.
2019 2018-03-21 Alan Modra <amodra@gmail.com>
2021 * elf64-ppc.c (ppc_size_one_stub): Fix comment typo.
2022 (ppc64_elf_layout_multitoc): Allocate relocs for tprel as we
2023 do in size_dynamic_sections.
2025 2018-03-21 Alan Modra <amodra@gmail.com>
2027 * elf64-ppc.c (ppc64_elf_relocate_section): Don't access rel[1]
2028 without first checking array bounds.
2029 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2031 2018-03-20 H.J. Lu <hongjiu.lu@intel.com>
2034 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Set
2035 non_ir_ref_dynamic if a symbol is made dynamic by --dynamic-list.
2037 2018-03-19 Nick Clifton <nickc@redhat.com>
2039 * po/es.po: Updated Spanish translation.
2041 2018-03-15 Max Filippov <jcmvbkbc@gmail.com>
2043 * elf32-xtensa.c (xlate_map_entry): Change types of address
2044 fields from 'unsigned' to 'bfd_vma'.
2045 (xlate_offset_with_removed_text): Use struct xlate_map_entry as
2046 the key argument to bsearch. Allow offsets past the end of a
2047 section, use the last map entry for translation of such offsets.
2049 2018-03-15 Kuan-Lin Chen <kuanlinchentw@gmail.com>
2051 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Removed.
2052 Not support the target feature.
2053 (nds32_elf_ex9_itb_base): Likewise.
2054 (nds32_elf_ex9_import_table): Likewise.
2055 (nds32_elf_ex9_finish): Likewise.
2056 (nds32_elf_ex9_reloc_jmp): Likewise.
2057 (nds32_elf_get_insn_with_reg): Likewise.
2058 (nds32_get_local_syms): Likewise.
2059 (nds32_elf_ex9_replace_instruction): Likewise.
2060 (nds32_elf_ifc_calc): Likewise.
2061 (nds32_elf_ifc_finish): Likewise.
2062 (nds32_elf_ifc_replace): Likewise.
2063 (nds32_elf_ifc_reloc): Likewise.
2065 2018-03-14 Alan Modra <amodra@gmail.com>
2067 * elf64-ppc.c (sfpr_define): Adjust for stub_sec size having
2068 sfpr size added before defining alias symbols.
2069 (ppc64_elf_build_stubs): Add stub section padding before
2070 copying sfpr contents and defining save/restore alias symbols.
2072 2018-03-14 H.J. Lu <hongjiu.lu@intel.com>
2075 * elflink.c (elf_gc_mark_debug_section): Also check the local
2076 debug definition section.
2078 2018-03-13 Nick Clifton <nickc@redhat.com>
2081 * pei-x86_64.c (pex64_get_unwind_info): Change to a boolean
2082 function. Add an end address parameter. Check access of the data
2083 pointer to make sure that they do not extend beyond the end
2084 address. Return FALSE if any check fails. Add the end address
2085 pointer to the ui structure.
2086 (pex64_xdata_print_uwd_codes): Check accesses of the raw unwind
2087 codes to make sure that they do not extend beyond the end address
2088 pointer. Print an error message and return immediately if any
2091 2018-03-09 Nick Clifton <nickc@redhat.com>
2093 * elf64-s390.c (elf_s390_relocate_section): Move check for
2094 relocations against non-allocated sections to before the code that
2095 handles ifunc relocations.
2096 * elf32-s390.c (elf_s390_relocate_section): Likewise.
2097 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Treat
2098 relocs against IFUNC symbols in non-allocated sections as relocs
2099 against FUNC symbols.
2100 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
2102 2018-03-08 H.J. Lu <hongjiu.lu@intel.com>
2105 * elf32-i386.c (elf_i386_relocate_section): Treat relocation
2106 against IFUNC symbol in SHT_NOTE section without SHF_ALLOC as
2107 relocation against FUNC symbol.
2108 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
2110 2018-03-07 Renlin Li <renlin.li@arm.com>
2113 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Check absolute
2114 symbol, and don't emit relocation in specific case.
2116 2018-03-07 Alan Modra <amodra@gmail.com>
2118 * elf64-mips.c (mips_elf64_rtype_to_howto): Return NULL on error.
2119 (mips_elf64_slurp_one_reloc_table): Pass on error.
2121 2018-03-03 James Cowgill <james.cowgill@mips.com>
2122 Maciej W. Rozycki <macro@mips.com>
2125 * elfxx-mips.c (mips_elf_calculate_relocation): Only return
2126 after calling `undefined_symbol' hook if this is an error
2127 condition. Assume the value of 0 for the symbol requested
2130 2018-03-02 Jim Wilson <jimw@sifive.com>
2133 * elfnn-aarch64.c (_bfd_aarch64_resize_stubs): Add 8 bytes for branch
2134 and nop instead of 4.
2135 (elfNN_arch64_build_stubs): Add nop after branch. Increase size by
2138 2018-03-01 Jim Wilson <jimw@sifive.com>
2141 * elfnn-riscv.c (riscv_relax_delete_bytes): When adjust st_size, use
2142 else if instead of if.
2144 2018-03-01 Alan Modra <amodra@gmail.com>
2146 * elf32-ft32.c (ft32_info_to_howto_rela): Correct range test.
2148 2018-02-28 Alan Modra <amodra@gmail.com>
2151 * aoutx.h (swap_std_reloc_in): Correct r_index bound check.
2153 2018-02-28 Nick Clifton <nickc@redhat.com>
2157 * dwarf2.c (read_n_bytes): Replace size parameter with dwarf_block
2158 pointer. Drop unused abfd parameter. Check the size of the block
2159 before initialising the data field. Return the end pointer if the
2161 (read_attribute_value): Adjust invocations of read_n_bytes.
2164 * dwarf1.c (parse_die): Check the length of form blocks before
2165 advancing the data pointer.
2167 2018-02-28 Alan Modra <amodra@gmail.com>
2170 * aoutx.h (translate_symbol_table): Print an error message and set
2171 bfd_error on finding an invalid name string offset.
2173 2018-02-27 H.J. Lu <hongjiu.lu@intel.com>
2175 * config.in: Regenerated.
2176 * configure: Likewise.
2177 * configure.ac: Add --enable-separate-code.
2178 (DEFAULT_LD_Z_SEPARATE_CODE): New AC_DEFINE_UNQUOTED. Default
2179 to 1 for Linux/x86 targets,
2180 * elf64-x86-64.c (ELF_MAXPAGESIZE): Set to 0x1000 if
2181 DEFAULT_LD_Z_SEPARATE_CODE is 1.
2183 2018-02-27 Nick Clifton <nickc@redhat.com>
2185 * aout-cris.c (swap_ext_reloc_out): Standadize error/warning
2187 * elf-hppa.h (elf_hppa_info_to_howto_rel): Likewise.
2188 * elf32-i386.c (elf_i386_reloc_type_lookup): Likewise.
2189 * elf32-xtensa.c (elf_xtensa_reloc_type_lookup): Likewise.
2190 * elf64-ppc.c (ppc64_elf_reloc_type_lookup): Likewise.
2191 * elf64-s390.c (elf_s390_reloc_type_lookup): Likewise.
2192 * elf64-sh64.c (sh_elf64_info_to_howto): Likewise.
2193 * elfxx-ia64.c (ia64_elf_reloc_type_lookup): Likewise.
2194 * elfxx-sparc.c (_bfd_sparc_elf_reloc_type_lookup): Likewise.
2195 * elfxx-tilegx.c (tilegx_reloc_type_lookup): Likewise.
2198 * elf-bfd.h (struct elf_backend_data): Change the return type of
2199 the elf_info_to_howto and elf_info_to_howto_rel function pointers
2201 * elfcode.h (elf_slurp_reloc_table_from_section): Check the return
2202 value from the info_to_howto function and fail if that function
2204 * elf32-h8300.c (elf32_h8_relocate_section): Check return value
2205 from the info_to_howto function.
2206 (elf32_h8_relax_section): Likewise.
2207 * elf32-lm32.c (lm32_elf_relocate_section): Likewise.
2208 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
2209 * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise.
2210 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
2211 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
2212 * elf64-ia64-vms.c (elf64_ia64_relocate_section): Likewise.
2213 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Likewise.
2214 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
2215 * elfnn-ia64.c (elfNN_ia64_relocate_section): Likewise.
2216 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
2217 (riscv_elf_relocate_section): Likewise.
2218 * elf-hppa.h (elf_hppa_info_to_howto): Change return type to
2219 bfd_boolean. Issue an error message, set an error value and
2220 return FALSE if the reloc is not recognized.
2221 (elf_hppa_info_to_howto_rel): Likewise.
2222 * elf-m10200.c (mn10200_info_to_howto): Likewise.
2223 * elf-m10300.c (mn10300_info_to_howto): Likewise.
2224 * elf.c (_bfd_elf_no_info_to_howto): Likewise.
2225 * elf32-arc.c (arc_info_to_howto_rel): Likewise.
2226 * elf32-arm.c (elf32_arm_info_to_howto): Likewise.
2227 * elf32-avr.c (avr_info_to_howto_rela): Likewise.
2228 * elf32-bfin.c (bfin_info_to_howto): Likewise.
2229 * elf32-cr16.c (elf_cr16_info_to_howto): Likewise.
2230 * elf32-cr16c.c (elf_cr16c_info_to_howto): Likewise.
2231 * elf32-cris.c (elf_cr16c_info_to_howto_rel)
2232 (cris_info_to_howto_rela): Likewise.
2233 * elf32-crx.c (elf_crx_info_to_howto): Likewise.
2234 * elf32-d10v.c (d10v_info_to_howto_rel): Likewise.
2235 * elf32-d30v.c (d30v_info_to_howto_rel, d30v_info_to_howto_rela):
2237 * elf32-dlx.c (dlx_rtype_to_howto, elf32_dlx_info_to_howto)
2238 (elf32_dlx_info_to_howto_rel): Likewise.
2239 * elf32-epiphany.c (epiphany_info_to_howto_rela): Likewise.
2240 * elf32-fr30.c (fr30_info_to_howto_rela): Likewise.
2241 * elf32-frv.c (frv_info_to_howto_rela)
2242 (frvfdpic_info_to_howto_rel): Likewise.
2243 * elf32-ft32.c (ft32_info_to_howto_rela): Likewise.
2244 * elf32-gen.c (elf_generic_info_to_howto)
2245 (elf_generic_info_to_howto_rel): Likewise.
2246 * elf32-h8300.c (elf32_h8_info_to_howto)
2247 (elf32_h8_info_to_howto_rel): Likewise.
2248 * elf32-i370.c (i370_elf_info_to_howto): Likewise.
2249 * elf32-i386.c (elf_i386_reloc_type_lookup)
2250 (elf_i386_rtype_to_howto, elf_i386_info_to_howto_rel): Likewise.
2251 * elf32-i860.c (lookup_howto, elf32_i860_info_to_howto_rela):
2253 * elf32-i960.c (elf32_i960_info_to_howto_rel): Likewise.
2254 * elf32-ip2k.c (ip2k_info_to_howto_rela): Likewise.
2255 * elf32-iq2000.c (iq2000_info_to_howto_rela): Likewise.
2256 * elf32-lm32.c (lm32_info_to_howto_rela): Likewise.
2257 * elf32-m32c.c (m32c_info_to_howto_rela): Likewise.
2258 * elf32-m32r.c (m32r_info_to_howto_rel, m32r_info_to_howto):
2260 * elf32-m68hc11.c (m68hc11_info_to_howto_rel): Likewise.
2261 * elf32-m68hc12.c (m68hc11_info_to_howto_rel): Likewise.
2262 * elf32-m68k.c (rtype_to_howto): Likewise.
2263 * elf32-mcore.c (mcore_elf_info_to_howto): Likewise.
2264 * elf32-mep.c (mep_info_to_howto_rela): Likewise.
2265 * elf32-metag.c (metag_info_to_howto_rela): Likewise.
2266 * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise.
2267 * elf32-mips.c (mips_info_to_howto_rel, mips_info_to_howto_rela):
2269 * elf32-moxie.c (moxie_info_to_howto_rela): Likewise.
2270 * elf32-msp430.c (msp430_info_to_howto_rela): Likewise.
2271 * elf32-mt.c (mt_info_to_howto_rela): Likewise.
2272 * elf32-nds32.c (nds32_info_to_howto_rel, nds32_info_to_howto):
2274 * elf32-nios2.c (nios2_elf32_info_to_howto): Likewise.
2275 * elf32-or1k.c (or1k_info_to_howto_rela): Likewise.
2276 * elf32-pj.c (pj_elf_info_to_howto): Likewise.
2277 * elf32-ppc.c (ppc_elf_info_to_howto): Likewise.
2278 * elf32-pru.c (pru_elf32_info_to_howto): Likewise.
2279 * elf32-rl78.c (rl78_info_to_howto_rela): Likewise.
2280 * elf32-rx.c (rx_info_to_howto_rela): Likewise.
2281 * elf32-s390.c (elf_s390_info_to_howto): Likewise.
2282 * elf32-score.c (s3_bfd_score_info_to_howto)
2283 (_bfd_score_info_to_howto): Likewise.
2284 * elf32-score7.c (s7_bfd_score_info_to_howto): Likewise.
2285 * elf32-sh.c (sh_elf_info_to_howto): Likewise.
2286 * elf32-spu.c (spu_elf_info_to_howto): Likewise.
2287 * elf32-tic6x.c (elf32_tic6x_info_to_howto)
2288 (elf32_tic6x_info_to_howto_rel): Likewise.
2289 * elf32-tilepro.c (tilepro_info_to_howto_rela): Likewise.
2290 * elf32-v850.c (v850_elf_info_to_howto_rel)
2291 (v850_elf_info_to_howto_rela, v800_elf_info_to_howto): Likewise.
2292 * elf32-vax.c (rtype_to_howto): Likewise.
2293 * elf32-visium.c (visium_info_to_howto_rela): Likewise.
2294 * elf32-wasm32.c (elf32_wasm32_rtype_to_howto)
2295 (elf32_wasm32_info_to_howto_rela): Likewise.
2296 * elf32-xc16x.c (elf32_xc16x_info_to_howto): Likewise.
2297 * elf32-xgate.c (xgate_info_to_howto_rel): Likewise.
2298 * elf32-xstormy16.c (xstormy16_info_to_howto_rela): Likewise.
2299 * elf32-xtensa.c (elf_xtensa_info_to_howto_rela): Likewise.
2300 * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise.
2301 * elf64-gen.c (elf_generic_info_to_howto)
2302 (elf_generic_info_to_howto_rel): Likewise.
2303 * elf64-ia64-vms.c (elf64_ia64_info_to_howto): Likewise.
2304 * elf64-mips.c (mips_elf64_info_to_howto_rela): Likewise.
2305 * elf64-mmix.c (mmix_info_to_howto_rela): Likewise.
2306 * elf64-ppc.c (ppc64_elf_info_to_howto): Likewise.
2307 * elf64-s390.c (elf_s390_reloc_type_lookup): Likewise.
2308 * elf64-sh64.c (elf_s390_info_to_howto, sh_elf64_info_to_howto):
2310 * elf64-x86-64.c (elf_x86_64_info_to_howto): Likewise.
2311 * elfn32-mips.c (mips_info_to_howto_rel, mips_info_to_howto_rela):
2313 * elfnn-aarch64.c (elfNN_aarch64_info_to_howto): Likewise.
2314 * elfnn-ia64.c (elfNN_ia64_info_to_howto): Likewise.
2315 * elfnn-riscv.c (riscv_info_to_howto_rela): Likewise.
2316 * elfxx-ia64.c (ia64_elf_reloc_type_lookup): Likewise.
2317 * elfxx-sparc.c (_bfd_sparc_elf_info_to_howto): Likewise.
2318 * elfxx-tilegx.c (tilegx_info_to_howto_rela): Likewise.
2319 * elf32-score.h (s7_bfd_score_info_to_howto): Update prototype.
2320 * elfxx-sparc.h (_bfd_sparc_elf_info_to_howto): Update prototype.
2321 * elfxx-tilegx.h (tilegx_info_to_howto_rela): Update prototype.
2322 * elfxx-target.h (elf_info_to_howto, elf_info_to_howto_rel):
2325 2018-02-26 Jim Wilson <jimw@sifive.com>
2326 Stephan Schreiber <info@fs-driver.org>
2329 * elfnn-ia64.c (elfNN_ia64_relax_section): After ia64_elf_relax_brl
2330 call, set changed_contents and changed_relocs. Likewise after
2331 successful ia64_elf_relax_br call.
2333 2018-02-26 Alan Modra <amodra@gmail.com>
2335 * elf.c (assign_file_positions_except_relocs): Don't segfault
2336 when actual number of phdrs is less than allocated. Delete
2337 outdated comment. Formatting.
2339 2018-02-26 Alan Modra <amodra@gmail.com>
2341 * elf-m10300.c, * elf-s390-common.c, * elf32-arc.c, * elf32-cris.c,
2342 * elf32-dlx.c, * elf32-frv.c, * elf32-i370.c, * elf32-lm32.c,
2343 * elf32-m32r.c, * elf32-m68hc1x.c, * elf32-m68k.c,
2344 * elf32-microblaze.c, * elf32-msp430.c, * elf32-nds32.c,
2345 * elf32-nios2.c, * elf32-or1k.c, * elf32-rl78.c, * elf32-rx.c,
2346 * elf32-score.c, * elf32-score7.c, * elf32-sh-symbian.c,
2347 * elf32-sh.c, * elf32-spu.c, * elf32-v850.c, * elf32-xtensa.c,
2348 * elf64-alpha.c, * elf64-ia64-vms.c, * elf64-mmix.c,
2349 * elf64-sh64.c, * elf64-sparc.c, * elfnn-ia64.c, * elfxx-tilegx.c,
2350 * mmo.c, * osf-core.c, * srec.c, * vms-alpha.c: Standardize
2351 error/warning messages.
2353 2018-02-26 Alan Modra <amodra@gmail.com>
2355 * archive.c, * bfd.c, * linker.c, * reloc.c, * stabs.c,
2356 * syms.c: Standardize error/warning messages.
2358 2018-02-26 Alan Modra <amodra@gmail.com>
2360 * aout-adobe.c, * aout-cris.c, * i386linux.c, * m68klinux.c,
2361 * sparclinux.c, * coff-alpha.c, * coff-arm.c, * coff-mcore.c,
2362 * coffcode.h, * coffgen.c, * cofflink.c, * ecoff.c, * pe-mips.c,
2363 * peXXigen.c, * peicode.h: Standardize error/warning messages.
2365 2018-02-26 Alan Modra <amodra@gmail.com>
2367 * elf32-arm.c, * elfnn-aarch64.c: Standardize error/warning messages.
2369 2018-02-26 Alan Modra <amodra@gmail.com>
2371 * elfxx-mips.c: Standardize error/warning messages.
2373 2018-02-26 Alan Modra <amodra@gmail.com>
2375 * dwarf2.c, * elf-attrs.c, * elf-eh-frame.c, * elf.c, * elf32-gen.c,
2376 * elflink.c: Standardize error/warning messages. Replace use of
2377 linker callback einfo with _bfd_error_handler when possible.
2379 2018-02-26 Alan Modra <amodra@gmail.com>
2381 * aoutx.h, * coff-alpha.c, * coff-i860.c, * coff-m68k.c,
2382 * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c,
2383 * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-w65.c,
2384 * elf-bfd.h, * elf-m10300.c, * elf.c, * elf32-avr.c, * elf32-bfin.c,
2385 * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c,
2386 * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c,
2387 * elf32-fr30.c, * elf32-frv.c, * elf32-i370.c, * elf32-i386.c,
2388 * elf32-i960.c, * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c,
2389 * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c,
2390 * elf32-m68k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c,
2391 * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c,
2392 * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-or1k.c,
2393 * elf32-pj.c, * elf32-ppc.c, * elf32-rl78.c, * elf32-rx.c,
2394 * elf32-s390.c, * elf32-sh.c, * elf32-spu.c, * elf32-tic6x.c,
2395 * elf32-v850.c, * elf32-vax.c, * elf32-visium.c, * elf32-wasm32.c,
2396 * elf32-xgate.c, * elf32-xtensa.c, * elf64-alpha.c,
2397 * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c,
2398 * elf64-ppc.c, * elf64-s390.c, * elf64-sparc.c, * elf64-x86-64.c,
2399 * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c,
2400 * elfnn-riscv.c, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-riscv.h,
2401 * elfxx-sparc.c, * elfxx-sparc.h, * reloc.c: Standardize
2402 unrecognized/unsupported reloc message.
2404 2018-02-26 Alan Modra <amodra@gmail.com>
2406 * elf32-ppc.c: Standardize error/warning messages. Use
2407 _bfd_error_handler rather than einfo when einfo features not used.
2408 * elf64-ppc.c: Likewise.
2410 2018-02-23 Alan Modra <amodra@gmail.com>
2413 * elf.c (assign_file_positions_for_non_load_sections): Remove RELRO
2414 segment if no matching LOAD segment.
2416 2018-02-23 Kuan-Lin Chen <kuanlinchentw@gmail.com>
2418 * elf32-nds32.h: Define mask for ict_model.
2420 2018-02-20 Jason Duerstock <jason.duerstock@gmail.com>
2422 * elfnn-ia64.c (elf_backend_can_gc_sections): Enable.
2424 2018-02-19 Maciej W. Rozycki <macro@mips.com>
2427 2018-01-12 Vlad Ivanov <vlad@ivanov.email>
2429 * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when
2430 .reginfo section has wrong size.
2432 2018-02-19 Maciej W. Rozycki <macro@mips.com>
2434 * elfxx-mips.c (_bfd_mips_elf_always_size_sections): Set
2435 SEC_FIXED_SIZE and SEC_HAS_CONTENTS flags for `.reginfo' and
2436 `.MIPS.abiflags' sections.
2437 (_bfd_mips_elf_final_link): Avoid reading beyond `.reginfo'
2440 2018-02-19 Maciej W. Rozycki <macro@mips.com>
2442 * section.c (SEC_FIXED_SIZE): New macro.
2443 * bfd-in2.h: Regenerate.
2445 2018-02-19 Maciej W. Rozycki <macro@mips.com>
2447 * section.c (SEC_HAS_GOT_REF): Remove macro.
2448 * bfd-in2.h: Regenerate.
2450 2018-02-19 Alan Modra <amodra@gmail.com>
2452 * elf-attrs.c (_bfd_elf_parse_attributes): Correct _bfd_error_handler
2454 * elfxx-mips.c (_bfd_mips_elf_final_link): Likewise.
2455 * elfnn-riscv.c (_bfd_riscv_relax_align): Likewise.
2456 (_bfd_riscv_relax_pc): Likewise and fix typos.
2457 * libbfd-in.h (_bfd_error_handler): Add attribute printf.
2458 * libbfd.h: Regenerate.
2460 2018-02-19 Alan Modra <amodra@gmail.com>
2462 * dwarf2.c (read_section): Don't use 'll' format modifier.
2463 (find_abstract_instance): Likewise.
2464 * elfcore.h (elf_core_file_p): Likewise.
2466 2018-02-19 Alan Modra <amodra@gmail.com>
2468 * bfd-in.h: Include inttypes.h or if not available define
2469 PRId64, PRIu64 and PRIx64.
2470 * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Remove support for L
2471 modifier to print bfd_vma.
2472 * coff-arm.c, * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c,
2473 * coff-sh.c, * coff-tic80.c, * coffcode.h, * coffgen.c, * cofflink.c,
2474 * compress.c, * dwarf2.c, * elf-m10300.c, * elf.c, * elf32-arc.c,
2475 * elf32-arm.c, * elf32-bfin.c, * elf32-cris.c, * elf32-hppa.c,
2476 * elf32-i386.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32r.c,
2477 * elf32-m68k.c, * elf32-metag.c, * elf32-nds32.c, * elf32-nios2.c,
2478 * elf32-ppc.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c,
2479 * elf32-score7.c, * elf32-sh.c, * elf32-sh64.c, * elf32-spu.c,
2480 * elf32-tic6x.c, * elf32-tilepro.c, * elf32-v850.c, * elf32-vax.c,
2481 * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c,
2482 * elf64-mmix.c, * elf64-s390.c, * elf64-sh64.c, * elf64-x86-64.c,
2483 * elfcode.h, * elfcore.h, * elflink.c, * elfnn-aarch64.c,
2484 * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-mips.c, * elfxx-sparc.c,
2485 * elfxx-tilegx.c, * ieee.c, * ihex.c, * mach-o.c, * merge.c, * mmo.c,
2486 * peXXigen.c, * xcofflink.c: Replace use of Lx modifier with PRIx64,
2487 and cast input to uint64_t, and similarly for Ld and Lu.
2488 * bfd-in2.h: Regenerate.
2490 2018-02-19 Alan Modra <amodra@gmail.com>
2492 * elf32-arm.c, * elf32-hppa.c, * elf32-lm32.c, * elf32-m32r.c,
2493 * elf32-metag.c, * elf32-nds32.c, * elf32-or1k.c, * elf32-ppc.c,
2494 * elf32-s390.c, * elf32-sh.c, * elf32-tic6x.c, * elf32-tilepro.c,
2495 * elf64-ppc.c, * elf64-s390.c, * elflink.c, * elfnn-aarch64.c,
2496 * elfnn-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c,
2497 * reloc.c: Replace use of %R and %T in format strings passed to
2498 einfo and friends by %pR and %pT.
2500 2018-02-19 Alan Modra <amodra@gmail.com>
2502 * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Handle %pA and %pB in place
2504 * aout-adobe.c: Update all messages using %A and %B.
2505 * aout-cris.c: Likewise.
2506 * aoutx.h: Likewise.
2507 * archive.c: Likewise.
2508 * binary.c: Likewise.
2509 * cache.c: Likewise.
2510 * coff-alpha.c: Likewise.
2511 * coff-arm.c: Likewise.
2512 * coff-i860.c: Likewise.
2513 * coff-mcore.c: Likewise.
2514 * coff-ppc.c: Likewise.
2515 * coff-rs6000.c: Likewise.
2516 * coff-sh.c: Likewise.
2517 * coff-tic4x.c: Likewise.
2518 * coff-tic54x.c: Likewise.
2519 * coff-tic80.c: Likewise.
2520 * coff64-rs6000.c: Likewise.
2521 * coffcode.h: Likewise.
2522 * coffgen.c: Likewise.
2523 * cofflink.c: Likewise.
2524 * coffswap.h: Likewise.
2525 * compress.c: Likewise.
2526 * cpu-arm.c: Likewise.
2527 * ecoff.c: Likewise.
2528 * elf-attrs.c: Likewise.
2529 * elf-eh-frame.c: Likewise.
2530 * elf-ifunc.c: Likewise.
2531 * elf-m10300.c: Likewise.
2532 * elf-properties.c: Likewise.
2533 * elf-s390-common.c: Likewise.
2535 * elf32-arc.c: Likewise.
2536 * elf32-arm.c: Likewise.
2537 * elf32-avr.c: Likewise.
2538 * elf32-bfin.c: Likewise.
2539 * elf32-cr16.c: Likewise.
2540 * elf32-cr16c.c: Likewise.
2541 * elf32-cris.c: Likewise.
2542 * elf32-crx.c: Likewise.
2543 * elf32-d10v.c: Likewise.
2544 * elf32-d30v.c: Likewise.
2545 * elf32-epiphany.c: Likewise.
2546 * elf32-fr30.c: Likewise.
2547 * elf32-frv.c: Likewise.
2548 * elf32-gen.c: Likewise.
2549 * elf32-hppa.c: Likewise.
2550 * elf32-i370.c: Likewise.
2551 * elf32-i386.c: Likewise.
2552 * elf32-i960.c: Likewise.
2553 * elf32-ip2k.c: Likewise.
2554 * elf32-iq2000.c: Likewise.
2555 * elf32-lm32.c: Likewise.
2556 * elf32-m32c.c: Likewise.
2557 * elf32-m32r.c: Likewise.
2558 * elf32-m68hc11.c: Likewise.
2559 * elf32-m68hc12.c: Likewise.
2560 * elf32-m68hc1x.c: Likewise.
2561 * elf32-m68k.c: Likewise.
2562 * elf32-mcore.c: Likewise.
2563 * elf32-mep.c: Likewise.
2564 * elf32-metag.c: Likewise.
2565 * elf32-microblaze.c: Likewise.
2566 * elf32-moxie.c: Likewise.
2567 * elf32-msp430.c: Likewise.
2568 * elf32-mt.c: Likewise.
2569 * elf32-nds32.c: Likewise.
2570 * elf32-nios2.c: Likewise.
2571 * elf32-or1k.c: Likewise.
2572 * elf32-pj.c: Likewise.
2573 * elf32-ppc.c: Likewise.
2574 * elf32-rl78.c: Likewise.
2575 * elf32-rx.c: Likewise.
2576 * elf32-s390.c: Likewise.
2577 * elf32-score.c: Likewise.
2578 * elf32-score7.c: Likewise.
2579 * elf32-sh-symbian.c: Likewise.
2580 * elf32-sh.c: Likewise.
2581 * elf32-sh64.c: Likewise.
2582 * elf32-sparc.c: Likewise.
2583 * elf32-spu.c: Likewise.
2584 * elf32-tic6x.c: Likewise.
2585 * elf32-tilepro.c: Likewise.
2586 * elf32-v850.c: Likewise.
2587 * elf32-vax.c: Likewise.
2588 * elf32-visium.c: Likewise.
2589 * elf32-wasm32.c: Likewise.
2590 * elf32-xgate.c: Likewise.
2591 * elf32-xtensa.c: Likewise.
2592 * elf64-alpha.c: Likewise.
2593 * elf64-gen.c: Likewise.
2594 * elf64-hppa.c: Likewise.
2595 * elf64-ia64-vms.c: Likewise.
2596 * elf64-mmix.c: Likewise.
2597 * elf64-ppc.c: Likewise.
2598 * elf64-s390.c: Likewise.
2599 * elf64-sh64.c: Likewise.
2600 * elf64-sparc.c: Likewise.
2601 * elf64-x86-64.c: Likewise.
2602 * elfcode.h: Likewise.
2603 * elfcore.h: Likewise.
2604 * elflink.c: Likewise.
2605 * elfnn-aarch64.c: Likewise.
2606 * elfnn-ia64.c: Likewise.
2607 * elfnn-riscv.c: Likewise.
2608 * elfxx-mips.c: Likewise.
2609 * elfxx-sparc.c: Likewise.
2610 * elfxx-tilegx.c: Likewise.
2611 * elfxx-x86.c: Likewise.
2612 * hpux-core.c: Likewise.
2615 * libbfd.c: Likewise.
2616 * linker.c: Likewise.
2617 * mach-o.c: Likewise.
2618 * merge.c: Likewise.
2620 * oasys.c: Likewise.
2621 * pdp11.c: Likewise.
2622 * pe-mips.c: Likewise.
2623 * peXXigen.c: Likewise.
2624 * peicode.h: Likewise.
2625 * reloc.c: Likewise.
2626 * rs6000-core.c: Likewise.
2628 * stabs.c: Likewise.
2629 * vms-alpha.c: Likewise.
2630 * xcofflink.c: Likewise.
2632 2018-02-19 Alan Modra <amodra@gmail.com>
2635 * elf.c (IS_TBSS): Define.
2636 (_bfd_elf_map_sections_to_segments): Use IS_TBSS.
2637 (assign_file_positions_for_non_load_sections): Revert last change.
2638 Properly calculate load segment limits to compare against relro limits.
2640 2018-02-17 Alan Modra <amodra@gmail.com>
2643 * elf.c (assign_file_positions_for_non_load_sections): Ignore
2644 degenerate zero size PT_LOAD segments when finding one overlapping
2645 the PT_GNU_RELRO segment.
2647 2018-02-16 Alan Modra <amodra@gmail.com>
2649 * libbfd.c (_bfd_bool_bfd_false_error): Rename from bfd_false.
2650 (_bfd_bool_bfd_true): Rename from bfd_true.
2651 (_bfd_ptr_bfd_null_error): Rename from bfd_nullvoidptr.
2652 (_bfd_int_bfd_0): Rename from bfd_0.
2653 (_bfd_uint_bfd_0): Rename from bfd_0u.
2654 (_bfd_long_bfd_0): Rename from bfd_0l.
2655 (_bfd_long_bfd_n1_error): Rename from _bfd_n1.
2656 (_bfd_void_bfd): Rename from bfd_void.
2657 (_bfd_bool_bfd_false, _bfd_bool_bfd_asymbol_false),
2658 (_bfd_bool_bfd_link_false_error),
2659 (_bfd_bool_bfd_link_true, _bfd_bool_bfd_bfd_true),
2660 (_bfd_bool_bfd_uint_true, _bfd_bool_bfd_ptr_true),
2661 (_bfd_bool_bfd_asection_bfd_asection_true),
2662 (_bfd_bool_bfd_asymbol_bfd_asymbol_true),
2663 (_bfd_void_bfd_link, _bfd_void_bfd_asection): New functions.
2664 * archive.c (_bfd_noarchive_get_elt_at_index),
2665 (_bfd_noarchive_openr_next_archived_file),
2666 (_bfd_noarchive_construct_extended_name_table),
2667 (_bfd_noarchive_write_ar_hdr, _bfd_noarchive_truncate_arname),
2668 (_bfd_noarchive_write_armap): New functions.
2669 * archures.c (_bfd_nowrite_set_arch_mach): New function.
2670 * coff-alpha.c (alpha_ecoff_swap_coff_aux_in),
2671 (alpha_ecoff_swap_coff_sym_in, alpha_ecoff_swap_coff_lineno_in),
2672 (alpha_ecoff_swap_coff_aux_out, alpha_ecoff_swap_coff_sym_out),
2673 (alpha_ecoff_swap_coff_lineno_out),
2674 (alpha_ecoff_swap_coff_reloc_out): New functions.
2675 * coff-mips.c (mips_ecoff_swap_coff_aux_in),
2676 (mips_ecoff_swap_coff_sym_in, mips_ecoff_swap_coff_lineno_in),
2677 (mips_ecoff_swap_coff_aux_out, mips_ecoff_swap_coff_sym_out),
2678 (mips_ecoff_swap_coff_lineno_out),
2679 (mips_ecoff_swap_coff_reloc_out): New functions.
2680 * coffcode.h (coff_set_alignment_hook): Replace define with
2682 (symname_in_debug_hook): Likewise.
2683 * ecoff.c (_bfd_ecoff_set_alignment_hook): New function.
2684 * elfxx-target.h (elf_backend_allow_non_load_phdr): Default to 0.
2685 * elf.c (assign_file_positions_except_relocs): Test
2686 elf_backend_allow_non_load_phdr for NULL.
2687 * elflink.c (_bfd_elf_omit_section_dynsym_default): Rename from
2688 _bfd_elf_link_omit_section_dynsym. Update uses.
2689 (_bfd_elf_omit_section_dynsym_all): New function.
2690 * elf-bfd.h (_bfd_elf_link_omit_section_dynsym): Delete.
2691 (_bfd_elf_omit_section_dynsym_default): Declare.
2692 (_bfd_elf_omit_section_dynsym_all): Declare.
2693 * linker.c (_bfd_nolink_sizeof_headers, _bfd_nolink_bfd_relax_section),
2694 (_bfd_nolink_bfd_get_relocated_section_contents),
2695 (_bfd_nolink_bfd_lookup_section_flags),
2696 (_bfd_nolink_bfd_is_group_section, _bfd_nolink_bfd_discard_group),
2697 (_bfd_nolink_bfd_link_hash_table_create),
2698 (_bfd_nolink_bfd_link_just_syms),
2699 (_bfd_nolink_bfd_copy_link_hash_symbol_type),
2700 (_bfd_nolink_bfd_link_split_section),
2701 (_bfd_nolink_section_already_linked),
2702 (_bfd_nolink_bfd_define_common_symbol),
2703 (_bfd_nolink_bfd_define_start_stop): New functions.
2704 * reloc.c (_bfd_norelocs_bfd_reloc_type_lookup),
2705 (_bfd_norelocs_bfd_reloc_name_lookup),
2706 (_bfd_nodynamic_canonicalize_dynamic_reloc): New functions.
2707 * section.c (_bfd_nowrite_set_section_contents): New function.
2708 * syms.c (_bfd_nosymbols_canonicalize_symtab),
2709 (_bfd_nosymbols_print_symbol, _bfd_nosymbols_get_symbol_info),
2710 (_bfd_nosymbols_get_symbol_version_string),
2711 (_bfd_nosymbols_bfd_is_local_label_name),
2712 (_bfd_nosymbols_get_lineno, _bfd_nosymbols_find_nearest_line),
2713 (_bfd_nosymbols_find_line, _bfd_nosymbols_find_inliner_info),
2714 (_bfd_nosymbols_bfd_make_debug_symbol),
2715 ( _bfd_nosymbols_read_minisymbols),
2716 ( _bfd_nosymbols_minisymbol_to_symbol),
2717 (_bfd_nodynamic_get_synthetic_symtab): New functions.
2718 * libbfd-in.h: Declare new functions. Update existing defines,
2720 * aix386-core.c: Update to use new hooks. Formatting.
2721 * aout-adobe.c: Likewise.
2722 * aout-arm.c: Likewise.
2723 * aout-target.h: Likewise.
2724 * aout-tic30.c: Likewise.
2725 * aoutf1.h: Likewise.
2726 * binary.c: Likewise.
2728 * cisco-core.c: Likewise.
2729 * coff-alpha.c: Likewise.
2730 * coff-i386.c: Likewise.
2731 * coff-i860.c: Likewise.
2732 * coff-i960.c: Likewise.
2733 * coff-ia64.c: Likewise.
2734 * coff-mips.c: Likewise.
2735 * coff-ppc.c: Likewise.
2736 * coff-rs6000.c: Likewise.
2737 * coff-sh.c: Likewise.
2738 * coff-tic30.c: Likewise.
2739 * coff-tic54x.c: Likewise.
2740 * coff-x86_64.c: Likewise.
2741 * coff64-rs6000.c: Likewise.
2742 * coffcode.h: Likewise.
2743 * elf-m10300.c: Likewise.
2744 * elf32-cr16.c: Likewise.
2745 * elf32-lm32.c: Likewise.
2746 * elf32-m32r.c: Likewise.
2747 * elf32-metag.c: Likewise.
2748 * elf32-score.c: Likewise.
2749 * elf32-score7.c: Likewise.
2750 * elf32-tilepro.c: Likewise.
2751 * elf32-xstormy16.c: Likewise.
2752 * elf32-xtensa.c: Likewise.
2753 * elf64-alpha.c: Likewise.
2754 * elf64-hppa.c: Likewise.
2755 * elf64-ia64-vms.c: Likewise.
2756 * elf64-mmix.c: Likewise.
2757 * elf64-sh64.c: Likewise.
2758 * elfnn-ia64.c: Likewise.
2759 * elfxx-sparc.c: Likewise.
2760 * elfxx-target.h: Likewise.
2761 * elfxx-tilegx.c: Likewise.
2762 * elfxx-x86.h: Likewise.
2763 * hp300hpux.c: Likewise.
2764 * hppabsd-core.c: Likewise.
2765 * hpux-core.c: Likewise.
2766 * i386msdos.c: Likewise.
2767 * i386os9k.c: Likewise.
2770 * irix-core.c: Likewise.
2771 * libaout.h: Likewise.
2772 * libecoff.h: Likewise.
2773 * mach-o-target.c: Likewise.
2774 * mach-o.c: Likewise.
2775 * mipsbsd.c: Likewise.
2777 * netbsd-core.c: Likewise.
2778 * nlm-target.h: Likewise.
2779 * oasys.c: Likewise.
2780 * osf-core.c: Likewise.
2781 * pdp11.c: Likewise.
2782 * pe-mips.c: Likewise.
2783 * pe-x86_64.c: Likewise.
2785 * plugin.c: Likewise.
2786 * ppcboot.c: Likewise.
2787 * ptrace-core.c: Likewise.
2788 * sco5-core.c: Likewise.
2790 * sparclynx.c: Likewise.
2792 * tekhex.c: Likewise.
2793 * trad-core.c: Likewise.
2794 * verilog.c: Likewise.
2795 * versados.c: Likewise.
2796 * vms-alpha.c: Likewise.
2797 * vms-lib.c: Likewise.
2798 * wasm-module.c: Likewise.
2800 * libbfd.h: Regenerate.
2802 2018-02-15 Jim Wilson <jimw@sifive.com>
2804 * elfnn-riscv.c (_bfd_riscv_relax_section): Ifdef out check to ignore
2805 symbols whose section address is zero.
2807 * elfnn-riscv.c (riscv_elf_relocate_section): Use bfd_reloc_dangerous
2808 when pcrel_lo reloc has an addend. Use reloc_dangerous callback for
2809 bfd_reloc_dangerous. Use einfo instead of warning callback for errors.
2810 Add %X%P to error messages.
2812 2018-02-15 Eric Botcazou <ebotcazou@adacore.com>
2815 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
2816 Pass FALSE instead of TRUE as 'create' argument to bfd_link_hash_lookup
2817 and assert that the result of the call is not NULL.
2819 2018-02-14 Nick Clifton <nickc@redhat.com>
2822 Revert previous delta. Add extra casts to avoid compile time
2824 * libbfd-in.h (_bfd_generic_bfd_copy_private_bfd_data): Add extra
2825 cast to avoid warning from gcc v8 compiler.
2826 (_bfd_generic_bfd_merge_private_bfd_data): Likewise.
2827 (_bfd_generic_bfd_set_private_flags): Likewise.
2828 (_bfd_generic_bfd_copy_private_section_data): Likewise.
2829 (_bfd_generic_bfd_copy_private_symbol_data): Likewise.
2830 (_bfd_generic_bfd_copy_private_header_data): Likewise.
2831 (_bfd_generic_bfd_print_private_bfd_data): Likewise.
2832 (_bfd_noarchive_construct_extended_name_table): Likewise.
2833 (_bfd_noarchive_truncate_arname): Likewise.
2834 (_bfd_noarchive_write_ar_hdr): Likewise.
2835 (_bfd_noarchive_get_elt_at_index): Likewise.
2836 (_bfd_nosymbols_canonicalize_symtab): Likewise.
2837 (_bfd_nosymbols_print_symbol): Likewise.
2838 (_bfd_nosymbols_get_symbol_info): Likewise.
2839 (_bfd_nosymbols_get_symbol_version_string): Likewise.
2840 (_bfd_nosymbols_bfd_is_local_label_name): Likewise.
2841 (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise.
2842 (_bfd_nosymbols_get_lineno): Likewise.
2843 (_bfd_nosymbols_find_nearest_line): Likewise.
2844 (_bfd_nosymbols_find_line): Likewise.
2845 (_bfd_nosymbols_find_inliner_info): Likewise.
2846 (_bfd_nosymbols_bfd_make_debug_symbol): Likewise.
2847 (_bfd_nosymbols_read_minisymbols): Likewise.
2848 (_bfd_nosymbols_minisymbol_to_symbol): Likewise.
2849 (_bfd_norelocs_bfd_reloc_type_lookup): Likewise.
2850 (_bfd_norelocs_bfd_reloc_name_lookup): Likewise.
2851 (_bfd_nowrite_set_arch_mach): Likewise.
2852 (_bfd_nowrite_set_section_contents): Likewise.
2853 (_bfd_nolink_sizeof_headers): Likewise.
2854 (_bfd_nolink_bfd_get_relocated_section_contents): Likewise.
2855 (_bfd_nolink_bfd_relax_section): Likewise.
2856 (_bfd_nolink_bfd_gc_sections): Likewise.
2857 (_bfd_nolink_bfd_lookup_section_flags): Likewise.
2858 (_bfd_nolink_bfd_merge_sections): Likewise.
2859 (_bfd_nolink_bfd_is_group_section): Likewise.
2860 (_bfd_nolink_bfd_discard_group): Likewise.
2861 (_bfd_nolink_bfd_link_hash_table_create): Likewise.
2862 (_bfd_nolink_bfd_link_add_symbols): Likewise.
2863 (_bfd_nolink_bfd_link_just_syms): Likewise.
2864 (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise.
2865 (_bfd_nolink_bfd_final_link): Likewise.
2866 (_bfd_nolink_bfd_link_split_section): Likewise.
2867 (_bfd_nolink_section_already_linked): Likewise.
2868 (_bfd_nolink_bfd_define_common_symbol): Likewise.
2869 (_bfd_nolink_bfd_define_start_stop): Likewise.
2870 (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise.
2871 (_bfd_nodynamic_get_synthetic_symtab): Likewise.
2872 (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise.
2873 (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise.
2874 * libbfd.c (bfd_false_any): Delete.
2875 (bfd_true_any, bfd_nullvoidptr_any, bfd_0_any): Delete.
2876 (bfd_0u_any, bfd_0l_any, _bfd_n1_any, bfd_void_any): Delete.
2877 * libbfd.h (extern): Regenerate
2878 * aout-target.h (MY_bfd_is_target_special_symbol): Add extra
2879 cast to avoid warning from gcc v8 compiler.
2880 * aout-tic30.c (tic30_aout_set_arch_mach): Likewise.
2881 * binary.c (binary_get_symbol_info): Likewise.
2882 * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
2883 * coff-mips.c (mips_ecoff_backend_data): Likewise.
2884 * coffcode.h (coff_set_alignment_hook): Likewise.
2885 (symname_in_debug_hook): Likewise.
2886 (bfd_coff_backend_data bigobj_swap_table): Likewise.
2887 * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise.
2888 * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise.
2889 * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise.
2890 * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise.
2891 * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise.
2892 * elf32-score.c (elf_backend_omit_section_dynsym): Likewise.
2893 * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise.
2894 * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise.
2895 * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise.
2896 * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise.
2897 * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise.
2898 * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise.
2899 * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise.
2900 * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise.
2901 * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise.
2902 * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise.
2903 (bfd_elfNN_bfd_make_debug_symbol): Likewise.
2904 (bfd_elfNN_bfd_merge_private_bfd_data): Likewise.
2905 (bfd_elfNN_bfd_set_private_flags): Likewise.
2906 (bfd_elfNN_bfd_is_target_special_symbol): Likewise.
2907 (elf_backend_init_index_section): Likewise.
2908 (elf_backend_allow_non_load_phdr): Likewise.
2909 * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise.
2910 * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise.
2911 * ieee.c (ieee_construct_extended_name_table): Likewise.
2912 (ieee_write_armap): Likewise.
2913 (ieee_write_ar_hdr): Likewise.
2914 (ieee_bfd_is_target_special_symbol): Likewise.
2915 * ihex.c (ihex_canonicalize_symtab): Likewise.
2916 (ihex_bfd_is_target_special_symbol): Likewise.
2917 * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise.
2918 * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise.
2919 (_bfd_ecoff_set_alignment_hook): Likewise.
2920 * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise.
2921 * mmo.c (mmo_bfd_is_target_special_symbol): Likewise.
2922 * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise.
2923 * oasys.c (oasys_construct_extended_name_table): Likewise.
2924 (oasys_write_armap): Likewise.
2925 (oasys_write_ar_hdr): Likewise.
2926 (oasys_bfd_is_target_special_symbol): Likewise.
2927 * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise.
2928 * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise.
2929 * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise.
2930 * som.c (som_bfd_is_target_special_symbol): Likewise.
2931 * srec.c (srec_bfd_is_target_special_symbol): Likewise.
2932 * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise.
2933 * verilog.c (verilog_bfd_is_target_special_symbol): Likewise.
2934 * versados.c (versados_bfd_is_target_special_symbol): Likewise.
2935 (versados_bfd_reloc_name_lookup): Likewise.
2936 * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise.
2937 (vms_bfd_define_start_stop): Likewise.
2938 (alpha_vms_bfd_is_target_special_symbol): Likewise.
2939 * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise.
2940 * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise.
2942 2018-02-14 H.J. Lu <hongjiu.lu@intel.com>
2945 * elf32-i386.c (elf_i386_check_relocs): Pass FALSE for non
2946 PC-relative PLT to NEED_DYNAMIC_RELOCATION_P.
2947 * elf64-x86-64.c (elf_x86_64_check_relocs): Create PLT for
2948 R_X86_64_PC32 reloc against dynamic function in data section.
2949 Pass TRUE for PC-relative PLT to NEED_DYNAMIC_RELOCATION_P.
2950 (elf_x86_64_relocate_section): Use PLT for R_X86_64_PC32 reloc
2951 against dynamic function in data section.
2952 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Use PLT in PIE as
2953 function address only if pcrel_plt is true.
2954 (_bfd_x86_elf_link_hash_table_create): Set pcrel_plt.
2955 * elfxx-x86.h (NEED_DYNAMIC_RELOCATION_P): Add PCREL_PLT for
2956 PC-relative PLT. If PLT is PC-relative, don't generate dynamic
2957 PC-relative relocation against a function definition in data
2958 secton in PIE. Remove the obsolete comments.
2959 (elf_x86_link_hash_table): Add pcrel_plt.
2961 2018-02-13 H.J. Lu <hongjiu.lu@intel.com>
2963 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Check bfd_link_dll,
2964 instead of bfd_link_pic, for building shared library.
2966 2018-02-13 H.J. Lu <hongjiu.lu@intel.com>
2969 * elf64-x86-64.c (is_32bit_relative_branch): Removed.
2970 (elf_x86_64_relocate_section): Check PIC relocations in PIE.
2971 Remove is_32bit_relative_branch usage. Disallow PC32 reloc
2972 against protected function in shared object.
2974 2018-02-13 Sergei Trofimovich <slyfox@inbox.ru>
2977 * po/ru.po: Fix typo in Russian translation.
2979 2018-02-13 Maciej W. Rozycki <macro@mips.com>
2981 * wasm-module.c (wasm_scan_name_function_section): Rename
2982 `index' local variable to `idx'.
2984 2018-02-13 Nick Clifton <nickc@redhat.com>
2987 Fix compile time warnings generated by gcc version 8.
2988 * libbfd-in.h: Remove extraneous text from prototypes.
2989 Add prototypes for bfd_false_any, bfd_true_any,
2990 bfd_nullvoidptr_any, bfd_0_any, bfd_0u_any, bfd_0l_any,
2991 bfd_n1_any, bfd_void_any.
2992 (_bfd_generic_bfd_copy_private_bfd_data): Use vararg based dummy
2994 (_bfd_generic_bfd_merge_private_bfd_data): Likewise.
2995 (_bfd_generic_bfd_set_private_flags): Likewise.
2996 (_bfd_generic_bfd_copy_private_section_data): Likewise.
2997 (_bfd_generic_bfd_copy_private_symbol_data): Likewise.
2998 (_bfd_generic_bfd_copy_private_header_data): Likewise.
2999 (_bfd_generic_bfd_print_private_bfd_data): Likewise.
3000 (_bfd_noarchive_construct_extended_name_table): Likewise.
3001 (_bfd_noarchive_truncate_arname): Likewise.
3002 (_bfd_noarchive_write_ar_hdr): Likewise.
3003 (_bfd_noarchive_get_elt_at_index): Likewise.
3004 (_bfd_nosymbols_canonicalize_symtab): Likewise.
3005 (_bfd_nosymbols_print_symbol): Likewise.
3006 (_bfd_nosymbols_get_symbol_info): Likewise.
3007 (_bfd_nosymbols_get_symbol_version_string): Likewise.
3008 (_bfd_nosymbols_bfd_is_local_label_name): Likewise.
3009 (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise.
3010 (_bfd_nosymbols_get_lineno): Likewise.
3011 (_bfd_nosymbols_find_nearest_line): Likewise.
3012 (_bfd_nosymbols_find_line): Likewise.
3013 (_bfd_nosymbols_find_inliner_info): Likewise.
3014 (_bfd_nosymbols_bfd_make_debug_symbol): Likewise.
3015 (_bfd_nosymbols_read_minisymbols): Likewise.
3016 (_bfd_nosymbols_minisymbol_to_symbol): Likewise.
3017 (_bfd_norelocs_bfd_reloc_type_lookup): Likewise.
3018 (_bfd_norelocs_bfd_reloc_name_lookup): Likewise.
3019 (_bfd_nowrite_set_arch_mach): Likewise.
3020 (_bfd_nowrite_set_section_contents): Likewise.
3021 (_bfd_nolink_sizeof_headers): Likewise.
3022 (_bfd_nolink_bfd_get_relocated_section_contents): Likewise.
3023 (_bfd_nolink_bfd_relax_section): Likewise.
3024 (_bfd_nolink_bfd_gc_sections): Likewise.
3025 (_bfd_nolink_bfd_lookup_section_flags): Likewise.
3026 (_bfd_nolink_bfd_merge_sections): Likewise.
3027 (_bfd_nolink_bfd_is_group_section): Likewise.
3028 (_bfd_nolink_bfd_discard_group): Likewise.
3029 (_bfd_nolink_bfd_link_hash_table_create): Likewise.
3030 (_bfd_nolink_bfd_link_add_symbols): Likewise.
3031 (_bfd_nolink_bfd_link_just_syms): Likewise.
3032 (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise.
3033 (_bfd_nolink_bfd_final_link): Likewise.
3034 (_bfd_nolink_bfd_link_split_section): Likewise.
3035 (_bfd_nolink_section_already_linked): Likewise.
3036 (_bfd_nolink_bfd_define_common_symbol): Likewise.
3037 (_bfd_nolink_bfd_define_start_stop): Likewise.
3038 (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise.
3039 (_bfd_nodynamic_get_synthetic_symtab): Likewise.
3040 (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise.
3041 (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise.
3042 * libbfd.c (bfd_false_any): New function. Like bfd_false but
3043 accepts one or more arguments.
3044 (bfd_true_any): Likewise.
3045 (bfd_nullvoidptr_any): Likewise.
3046 (bfd_0_any): Likewise.
3047 (bfd_0u_any): Likewise.
3048 (bfd_0l_any): Likewise.
3049 (_bfd_n1_any): Likewise.
3050 (bfd_void_any): Likewise.
3051 * libbfd.h (extern): Regenerate
3052 * aout-target.h (MY_bfd_is_target_special_symbol): Use vararg
3053 based dummy function.
3054 * aout-tic30.c (tic30_aout_set_arch_mach): Likewise.
3055 * binary.c (binary_get_symbol_info): Likewise.
3056 * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
3057 * coff-mips.c (mips_ecoff_backend_data): Likewise.
3058 * coffcode.h (coff_set_alignment_hook): Likewise.
3059 (symname_in_debug_hook): Likewise.
3060 (bfd_coff_backend_data bigobj_swap_table): Likewise.
3061 * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise.
3062 * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise.
3063 * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise.
3064 * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise.
3065 * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise.
3066 * elf32-score.c (elf_backend_omit_section_dynsym): Likewise.
3067 * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise.
3068 * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise.
3069 * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise.
3070 * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise.
3071 * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise.
3072 * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise.
3073 * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise.
3074 * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise.
3075 * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise.
3076 * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise.
3077 (bfd_elfNN_bfd_make_debug_symbol): Likewise.
3078 (bfd_elfNN_bfd_merge_private_bfd_data): Likewise.
3079 (bfd_elfNN_bfd_set_private_flags): Likewise.
3080 (bfd_elfNN_bfd_is_target_special_symbol): Likewise.
3081 (elf_backend_init_index_section): Likewise.
3082 (elf_backend_allow_non_load_phdr): Likewise.
3083 * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise.
3084 * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise.
3085 * ieee.c (ieee_construct_extended_name_table): Likewise.
3086 (ieee_write_armap): Likewise.
3087 (ieee_write_ar_hdr): Likewise.
3088 (ieee_bfd_is_target_special_symbol): Likewise.
3089 * ihex.c (ihex_canonicalize_symtab): Likewise.
3090 (ihex_bfd_is_target_special_symbol): Likewise.
3091 * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise.
3092 * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise.
3093 (_bfd_ecoff_set_alignment_hook): Likewise.
3094 * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise.
3095 * mmo.c (mmo_bfd_is_target_special_symbol): Likewise.
3096 * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise.
3097 * oasys.c (oasys_construct_extended_name_table): Likewise.
3098 (oasys_write_armap): Likewise.
3099 (oasys_write_ar_hdr): Likewise.
3100 (oasys_bfd_is_target_special_symbol): Likewise.
3101 * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise.
3102 * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise.
3103 * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise.
3104 * som.c (som_bfd_is_target_special_symbol): Likewise.
3105 * srec.c (srec_bfd_is_target_special_symbol): Likewise.
3106 * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise.
3107 * verilog.c (verilog_bfd_is_target_special_symbol): Likewise.
3108 * versados.c (versados_bfd_is_target_special_symbol): Likewise.
3109 (versados_bfd_reloc_name_lookup): Likewise.
3110 * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise.
3111 (vms_bfd_define_start_stop): Likewise.
3112 (alpha_vms_bfd_is_target_special_symbol): Likewise.
3113 * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise.
3114 * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise.
3115 * elf32-arc.c (get_replace_function): Assign replacement function
3117 * elf32-i370.c (i370_noop): Update prototype.
3119 2018-02-13 Alan Modra <amodra@gmail.com>
3122 * elf.c (_bfd_elf_fixup_group_sections): Account for removed
3123 relocation sections. If size reduces to just the flag word,
3124 remove that too and mark with SEC_EXCLUDE.
3125 * elflink.c (bfd_elf_final_link): Strip empty group sections.
3127 2018-02-13 Alan Modra <amodra@gmail.com>
3130 * elf.c (assign_file_positions_for_non_load_sections): Rewrite
3133 2018-02-12 Zebediah Figura <z.figura12@gmail.com>
3135 * i386msdos.c (msdos_mkobject); New function.
3136 (msdos_object_p): New function.
3137 (i386_msdos_vec): Use msdos_object_p as the check_format
3139 * peicode.h: Rename external_PEI_DOS_hdr, DOSMAGIC, and
3140 NT_SIGNATURE to external_DOS_hdr, IMAGE_DOS_SIGNATURE, and
3142 * peXXigen.c: Likewise.
3143 * coff-ia64.c: Likewise.
3145 2018-02-12 Nick Clifton <nickc@redhat.com>
3147 * elf32-nds32.c (nds32_elf_relax_longjump3): Remove redundant
3149 * elf32-arc.c (elf_arc_relocate_section): Likewise.
3151 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
3153 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Reorder conditions.
3154 (sparc_elf_append_rela): Assert that there is enough room in section.
3155 (_bfd_sparc_elf_copy_indirect_symbol): Fix formatting.
3156 (_bfd_sparc_elf_adjust_dynamic_symbol): Minor tweak.
3157 (allocate_dynrelocs): Remove outdated comments and reorder conditions.
3158 For a symbol subject to a GOT relocation, reserve a slot in the
3159 relocation section if the symbol isn't dynamic and we are in PIC mode.
3160 (_bfd_sparc_elf_relocate_section) <R_SPARC_GOTDATA_OP>: If relocation
3161 is relaxed and a slot was reserved, generate a R_SPARC_NONE relocation.
3162 <R_SPARC_GOTDATA_OP_HIX22>: Adjust comments.
3163 <R_SPARC_PC10>: Reorder conditions. Remove always-false assertion.
3164 (_bfd_sparc_elf_finish_dynamic_symbol): Rename local_undefweak into
3165 resolved_to_zero. Do not generate a dynamic GOT relocation for an
3166 undefined weak symbol with non-default visibility. Remove superfluous
3167 'else' and fix formatting.
3169 2018-02-09 H.J. Lu <hongjiu.lu@intel.com>
3171 * elf32-i386.c (elf_i386_get_synthetic_symtab): Also handle
3173 (i386_elf32_sol2_vec): Don't declare.
3174 (elf_i386_link_setup_gnu_properties): Also handle is_solaris.
3175 Don't set need_global_offset_table.
3176 (elf_i386_solaris_arch_bed): New.
3177 (elf_backend_arch_data): Set to elf_i386_solaris_arch_bed for
3179 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Check
3180 target_os != is_nacl instead of target_os == is_normal.
3181 (x86_64_elf64_sol2_vec): Don't declare.
3182 (elf_x86_64_link_setup_gnu_properties): Check target_os !=
3183 is_nacl instead of target_os == is_normal. Don't set
3184 need_global_offset_table.
3185 (elf_x86_64_solaris_arch_bed): New.
3186 (elf_backend_arch_data): Set to elf_x86_64_solaris_arch_bed for
3188 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep
3189 _GLOBAL_OFFSET_TABLE_ for Solaris.
3190 (_bfd_x86_elf_link_setup_gnu_properties): Don't copy
3191 need_global_offset_table.
3192 * elfxx-x86.h (elf_x86_target_os): Add is_solaris.
3193 (elf_x86_link_hash_table): Remove need_global_offset_table.
3194 (elf_x86_init_table): Likewise.
3196 2018-02-08 H.J. Lu <hongjiu.lu@intel.com>
3198 * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
3200 (i386_elf32_sol2_vec): Declared.
3201 (elf_i386_link_setup_gnu_properties): Set
3202 need_global_offset_table with info->output_bfd->xvec.
3203 * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
3205 (x86_64_elf64_sol2_vec): Declared.
3206 (elf_x86_64_link_setup_gnu_properties): Set
3207 need_global_offset_table with info->output_bfd->xvec.
3209 2018-02-08 H.J. Lu <hongjiu.lu@intel.com>
3211 * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
3213 (elf_i386_link_setup_gnu_properties): Set need_global_offset_table
3215 * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
3217 (elf_x86_64_link_setup_gnu_properties): Set
3218 need_global_offset_table for Solaris.
3219 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep the
3220 unused _GLOBAL_OFFSET_TABLE_ for Solaris.
3221 (_bfd_x86_elf_link_setup_gnu_properties): Copy
3222 need_global_offset_table.
3223 * elfxx-x86.h (elf_x86_link_hash_table): Add
3224 need_global_offset_table.
3225 (elf_x86_init_table): Likewise.
3227 2018-02-08 Jim Wilson <jimw@sifive.com>
3229 * elfnn-riscv.c (riscv_elf_relocate_section): Add comment for previous
3232 2018-02-08 Nick Clifton <nickc@redhat.com>
3235 * elf.c (elf_parse_notes): Reject notes with excessuively large
3238 2018-02-07 Alan Modra <amodra@gmail.com>
3240 Revert 2018-01-17 Alan Modra <amodra@gmail.com>
3241 * elf32-ppc.c: Remove speculation barrier support.
3242 * elf32-ppc.h: Likewise.
3243 * elf64-ppc.c: Likewise.
3244 * elf64-ppc.h: Likewise.
3246 2018-02-06 Jim Wilson <jimw@sifive.com>
3248 * elfnn-riscv.c (riscv_elf_relocate_section): Return TRUE if used
3249 callback to report an error.
3251 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
3254 * elfxx-sparc.c (sparc_elf_tls_transition): Turn call to bfd_link_pic
3255 into call to !bfd_link_executable and tidy up.
3256 (_bfd_sparc_elf_check_relocs): Fix formatting and tidy up.
3257 <R_SPARC_TLS_LE_HIX22>: Turn call to bfd_link_pic into call to
3258 !bfd_link_executable.
3259 <R_SPARC_TLS_IE_HI22>: Likewise.
3260 <GOT relocations>: Remove useless code, tidy and merge related blocks.
3261 <R_SPARC_TLS_GD_CALL>: Turn call to bfd_link_pic into call to
3262 !bfd_link_executable.
3263 <R_SPARC_WPLT30>: Tidy up.
3264 (_bfd_sparc_elf_gc_mark_hook): Turn call to bfd_link_pic into call to
3265 !bfd_link_executable.
3266 (allocate_dynrelocs): Likewise.
3267 (_bfd_sparc_elf_relocate_section): Fix formatting and tidy up.
3268 <R_SPARC_TLS_GD_HI22>: Merge into...
3269 <R_SPARC_TLS_GD_LO10>: ...this. Adjust 4th argument in call to
3270 sparc_elf_tls_transition and remove redundant code.
3271 <R_SPARC_TLS_LDM_HI22>: Turn call to bfd_link_pic into call to
3272 !bfd_link_executable.
3273 <R_SPARC_TLS_LDO_HIX22>: Likewise.
3274 <R_SPARC_TLS_LE_HIX22>: Likewise. Tidy up.
3275 <R_SPARC_TLS_LDM_CALL>: Likewise.
3276 <R_SPARC_TLS_GD_CALL>: Likewise. Tidy up.
3277 <R_SPARC_TLS_GD_ADD>: Likewise.
3278 <R_SPARC_TLS_LDM_ADD>: Likewise.
3279 <R_SPARC_TLS_LDO_ADD>: Likewise.
3280 <R_SPARC_TLS_IE_LD>: Likewise.
3282 2018-02-06 Miloš Stojanović <milos.stojanovic@rt-rk.com>
3285 * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): If the dwarf
3286 functions failed to find the function name, try the generic elf
3287 find function instead.
3289 2018-02-06 Sergio Durigan Junior <sergiodj@redhat.com>
3291 * coff-rs6000.c (xcoff_write_archive_contents_old): Use
3292 'memcpy' instead of 'strncpy' when writing the magic number.
3294 2018-02-06 Nick Clifton <nickc@redhat.com>
3297 * opncls.c (bfd_get_debug_link_info_1): Check the size of the
3298 section before attempting to read it in.
3299 (bfd_get_alt_debug_link_info): Likewise.
3301 2018-02-06 Paul Carroll <pcarroll@codesourcery.com>
3303 * bfd/dwarf2.c (find_abstract_name): Modified to return file and
3304 line information in addition to name, if they can be found.
3306 2018-02-05 Renlin Li <renlin.li@arm.com>
3309 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Relax the
3310 R_AARCH64_ABS32 and R_AARCH64_ABS16 for absolute symbol. Apply the
3311 check for writeable section as well.
3313 2018-02-05 H.J. Lu <hongjiu.lu@intel.com>
3316 * elf32-i386.c (elf_i386_check_relocs): Set got_referenced if
3317 _GLOBAL_OFFSET_TABLE_ is referenced or GOT is needed to resolve
3318 undefined weak symbol to 0.
3319 * elf64-x86-64.c (elf_x86_64_check_relocs): Set got_referenced
3320 if _GLOBAL_OFFSET_TABLE_ is referenced.
3321 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Check
3322 got_referenced instead of ref_regular_nonweak. Remove the
3323 unused _GLOBAL_OFFSET_TABLE_ from symbol table.
3324 * elfxx-x86.h (elf_x86_link_hash_table): Add got_referenced.
3326 2018-02-05 Maciej W. Rozycki <macro@mips.com>
3328 * elfnn-riscv.c (_bfd_riscv_relax_pc): Use `memset' to
3329 initialize `hi_reloc'.
3331 2018-02-05 Maciej W. Rozycki <macro@mips.com>
3333 * elfxx-mips.c (_bfd_mips_elf_section_processing): For
3334 SHT_MIPS_REGINFO sections don't assert the correct size and
3335 report an error instead.
3337 2018-02-05 Maciej W. Rozycki <macro@mips.com>
3339 * elf.c (_bfd_elf_write_object_contents): Propagate a failure
3340 status from `->elf_backend_section_processing'.
3342 2018-02-02 Jim Wilson <jimw@sifive.com>
3345 * elfnn-riscv.c (riscv_relax_delete_bytes): New parameter link_info.
3346 If link_info->wrap_hash, check for a duplicate symbol and ignore.
3347 (_bfd_riscv_relax_call, bfd_riscv_relax_lui, _bfd_riscv_relax_tls_le):
3348 Pass new argument to riscv_relax_delete_bytes.
3349 (_bfd_riscv_relax_align, _bfd_riscv_relax_delete): Likewise. Remove
3350 ATTRIBUTE_UNUSED from link_info parameter.
3352 2018-02-02 Alan Modra <amodra@gmail.com>
3354 * elf64-ppc.c (ppc64_elf_relocate_section): Don't relocate nops
3355 emitted for toc sequence optimization. Set and use "howto" later.
3357 2018-02-01 Simon Marchi <simon.marchi@ericsson.com>
3359 * elf64-ppc.c (ppc64_elf_archive_symbol_lookup): Avoid pointer
3360 arithmetic on NULL pointer.
3361 * elflink.c (_bfd_elf_archive_symbol_lookup,
3362 elf_link_add_archive_symbols): Likewise.
3364 2018-01-31 Michael Matz <matz@suse.de>
3366 * elflink.c (bfd_elf_define_start_stop): Fix check of
3369 2018-01-31 H.J. Lu <hongjiu.lu@intel.com>
3372 * elflink.c (bfd_elf_define_start_stop): Check if __start and
3373 __stop symbols are referenced by shared objects.
3375 2018-01-30 Alan Modra <amodra@gmail.com>
3378 * elf.c (_bfd_elf_map_sections_to_segments): Don't start a new
3379 segment when demand paged with lma on the same page. Test this
3380 before load/non-load, executable/non-executable,
3381 writable/non-writable tests and simplify. Delete bogus relro
3382 condition in writable/non-writable test. Delete outdated
3383 comment. Formatting.
3385 2018-01-30 Alan Modra <amodra@gmail.com>
3387 * elflink.c (bfd_elf_define_start_stop): Make __start and __stop
3390 2018-01-29 Alan Modra <amodra@gmail.com>
3393 * coffgen.c (coff_pointerize_aux): Ensure auxent tagndx is in
3394 range before converting to a symbol table pointer.
3396 2018-01-27 Nick Clifton <nickc@redhat.com>
3398 * po/ru.po: Updated Russian translation.
3400 2018-01-26 Alan Modra <amodra@gmail.com>
3402 * elflink.c (bfd_elf_define_start_stop): Override symbols when
3403 they are defined dynamically.
3405 2018-01-26 Alan Modra <amodra@gmail.com>
3407 * elf64-ppc.c (ppc64_elf_size_stubs): Iterate sizing when
3408 .branch_lt changes size.
3410 2018-01-25 Alan Modra <amodra@gmail.com>
3413 * elfcode.h (elf_object_p): Avoid integer overflow.
3415 2018-01-25 Eric Botcazou <ebotcazou@adacore.com>
3418 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
3419 Do a mere lookup of the __tls_get_addr symbol instead of adding it.
3422 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
3425 * elfxx-sparc.c (sparc_elf_tls_transition): Replace
3426 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
3427 bfd_link_executable for TLS check.
3428 (_bfd_sparc_elf_check_relocs): Likewise.
3429 (allocate_dynrelocs): Likewise.
3430 (_bfd_sparc_elf_relocate_section): Likewise.
3432 2018-01-24 Renlin Li <renlin.li@arm.com>
3434 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Add support for
3435 BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
3436 BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
3437 BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
3438 BFD_RELOC_AARCH64_MOVW_PREL_G3.
3439 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
3440 (_bfd_aarch64_elf_resolve_relocation): Likewise.
3442 2018-01-24 Renlin Li <renlin.li@arm.com>
3444 * reloc.c: Add BFD_RELOC_AARCH64_MOVW_PREL_G0,
3445 BFD_RELOC_AARCH64_MOVW_PREL_G0_NC, BFD_RELOC_AARCH64_MOVW_PREL_G1,
3446 BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, BFD_RELOC_AARCH64_MOVW_PREL_G2,
3447 BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, BFD_RELOC_AARCH64_MOVW_PREL_G3.
3448 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Add entries for
3449 BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
3450 BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
3451 BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
3452 BFD_RELOC_AARCH64_MOVW_PREL_G3.
3453 * bfd-in2.h: Regenerate.
3454 * libbfd.h: Regenerate.
3456 2018-01-23 Maciej W. Rozycki <macro@mips.com>
3458 * elfxx-mips.c (_bfd_mips_elf_final_link): Update a stale
3459 `mips_elf32_section_processing' comment reference.
3461 2018-01-20 H.J. Lu <hongjiu.lu@intel.com>
3464 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Check the
3465 versioned __tls_get_addr symbol.
3467 2018-01-19 Nick Clifton <nickc@redhat.com>
3469 * po/fr.po: Updated French translation.
3471 2018-01-18 Alan Modra <amodra@gmail.com>
3473 * elf32-ppc.c (ppc_elf_create_glink): Correct alignment of .glink.
3474 * elf64-ppc.c (ppc64_elf_size_stubs): Handle negative plt_stub_align.
3475 (ppc64_elf_build_stubs): Likewise.
3477 2018-01-17 Nick Clifton <nickc@redhat.com>
3479 * po/ru.po: Updated Russian translation.
3480 * po/uk/po: Updated Ukranian translation.
3482 2018-01-17 Alan Modra <amodra@gmail.com>
3484 * elf64-ppc.c (ppc64_elf_build_stubs): Silence gcc warning.
3486 2018-01-17 Alan Modra <amodra@gmail.com>
3488 * elf32-ppc.c (GLINK_ENTRY_SIZE): Handle speculation barrier.
3489 (CRSETEQ, BEQCTRM): Define.
3490 (is_nonpic_glink_stub): Don't check bctr.
3491 (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
3492 (ppc_elf_relax_section): Size speculation barrier.
3493 (output_bctr): New function.
3494 (write_glink_stub): Use output_bctr.
3495 (ppc_elf_relocate_section): Use output_bctr for long branch stub.
3496 (ppc_elf_finish_dynamic_symbol): Likewise.
3497 (ppc_elf_finish_dynamic_sections): Use output_bctr.
3498 * elf32-ppc.h (struct ppc_elf_params): Add speculate_indirect_jumps.
3499 * elf64-ppc.c (CRSETEQ, BEQCTRM, BEQCTRLM): Define.
3500 (GLINK_PLTRESOLVE_SIZE): Size speculation barrier.
3501 (size_global_entry_stubs): Handle speculation barrier sizing.
3502 (plt_stub_size): Likewise.
3503 (output_bctr): New function.
3504 (build_plt_stub, build_tls_get_addr_stub): Output speculation
3506 (ppc_build_one_stub): Likewise for ppc_stub_plt_branch.
3507 (ppc_size_one_stub): Size speculation barrier in ppc_stub_plt_branch.
3508 (build_global_entry_stubs): Output speculation barrier.
3509 (ppc64_elf_build_stubs): Likewise in __glink_PLTresolve stub.
3510 * elf64-ppc.h (struct ppc64_elf_params): Add speculate_indirect_jumps.
3512 2018-01-17 Alan Modra <amodra@gmail.com>
3514 * elf32-ppc.c (GLINK_ENTRY_SIZE): Add parameters, handle
3515 __tls_get_addr_opt, and alignment sizing.
3516 (TLS_GET_ADDR_GLINK_SIZE): Delete.
3517 (is_nonpic_glink_stub): Don't use GLINK_ENTRY_SIZE.
3518 (ppc_elf_get_synthetic_symtab): Recognize stubs spaced at 4, 6,
3520 (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
3521 (allocate_dynrelocs): Use new GLINK_ENTRY_SIZE.
3522 (ppc_elf_size_dynamic_sections): Likewise. Size branch table
3524 (write_glink_stub): Handle __tls_get_addr_opt stub.
3525 Pad out to size given by GLINK_ENTRY_SIZE.
3526 (ppc_elf_relocate_section): Adjust write_glink_stub call.
3527 (ppc_elf_finish_dynamic_symbol): Likewise.
3528 (ppc_elf_finish_dynamic_sections): Write PLTresolve without using
3529 insn array since so many need rewriting.
3530 * elf32-ppc.h (struct ppc_elf_params): Add plt_stub_align.
3531 * elf64-ppc.c (GLINK_PLTRESOLVE_SIZE): Rename from
3532 GLINK_CALL_STUB_SIZE. Add htab param and evaluate to size without
3533 nops. Adjust all uses.
3534 (ppc64_elf_get_synthetic_symtab): Don't use GLINK_CALL_STUB_SIZE
3535 in glink_vma calculation.
3536 (struct ppc_link_hash_table): Add global_entry section pointer.
3537 (create_linkage_sections): Create separate section for global
3539 (PPC_LO, PPC_HI, PPC_HA): Move earlier.
3540 (size_global_entry_stubs): Handle sizing for aligned stubs.
3541 (ppc64_elf_size_dynamic_sections): Handle global_entry alloc,
3542 and don't stash end of glink branch table in rawsize.
3543 (ppc_build_one_stub): Rewrite stub size calculations.
3544 (build_global_entry_stubs): Use new section.
3545 (ppc64_elf_build_stubs): Don't pad __glink_PLTresolve with nops.
3546 Build lazy link stubs out to end of section. Build global entry
3547 stubs in new section.
3549 2018-01-15 Nick Clifton <nickc@redhat.com>
3551 * po/uk.po: Updated Ukranian translation.
3553 2018-01-13 Nick Clifton <nickc@redhat.com>
3555 * po/bfd.pot: Regenerated.
3557 2018-01-13 Nick Clifton <nickc@redhat.com>
3559 * version.m4: Bump version to 2.30.51
3560 * configure: Regenerate.
3562 2018-01-13 Nick Clifton <nickc@redhat.com>
3564 2.30 branch created.
3566 2018-01-12 Jens Widell <jl@opera.com>
3568 * elf.c (setup_group): Optimize search for group by remembering
3569 last found group and restarting search at that index.
3570 * elf-bfd.h (struct elf_obj_tdata): Add group_search_offset field.
3572 2018-01-12 Gunther Nikl <gnikl@users.sourceforge.net>
3574 * aoutx.h (aout_link_check_ar_symbols): Remove default and handle
3575 bfd_link_common_skip_none in switch.
3577 2018-01-12 Alan Modra <amodra@gmail.com>
3580 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Ignore dynamic
3581 references on forced local symbols.
3583 2018-01-12 Vlad Ivanov <vlad@ivanov.email>
3585 * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when
3586 .reginfo section has wrong size.
3588 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
3591 * elf.c (_bfd_elf_map_sections_to_segments): When generating
3592 separate code and read-only data LOAD segments, create a new
3593 LOAD segment if the previous section contains text and the
3594 current section doesn't or vice versa. Don't put a writable
3595 section in a read-only segment if there is a RELRO segment.
3597 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
3600 * elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Ignore dynamic
3601 references on forced local symbols.
3603 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
3606 * elflink.c (bfd_elf_gc_sections): Keep all PREINIT_ARRAY,
3607 INIT_ARRAY as well as FINI_ARRAY sections for ld -r --gc-section.
3609 2018-01-09 Kuan-Lin Chen <kuanlinchentw@gmail.com>
3612 * elf32-nds32.c (nds32_elf_relax_loadstore): Fix a typographical error.
3614 2018-01-03 John Baldwin <jhb@FreeBSD.org>
3616 * elf.c (elfcore_grok_freebsd_note): Handle
3617 NT_FREEBSD_PROCSTAT_PROC, NT_FREEBSD_PROCSTAT_FILES, and
3618 NT_FREEBSD_PROCSTAT_VMMAP.
3620 2018-01-03 Alan Modra <amodra@gmail.com>
3622 Update year range in copyright notice of all files.
3624 For older changes see ChangeLog-2017
3626 Copyright (C) 2018 Free Software Foundation, Inc.
3628 Copying and distribution of this file, with or without modification,
3629 are permitted in any medium without royalty provided the copyright
3630 notice and this notice are preserved.
3636 version-control: never