1 2018-08-06 Claudiu Zissulescu <claziss@synopsys.com>
3 * elf32-arc.c (arc_elf_merge_attributes): Handle
6 2018-08-05 Alan Modra <amodra@gmail.com>
8 * elf64-ppc.c (ADDI_R12_R11, ADDI_R12_R12, LIS_R12),
9 (ADDIS_R12_R11, ORIS_R12_R12_0, ORI_R12_R12_0),
10 (SLDI_R12_R12_32, LDX_R12_R11_R12, ADD_R12_R11_R12): Define.
11 (ppc64_elf_howto_raw): Add R_PPC64_REL24_NOTOC entry.
12 (ppc64_elf_reloc_type_lookup): Support R_PPC64_REL24_NOTOC.
13 (ppc_stub_type): Add ppc_stub_long_branch_notoc,
14 ppc_stub_long_branch_both, ppc_stub_plt_branch_notoc,
15 ppc_stub_plt_branch_both, ppc_stub_plt_call_notoc, and
16 ppc_stub_plt_call_both.
17 (is_branch_reloc): Add R_PPC64_REL24_NOTOC.
18 (build_offset, size_offset): New functions.
19 (plt_stub_size): Support plt_call_notoc and plt_call_both.
20 (ppc_build_one_stub, ppc_size_one_stub): Support new stubs.
21 (toc_adjusting_stub_needed): Handle R_PPC64_REL24_NOTOC.
22 (ppc64_elf_size_stubs): Likewise, and new stubs.
23 (ppc64_elf_build_stubs, ppc64_elf_relocate_section): Likewise.
24 * reloc.c: Add BFD_RELOC_PPC64_REL24_NOTOC.
25 * bfd-in2.h: Regenerate.
26 * libbfd.h: Regenerate.
28 2018-08-05 Alan Modra <amodra@gmail.com>
30 * elf64-ppc.c (ppc_build_one_stub): Lose "_r2off" in stub symbols.
32 2018-08-02 Jim Wilson <jimw@sifive.com>
34 * elfnn-riscv.c (riscv_elf_create_dynamic_sections): For .tdata.dyn,
35 add SEC_LINKER_CREATED flag.
37 2018-08-01 Nick Clifton <nickc@redhat.com>
39 * coff-rs6000.c (_bfd_xcoff_put_ldsymbol_name): Suppress warnings
40 about potentially truncated strncpy operations.
41 (_bfd_xcoff_put_symbol_name): Likewise.
43 * elf32-avr.c (avr_stub_name): Check for a NULL return from
46 2018-08-01 Zenith <zenith432@users.sourceforge.net>
49 * plugin.c (bfd_plugin_open_input): Close file descriptor if the
51 (try_claim): Always close the file descriptor at the end of the
53 (try_load_plugin): If a plugin has already been registered, then
54 skip the dlopen and onload steps and go straight to claiming the
55 file. If these is an error, close the plugin.
57 2018-08-01 Alan Modra <amodra@gmail.com>
59 * elf64-ppc.c (plt_stub_pad): Delay plt_stub_size call until needed.
60 (ppc_build_one_stub): Don't set stub_offset, instead assert that
61 it is sane. Don't adjust stub_offset for alignment. Adjust size
62 calculation. Use "targ" temp when calculating offsets.
63 (ppc_size_one_stub): Set stub_offset here. Use "targ" temp when
64 calculating offsets. Adjust for alignment before setting
65 tls_get_addr_opt_bctrl.
67 2018-08-01 Alan Modra <amodra@gmail.com>
69 * po/SRC-POTFILES.in: Regenerate.
71 2018-07-30 Nick Clifton <nickc@redhat.com>
74 * elf32-sh.c (sh_elf_relocate_section): When processing
75 translation relocs, fail if the relocation offset is too small.
76 Replace BFD_ASSERTs with more helpful error messages.
78 2018-07-30 Andrew Jenner <andrew@codesourcery.com>
80 * Makefile.am (ALL_MACHINES, ALL_MACHINES_CFILES): Add C-SKY.
81 (BFD32_BACKENDS, BFD_BACKENDS_CFILES): Likewise.
82 * Makefile.in: Regenerated.
83 * archures.c (enum bfd_architecture): Add bfd_arch_csky and
84 related bfd_mach defines.
85 (bfd_csky_arch): Declare.
86 (bfd_archures_list): Add C-SKY.
87 * bfd-in.h (elf32_csky_build_stubs): Declare.
88 (elf32_csky_size_stubs): Declare.
89 (elf32_csky_next_input_section: Declare.
90 (elf32_csky_setup_section_lists): Declare.
91 * bfd-in2.h: Regenerated.
92 * config.bfd: Add C-SKY.
93 * configure.ac: Likewise.
94 * configure: Regenerated.
95 * cpu-csky.c: New file.
96 * elf-bfd.h (enum elf_target_id): Add C-SKY.
97 * elf32-csky.c: New file.
98 * libbfd.h: Regenerated.
99 * reloc.c: Add C-SKY relocations.
100 * targets.c (csky_elf32_be_vec, csky_elf32_le_vec): Declare.
101 (_bfd_target_vector): Add C-SKY target vector entries.
103 2018-07-27 John Darrington <john@darrington.wattle.id.au>
105 * elf32-s12z.c (ELF_TARGET_ID): Don't define.
107 2018-07-27 John Darrington <john@darrington.wattle.id.au>
109 * libbfd.c (bfd_getb24, bfd_getl24): New functions.
110 (bfd_get_24, bfd_put_24): New macros.
111 * bfd-in2.h: Regenerate.
113 2018-07-27 John Darrington <john@darrington.wattle.id.au>
115 * elf32-s12z.c (s12z_elf_set_mach_from_flags): Remove comment.
117 2018-07-26 Alan Modra <amodra@gmail.com>
119 * elf64-ppc.c (ppc64_elf_size_stubs): Use a ppc_stub_long_branch_r2off
120 for calls to symbols with STO_PPC64_LOCAL_MASK bits set to 1.
122 2018-07-25 Alan Modra <amodra@gmail.com>
124 * elf32-ppc.c (ppc_elf_relax_section): Ignore common or undef locals.
125 Avoid trashing toff with added when used as a symbol index.
126 Ignore R_PPC_PLTREL24 addends in unused example code. Avoid
127 creating unnecessary fixups when relocatable.
129 2018-07-25 Alan Modra <amodra@gmail.com>
131 * elf32-arm.c (elf32_arm_nabi_write_core_note): Disable
132 -Wstringop-truncation warning for gcc-8.0 too.
133 * elf32-ppc.c (ppc_elf_write_core_note): Likewise.
134 * elf64-ppc.c (ppc64_elf_write_core_note): Likewise.
135 * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewise.
136 * elf32-s390.c (elf_s390_write_core_note): Comment fix.
137 * elf64-s390.c (elf_s390_write_core_note): Likewise.
139 2018-07-24 Alan Modra <amodra@gmail.com>
142 * dwarf2.c (dwarf_debug_section_enum): Fix comment typo.
143 * elf.c (bfd_section_from_shdr, elf_sort_sections): Likewise.
145 2018-07-23 Max Filippov <jcmvbkbc@gmail.com>
147 * elf32-xtensa.c (elf_xtensa_finish_dynamic_sections): Move
148 relocation sections consistency check to always check both
149 .rela.dyn and .rela.plt when they exist. Rearrange variable
150 definition and assignment places.
152 2018-07-23 Max Filippov <jcmvbkbc@gmail.com>
154 * elf32-xtensa.c (shrink_dynamic_reloc_sections): Shrink dynamic
155 relocations section for dynamic undefined weak symbols when
156 linking a shared object.
158 2018-07-23 Tom Tromey <tom@tromey.com>
160 * elf.c (bfd_get_elf_phdrs): Don't call memcpy with size 0.
162 2018-07-21 Eric Botcazou <ebotcazou@adacore.com>
164 * elf32-arm.c (elf32_arm_final_link_relocate) <R_ARM_GOT32>: Small
165 cleanup for the case of a global symbol that binds locally. Also
166 install a value in the GOT slot in the case of a local symbol in
169 2018-07-20 H.J. Lu <hongjiu.lu@intel.com>
172 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): If the
173 separate code program header is needed, make sure that the first
174 read-only PT_LOAD segment has no code by adding a
175 GNU_PROPERTY_X86_ISA_1_USED note.
177 2018-07-20 Chenghua Xu <paul.hua.gm@gmail.com>
178 Maciej W. Rozycki <macro@mips.com>
180 * elfxx-mips.c (print_mips_ases): Add MMI extension.
182 2018-07-20 Maciej W. Rozycki <macro@mips.com>
184 * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Do not
185 create DT_REL, DT_RELSZ or DT_RELENT dynamic entries if the
186 dynamic relocation section will be discarded from output.
187 (_bfd_mips_elf_finish_dynamic_sections) <DT_RELSZ>: Assert that
188 the dynamic relocation section will be retained in output.
190 2018-07-18 Maciej W. Rozycki <macro@mips.com>
192 * xcofflink.c (xcoff_write_global_symbol): Fix symbol type
193 checks for defined weak symbols.
195 2018-07-17 Maciej W. Rozycki <macro@mips.com>
197 * elf32-nds32.c (nds32_elf_relax_loadstore): Use
198 `bfd_is_abs_symbol' rather than `bfd_is_abs_section' in checking
199 whether the symbol is absolute.
200 (nds32_elf_relax_lo12): Likewise.
201 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
202 (elfNN_aarch64_check_relocs): Likewise.
203 * xcofflink.c (xcoff_need_ldrel_p): Likewise.
204 (bfd_xcoff_import_symbol): Likewise.
205 (xcoff_write_global_symbol): Likewise.
207 2018-07-17 Maciej W. Rozycki <macro@mips.com>
209 * linker.c (bfd_is_abs_symbol): New macro.
210 * bfd-in2.h: Regenerate.
212 2018-07-16 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
214 * elf-bfd.h (elfcore_write_ppc_tar): Add prototype.
215 (elfcore_write_ppc_ppr): Likewise.
216 (elfcore_write_ppc_dscr): Likewise.
217 (elfcore_write_ppc_ebb): Likewise.
218 (elfcore_write_ppc_pmu): Likewise.
219 (elfcore_write_ppc_tm_cgpr): Likewise.
220 (elfcore_write_ppc_tm_cfpr): Likewise.
221 (elfcore_write_ppc_tm_cvmx): Likewise.
222 (elfcore_write_ppc_tm_cvsx): Likewise.
223 (elfcore_write_ppc_tm_spr): Likewise.
224 (elfcore_write_ppc_tm_ctar): Likewise.
225 (elfcore_write_ppc_tm_cppr): Likewise.
226 (elfcore_write_ppc_tm_cdscr): Likewise.
227 * elf.c (elfcore_write_ppc_tar): New function.
228 (elfcore_write_ppc_ppr): Likewise.
229 (elfcore_write_ppc_dscr): Likewise.
230 (elfcore_write_ppc_ebb): Likewise.
231 (elfcore_write_ppc_pmu): Likewise.
232 (elfcore_write_ppc_tm_cgpr): Likewise.
233 (elfcore_write_ppc_tm_cfpr): Likewise.
234 (elfcore_write_ppc_tm_cvmx): Likewise.
235 (elfcore_write_ppc_tm_cvsx): Likewise.
236 (elfcore_write_ppc_tm_spr): Likewise.
237 (elfcore_write_ppc_tm_ctar): Likewise.
238 (elfcore_write_ppc_tm_cppr): Likewise.
239 (elfcore_write_ppc_tm_cdscr): Likewise.
240 (elfcore_write_register_note): Call them.
241 (elfcore_grok_ppc_tar): New function.
242 (elfcore_grok_ppc_ppr): Likewise.
243 (elfcore_grok_ppc_dscr): Likewise.
244 (elfcore_grok_ppc_ebb): Likewise.
245 (elfcore_grok_ppc_pmu): Likewise.
246 (elfcore_grok_ppc_tm_cgpr): Likewise.
247 (elfcore_grok_ppc_tm_cfpr): Likewise.
248 (elfcore_grok_ppc_tm_cvmx): Likewise.
249 (elfcore_grok_ppc_tm_cvsx): Likewise.
250 (elfcore_grok_ppc_tm_spr): Likewise.
251 (elfcore_grok_ppc_tm_ctar): Likewise.
252 (elfcore_grok_ppc_tm_cppr): Likewise.
253 (elfcore_grok_ppc_tm_cdscr): Likewise.
254 (elfcore_grok_note): Call them.
256 2018-07-11 Maciej W. Rozycki <macro@mips.com>
258 * elfxx-mips.c (mips_tls_got_relocs): Use `bfd_link_dll' rather
259 than `!bfd_link_pic' in determining the dynamic symbol index.
260 Avoid the index of -1.
261 (mips_elf_initialize_tls_slots): Likewise. Flatten code by
262 moving `dyn' to the beginning of the function block.
264 2018-07-11 Maciej W. Rozycki <macro@mips.com>
265 Rich Felker <bugdal@aerifal.cx>
268 * elfxx-mips.c (mips_tls_got_relocs): Use `bfd_link_dll' rather
269 than `bfd_link_pic' to determine whether dynamic relocations are
271 (mips_elf_initialize_tls_slots): Likewise.
273 2018-07-10 Maciej W. Rozycki <macro@mips.com>
275 * elflink.c (bfd_elf_final_link): Rename `remove' local variable
278 2018-07-10 Alan Modra <amodra@gmail.com>
280 * elf32-xgate.h: Delete.
281 * elf32-xgate.c: Delete unnecessary forward declarations, add two
283 (xgate_elf_bfd_link_hash_table_create)
284 (xgate_elf_bfd_link_hash_table_free)
285 (xgate_elf_set_mach_from_flags, struct xgate_scan_param)
286 (stub_hash_newfunc, elf32_xgate_add_symbol_hook)
287 (elf32_xgate_setup_section_lists, elf32_xgate_size_stubs)
288 (elf32_xgate_build_stubs, elf32_xgate_check_relocs)
289 (elf32_xgate_relocate_section, _bfd_xgate_elf_set_private_flags)
290 (elf32_xgate_post_process_headers): Delete.
291 (elf32_xgate_backend_symbol_processing): New function.
292 (xgate_elf_ignore_reloc, xgate_elf_special_reloc)
293 (_bfd_xgate_elf_print_private_bfd_data): Make static.
294 (ELF_TARGET_ID, elf_info_to_howto, elf_backend_check_relocs)
295 (elf_backend_relocate_section, elf_backend_object_p)
296 (elf_backend_final_write_processing, elf_backend_can_gc_sections)
297 (elf_backend_post_process_headers, elf_backend_add_symbol_hook)
298 (bfd_elf32_bfd_link_hash_table_create)
299 (bfd_elf32_bfd_set_private_flags)
300 (xgate_stub_hash_lookup): Don't define.
301 (elf_backend_symbol_processing): Define.
302 * elf-bfd.h (elf_target_id): Delete XGATE_ELF_DATA.
304 2018-07-09 Maciej W. Rozycki <macro@mips.com>
306 * elfxx-mips.c (_bfd_mips_elf_adjust_dynamic_symbol): Don't set
307 `->needs_lazy_stub' if the stubs output section is the absolute
310 2018-07-09 H.J. Lu <hongjiu.lu@intel.com>
313 * configure.ac: Use changequote for "i[3-7]86-*-linux-*".
314 * configure: Regenerated.
316 2018-07-09 Alan Modra <amodra@gmail.com>
318 * elf32-m68hc1x.c (elf32_m68hc11_post_process_headers): Call
319 _bfd_elf_post_process_headers.
321 2018-07-06 Max Filippov <jcmvbkbc@gmail.com>
323 * elf32-xtensa.c (elf_xtensa_allocate_dynrelocs): Don't allocate
324 space for dynamic relocation for undefined weak symbol.
325 (elf_xtensa_relocate_section): Don't emit R_XTENSA_RELATIVE
326 relocation for undefined weak symbols.
327 (shrink_dynamic_reloc_sections): Don't shrink dynamic relocation
328 section for relocations against undefined weak symbols.
330 2018-07-06 Alan Hayward <alan.hayward@arm.com>
332 * elf.c (elfcore_grok_aarch_sve): New function.
333 (elfcore_grok_note): Check for Aarch64 SVE.
334 (elfcore_write_aarch_sve): New function.
335 (elfcore_write_register_note): Check for Aarch64 SVE.
336 * elf-bfd.h(elfcore_grok_aarch_sve): New declaration.
338 2018-07-06 Alan Modra <amodra@gmail.com>
340 * elf32-arm.c (elf32_arm_nabi_write_core_note): Don't use
341 DIAGNOTIC_PUSH and DIAGNOSTIC_POP unconditionally.
342 * elf32-ppc.c (ppc_elf_write_core_note): Likewise.
343 * elf32-s390.c (elf_s390_write_core_note): Likewise.
344 * elf64-ppc.c (ppc64_elf_write_core_note): Likewise.
345 * elf64-s390.c (elf_s390_write_core_note): Likewise.
346 * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewise.
348 2018-07-05 Jim Wilson <jimw@sifive.com>
350 * config.bfd (riscv32*-*-*): Renamed from riscv32-*-*.
351 (riscv64*-*-*): Likewise.
352 (riscv-*-*): Add as an alias for riscv32*-*-*.
354 2018-07-05 H.J. Lu <hongjiu.lu@intel.com>
357 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Remove x86
358 ISA properties with empty bits.
360 2018-07-05 Nick Clifton <nickc@redhat.com>
362 * po/ru.po: Updated Russian translation.
364 2018-07-05 Alan Modra <amodra@gmail.com>
366 * elf-bfd.h (_bfd_elf_ppc_merge_fp_attributes): Update prototype.
367 * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Return error
368 on mismatch. Remove "warning: " from messages. Track last bfd
370 (ppc_elf_merge_obj_attributes): Likewise. Handle status from
371 _bfd_elf_ppc_merge_fp_attributes.
372 * elf64-ppc.c (ppc64_elf_merge_private_bfd_data): Handle status
373 from _bfd_elf_ppc_merge_fp_attributes.
375 2018-07-04 H.J. Lu <hongjiu.lu@intel.com>
377 * Makefile.am (bfdinclude_HEADERS): Add $(INCDIR)/diagnostics.h.
378 * Makefile.in: Regenerated.
380 2018-07-03 Alan Modra <amodra@gmail.com>
382 * elflink.c (bfd_elf_final_link): Remove zero size .gnu.attributes
385 2018-07-03 Alan Modra <amodra@gmail.com>
387 * elf-bfd.h (ATTR_TYPE_FLAG_ERROR, ATTR_TYPE_HAS_ERROR): Define.
388 * elf-attrs.c (is_default_attr): Handle ATTR_TYPE_HAS_ERROR.
389 * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Use
390 ATTR_TYPE_FLAG_INT_VAL. Set ATTR_TYPE_HAS_ERROR on finding
391 incompatible attribute.
392 (ppc_elf_merge_obj_attributes): Likewise. Return
393 _bfd_elf_merge_object_attributes result.
394 * elf64-ppc.c (ppc64_elf_merge_private_bfd_data): Return
395 _bfd_elf_merge_object_attributes result.
397 2018-07-03 Alan Modra <amodra@gmail.com>
400 * elflink.c (_bfd_elf_fix_symbol_flags): Hide dynamic symbols
401 in discarded sections.
403 2018-07-02 Maciej W. Rozycki <macro@mips.com>
405 * elfxx-mips.c (_bfd_mips_elf_create_dynamic_sections): Set
406 `mark' for symbols created from `mips_elf_dynsym_rtproc_names'
409 2018-07-02 Maciej W. Rozycki <macro@mips.com>
411 * elf64-mips.c (micromips_elf64_howto_table_rel): Add
412 R_MICROMIPS_HI0_LO16, R_MICROMIPS_TLS_GD, R_MICROMIPS_TLS_LDM,
413 R_MICROMIPS_TLS_DTPREL_HI16, R_MICROMIPS_TLS_DTPREL_LO16,
414 R_MICROMIPS_TLS_GOTTPREL, R_MICROMIPS_TLS_TPREL_HI16,
415 R_MICROMIPS_TLS_TPREL_LO16, R_MICROMIPS_GPREL7_S2 and
416 R_MICROMIPS_PC23_S2 relocation entries.
417 (micromips_elf64_howto_table_rela): Likewise.
418 (micromips_reloc_map): Likewise.
419 * elfn32-mips.c (elf_micromips_howto_table_rel): Likewise.
420 (elf_micromips_howto_table_rela): Likewise.
421 (micromips_reloc_map): Likewise.
423 2018-07-02 H.J. Lu <hongjiu.lu@intel.com>
426 * elf64-x86-64.c (elf_x86_64_relocate_section): Clear the
427 R_X86_64_converted_reloc_bit bit.
429 2018-07-02 Jeff Muizelaar <jrmuizel@gmail.com>
430 Tom Tromey <tom@tromey.com>
434 * mach-o.c (bfd_mach_o_fat_close_and_cleanup): New function.
435 (bfd_mach_o_close_and_cleanup): Redefine.
436 * archive.c (_bfd_unlink_from_archive_parent): New function,
438 (_bfd_archive_close_and_cleanup): ..here.
439 (bfd_generic_archive_p): Do not clear archive's format.
440 * libbfd-in.h (_bfd_unlink_from_archive_parent): Declare.
441 * libbfd.h: Regenerate.
443 2018-07-02 Thomas Preud'homme <thomas.preudhomme@arm.com>
445 * archures.c (bfd_mach_arm_5TEJ, bfd_mach_arm_6, bfd_mach_arm_6KZ,
446 bfd_mach_arm_6T2, bfd_mach_arm_6K, bfd_mach_arm_7, bfd_mach_arm_6M,
447 bfd_mach_arm_6SM, bfd_mach_arm_7EM, bfd_mach_arm_8, bfd_mach_arm_8R,
448 bfd_mach_arm_8M_BASE, bfd_mach_arm_8M_MAIN): Define.
449 * bfd-in2.h: Regenerate.
450 * cpu-arm.c (arch_info_struct): Add entries for above new
452 * elf32-arm.c (bfd_arm_get_mach_from_attributes): Add Tag_CPU_arch to
453 bfd_mach_arm mapping logic for pre Armv4 and Armv5TEJ and later
454 architectures. Force assert failure for any new Tag_CPU_arch value.
456 2018-07-02 Thomas Preud'homme <thomas.preudhomme@arm.com>
458 * doc/bfdint.texi: Use command-line consistently when used in a
460 * doc/bfdsumm.texi: Likewise.
462 2018-06-29 Maciej W. Rozycki <macro@mips.com>
464 * elfxx-mips.c (allocate_dynrelocs): Remove extraneous symbol
465 visibility check made for undefined weak symbols.
467 2018-06-26 Nick Clifton <nickc@redhat.com>
469 * po/uk.po: Updated Ukranian translation.
471 2018-06-25 Nick Clifton <nickc@redhat.com>
473 * elfnn-aarch64.c (_bfd_aarch64_erratum_835769_stub_name): Check
474 for malloc returning NULL.
475 (_bfd_aarch64_erratum_843419_fixup): Check for
476 _bfd_aarch64_erratum_835769_stub_name returning NULL.
478 2018-06-24 Nick Clifton <nickc@redhat.com>
480 * po/bfd.pot: Regenerate.
482 2018-06-24 Nick Clifton <nickc@redhat.com>
484 * version.m4: Update version string to 2.31.51.
485 * configure: Regenerate.
487 2018-06-24 Nick Clifton <nickc@redhat.com>
491 2018-06-21 Maciej W. Rozycki <macro@mips.com>
493 * elfxx-mips.c (_bfd_mips_elf_compact_eh_encoding)
494 (_bfd_mips_elf_cant_unwind_opcode): Correct formatting.
496 2018-06-21 Maciej W. Rozycki <macro@mips.com>
498 * elfxx-mips.c (_bfd_mips_post_process_headers): Keep
499 EI_ABIVERSION setting together.
501 2018-06-21 Maciej W. Rozycki <macro@mips.com>
503 * elfxx-mips.c (MIPS_LIBC_ABI_DEFAULT, MIPS_LIBC_ABI_MIPS_PLT)
504 (MIPS_LIBC_ABI_UNIQUE, MIPS_LIBC_ABI_MIPS_O32_FP64)
505 (MIPS_LIBC_ABI_MAX): New enumeration constants.
506 (_bfd_mips_post_process_headers): Use them in place of magic
509 2018-06-21 Jim Wilson <jimw@sifive.com>
511 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Update comment.
512 Use SYMBOL_REFERENCES_LOCAL. Add asserts for h->got.offset.
514 2018-06-21 Alan Modra <amodra@gmail.com>
516 * doc/Makefile.am (AUTOMAKE_OPTIONS): Add "foreign".
517 * doc/Makefile.in: Regenerate.
519 2018-06-20 Renlin Li <renlin.li@arm.com>
521 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Use PG_OFFSET
522 to resolve BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC,
523 BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC,
524 BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC,
525 BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC,
526 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
527 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
528 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
529 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
531 2018-06-20 Nick Clifton <nickc@redhat.com>
534 * opncls.c (get_build_id): Check for a negative or excessive data
535 size in the build-id note.
537 2018-06-20 Nick Clifton <nickc@redhat.com>
540 * mach-o.c (cputype): New function.
541 (cpusubtype): New function.
542 (bfd_mach_o_bfd_print_private_data): New function. Dispalys the
543 values in the MACH-O file header.
544 (bfd_mach_o_bfd_copy_private_header_data): Copy the cputype and
545 cpusubtype fields from the input bfd's mach-o header to the output
547 * mach-o-target.c (bfd_mach_o_bfd_print_private_bfd_data):
548 Redefine to bfd_mach_o_bfd_print_private_data.
549 * mach-o.h (bfd_mach_o_bfd_print_private_bfd_data): Prototype.
551 2018-06-19 Maciej W. Rozycki <macro@mips.com>
554 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Verify the
555 `.got.plt' entry referred is in range.
556 (mips_finish_exec_plt): Correct the range check for `.got.plt'
557 start. Replace the assertion used for that with a proper error
560 2018-06-19 Maciej W. Rozycki <macro@mips.com>
562 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Fix
565 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
567 * Makefile.am (AUTOMAKE_OPTIONS): Remove 1.11.
568 (INCLUDES): Rename to ...
569 (AM_CPPFLAGS): ... this.
570 * configure.ac: Remove AC_PREREQ.
571 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove 1.9, cygnus, add
572 info-in-builddir no-texinfo.tex.
573 (info_TEXINFOS): Rename bfd.texinfo to bfd.texi.
574 * doc/bfd.texinfo: Rename to ...
575 * doc/bfd.texi: ... this.
576 * Makefile.in: Re-generate.
577 * aclocal.m4: Re-generate.
578 * config.in: Re-generate.
579 * configure: Re-generate.
580 * doc/Makefile.in: Re-generate.
582 2018-06-18 Mephi <mephi42@gmail.com>
585 * mach-o-x86-64.c (x86_64_howto_table): Add entry for
586 BFD_RELOC_MACH_O_X86_64_RELOC_TLV.
587 (bfd_mach_o_x86_64_canonicalize_one_reloc): Handle the new reloc.
588 (bfd_mach_o_x86_64_swap_reloc_out): Likewise.
589 * reloc.c (BFD_RELOC_MACH_O_X86_64_TV): New entry.
590 * bfd-in2.h: Regenerate.
591 * libbfd.h: Regenerate.
593 2018-06-14 Faraz Shahbazker <Faraz.Shahbazker@mips.com>
595 * elfxx-mips.c (print_mips_ases): Add GINV extension.
597 2018-06-14 H.J. Lu <hongjiu.lu@intel.com>
600 * elf.c (_bfd_elf_get_symbol_version_string): Check if the first
601 symbol version is base version.
603 2018-06-14 Alan Modra <amodra@gmail.com>
605 * elf-bfd.h (struct elf_link_hash_table): Add "dynamic_relocs".
606 * elflink.c (_bfd_elf_init_2_index_sections): Comment fix.
607 (_bfd_elf_add_dynamic_entry): Set "dynamic_relocs".
608 (_bfd_elf_link_renumber_dynsyms): Exclude all section symbols when
609 "dynamic_relocs" is not set.
610 * elfxx-mips.c (count_section_dynsyms): Likewise.
612 2018-06-14 Alan Modra <amodra@gmail.com>
615 * bfdio.c (bfd_seek): Optimize away seeks to current position.
617 2018-06-13 Scott Egerton <scott.egerton@imgtec.com>
618 Faraz Shahbazker <Faraz.Shahbazker@mips.com>
620 * elfxx-mips.c (print_mips_ases): Add CRC.
622 2018-06-08 H.J. Lu <hongjiu.lu@intel.com>
625 * elfxx-x86.c (elf_x86_hide_linker_defined): New function.
626 (_bfd_x86_elf_link_check_relocs): Use it to hide hidden
627 __bss_start, _end and _edata in shared libraries.
629 2018-06-07 Alan Modra <amodra@gmail.com>
631 * elf32-tic6x.c (elf32_tic6x_check_relocs): Reference
632 __c6xabi_DSBT_BASE explicitly for R_C6000_SBR_* relocs.
634 2018-06-05 Alan Modra <amodra@gmail.com>
636 * bfd.c (struct bfd): Update comment on "where" usage.
637 * bfdio.c (bfd_bwrite, bfd_stat): Use and update "iovec",
638 "iostream", and "where" from containing archive file. Return
640 (bfd_bread): Similarly, and return error attempted out of
641 bounds archive element access.
642 (bfd_tell, bfd_flush): Use and update "iovec", "iostream", and
643 "where" from containing archive file.
644 (bfd_seek): Likewise. Return error on NULL iovec. Don't
645 attempt to optimize away seeks. Don't paper over errors by
647 (bfd_get_mtime): Call bfd_stat rather than iovec->bstat.
648 (bfd_get_size): Likewise.
649 (bfd_mmap): Operate on and use iovec of containing archive
650 file. Return error on NULL iovec.
651 * cache.c (bfd_cache_lookup_worker): Abort if working on
653 (cache_bread_1): Delete bfd parameter, add FILE* parameter.
654 Don't ignore zero byte reads.
655 (cache_bread): Look up FILE* in cache here. Error on NULL
657 (cache_bwrite): Rename "where" to "from".
658 (cache_bmmap): Don't handle archive elements.
659 * coffcode.h (coff_slurp_line_table): Exit early on zero
661 * bfd-in2.h: Regenerate.
663 2018-06-05 Alan Modra <amodra@gmail.com>
666 * plugin.c (bfd_plugin_open_input): Allow for possibility of
667 nested archives. Open file again for plugin.
668 (try_claim): Don't save and restore file position. Close file
670 * sysdep.h (O_BINARY): Define.
672 2018-06-04 Max Filippov <jcmvbkbc@gmail.com>
674 * elf32-xtensa.c (xtensa_read_table_entries): Make global.
675 (compute_fill_extra_space): Drop declaration. Rename function to
676 xtensa_compute_fill_extra_space.
677 (compute_ebb_actions, remove_dead_literal): Update references to
678 compute_fill_extra_space.
680 2018-06-04 Volodymyr Arbatov <arbatov@cadence.com>
682 * elf32-xtensa.c (elf32xtensa_separate_props): New global
684 (xtensa_add_names): New function.
685 (xtensa_property_section_name): Add new parameter
686 separate_sections, use it to choose property section name.
687 (xtensa_get_separate_property_section): New function.
688 (xtensa_get_property_section): Invoke
689 xtensa_get_separate_property_section to get individual property
690 section if it exists, common property section otherwise.
691 (xtensa_make_property_section): Pass elf32xtensa_separate_props
692 to xtensa_property_section_name.
694 2018-06-04 H.J. Lu <hongjiu.lu@intel.com>
697 * bfd-in.h: Include "diagnostics.h".
698 * bfd-in2.h: Regenerated.
699 * elf32-arm.c (elf32_arm_nabi_write_core_note): Use
700 DIAGNOSTIC_PUSH, DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION and
701 DIAGNOSTIC_POP to silence GCC 8.1 warnings with
702 -Wstringop-truncation.
703 * elf32-ppc.c (ppc_elf_write_core_note): Likewse.
704 * elf32-s390.c (elf_s390_write_core_note): Likewse.
705 * elf64-ppc.c (ppc64_elf_write_core_note): Likewse.
706 * elf64-s390.c (elf_s390_write_core_note): Likewse.
707 * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewse.
709 2018-06-03 Jim Wilson <jimw@sifive.com>
712 * elfnn-riscv.c (riscv_elf_relocate_section) <R_RISCV_CALL>: Check
713 for and handle an undefined weak with no PLT.
716 * elfnn-riscv.c (riscv_relax_delete_bytes): Add versioned_hidden check
717 to code that ignores duplicate symbols.
719 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
721 * version.m4: Bump version to 2.30.52
722 * configure: Regenerated.
724 2018-06-01 Alan Modra <amodra@gmail.com>
726 * bfd.c (_bfd_error_handler): Arrange for this function to be
727 declared in bfd-in2.h.
728 * libbfd-in.h (_bfd_error_handler): Don't declare.
729 * libbfd.h: Regenerate.
730 * bfd-in2.h: Regenerate.
732 2018-05-30 Amaan Cheval <amaan.cheval@gmail.com>
734 * config.bfd (x86_64-*-*): Add pei-x86-64 target to x86_64-*-rtems*
735 This is needed to generate UEFI application image files from ELFs.
737 2018-05-28 H.J. Lu <hongjiu.lu@intel.com>
739 * elf32-i386.c (elf_i386_lazy_plt): Add plt_tlsdesc_entry,
740 plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset,
741 plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and
742 plt_tlsdesc_got2_insn_end for TLSDESC entry.
743 (elf_i386_lazy_ibt_plt): Likewise.
744 (elf_i386_nacl_plt): Likewise.
745 * elf64-x86-64.c (tlsdesc_plt_entry): Moved and renamed to ...
746 (elf_x86_64_tlsdesc_plt_entry): This.
747 (elf_x86_64_lazy_plt): Add plt_tlsdesc_entry,
748 plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset,
749 plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and
750 plt_tlsdesc_got2_insn_end for TLSDESC entry.
751 (elf_x86_64_lazy_bnd_plt): Likewise.
752 (elf_x86_64_lazy_ibt_plt): Likewise.
753 (elf_x32_lazy_ibt_plt): Likewise.
754 (elf_x86_64_nacl_plt): Likewise.
755 (elf_x86_64_finish_dynamic_sections): Use plt_tlsdesc_entry,
756 plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset,
757 plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and
758 plt_tlsdesc_got2_insn_end to update TLSDESC entry.
759 * elfxx-x86.h (elf_x86_lazy_plt_layout): Update comments.
760 Add plt_tlsdesc_entry, plt_tlsdesc_entry_size,
761 plt_tlsdesc_got1_offset, plt_tlsdesc_got2_offset,
762 plt_tlsdesc_got1_insn_end and plt_tlsdesc_got2_insn_end.
763 (elf_x86_non_lazy_plt_layout): Update comments.
764 (elf_x86_plt_layout): Likewise.
766 2018-05-28 H.J. Lu <hongjiu.lu@intel.com>
769 * elf-s390-common.c (elf_s390_add_symbol_hook): Removed.
770 * elf32-arc.c (elf_arc_add_symbol_hook): Likewise.
771 (elf_backend_add_symbol_hook): Likewise.
772 * elf32-m68k.c (elf_m68k_add_symbol_hook): Likewise.
773 (elf_backend_add_symbol_hook): Likewise.
774 * elf32-s390.c (elf_backend_add_symbol_hook): Likewise.
775 * elf32-sparc.c (elf32_sparc_add_symbol_hook): Likewise.
776 (elf_backend_add_symbol_hook): Likewise.
777 * elf64-s390.c (elf_backend_add_symbol_hook): Likewise.
778 * elfxx-aarch64.c (_bfd_aarch64_elf_add_symbol_hook): Likewise.
779 * elfxx-aarch64.h (_bfd_aarch64_elf_add_symbol_hook): Likewise.
780 (elf_backend_add_symbol_hook): Likewise.
781 * elf32-arm.c (elf32_arm_add_symbol_hook): Remove STT_GNU_IFUNC
783 * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise.
784 * elf64-ppc.c (ppc64_elf_add_symbol_hook): Likewise.
785 * elf64-sparc.c (elf64_sparc_add_symbol_hook): Likewise.
786 * elflink.c (elf_link_add_object_symbols): Set
787 elf_gnu_symbol_ifunc for STT_GNU_IFUNC symbols.
789 2018-05-26 H.J. Lu <hongjiu.lu@intel.com>
792 * elf-bfd.h (_bfd_elf_link_hide_sym_by_version): New.
793 * elflink.c (_bfd_elf_link_hide_versioned_symbol): New function.
794 Extracted from _bfd_elf_link_assign_sym_version.
795 (_bfd_elf_link_hide_sym_by_version): New function.
796 (_bfd_elf_link_assign_sym_version): Use
797 _bfd_elf_link_hide_versioned_symbol.
798 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Call
799 _bfd_elf_link_hide_sym_by_version instead of
800 bfd_hide_sym_by_version. Don't check unversioned symbol.
802 2018-05-25 Alan Modra <amodra@gmail.com>
804 * Makefile.in: Regenerate.
805 * po/SRC-POTFILES.in: Regenerate.
807 2018-05-25 Alan Modra <amodra@gmail.com>
809 * configure.ac (bfd_cv_hidden): Run test with -Werror in CFLAGS.
810 * configure: Regenerate.
812 2018-05-23 H.J. Lu <hongjiu.lu@intel.com>
814 * elf64-ppc.c (ppc64_elf_write_core_note): Add ATTRIBUTE_NONSTRING
817 2018-05-22 Alan Modra <amodra@gmail.com>
820 * elf32-hppa.c (hppa_get_stub_entry): Return NULL when link_sec
822 (elf32_hppa_size_stubs): Only create stubs for load, alloc, code
824 (final_link_relocate): Revert last change.
826 2018-05-22 Alan Modra <amodra@gmail.com>
829 * elf32-hppa.c (final_link_relocate): Don't look for plt call
830 stubs in non-alloc sections.
832 2018-05-21 H.J. Lu <hongjiu.lu@intel.com>
835 * aout-target.h (MY_bfd_link_hide_symbol): New.
836 * aout-tic30.c (MY_bfd_link_hide_symbol): Likewise.
837 * binary.c (binary_bfd_link_hide_symbol): Likewise.
838 * coff-alpha.c (_bfd_ecoff_bfd_link_hide_symbol): Likewise.
839 * coff-mips.c (_bfd_ecoff_bfd_link_hide_symbol): Likewise.
840 * coff-rs6000.c (_bfd_xcoff_bfd_link_hide_symbol): Likewise.
841 * coffcode.h (coff_bfd_link_hide_symbol): Likewise.
842 * elf-bfd.h (_bfd_elf_link_hide_symbol): Likewise.
843 * elfxx-target.h (bfd_elfNN_bfd_link_hide_symbol): Likewise.
844 * i386msdos.c (msdos_bfd_link_hide_symbol): Likewise.
845 * ihex.c (ihex_bfd_link_hide_symbol): Likewise.
846 * libbfd-in.h (_bfd_nolink_bfd_link_hide_symbol): Likewise.
847 * linker.c (_bfd_generic_link_hide_symbol): Likewise.
848 (bfd_link_hide_symbol): Likewise.
849 * mach-o-target.c (bfd_mach_o_bfd_link_hide_symbol): Likewise.
850 * mmo.c (mmo_bfd_link_hide_symbol): Likewise.
851 * pef.c (bfd_pef_bfd_link_hide_symbol): Likewise.
852 * plugin.c (bfd_plugin_bfd_link_hide_symbol): Likewise.
853 * ppcboot.c (ppcboot_bfd_link_hide_symbol): Likewise.
854 * som.c (som_bfd_link_hide_symbol): Likewise.
855 * srec.c (srec_bfd_link_hide_symbol): Likewise.
856 * tekhex.c (tekhex_bfd_link_hide_symbol): Likewise.
857 * vms-alpha.c (vms_bfd_link_hide_symbol): Likewise.
858 (alpha_vms_bfd_link_hide_symbol): Likewise.
859 * xsym.c (bfd_sym_bfd_link_hide_symbol): Likewise.
860 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
861 _bfd_generic_link_hide_symbol.
862 (rs6000_xcoff64_aix_vec): Likewise.
863 * elflink.c (bfd_elf_record_link_assignment): Don't make forced
864 local symbol dynamic.
865 (_bfd_elf_link_hide_symbol): New function.
866 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
867 check root.ldscript_def.
868 * targets.c (bfd_target): Add _bfd_link_hide_symbol.
869 (BFD_JUMP_TABLE_LINK): Add NAME##_bfd_link_hide_symbol.
870 * bfd-in2.h: Regenerated.
871 * libbfd.h: Likewise.
873 2018-05-21 H.J. Lu <hongjiu.lu@intel.com>
876 * elf.c (setup_group): Mark section in a section group with
879 2018-05-18 H.J. Lu <hongjiu.lu@intel.com>
882 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
883 set eh->local_ref to 1 if a symbol is versioned and there is a
886 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
888 * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Handle
891 2018-05-18 Jim Wilson <jimw@sifive.com>
893 * elfnn-riscv.c (allocate_dynrelocs): Discard dynamic relocations if
894 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
895 (riscv_elf_relocate_section): Don't generate dynamic relocation if
896 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
897 (riscv_elf_finish_dynamic_symbol): Likewise.
899 2018-05-18 John Darrington <john@darrington.wattle.id.au>
901 * Makefile.am: Add s12z files.
902 * Makefile.in: Regenerate.
903 * archures.c: Add bfd_s12z_arch.
904 * bfd-in.h: Add exports of bfd_putb24 and bfd_putl24.
905 * bfd-in2.h: Regenerate.
906 * config.bfd: Add s12z target.
907 * configure.ac: Add s12z target.
908 * configure: Regenerate.
909 * cpu-s12z.c: New file.
910 * elf32-s12z.c: New file.
911 * libbfd.c (bfd_putb24): New function.
912 (bfd_putl24): New function.
913 * libbfd.h: Regenerate.
914 * reloc.c: Add s12z relocations.
915 (bfd_get_reloc_size): Handle size 5 relocs.
916 * targets.c: Add s12z_elf32_vec.
918 2018-05-18 H.J. Lu <hongjiu.lu@intel.com>
921 * elf32-i386.c (elf_i386_relocate_section): Handle R_386_GOT32X
923 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
924 set eh->local_ref to 1 for linker defined symbols.
926 2018-05-18 Alan Modra <amodra@gmail.com>
929 * elf.c (setup_group): Formatting. Check that SHT_GROUP entries
930 don't point at other SHT_GROUP sections. Set shdr corresponding
931 to invalid entry, to NULL rather than section 0. Identify
932 SHT_GROUP section index when reporting an error. Cope with NULL
935 2018-05-18 Alan Modra <amodra@gmail.com>
937 * libbfd-in.h (ATTRIBUTE_HIDDEN): Define and use throughout.
938 * configure.ac (HAVE_HIDDEN): Check compiler support for hidden
940 * libbfd.h: Regenerate.
941 * configure: Regenerate.
942 * config.in: Regenerate.
944 2018-05-18 Alan Modra <amodra@gmail.com>
946 * libbfd-in.h: Add include guard.
947 * libcoff-in.h: Likewise.
948 * doc/Makefile.am (libbfd.h, libcoff.h): Append another #endif.
949 * doc/Makefile.in: Regenerate.
950 * libbfd.h: Regenerate.
951 * libcoff.h: Regenerate.
953 2018-05-16 Maciej W. Rozycki <macro@mips.com>
955 * elf32-nds32.c (nds32_convert_32_to_16): Preset `insn_type'.
957 2018-05-16 Alan Modra <amodra@gmail.com>
960 * format.c (struct bfd_preserve): Add section_id.
961 (bfd_preserve_save, bfd_preserve_restore): Save and restore
963 (bfd_reinit): Set _bfd_section_id.
964 (bfd_check_format_matches): Put all matches of any priority into
965 matching_vector. Save initial section id and start each attempted
966 match at that section id.
967 * libbfd-in.h (_bfd_section_id): Declare.
968 * section.c (_bfd_section_id): Rename from section_id and make
970 (bfd_get_next_section_id): Delete.
971 * elf64-ppc.c (ppc64_elf_setup_section_lists): Replace use of
972 bfd_get_section_id with _bfd_section_id.
973 * libbfd.h: Regenerate.
974 * bfd-in2.h: Regenerate.
976 2018-05-15 Christophe Guillon <christophe.guillon@st.com>
978 * coffcode.h (coff_bigobj_swap_aux_in): Make sure that all fields
979 of the aux structure are initialised.
981 2018-05-15 Francois H. Theron <francois.theron@netronome.com>
983 * targets.c: Wrap nfp_elf64_vec in BFD64 ifdef.
985 2018-05-15 Nick Clifton <nickc@redhat.com>
987 * po/pt.po: New Portuguese translation.
988 * configure.ac (ALL_LINGUAS): Add pt.
989 * configure: Regenerate.
991 2018-05-14 H.J. Lu <hongjiu.lu@intel.com>
994 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Don't issue
995 an error on IFUNC pointer defined in PDE.
996 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Call
997 _bfd_x86_elf_link_fixup_ifunc_symbol.
998 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
999 * elfxx-x86.c (_bfd_x86_elf_link_fixup_ifunc_symbol): New
1001 * elfxx-x86.h (_bfd_x86_elf_link_fixup_ifunc_symbol): New.
1003 2018-05-14 H.J. Lu <hongjiu.lu@intel.com>
1006 * elfxx-x86.c (elf_x86_linker_defined): New function.
1007 (_bfd_x86_elf_link_check_relocs): Use it to mark __bss_start,
1008 _end and _edata locally defined within executables.
1010 2018-05-12 Alan Modra <amodra@gmail.com>
1013 * elf.c (rewrite_elf_program_header): Use segment_mark only for
1014 PT_LOAD headers. Delete first_matching_lma and first_suggested_lma.
1015 Instead make matching_lma and suggested_lma pointers to the
1016 sections. Align section vma and lma calculated from segment.
1017 Don't clear includes_phdrs or includes_filehdr based on p_paddr
1018 test. Try to handle alignment padding before first section by
1019 adjusting new segment lma down. Adjust PT_PHDR map p_paddr.
1021 2018-05-09 Dimitar Dimitrov <dimitar@dinux.eu>
1023 * elf32-pru.c (pru_elf32_do_ldi32_relocate): Make LDI32 relocation
1024 conformant to TI ABI.
1025 (pru_elf32_relax_section): Likewise.
1026 (pru_elf_relax_delete_bytes): Fix offsets for new LDI32 code.
1027 * elf32-pru.c (pru_elf32_do_ldi32_relocate): Ignore addend.
1028 (pru_elf32_pmem_relocate): Trap - should not get here.
1029 (pru_elf32_relocate_section): Add support for REL relocations.
1030 (elf_info_to_howto_rel): Enable REL.
1031 (elf_backend_may_use_rel_p): Likewise.
1032 (elf_backend_may_use_rela_p): Likewise.
1033 (elf_backend_default_use_rela_p): Likewise.
1035 2018-05-09 Alan Modra <amodra@gmail.com>
1038 * peXXigen.c (pe_print_edata): Correct minimum size.
1040 2018-05-09 Alan Modra <amodra@gmail.com>
1043 * peXXigen.c (pe_print_idata): Bound check hint_addr.
1045 2018-05-08 Nick Clifton <nickc@redhat.com>
1048 * elf.c (bfd_elf_get_str_section): Check for an excessively large
1050 * elf-attrs.c (_bfd_elf_parse_attributes): Issue an error if the
1051 attribute section is larger than the size of the file.
1053 2018-05-07 Alan Modra <amodra@gmail.com>
1055 * cofflink.c (_bfd_coff_link_input_bfd): Use memcmp rather than
1056 strncmp when checking for ".bf" special symbol.
1057 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Make pe_required_section_flags
1058 section name a char array, remove sentinal known_sections entry,
1059 and adjust loop over known_sections to suit. Use memcmp rather
1062 2018-05-04 Alan Modra <amodra@gmail.com>
1064 * elf-linux-core.h (struct elf_external_linux_prpsinfo32_ugid32),
1065 (struct elf_external_linux_prpsinfo32_ugid16),
1066 (struct elf_external_linux_prpsinfo64_ugid32),
1067 (struct elf_external_linux_prpsinfo64_ugid16): Add ATTRIBUTE_NONSTRING
1068 to pr_fname and pr_psargs fields. Remove GCC diagnostic pragmas.
1070 * elf.c (elfcore_write_prpsinfo): ..here. Indent nested preprocessor
1072 * elf32-arm.c (elf32_arm_nabi_write_core_note): Add ATTRIBUTE_NONSTRING
1074 * elf32-ppc.c (ppc_elf_write_core_note): Likewise.
1075 * elf32-s390.c (elf_s390_write_core_note): Likewise.
1076 * elf64-s390.c (elf_s390_write_core_note): Likewise.
1077 * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewise.
1078 * elf64-x86-64.c (elf_x86_64_write_core_note): Add GCC diagnostic
1080 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Use strnlen to avoid
1081 false positive gcc-8 warning.
1082 * cofflink.c (_bfd_coff_link_input_bfd): Likewise.
1084 2018-05-04 Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
1086 * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Fix the order
1087 of arguments when warning about different long double types.
1089 2018-05-03 Simon Atanasyan <simon@atanasyan.com>
1091 * elf32-mips.c: (elf32_mips_fixup_symbol): New function.
1092 (elf_backend_fixup_symbol): New macro.
1093 * elfxx-mips.c: (mips_elf_output_extsym): Discard _gp_disp
1095 (_bfd_mips_elf_finish_dynamic_symbol): Likewise.
1097 2018-04-30 Francois H. Theron <francois.theron@netronome.com>
1099 * Makefile.am: Added NFP files to build.
1100 * archures.c: Added bfd_arch_nfp
1101 * config.bfd: Added NFP support.
1102 * configure.ac: Added NFP support.
1103 * cpu-nfp.c: New, for NFP support.
1104 * elf-bfd.h: Added elf_section_info()
1105 * elf64-nfp.c: New, for NFP support.
1106 * po/SRC-POTFILES.in: Added NFP source files.
1107 * targets.c: Added nfp_elf64_vec
1108 * bfd-in2.h: Regenerate.
1109 * Makefile.in: Regenerate.
1110 * configure: Regenerate.
1112 2018-04-27 Alan Modra <amodra@gmail.com>
1114 * bfd-in2.h: Regenerate.
1115 * libbfd.h: Regenerate.
1117 2018-04-27 Alan Modra <amodra@gmail.com>
1121 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't drop plt
1123 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Comment fixes.
1125 2018-04-26 Pedro Alves <palves@redhat.com>
1127 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't consider
1128 ifunc and non-ifunc symbols duplicates.
1130 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1131 Mickaël Guêné <mickael.guene@st.com>
1133 * elf32-arm.c (elf32_arm_fdpic_thumb_plt_entry): New.
1134 (elf32_arm_plt_needs_thumb_stub_p): Handle thumb-only case.
1135 (elf32_arm_populate_plt_entry): Likewise.
1136 (elf32_arm_output_plt_map_1): Likewise.
1137 (elf32_arm_output_arch_local_syms): Likewise.
1139 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1140 Mickaël Guêné <mickael.guene@st.com>
1142 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Handle
1143 _GLOBAL_OFFSET_TABLE_ in FDPIC mode.
1145 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1146 Mickaël Guêné <mickael.guene@st.com>
1148 * elf32-arm.c (bfd_elf32_arm_set_target_params): Handle FDPIC case
1151 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1152 Mickaël Guêné <mickael.guene@st.com>
1154 * elf32-arm.c (DEFAULT_STACK_SIZE): New.
1155 (elf32_arm_always_size_sections): Create stack segment.
1157 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1158 Mickaël Guêné <mickael.guene@st.com>
1160 * bfd-in2.h (BFD_RELOC_ARM_TLS_GD32_FDPIC)
1161 (BFD_RELOC_ARM_TLS_LDM32_FDPIC, BFD_RELOC_ARM_TLS_IE32_FDPIC): New
1163 * elf32-arm.c (elf32_arm_howto_table_2): Add R_ARM_TLS_GD32_FDPIC,
1164 R_ARM_TLS_LDM32_FDPIC, R_ARM_TLS_IE32_FDPIC relocations.
1165 (elf32_arm_reloc_map): Add R_ARM_TLS_GD32_FDPIC,
1166 R_ARM_TLS_LDM32_FDPIC, R_ARM_TLS_IE32_FDPIC.
1167 (struct elf32_arm_link_hash_table): Update comment.
1168 (elf32_arm_final_link_relocate): Handle TLS FDPIC relocations.
1169 (IS_ARM_TLS_RELOC): Likewise.
1170 (elf32_arm_check_relocs): Likewise.
1171 (allocate_dynrelocs_for_symbol): Likewise.
1172 (elf32_arm_size_dynamic_sections): Update comment.
1173 * reloc.c: Add BFD_RELOC_ARM_TLS_GD32_FDPIC,
1174 BFD_RELOC_ARM_TLS_LDM32_FDPIC, BFD_RELOC_ARM_TLS_IE32_FDPIC.
1176 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1177 Mickaël Guêné <mickael.guene@st.com>
1179 * elf32-arm.c (elf32_arm_fdpic_plt_entry): New.
1180 (elf32_arm_create_dynamic_sections): Handle FDPIC.
1181 (elf32_arm_allocate_plt_entry): Likewise.
1182 (elf32_arm_populate_plt_entry): Likewise.
1183 (elf32_arm_output_plt_map_1): Likewise.
1185 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1186 Mickaël Guêné <mickael.guene@st.com>
1188 * elf32-arm.c (struct fdpic_local): New.
1189 (elf_arm_obj_tdata): Add local_fdpic_cnts field.
1190 (elf32_arm_local_fdpic_cnts): New.
1191 (struct fdpic_global): New.
1192 (elf32_arm_link_hash_entry): Add fdpic_cnts field.
1193 (elf32_arm_link_hash_table): Add srofixup field.
1194 (arm_elf_add_rofixup): New.
1195 (arm_elf_fill_funcdesc): New.
1196 (elf32_arm_link_hash_newfunc): Handle fdpic_cnts.
1197 (elf32_arm_allocate_local_sym_info): Likewise.
1198 (create_got_section): Create .rofixup section.
1199 (elf32_arm_copy_indirect_symbol): Handle fdpic_cnts.
1200 (bfd_elf32_arm_set_target_params): Handle FDPIC.
1201 (elf32_arm_final_link_relocate): Likewise.
1202 (elf32_arm_check_relocs): Likewise.
1203 (allocate_dynrelocs_for_symbol): Likewise.
1204 (elf32_arm_size_dynamic_sections): Likewise.
1205 (elf32_arm_finish_dynamic_sections): Likewise.
1206 (elf32_arm_output_arch_local_syms): Likewise.
1207 (elf32_arm_fdpic_omit_section_dynsym): New.
1209 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1210 Mickaël Guêné <mickael.guene@st.com>
1212 * bfd-in2.c (BFD_RELOC_ARM_GOTFUNCDESC)
1213 (BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC)
1214 (BFD_RELOC_ARM_FUNCDESC_VALUE): New.
1215 * elf32-arm.c (elf32_arm_howto_table_2): Add R_ARM_GOTFUNCDESC,
1216 R_ARM_GOTOFFFUNCDESC, R_ARM_FUNCDESC, R_ARM_FUNCDESC_VALUE.
1217 (elf32_arm_howto_from_type): Take new members of
1218 elf32_arm_howto_table_2 into account.
1219 (elf32_arm_reloc_map): Add BFD_RELOC_ARM_GOTFUNCDESC,
1220 BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC,
1221 BFD_RELOC_ARM_FUNCDESC_VALUE.
1222 * reloc.c: Add BFD_RELOC_ARM_GOTFUNCDESC,
1223 BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC,
1224 BFD_RELOC_ARM_FUNCDESC_VALUE.
1226 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1227 Mickaël Guêné <mickael.guene@st.com>
1229 * elf32-arm.c (elf32_arm_print_private_bfd_data): Support
1230 EF_ARM_PIC and ELFOSABI_ARM_FDPIC.
1231 (elf32_arm_post_process_headers): Support ELFOSABI_ARM_FDPIC.
1232 (ELF_OSABI): Define to ELFOSABI_ARM_FDPIC.
1234 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1235 Mickaël Guêné <mickael.guene@st.com>
1237 * config.bfd (arm*-*-linux-*): Add arm_elf32_fdpic_be_vec and
1238 arm_elf32_fdpic_le_vec to targ_selvecs. Accept
1239 arm*-*-uclinuxfdpiceabi.
1240 * configure.ac: Add support for arm_elf32_fdpic_be_vec and
1241 arm_elf32_fdpic_le_vec.
1242 * configure: Regenerate.
1243 * elf32-arm.c (struct elf32_arm_link_hash_table): Add fdpic_p.
1244 (elf32_arm_link_hash_table_create): Initialize fdpic_p.
1245 (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME, TARGET_BIG_SYM)
1246 (TARGET_BIG_NAME, elf_match_priority): Define for FDPIC targets.
1247 (elf32_arm_fdpic_link_hash_table_create): New.
1248 * targets.c (_bfd_target_vector): Add arm_elf32_fdpic_be_vec and
1249 arm_elf32_fdpic_le_vec.
1251 2018-04-25 Alan Modra <amodra@gmail.com>
1253 * elf-linux-core.h: Disable gcc-8 string truncation warning.
1254 * elf.c (elfcore_write_prpsinfo): Likewise.
1256 2018-04-25 Alan Modra <amodra@gmail.com>
1258 * Makefile.am: Remove arm-aout and arm-coff support.
1259 * config.bfd: Likewise.
1260 * configure.ac: Likewise.
1261 * targets.c: Likewise.
1262 * aout-arm.c: Delete.
1263 * armnetbsd.c: Delete.
1265 * Makefile.in: Regenerate.
1266 * configure: Regenerate.
1267 * po/SRC-POTFILES.in: Regenerate.
1269 2018-04-24 Nick Clifton <nickc@redhat.com>
1272 * elf.c (ignore_section_sym): Check for the output_section pointer
1273 being NULL before dereferencing it.
1276 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Check for
1277 a negative PE_DEBUG_DATA size before iterating over the debug data.
1279 2018-04-23 Alan Modra <amodra@gmail.com>
1281 * elf-linux-core.h: Revert last change.
1284 2018-04-23 Nick Clifton <nickc@redhat.com>
1287 * aoutx.h (aout_get_external_symbols): Allocate an extra byte at
1288 the end of the string table, and zero it.
1290 2018-04-23 Alan Modra <amodra@gmail.com>
1292 * elf-linux-core.h (swap_linux_prpsinfo32_ugid32_out): Disable
1293 gcc-8 string truncation warning.
1294 (swap_linux_prpsinfo32_ugid16_out): Likewise.
1295 (swap_linux_prpsinfo64_ugid32_out): Likewise.
1296 (swap_linux_prpsinfo64_ugid16_out): Likewise.
1297 * elf.c (elfcore_write_prpsinfo): Likewise.
1299 2018-04-23 Nick Clifton <nickc@redhat.com>
1302 * aoutx.h (aout_get_external_symbols): Allocate an extra byte at
1303 the end of the string table, and zero it.
1305 2018-04-20 Alan Modra <amodra@gmail.com>
1308 * elf32-hppa.c (got_relocs_needed): Add extra param to special
1309 case both dtprel and tprel relocs.
1310 (allocate_dynrelocs): Adjust conditions for got relocs.
1311 (elf32_hppa_relocate_section): Likewise for local sym got relocs.
1312 Emit dynamic relocs on TLS GOT entries for shared libraries,
1313 not when pic. Omit dynamic reloc on dtprel entry when local,
1314 and on tprel entry when local and executable.
1316 2018-04-19 Alan Modra <amodra@gmail.com>
1319 * elf32-hppa.c (elf32_hppa_size_stubs): Init "destination" to -1.
1320 (hppa_type_of_stub): Don't return a long branch stub for
1321 symbols other than those defined statically.
1323 2018-04-19 Alan Modra <amodra@gmail.com>
1325 * Makefile.am: Revert 2018-04-18 coff-mips changes.
1326 * config.bfd: Add back mips_ecoff_le_vec and mips_ecoff_be_vec
1327 to selvecs for mips targets change 2018-04-18.
1328 * configure.ac: Reinstate mips_ecoff_le_vec, mips_ecoff_be_vec
1329 and mips_ecoff_bele_vec.
1330 * targets.c: Likewise.
1331 * coff-mips.c: Resurrect.
1332 * Makefile.in: Regenerate.
1333 * configure: Regenerate.
1334 * po/SRC-POTFILES.in: Regenerate.
1336 2018-04-18 Alan Modra <amodra@gmail.com>
1338 * Makefile.am: Remove mips aout and coff support.
1339 * config.bfd: Likewise.
1340 * configure.ac: Likewise.
1341 * targets.c: Likewise.
1342 * coff-mips.c: Delete
1345 * pei-mips.c: Delete
1346 * Makefile.in: Regenerate.
1347 * configure: Regenerate.
1348 * po/SRC-POTFILES.in: Regenerate.
1350 2018-04-17 H.J. Lu <hongjiu.lu@intel.com>
1352 * elf32-i386.c (elf32_bed): Define before including
1354 * elf64-x86-64.c (elf64_bed): Define before including
1356 (elf32_bed): Define before including "elf32-target.h".
1358 2018-04-17 H.J. Lu <hongjiu.lu@intel.com>
1361 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Use a
1362 normal input file with compatible relocation.
1364 2018-04-18 Alan Modra <amodra@gmail.com>
1366 * Makefile.am: Remove support for assorted i386 aout and coff targets.
1367 * config.bfd: Likewise.
1368 * configure.ac: Likewise.
1369 * doc/bfdint.texi: Likewise.
1370 * targets.c: Likewise.
1371 * freebsd.h: Delete.
1372 * i386dynix.c: Delete.
1373 * i386freebsd.c: Delete.
1374 * i386linux.c: Delete.
1375 * i386mach3.c: Delete.
1376 * i386netbsd.c: Delete.
1377 * i386os9k.c: Delete.
1378 * Makefile.in: Regenerate.
1379 * configure: Regenerate.
1380 * po/SRC-POTFILES.in: Regenerate.
1382 2018-04-17 Andrew Sadek <andrew.sadek.se@gmail.com>
1384 Microblaze Target: PIC data text relative
1386 * bfd/reloc.c (2 new BFD relocations):
1387 BFD_RELOC_MICROBLAZE_64_TEXTPCREL &
1388 BFD_RELOC_MICROBLAZE_64_TEXTPCREL
1389 * bfd/bfd-in2.h: Regenerate
1390 * bfd/libbfd.h: Regenerate
1391 * bfd/elf32-microblaze.c (Handle new relocs): define 'HOWTO' of 3
1392 new relocs and handle them in both relocate and relax functions.
1393 (microblaze_elf_reloc_type_lookup): add mapping between for new
1395 (microblaze_elf_relocate_section): Handle new relocs in case of
1397 (microblaze_elf_relax_section): Handle new relocs for elf relaxation.
1399 2018-04-17 Nick Clifton <nickc@redhat.com>
1402 * aoutx.h (find_nearest_line): Check that the symbol name exists
1403 and is long enough, before attempting to see if it is for a .o
1405 * hash.c (bfd_hash_hash): Add an assertion that the string is not
1407 * linker.c (bfd_link_hash_lookup): Fail if the table or string are
1409 (_bfd_generic_link_add_archive_symbols): Fail if an archive entry
1413 * dwarf2.c (concat_filename): Check for a NULL table pointer.
1415 2018-04-16 Nick Clifton <nickc@redhat.com>
1418 * coffgen.c (coff_pointerize_aux): Check for an out of range
1421 2018-04-16 Alan Modra <amodra@gmail.com>
1423 * Makefile.am: Remove arm-epoc-pe support.
1424 * coff-arm.c: Likewise.
1425 * config.bfd: Likewise.
1426 * configure.ac: Likewise.
1427 * targets.c: Likewise.
1428 * epoc-pe-arm.c: Delete.
1429 * epoc-pei-arm.c: Delete.
1430 * Makefile.in: Regenerate.
1431 * configure: Regenerate.
1432 * po/SRC-POTFILES.in: Regenerate.
1434 2018-04-16 Alan Modra <amodra@gmail.com>
1436 * Makefile.am: Remove sparc-aout and sparc-coff support.
1437 * config.bfd: Likewise.
1438 * configure.ac: Likewise.
1439 * targets.c: Likewise.
1440 * aout-sparcle.c: Delete.
1442 * cf-sparclynx.c: Delete.
1443 * coff-sparc.c: Delete.
1445 * sparclinux.c: Delete.
1446 * sparclynx.c: Delete.
1447 * sparcnetbsd.c: Delete.
1449 * Makefile.in: Regenerate.
1450 * configure: Regenerate.
1451 * po/SRC-POTFILES.in: Regenerate.
1453 2018-04-16 Alan Modra <amodra@gmail.com>
1455 * Makefile.am: Remove m68k-aout and m68k-coff support.
1456 * aoutf1.h: Likewise.
1457 * aoutx.h: Likewise.
1458 * archive.c: Likewise.
1459 * bfd-in.h: Likewise.
1461 * coffcode.h: Likewise.
1462 * coffswap.h: Likewise.
1463 * config.bfd: Likewise.
1464 * configure.ac: Likewise.
1465 * configure.host: Likewise.
1466 * doc/bfd.texinfo: Likewise.
1467 * doc/bfdint.texi: Likewise.
1468 * freebsd.h: Likewise.
1469 * gen-aout.c: Likewise.
1470 * hpux-core.c: Likewise.
1471 * libaout.h: Likewise.
1472 * libbfd-in.h: Likewise.
1473 * pdp11.c: Likewise.
1474 * peicode.h: Likewise.
1475 * riscix.c: Likewise.
1476 * targets.c: Likewise.
1478 * coff-apollo.c: Delete.
1479 * coff-aux.c: Delete.
1480 * coff-m68k.c: Delete.
1481 * coff-svm68k.c: Delete.
1482 * coff-u68k.c: Delete.
1483 * hosts/delta68.h: Delete.
1484 * hosts/hp300bsd.h: Delete.
1485 * hosts/m68kaux.h: Delete.
1486 * hosts/news.h: Delete.
1487 * hp300bsd.c: Delete.
1488 * hp300hpux.c: Delete.
1489 * liboasys.h: Delete.
1490 * m68k4knetbsd.c: Delete.
1491 * m68klinux.c: Delete.
1492 * m68knetbsd.c: Delete.
1494 * versados.c: Delete.
1495 * Makefile.in: Regenerate.
1496 * bfd-in2.h: Regenerate.
1497 * configure: Regenerate.
1498 * libbfd.h: Regenerate.
1499 * po/SRC-POTFILES.in: Regenerate.
1501 2018-04-16 Alan Modra <amodra@gmail.com>
1503 * Makefile.am: Remove sh5 and sh64 support.
1504 * archures.c: Likewise.
1505 * config.bfd: Likewise.
1506 * configure.ac: Likewise.
1507 * cpu-sh.c: Likewise.
1508 * elf32-sh-relocs.h: Likewise.
1509 * elf32-sh.c: Likewise.
1510 * targets.c: Likewise.
1511 * elf32-sh64-com.c: Delete.
1512 * elf32-sh64.c: Delete.
1513 * elf32-sh64.h: Delete.
1514 * elf64-sh64.c: Delete.
1515 * Makefile.in: Regenerate.
1516 * bfd-in2.h: Regenerate.
1517 * configure: Regenerate.
1518 * po/SRC-POTFILES.in: Regenerate.
1520 2018-04-16 Alan Modra <amodra@gmail.com>
1522 * Makefile.am: Remove sh-symbianelf support.
1523 * config.bfd: Likewise.
1524 * configure.ac: Likewise.
1525 * targets.c: Likewise.
1526 * elf32-sh-symbian.c: Delete.
1527 * Makefile.in: Regenerate.
1528 * configure: Regenerate.
1529 * po/SRC-POTFILES.in: Regenerate.
1531 2018-04-16 Alan Modra <amodra@gmail.com>
1533 * Makefile.am: Remove vax-bsd and vax-ultrix support.
1534 * config.bfd: Likewise.
1535 * configure.ac: Likewise.
1536 * targets.c: Likewise.
1538 * Makefile.in: Regenerate.
1539 * configure: Regenerate.
1540 * po/SRC-POTFILES.in: Regenerate.
1542 2018-04-16 Alan Modra <amodra@gmail.com>
1544 * Makefile.am: Remove w65 support.
1545 * archures.c: Likewise.
1546 * coffcode.h: Likewise.
1547 * config.bfd: Likewise.
1548 * configure.ac: Likewise.
1549 * targets.c: Likewise.
1550 * coff-w65.c: Delete.
1551 * cpu-w65.c: Delete.
1552 * Makefile.in: Regenerate.
1553 * bfd-in2.h: Regenerate.
1554 * configure: Regenerate.
1555 * po/SRC-POTFILES.in: Regenerate.
1557 2018-04-16 Alan Modra <amodra@gmail.com>
1559 * Makefile.am: Remove we32k support.
1560 * archures.c: Likewise.
1561 * coffcode.h: Likewise.
1562 * config.bfd: Likewise.
1563 * configure.ac: Likewise.
1564 * targets.c: Likewise.
1565 * coff-we32k.c: Delete.
1566 * cpu-we32k.c: Delete.
1567 * Makefile.in: Regenerate.
1568 * bfd-in2.h: Regenerate.
1569 * configure: Regenerate.
1570 * po/SRC-POTFILES.in: Regenerate.
1572 2018-04-16 Alan Modra <amodra@gmail.com>
1574 * Makefile.am: Remove m88k support.
1575 * aoutx.h: Likewise.
1576 * archures.c: Likewise.
1577 * coffcode.h: Likewise.
1578 * coffswap.h: Likewise.
1579 * config.bfd: Likewise.
1580 * configure.ac: Likewise.
1581 * cpu-ns32k.c: Likewise.
1582 * elf32-nds32.c: Likewise.
1583 * mach-o.c: Likewise.
1584 * netbsd-core.c: Likewise.
1585 * reloc.c: Likewise.
1586 * targets.c: Likewise.
1587 * coff-m88k.c: Delete.
1588 * cpu-m88k.c: Delete.
1589 * elf32-m88k.c: Delete.
1590 * hosts/m88kmach3.h: Delete.
1591 * m88kmach3.c: Delete.
1592 * m88kopenbsd.c: Delete.
1593 * Makefile.in: Regenerate.
1594 * bfd-in2.h: Regenerate.
1595 * configure: Regenerate.
1596 * po/SRC-POTFILES.in: Regenerate.
1598 2018-04-16 Alan Modra <amodra@gmail.com>
1600 * Makefile.am: Remove i370 support.
1601 * archures.c: Likewise.
1602 * config.bfd: Likewise.
1603 * configure.ac: Likewise.
1604 * targets.c: Likewise.
1605 * cpu-i370.c: Delete.
1606 * elf32-i370.c: Delete.
1607 * Makefile.in: Regenerate.
1608 * bfd-in2.h: Regenerate.
1609 * configure: Regenerate.
1610 * po/SRC-POTFILES.in: Regenerate.
1612 2018-04-16 Alan Modra <amodra@gmail.com>
1614 * Makefile.am: Remove h8500 support.
1615 * archures.c: Likewise.
1616 * coffcode.h: Likewise.
1617 * config.bfd: Likewise.
1618 * configure.ac: Likewise.
1619 * targets.c: Likewise.
1620 * coff-h8500.c: Delete.
1621 * cpu-h8500.c: Delete.
1622 * Makefile.in: Regenerate.
1623 * bfd-in2.h: Regenerate.
1624 * configure: Regenerate.
1625 * po/SRC-POTFILES.in: Regenerate.
1627 2018-04-16 Alan Modra <amodra@gmail.com>
1629 * Makefile.am: Remove h8300-coff support.
1630 * coffcode.h: Likewise.
1631 * config.bfd: Likewise.
1632 * configure.ac: Likewise.
1633 * reloc16.c: Likewise.
1634 * targets.c: Likewise.
1635 * coff-h8300.c: Delete.
1636 * Makefile.in: Regenerate.
1637 * configure: Regenerate.
1638 * po/SRC-POTFILES.in: Regenerate.
1640 2018-04-16 Alan Modra <amodra@gmail.com>
1642 * Makefile.am: Remove IEEE 695 support.
1643 * archures.c: Likewise.
1645 * config.bfd: Likewise.
1646 * configure.ac: Likewise.
1647 * doc/bfd.texinfo: Likewise.
1648 * doc/bfdint.texi: Likewise.
1649 * doc/bfdsumm.texi: Likewise.
1650 * section.c: Likewise.
1651 * targets.c: Likewise.
1653 * libieee.h: Delete.
1654 * Makefile.in: Regenerate.
1655 * bfd-in2.h: Regenerate.
1656 * configure: Regenerate.
1657 * po/SRC-POTFILES.in: Regenerate.
1659 2018-04-16 Alan Modra <amodra@gmail.com>
1661 * config.bfd: Remove tandem support.
1663 2018-04-16 Alan Modra <amodra@gmail.com>
1665 * Makefile.am: Remove newsos3 support.
1666 * aoutx.h: Likewise.
1667 * config.bfd: Likewise.
1668 * configure.ac: Likewise.
1669 * targets.c: Likewise.
1670 * newsos3.c: Delete.
1671 * Makefile.in: Regenerate.
1672 * configure: Regenerate.
1673 * po/SRC-POTFILES.in: Regenerate.
1675 2018-04-16 Alan Modra <amodra@gmail.com>
1677 * Makefile.am: Remove netware support.
1678 * bfd-in.h: Likewise.
1680 * config.bfd: Likewise.
1681 * configure.ac: Likewise.
1682 * doc/bfdint.texi: Likewise.
1683 * ecoff.c: Likewise.
1684 * targets.c: Likewise.
1686 * nlm-target.h: Delete.
1688 * nlm32-alpha.c: Delete.
1689 * nlm32-i386.c: Delete.
1690 * nlm32-ppc.c: Delete.
1691 * nlm32-sparc.c: Delete.
1694 * nlmcode.h: Delete.
1695 * nlmswap.h: Delete.
1696 * Makefile.in: Regenerate.
1697 * bfd-in2.h: Regenerate.
1698 * configure: Regenerate.
1699 * po/SRC-POTFILES.in: Regenerate.
1701 2018-04-16 Alan Modra <amodra@gmail.com>
1703 * archures.c: Remove tahoe support.
1704 * config.bfd: Likewise.
1705 * configure.ac: Likewise.
1706 * hosts/tahoe.h: Delete.
1707 * bfd-in2.h: Regenerate.
1708 * configure: Regenerate.
1710 2018-04-14 Alan Modra <amodra@gmail.com>
1712 * elf-bfd.h (struct elf_backend_data): Add relropagesize.
1713 * elfxx-target.h (ELF_RELROPAGESIZE): Provide default and
1715 (elfNN_bed): Init relropagesize.
1716 * bfd.c (bfd_emul_get_commonpagesize): Add boolean param to
1717 select relropagesize.
1718 * elf32-ppc.c (ELF_COMMONPAGESIZE): Define as 0x1000.
1719 (ELF_RELROPAGESIZE): Define as ELF_MAXPAGESIZE.
1720 (ELF_MINPAGESIZE): Don't define.
1721 * elf64-ppc.c (ELF_COMMONPAGESIZE): Define as 0x1000.
1722 (ELF_RELROPAGESIZE): Define as ELF_MAXPAGESIZE.
1723 * bfd-in2.h: Regenerate.
1725 2018-04-14 Alan Modra <amodra@gmail.com>
1727 * elf32-ppc.c (ELF_MAXPAGESIZE, ELF_COMMONPAGESIZE): Don't depend
1728 on __QNXTARGET__ define.
1730 2018-04-14 Alan Modra <amodra@gmail.com>
1732 * config.bfd: Add powerpc-*-lynxos* and powerpc-*-windiss*
1735 2018-04-11 Alan Modra <amodra@gmail.com>
1737 * aout-adobe.c: Delete.
1739 * coff-i860.c: Delete.
1740 * coff-i960.c: Delete.
1741 * cpu-i860.c: Delete.
1742 * cpu-i960.c: Delete.
1743 * elf32-i860.c: Delete.
1744 * elf32-i960.c: Delete.
1745 * hosts/i860mach3.h: Delete.
1746 * Makefile.am: Remove i860, i960, bout, and adobe support.
1747 * archures.c: Remove i860 and i960 support.
1748 * coffcode.h: Likewise.
1749 * reloc.c: Likewise.
1750 * aoutx.h: Comment updates.
1751 * archive.c: Remove BOUT and i960 support.
1752 * bfd.c: Remove BOUT support.
1753 * coffswap.h: Remove i960 support.
1754 * config.bfd: Remove i860, i960 and adobe targets.
1755 * configure.ac: Remove adode, bout, i860, i960, icoff targets.
1756 * targets.c: Likewise.
1757 * ieee.c: Remove i960 support.
1758 * mach-o.c: Remove i860 support.
1759 * Makefile.in: Regenerate.
1760 * bfd-in2.h: Regenerate.
1761 * configure: Regenerate.
1762 * libbfd.h: Regenerate.
1763 * po/SRC-POTFILES.in: Regenerate.
1765 2018-04-09 Maciej W. Rozycki <macro@mips.com>
1767 * elf64-mips.c (mips_elf64_write_rel): Handle a NULL BFD pointer
1768 in the BFD symbol referred by the relocation.
1769 (mips_elf64_write_rela): Likewise.
1771 2018-04-09 Maciej W. Rozycki <macro@mips.com>
1773 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Issue an
1774 error for out-of-range `r_sym' values.
1776 2018-04-09 Alan Modra <amodra@gmail.com>
1778 * elf64-ppc.c (struct _ppc64_elf_section_data): Add has_pltcall field.
1779 (struct ppc_link_hash_table): Add can_convert_all_inline_plt.
1780 (ppc64_elf_check_relocs): Set has_pltcall.
1781 (ppc64_elf_adjust_dynamic_symbol): Discard some PLT entries.
1782 (ppc64_elf_inline_plt): New function.
1783 (ppc64_elf_size_dynamic_sections): Discard some PLT entries for locals.
1784 * elf64-ppc.h (ppc64_elf_inline_plt): Declare.
1785 * elf32-ppc.c (has_pltcall): Define.
1786 (struct ppc_elf_link_hash_table): Add can_convert_all_inline_plt.
1787 (ppc_elf_check_relocs): Set has_pltcall.
1788 (ppc_elf_inline_plt): New function.
1789 (ppc_elf_adjust_dynamic_symbol): Discard some PLT entries.
1790 (ppc_elf_size_dynamic_sections): Likewise.
1791 * elf32-ppc.h (ppc_elf_inline_plt): Declare.
1793 2018-04-09 Alan Modra <amodra@gmail.com>
1795 * elf32-ppc.c (ppc_elf_howto_raw): Add PLTSEQ and PLTCALL howtos.
1796 (is_plt_seq_reloc): New function.
1797 (ppc_elf_check_relocs): Handle PLTSEQ and PLTCALL relocs.
1798 (ppc_elf_tls_optimize): Handle inline plt call sequence.
1799 (ppc_elf_relax_section): Handle PLTCALL reloc.
1800 (ppc_elf_relocate_section): Nop out inline plt call sequence when
1802 * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_PLTSEQ and
1803 R_PPC64_PLTCALL entries. Comment R_PPC64_TOCSAVE.
1804 (has_tls_get_addr_call): Correct comment.
1805 (is_branch_reloc): Add PLTCALL.
1806 (is_plt_seq_reloc): New function.
1807 (ppc64_elf_check_relocs): Handle PLT16_LO_DS reloc. Set
1808 has_tls_reloc for R_PPC64_TLSGD and R_PPC64_TLSLD. Create plt
1809 entry for R_PPC64_PLTCALL.
1810 (ppc64_elf_tls_optimize): Handle inline plt call sequence.
1811 (ppc_type_of_stub): Handle PLTCALL reloc.
1812 (toc_adjusting_stub_needed): Likewise.
1813 (ppc64_elf_relocate_section): Set "can_plt_call" for PLTCALL
1814 reloc insn. Nop out inline plt call sequence when resolving
1815 locally. Handle __tls_get_addr inline plt call optimization.
1817 2018-04-09 Alan Modra <amodra@gmail.com>
1819 * elf64-ppc.c (LOCAL_PLT_ENTRY_SIZE): Define.
1820 (struct ppc_stub_hash_entry): Add symtype field.
1822 (struct ppc_link_hash_table): Add pltlocal and relpltlocal.
1823 (create_linkage_sections): Create pltlocal and relpltlocal.
1824 (ppc64_elf_check_relocs): Allow PLT relocs on local symbols.
1826 (ppc64_elf_adjust_dynamic_symbol): Keep PLT entries for inline calls.
1827 (allocate_dynrelocs): Allocate pltlocal and relpltlocal.
1828 (ppc64_elf_size_dynamic_sections): Size pltlocal and relpltlocal.
1829 Keep PLT entries for inline calls against locals.
1830 (ppc_build_one_stub): Use pltlocal as appropriate.
1831 (ppc_size_one_stub): Likewise.
1832 (ppc64_elf_size_stubs): Set symtype.
1833 (build_global_entry_stubs_and_plt): Init pltlocal and write
1834 relpltlocal for globals.
1835 (write_plt_relocs_for_local_syms): Likewise for local syms.
1836 (ppc64_elf_relocate_section): Support PLT for local syms.
1837 * elf32-ppc.c (PLT_KEEP): Define.
1838 (struct ppc_elf_link_hash_table): Add pltlocal and relpltlocal.
1839 (ppc_elf_create_glink): Create pltlocal and relpltlocal.
1840 (ppc_elf_check_relocs): Allow PLT relocs on local symbols.
1841 Set PLT_KEEP. Adjust update_local_sym_info call.
1842 (ppc_elf_adjust_dynamic_symbol): Keep PLT entries for inline calls.
1843 (allocate_dynrelocs): Allocate pltlocal and relpltlocal.
1844 (ppc_elf_size_dynamic_sections): Size pltlocal and relpltlocal.
1845 (ppc_elf_relocate_section): Support PLT16 relocs for local syms.
1846 (write_global_sym_plt): Init pltlocal and write relpltlocal.
1847 (ppc_finish_symbols): Likewise for locals.
1849 2018-04-09 Alan Modra <amodra@gmail.com>
1851 * elf64-ppc.c (ppc_build_one_stub): Move output of PLT relocs
1852 for local symbols to..
1853 (write_plt_relocs_for_local_syms): ..here. New function.
1854 (ppc64_elf_finish_dynamic_symbol): Move output of PLT relocs for
1856 (build_global_entry_stubs_and_plt): ..here. Rename from
1857 build_global_entry_stubs.
1858 (ppc64_elf_build_stubs): Always call build_global_entry_stubs_and_plt.
1859 Call write_plt_relocs_for_local_syms.
1860 * elf32-ppc.c (get_sym_h): New function.
1861 (ppc_elf_relax_section): Use get_sym_h.
1862 (ppc_elf_relocate_section): Move output of PLT relocs and glink
1863 stubs for local symbols to..
1864 (ppc_finish_symbols): ..here. New function.
1865 (ppc_elf_finish_dynamic_symbol): Move output of PLT relocs for
1867 (write_global_sym_plt): ..here. New function.
1868 * elf32-ppc.h (ppc_elf_modify_segment_map): Delete attribute.
1869 (ppc_finish_symbols): Declare.
1871 2018-04-09 Alan Modra <amodra@gmail.com>
1873 * elf32-ppc.c (ppc_elf_check_relocs): Handle PLT16 relocs.
1874 (ppc_elf_relocate_section): Likewise.
1875 * elf64-ppc.c (ppc64_elf_check_relocs): Handle PLT16_LO_DS.
1876 (ppc64_elf_relocate_section): Likewise. Correct PLT16
1877 resolution to plt entry relative to toc pointer.
1879 2018-04-09 Alan Modra <amodra@gmail.com>
1881 * elf64-ppc.c (TLS_TLS, TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL,
1882 TLS_TPRELGD, TLS_EXPLICIT): Renumber. Test TLS_TLS throughout
1883 file when other TLS flags are tested in a mask.
1884 (TLS_MARK, NON_GOT): Define.
1885 (PLT_IFUNC): Redefine, and test TLS_TLS throughout file as well.
1886 (update_local_sym_info): Don't create got entry when NON_GOT.
1887 (ppc64_elf_check_relocs): Pass NON_GOT with PLT_IFUNC.
1889 (get_tls_mask): Do toc lookup if tls_mask is just TLS_MARK.
1890 (ppc64_elf_relocate_section): Likewise.
1891 (ppc64_elf_tls_optimize): Don't attempt to optimize indirect
1892 __tls_get_addr calls lacking a marker reloc.
1893 * elf32-ppc.c (TLS_TLS, TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL,
1894 TLS_TPRELGD): Renumber. Update comment.
1895 (TLS_MARK, NON_GOT): Define.
1896 (PLT_IFUNC): Redefine, and test TLS_TLS throughout file as well.
1897 (update_local_sym_info): Don't create got entry when NON_GOT.
1898 (ppc_elf_check_relocs): Pass NON_GOT with PLT_IFUNC.
1900 (ppc_elf_tls_optimize): Don't attempt to optimize indirect
1901 __tls_get_addr calls lacking a marker reloc.
1903 2018-04-06 H.J. Lu <hongjiu.lu@intel.com>
1905 * elf64-x86-64.c (elf_x86_64_info_to_howto): Don't mask out
1906 R_X86_64_converted_reloc_bit.
1908 2018-04-05 H.J. Lu <hongjiu.lu@intel.com>
1911 * configure: Regenerated.
1913 2018-04-05 Alan Modra <amodra@gmail.com>
1915 * elf-hppa.h (elf_hppa_info_to_howto): Init howto to NULL.
1916 (elf_hppa_info_to_howto_rel): Likewise.
1918 2018-04-04 Maciej W. Rozycki <macro@mips.com>
1920 * elf-hppa.h (elf_hppa_info_to_howto): Also return
1921 unsuccessfully for unimplemented relocations.
1922 (elf_hppa_info_to_howto_rel): Likewise.
1924 2018-04-04 Maciej W. Rozycki <macro@mips.com>
1926 * elf32-i860.c (lookup_howto): Add `abfd' parameter. Set the
1927 `bfd_error_bad_value' error and call `_bfd_error_handler' on a
1928 howto lookup failure.
1929 (elf32_i860_reloc_type_lookup): Adjust `lookup_howto' call
1931 (elf32_i860_info_to_howto_rela): Likewise.
1932 (elf32_i860_relocate_splitn): Likewise.
1933 (elf32_i860_relocate_pc16): Likewise.
1934 (elf32_i860_relocate_pc26): Likewise.
1935 (elf32_i860_relocate_section): Likewise.
1937 2018-04-04 Maciej W. Rozycki <macro@mips.com>
1939 * elf32-visium.c (visium_info_to_howto_rela): Correct the range
1940 check for `visium_elf_howto_table' table access.
1942 2018-04-04 Maciej W. Rozycki <macro@mips.com>
1944 * elf32-iq2000.c (iq2000_info_to_howto_rela): Correct the range
1945 check for `iq2000_elf_howto_table' table access.
1947 2018-04-04 Maciej W. Rozycki <macro@mips.com>
1949 * elf32-frv.c (frv_info_to_howto_rela): Correct the range check
1950 for `elf32_frv_howto_table' table access.
1952 2018-04-04 Maciej W. Rozycki <macro@mips.com>
1954 * elf32-mips.c (mips_elf32_rtype_to_howto): Also return
1955 unsuccessfully for placeholder howtos.
1956 * elf64-mips.c (mips_elf64_rtype_to_howto): Likewise.
1957 * elfn32-mips.c (mips_elf_n32_rtype_to_howto): Likewise.
1959 2018-03-29 Maciej W. Rozycki <macro@mips.com>
1961 * elf32-mips.c (mips_info_to_howto_rel): Remove the calls to
1962 `_bfd_error_handler' and to set the `bfd_error_bad_value' error.
1964 2018-03-28 Maciej W. Rozycki <macro@mips.com>
1966 * elf-hppa.h (elf_hppa_info_to_howto_rel): Remove
1967 ATTRIBUTE_UNUSED from `abfd'.
1969 2018-03-28 Maciej W. Rozycki <macro@mips.com>
1971 * elf-hppa.h (elf_hppa_info_to_howto_rel): Correct
1972 `_bfd_error_handler' call formatting.
1974 2018-03-28 Maciej W. Rozycki <macro@mips.com>
1976 * elf32-mips.c (mips_info_to_howto_rel): Call
1977 `mips_elf32_rtype_to_howto' directly rather than via
1978 `->elf_backend_mips_rtype_to_howto'.
1980 2018-03-28 Renlin Li <renlin.li@arm.com>
1983 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Add cases for
1984 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12,
1985 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
1986 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12,
1987 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
1988 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12,
1989 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
1990 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12,
1991 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
1992 (elfNN_aarch64_final_link_relocate): Support new relocations.
1993 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Support new
1995 (_bfd_aarch64_elf_resolve_relocation): Support new relocations.
1997 2018-03-28 Renlin Li <renlin.li@arm.com>
2000 * reloc.c: Add BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12
2001 BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12_NC,
2002 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12,
2003 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
2004 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12,
2005 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
2006 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12,
2007 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
2008 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12,
2009 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
2010 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Add table entry for
2011 TLSLE_LDST16_TPREL_LO12,
2012 TLSLE_LDST16_TPREL_LO12_NC,
2013 TLSLE_LDST32_TPREL_LO12,
2014 TLSLE_LDST32_TPREL_LO12_NC,
2015 TLSLE_LDST64_TPREL_LO12,
2016 TLSLE_LDST64_TPREL_LO12_NC,
2017 TLSLE_LDST8_TPREL_LO12,
2018 TLSLE_LDST8_TPREL_LO12_NC.
2019 * bfd-in2.h: Regenerated.
2020 * libbfd.h: Regenerated.
2022 2018-03-28 Eric Botcazou <ebotcazou@adacore.com>
2025 * elfxx-sparc.c (struct _bfd_sparc_elf_link_hash_entry): Add new flag
2026 has_old_style_got_reloc.
2027 (_bfd_sparc_elf_check_relocs) <GOT relocations>: Set it for old-style
2028 relocations. Fix a couple of long lines.
2029 (_bfd_sparc_elf_relocate_section) <R_SPARC_GOTDATA_OP>: Do not generate
2030 a R_SPARC_NONE for the GOT slot if the symbol is also subject to old-style
2033 2018-03-25 H.J. Lu <hongjiu.lu@intel.com>
2036 * elf64-x86-64.c (elf_x86_64_finish_dynamic_sections): Add
2037 ENDBR64 to the TLSDESC PLT entry.
2039 2018-03-21 Alan Modra <amodra@gmail.com>
2041 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Trim uninteresting
2042 symbols. Use size_t counts. Delete redundant opd test.
2044 2018-03-21 Alan Modra <amodra@gmail.com>
2046 * elf32-ppc.c (ppc_elf_tls_optimize): Delete locsyms.
2048 2018-03-21 Alan Modra <amodra@gmail.com>
2050 * elf32-ppc.c (struct ppc_elf_link_hash_entry): Make tls_mask
2052 (update_local_sym_info): Likewise for local_got_tls_masks.
2053 (ppc_elf_tls_optimize): Likewise for lgot_masks.
2055 2018-03-21 Alan Modra <amodra@gmail.com>
2057 * elf64-ppc.c (ppc_size_one_stub): Fix comment typo.
2058 (ppc64_elf_layout_multitoc): Allocate relocs for tprel as we
2059 do in size_dynamic_sections.
2061 2018-03-21 Alan Modra <amodra@gmail.com>
2063 * elf64-ppc.c (ppc64_elf_relocate_section): Don't access rel[1]
2064 without first checking array bounds.
2065 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2067 2018-03-20 H.J. Lu <hongjiu.lu@intel.com>
2070 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Set
2071 non_ir_ref_dynamic if a symbol is made dynamic by --dynamic-list.
2073 2018-03-19 Nick Clifton <nickc@redhat.com>
2075 * po/es.po: Updated Spanish translation.
2077 2018-03-15 Max Filippov <jcmvbkbc@gmail.com>
2079 * elf32-xtensa.c (xlate_map_entry): Change types of address
2080 fields from 'unsigned' to 'bfd_vma'.
2081 (xlate_offset_with_removed_text): Use struct xlate_map_entry as
2082 the key argument to bsearch. Allow offsets past the end of a
2083 section, use the last map entry for translation of such offsets.
2085 2018-03-15 Kuan-Lin Chen <kuanlinchentw@gmail.com>
2087 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Removed.
2088 Not support the target feature.
2089 (nds32_elf_ex9_itb_base): Likewise.
2090 (nds32_elf_ex9_import_table): Likewise.
2091 (nds32_elf_ex9_finish): Likewise.
2092 (nds32_elf_ex9_reloc_jmp): Likewise.
2093 (nds32_elf_get_insn_with_reg): Likewise.
2094 (nds32_get_local_syms): Likewise.
2095 (nds32_elf_ex9_replace_instruction): Likewise.
2096 (nds32_elf_ifc_calc): Likewise.
2097 (nds32_elf_ifc_finish): Likewise.
2098 (nds32_elf_ifc_replace): Likewise.
2099 (nds32_elf_ifc_reloc): Likewise.
2101 2018-03-14 Alan Modra <amodra@gmail.com>
2103 * elf64-ppc.c (sfpr_define): Adjust for stub_sec size having
2104 sfpr size added before defining alias symbols.
2105 (ppc64_elf_build_stubs): Add stub section padding before
2106 copying sfpr contents and defining save/restore alias symbols.
2108 2018-03-14 H.J. Lu <hongjiu.lu@intel.com>
2111 * elflink.c (elf_gc_mark_debug_section): Also check the local
2112 debug definition section.
2114 2018-03-13 Nick Clifton <nickc@redhat.com>
2117 * pei-x86_64.c (pex64_get_unwind_info): Change to a boolean
2118 function. Add an end address parameter. Check access of the data
2119 pointer to make sure that they do not extend beyond the end
2120 address. Return FALSE if any check fails. Add the end address
2121 pointer to the ui structure.
2122 (pex64_xdata_print_uwd_codes): Check accesses of the raw unwind
2123 codes to make sure that they do not extend beyond the end address
2124 pointer. Print an error message and return immediately if any
2127 2018-03-09 Nick Clifton <nickc@redhat.com>
2129 * elf64-s390.c (elf_s390_relocate_section): Move check for
2130 relocations against non-allocated sections to before the code that
2131 handles ifunc relocations.
2132 * elf32-s390.c (elf_s390_relocate_section): Likewise.
2133 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Treat
2134 relocs against IFUNC symbols in non-allocated sections as relocs
2135 against FUNC symbols.
2136 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
2138 2018-03-08 H.J. Lu <hongjiu.lu@intel.com>
2141 * elf32-i386.c (elf_i386_relocate_section): Treat relocation
2142 against IFUNC symbol in SHT_NOTE section without SHF_ALLOC as
2143 relocation against FUNC symbol.
2144 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
2146 2018-03-07 Renlin Li <renlin.li@arm.com>
2149 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Check absolute
2150 symbol, and don't emit relocation in specific case.
2152 2018-03-07 Alan Modra <amodra@gmail.com>
2154 * elf64-mips.c (mips_elf64_rtype_to_howto): Return NULL on error.
2155 (mips_elf64_slurp_one_reloc_table): Pass on error.
2157 2018-03-03 James Cowgill <james.cowgill@mips.com>
2158 Maciej W. Rozycki <macro@mips.com>
2161 * elfxx-mips.c (mips_elf_calculate_relocation): Only return
2162 after calling `undefined_symbol' hook if this is an error
2163 condition. Assume the value of 0 for the symbol requested
2166 2018-03-02 Jim Wilson <jimw@sifive.com>
2169 * elfnn-aarch64.c (_bfd_aarch64_resize_stubs): Add 8 bytes for branch
2170 and nop instead of 4.
2171 (elfNN_arch64_build_stubs): Add nop after branch. Increase size by
2174 2018-03-01 Jim Wilson <jimw@sifive.com>
2177 * elfnn-riscv.c (riscv_relax_delete_bytes): When adjust st_size, use
2178 else if instead of if.
2180 2018-03-01 Alan Modra <amodra@gmail.com>
2182 * elf32-ft32.c (ft32_info_to_howto_rela): Correct range test.
2184 2018-02-28 Alan Modra <amodra@gmail.com>
2187 * aoutx.h (swap_std_reloc_in): Correct r_index bound check.
2189 2018-02-28 Nick Clifton <nickc@redhat.com>
2193 * dwarf2.c (read_n_bytes): Replace size parameter with dwarf_block
2194 pointer. Drop unused abfd parameter. Check the size of the block
2195 before initialising the data field. Return the end pointer if the
2197 (read_attribute_value): Adjust invocations of read_n_bytes.
2200 * dwarf1.c (parse_die): Check the length of form blocks before
2201 advancing the data pointer.
2203 2018-02-28 Alan Modra <amodra@gmail.com>
2206 * aoutx.h (translate_symbol_table): Print an error message and set
2207 bfd_error on finding an invalid name string offset.
2209 2018-02-27 H.J. Lu <hongjiu.lu@intel.com>
2211 * config.in: Regenerated.
2212 * configure: Likewise.
2213 * configure.ac: Add --enable-separate-code.
2214 (DEFAULT_LD_Z_SEPARATE_CODE): New AC_DEFINE_UNQUOTED. Default
2215 to 1 for Linux/x86 targets,
2216 * elf64-x86-64.c (ELF_MAXPAGESIZE): Set to 0x1000 if
2217 DEFAULT_LD_Z_SEPARATE_CODE is 1.
2219 2018-02-27 Nick Clifton <nickc@redhat.com>
2221 * aout-cris.c (swap_ext_reloc_out): Standadize error/warning
2223 * elf-hppa.h (elf_hppa_info_to_howto_rel): Likewise.
2224 * elf32-i386.c (elf_i386_reloc_type_lookup): Likewise.
2225 * elf32-xtensa.c (elf_xtensa_reloc_type_lookup): Likewise.
2226 * elf64-ppc.c (ppc64_elf_reloc_type_lookup): Likewise.
2227 * elf64-s390.c (elf_s390_reloc_type_lookup): Likewise.
2228 * elf64-sh64.c (sh_elf64_info_to_howto): Likewise.
2229 * elfxx-ia64.c (ia64_elf_reloc_type_lookup): Likewise.
2230 * elfxx-sparc.c (_bfd_sparc_elf_reloc_type_lookup): Likewise.
2231 * elfxx-tilegx.c (tilegx_reloc_type_lookup): Likewise.
2234 * elf-bfd.h (struct elf_backend_data): Change the return type of
2235 the elf_info_to_howto and elf_info_to_howto_rel function pointers
2237 * elfcode.h (elf_slurp_reloc_table_from_section): Check the return
2238 value from the info_to_howto function and fail if that function
2240 * elf32-h8300.c (elf32_h8_relocate_section): Check return value
2241 from the info_to_howto function.
2242 (elf32_h8_relax_section): Likewise.
2243 * elf32-lm32.c (lm32_elf_relocate_section): Likewise.
2244 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
2245 * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise.
2246 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
2247 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
2248 * elf64-ia64-vms.c (elf64_ia64_relocate_section): Likewise.
2249 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Likewise.
2250 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
2251 * elfnn-ia64.c (elfNN_ia64_relocate_section): Likewise.
2252 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
2253 (riscv_elf_relocate_section): Likewise.
2254 * elf-hppa.h (elf_hppa_info_to_howto): Change return type to
2255 bfd_boolean. Issue an error message, set an error value and
2256 return FALSE if the reloc is not recognized.
2257 (elf_hppa_info_to_howto_rel): Likewise.
2258 * elf-m10200.c (mn10200_info_to_howto): Likewise.
2259 * elf-m10300.c (mn10300_info_to_howto): Likewise.
2260 * elf.c (_bfd_elf_no_info_to_howto): Likewise.
2261 * elf32-arc.c (arc_info_to_howto_rel): Likewise.
2262 * elf32-arm.c (elf32_arm_info_to_howto): Likewise.
2263 * elf32-avr.c (avr_info_to_howto_rela): Likewise.
2264 * elf32-bfin.c (bfin_info_to_howto): Likewise.
2265 * elf32-cr16.c (elf_cr16_info_to_howto): Likewise.
2266 * elf32-cr16c.c (elf_cr16c_info_to_howto): Likewise.
2267 * elf32-cris.c (elf_cr16c_info_to_howto_rel)
2268 (cris_info_to_howto_rela): Likewise.
2269 * elf32-crx.c (elf_crx_info_to_howto): Likewise.
2270 * elf32-d10v.c (d10v_info_to_howto_rel): Likewise.
2271 * elf32-d30v.c (d30v_info_to_howto_rel, d30v_info_to_howto_rela):
2273 * elf32-dlx.c (dlx_rtype_to_howto, elf32_dlx_info_to_howto)
2274 (elf32_dlx_info_to_howto_rel): Likewise.
2275 * elf32-epiphany.c (epiphany_info_to_howto_rela): Likewise.
2276 * elf32-fr30.c (fr30_info_to_howto_rela): Likewise.
2277 * elf32-frv.c (frv_info_to_howto_rela)
2278 (frvfdpic_info_to_howto_rel): Likewise.
2279 * elf32-ft32.c (ft32_info_to_howto_rela): Likewise.
2280 * elf32-gen.c (elf_generic_info_to_howto)
2281 (elf_generic_info_to_howto_rel): Likewise.
2282 * elf32-h8300.c (elf32_h8_info_to_howto)
2283 (elf32_h8_info_to_howto_rel): Likewise.
2284 * elf32-i370.c (i370_elf_info_to_howto): Likewise.
2285 * elf32-i386.c (elf_i386_reloc_type_lookup)
2286 (elf_i386_rtype_to_howto, elf_i386_info_to_howto_rel): Likewise.
2287 * elf32-i860.c (lookup_howto, elf32_i860_info_to_howto_rela):
2289 * elf32-i960.c (elf32_i960_info_to_howto_rel): Likewise.
2290 * elf32-ip2k.c (ip2k_info_to_howto_rela): Likewise.
2291 * elf32-iq2000.c (iq2000_info_to_howto_rela): Likewise.
2292 * elf32-lm32.c (lm32_info_to_howto_rela): Likewise.
2293 * elf32-m32c.c (m32c_info_to_howto_rela): Likewise.
2294 * elf32-m32r.c (m32r_info_to_howto_rel, m32r_info_to_howto):
2296 * elf32-m68hc11.c (m68hc11_info_to_howto_rel): Likewise.
2297 * elf32-m68hc12.c (m68hc11_info_to_howto_rel): Likewise.
2298 * elf32-m68k.c (rtype_to_howto): Likewise.
2299 * elf32-mcore.c (mcore_elf_info_to_howto): Likewise.
2300 * elf32-mep.c (mep_info_to_howto_rela): Likewise.
2301 * elf32-metag.c (metag_info_to_howto_rela): Likewise.
2302 * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise.
2303 * elf32-mips.c (mips_info_to_howto_rel, mips_info_to_howto_rela):
2305 * elf32-moxie.c (moxie_info_to_howto_rela): Likewise.
2306 * elf32-msp430.c (msp430_info_to_howto_rela): Likewise.
2307 * elf32-mt.c (mt_info_to_howto_rela): Likewise.
2308 * elf32-nds32.c (nds32_info_to_howto_rel, nds32_info_to_howto):
2310 * elf32-nios2.c (nios2_elf32_info_to_howto): Likewise.
2311 * elf32-or1k.c (or1k_info_to_howto_rela): Likewise.
2312 * elf32-pj.c (pj_elf_info_to_howto): Likewise.
2313 * elf32-ppc.c (ppc_elf_info_to_howto): Likewise.
2314 * elf32-pru.c (pru_elf32_info_to_howto): Likewise.
2315 * elf32-rl78.c (rl78_info_to_howto_rela): Likewise.
2316 * elf32-rx.c (rx_info_to_howto_rela): Likewise.
2317 * elf32-s390.c (elf_s390_info_to_howto): Likewise.
2318 * elf32-score.c (s3_bfd_score_info_to_howto)
2319 (_bfd_score_info_to_howto): Likewise.
2320 * elf32-score7.c (s7_bfd_score_info_to_howto): Likewise.
2321 * elf32-sh.c (sh_elf_info_to_howto): Likewise.
2322 * elf32-spu.c (spu_elf_info_to_howto): Likewise.
2323 * elf32-tic6x.c (elf32_tic6x_info_to_howto)
2324 (elf32_tic6x_info_to_howto_rel): Likewise.
2325 * elf32-tilepro.c (tilepro_info_to_howto_rela): Likewise.
2326 * elf32-v850.c (v850_elf_info_to_howto_rel)
2327 (v850_elf_info_to_howto_rela, v800_elf_info_to_howto): Likewise.
2328 * elf32-vax.c (rtype_to_howto): Likewise.
2329 * elf32-visium.c (visium_info_to_howto_rela): Likewise.
2330 * elf32-wasm32.c (elf32_wasm32_rtype_to_howto)
2331 (elf32_wasm32_info_to_howto_rela): Likewise.
2332 * elf32-xc16x.c (elf32_xc16x_info_to_howto): Likewise.
2333 * elf32-xgate.c (xgate_info_to_howto_rel): Likewise.
2334 * elf32-xstormy16.c (xstormy16_info_to_howto_rela): Likewise.
2335 * elf32-xtensa.c (elf_xtensa_info_to_howto_rela): Likewise.
2336 * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise.
2337 * elf64-gen.c (elf_generic_info_to_howto)
2338 (elf_generic_info_to_howto_rel): Likewise.
2339 * elf64-ia64-vms.c (elf64_ia64_info_to_howto): Likewise.
2340 * elf64-mips.c (mips_elf64_info_to_howto_rela): Likewise.
2341 * elf64-mmix.c (mmix_info_to_howto_rela): Likewise.
2342 * elf64-ppc.c (ppc64_elf_info_to_howto): Likewise.
2343 * elf64-s390.c (elf_s390_reloc_type_lookup): Likewise.
2344 * elf64-sh64.c (elf_s390_info_to_howto, sh_elf64_info_to_howto):
2346 * elf64-x86-64.c (elf_x86_64_info_to_howto): Likewise.
2347 * elfn32-mips.c (mips_info_to_howto_rel, mips_info_to_howto_rela):
2349 * elfnn-aarch64.c (elfNN_aarch64_info_to_howto): Likewise.
2350 * elfnn-ia64.c (elfNN_ia64_info_to_howto): Likewise.
2351 * elfnn-riscv.c (riscv_info_to_howto_rela): Likewise.
2352 * elfxx-ia64.c (ia64_elf_reloc_type_lookup): Likewise.
2353 * elfxx-sparc.c (_bfd_sparc_elf_info_to_howto): Likewise.
2354 * elfxx-tilegx.c (tilegx_info_to_howto_rela): Likewise.
2355 * elf32-score.h (s7_bfd_score_info_to_howto): Update prototype.
2356 * elfxx-sparc.h (_bfd_sparc_elf_info_to_howto): Update prototype.
2357 * elfxx-tilegx.h (tilegx_info_to_howto_rela): Update prototype.
2358 * elfxx-target.h (elf_info_to_howto, elf_info_to_howto_rel):
2361 2018-02-26 Jim Wilson <jimw@sifive.com>
2362 Stephan Schreiber <info@fs-driver.org>
2365 * elfnn-ia64.c (elfNN_ia64_relax_section): After ia64_elf_relax_brl
2366 call, set changed_contents and changed_relocs. Likewise after
2367 successful ia64_elf_relax_br call.
2369 2018-02-26 Alan Modra <amodra@gmail.com>
2371 * elf.c (assign_file_positions_except_relocs): Don't segfault
2372 when actual number of phdrs is less than allocated. Delete
2373 outdated comment. Formatting.
2375 2018-02-26 Alan Modra <amodra@gmail.com>
2377 * elf-m10300.c, * elf-s390-common.c, * elf32-arc.c, * elf32-cris.c,
2378 * elf32-dlx.c, * elf32-frv.c, * elf32-i370.c, * elf32-lm32.c,
2379 * elf32-m32r.c, * elf32-m68hc1x.c, * elf32-m68k.c,
2380 * elf32-microblaze.c, * elf32-msp430.c, * elf32-nds32.c,
2381 * elf32-nios2.c, * elf32-or1k.c, * elf32-rl78.c, * elf32-rx.c,
2382 * elf32-score.c, * elf32-score7.c, * elf32-sh-symbian.c,
2383 * elf32-sh.c, * elf32-spu.c, * elf32-v850.c, * elf32-xtensa.c,
2384 * elf64-alpha.c, * elf64-ia64-vms.c, * elf64-mmix.c,
2385 * elf64-sh64.c, * elf64-sparc.c, * elfnn-ia64.c, * elfxx-tilegx.c,
2386 * mmo.c, * osf-core.c, * srec.c, * vms-alpha.c: Standardize
2387 error/warning messages.
2389 2018-02-26 Alan Modra <amodra@gmail.com>
2391 * archive.c, * bfd.c, * linker.c, * reloc.c, * stabs.c,
2392 * syms.c: Standardize error/warning messages.
2394 2018-02-26 Alan Modra <amodra@gmail.com>
2396 * aout-adobe.c, * aout-cris.c, * i386linux.c, * m68klinux.c,
2397 * sparclinux.c, * coff-alpha.c, * coff-arm.c, * coff-mcore.c,
2398 * coffcode.h, * coffgen.c, * cofflink.c, * ecoff.c, * pe-mips.c,
2399 * peXXigen.c, * peicode.h: Standardize error/warning messages.
2401 2018-02-26 Alan Modra <amodra@gmail.com>
2403 * elf32-arm.c, * elfnn-aarch64.c: Standardize error/warning messages.
2405 2018-02-26 Alan Modra <amodra@gmail.com>
2407 * elfxx-mips.c: Standardize error/warning messages.
2409 2018-02-26 Alan Modra <amodra@gmail.com>
2411 * dwarf2.c, * elf-attrs.c, * elf-eh-frame.c, * elf.c, * elf32-gen.c,
2412 * elflink.c: Standardize error/warning messages. Replace use of
2413 linker callback einfo with _bfd_error_handler when possible.
2415 2018-02-26 Alan Modra <amodra@gmail.com>
2417 * aoutx.h, * coff-alpha.c, * coff-i860.c, * coff-m68k.c,
2418 * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c,
2419 * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-w65.c,
2420 * elf-bfd.h, * elf-m10300.c, * elf.c, * elf32-avr.c, * elf32-bfin.c,
2421 * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c,
2422 * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c,
2423 * elf32-fr30.c, * elf32-frv.c, * elf32-i370.c, * elf32-i386.c,
2424 * elf32-i960.c, * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c,
2425 * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c,
2426 * elf32-m68k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c,
2427 * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c,
2428 * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-or1k.c,
2429 * elf32-pj.c, * elf32-ppc.c, * elf32-rl78.c, * elf32-rx.c,
2430 * elf32-s390.c, * elf32-sh.c, * elf32-spu.c, * elf32-tic6x.c,
2431 * elf32-v850.c, * elf32-vax.c, * elf32-visium.c, * elf32-wasm32.c,
2432 * elf32-xgate.c, * elf32-xtensa.c, * elf64-alpha.c,
2433 * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c,
2434 * elf64-ppc.c, * elf64-s390.c, * elf64-sparc.c, * elf64-x86-64.c,
2435 * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c,
2436 * elfnn-riscv.c, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-riscv.h,
2437 * elfxx-sparc.c, * elfxx-sparc.h, * reloc.c: Standardize
2438 unrecognized/unsupported reloc message.
2440 2018-02-26 Alan Modra <amodra@gmail.com>
2442 * elf32-ppc.c: Standardize error/warning messages. Use
2443 _bfd_error_handler rather than einfo when einfo features not used.
2444 * elf64-ppc.c: Likewise.
2446 2018-02-23 Alan Modra <amodra@gmail.com>
2449 * elf.c (assign_file_positions_for_non_load_sections): Remove RELRO
2450 segment if no matching LOAD segment.
2452 2018-02-23 Kuan-Lin Chen <kuanlinchentw@gmail.com>
2454 * elf32-nds32.h: Define mask for ict_model.
2456 2018-02-20 Jason Duerstock <jason.duerstock@gmail.com>
2458 * elfnn-ia64.c (elf_backend_can_gc_sections): Enable.
2460 2018-02-19 Maciej W. Rozycki <macro@mips.com>
2463 2018-01-12 Vlad Ivanov <vlad@ivanov.email>
2465 * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when
2466 .reginfo section has wrong size.
2468 2018-02-19 Maciej W. Rozycki <macro@mips.com>
2470 * elfxx-mips.c (_bfd_mips_elf_always_size_sections): Set
2471 SEC_FIXED_SIZE and SEC_HAS_CONTENTS flags for `.reginfo' and
2472 `.MIPS.abiflags' sections.
2473 (_bfd_mips_elf_final_link): Avoid reading beyond `.reginfo'
2476 2018-02-19 Maciej W. Rozycki <macro@mips.com>
2478 * section.c (SEC_FIXED_SIZE): New macro.
2479 * bfd-in2.h: Regenerate.
2481 2018-02-19 Maciej W. Rozycki <macro@mips.com>
2483 * section.c (SEC_HAS_GOT_REF): Remove macro.
2484 * bfd-in2.h: Regenerate.
2486 2018-02-19 Alan Modra <amodra@gmail.com>
2488 * elf-attrs.c (_bfd_elf_parse_attributes): Correct _bfd_error_handler
2490 * elfxx-mips.c (_bfd_mips_elf_final_link): Likewise.
2491 * elfnn-riscv.c (_bfd_riscv_relax_align): Likewise.
2492 (_bfd_riscv_relax_pc): Likewise and fix typos.
2493 * libbfd-in.h (_bfd_error_handler): Add attribute printf.
2494 * libbfd.h: Regenerate.
2496 2018-02-19 Alan Modra <amodra@gmail.com>
2498 * dwarf2.c (read_section): Don't use 'll' format modifier.
2499 (find_abstract_instance): Likewise.
2500 * elfcore.h (elf_core_file_p): Likewise.
2502 2018-02-19 Alan Modra <amodra@gmail.com>
2504 * bfd-in.h: Include inttypes.h or if not available define
2505 PRId64, PRIu64 and PRIx64.
2506 * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Remove support for L
2507 modifier to print bfd_vma.
2508 * coff-arm.c, * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c,
2509 * coff-sh.c, * coff-tic80.c, * coffcode.h, * coffgen.c, * cofflink.c,
2510 * compress.c, * dwarf2.c, * elf-m10300.c, * elf.c, * elf32-arc.c,
2511 * elf32-arm.c, * elf32-bfin.c, * elf32-cris.c, * elf32-hppa.c,
2512 * elf32-i386.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32r.c,
2513 * elf32-m68k.c, * elf32-metag.c, * elf32-nds32.c, * elf32-nios2.c,
2514 * elf32-ppc.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c,
2515 * elf32-score7.c, * elf32-sh.c, * elf32-sh64.c, * elf32-spu.c,
2516 * elf32-tic6x.c, * elf32-tilepro.c, * elf32-v850.c, * elf32-vax.c,
2517 * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c,
2518 * elf64-mmix.c, * elf64-s390.c, * elf64-sh64.c, * elf64-x86-64.c,
2519 * elfcode.h, * elfcore.h, * elflink.c, * elfnn-aarch64.c,
2520 * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-mips.c, * elfxx-sparc.c,
2521 * elfxx-tilegx.c, * ieee.c, * ihex.c, * mach-o.c, * merge.c, * mmo.c,
2522 * peXXigen.c, * xcofflink.c: Replace use of Lx modifier with PRIx64,
2523 and cast input to uint64_t, and similarly for Ld and Lu.
2524 * bfd-in2.h: Regenerate.
2526 2018-02-19 Alan Modra <amodra@gmail.com>
2528 * elf32-arm.c, * elf32-hppa.c, * elf32-lm32.c, * elf32-m32r.c,
2529 * elf32-metag.c, * elf32-nds32.c, * elf32-or1k.c, * elf32-ppc.c,
2530 * elf32-s390.c, * elf32-sh.c, * elf32-tic6x.c, * elf32-tilepro.c,
2531 * elf64-ppc.c, * elf64-s390.c, * elflink.c, * elfnn-aarch64.c,
2532 * elfnn-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c,
2533 * reloc.c: Replace use of %R and %T in format strings passed to
2534 einfo and friends by %pR and %pT.
2536 2018-02-19 Alan Modra <amodra@gmail.com>
2538 * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Handle %pA and %pB in place
2540 * aout-adobe.c: Update all messages using %A and %B.
2541 * aout-cris.c: Likewise.
2542 * aoutx.h: Likewise.
2543 * archive.c: Likewise.
2544 * binary.c: Likewise.
2545 * cache.c: Likewise.
2546 * coff-alpha.c: Likewise.
2547 * coff-arm.c: Likewise.
2548 * coff-i860.c: Likewise.
2549 * coff-mcore.c: Likewise.
2550 * coff-ppc.c: Likewise.
2551 * coff-rs6000.c: Likewise.
2552 * coff-sh.c: Likewise.
2553 * coff-tic4x.c: Likewise.
2554 * coff-tic54x.c: Likewise.
2555 * coff-tic80.c: Likewise.
2556 * coff64-rs6000.c: Likewise.
2557 * coffcode.h: Likewise.
2558 * coffgen.c: Likewise.
2559 * cofflink.c: Likewise.
2560 * coffswap.h: Likewise.
2561 * compress.c: Likewise.
2562 * cpu-arm.c: Likewise.
2563 * ecoff.c: Likewise.
2564 * elf-attrs.c: Likewise.
2565 * elf-eh-frame.c: Likewise.
2566 * elf-ifunc.c: Likewise.
2567 * elf-m10300.c: Likewise.
2568 * elf-properties.c: Likewise.
2569 * elf-s390-common.c: Likewise.
2571 * elf32-arc.c: Likewise.
2572 * elf32-arm.c: Likewise.
2573 * elf32-avr.c: Likewise.
2574 * elf32-bfin.c: Likewise.
2575 * elf32-cr16.c: Likewise.
2576 * elf32-cr16c.c: Likewise.
2577 * elf32-cris.c: Likewise.
2578 * elf32-crx.c: Likewise.
2579 * elf32-d10v.c: Likewise.
2580 * elf32-d30v.c: Likewise.
2581 * elf32-epiphany.c: Likewise.
2582 * elf32-fr30.c: Likewise.
2583 * elf32-frv.c: Likewise.
2584 * elf32-gen.c: Likewise.
2585 * elf32-hppa.c: Likewise.
2586 * elf32-i370.c: Likewise.
2587 * elf32-i386.c: Likewise.
2588 * elf32-i960.c: Likewise.
2589 * elf32-ip2k.c: Likewise.
2590 * elf32-iq2000.c: Likewise.
2591 * elf32-lm32.c: Likewise.
2592 * elf32-m32c.c: Likewise.
2593 * elf32-m32r.c: Likewise.
2594 * elf32-m68hc11.c: Likewise.
2595 * elf32-m68hc12.c: Likewise.
2596 * elf32-m68hc1x.c: Likewise.
2597 * elf32-m68k.c: Likewise.
2598 * elf32-mcore.c: Likewise.
2599 * elf32-mep.c: Likewise.
2600 * elf32-metag.c: Likewise.
2601 * elf32-microblaze.c: Likewise.
2602 * elf32-moxie.c: Likewise.
2603 * elf32-msp430.c: Likewise.
2604 * elf32-mt.c: Likewise.
2605 * elf32-nds32.c: Likewise.
2606 * elf32-nios2.c: Likewise.
2607 * elf32-or1k.c: Likewise.
2608 * elf32-pj.c: Likewise.
2609 * elf32-ppc.c: Likewise.
2610 * elf32-rl78.c: Likewise.
2611 * elf32-rx.c: Likewise.
2612 * elf32-s390.c: Likewise.
2613 * elf32-score.c: Likewise.
2614 * elf32-score7.c: Likewise.
2615 * elf32-sh-symbian.c: Likewise.
2616 * elf32-sh.c: Likewise.
2617 * elf32-sh64.c: Likewise.
2618 * elf32-sparc.c: Likewise.
2619 * elf32-spu.c: Likewise.
2620 * elf32-tic6x.c: Likewise.
2621 * elf32-tilepro.c: Likewise.
2622 * elf32-v850.c: Likewise.
2623 * elf32-vax.c: Likewise.
2624 * elf32-visium.c: Likewise.
2625 * elf32-wasm32.c: Likewise.
2626 * elf32-xgate.c: Likewise.
2627 * elf32-xtensa.c: Likewise.
2628 * elf64-alpha.c: Likewise.
2629 * elf64-gen.c: Likewise.
2630 * elf64-hppa.c: Likewise.
2631 * elf64-ia64-vms.c: Likewise.
2632 * elf64-mmix.c: Likewise.
2633 * elf64-ppc.c: Likewise.
2634 * elf64-s390.c: Likewise.
2635 * elf64-sh64.c: Likewise.
2636 * elf64-sparc.c: Likewise.
2637 * elf64-x86-64.c: Likewise.
2638 * elfcode.h: Likewise.
2639 * elfcore.h: Likewise.
2640 * elflink.c: Likewise.
2641 * elfnn-aarch64.c: Likewise.
2642 * elfnn-ia64.c: Likewise.
2643 * elfnn-riscv.c: Likewise.
2644 * elfxx-mips.c: Likewise.
2645 * elfxx-sparc.c: Likewise.
2646 * elfxx-tilegx.c: Likewise.
2647 * elfxx-x86.c: Likewise.
2648 * hpux-core.c: Likewise.
2651 * libbfd.c: Likewise.
2652 * linker.c: Likewise.
2653 * mach-o.c: Likewise.
2654 * merge.c: Likewise.
2656 * oasys.c: Likewise.
2657 * pdp11.c: Likewise.
2658 * pe-mips.c: Likewise.
2659 * peXXigen.c: Likewise.
2660 * peicode.h: Likewise.
2661 * reloc.c: Likewise.
2662 * rs6000-core.c: Likewise.
2664 * stabs.c: Likewise.
2665 * vms-alpha.c: Likewise.
2666 * xcofflink.c: Likewise.
2668 2018-02-19 Alan Modra <amodra@gmail.com>
2671 * elf.c (IS_TBSS): Define.
2672 (_bfd_elf_map_sections_to_segments): Use IS_TBSS.
2673 (assign_file_positions_for_non_load_sections): Revert last change.
2674 Properly calculate load segment limits to compare against relro limits.
2676 2018-02-17 Alan Modra <amodra@gmail.com>
2679 * elf.c (assign_file_positions_for_non_load_sections): Ignore
2680 degenerate zero size PT_LOAD segments when finding one overlapping
2681 the PT_GNU_RELRO segment.
2683 2018-02-16 Alan Modra <amodra@gmail.com>
2685 * libbfd.c (_bfd_bool_bfd_false_error): Rename from bfd_false.
2686 (_bfd_bool_bfd_true): Rename from bfd_true.
2687 (_bfd_ptr_bfd_null_error): Rename from bfd_nullvoidptr.
2688 (_bfd_int_bfd_0): Rename from bfd_0.
2689 (_bfd_uint_bfd_0): Rename from bfd_0u.
2690 (_bfd_long_bfd_0): Rename from bfd_0l.
2691 (_bfd_long_bfd_n1_error): Rename from _bfd_n1.
2692 (_bfd_void_bfd): Rename from bfd_void.
2693 (_bfd_bool_bfd_false, _bfd_bool_bfd_asymbol_false),
2694 (_bfd_bool_bfd_link_false_error),
2695 (_bfd_bool_bfd_link_true, _bfd_bool_bfd_bfd_true),
2696 (_bfd_bool_bfd_uint_true, _bfd_bool_bfd_ptr_true),
2697 (_bfd_bool_bfd_asection_bfd_asection_true),
2698 (_bfd_bool_bfd_asymbol_bfd_asymbol_true),
2699 (_bfd_void_bfd_link, _bfd_void_bfd_asection): New functions.
2700 * archive.c (_bfd_noarchive_get_elt_at_index),
2701 (_bfd_noarchive_openr_next_archived_file),
2702 (_bfd_noarchive_construct_extended_name_table),
2703 (_bfd_noarchive_write_ar_hdr, _bfd_noarchive_truncate_arname),
2704 (_bfd_noarchive_write_armap): New functions.
2705 * archures.c (_bfd_nowrite_set_arch_mach): New function.
2706 * coff-alpha.c (alpha_ecoff_swap_coff_aux_in),
2707 (alpha_ecoff_swap_coff_sym_in, alpha_ecoff_swap_coff_lineno_in),
2708 (alpha_ecoff_swap_coff_aux_out, alpha_ecoff_swap_coff_sym_out),
2709 (alpha_ecoff_swap_coff_lineno_out),
2710 (alpha_ecoff_swap_coff_reloc_out): New functions.
2711 * coff-mips.c (mips_ecoff_swap_coff_aux_in),
2712 (mips_ecoff_swap_coff_sym_in, mips_ecoff_swap_coff_lineno_in),
2713 (mips_ecoff_swap_coff_aux_out, mips_ecoff_swap_coff_sym_out),
2714 (mips_ecoff_swap_coff_lineno_out),
2715 (mips_ecoff_swap_coff_reloc_out): New functions.
2716 * coffcode.h (coff_set_alignment_hook): Replace define with
2718 (symname_in_debug_hook): Likewise.
2719 * ecoff.c (_bfd_ecoff_set_alignment_hook): New function.
2720 * elfxx-target.h (elf_backend_allow_non_load_phdr): Default to 0.
2721 * elf.c (assign_file_positions_except_relocs): Test
2722 elf_backend_allow_non_load_phdr for NULL.
2723 * elflink.c (_bfd_elf_omit_section_dynsym_default): Rename from
2724 _bfd_elf_link_omit_section_dynsym. Update uses.
2725 (_bfd_elf_omit_section_dynsym_all): New function.
2726 * elf-bfd.h (_bfd_elf_link_omit_section_dynsym): Delete.
2727 (_bfd_elf_omit_section_dynsym_default): Declare.
2728 (_bfd_elf_omit_section_dynsym_all): Declare.
2729 * linker.c (_bfd_nolink_sizeof_headers, _bfd_nolink_bfd_relax_section),
2730 (_bfd_nolink_bfd_get_relocated_section_contents),
2731 (_bfd_nolink_bfd_lookup_section_flags),
2732 (_bfd_nolink_bfd_is_group_section, _bfd_nolink_bfd_discard_group),
2733 (_bfd_nolink_bfd_link_hash_table_create),
2734 (_bfd_nolink_bfd_link_just_syms),
2735 (_bfd_nolink_bfd_copy_link_hash_symbol_type),
2736 (_bfd_nolink_bfd_link_split_section),
2737 (_bfd_nolink_section_already_linked),
2738 (_bfd_nolink_bfd_define_common_symbol),
2739 (_bfd_nolink_bfd_define_start_stop): New functions.
2740 * reloc.c (_bfd_norelocs_bfd_reloc_type_lookup),
2741 (_bfd_norelocs_bfd_reloc_name_lookup),
2742 (_bfd_nodynamic_canonicalize_dynamic_reloc): New functions.
2743 * section.c (_bfd_nowrite_set_section_contents): New function.
2744 * syms.c (_bfd_nosymbols_canonicalize_symtab),
2745 (_bfd_nosymbols_print_symbol, _bfd_nosymbols_get_symbol_info),
2746 (_bfd_nosymbols_get_symbol_version_string),
2747 (_bfd_nosymbols_bfd_is_local_label_name),
2748 (_bfd_nosymbols_get_lineno, _bfd_nosymbols_find_nearest_line),
2749 (_bfd_nosymbols_find_line, _bfd_nosymbols_find_inliner_info),
2750 (_bfd_nosymbols_bfd_make_debug_symbol),
2751 ( _bfd_nosymbols_read_minisymbols),
2752 ( _bfd_nosymbols_minisymbol_to_symbol),
2753 (_bfd_nodynamic_get_synthetic_symtab): New functions.
2754 * libbfd-in.h: Declare new functions. Update existing defines,
2756 * aix386-core.c: Update to use new hooks. Formatting.
2757 * aout-adobe.c: Likewise.
2758 * aout-arm.c: Likewise.
2759 * aout-target.h: Likewise.
2760 * aout-tic30.c: Likewise.
2761 * aoutf1.h: Likewise.
2762 * binary.c: Likewise.
2764 * cisco-core.c: Likewise.
2765 * coff-alpha.c: Likewise.
2766 * coff-i386.c: Likewise.
2767 * coff-i860.c: Likewise.
2768 * coff-i960.c: Likewise.
2769 * coff-ia64.c: Likewise.
2770 * coff-mips.c: Likewise.
2771 * coff-ppc.c: Likewise.
2772 * coff-rs6000.c: Likewise.
2773 * coff-sh.c: Likewise.
2774 * coff-tic30.c: Likewise.
2775 * coff-tic54x.c: Likewise.
2776 * coff-x86_64.c: Likewise.
2777 * coff64-rs6000.c: Likewise.
2778 * coffcode.h: Likewise.
2779 * elf-m10300.c: Likewise.
2780 * elf32-cr16.c: Likewise.
2781 * elf32-lm32.c: Likewise.
2782 * elf32-m32r.c: Likewise.
2783 * elf32-metag.c: Likewise.
2784 * elf32-score.c: Likewise.
2785 * elf32-score7.c: Likewise.
2786 * elf32-tilepro.c: Likewise.
2787 * elf32-xstormy16.c: Likewise.
2788 * elf32-xtensa.c: Likewise.
2789 * elf64-alpha.c: Likewise.
2790 * elf64-hppa.c: Likewise.
2791 * elf64-ia64-vms.c: Likewise.
2792 * elf64-mmix.c: Likewise.
2793 * elf64-sh64.c: Likewise.
2794 * elfnn-ia64.c: Likewise.
2795 * elfxx-sparc.c: Likewise.
2796 * elfxx-target.h: Likewise.
2797 * elfxx-tilegx.c: Likewise.
2798 * elfxx-x86.h: Likewise.
2799 * hp300hpux.c: Likewise.
2800 * hppabsd-core.c: Likewise.
2801 * hpux-core.c: Likewise.
2802 * i386msdos.c: Likewise.
2803 * i386os9k.c: Likewise.
2806 * irix-core.c: Likewise.
2807 * libaout.h: Likewise.
2808 * libecoff.h: Likewise.
2809 * mach-o-target.c: Likewise.
2810 * mach-o.c: Likewise.
2811 * mipsbsd.c: Likewise.
2813 * netbsd-core.c: Likewise.
2814 * nlm-target.h: Likewise.
2815 * oasys.c: Likewise.
2816 * osf-core.c: Likewise.
2817 * pdp11.c: Likewise.
2818 * pe-mips.c: Likewise.
2819 * pe-x86_64.c: Likewise.
2821 * plugin.c: Likewise.
2822 * ppcboot.c: Likewise.
2823 * ptrace-core.c: Likewise.
2824 * sco5-core.c: Likewise.
2826 * sparclynx.c: Likewise.
2828 * tekhex.c: Likewise.
2829 * trad-core.c: Likewise.
2830 * verilog.c: Likewise.
2831 * versados.c: Likewise.
2832 * vms-alpha.c: Likewise.
2833 * vms-lib.c: Likewise.
2834 * wasm-module.c: Likewise.
2836 * libbfd.h: Regenerate.
2838 2018-02-15 Jim Wilson <jimw@sifive.com>
2840 * elfnn-riscv.c (_bfd_riscv_relax_section): Ifdef out check to ignore
2841 symbols whose section address is zero.
2843 * elfnn-riscv.c (riscv_elf_relocate_section): Use bfd_reloc_dangerous
2844 when pcrel_lo reloc has an addend. Use reloc_dangerous callback for
2845 bfd_reloc_dangerous. Use einfo instead of warning callback for errors.
2846 Add %X%P to error messages.
2848 2018-02-15 Eric Botcazou <ebotcazou@adacore.com>
2851 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
2852 Pass FALSE instead of TRUE as 'create' argument to bfd_link_hash_lookup
2853 and assert that the result of the call is not NULL.
2855 2018-02-14 Nick Clifton <nickc@redhat.com>
2858 Revert previous delta. Add extra casts to avoid compile time
2860 * libbfd-in.h (_bfd_generic_bfd_copy_private_bfd_data): Add extra
2861 cast to avoid warning from gcc v8 compiler.
2862 (_bfd_generic_bfd_merge_private_bfd_data): Likewise.
2863 (_bfd_generic_bfd_set_private_flags): Likewise.
2864 (_bfd_generic_bfd_copy_private_section_data): Likewise.
2865 (_bfd_generic_bfd_copy_private_symbol_data): Likewise.
2866 (_bfd_generic_bfd_copy_private_header_data): Likewise.
2867 (_bfd_generic_bfd_print_private_bfd_data): Likewise.
2868 (_bfd_noarchive_construct_extended_name_table): Likewise.
2869 (_bfd_noarchive_truncate_arname): Likewise.
2870 (_bfd_noarchive_write_ar_hdr): Likewise.
2871 (_bfd_noarchive_get_elt_at_index): Likewise.
2872 (_bfd_nosymbols_canonicalize_symtab): Likewise.
2873 (_bfd_nosymbols_print_symbol): Likewise.
2874 (_bfd_nosymbols_get_symbol_info): Likewise.
2875 (_bfd_nosymbols_get_symbol_version_string): Likewise.
2876 (_bfd_nosymbols_bfd_is_local_label_name): Likewise.
2877 (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise.
2878 (_bfd_nosymbols_get_lineno): Likewise.
2879 (_bfd_nosymbols_find_nearest_line): Likewise.
2880 (_bfd_nosymbols_find_line): Likewise.
2881 (_bfd_nosymbols_find_inliner_info): Likewise.
2882 (_bfd_nosymbols_bfd_make_debug_symbol): Likewise.
2883 (_bfd_nosymbols_read_minisymbols): Likewise.
2884 (_bfd_nosymbols_minisymbol_to_symbol): Likewise.
2885 (_bfd_norelocs_bfd_reloc_type_lookup): Likewise.
2886 (_bfd_norelocs_bfd_reloc_name_lookup): Likewise.
2887 (_bfd_nowrite_set_arch_mach): Likewise.
2888 (_bfd_nowrite_set_section_contents): Likewise.
2889 (_bfd_nolink_sizeof_headers): Likewise.
2890 (_bfd_nolink_bfd_get_relocated_section_contents): Likewise.
2891 (_bfd_nolink_bfd_relax_section): Likewise.
2892 (_bfd_nolink_bfd_gc_sections): Likewise.
2893 (_bfd_nolink_bfd_lookup_section_flags): Likewise.
2894 (_bfd_nolink_bfd_merge_sections): Likewise.
2895 (_bfd_nolink_bfd_is_group_section): Likewise.
2896 (_bfd_nolink_bfd_discard_group): Likewise.
2897 (_bfd_nolink_bfd_link_hash_table_create): Likewise.
2898 (_bfd_nolink_bfd_link_add_symbols): Likewise.
2899 (_bfd_nolink_bfd_link_just_syms): Likewise.
2900 (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise.
2901 (_bfd_nolink_bfd_final_link): Likewise.
2902 (_bfd_nolink_bfd_link_split_section): Likewise.
2903 (_bfd_nolink_section_already_linked): Likewise.
2904 (_bfd_nolink_bfd_define_common_symbol): Likewise.
2905 (_bfd_nolink_bfd_define_start_stop): Likewise.
2906 (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise.
2907 (_bfd_nodynamic_get_synthetic_symtab): Likewise.
2908 (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise.
2909 (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise.
2910 * libbfd.c (bfd_false_any): Delete.
2911 (bfd_true_any, bfd_nullvoidptr_any, bfd_0_any): Delete.
2912 (bfd_0u_any, bfd_0l_any, _bfd_n1_any, bfd_void_any): Delete.
2913 * libbfd.h (extern): Regenerate
2914 * aout-target.h (MY_bfd_is_target_special_symbol): Add extra
2915 cast to avoid warning from gcc v8 compiler.
2916 * aout-tic30.c (tic30_aout_set_arch_mach): Likewise.
2917 * binary.c (binary_get_symbol_info): Likewise.
2918 * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
2919 * coff-mips.c (mips_ecoff_backend_data): Likewise.
2920 * coffcode.h (coff_set_alignment_hook): Likewise.
2921 (symname_in_debug_hook): Likewise.
2922 (bfd_coff_backend_data bigobj_swap_table): Likewise.
2923 * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise.
2924 * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise.
2925 * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise.
2926 * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise.
2927 * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise.
2928 * elf32-score.c (elf_backend_omit_section_dynsym): Likewise.
2929 * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise.
2930 * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise.
2931 * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise.
2932 * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise.
2933 * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise.
2934 * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise.
2935 * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise.
2936 * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise.
2937 * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise.
2938 * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise.
2939 (bfd_elfNN_bfd_make_debug_symbol): Likewise.
2940 (bfd_elfNN_bfd_merge_private_bfd_data): Likewise.
2941 (bfd_elfNN_bfd_set_private_flags): Likewise.
2942 (bfd_elfNN_bfd_is_target_special_symbol): Likewise.
2943 (elf_backend_init_index_section): Likewise.
2944 (elf_backend_allow_non_load_phdr): Likewise.
2945 * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise.
2946 * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise.
2947 * ieee.c (ieee_construct_extended_name_table): Likewise.
2948 (ieee_write_armap): Likewise.
2949 (ieee_write_ar_hdr): Likewise.
2950 (ieee_bfd_is_target_special_symbol): Likewise.
2951 * ihex.c (ihex_canonicalize_symtab): Likewise.
2952 (ihex_bfd_is_target_special_symbol): Likewise.
2953 * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise.
2954 * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise.
2955 (_bfd_ecoff_set_alignment_hook): Likewise.
2956 * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise.
2957 * mmo.c (mmo_bfd_is_target_special_symbol): Likewise.
2958 * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise.
2959 * oasys.c (oasys_construct_extended_name_table): Likewise.
2960 (oasys_write_armap): Likewise.
2961 (oasys_write_ar_hdr): Likewise.
2962 (oasys_bfd_is_target_special_symbol): Likewise.
2963 * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise.
2964 * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise.
2965 * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise.
2966 * som.c (som_bfd_is_target_special_symbol): Likewise.
2967 * srec.c (srec_bfd_is_target_special_symbol): Likewise.
2968 * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise.
2969 * verilog.c (verilog_bfd_is_target_special_symbol): Likewise.
2970 * versados.c (versados_bfd_is_target_special_symbol): Likewise.
2971 (versados_bfd_reloc_name_lookup): Likewise.
2972 * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise.
2973 (vms_bfd_define_start_stop): Likewise.
2974 (alpha_vms_bfd_is_target_special_symbol): Likewise.
2975 * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise.
2976 * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise.
2978 2018-02-14 H.J. Lu <hongjiu.lu@intel.com>
2981 * elf32-i386.c (elf_i386_check_relocs): Pass FALSE for non
2982 PC-relative PLT to NEED_DYNAMIC_RELOCATION_P.
2983 * elf64-x86-64.c (elf_x86_64_check_relocs): Create PLT for
2984 R_X86_64_PC32 reloc against dynamic function in data section.
2985 Pass TRUE for PC-relative PLT to NEED_DYNAMIC_RELOCATION_P.
2986 (elf_x86_64_relocate_section): Use PLT for R_X86_64_PC32 reloc
2987 against dynamic function in data section.
2988 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Use PLT in PIE as
2989 function address only if pcrel_plt is true.
2990 (_bfd_x86_elf_link_hash_table_create): Set pcrel_plt.
2991 * elfxx-x86.h (NEED_DYNAMIC_RELOCATION_P): Add PCREL_PLT for
2992 PC-relative PLT. If PLT is PC-relative, don't generate dynamic
2993 PC-relative relocation against a function definition in data
2994 secton in PIE. Remove the obsolete comments.
2995 (elf_x86_link_hash_table): Add pcrel_plt.
2997 2018-02-13 H.J. Lu <hongjiu.lu@intel.com>
2999 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Check bfd_link_dll,
3000 instead of bfd_link_pic, for building shared library.
3002 2018-02-13 H.J. Lu <hongjiu.lu@intel.com>
3005 * elf64-x86-64.c (is_32bit_relative_branch): Removed.
3006 (elf_x86_64_relocate_section): Check PIC relocations in PIE.
3007 Remove is_32bit_relative_branch usage. Disallow PC32 reloc
3008 against protected function in shared object.
3010 2018-02-13 Sergei Trofimovich <slyfox@inbox.ru>
3013 * po/ru.po: Fix typo in Russian translation.
3015 2018-02-13 Maciej W. Rozycki <macro@mips.com>
3017 * wasm-module.c (wasm_scan_name_function_section): Rename
3018 `index' local variable to `idx'.
3020 2018-02-13 Nick Clifton <nickc@redhat.com>
3023 Fix compile time warnings generated by gcc version 8.
3024 * libbfd-in.h: Remove extraneous text from prototypes.
3025 Add prototypes for bfd_false_any, bfd_true_any,
3026 bfd_nullvoidptr_any, bfd_0_any, bfd_0u_any, bfd_0l_any,
3027 bfd_n1_any, bfd_void_any.
3028 (_bfd_generic_bfd_copy_private_bfd_data): Use vararg based dummy
3030 (_bfd_generic_bfd_merge_private_bfd_data): Likewise.
3031 (_bfd_generic_bfd_set_private_flags): Likewise.
3032 (_bfd_generic_bfd_copy_private_section_data): Likewise.
3033 (_bfd_generic_bfd_copy_private_symbol_data): Likewise.
3034 (_bfd_generic_bfd_copy_private_header_data): Likewise.
3035 (_bfd_generic_bfd_print_private_bfd_data): Likewise.
3036 (_bfd_noarchive_construct_extended_name_table): Likewise.
3037 (_bfd_noarchive_truncate_arname): Likewise.
3038 (_bfd_noarchive_write_ar_hdr): Likewise.
3039 (_bfd_noarchive_get_elt_at_index): Likewise.
3040 (_bfd_nosymbols_canonicalize_symtab): Likewise.
3041 (_bfd_nosymbols_print_symbol): Likewise.
3042 (_bfd_nosymbols_get_symbol_info): Likewise.
3043 (_bfd_nosymbols_get_symbol_version_string): Likewise.
3044 (_bfd_nosymbols_bfd_is_local_label_name): Likewise.
3045 (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise.
3046 (_bfd_nosymbols_get_lineno): Likewise.
3047 (_bfd_nosymbols_find_nearest_line): Likewise.
3048 (_bfd_nosymbols_find_line): Likewise.
3049 (_bfd_nosymbols_find_inliner_info): Likewise.
3050 (_bfd_nosymbols_bfd_make_debug_symbol): Likewise.
3051 (_bfd_nosymbols_read_minisymbols): Likewise.
3052 (_bfd_nosymbols_minisymbol_to_symbol): Likewise.
3053 (_bfd_norelocs_bfd_reloc_type_lookup): Likewise.
3054 (_bfd_norelocs_bfd_reloc_name_lookup): Likewise.
3055 (_bfd_nowrite_set_arch_mach): Likewise.
3056 (_bfd_nowrite_set_section_contents): Likewise.
3057 (_bfd_nolink_sizeof_headers): Likewise.
3058 (_bfd_nolink_bfd_get_relocated_section_contents): Likewise.
3059 (_bfd_nolink_bfd_relax_section): Likewise.
3060 (_bfd_nolink_bfd_gc_sections): Likewise.
3061 (_bfd_nolink_bfd_lookup_section_flags): Likewise.
3062 (_bfd_nolink_bfd_merge_sections): Likewise.
3063 (_bfd_nolink_bfd_is_group_section): Likewise.
3064 (_bfd_nolink_bfd_discard_group): Likewise.
3065 (_bfd_nolink_bfd_link_hash_table_create): Likewise.
3066 (_bfd_nolink_bfd_link_add_symbols): Likewise.
3067 (_bfd_nolink_bfd_link_just_syms): Likewise.
3068 (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise.
3069 (_bfd_nolink_bfd_final_link): Likewise.
3070 (_bfd_nolink_bfd_link_split_section): Likewise.
3071 (_bfd_nolink_section_already_linked): Likewise.
3072 (_bfd_nolink_bfd_define_common_symbol): Likewise.
3073 (_bfd_nolink_bfd_define_start_stop): Likewise.
3074 (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise.
3075 (_bfd_nodynamic_get_synthetic_symtab): Likewise.
3076 (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise.
3077 (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise.
3078 * libbfd.c (bfd_false_any): New function. Like bfd_false but
3079 accepts one or more arguments.
3080 (bfd_true_any): Likewise.
3081 (bfd_nullvoidptr_any): Likewise.
3082 (bfd_0_any): Likewise.
3083 (bfd_0u_any): Likewise.
3084 (bfd_0l_any): Likewise.
3085 (_bfd_n1_any): Likewise.
3086 (bfd_void_any): Likewise.
3087 * libbfd.h (extern): Regenerate
3088 * aout-target.h (MY_bfd_is_target_special_symbol): Use vararg
3089 based dummy function.
3090 * aout-tic30.c (tic30_aout_set_arch_mach): Likewise.
3091 * binary.c (binary_get_symbol_info): Likewise.
3092 * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
3093 * coff-mips.c (mips_ecoff_backend_data): Likewise.
3094 * coffcode.h (coff_set_alignment_hook): Likewise.
3095 (symname_in_debug_hook): Likewise.
3096 (bfd_coff_backend_data bigobj_swap_table): Likewise.
3097 * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise.
3098 * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise.
3099 * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise.
3100 * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise.
3101 * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise.
3102 * elf32-score.c (elf_backend_omit_section_dynsym): Likewise.
3103 * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise.
3104 * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise.
3105 * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise.
3106 * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise.
3107 * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise.
3108 * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise.
3109 * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise.
3110 * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise.
3111 * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise.
3112 * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise.
3113 (bfd_elfNN_bfd_make_debug_symbol): Likewise.
3114 (bfd_elfNN_bfd_merge_private_bfd_data): Likewise.
3115 (bfd_elfNN_bfd_set_private_flags): Likewise.
3116 (bfd_elfNN_bfd_is_target_special_symbol): Likewise.
3117 (elf_backend_init_index_section): Likewise.
3118 (elf_backend_allow_non_load_phdr): Likewise.
3119 * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise.
3120 * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise.
3121 * ieee.c (ieee_construct_extended_name_table): Likewise.
3122 (ieee_write_armap): Likewise.
3123 (ieee_write_ar_hdr): Likewise.
3124 (ieee_bfd_is_target_special_symbol): Likewise.
3125 * ihex.c (ihex_canonicalize_symtab): Likewise.
3126 (ihex_bfd_is_target_special_symbol): Likewise.
3127 * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise.
3128 * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise.
3129 (_bfd_ecoff_set_alignment_hook): Likewise.
3130 * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise.
3131 * mmo.c (mmo_bfd_is_target_special_symbol): Likewise.
3132 * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise.
3133 * oasys.c (oasys_construct_extended_name_table): Likewise.
3134 (oasys_write_armap): Likewise.
3135 (oasys_write_ar_hdr): Likewise.
3136 (oasys_bfd_is_target_special_symbol): Likewise.
3137 * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise.
3138 * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise.
3139 * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise.
3140 * som.c (som_bfd_is_target_special_symbol): Likewise.
3141 * srec.c (srec_bfd_is_target_special_symbol): Likewise.
3142 * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise.
3143 * verilog.c (verilog_bfd_is_target_special_symbol): Likewise.
3144 * versados.c (versados_bfd_is_target_special_symbol): Likewise.
3145 (versados_bfd_reloc_name_lookup): Likewise.
3146 * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise.
3147 (vms_bfd_define_start_stop): Likewise.
3148 (alpha_vms_bfd_is_target_special_symbol): Likewise.
3149 * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise.
3150 * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise.
3151 * elf32-arc.c (get_replace_function): Assign replacement function
3153 * elf32-i370.c (i370_noop): Update prototype.
3155 2018-02-13 Alan Modra <amodra@gmail.com>
3158 * elf.c (_bfd_elf_fixup_group_sections): Account for removed
3159 relocation sections. If size reduces to just the flag word,
3160 remove that too and mark with SEC_EXCLUDE.
3161 * elflink.c (bfd_elf_final_link): Strip empty group sections.
3163 2018-02-13 Alan Modra <amodra@gmail.com>
3166 * elf.c (assign_file_positions_for_non_load_sections): Rewrite
3169 2018-02-12 Zebediah Figura <z.figura12@gmail.com>
3171 * i386msdos.c (msdos_mkobject); New function.
3172 (msdos_object_p): New function.
3173 (i386_msdos_vec): Use msdos_object_p as the check_format
3175 * peicode.h: Rename external_PEI_DOS_hdr, DOSMAGIC, and
3176 NT_SIGNATURE to external_DOS_hdr, IMAGE_DOS_SIGNATURE, and
3178 * peXXigen.c: Likewise.
3179 * coff-ia64.c: Likewise.
3181 2018-02-12 Nick Clifton <nickc@redhat.com>
3183 * elf32-nds32.c (nds32_elf_relax_longjump3): Remove redundant
3185 * elf32-arc.c (elf_arc_relocate_section): Likewise.
3187 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
3189 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Reorder conditions.
3190 (sparc_elf_append_rela): Assert that there is enough room in section.
3191 (_bfd_sparc_elf_copy_indirect_symbol): Fix formatting.
3192 (_bfd_sparc_elf_adjust_dynamic_symbol): Minor tweak.
3193 (allocate_dynrelocs): Remove outdated comments and reorder conditions.
3194 For a symbol subject to a GOT relocation, reserve a slot in the
3195 relocation section if the symbol isn't dynamic and we are in PIC mode.
3196 (_bfd_sparc_elf_relocate_section) <R_SPARC_GOTDATA_OP>: If relocation
3197 is relaxed and a slot was reserved, generate a R_SPARC_NONE relocation.
3198 <R_SPARC_GOTDATA_OP_HIX22>: Adjust comments.
3199 <R_SPARC_PC10>: Reorder conditions. Remove always-false assertion.
3200 (_bfd_sparc_elf_finish_dynamic_symbol): Rename local_undefweak into
3201 resolved_to_zero. Do not generate a dynamic GOT relocation for an
3202 undefined weak symbol with non-default visibility. Remove superfluous
3203 'else' and fix formatting.
3205 2018-02-09 H.J. Lu <hongjiu.lu@intel.com>
3207 * elf32-i386.c (elf_i386_get_synthetic_symtab): Also handle
3209 (i386_elf32_sol2_vec): Don't declare.
3210 (elf_i386_link_setup_gnu_properties): Also handle is_solaris.
3211 Don't set need_global_offset_table.
3212 (elf_i386_solaris_arch_bed): New.
3213 (elf_backend_arch_data): Set to elf_i386_solaris_arch_bed for
3215 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Check
3216 target_os != is_nacl instead of target_os == is_normal.
3217 (x86_64_elf64_sol2_vec): Don't declare.
3218 (elf_x86_64_link_setup_gnu_properties): Check target_os !=
3219 is_nacl instead of target_os == is_normal. Don't set
3220 need_global_offset_table.
3221 (elf_x86_64_solaris_arch_bed): New.
3222 (elf_backend_arch_data): Set to elf_x86_64_solaris_arch_bed for
3224 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep
3225 _GLOBAL_OFFSET_TABLE_ for Solaris.
3226 (_bfd_x86_elf_link_setup_gnu_properties): Don't copy
3227 need_global_offset_table.
3228 * elfxx-x86.h (elf_x86_target_os): Add is_solaris.
3229 (elf_x86_link_hash_table): Remove need_global_offset_table.
3230 (elf_x86_init_table): Likewise.
3232 2018-02-08 H.J. Lu <hongjiu.lu@intel.com>
3234 * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
3236 (i386_elf32_sol2_vec): Declared.
3237 (elf_i386_link_setup_gnu_properties): Set
3238 need_global_offset_table with info->output_bfd->xvec.
3239 * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
3241 (x86_64_elf64_sol2_vec): Declared.
3242 (elf_x86_64_link_setup_gnu_properties): Set
3243 need_global_offset_table with info->output_bfd->xvec.
3245 2018-02-08 H.J. Lu <hongjiu.lu@intel.com>
3247 * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
3249 (elf_i386_link_setup_gnu_properties): Set need_global_offset_table
3251 * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
3253 (elf_x86_64_link_setup_gnu_properties): Set
3254 need_global_offset_table for Solaris.
3255 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep the
3256 unused _GLOBAL_OFFSET_TABLE_ for Solaris.
3257 (_bfd_x86_elf_link_setup_gnu_properties): Copy
3258 need_global_offset_table.
3259 * elfxx-x86.h (elf_x86_link_hash_table): Add
3260 need_global_offset_table.
3261 (elf_x86_init_table): Likewise.
3263 2018-02-08 Jim Wilson <jimw@sifive.com>
3265 * elfnn-riscv.c (riscv_elf_relocate_section): Add comment for previous
3268 2018-02-08 Nick Clifton <nickc@redhat.com>
3271 * elf.c (elf_parse_notes): Reject notes with excessuively large
3274 2018-02-07 Alan Modra <amodra@gmail.com>
3276 Revert 2018-01-17 Alan Modra <amodra@gmail.com>
3277 * elf32-ppc.c: Remove speculation barrier support.
3278 * elf32-ppc.h: Likewise.
3279 * elf64-ppc.c: Likewise.
3280 * elf64-ppc.h: Likewise.
3282 2018-02-06 Jim Wilson <jimw@sifive.com>
3284 * elfnn-riscv.c (riscv_elf_relocate_section): Return TRUE if used
3285 callback to report an error.
3287 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
3290 * elfxx-sparc.c (sparc_elf_tls_transition): Turn call to bfd_link_pic
3291 into call to !bfd_link_executable and tidy up.
3292 (_bfd_sparc_elf_check_relocs): Fix formatting and tidy up.
3293 <R_SPARC_TLS_LE_HIX22>: Turn call to bfd_link_pic into call to
3294 !bfd_link_executable.
3295 <R_SPARC_TLS_IE_HI22>: Likewise.
3296 <GOT relocations>: Remove useless code, tidy and merge related blocks.
3297 <R_SPARC_TLS_GD_CALL>: Turn call to bfd_link_pic into call to
3298 !bfd_link_executable.
3299 <R_SPARC_WPLT30>: Tidy up.
3300 (_bfd_sparc_elf_gc_mark_hook): Turn call to bfd_link_pic into call to
3301 !bfd_link_executable.
3302 (allocate_dynrelocs): Likewise.
3303 (_bfd_sparc_elf_relocate_section): Fix formatting and tidy up.
3304 <R_SPARC_TLS_GD_HI22>: Merge into...
3305 <R_SPARC_TLS_GD_LO10>: ...this. Adjust 4th argument in call to
3306 sparc_elf_tls_transition and remove redundant code.
3307 <R_SPARC_TLS_LDM_HI22>: Turn call to bfd_link_pic into call to
3308 !bfd_link_executable.
3309 <R_SPARC_TLS_LDO_HIX22>: Likewise.
3310 <R_SPARC_TLS_LE_HIX22>: Likewise. Tidy up.
3311 <R_SPARC_TLS_LDM_CALL>: Likewise.
3312 <R_SPARC_TLS_GD_CALL>: Likewise. Tidy up.
3313 <R_SPARC_TLS_GD_ADD>: Likewise.
3314 <R_SPARC_TLS_LDM_ADD>: Likewise.
3315 <R_SPARC_TLS_LDO_ADD>: Likewise.
3316 <R_SPARC_TLS_IE_LD>: Likewise.
3318 2018-02-06 Miloš Stojanović <milos.stojanovic@rt-rk.com>
3321 * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): If the dwarf
3322 functions failed to find the function name, try the generic elf
3323 find function instead.
3325 2018-02-06 Sergio Durigan Junior <sergiodj@redhat.com>
3327 * coff-rs6000.c (xcoff_write_archive_contents_old): Use
3328 'memcpy' instead of 'strncpy' when writing the magic number.
3330 2018-02-06 Nick Clifton <nickc@redhat.com>
3333 * opncls.c (bfd_get_debug_link_info_1): Check the size of the
3334 section before attempting to read it in.
3335 (bfd_get_alt_debug_link_info): Likewise.
3337 2018-02-06 Paul Carroll <pcarroll@codesourcery.com>
3339 * bfd/dwarf2.c (find_abstract_name): Modified to return file and
3340 line information in addition to name, if they can be found.
3342 2018-02-05 Renlin Li <renlin.li@arm.com>
3345 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Relax the
3346 R_AARCH64_ABS32 and R_AARCH64_ABS16 for absolute symbol. Apply the
3347 check for writeable section as well.
3349 2018-02-05 H.J. Lu <hongjiu.lu@intel.com>
3352 * elf32-i386.c (elf_i386_check_relocs): Set got_referenced if
3353 _GLOBAL_OFFSET_TABLE_ is referenced or GOT is needed to resolve
3354 undefined weak symbol to 0.
3355 * elf64-x86-64.c (elf_x86_64_check_relocs): Set got_referenced
3356 if _GLOBAL_OFFSET_TABLE_ is referenced.
3357 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Check
3358 got_referenced instead of ref_regular_nonweak. Remove the
3359 unused _GLOBAL_OFFSET_TABLE_ from symbol table.
3360 * elfxx-x86.h (elf_x86_link_hash_table): Add got_referenced.
3362 2018-02-05 Maciej W. Rozycki <macro@mips.com>
3364 * elfnn-riscv.c (_bfd_riscv_relax_pc): Use `memset' to
3365 initialize `hi_reloc'.
3367 2018-02-05 Maciej W. Rozycki <macro@mips.com>
3369 * elfxx-mips.c (_bfd_mips_elf_section_processing): For
3370 SHT_MIPS_REGINFO sections don't assert the correct size and
3371 report an error instead.
3373 2018-02-05 Maciej W. Rozycki <macro@mips.com>
3375 * elf.c (_bfd_elf_write_object_contents): Propagate a failure
3376 status from `->elf_backend_section_processing'.
3378 2018-02-02 Jim Wilson <jimw@sifive.com>
3381 * elfnn-riscv.c (riscv_relax_delete_bytes): New parameter link_info.
3382 If link_info->wrap_hash, check for a duplicate symbol and ignore.
3383 (_bfd_riscv_relax_call, bfd_riscv_relax_lui, _bfd_riscv_relax_tls_le):
3384 Pass new argument to riscv_relax_delete_bytes.
3385 (_bfd_riscv_relax_align, _bfd_riscv_relax_delete): Likewise. Remove
3386 ATTRIBUTE_UNUSED from link_info parameter.
3388 2018-02-02 Alan Modra <amodra@gmail.com>
3390 * elf64-ppc.c (ppc64_elf_relocate_section): Don't relocate nops
3391 emitted for toc sequence optimization. Set and use "howto" later.
3393 2018-02-01 Simon Marchi <simon.marchi@ericsson.com>
3395 * elf64-ppc.c (ppc64_elf_archive_symbol_lookup): Avoid pointer
3396 arithmetic on NULL pointer.
3397 * elflink.c (_bfd_elf_archive_symbol_lookup,
3398 elf_link_add_archive_symbols): Likewise.
3400 2018-01-31 Michael Matz <matz@suse.de>
3402 * elflink.c (bfd_elf_define_start_stop): Fix check of
3405 2018-01-31 H.J. Lu <hongjiu.lu@intel.com>
3408 * elflink.c (bfd_elf_define_start_stop): Check if __start and
3409 __stop symbols are referenced by shared objects.
3411 2018-01-30 Alan Modra <amodra@gmail.com>
3414 * elf.c (_bfd_elf_map_sections_to_segments): Don't start a new
3415 segment when demand paged with lma on the same page. Test this
3416 before load/non-load, executable/non-executable,
3417 writable/non-writable tests and simplify. Delete bogus relro
3418 condition in writable/non-writable test. Delete outdated
3419 comment. Formatting.
3421 2018-01-30 Alan Modra <amodra@gmail.com>
3423 * elflink.c (bfd_elf_define_start_stop): Make __start and __stop
3426 2018-01-29 Alan Modra <amodra@gmail.com>
3429 * coffgen.c (coff_pointerize_aux): Ensure auxent tagndx is in
3430 range before converting to a symbol table pointer.
3432 2018-01-27 Nick Clifton <nickc@redhat.com>
3434 * po/ru.po: Updated Russian translation.
3436 2018-01-26 Alan Modra <amodra@gmail.com>
3438 * elflink.c (bfd_elf_define_start_stop): Override symbols when
3439 they are defined dynamically.
3441 2018-01-26 Alan Modra <amodra@gmail.com>
3443 * elf64-ppc.c (ppc64_elf_size_stubs): Iterate sizing when
3444 .branch_lt changes size.
3446 2018-01-25 Alan Modra <amodra@gmail.com>
3449 * elfcode.h (elf_object_p): Avoid integer overflow.
3451 2018-01-25 Eric Botcazou <ebotcazou@adacore.com>
3454 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
3455 Do a mere lookup of the __tls_get_addr symbol instead of adding it.
3458 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
3461 * elfxx-sparc.c (sparc_elf_tls_transition): Replace
3462 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
3463 bfd_link_executable for TLS check.
3464 (_bfd_sparc_elf_check_relocs): Likewise.
3465 (allocate_dynrelocs): Likewise.
3466 (_bfd_sparc_elf_relocate_section): Likewise.
3468 2018-01-24 Renlin Li <renlin.li@arm.com>
3470 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Add support for
3471 BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
3472 BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
3473 BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
3474 BFD_RELOC_AARCH64_MOVW_PREL_G3.
3475 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
3476 (_bfd_aarch64_elf_resolve_relocation): Likewise.
3478 2018-01-24 Renlin Li <renlin.li@arm.com>
3480 * reloc.c: Add BFD_RELOC_AARCH64_MOVW_PREL_G0,
3481 BFD_RELOC_AARCH64_MOVW_PREL_G0_NC, BFD_RELOC_AARCH64_MOVW_PREL_G1,
3482 BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, BFD_RELOC_AARCH64_MOVW_PREL_G2,
3483 BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, BFD_RELOC_AARCH64_MOVW_PREL_G3.
3484 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Add entries for
3485 BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
3486 BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
3487 BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
3488 BFD_RELOC_AARCH64_MOVW_PREL_G3.
3489 * bfd-in2.h: Regenerate.
3490 * libbfd.h: Regenerate.
3492 2018-01-23 Maciej W. Rozycki <macro@mips.com>
3494 * elfxx-mips.c (_bfd_mips_elf_final_link): Update a stale
3495 `mips_elf32_section_processing' comment reference.
3497 2018-01-20 H.J. Lu <hongjiu.lu@intel.com>
3500 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Check the
3501 versioned __tls_get_addr symbol.
3503 2018-01-19 Nick Clifton <nickc@redhat.com>
3505 * po/fr.po: Updated French translation.
3507 2018-01-18 Alan Modra <amodra@gmail.com>
3509 * elf32-ppc.c (ppc_elf_create_glink): Correct alignment of .glink.
3510 * elf64-ppc.c (ppc64_elf_size_stubs): Handle negative plt_stub_align.
3511 (ppc64_elf_build_stubs): Likewise.
3513 2018-01-17 Nick Clifton <nickc@redhat.com>
3515 * po/ru.po: Updated Russian translation.
3516 * po/uk/po: Updated Ukranian translation.
3518 2018-01-17 Alan Modra <amodra@gmail.com>
3520 * elf64-ppc.c (ppc64_elf_build_stubs): Silence gcc warning.
3522 2018-01-17 Alan Modra <amodra@gmail.com>
3524 * elf32-ppc.c (GLINK_ENTRY_SIZE): Handle speculation barrier.
3525 (CRSETEQ, BEQCTRM): Define.
3526 (is_nonpic_glink_stub): Don't check bctr.
3527 (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
3528 (ppc_elf_relax_section): Size speculation barrier.
3529 (output_bctr): New function.
3530 (write_glink_stub): Use output_bctr.
3531 (ppc_elf_relocate_section): Use output_bctr for long branch stub.
3532 (ppc_elf_finish_dynamic_symbol): Likewise.
3533 (ppc_elf_finish_dynamic_sections): Use output_bctr.
3534 * elf32-ppc.h (struct ppc_elf_params): Add speculate_indirect_jumps.
3535 * elf64-ppc.c (CRSETEQ, BEQCTRM, BEQCTRLM): Define.
3536 (GLINK_PLTRESOLVE_SIZE): Size speculation barrier.
3537 (size_global_entry_stubs): Handle speculation barrier sizing.
3538 (plt_stub_size): Likewise.
3539 (output_bctr): New function.
3540 (build_plt_stub, build_tls_get_addr_stub): Output speculation
3542 (ppc_build_one_stub): Likewise for ppc_stub_plt_branch.
3543 (ppc_size_one_stub): Size speculation barrier in ppc_stub_plt_branch.
3544 (build_global_entry_stubs): Output speculation barrier.
3545 (ppc64_elf_build_stubs): Likewise in __glink_PLTresolve stub.
3546 * elf64-ppc.h (struct ppc64_elf_params): Add speculate_indirect_jumps.
3548 2018-01-17 Alan Modra <amodra@gmail.com>
3550 * elf32-ppc.c (GLINK_ENTRY_SIZE): Add parameters, handle
3551 __tls_get_addr_opt, and alignment sizing.
3552 (TLS_GET_ADDR_GLINK_SIZE): Delete.
3553 (is_nonpic_glink_stub): Don't use GLINK_ENTRY_SIZE.
3554 (ppc_elf_get_synthetic_symtab): Recognize stubs spaced at 4, 6,
3556 (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
3557 (allocate_dynrelocs): Use new GLINK_ENTRY_SIZE.
3558 (ppc_elf_size_dynamic_sections): Likewise. Size branch table
3560 (write_glink_stub): Handle __tls_get_addr_opt stub.
3561 Pad out to size given by GLINK_ENTRY_SIZE.
3562 (ppc_elf_relocate_section): Adjust write_glink_stub call.
3563 (ppc_elf_finish_dynamic_symbol): Likewise.
3564 (ppc_elf_finish_dynamic_sections): Write PLTresolve without using
3565 insn array since so many need rewriting.
3566 * elf32-ppc.h (struct ppc_elf_params): Add plt_stub_align.
3567 * elf64-ppc.c (GLINK_PLTRESOLVE_SIZE): Rename from
3568 GLINK_CALL_STUB_SIZE. Add htab param and evaluate to size without
3569 nops. Adjust all uses.
3570 (ppc64_elf_get_synthetic_symtab): Don't use GLINK_CALL_STUB_SIZE
3571 in glink_vma calculation.
3572 (struct ppc_link_hash_table): Add global_entry section pointer.
3573 (create_linkage_sections): Create separate section for global
3575 (PPC_LO, PPC_HI, PPC_HA): Move earlier.
3576 (size_global_entry_stubs): Handle sizing for aligned stubs.
3577 (ppc64_elf_size_dynamic_sections): Handle global_entry alloc,
3578 and don't stash end of glink branch table in rawsize.
3579 (ppc_build_one_stub): Rewrite stub size calculations.
3580 (build_global_entry_stubs): Use new section.
3581 (ppc64_elf_build_stubs): Don't pad __glink_PLTresolve with nops.
3582 Build lazy link stubs out to end of section. Build global entry
3583 stubs in new section.
3585 2018-01-15 Nick Clifton <nickc@redhat.com>
3587 * po/uk.po: Updated Ukranian translation.
3589 2018-01-13 Nick Clifton <nickc@redhat.com>
3591 * po/bfd.pot: Regenerated.
3593 2018-01-13 Nick Clifton <nickc@redhat.com>
3595 * version.m4: Bump version to 2.30.51
3596 * configure: Regenerate.
3598 2018-01-13 Nick Clifton <nickc@redhat.com>
3600 2.30 branch created.
3602 2018-01-12 Jens Widell <jl@opera.com>
3604 * elf.c (setup_group): Optimize search for group by remembering
3605 last found group and restarting search at that index.
3606 * elf-bfd.h (struct elf_obj_tdata): Add group_search_offset field.
3608 2018-01-12 Gunther Nikl <gnikl@users.sourceforge.net>
3610 * aoutx.h (aout_link_check_ar_symbols): Remove default and handle
3611 bfd_link_common_skip_none in switch.
3613 2018-01-12 Alan Modra <amodra@gmail.com>
3616 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Ignore dynamic
3617 references on forced local symbols.
3619 2018-01-12 Vlad Ivanov <vlad@ivanov.email>
3621 * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when
3622 .reginfo section has wrong size.
3624 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
3627 * elf.c (_bfd_elf_map_sections_to_segments): When generating
3628 separate code and read-only data LOAD segments, create a new
3629 LOAD segment if the previous section contains text and the
3630 current section doesn't or vice versa. Don't put a writable
3631 section in a read-only segment if there is a RELRO segment.
3633 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
3636 * elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Ignore dynamic
3637 references on forced local symbols.
3639 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
3642 * elflink.c (bfd_elf_gc_sections): Keep all PREINIT_ARRAY,
3643 INIT_ARRAY as well as FINI_ARRAY sections for ld -r --gc-section.
3645 2018-01-09 Kuan-Lin Chen <kuanlinchentw@gmail.com>
3648 * elf32-nds32.c (nds32_elf_relax_loadstore): Fix a typographical error.
3650 2018-01-03 John Baldwin <jhb@FreeBSD.org>
3652 * elf.c (elfcore_grok_freebsd_note): Handle
3653 NT_FREEBSD_PROCSTAT_PROC, NT_FREEBSD_PROCSTAT_FILES, and
3654 NT_FREEBSD_PROCSTAT_VMMAP.
3656 2018-01-03 Alan Modra <amodra@gmail.com>
3658 Update year range in copyright notice of all files.
3660 For older changes see ChangeLog-2017
3662 Copyright (C) 2018 Free Software Foundation, Inc.
3664 Copying and distribution of this file, with or without modification,
3665 are permitted in any medium without royalty provided the copyright
3666 notice and this notice are preserved.
3672 version-control: never