1 2018-09-20 Alan Modra <amodra@gmail.com>
4 * peXXigen.c (pe_print_edata): Correct export address table
5 overflow checks. Check dataoff against section size too.
7 2018-09-20 Alan Modra <amodra@gmail.com>
10 * dwarf2.c (read_section): Error when attempting to malloc
12 * syms.c (_bfd_stab_section_find_nearest_line): Bounds check
13 function_name. Bounds check reloc address. Formatting. Ensure
14 .stabstr zero terminated.
16 2018-09-18 Nick Clifton <nickc@redhat.com>
19 * elfcode.h (elf_swap_shdr_in): Generate a warning message if an
20 ELF section has contents and size larger than the file size.
22 2018-09-14 Maciej W. Rozycki <macro@mips.com>
25 * elfxx-mips.h (_bfd_mips_elf_hide_symbol): New prototype.
26 (_bfd_mips_elf_linker_flags): Update prototype.
27 * elf32-mips.c (elf_backend_hide_symbol): New macro.
28 * elf64-mips.c (elf_backend_hide_symbol): Likewise.
29 * elfn32-mips.c (elf_backend_hide_symbol): Likewise.
30 * elfxx-mips.c (mips_elf_link_hash_table): Add
31 `use_absolute_zero' and `gnu_target' members.
32 (mips_elf_record_global_got_symbol): Call
33 `_bfd_mips_elf_hide_symbol' rather than
34 `_bfd_elf_link_hash_hide_symbol'.
35 (mips_use_local_got_p): Return FALSE if the symbol is absolute.
36 (mips_elf_obtain_contents): Reorder function.
37 (mips_elf_nullify_got_load): New function.
38 (mips_elf_calculate_relocation): Add `contents' parameter.
39 Nullify GOT loads or if it is not possible, then redirect GOT
40 relocations to the `__gnu_absolute_zero' symbol, for references
41 that are supposed to resolve to zero.
42 (mips_elf_define_absolute_zero): New function.
43 (_bfd_mips_elf_check_relocs): Prepare for arrangements made in
44 `mips_elf_calculate_relocation' for references made via the GOT
45 that are supposed to resolve to zero.
46 (_bfd_mips_elf_hide_symbol): New function.
47 (_bfd_mips_elf_linker_flags): Add the `gnu_target' parameter,
48 set the `gnu_target' member of the MIPS hash table.
49 (MIPS_LIBC_ABI_ABSOLUTE): New enumeration constant.
50 (_bfd_mips_post_process_headers): Use it.
52 2018-09-14 Maciej W. Rozycki <macro@mips.com>
54 * elfxx-mips.c (mips_elf_store_contents): New function...
55 (mips_elf_perform_relocation): ... factored out from here.
57 2018-09-14 Lifang Xia <lifang_xia@c-sky.com>
59 * elf32-csky.c (csky_elf_howto_table): Fill special_function of
61 (csky_elf_relocate_section): Add R_CKCORE_PCREL32 process.
63 2018-09-14 Alan Modra <amodra@gmail.com>
66 * reloc.c (bfd_generic_get_relocated_section_contents): Zero reloc
67 fields in debug sections when reloc is against an undefined symbol
68 and called from bfd_simple_get_relocated_section_contents or
70 * dwarf2.c (find_abstract_instance): Return true for zero offset
71 DW_FORM_ref_addr without returning values.
73 2018-09-06 Alan Modra <amodra@gmail.com>
76 * elf32-avr.c (elf_avr_special_sections): New.
77 (elf_backend_special_sections): Define.
79 2018-09-04 Jose E. Marchesi <jose.marchesi@oracle.com>
81 * elfxx-sparc.c (_bfd_sparc_elf_info_to_howto): Do not issue an
82 error when an invalid relocation is passed; this is already done
83 by `_bfd_sparc_elf_info_to_howto_ptr'.
85 2018-09-04 Jose E. Marchesi <jose.marchesi@oracle.com>
87 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Issue an
88 error when an invalid symbol index is retrieved in ELF64_R_SYM of
89 a relocation seen in an input file.
91 2018-09-03 Jozef Lawrynowicz <jozef.l@mittosystems.com>
92 Alan Modra <amodra@gmail.com>
95 elf.c (copy_elf_program_header): When first segment contains
96 only the headers and SHT_NOBITS sections, use segment p_filesz
97 to calculate header and padding size. Use filepos of the first
100 018-08-31 H.J. Lu <hongjiu.lu@intel.com>
103 * archures.c (bfd_arch_get_compatible): Allow an IR object with
104 unknown architecture.
106 2018-08-31 Alan Modra <amodra@gmail.com>
108 * elf64-ppc.c (num_relocs_for_offset): New function.
109 (emit_relocs_for_offset): New function.
110 (use_global_in_relocs): New function, split out from..
111 (ppc_build_one_stub): ..here. Output relocations for notoc stubs.
112 (ppc_size_one_stub): Calculate reloc count for notoc stubs.
113 (ppc64_elf_size_stubs): Don't count undefined syms in stub_globals.
115 2018-08-31 Alan Modra <amodra@gmail.com>
117 * reloc.c (BFD_RELOC_PPC64_REL16_HIGH, BFD_RELOC_PPC64_REL16_HIGHA),
118 (BFD_RELOC_PPC64_REL16_HIGHER, BFD_RELOC_PPC64_REL16_HIGHERA),
119 (BFD_RELOC_PPC64_REL16_HIGHEST, BFD_RELOC_PPC64_REL16_HIGHESTA):
121 * elf64-ppc.c (ppc64_elf_howto_raw): Add new REL16 howtos.
122 (ppc64_elf_reloc_type_lookup): Translate new REL16 relocs.
123 (ppc64_elf_check_relocs, ppc64_elf_relocate_section): Handle them.
124 * bfd-in2.h: Regenerate.
125 * libbfd.h: Regenerate.
127 2018-08-31 Alan Modra <amodra@gmail.com>
129 * elf64-ppc.c: Correct _notoc stub comments.
130 (ppc_build_one_stub): Simplify output of branch for notoc
131 long branch stub. Don't include label offset of 8 bytes in
132 "off" calculation for notoc plt stub. Don't emit insns to get pc.
133 (build_offset): Emit insns to get pc here instead.
134 (size_offset): Add 4 extra insns.
135 (plt_stub_size): Adjust for "off" and size_offset changes.
136 (ppc_size_one_stub): Rearrange code into a switch, duplicating
137 some to better match ppc_build_one_stub.
139 2018-08-29 Chenghua Xu <paul.hua.gm@gmail.com>
141 * archures.c (bfd_architecture): New machine
142 bfd_mach_mips_gs264e.
143 * bfd-in2.h (bfd_architecture): Likewise.
144 * cpu-mips.c (enum I_xxx): Likewise.
145 (arch_info_struct): Likewise.
146 * elfxx-mips.c (_bfd_elf_mips_mach): Handle
148 (mips_set_isa_flags): Likewise.
149 (mips_mach_extensions): Map bfd_mach_mips_gs264e to
150 bfd_mach_mips_gs464e extension.
152 2018-08-29 Chenghua Xu <paul.hua.gm@gmail.com>
154 * archures.c (bfd_architecture): New machine
155 bfd_mach_mips_gs464e.
156 * bfd-in2.h (bfd_architecture): Likewise.
157 * cpu-mips.c (enum I_xxx): Likewise.
158 (arch_info_struct): Likewise.
159 * elfxx-mips.c (_bfd_elf_mips_mach): Handle
161 (mips_set_isa_flags): Likewise.
162 (mips_mach_extensions): Map bfd_mach_mips_gs464e to
163 bfd_mach_mips_gs464 extension.
165 2018-08-29 Chenghua Xu <paul.hua.gm@gmail.com>
167 * archures.c (bfd_architecture): Rename
168 bfd_mach_mips_loongson_3a to bfd_mach_mips_gs464.
169 * bfd-in2.h (bfd_architecture): Likewise.
170 * cpu-mips.c (enum I_xxx): Likewise.
171 (arch_info_struct): Likewise.
172 * elfxx-mips.c (_bfd_elf_mips_mach): Likewise.
173 (mips_set_isa_flags): Likewise.
174 (mips_mach_extensions): Likewise.
175 (bfd_mips_isa_ext_mach): Likewise.
176 (bfd_mips_isa_ext): Likewise.
177 (print_mips_isa_ext): Delete AFL_EXT_LOONGSON_3A.
179 2018-08-29 Chenghua Xu <paul.hua.gm@gmail.com>
181 * elfxx-mips.c (print_mips_ases): Add Loongson EXT2 extension.
183 2018-08-29 Chenghua Xu <paul.hua.gm@gmail.com>
185 * elfxx-mips.c (infer_mips_abiflags): Use ases instead of
186 isa_ext for infer ABI flags.
187 (print_mips_ases): Add Loongson EXT extension.
189 2018-08-29 Chenghua Xu <paul.hua.gm@gmail.com>
191 * elfxx-mips.c (print_mips_ases): Add CAM extension.
193 2018-08-27 H.J. Lu <hongjiu.lu@intel.com>
195 * elfxx-x86.c (_bfd_x86_elf_parse_gnu_properties): Don't mask
196 out the GNU_PROPERTY_X86_UINT32_VALID bit.
198 2018-08-25 H.J. Lu <hongjiu.lu@intel.com>
201 * elf.c (_bfd_elf_get_symbol_version_string): Return
202 _("<corrupt>") for corrupt symbol version info.
204 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
206 * elfxx-x86.c (_bfd_x86_elf_parse_gnu_properties): Handle
207 X86_COMPAT_ISA_1_USED, X86_COMPAT_ISA_1_NEEDED,
208 X86_UINT32_AND_LO, X86_UINT32_AND_HI, X86_UINT32_OR_LO,
209 X86_UINT32_OR_HI, X86_UINT32_OR_AND_LO and X86_UINT32_OR_AND_HI
210 instead of X86_ISA_1_USED, X86_ISA_1_NEEDED and X86_FEATURE_1_AND.
211 (_bfd_x86_elf_merge_gnu_properties): Likewise.
212 (_bfd_x86_elf_link_setup_gnu_properties): Add X86_FEATURE_2_NEEDED
213 instead of X86_ISA_1_NEEDED.
214 (_bfd_x86_elf_link_fixup_gnu_properties): Handle
215 X86_COMPAT_ISA_1_USED, X86_COMPAT_ISA_1_NEEDED, X86_UINT32_AND_LO,
216 X86_UINT32_AND_HI, X86_UINT32_OR_LO, X86_UINT32_OR_HI,
217 X86_UINT32_OR_AND_LO and X86_UINT32_OR_AND_HI instead of
218 X86_ISA_1_USED, X86_ISA_1_NEEDED and X86_FEATURE_1_AND.
220 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
222 * elfxx-x86.c (_bfd_x86_elf_parse_gnu_properties): Mask out the
223 GNU_PROPERTY_X86_UINT32_VALID bit.
224 (_bfd_x86_elf_link_fixup_gnu_properties): Set the
225 GNU_PROPERTY_X86_UINT32_VALID bit for non-relocatable output.
227 2018-08-23 Zenith423 <zenith432@users.sourceforge.net>
230 * plugin.c (struct plugin_list_entry): New structure.
231 (plugin_list): New variable.
232 (try_load_plugin): Place opened plugins on a list. Ensure that
233 the refcount in the dynamic loader is kept at 1.
235 2018-08-23 Alan Modra <amodra@gmail.com>
237 * elf64-ppc.c (ppc64_elf_relocate_section): Revise "call lacks
240 2018-08-23 Nick Clifton <nickc@redhat.com>
242 * elf64-hppa.c (elf_hppa_final_link_relocate): Replace unworkable
243 code with an assertion.
245 2018-08-23 Nick Clifton <nickc@redhat.com>
248 * coffgen.c (coff_pointerize_aux): Add table_end parameter. Use
249 it to prevent walking off the end of the table.
250 (coff_get_normalized_symtab): Pass internal_end pointer to
253 2018-08-23 Alan Modra <amodra@gmail.com>
255 * elf64-ppc.c (ppc64_elf_relocate_section): Don't miss clearing
256 unresolved_reloc on ppc_stub_plt_call_notoc.
258 2018-08-22 H.J. Lu <hongjiu.lu@intel.com>
261 * development.sh (experimental): New.
263 2018-08-22 Helge Deller <deller@gmx.de>
264 Nick Clifton <nickc@redhat.com>
266 * elf-hppa.h (elf_hppa_fake_sections): Use SHT_PARISC_UNWIND as
267 the section type of the .PARISC.unwind section on 64-bit binaries
268 and SHT_PROGBITS for 32-bit binaries. Add a comment about it.
269 Add comment about the sh_entsize value.
271 2018-08-22 Rafeal Auler <rafaelauler@gmail.com>
274 * elfnn-aarch64.c (elfNN_aarch64_size_stubs): Always update the
275 stub's target, since it may have been changed after the layout.
277 2018-08-21 John Darington <john@darrington.wattle.id.au>
279 * elf32-s12z.c (opru18_reloc): New function.
280 (elf_s12z_howto_table): Adjust Howto according to new knowledge.
282 2018-08-21 mephi42 <mephi42@gmail.com>
285 * mach-o.c (bfd_mach_o_mangle_symbols): Update n_type even if
286 data is already considered filled.
288 2018-08-21 Alan Modra <amodra@gmail.com>
290 * elf64-ppc.c (HOW): Define.
292 (ppc64_elf_howto_raw): Use HOW to initialize entries.
293 * elf32-ppc.c (HOW): Define.
294 (ppc_elf_howto_raw): Use HOW to initialize entries, updating
295 R_PPC_VLE_REL15 and R_PPC_VLE_REL24 to use bitpos=0.
297 2018-08-21 Alan Modra <amodra@gmail.com>
299 * reloc.c (reloc_howto_type): Typedef.
300 (bfd_symbol): Delete forward declaration.
301 (struct reloc_howto_struct): Add "negate" field. Make "size",
302 "bitsize", "rightshift", "bitpos", "complain_on_overflow",
303 "pc_relative", "partial_inplace", and "pcrel_offset" bitfields.
304 Rearrange for better packing. Revise comments.
305 (HOWTO): Map to rearranged reloc_howto_struct.
306 (bfd_get_reloc_size): Delete now unused cases.
307 (read_reloc, write_reloc): Likewise.
308 (apply_reloc, _bfd_relocate_contents): Test howto->negate
309 rather than howto->size < 0 for negated relocation values.
310 * coff-rs6000.c (xcoff_complain_overflow_bitfield_func): Avoid
311 signed/unsigned warning.
312 (xcoff_ppc_relocate_section): Delete "condition is always false"
314 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Likewise.
315 * cpu-ns32k.c (do_ns32k_reloc): Adjust to suit reloc_howto_struct
317 * vms-alpha.c (_bfd_vms_write_etir, alpha_vms_slurp_relocs): Use
318 size 16 for ALPHA_R_LINKAGE.
319 (alpha_howto_table <ALPHA_R_LINKAGE>): Set encoded size and
321 * bfd-in.h (reloc_howto_type): Delete.
322 * bfd-in2.h: Regenerate.
324 2018-08-21 Alan Modra <amodra@gmail.com>
326 * reloc.c (HOWTO): Revise comment.
327 (NEWHOWTO, HOWTO_PREPARE): Delete.
328 * coff-arm.c (coff_arm_reloc_type_lookup): Replace const struc
329 reloc_howto_struct with reloc_howto_type.
330 * ns32knetbsd.c (MY_bfd_reloc_type_lookup): Likewise.
331 * vms-alpha.c (alpha_vms_bfd_reloc_type_lookup): Likewise.
332 * elf-hppa.h (HOW): Define.
333 (elf_hppa_howto_table): Use it to simplify this table, correcting
334 name of R_PARISC_LTOFF16WF, R_PARISC_LTOFF_FPTR64, and
335 R_PARISC_LTOFF_FPTR16DF.
336 * elf32-mep.c (MEPREL): Use HOWTO.
337 * bfd-in2.h: Regenerate.
339 2018-08-20 Alan Modra <amodra@gmail.com>
341 * mmo.c (valid_mmo_symbol_character_set): Initialize and make
343 (mmo_init): Don't init valid_mmo_symbol_character_set.
345 2018-08-20 Alan Modra <amodra@gmail.com>
347 * rs6000-core.c (CORE_COMMONSZ): Balance parentheses in expression.
349 2018-08-17 H.J. Lu <hongjiu.lu@intel.com>
352 * elf-bfd.h (elf_backend_data): Add fixup_gnu_properties.
353 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Call
354 backend fixup_gnu_properties if it isn't NULL. Discard
355 .note.gnu.property section if all properties have been removed.
356 * elfxx-target.h (elf_backend_fixup_gnu_properties): New.
357 (elfNN_bed): Initialize fixup_gnu_properties.
358 * elfxx-x86.c (_bfd_x86_elf_link_fixup_gnu_properties): New
360 * elfxx-x86.h (_bfd_x86_elf_link_fixup_gnu_properties): New
362 (elf_backend_fixup_gnu_properties): New.
364 2018-08-16 Alan Modra <amodra@gmail.com>
366 * elf64-ppc.c: Correct ppc_stub_long_branch_notoc example.
369 2018-08-12 H.J. Lu <hongjiu.lu@intel.com>
372 * Makefile.am (BFD32_LIBS): Add elf-properties.lo.
373 (BFD32_LIBS_CFILES): Add elf-properties.c.
374 (BFD32_BACKENDS): Remove elf-properties.lo.
375 (BFD32_BACKENDS_CFILES): Remove elf-properties.c.
376 * configure.ac (elf): Remove elf-properties.lo.
377 * Makefile.in: Regenerated.
378 * configure: Likewise.
380 2018-08-11 H.J. Lu <hongjiu.lu@intel.com>
383 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Don't
384 add X86_ISA_1_NEEDED property only if existing properties won't
387 2018-08-11 Alan Modra <amodra@gmail.com>
389 * reloc.c (bfd_get_reloc_size): Sort switch.
390 (read_reloc, write_reloc, apply_reloc): New functions.
391 (bfd_perform_relocation, bfd_install_relocation): Use apply_reloc.
392 (_bfd_relocate_contents): Use read_reloc and write_reloc.
393 (_bfd_clear_contents): Likewise.
395 2018-08-11 John Darrington <john@darrington.wattle.id.au>
397 * reloc.c (_bfd_relocate_contents): Handle 3 byte relocs.
398 (_bfd_clear_contents): Likewise.
399 (bfd_perform_relocation): Likewise.
400 (bfd_install_relocation): Likewise.
402 2018-08-10 H.J. Lu <hongjiu.lu@intel.com>
405 * elflink.c (bfd_elf_record_link_assignment): Always clear
406 h->verinfo.verdef when overriding a dynamic definition.
408 2018-08-10 H.J. Lu <hongjiu.lu@intel.com>
411 * elf-properties.c (elf_get_gnu_property_section_size): Always
412 use align_size as pr_datasz for GNU_PROPERTY_STACK_SIZE.
413 (elf_write_gnu_properties): Likewise.
415 2018-08-08 H.J. Lu <hongjiu.lu@intel.com>
418 * bfd.c (bfd_convert_section_size): Check BFD_DECOMPRESS after
419 calling _bfd_elf_convert_gnu_property_size to convert
420 .note.gnu.property section size.
421 (bfd_convert_section_contents): Check BFD_DECOMPRESS after
422 calling _bfd_elf_convert_gnu_properties to convert
423 .note.gnu.property section.
424 * elf-bfd.h (_bfd_elf_convert_gnu_property_size): New prototype.
425 (_bfd_elf_convert_gnu_properties): Likewise.
426 * elf-properties.c (elf_get_gnu_property_section_size): New
428 (elf_write_gnu_properties): Likewise.
429 (_bfd_elf_convert_gnu_property_size): Likewise.
430 (_bfd_elf_convert_gnu_properties): Likewise.
431 (_bfd_elf_link_setup_gnu_properties): Use
432 elf_get_gnu_property_section_size and elf_write_gnu_properties.
434 2018-08-08 H.J. Lu <hongjiu.lu@intel.com>
437 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Remove
438 GNU_PROPERTY_X86_ISA_1_USED if an input file doesn't have it.
439 (_bfd_x86_elf_link_setup_gnu_properties): Adding the
440 GNU_PROPERTY_X86_ISA_1_NEEDED, instead of
441 GNU_PROPERTY_X86_ISA_1_USED, property.
443 2018-08-07 Alan Modra <amodra@gmail.com>
445 * elf64-ppc.c (struct map_stub): Delete tls_get_addr_opt_bctrl.
446 Add lr_restore, eh_size and eh_base.
447 (eh_advance, eh_advance_size): New functions.
448 (build_tls_get_addr_stub): Emit EH info for stub.
449 (ppc_build_one_stub): Likewise for _notoc stubs.
450 (ppc_size_one_stub): Size EH info for stub.
451 (group_sections): Init new map_stub fields.
452 (stub_eh_frame_size): Delete.
453 (ppc64_elf_size_stubs): Size EH info for stubs. Set up dummy EH
455 (ppc64_elf_build_stubs): Reinit new map_stub fields. Set FDE
456 offset to stub section here..
457 (ppc64_elf_finish_dynamic_sections): ..rather than here.
459 2018-08-07 Alan Modra <amodra@gmail.com>
461 * elf64-ppc.c (ppc64_elf_relocate_section): Don't skip first
462 instruction of __tls_get_addr_opt stub.
463 (plt_stub_size): Omit ALWAYS_EMIT_R2SAVE condition when
464 dealing with __tls_get_addr_opt stub.
465 (build_tls_get_addr_stub, ppc_size_one_stub): Likewise.
467 2018-08-06 Claudiu Zissulescu <claziss@synopsys.com>
469 * elf32-arc.c (arc_elf_merge_private_bfd_data): Complain about
470 efalgs only when in/out exists.
471 (elf32_arc_section_from_shdr): Don't complain about 0x0c
472 section type. It is mwdt compiler specific.
474 2018-08-06 Claudiu Zissulescu <claziss@synopsys.com>
476 * elf32-arc.c (arc_elf_merge_attributes): Fix merge attributes.
478 2018-08-06 Claudiu Zissulescu <claziss@synopsys.com>
480 * elf32-arc.c (arc_elf_merge_attributes): Handle
483 2018-08-05 Alan Modra <amodra@gmail.com>
485 * elf64-ppc.c (ADDI_R12_R11, ADDI_R12_R12, LIS_R12),
486 (ADDIS_R12_R11, ORIS_R12_R12_0, ORI_R12_R12_0),
487 (SLDI_R12_R12_32, LDX_R12_R11_R12, ADD_R12_R11_R12): Define.
488 (ppc64_elf_howto_raw): Add R_PPC64_REL24_NOTOC entry.
489 (ppc64_elf_reloc_type_lookup): Support R_PPC64_REL24_NOTOC.
490 (ppc_stub_type): Add ppc_stub_long_branch_notoc,
491 ppc_stub_long_branch_both, ppc_stub_plt_branch_notoc,
492 ppc_stub_plt_branch_both, ppc_stub_plt_call_notoc, and
493 ppc_stub_plt_call_both.
494 (is_branch_reloc): Add R_PPC64_REL24_NOTOC.
495 (build_offset, size_offset): New functions.
496 (plt_stub_size): Support plt_call_notoc and plt_call_both.
497 (ppc_build_one_stub, ppc_size_one_stub): Support new stubs.
498 (toc_adjusting_stub_needed): Handle R_PPC64_REL24_NOTOC.
499 (ppc64_elf_size_stubs): Likewise, and new stubs.
500 (ppc64_elf_build_stubs, ppc64_elf_relocate_section): Likewise.
501 * reloc.c: Add BFD_RELOC_PPC64_REL24_NOTOC.
502 * bfd-in2.h: Regenerate.
503 * libbfd.h: Regenerate.
505 2018-08-05 Alan Modra <amodra@gmail.com>
507 * elf64-ppc.c (ppc_build_one_stub): Lose "_r2off" in stub symbols.
509 2018-08-02 Jim Wilson <jimw@sifive.com>
511 * elfnn-riscv.c (riscv_elf_create_dynamic_sections): For .tdata.dyn,
512 add SEC_LINKER_CREATED flag.
514 2018-08-01 Nick Clifton <nickc@redhat.com>
516 * coff-rs6000.c (_bfd_xcoff_put_ldsymbol_name): Suppress warnings
517 about potentially truncated strncpy operations.
518 (_bfd_xcoff_put_symbol_name): Likewise.
520 * elf32-avr.c (avr_stub_name): Check for a NULL return from
523 2018-08-01 Zenith <zenith432@users.sourceforge.net>
526 * plugin.c (bfd_plugin_open_input): Close file descriptor if the
528 (try_claim): Always close the file descriptor at the end of the
530 (try_load_plugin): If a plugin has already been registered, then
531 skip the dlopen and onload steps and go straight to claiming the
532 file. If these is an error, close the plugin.
534 2018-08-01 Alan Modra <amodra@gmail.com>
536 * elf64-ppc.c (plt_stub_pad): Delay plt_stub_size call until needed.
537 (ppc_build_one_stub): Don't set stub_offset, instead assert that
538 it is sane. Don't adjust stub_offset for alignment. Adjust size
539 calculation. Use "targ" temp when calculating offsets.
540 (ppc_size_one_stub): Set stub_offset here. Use "targ" temp when
541 calculating offsets. Adjust for alignment before setting
542 tls_get_addr_opt_bctrl.
544 2018-08-01 Alan Modra <amodra@gmail.com>
546 * po/SRC-POTFILES.in: Regenerate.
548 2018-07-30 Nick Clifton <nickc@redhat.com>
551 * elf32-sh.c (sh_elf_relocate_section): When processing
552 translation relocs, fail if the relocation offset is too small.
553 Replace BFD_ASSERTs with more helpful error messages.
555 2018-07-30 Andrew Jenner <andrew@codesourcery.com>
557 * Makefile.am (ALL_MACHINES, ALL_MACHINES_CFILES): Add C-SKY.
558 (BFD32_BACKENDS, BFD_BACKENDS_CFILES): Likewise.
559 * Makefile.in: Regenerated.
560 * archures.c (enum bfd_architecture): Add bfd_arch_csky and
561 related bfd_mach defines.
562 (bfd_csky_arch): Declare.
563 (bfd_archures_list): Add C-SKY.
564 * bfd-in.h (elf32_csky_build_stubs): Declare.
565 (elf32_csky_size_stubs): Declare.
566 (elf32_csky_next_input_section: Declare.
567 (elf32_csky_setup_section_lists): Declare.
568 * bfd-in2.h: Regenerated.
569 * config.bfd: Add C-SKY.
570 * configure.ac: Likewise.
571 * configure: Regenerated.
572 * cpu-csky.c: New file.
573 * elf-bfd.h (enum elf_target_id): Add C-SKY.
574 * elf32-csky.c: New file.
575 * libbfd.h: Regenerated.
576 * reloc.c: Add C-SKY relocations.
577 * targets.c (csky_elf32_be_vec, csky_elf32_le_vec): Declare.
578 (_bfd_target_vector): Add C-SKY target vector entries.
580 2018-07-27 John Darrington <john@darrington.wattle.id.au>
582 * elf32-s12z.c (ELF_TARGET_ID): Don't define.
584 2018-07-27 John Darrington <john@darrington.wattle.id.au>
586 * libbfd.c (bfd_getb24, bfd_getl24): New functions.
587 (bfd_get_24, bfd_put_24): New macros.
588 * bfd-in2.h: Regenerate.
590 2018-07-27 John Darrington <john@darrington.wattle.id.au>
592 * elf32-s12z.c (s12z_elf_set_mach_from_flags): Remove comment.
594 2018-07-26 Alan Modra <amodra@gmail.com>
596 * elf64-ppc.c (ppc64_elf_size_stubs): Use a ppc_stub_long_branch_r2off
597 for calls to symbols with STO_PPC64_LOCAL_MASK bits set to 1.
599 2018-07-25 Alan Modra <amodra@gmail.com>
601 * elf32-ppc.c (ppc_elf_relax_section): Ignore common or undef locals.
602 Avoid trashing toff with added when used as a symbol index.
603 Ignore R_PPC_PLTREL24 addends in unused example code. Avoid
604 creating unnecessary fixups when relocatable.
606 2018-07-25 Alan Modra <amodra@gmail.com>
608 * elf32-arm.c (elf32_arm_nabi_write_core_note): Disable
609 -Wstringop-truncation warning for gcc-8.0 too.
610 * elf32-ppc.c (ppc_elf_write_core_note): Likewise.
611 * elf64-ppc.c (ppc64_elf_write_core_note): Likewise.
612 * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewise.
613 * elf32-s390.c (elf_s390_write_core_note): Comment fix.
614 * elf64-s390.c (elf_s390_write_core_note): Likewise.
616 2018-07-24 Alan Modra <amodra@gmail.com>
619 * dwarf2.c (dwarf_debug_section_enum): Fix comment typo.
620 * elf.c (bfd_section_from_shdr, elf_sort_sections): Likewise.
622 2018-07-23 Max Filippov <jcmvbkbc@gmail.com>
624 * elf32-xtensa.c (elf_xtensa_finish_dynamic_sections): Move
625 relocation sections consistency check to always check both
626 .rela.dyn and .rela.plt when they exist. Rearrange variable
627 definition and assignment places.
629 2018-07-23 Max Filippov <jcmvbkbc@gmail.com>
631 * elf32-xtensa.c (shrink_dynamic_reloc_sections): Shrink dynamic
632 relocations section for dynamic undefined weak symbols when
633 linking a shared object.
635 2018-07-23 Tom Tromey <tom@tromey.com>
637 * elf.c (bfd_get_elf_phdrs): Don't call memcpy with size 0.
639 2018-07-21 Eric Botcazou <ebotcazou@adacore.com>
641 * elf32-arm.c (elf32_arm_final_link_relocate) <R_ARM_GOT32>: Small
642 cleanup for the case of a global symbol that binds locally. Also
643 install a value in the GOT slot in the case of a local symbol in
646 2018-07-20 H.J. Lu <hongjiu.lu@intel.com>
649 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): If the
650 separate code program header is needed, make sure that the first
651 read-only PT_LOAD segment has no code by adding a
652 GNU_PROPERTY_X86_ISA_1_USED note.
654 2018-07-20 Chenghua Xu <paul.hua.gm@gmail.com>
655 Maciej W. Rozycki <macro@mips.com>
657 * elfxx-mips.c (print_mips_ases): Add MMI extension.
659 2018-07-20 Maciej W. Rozycki <macro@mips.com>
661 * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Do not
662 create DT_REL, DT_RELSZ or DT_RELENT dynamic entries if the
663 dynamic relocation section will be discarded from output.
664 (_bfd_mips_elf_finish_dynamic_sections) <DT_RELSZ>: Assert that
665 the dynamic relocation section will be retained in output.
667 2018-07-18 Maciej W. Rozycki <macro@mips.com>
669 * xcofflink.c (xcoff_write_global_symbol): Fix symbol type
670 checks for defined weak symbols.
672 2018-07-17 Maciej W. Rozycki <macro@mips.com>
674 * elf32-nds32.c (nds32_elf_relax_loadstore): Use
675 `bfd_is_abs_symbol' rather than `bfd_is_abs_section' in checking
676 whether the symbol is absolute.
677 (nds32_elf_relax_lo12): Likewise.
678 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
679 (elfNN_aarch64_check_relocs): Likewise.
680 * xcofflink.c (xcoff_need_ldrel_p): Likewise.
681 (bfd_xcoff_import_symbol): Likewise.
682 (xcoff_write_global_symbol): Likewise.
684 2018-07-17 Maciej W. Rozycki <macro@mips.com>
686 * linker.c (bfd_is_abs_symbol): New macro.
687 * bfd-in2.h: Regenerate.
689 2018-07-16 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
691 * elf-bfd.h (elfcore_write_ppc_tar): Add prototype.
692 (elfcore_write_ppc_ppr): Likewise.
693 (elfcore_write_ppc_dscr): Likewise.
694 (elfcore_write_ppc_ebb): Likewise.
695 (elfcore_write_ppc_pmu): Likewise.
696 (elfcore_write_ppc_tm_cgpr): Likewise.
697 (elfcore_write_ppc_tm_cfpr): Likewise.
698 (elfcore_write_ppc_tm_cvmx): Likewise.
699 (elfcore_write_ppc_tm_cvsx): Likewise.
700 (elfcore_write_ppc_tm_spr): Likewise.
701 (elfcore_write_ppc_tm_ctar): Likewise.
702 (elfcore_write_ppc_tm_cppr): Likewise.
703 (elfcore_write_ppc_tm_cdscr): Likewise.
704 * elf.c (elfcore_write_ppc_tar): New function.
705 (elfcore_write_ppc_ppr): Likewise.
706 (elfcore_write_ppc_dscr): Likewise.
707 (elfcore_write_ppc_ebb): Likewise.
708 (elfcore_write_ppc_pmu): Likewise.
709 (elfcore_write_ppc_tm_cgpr): Likewise.
710 (elfcore_write_ppc_tm_cfpr): Likewise.
711 (elfcore_write_ppc_tm_cvmx): Likewise.
712 (elfcore_write_ppc_tm_cvsx): Likewise.
713 (elfcore_write_ppc_tm_spr): Likewise.
714 (elfcore_write_ppc_tm_ctar): Likewise.
715 (elfcore_write_ppc_tm_cppr): Likewise.
716 (elfcore_write_ppc_tm_cdscr): Likewise.
717 (elfcore_write_register_note): Call them.
718 (elfcore_grok_ppc_tar): New function.
719 (elfcore_grok_ppc_ppr): Likewise.
720 (elfcore_grok_ppc_dscr): Likewise.
721 (elfcore_grok_ppc_ebb): Likewise.
722 (elfcore_grok_ppc_pmu): Likewise.
723 (elfcore_grok_ppc_tm_cgpr): Likewise.
724 (elfcore_grok_ppc_tm_cfpr): Likewise.
725 (elfcore_grok_ppc_tm_cvmx): Likewise.
726 (elfcore_grok_ppc_tm_cvsx): Likewise.
727 (elfcore_grok_ppc_tm_spr): Likewise.
728 (elfcore_grok_ppc_tm_ctar): Likewise.
729 (elfcore_grok_ppc_tm_cppr): Likewise.
730 (elfcore_grok_ppc_tm_cdscr): Likewise.
731 (elfcore_grok_note): Call them.
733 2018-07-11 Maciej W. Rozycki <macro@mips.com>
735 * elfxx-mips.c (mips_tls_got_relocs): Use `bfd_link_dll' rather
736 than `!bfd_link_pic' in determining the dynamic symbol index.
737 Avoid the index of -1.
738 (mips_elf_initialize_tls_slots): Likewise. Flatten code by
739 moving `dyn' to the beginning of the function block.
741 2018-07-11 Maciej W. Rozycki <macro@mips.com>
742 Rich Felker <bugdal@aerifal.cx>
745 * elfxx-mips.c (mips_tls_got_relocs): Use `bfd_link_dll' rather
746 than `bfd_link_pic' to determine whether dynamic relocations are
748 (mips_elf_initialize_tls_slots): Likewise.
750 2018-07-10 Maciej W. Rozycki <macro@mips.com>
752 * elflink.c (bfd_elf_final_link): Rename `remove' local variable
755 2018-07-10 Alan Modra <amodra@gmail.com>
757 * elf32-xgate.h: Delete.
758 * elf32-xgate.c: Delete unnecessary forward declarations, add two
760 (xgate_elf_bfd_link_hash_table_create)
761 (xgate_elf_bfd_link_hash_table_free)
762 (xgate_elf_set_mach_from_flags, struct xgate_scan_param)
763 (stub_hash_newfunc, elf32_xgate_add_symbol_hook)
764 (elf32_xgate_setup_section_lists, elf32_xgate_size_stubs)
765 (elf32_xgate_build_stubs, elf32_xgate_check_relocs)
766 (elf32_xgate_relocate_section, _bfd_xgate_elf_set_private_flags)
767 (elf32_xgate_post_process_headers): Delete.
768 (elf32_xgate_backend_symbol_processing): New function.
769 (xgate_elf_ignore_reloc, xgate_elf_special_reloc)
770 (_bfd_xgate_elf_print_private_bfd_data): Make static.
771 (ELF_TARGET_ID, elf_info_to_howto, elf_backend_check_relocs)
772 (elf_backend_relocate_section, elf_backend_object_p)
773 (elf_backend_final_write_processing, elf_backend_can_gc_sections)
774 (elf_backend_post_process_headers, elf_backend_add_symbol_hook)
775 (bfd_elf32_bfd_link_hash_table_create)
776 (bfd_elf32_bfd_set_private_flags)
777 (xgate_stub_hash_lookup): Don't define.
778 (elf_backend_symbol_processing): Define.
779 * elf-bfd.h (elf_target_id): Delete XGATE_ELF_DATA.
781 2018-07-09 Maciej W. Rozycki <macro@mips.com>
783 * elfxx-mips.c (_bfd_mips_elf_adjust_dynamic_symbol): Don't set
784 `->needs_lazy_stub' if the stubs output section is the absolute
787 2018-07-09 H.J. Lu <hongjiu.lu@intel.com>
790 * configure.ac: Use changequote for "i[3-7]86-*-linux-*".
791 * configure: Regenerated.
793 2018-07-09 Alan Modra <amodra@gmail.com>
795 * elf32-m68hc1x.c (elf32_m68hc11_post_process_headers): Call
796 _bfd_elf_post_process_headers.
798 2018-07-06 Max Filippov <jcmvbkbc@gmail.com>
800 * elf32-xtensa.c (elf_xtensa_allocate_dynrelocs): Don't allocate
801 space for dynamic relocation for undefined weak symbol.
802 (elf_xtensa_relocate_section): Don't emit R_XTENSA_RELATIVE
803 relocation for undefined weak symbols.
804 (shrink_dynamic_reloc_sections): Don't shrink dynamic relocation
805 section for relocations against undefined weak symbols.
807 2018-07-06 Alan Hayward <alan.hayward@arm.com>
809 * elf.c (elfcore_grok_aarch_sve): New function.
810 (elfcore_grok_note): Check for Aarch64 SVE.
811 (elfcore_write_aarch_sve): New function.
812 (elfcore_write_register_note): Check for Aarch64 SVE.
813 * elf-bfd.h(elfcore_grok_aarch_sve): New declaration.
815 2018-07-06 Alan Modra <amodra@gmail.com>
817 * elf32-arm.c (elf32_arm_nabi_write_core_note): Don't use
818 DIAGNOTIC_PUSH and DIAGNOSTIC_POP unconditionally.
819 * elf32-ppc.c (ppc_elf_write_core_note): Likewise.
820 * elf32-s390.c (elf_s390_write_core_note): Likewise.
821 * elf64-ppc.c (ppc64_elf_write_core_note): Likewise.
822 * elf64-s390.c (elf_s390_write_core_note): Likewise.
823 * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewise.
825 2018-07-05 Jim Wilson <jimw@sifive.com>
827 * config.bfd (riscv32*-*-*): Renamed from riscv32-*-*.
828 (riscv64*-*-*): Likewise.
829 (riscv-*-*): Add as an alias for riscv32*-*-*.
831 2018-07-05 H.J. Lu <hongjiu.lu@intel.com>
834 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Remove x86
835 ISA properties with empty bits.
837 2018-07-05 Nick Clifton <nickc@redhat.com>
839 * po/ru.po: Updated Russian translation.
841 2018-07-05 Alan Modra <amodra@gmail.com>
843 * elf-bfd.h (_bfd_elf_ppc_merge_fp_attributes): Update prototype.
844 * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Return error
845 on mismatch. Remove "warning: " from messages. Track last bfd
847 (ppc_elf_merge_obj_attributes): Likewise. Handle status from
848 _bfd_elf_ppc_merge_fp_attributes.
849 * elf64-ppc.c (ppc64_elf_merge_private_bfd_data): Handle status
850 from _bfd_elf_ppc_merge_fp_attributes.
852 2018-07-04 H.J. Lu <hongjiu.lu@intel.com>
854 * Makefile.am (bfdinclude_HEADERS): Add $(INCDIR)/diagnostics.h.
855 * Makefile.in: Regenerated.
857 2018-07-03 Alan Modra <amodra@gmail.com>
859 * elflink.c (bfd_elf_final_link): Remove zero size .gnu.attributes
862 2018-07-03 Alan Modra <amodra@gmail.com>
864 * elf-bfd.h (ATTR_TYPE_FLAG_ERROR, ATTR_TYPE_HAS_ERROR): Define.
865 * elf-attrs.c (is_default_attr): Handle ATTR_TYPE_HAS_ERROR.
866 * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Use
867 ATTR_TYPE_FLAG_INT_VAL. Set ATTR_TYPE_HAS_ERROR on finding
868 incompatible attribute.
869 (ppc_elf_merge_obj_attributes): Likewise. Return
870 _bfd_elf_merge_object_attributes result.
871 * elf64-ppc.c (ppc64_elf_merge_private_bfd_data): Return
872 _bfd_elf_merge_object_attributes result.
874 2018-07-03 Alan Modra <amodra@gmail.com>
877 * elflink.c (_bfd_elf_fix_symbol_flags): Hide dynamic symbols
878 in discarded sections.
880 2018-07-02 Maciej W. Rozycki <macro@mips.com>
882 * elfxx-mips.c (_bfd_mips_elf_create_dynamic_sections): Set
883 `mark' for symbols created from `mips_elf_dynsym_rtproc_names'
886 2018-07-02 Maciej W. Rozycki <macro@mips.com>
888 * elf64-mips.c (micromips_elf64_howto_table_rel): Add
889 R_MICROMIPS_HI0_LO16, R_MICROMIPS_TLS_GD, R_MICROMIPS_TLS_LDM,
890 R_MICROMIPS_TLS_DTPREL_HI16, R_MICROMIPS_TLS_DTPREL_LO16,
891 R_MICROMIPS_TLS_GOTTPREL, R_MICROMIPS_TLS_TPREL_HI16,
892 R_MICROMIPS_TLS_TPREL_LO16, R_MICROMIPS_GPREL7_S2 and
893 R_MICROMIPS_PC23_S2 relocation entries.
894 (micromips_elf64_howto_table_rela): Likewise.
895 (micromips_reloc_map): Likewise.
896 * elfn32-mips.c (elf_micromips_howto_table_rel): Likewise.
897 (elf_micromips_howto_table_rela): Likewise.
898 (micromips_reloc_map): Likewise.
900 2018-07-02 H.J. Lu <hongjiu.lu@intel.com>
903 * elf64-x86-64.c (elf_x86_64_relocate_section): Clear the
904 R_X86_64_converted_reloc_bit bit.
906 2018-07-02 Jeff Muizelaar <jrmuizel@gmail.com>
907 Tom Tromey <tom@tromey.com>
911 * mach-o.c (bfd_mach_o_fat_close_and_cleanup): New function.
912 (bfd_mach_o_close_and_cleanup): Redefine.
913 * archive.c (_bfd_unlink_from_archive_parent): New function,
915 (_bfd_archive_close_and_cleanup): ..here.
916 (bfd_generic_archive_p): Do not clear archive's format.
917 * libbfd-in.h (_bfd_unlink_from_archive_parent): Declare.
918 * libbfd.h: Regenerate.
920 2018-07-02 Thomas Preud'homme <thomas.preudhomme@arm.com>
922 * archures.c (bfd_mach_arm_5TEJ, bfd_mach_arm_6, bfd_mach_arm_6KZ,
923 bfd_mach_arm_6T2, bfd_mach_arm_6K, bfd_mach_arm_7, bfd_mach_arm_6M,
924 bfd_mach_arm_6SM, bfd_mach_arm_7EM, bfd_mach_arm_8, bfd_mach_arm_8R,
925 bfd_mach_arm_8M_BASE, bfd_mach_arm_8M_MAIN): Define.
926 * bfd-in2.h: Regenerate.
927 * cpu-arm.c (arch_info_struct): Add entries for above new
929 * elf32-arm.c (bfd_arm_get_mach_from_attributes): Add Tag_CPU_arch to
930 bfd_mach_arm mapping logic for pre Armv4 and Armv5TEJ and later
931 architectures. Force assert failure for any new Tag_CPU_arch value.
933 2018-07-02 Thomas Preud'homme <thomas.preudhomme@arm.com>
935 * doc/bfdint.texi: Use command-line consistently when used in a
937 * doc/bfdsumm.texi: Likewise.
939 2018-06-29 Maciej W. Rozycki <macro@mips.com>
941 * elfxx-mips.c (allocate_dynrelocs): Remove extraneous symbol
942 visibility check made for undefined weak symbols.
944 2018-06-26 Nick Clifton <nickc@redhat.com>
946 * po/uk.po: Updated Ukranian translation.
948 2018-06-25 Nick Clifton <nickc@redhat.com>
950 * elfnn-aarch64.c (_bfd_aarch64_erratum_835769_stub_name): Check
951 for malloc returning NULL.
952 (_bfd_aarch64_erratum_843419_fixup): Check for
953 _bfd_aarch64_erratum_835769_stub_name returning NULL.
955 2018-06-24 Nick Clifton <nickc@redhat.com>
957 * po/bfd.pot: Regenerate.
959 2018-06-24 Nick Clifton <nickc@redhat.com>
961 * version.m4: Update version string to 2.31.51.
962 * configure: Regenerate.
964 2018-06-24 Nick Clifton <nickc@redhat.com>
968 2018-06-21 Maciej W. Rozycki <macro@mips.com>
970 * elfxx-mips.c (_bfd_mips_elf_compact_eh_encoding)
971 (_bfd_mips_elf_cant_unwind_opcode): Correct formatting.
973 2018-06-21 Maciej W. Rozycki <macro@mips.com>
975 * elfxx-mips.c (_bfd_mips_post_process_headers): Keep
976 EI_ABIVERSION setting together.
978 2018-06-21 Maciej W. Rozycki <macro@mips.com>
980 * elfxx-mips.c (MIPS_LIBC_ABI_DEFAULT, MIPS_LIBC_ABI_MIPS_PLT)
981 (MIPS_LIBC_ABI_UNIQUE, MIPS_LIBC_ABI_MIPS_O32_FP64)
982 (MIPS_LIBC_ABI_MAX): New enumeration constants.
983 (_bfd_mips_post_process_headers): Use them in place of magic
986 2018-06-21 Jim Wilson <jimw@sifive.com>
988 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Update comment.
989 Use SYMBOL_REFERENCES_LOCAL. Add asserts for h->got.offset.
991 2018-06-21 Alan Modra <amodra@gmail.com>
993 * doc/Makefile.am (AUTOMAKE_OPTIONS): Add "foreign".
994 * doc/Makefile.in: Regenerate.
996 2018-06-20 Renlin Li <renlin.li@arm.com>
998 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Use PG_OFFSET
999 to resolve BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC,
1000 BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC,
1001 BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC,
1002 BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC,
1003 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
1004 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
1005 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
1006 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
1008 2018-06-20 Nick Clifton <nickc@redhat.com>
1011 * opncls.c (get_build_id): Check for a negative or excessive data
1012 size in the build-id note.
1014 2018-06-20 Nick Clifton <nickc@redhat.com>
1017 * mach-o.c (cputype): New function.
1018 (cpusubtype): New function.
1019 (bfd_mach_o_bfd_print_private_data): New function. Dispalys the
1020 values in the MACH-O file header.
1021 (bfd_mach_o_bfd_copy_private_header_data): Copy the cputype and
1022 cpusubtype fields from the input bfd's mach-o header to the output
1024 * mach-o-target.c (bfd_mach_o_bfd_print_private_bfd_data):
1025 Redefine to bfd_mach_o_bfd_print_private_data.
1026 * mach-o.h (bfd_mach_o_bfd_print_private_bfd_data): Prototype.
1028 2018-06-19 Maciej W. Rozycki <macro@mips.com>
1031 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Verify the
1032 `.got.plt' entry referred is in range.
1033 (mips_finish_exec_plt): Correct the range check for `.got.plt'
1034 start. Replace the assertion used for that with a proper error
1037 2018-06-19 Maciej W. Rozycki <macro@mips.com>
1039 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Fix
1042 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
1044 * Makefile.am (AUTOMAKE_OPTIONS): Remove 1.11.
1045 (INCLUDES): Rename to ...
1046 (AM_CPPFLAGS): ... this.
1047 * configure.ac: Remove AC_PREREQ.
1048 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove 1.9, cygnus, add
1049 info-in-builddir no-texinfo.tex.
1050 (info_TEXINFOS): Rename bfd.texinfo to bfd.texi.
1051 * doc/bfd.texinfo: Rename to ...
1052 * doc/bfd.texi: ... this.
1053 * Makefile.in: Re-generate.
1054 * aclocal.m4: Re-generate.
1055 * config.in: Re-generate.
1056 * configure: Re-generate.
1057 * doc/Makefile.in: Re-generate.
1059 2018-06-18 Mephi <mephi42@gmail.com>
1062 * mach-o-x86-64.c (x86_64_howto_table): Add entry for
1063 BFD_RELOC_MACH_O_X86_64_RELOC_TLV.
1064 (bfd_mach_o_x86_64_canonicalize_one_reloc): Handle the new reloc.
1065 (bfd_mach_o_x86_64_swap_reloc_out): Likewise.
1066 * reloc.c (BFD_RELOC_MACH_O_X86_64_TV): New entry.
1067 * bfd-in2.h: Regenerate.
1068 * libbfd.h: Regenerate.
1070 2018-06-14 Faraz Shahbazker <Faraz.Shahbazker@mips.com>
1072 * elfxx-mips.c (print_mips_ases): Add GINV extension.
1074 2018-06-14 H.J. Lu <hongjiu.lu@intel.com>
1077 * elf.c (_bfd_elf_get_symbol_version_string): Check if the first
1078 symbol version is base version.
1080 2018-06-14 Alan Modra <amodra@gmail.com>
1082 * elf-bfd.h (struct elf_link_hash_table): Add "dynamic_relocs".
1083 * elflink.c (_bfd_elf_init_2_index_sections): Comment fix.
1084 (_bfd_elf_add_dynamic_entry): Set "dynamic_relocs".
1085 (_bfd_elf_link_renumber_dynsyms): Exclude all section symbols when
1086 "dynamic_relocs" is not set.
1087 * elfxx-mips.c (count_section_dynsyms): Likewise.
1089 2018-06-14 Alan Modra <amodra@gmail.com>
1092 * bfdio.c (bfd_seek): Optimize away seeks to current position.
1094 2018-06-13 Scott Egerton <scott.egerton@imgtec.com>
1095 Faraz Shahbazker <Faraz.Shahbazker@mips.com>
1097 * elfxx-mips.c (print_mips_ases): Add CRC.
1099 2018-06-08 H.J. Lu <hongjiu.lu@intel.com>
1102 * elfxx-x86.c (elf_x86_hide_linker_defined): New function.
1103 (_bfd_x86_elf_link_check_relocs): Use it to hide hidden
1104 __bss_start, _end and _edata in shared libraries.
1106 2018-06-07 Alan Modra <amodra@gmail.com>
1108 * elf32-tic6x.c (elf32_tic6x_check_relocs): Reference
1109 __c6xabi_DSBT_BASE explicitly for R_C6000_SBR_* relocs.
1111 2018-06-05 Alan Modra <amodra@gmail.com>
1113 * bfd.c (struct bfd): Update comment on "where" usage.
1114 * bfdio.c (bfd_bwrite, bfd_stat): Use and update "iovec",
1115 "iostream", and "where" from containing archive file. Return
1116 error on NULL iovec.
1117 (bfd_bread): Similarly, and return error attempted out of
1118 bounds archive element access.
1119 (bfd_tell, bfd_flush): Use and update "iovec", "iostream", and
1120 "where" from containing archive file.
1121 (bfd_seek): Likewise. Return error on NULL iovec. Don't
1122 attempt to optimize away seeks. Don't paper over errors by
1124 (bfd_get_mtime): Call bfd_stat rather than iovec->bstat.
1125 (bfd_get_size): Likewise.
1126 (bfd_mmap): Operate on and use iovec of containing archive
1127 file. Return error on NULL iovec.
1128 * cache.c (bfd_cache_lookup_worker): Abort if working on
1129 archive element bfd.
1130 (cache_bread_1): Delete bfd parameter, add FILE* parameter.
1131 Don't ignore zero byte reads.
1132 (cache_bread): Look up FILE* in cache here. Error on NULL
1134 (cache_bwrite): Rename "where" to "from".
1135 (cache_bmmap): Don't handle archive elements.
1136 * coffcode.h (coff_slurp_line_table): Exit early on zero
1138 * bfd-in2.h: Regenerate.
1140 2018-06-05 Alan Modra <amodra@gmail.com>
1143 * plugin.c (bfd_plugin_open_input): Allow for possibility of
1144 nested archives. Open file again for plugin.
1145 (try_claim): Don't save and restore file position. Close file
1147 * sysdep.h (O_BINARY): Define.
1149 2018-06-04 Max Filippov <jcmvbkbc@gmail.com>
1151 * elf32-xtensa.c (xtensa_read_table_entries): Make global.
1152 (compute_fill_extra_space): Drop declaration. Rename function to
1153 xtensa_compute_fill_extra_space.
1154 (compute_ebb_actions, remove_dead_literal): Update references to
1155 compute_fill_extra_space.
1157 2018-06-04 Volodymyr Arbatov <arbatov@cadence.com>
1159 * elf32-xtensa.c (elf32xtensa_separate_props): New global
1161 (xtensa_add_names): New function.
1162 (xtensa_property_section_name): Add new parameter
1163 separate_sections, use it to choose property section name.
1164 (xtensa_get_separate_property_section): New function.
1165 (xtensa_get_property_section): Invoke
1166 xtensa_get_separate_property_section to get individual property
1167 section if it exists, common property section otherwise.
1168 (xtensa_make_property_section): Pass elf32xtensa_separate_props
1169 to xtensa_property_section_name.
1171 2018-06-04 H.J. Lu <hongjiu.lu@intel.com>
1174 * bfd-in.h: Include "diagnostics.h".
1175 * bfd-in2.h: Regenerated.
1176 * elf32-arm.c (elf32_arm_nabi_write_core_note): Use
1177 DIAGNOSTIC_PUSH, DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION and
1178 DIAGNOSTIC_POP to silence GCC 8.1 warnings with
1179 -Wstringop-truncation.
1180 * elf32-ppc.c (ppc_elf_write_core_note): Likewse.
1181 * elf32-s390.c (elf_s390_write_core_note): Likewse.
1182 * elf64-ppc.c (ppc64_elf_write_core_note): Likewse.
1183 * elf64-s390.c (elf_s390_write_core_note): Likewse.
1184 * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewse.
1186 2018-06-03 Jim Wilson <jimw@sifive.com>
1189 * elfnn-riscv.c (riscv_elf_relocate_section) <R_RISCV_CALL>: Check
1190 for and handle an undefined weak with no PLT.
1193 * elfnn-riscv.c (riscv_relax_delete_bytes): Add versioned_hidden check
1194 to code that ignores duplicate symbols.
1196 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
1198 * version.m4: Bump version to 2.30.52
1199 * configure: Regenerated.
1201 2018-06-01 Alan Modra <amodra@gmail.com>
1203 * bfd.c (_bfd_error_handler): Arrange for this function to be
1204 declared in bfd-in2.h.
1205 * libbfd-in.h (_bfd_error_handler): Don't declare.
1206 * libbfd.h: Regenerate.
1207 * bfd-in2.h: Regenerate.
1209 2018-05-30 Amaan Cheval <amaan.cheval@gmail.com>
1211 * config.bfd (x86_64-*-*): Add pei-x86-64 target to x86_64-*-rtems*
1212 This is needed to generate UEFI application image files from ELFs.
1214 2018-05-28 H.J. Lu <hongjiu.lu@intel.com>
1216 * elf32-i386.c (elf_i386_lazy_plt): Add plt_tlsdesc_entry,
1217 plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset,
1218 plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and
1219 plt_tlsdesc_got2_insn_end for TLSDESC entry.
1220 (elf_i386_lazy_ibt_plt): Likewise.
1221 (elf_i386_nacl_plt): Likewise.
1222 * elf64-x86-64.c (tlsdesc_plt_entry): Moved and renamed to ...
1223 (elf_x86_64_tlsdesc_plt_entry): This.
1224 (elf_x86_64_lazy_plt): Add plt_tlsdesc_entry,
1225 plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset,
1226 plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and
1227 plt_tlsdesc_got2_insn_end for TLSDESC entry.
1228 (elf_x86_64_lazy_bnd_plt): Likewise.
1229 (elf_x86_64_lazy_ibt_plt): Likewise.
1230 (elf_x32_lazy_ibt_plt): Likewise.
1231 (elf_x86_64_nacl_plt): Likewise.
1232 (elf_x86_64_finish_dynamic_sections): Use plt_tlsdesc_entry,
1233 plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset,
1234 plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and
1235 plt_tlsdesc_got2_insn_end to update TLSDESC entry.
1236 * elfxx-x86.h (elf_x86_lazy_plt_layout): Update comments.
1237 Add plt_tlsdesc_entry, plt_tlsdesc_entry_size,
1238 plt_tlsdesc_got1_offset, plt_tlsdesc_got2_offset,
1239 plt_tlsdesc_got1_insn_end and plt_tlsdesc_got2_insn_end.
1240 (elf_x86_non_lazy_plt_layout): Update comments.
1241 (elf_x86_plt_layout): Likewise.
1243 2018-05-28 H.J. Lu <hongjiu.lu@intel.com>
1246 * elf-s390-common.c (elf_s390_add_symbol_hook): Removed.
1247 * elf32-arc.c (elf_arc_add_symbol_hook): Likewise.
1248 (elf_backend_add_symbol_hook): Likewise.
1249 * elf32-m68k.c (elf_m68k_add_symbol_hook): Likewise.
1250 (elf_backend_add_symbol_hook): Likewise.
1251 * elf32-s390.c (elf_backend_add_symbol_hook): Likewise.
1252 * elf32-sparc.c (elf32_sparc_add_symbol_hook): Likewise.
1253 (elf_backend_add_symbol_hook): Likewise.
1254 * elf64-s390.c (elf_backend_add_symbol_hook): Likewise.
1255 * elfxx-aarch64.c (_bfd_aarch64_elf_add_symbol_hook): Likewise.
1256 * elfxx-aarch64.h (_bfd_aarch64_elf_add_symbol_hook): Likewise.
1257 (elf_backend_add_symbol_hook): Likewise.
1258 * elf32-arm.c (elf32_arm_add_symbol_hook): Remove STT_GNU_IFUNC
1260 * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise.
1261 * elf64-ppc.c (ppc64_elf_add_symbol_hook): Likewise.
1262 * elf64-sparc.c (elf64_sparc_add_symbol_hook): Likewise.
1263 * elflink.c (elf_link_add_object_symbols): Set
1264 elf_gnu_symbol_ifunc for STT_GNU_IFUNC symbols.
1266 2018-05-26 H.J. Lu <hongjiu.lu@intel.com>
1269 * elf-bfd.h (_bfd_elf_link_hide_sym_by_version): New.
1270 * elflink.c (_bfd_elf_link_hide_versioned_symbol): New function.
1271 Extracted from _bfd_elf_link_assign_sym_version.
1272 (_bfd_elf_link_hide_sym_by_version): New function.
1273 (_bfd_elf_link_assign_sym_version): Use
1274 _bfd_elf_link_hide_versioned_symbol.
1275 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Call
1276 _bfd_elf_link_hide_sym_by_version instead of
1277 bfd_hide_sym_by_version. Don't check unversioned symbol.
1279 2018-05-25 Alan Modra <amodra@gmail.com>
1281 * Makefile.in: Regenerate.
1282 * po/SRC-POTFILES.in: Regenerate.
1284 2018-05-25 Alan Modra <amodra@gmail.com>
1286 * configure.ac (bfd_cv_hidden): Run test with -Werror in CFLAGS.
1287 * configure: Regenerate.
1289 2018-05-23 H.J. Lu <hongjiu.lu@intel.com>
1291 * elf64-ppc.c (ppc64_elf_write_core_note): Add ATTRIBUTE_NONSTRING
1294 2018-05-22 Alan Modra <amodra@gmail.com>
1297 * elf32-hppa.c (hppa_get_stub_entry): Return NULL when link_sec
1299 (elf32_hppa_size_stubs): Only create stubs for load, alloc, code
1301 (final_link_relocate): Revert last change.
1303 2018-05-22 Alan Modra <amodra@gmail.com>
1306 * elf32-hppa.c (final_link_relocate): Don't look for plt call
1307 stubs in non-alloc sections.
1309 2018-05-21 H.J. Lu <hongjiu.lu@intel.com>
1312 * aout-target.h (MY_bfd_link_hide_symbol): New.
1313 * aout-tic30.c (MY_bfd_link_hide_symbol): Likewise.
1314 * binary.c (binary_bfd_link_hide_symbol): Likewise.
1315 * coff-alpha.c (_bfd_ecoff_bfd_link_hide_symbol): Likewise.
1316 * coff-mips.c (_bfd_ecoff_bfd_link_hide_symbol): Likewise.
1317 * coff-rs6000.c (_bfd_xcoff_bfd_link_hide_symbol): Likewise.
1318 * coffcode.h (coff_bfd_link_hide_symbol): Likewise.
1319 * elf-bfd.h (_bfd_elf_link_hide_symbol): Likewise.
1320 * elfxx-target.h (bfd_elfNN_bfd_link_hide_symbol): Likewise.
1321 * i386msdos.c (msdos_bfd_link_hide_symbol): Likewise.
1322 * ihex.c (ihex_bfd_link_hide_symbol): Likewise.
1323 * libbfd-in.h (_bfd_nolink_bfd_link_hide_symbol): Likewise.
1324 * linker.c (_bfd_generic_link_hide_symbol): Likewise.
1325 (bfd_link_hide_symbol): Likewise.
1326 * mach-o-target.c (bfd_mach_o_bfd_link_hide_symbol): Likewise.
1327 * mmo.c (mmo_bfd_link_hide_symbol): Likewise.
1328 * pef.c (bfd_pef_bfd_link_hide_symbol): Likewise.
1329 * plugin.c (bfd_plugin_bfd_link_hide_symbol): Likewise.
1330 * ppcboot.c (ppcboot_bfd_link_hide_symbol): Likewise.
1331 * som.c (som_bfd_link_hide_symbol): Likewise.
1332 * srec.c (srec_bfd_link_hide_symbol): Likewise.
1333 * tekhex.c (tekhex_bfd_link_hide_symbol): Likewise.
1334 * vms-alpha.c (vms_bfd_link_hide_symbol): Likewise.
1335 (alpha_vms_bfd_link_hide_symbol): Likewise.
1336 * xsym.c (bfd_sym_bfd_link_hide_symbol): Likewise.
1337 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
1338 _bfd_generic_link_hide_symbol.
1339 (rs6000_xcoff64_aix_vec): Likewise.
1340 * elflink.c (bfd_elf_record_link_assignment): Don't make forced
1341 local symbol dynamic.
1342 (_bfd_elf_link_hide_symbol): New function.
1343 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
1344 check root.ldscript_def.
1345 * targets.c (bfd_target): Add _bfd_link_hide_symbol.
1346 (BFD_JUMP_TABLE_LINK): Add NAME##_bfd_link_hide_symbol.
1347 * bfd-in2.h: Regenerated.
1348 * libbfd.h: Likewise.
1350 2018-05-21 H.J. Lu <hongjiu.lu@intel.com>
1353 * elf.c (setup_group): Mark section in a section group with
1356 2018-05-18 H.J. Lu <hongjiu.lu@intel.com>
1359 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
1360 set eh->local_ref to 1 if a symbol is versioned and there is a
1363 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
1365 * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Handle
1368 2018-05-18 Jim Wilson <jimw@sifive.com>
1370 * elfnn-riscv.c (allocate_dynrelocs): Discard dynamic relocations if
1371 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1372 (riscv_elf_relocate_section): Don't generate dynamic relocation if
1373 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1374 (riscv_elf_finish_dynamic_symbol): Likewise.
1376 2018-05-18 John Darrington <john@darrington.wattle.id.au>
1378 * Makefile.am: Add s12z files.
1379 * Makefile.in: Regenerate.
1380 * archures.c: Add bfd_s12z_arch.
1381 * bfd-in.h: Add exports of bfd_putb24 and bfd_putl24.
1382 * bfd-in2.h: Regenerate.
1383 * config.bfd: Add s12z target.
1384 * configure.ac: Add s12z target.
1385 * configure: Regenerate.
1386 * cpu-s12z.c: New file.
1387 * elf32-s12z.c: New file.
1388 * libbfd.c (bfd_putb24): New function.
1389 (bfd_putl24): New function.
1390 * libbfd.h: Regenerate.
1391 * reloc.c: Add s12z relocations.
1392 (bfd_get_reloc_size): Handle size 5 relocs.
1393 * targets.c: Add s12z_elf32_vec.
1395 2018-05-18 H.J. Lu <hongjiu.lu@intel.com>
1398 * elf32-i386.c (elf_i386_relocate_section): Handle R_386_GOT32X
1400 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
1401 set eh->local_ref to 1 for linker defined symbols.
1403 2018-05-18 Alan Modra <amodra@gmail.com>
1406 * elf.c (setup_group): Formatting. Check that SHT_GROUP entries
1407 don't point at other SHT_GROUP sections. Set shdr corresponding
1408 to invalid entry, to NULL rather than section 0. Identify
1409 SHT_GROUP section index when reporting an error. Cope with NULL
1412 2018-05-18 Alan Modra <amodra@gmail.com>
1414 * libbfd-in.h (ATTRIBUTE_HIDDEN): Define and use throughout.
1415 * configure.ac (HAVE_HIDDEN): Check compiler support for hidden
1417 * libbfd.h: Regenerate.
1418 * configure: Regenerate.
1419 * config.in: Regenerate.
1421 2018-05-18 Alan Modra <amodra@gmail.com>
1423 * libbfd-in.h: Add include guard.
1424 * libcoff-in.h: Likewise.
1425 * doc/Makefile.am (libbfd.h, libcoff.h): Append another #endif.
1426 * doc/Makefile.in: Regenerate.
1427 * libbfd.h: Regenerate.
1428 * libcoff.h: Regenerate.
1430 2018-05-16 Maciej W. Rozycki <macro@mips.com>
1432 * elf32-nds32.c (nds32_convert_32_to_16): Preset `insn_type'.
1434 2018-05-16 Alan Modra <amodra@gmail.com>
1437 * format.c (struct bfd_preserve): Add section_id.
1438 (bfd_preserve_save, bfd_preserve_restore): Save and restore
1440 (bfd_reinit): Set _bfd_section_id.
1441 (bfd_check_format_matches): Put all matches of any priority into
1442 matching_vector. Save initial section id and start each attempted
1443 match at that section id.
1444 * libbfd-in.h (_bfd_section_id): Declare.
1445 * section.c (_bfd_section_id): Rename from section_id and make
1446 global. Adjust uses.
1447 (bfd_get_next_section_id): Delete.
1448 * elf64-ppc.c (ppc64_elf_setup_section_lists): Replace use of
1449 bfd_get_section_id with _bfd_section_id.
1450 * libbfd.h: Regenerate.
1451 * bfd-in2.h: Regenerate.
1453 2018-05-15 Christophe Guillon <christophe.guillon@st.com>
1455 * coffcode.h (coff_bigobj_swap_aux_in): Make sure that all fields
1456 of the aux structure are initialised.
1458 2018-05-15 Francois H. Theron <francois.theron@netronome.com>
1460 * targets.c: Wrap nfp_elf64_vec in BFD64 ifdef.
1462 2018-05-15 Nick Clifton <nickc@redhat.com>
1464 * po/pt.po: New Portuguese translation.
1465 * configure.ac (ALL_LINGUAS): Add pt.
1466 * configure: Regenerate.
1468 2018-05-14 H.J. Lu <hongjiu.lu@intel.com>
1471 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Don't issue
1472 an error on IFUNC pointer defined in PDE.
1473 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Call
1474 _bfd_x86_elf_link_fixup_ifunc_symbol.
1475 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
1476 * elfxx-x86.c (_bfd_x86_elf_link_fixup_ifunc_symbol): New
1478 * elfxx-x86.h (_bfd_x86_elf_link_fixup_ifunc_symbol): New.
1480 2018-05-14 H.J. Lu <hongjiu.lu@intel.com>
1483 * elfxx-x86.c (elf_x86_linker_defined): New function.
1484 (_bfd_x86_elf_link_check_relocs): Use it to mark __bss_start,
1485 _end and _edata locally defined within executables.
1487 2018-05-12 Alan Modra <amodra@gmail.com>
1490 * elf.c (rewrite_elf_program_header): Use segment_mark only for
1491 PT_LOAD headers. Delete first_matching_lma and first_suggested_lma.
1492 Instead make matching_lma and suggested_lma pointers to the
1493 sections. Align section vma and lma calculated from segment.
1494 Don't clear includes_phdrs or includes_filehdr based on p_paddr
1495 test. Try to handle alignment padding before first section by
1496 adjusting new segment lma down. Adjust PT_PHDR map p_paddr.
1498 2018-05-09 Dimitar Dimitrov <dimitar@dinux.eu>
1500 * elf32-pru.c (pru_elf32_do_ldi32_relocate): Make LDI32 relocation
1501 conformant to TI ABI.
1502 (pru_elf32_relax_section): Likewise.
1503 (pru_elf_relax_delete_bytes): Fix offsets for new LDI32 code.
1504 * elf32-pru.c (pru_elf32_do_ldi32_relocate): Ignore addend.
1505 (pru_elf32_pmem_relocate): Trap - should not get here.
1506 (pru_elf32_relocate_section): Add support for REL relocations.
1507 (elf_info_to_howto_rel): Enable REL.
1508 (elf_backend_may_use_rel_p): Likewise.
1509 (elf_backend_may_use_rela_p): Likewise.
1510 (elf_backend_default_use_rela_p): Likewise.
1512 2018-05-09 Alan Modra <amodra@gmail.com>
1515 * peXXigen.c (pe_print_edata): Correct minimum size.
1517 2018-05-09 Alan Modra <amodra@gmail.com>
1520 * peXXigen.c (pe_print_idata): Bound check hint_addr.
1522 2018-05-08 Nick Clifton <nickc@redhat.com>
1525 * elf.c (bfd_elf_get_str_section): Check for an excessively large
1527 * elf-attrs.c (_bfd_elf_parse_attributes): Issue an error if the
1528 attribute section is larger than the size of the file.
1530 2018-05-07 Alan Modra <amodra@gmail.com>
1532 * cofflink.c (_bfd_coff_link_input_bfd): Use memcmp rather than
1533 strncmp when checking for ".bf" special symbol.
1534 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Make pe_required_section_flags
1535 section name a char array, remove sentinal known_sections entry,
1536 and adjust loop over known_sections to suit. Use memcmp rather
1539 2018-05-04 Alan Modra <amodra@gmail.com>
1541 * elf-linux-core.h (struct elf_external_linux_prpsinfo32_ugid32),
1542 (struct elf_external_linux_prpsinfo32_ugid16),
1543 (struct elf_external_linux_prpsinfo64_ugid32),
1544 (struct elf_external_linux_prpsinfo64_ugid16): Add ATTRIBUTE_NONSTRING
1545 to pr_fname and pr_psargs fields. Remove GCC diagnostic pragmas.
1547 * elf.c (elfcore_write_prpsinfo): ..here. Indent nested preprocessor
1549 * elf32-arm.c (elf32_arm_nabi_write_core_note): Add ATTRIBUTE_NONSTRING
1551 * elf32-ppc.c (ppc_elf_write_core_note): Likewise.
1552 * elf32-s390.c (elf_s390_write_core_note): Likewise.
1553 * elf64-s390.c (elf_s390_write_core_note): Likewise.
1554 * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewise.
1555 * elf64-x86-64.c (elf_x86_64_write_core_note): Add GCC diagnostic
1557 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Use strnlen to avoid
1558 false positive gcc-8 warning.
1559 * cofflink.c (_bfd_coff_link_input_bfd): Likewise.
1561 2018-05-04 Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
1563 * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Fix the order
1564 of arguments when warning about different long double types.
1566 2018-05-03 Simon Atanasyan <simon@atanasyan.com>
1568 * elf32-mips.c: (elf32_mips_fixup_symbol): New function.
1569 (elf_backend_fixup_symbol): New macro.
1570 * elfxx-mips.c: (mips_elf_output_extsym): Discard _gp_disp
1572 (_bfd_mips_elf_finish_dynamic_symbol): Likewise.
1574 2018-04-30 Francois H. Theron <francois.theron@netronome.com>
1576 * Makefile.am: Added NFP files to build.
1577 * archures.c: Added bfd_arch_nfp
1578 * config.bfd: Added NFP support.
1579 * configure.ac: Added NFP support.
1580 * cpu-nfp.c: New, for NFP support.
1581 * elf-bfd.h: Added elf_section_info()
1582 * elf64-nfp.c: New, for NFP support.
1583 * po/SRC-POTFILES.in: Added NFP source files.
1584 * targets.c: Added nfp_elf64_vec
1585 * bfd-in2.h: Regenerate.
1586 * Makefile.in: Regenerate.
1587 * configure: Regenerate.
1589 2018-04-27 Alan Modra <amodra@gmail.com>
1591 * bfd-in2.h: Regenerate.
1592 * libbfd.h: Regenerate.
1594 2018-04-27 Alan Modra <amodra@gmail.com>
1598 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't drop plt
1600 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Comment fixes.
1602 2018-04-26 Pedro Alves <palves@redhat.com>
1604 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't consider
1605 ifunc and non-ifunc symbols duplicates.
1607 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1608 Mickaël Guêné <mickael.guene@st.com>
1610 * elf32-arm.c (elf32_arm_fdpic_thumb_plt_entry): New.
1611 (elf32_arm_plt_needs_thumb_stub_p): Handle thumb-only case.
1612 (elf32_arm_populate_plt_entry): Likewise.
1613 (elf32_arm_output_plt_map_1): Likewise.
1614 (elf32_arm_output_arch_local_syms): Likewise.
1616 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1617 Mickaël Guêné <mickael.guene@st.com>
1619 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Handle
1620 _GLOBAL_OFFSET_TABLE_ in FDPIC mode.
1622 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1623 Mickaël Guêné <mickael.guene@st.com>
1625 * elf32-arm.c (bfd_elf32_arm_set_target_params): Handle FDPIC case
1628 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1629 Mickaël Guêné <mickael.guene@st.com>
1631 * elf32-arm.c (DEFAULT_STACK_SIZE): New.
1632 (elf32_arm_always_size_sections): Create stack segment.
1634 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1635 Mickaël Guêné <mickael.guene@st.com>
1637 * bfd-in2.h (BFD_RELOC_ARM_TLS_GD32_FDPIC)
1638 (BFD_RELOC_ARM_TLS_LDM32_FDPIC, BFD_RELOC_ARM_TLS_IE32_FDPIC): New
1640 * elf32-arm.c (elf32_arm_howto_table_2): Add R_ARM_TLS_GD32_FDPIC,
1641 R_ARM_TLS_LDM32_FDPIC, R_ARM_TLS_IE32_FDPIC relocations.
1642 (elf32_arm_reloc_map): Add R_ARM_TLS_GD32_FDPIC,
1643 R_ARM_TLS_LDM32_FDPIC, R_ARM_TLS_IE32_FDPIC.
1644 (struct elf32_arm_link_hash_table): Update comment.
1645 (elf32_arm_final_link_relocate): Handle TLS FDPIC relocations.
1646 (IS_ARM_TLS_RELOC): Likewise.
1647 (elf32_arm_check_relocs): Likewise.
1648 (allocate_dynrelocs_for_symbol): Likewise.
1649 (elf32_arm_size_dynamic_sections): Update comment.
1650 * reloc.c: Add BFD_RELOC_ARM_TLS_GD32_FDPIC,
1651 BFD_RELOC_ARM_TLS_LDM32_FDPIC, BFD_RELOC_ARM_TLS_IE32_FDPIC.
1653 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1654 Mickaël Guêné <mickael.guene@st.com>
1656 * elf32-arm.c (elf32_arm_fdpic_plt_entry): New.
1657 (elf32_arm_create_dynamic_sections): Handle FDPIC.
1658 (elf32_arm_allocate_plt_entry): Likewise.
1659 (elf32_arm_populate_plt_entry): Likewise.
1660 (elf32_arm_output_plt_map_1): Likewise.
1662 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1663 Mickaël Guêné <mickael.guene@st.com>
1665 * elf32-arm.c (struct fdpic_local): New.
1666 (elf_arm_obj_tdata): Add local_fdpic_cnts field.
1667 (elf32_arm_local_fdpic_cnts): New.
1668 (struct fdpic_global): New.
1669 (elf32_arm_link_hash_entry): Add fdpic_cnts field.
1670 (elf32_arm_link_hash_table): Add srofixup field.
1671 (arm_elf_add_rofixup): New.
1672 (arm_elf_fill_funcdesc): New.
1673 (elf32_arm_link_hash_newfunc): Handle fdpic_cnts.
1674 (elf32_arm_allocate_local_sym_info): Likewise.
1675 (create_got_section): Create .rofixup section.
1676 (elf32_arm_copy_indirect_symbol): Handle fdpic_cnts.
1677 (bfd_elf32_arm_set_target_params): Handle FDPIC.
1678 (elf32_arm_final_link_relocate): Likewise.
1679 (elf32_arm_check_relocs): Likewise.
1680 (allocate_dynrelocs_for_symbol): Likewise.
1681 (elf32_arm_size_dynamic_sections): Likewise.
1682 (elf32_arm_finish_dynamic_sections): Likewise.
1683 (elf32_arm_output_arch_local_syms): Likewise.
1684 (elf32_arm_fdpic_omit_section_dynsym): New.
1686 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1687 Mickaël Guêné <mickael.guene@st.com>
1689 * bfd-in2.c (BFD_RELOC_ARM_GOTFUNCDESC)
1690 (BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC)
1691 (BFD_RELOC_ARM_FUNCDESC_VALUE): New.
1692 * elf32-arm.c (elf32_arm_howto_table_2): Add R_ARM_GOTFUNCDESC,
1693 R_ARM_GOTOFFFUNCDESC, R_ARM_FUNCDESC, R_ARM_FUNCDESC_VALUE.
1694 (elf32_arm_howto_from_type): Take new members of
1695 elf32_arm_howto_table_2 into account.
1696 (elf32_arm_reloc_map): Add BFD_RELOC_ARM_GOTFUNCDESC,
1697 BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC,
1698 BFD_RELOC_ARM_FUNCDESC_VALUE.
1699 * reloc.c: Add BFD_RELOC_ARM_GOTFUNCDESC,
1700 BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC,
1701 BFD_RELOC_ARM_FUNCDESC_VALUE.
1703 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1704 Mickaël Guêné <mickael.guene@st.com>
1706 * elf32-arm.c (elf32_arm_print_private_bfd_data): Support
1707 EF_ARM_PIC and ELFOSABI_ARM_FDPIC.
1708 (elf32_arm_post_process_headers): Support ELFOSABI_ARM_FDPIC.
1709 (ELF_OSABI): Define to ELFOSABI_ARM_FDPIC.
1711 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1712 Mickaël Guêné <mickael.guene@st.com>
1714 * config.bfd (arm*-*-linux-*): Add arm_elf32_fdpic_be_vec and
1715 arm_elf32_fdpic_le_vec to targ_selvecs. Accept
1716 arm*-*-uclinuxfdpiceabi.
1717 * configure.ac: Add support for arm_elf32_fdpic_be_vec and
1718 arm_elf32_fdpic_le_vec.
1719 * configure: Regenerate.
1720 * elf32-arm.c (struct elf32_arm_link_hash_table): Add fdpic_p.
1721 (elf32_arm_link_hash_table_create): Initialize fdpic_p.
1722 (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME, TARGET_BIG_SYM)
1723 (TARGET_BIG_NAME, elf_match_priority): Define for FDPIC targets.
1724 (elf32_arm_fdpic_link_hash_table_create): New.
1725 * targets.c (_bfd_target_vector): Add arm_elf32_fdpic_be_vec and
1726 arm_elf32_fdpic_le_vec.
1728 2018-04-25 Alan Modra <amodra@gmail.com>
1730 * elf-linux-core.h: Disable gcc-8 string truncation warning.
1731 * elf.c (elfcore_write_prpsinfo): Likewise.
1733 2018-04-25 Alan Modra <amodra@gmail.com>
1735 * Makefile.am: Remove arm-aout and arm-coff support.
1736 * config.bfd: Likewise.
1737 * configure.ac: Likewise.
1738 * targets.c: Likewise.
1739 * aout-arm.c: Delete.
1740 * armnetbsd.c: Delete.
1742 * Makefile.in: Regenerate.
1743 * configure: Regenerate.
1744 * po/SRC-POTFILES.in: Regenerate.
1746 2018-04-24 Nick Clifton <nickc@redhat.com>
1749 * elf.c (ignore_section_sym): Check for the output_section pointer
1750 being NULL before dereferencing it.
1753 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Check for
1754 a negative PE_DEBUG_DATA size before iterating over the debug data.
1756 2018-04-23 Alan Modra <amodra@gmail.com>
1758 * elf-linux-core.h: Revert last change.
1761 2018-04-23 Nick Clifton <nickc@redhat.com>
1764 * aoutx.h (aout_get_external_symbols): Allocate an extra byte at
1765 the end of the string table, and zero it.
1767 2018-04-23 Alan Modra <amodra@gmail.com>
1769 * elf-linux-core.h (swap_linux_prpsinfo32_ugid32_out): Disable
1770 gcc-8 string truncation warning.
1771 (swap_linux_prpsinfo32_ugid16_out): Likewise.
1772 (swap_linux_prpsinfo64_ugid32_out): Likewise.
1773 (swap_linux_prpsinfo64_ugid16_out): Likewise.
1774 * elf.c (elfcore_write_prpsinfo): Likewise.
1776 2018-04-23 Nick Clifton <nickc@redhat.com>
1779 * aoutx.h (aout_get_external_symbols): Allocate an extra byte at
1780 the end of the string table, and zero it.
1782 2018-04-20 Alan Modra <amodra@gmail.com>
1785 * elf32-hppa.c (got_relocs_needed): Add extra param to special
1786 case both dtprel and tprel relocs.
1787 (allocate_dynrelocs): Adjust conditions for got relocs.
1788 (elf32_hppa_relocate_section): Likewise for local sym got relocs.
1789 Emit dynamic relocs on TLS GOT entries for shared libraries,
1790 not when pic. Omit dynamic reloc on dtprel entry when local,
1791 and on tprel entry when local and executable.
1793 2018-04-19 Alan Modra <amodra@gmail.com>
1796 * elf32-hppa.c (elf32_hppa_size_stubs): Init "destination" to -1.
1797 (hppa_type_of_stub): Don't return a long branch stub for
1798 symbols other than those defined statically.
1800 2018-04-19 Alan Modra <amodra@gmail.com>
1802 * Makefile.am: Revert 2018-04-18 coff-mips changes.
1803 * config.bfd: Add back mips_ecoff_le_vec and mips_ecoff_be_vec
1804 to selvecs for mips targets change 2018-04-18.
1805 * configure.ac: Reinstate mips_ecoff_le_vec, mips_ecoff_be_vec
1806 and mips_ecoff_bele_vec.
1807 * targets.c: Likewise.
1808 * coff-mips.c: Resurrect.
1809 * Makefile.in: Regenerate.
1810 * configure: Regenerate.
1811 * po/SRC-POTFILES.in: Regenerate.
1813 2018-04-18 Alan Modra <amodra@gmail.com>
1815 * Makefile.am: Remove mips aout and coff support.
1816 * config.bfd: Likewise.
1817 * configure.ac: Likewise.
1818 * targets.c: Likewise.
1819 * coff-mips.c: Delete
1822 * pei-mips.c: Delete
1823 * Makefile.in: Regenerate.
1824 * configure: Regenerate.
1825 * po/SRC-POTFILES.in: Regenerate.
1827 2018-04-17 H.J. Lu <hongjiu.lu@intel.com>
1829 * elf32-i386.c (elf32_bed): Define before including
1831 * elf64-x86-64.c (elf64_bed): Define before including
1833 (elf32_bed): Define before including "elf32-target.h".
1835 2018-04-17 H.J. Lu <hongjiu.lu@intel.com>
1838 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Use a
1839 normal input file with compatible relocation.
1841 2018-04-18 Alan Modra <amodra@gmail.com>
1843 * Makefile.am: Remove support for assorted i386 aout and coff targets.
1844 * config.bfd: Likewise.
1845 * configure.ac: Likewise.
1846 * doc/bfdint.texi: Likewise.
1847 * targets.c: Likewise.
1848 * freebsd.h: Delete.
1849 * i386dynix.c: Delete.
1850 * i386freebsd.c: Delete.
1851 * i386linux.c: Delete.
1852 * i386mach3.c: Delete.
1853 * i386netbsd.c: Delete.
1854 * i386os9k.c: Delete.
1855 * Makefile.in: Regenerate.
1856 * configure: Regenerate.
1857 * po/SRC-POTFILES.in: Regenerate.
1859 2018-04-17 Andrew Sadek <andrew.sadek.se@gmail.com>
1861 Microblaze Target: PIC data text relative
1863 * bfd/reloc.c (2 new BFD relocations):
1864 BFD_RELOC_MICROBLAZE_64_TEXTPCREL &
1865 BFD_RELOC_MICROBLAZE_64_TEXTPCREL
1866 * bfd/bfd-in2.h: Regenerate
1867 * bfd/libbfd.h: Regenerate
1868 * bfd/elf32-microblaze.c (Handle new relocs): define 'HOWTO' of 3
1869 new relocs and handle them in both relocate and relax functions.
1870 (microblaze_elf_reloc_type_lookup): add mapping between for new
1872 (microblaze_elf_relocate_section): Handle new relocs in case of
1874 (microblaze_elf_relax_section): Handle new relocs for elf relaxation.
1876 2018-04-17 Nick Clifton <nickc@redhat.com>
1879 * aoutx.h (find_nearest_line): Check that the symbol name exists
1880 and is long enough, before attempting to see if it is for a .o
1882 * hash.c (bfd_hash_hash): Add an assertion that the string is not
1884 * linker.c (bfd_link_hash_lookup): Fail if the table or string are
1886 (_bfd_generic_link_add_archive_symbols): Fail if an archive entry
1890 * dwarf2.c (concat_filename): Check for a NULL table pointer.
1892 2018-04-16 Nick Clifton <nickc@redhat.com>
1895 * coffgen.c (coff_pointerize_aux): Check for an out of range
1898 2018-04-16 Alan Modra <amodra@gmail.com>
1900 * Makefile.am: Remove arm-epoc-pe support.
1901 * coff-arm.c: Likewise.
1902 * config.bfd: Likewise.
1903 * configure.ac: Likewise.
1904 * targets.c: Likewise.
1905 * epoc-pe-arm.c: Delete.
1906 * epoc-pei-arm.c: Delete.
1907 * Makefile.in: Regenerate.
1908 * configure: Regenerate.
1909 * po/SRC-POTFILES.in: Regenerate.
1911 2018-04-16 Alan Modra <amodra@gmail.com>
1913 * Makefile.am: Remove sparc-aout and sparc-coff support.
1914 * config.bfd: Likewise.
1915 * configure.ac: Likewise.
1916 * targets.c: Likewise.
1917 * aout-sparcle.c: Delete.
1919 * cf-sparclynx.c: Delete.
1920 * coff-sparc.c: Delete.
1922 * sparclinux.c: Delete.
1923 * sparclynx.c: Delete.
1924 * sparcnetbsd.c: Delete.
1926 * Makefile.in: Regenerate.
1927 * configure: Regenerate.
1928 * po/SRC-POTFILES.in: Regenerate.
1930 2018-04-16 Alan Modra <amodra@gmail.com>
1932 * Makefile.am: Remove m68k-aout and m68k-coff support.
1933 * aoutf1.h: Likewise.
1934 * aoutx.h: Likewise.
1935 * archive.c: Likewise.
1936 * bfd-in.h: Likewise.
1938 * coffcode.h: Likewise.
1939 * coffswap.h: Likewise.
1940 * config.bfd: Likewise.
1941 * configure.ac: Likewise.
1942 * configure.host: Likewise.
1943 * doc/bfd.texinfo: Likewise.
1944 * doc/bfdint.texi: Likewise.
1945 * freebsd.h: Likewise.
1946 * gen-aout.c: Likewise.
1947 * hpux-core.c: Likewise.
1948 * libaout.h: Likewise.
1949 * libbfd-in.h: Likewise.
1950 * pdp11.c: Likewise.
1951 * peicode.h: Likewise.
1952 * riscix.c: Likewise.
1953 * targets.c: Likewise.
1955 * coff-apollo.c: Delete.
1956 * coff-aux.c: Delete.
1957 * coff-m68k.c: Delete.
1958 * coff-svm68k.c: Delete.
1959 * coff-u68k.c: Delete.
1960 * hosts/delta68.h: Delete.
1961 * hosts/hp300bsd.h: Delete.
1962 * hosts/m68kaux.h: Delete.
1963 * hosts/news.h: Delete.
1964 * hp300bsd.c: Delete.
1965 * hp300hpux.c: Delete.
1966 * liboasys.h: Delete.
1967 * m68k4knetbsd.c: Delete.
1968 * m68klinux.c: Delete.
1969 * m68knetbsd.c: Delete.
1971 * versados.c: Delete.
1972 * Makefile.in: Regenerate.
1973 * bfd-in2.h: Regenerate.
1974 * configure: Regenerate.
1975 * libbfd.h: Regenerate.
1976 * po/SRC-POTFILES.in: Regenerate.
1978 2018-04-16 Alan Modra <amodra@gmail.com>
1980 * Makefile.am: Remove sh5 and sh64 support.
1981 * archures.c: Likewise.
1982 * config.bfd: Likewise.
1983 * configure.ac: Likewise.
1984 * cpu-sh.c: Likewise.
1985 * elf32-sh-relocs.h: Likewise.
1986 * elf32-sh.c: Likewise.
1987 * targets.c: Likewise.
1988 * elf32-sh64-com.c: Delete.
1989 * elf32-sh64.c: Delete.
1990 * elf32-sh64.h: Delete.
1991 * elf64-sh64.c: Delete.
1992 * Makefile.in: Regenerate.
1993 * bfd-in2.h: Regenerate.
1994 * configure: Regenerate.
1995 * po/SRC-POTFILES.in: Regenerate.
1997 2018-04-16 Alan Modra <amodra@gmail.com>
1999 * Makefile.am: Remove sh-symbianelf support.
2000 * config.bfd: Likewise.
2001 * configure.ac: Likewise.
2002 * targets.c: Likewise.
2003 * elf32-sh-symbian.c: Delete.
2004 * Makefile.in: Regenerate.
2005 * configure: Regenerate.
2006 * po/SRC-POTFILES.in: Regenerate.
2008 2018-04-16 Alan Modra <amodra@gmail.com>
2010 * Makefile.am: Remove vax-bsd and vax-ultrix support.
2011 * config.bfd: Likewise.
2012 * configure.ac: Likewise.
2013 * targets.c: Likewise.
2015 * Makefile.in: Regenerate.
2016 * configure: Regenerate.
2017 * po/SRC-POTFILES.in: Regenerate.
2019 2018-04-16 Alan Modra <amodra@gmail.com>
2021 * Makefile.am: Remove w65 support.
2022 * archures.c: Likewise.
2023 * coffcode.h: Likewise.
2024 * config.bfd: Likewise.
2025 * configure.ac: Likewise.
2026 * targets.c: Likewise.
2027 * coff-w65.c: Delete.
2028 * cpu-w65.c: Delete.
2029 * Makefile.in: Regenerate.
2030 * bfd-in2.h: Regenerate.
2031 * configure: Regenerate.
2032 * po/SRC-POTFILES.in: Regenerate.
2034 2018-04-16 Alan Modra <amodra@gmail.com>
2036 * Makefile.am: Remove we32k support.
2037 * archures.c: Likewise.
2038 * coffcode.h: Likewise.
2039 * config.bfd: Likewise.
2040 * configure.ac: Likewise.
2041 * targets.c: Likewise.
2042 * coff-we32k.c: Delete.
2043 * cpu-we32k.c: Delete.
2044 * Makefile.in: Regenerate.
2045 * bfd-in2.h: Regenerate.
2046 * configure: Regenerate.
2047 * po/SRC-POTFILES.in: Regenerate.
2049 2018-04-16 Alan Modra <amodra@gmail.com>
2051 * Makefile.am: Remove m88k support.
2052 * aoutx.h: Likewise.
2053 * archures.c: Likewise.
2054 * coffcode.h: Likewise.
2055 * coffswap.h: Likewise.
2056 * config.bfd: Likewise.
2057 * configure.ac: Likewise.
2058 * cpu-ns32k.c: Likewise.
2059 * elf32-nds32.c: Likewise.
2060 * mach-o.c: Likewise.
2061 * netbsd-core.c: Likewise.
2062 * reloc.c: Likewise.
2063 * targets.c: Likewise.
2064 * coff-m88k.c: Delete.
2065 * cpu-m88k.c: Delete.
2066 * elf32-m88k.c: Delete.
2067 * hosts/m88kmach3.h: Delete.
2068 * m88kmach3.c: Delete.
2069 * m88kopenbsd.c: Delete.
2070 * Makefile.in: Regenerate.
2071 * bfd-in2.h: Regenerate.
2072 * configure: Regenerate.
2073 * po/SRC-POTFILES.in: Regenerate.
2075 2018-04-16 Alan Modra <amodra@gmail.com>
2077 * Makefile.am: Remove i370 support.
2078 * archures.c: Likewise.
2079 * config.bfd: Likewise.
2080 * configure.ac: Likewise.
2081 * targets.c: Likewise.
2082 * cpu-i370.c: Delete.
2083 * elf32-i370.c: Delete.
2084 * Makefile.in: Regenerate.
2085 * bfd-in2.h: Regenerate.
2086 * configure: Regenerate.
2087 * po/SRC-POTFILES.in: Regenerate.
2089 2018-04-16 Alan Modra <amodra@gmail.com>
2091 * Makefile.am: Remove h8500 support.
2092 * archures.c: Likewise.
2093 * coffcode.h: Likewise.
2094 * config.bfd: Likewise.
2095 * configure.ac: Likewise.
2096 * targets.c: Likewise.
2097 * coff-h8500.c: Delete.
2098 * cpu-h8500.c: Delete.
2099 * Makefile.in: Regenerate.
2100 * bfd-in2.h: Regenerate.
2101 * configure: Regenerate.
2102 * po/SRC-POTFILES.in: Regenerate.
2104 2018-04-16 Alan Modra <amodra@gmail.com>
2106 * Makefile.am: Remove h8300-coff support.
2107 * coffcode.h: Likewise.
2108 * config.bfd: Likewise.
2109 * configure.ac: Likewise.
2110 * reloc16.c: Likewise.
2111 * targets.c: Likewise.
2112 * coff-h8300.c: Delete.
2113 * Makefile.in: Regenerate.
2114 * configure: Regenerate.
2115 * po/SRC-POTFILES.in: Regenerate.
2117 2018-04-16 Alan Modra <amodra@gmail.com>
2119 * Makefile.am: Remove IEEE 695 support.
2120 * archures.c: Likewise.
2122 * config.bfd: Likewise.
2123 * configure.ac: Likewise.
2124 * doc/bfd.texinfo: Likewise.
2125 * doc/bfdint.texi: Likewise.
2126 * doc/bfdsumm.texi: Likewise.
2127 * section.c: Likewise.
2128 * targets.c: Likewise.
2130 * libieee.h: Delete.
2131 * Makefile.in: Regenerate.
2132 * bfd-in2.h: Regenerate.
2133 * configure: Regenerate.
2134 * po/SRC-POTFILES.in: Regenerate.
2136 2018-04-16 Alan Modra <amodra@gmail.com>
2138 * config.bfd: Remove tandem support.
2140 2018-04-16 Alan Modra <amodra@gmail.com>
2142 * Makefile.am: Remove newsos3 support.
2143 * aoutx.h: Likewise.
2144 * config.bfd: Likewise.
2145 * configure.ac: Likewise.
2146 * targets.c: Likewise.
2147 * newsos3.c: Delete.
2148 * Makefile.in: Regenerate.
2149 * configure: Regenerate.
2150 * po/SRC-POTFILES.in: Regenerate.
2152 2018-04-16 Alan Modra <amodra@gmail.com>
2154 * Makefile.am: Remove netware support.
2155 * bfd-in.h: Likewise.
2157 * config.bfd: Likewise.
2158 * configure.ac: Likewise.
2159 * doc/bfdint.texi: Likewise.
2160 * ecoff.c: Likewise.
2161 * targets.c: Likewise.
2163 * nlm-target.h: Delete.
2165 * nlm32-alpha.c: Delete.
2166 * nlm32-i386.c: Delete.
2167 * nlm32-ppc.c: Delete.
2168 * nlm32-sparc.c: Delete.
2171 * nlmcode.h: Delete.
2172 * nlmswap.h: Delete.
2173 * Makefile.in: Regenerate.
2174 * bfd-in2.h: Regenerate.
2175 * configure: Regenerate.
2176 * po/SRC-POTFILES.in: Regenerate.
2178 2018-04-16 Alan Modra <amodra@gmail.com>
2180 * archures.c: Remove tahoe support.
2181 * config.bfd: Likewise.
2182 * configure.ac: Likewise.
2183 * hosts/tahoe.h: Delete.
2184 * bfd-in2.h: Regenerate.
2185 * configure: Regenerate.
2187 2018-04-14 Alan Modra <amodra@gmail.com>
2189 * elf-bfd.h (struct elf_backend_data): Add relropagesize.
2190 * elfxx-target.h (ELF_RELROPAGESIZE): Provide default and
2192 (elfNN_bed): Init relropagesize.
2193 * bfd.c (bfd_emul_get_commonpagesize): Add boolean param to
2194 select relropagesize.
2195 * elf32-ppc.c (ELF_COMMONPAGESIZE): Define as 0x1000.
2196 (ELF_RELROPAGESIZE): Define as ELF_MAXPAGESIZE.
2197 (ELF_MINPAGESIZE): Don't define.
2198 * elf64-ppc.c (ELF_COMMONPAGESIZE): Define as 0x1000.
2199 (ELF_RELROPAGESIZE): Define as ELF_MAXPAGESIZE.
2200 * bfd-in2.h: Regenerate.
2202 2018-04-14 Alan Modra <amodra@gmail.com>
2204 * elf32-ppc.c (ELF_MAXPAGESIZE, ELF_COMMONPAGESIZE): Don't depend
2205 on __QNXTARGET__ define.
2207 2018-04-14 Alan Modra <amodra@gmail.com>
2209 * config.bfd: Add powerpc-*-lynxos* and powerpc-*-windiss*
2212 2018-04-11 Alan Modra <amodra@gmail.com>
2214 * aout-adobe.c: Delete.
2216 * coff-i860.c: Delete.
2217 * coff-i960.c: Delete.
2218 * cpu-i860.c: Delete.
2219 * cpu-i960.c: Delete.
2220 * elf32-i860.c: Delete.
2221 * elf32-i960.c: Delete.
2222 * hosts/i860mach3.h: Delete.
2223 * Makefile.am: Remove i860, i960, bout, and adobe support.
2224 * archures.c: Remove i860 and i960 support.
2225 * coffcode.h: Likewise.
2226 * reloc.c: Likewise.
2227 * aoutx.h: Comment updates.
2228 * archive.c: Remove BOUT and i960 support.
2229 * bfd.c: Remove BOUT support.
2230 * coffswap.h: Remove i960 support.
2231 * config.bfd: Remove i860, i960 and adobe targets.
2232 * configure.ac: Remove adode, bout, i860, i960, icoff targets.
2233 * targets.c: Likewise.
2234 * ieee.c: Remove i960 support.
2235 * mach-o.c: Remove i860 support.
2236 * Makefile.in: Regenerate.
2237 * bfd-in2.h: Regenerate.
2238 * configure: Regenerate.
2239 * libbfd.h: Regenerate.
2240 * po/SRC-POTFILES.in: Regenerate.
2242 2018-04-09 Maciej W. Rozycki <macro@mips.com>
2244 * elf64-mips.c (mips_elf64_write_rel): Handle a NULL BFD pointer
2245 in the BFD symbol referred by the relocation.
2246 (mips_elf64_write_rela): Likewise.
2248 2018-04-09 Maciej W. Rozycki <macro@mips.com>
2250 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Issue an
2251 error for out-of-range `r_sym' values.
2253 2018-04-09 Alan Modra <amodra@gmail.com>
2255 * elf64-ppc.c (struct _ppc64_elf_section_data): Add has_pltcall field.
2256 (struct ppc_link_hash_table): Add can_convert_all_inline_plt.
2257 (ppc64_elf_check_relocs): Set has_pltcall.
2258 (ppc64_elf_adjust_dynamic_symbol): Discard some PLT entries.
2259 (ppc64_elf_inline_plt): New function.
2260 (ppc64_elf_size_dynamic_sections): Discard some PLT entries for locals.
2261 * elf64-ppc.h (ppc64_elf_inline_plt): Declare.
2262 * elf32-ppc.c (has_pltcall): Define.
2263 (struct ppc_elf_link_hash_table): Add can_convert_all_inline_plt.
2264 (ppc_elf_check_relocs): Set has_pltcall.
2265 (ppc_elf_inline_plt): New function.
2266 (ppc_elf_adjust_dynamic_symbol): Discard some PLT entries.
2267 (ppc_elf_size_dynamic_sections): Likewise.
2268 * elf32-ppc.h (ppc_elf_inline_plt): Declare.
2270 2018-04-09 Alan Modra <amodra@gmail.com>
2272 * elf32-ppc.c (ppc_elf_howto_raw): Add PLTSEQ and PLTCALL howtos.
2273 (is_plt_seq_reloc): New function.
2274 (ppc_elf_check_relocs): Handle PLTSEQ and PLTCALL relocs.
2275 (ppc_elf_tls_optimize): Handle inline plt call sequence.
2276 (ppc_elf_relax_section): Handle PLTCALL reloc.
2277 (ppc_elf_relocate_section): Nop out inline plt call sequence when
2279 * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_PLTSEQ and
2280 R_PPC64_PLTCALL entries. Comment R_PPC64_TOCSAVE.
2281 (has_tls_get_addr_call): Correct comment.
2282 (is_branch_reloc): Add PLTCALL.
2283 (is_plt_seq_reloc): New function.
2284 (ppc64_elf_check_relocs): Handle PLT16_LO_DS reloc. Set
2285 has_tls_reloc for R_PPC64_TLSGD and R_PPC64_TLSLD. Create plt
2286 entry for R_PPC64_PLTCALL.
2287 (ppc64_elf_tls_optimize): Handle inline plt call sequence.
2288 (ppc_type_of_stub): Handle PLTCALL reloc.
2289 (toc_adjusting_stub_needed): Likewise.
2290 (ppc64_elf_relocate_section): Set "can_plt_call" for PLTCALL
2291 reloc insn. Nop out inline plt call sequence when resolving
2292 locally. Handle __tls_get_addr inline plt call optimization.
2294 2018-04-09 Alan Modra <amodra@gmail.com>
2296 * elf64-ppc.c (LOCAL_PLT_ENTRY_SIZE): Define.
2297 (struct ppc_stub_hash_entry): Add symtype field.
2299 (struct ppc_link_hash_table): Add pltlocal and relpltlocal.
2300 (create_linkage_sections): Create pltlocal and relpltlocal.
2301 (ppc64_elf_check_relocs): Allow PLT relocs on local symbols.
2303 (ppc64_elf_adjust_dynamic_symbol): Keep PLT entries for inline calls.
2304 (allocate_dynrelocs): Allocate pltlocal and relpltlocal.
2305 (ppc64_elf_size_dynamic_sections): Size pltlocal and relpltlocal.
2306 Keep PLT entries for inline calls against locals.
2307 (ppc_build_one_stub): Use pltlocal as appropriate.
2308 (ppc_size_one_stub): Likewise.
2309 (ppc64_elf_size_stubs): Set symtype.
2310 (build_global_entry_stubs_and_plt): Init pltlocal and write
2311 relpltlocal for globals.
2312 (write_plt_relocs_for_local_syms): Likewise for local syms.
2313 (ppc64_elf_relocate_section): Support PLT for local syms.
2314 * elf32-ppc.c (PLT_KEEP): Define.
2315 (struct ppc_elf_link_hash_table): Add pltlocal and relpltlocal.
2316 (ppc_elf_create_glink): Create pltlocal and relpltlocal.
2317 (ppc_elf_check_relocs): Allow PLT relocs on local symbols.
2318 Set PLT_KEEP. Adjust update_local_sym_info call.
2319 (ppc_elf_adjust_dynamic_symbol): Keep PLT entries for inline calls.
2320 (allocate_dynrelocs): Allocate pltlocal and relpltlocal.
2321 (ppc_elf_size_dynamic_sections): Size pltlocal and relpltlocal.
2322 (ppc_elf_relocate_section): Support PLT16 relocs for local syms.
2323 (write_global_sym_plt): Init pltlocal and write relpltlocal.
2324 (ppc_finish_symbols): Likewise for locals.
2326 2018-04-09 Alan Modra <amodra@gmail.com>
2328 * elf64-ppc.c (ppc_build_one_stub): Move output of PLT relocs
2329 for local symbols to..
2330 (write_plt_relocs_for_local_syms): ..here. New function.
2331 (ppc64_elf_finish_dynamic_symbol): Move output of PLT relocs for
2333 (build_global_entry_stubs_and_plt): ..here. Rename from
2334 build_global_entry_stubs.
2335 (ppc64_elf_build_stubs): Always call build_global_entry_stubs_and_plt.
2336 Call write_plt_relocs_for_local_syms.
2337 * elf32-ppc.c (get_sym_h): New function.
2338 (ppc_elf_relax_section): Use get_sym_h.
2339 (ppc_elf_relocate_section): Move output of PLT relocs and glink
2340 stubs for local symbols to..
2341 (ppc_finish_symbols): ..here. New function.
2342 (ppc_elf_finish_dynamic_symbol): Move output of PLT relocs for
2344 (write_global_sym_plt): ..here. New function.
2345 * elf32-ppc.h (ppc_elf_modify_segment_map): Delete attribute.
2346 (ppc_finish_symbols): Declare.
2348 2018-04-09 Alan Modra <amodra@gmail.com>
2350 * elf32-ppc.c (ppc_elf_check_relocs): Handle PLT16 relocs.
2351 (ppc_elf_relocate_section): Likewise.
2352 * elf64-ppc.c (ppc64_elf_check_relocs): Handle PLT16_LO_DS.
2353 (ppc64_elf_relocate_section): Likewise. Correct PLT16
2354 resolution to plt entry relative to toc pointer.
2356 2018-04-09 Alan Modra <amodra@gmail.com>
2358 * elf64-ppc.c (TLS_TLS, TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL,
2359 TLS_TPRELGD, TLS_EXPLICIT): Renumber. Test TLS_TLS throughout
2360 file when other TLS flags are tested in a mask.
2361 (TLS_MARK, NON_GOT): Define.
2362 (PLT_IFUNC): Redefine, and test TLS_TLS throughout file as well.
2363 (update_local_sym_info): Don't create got entry when NON_GOT.
2364 (ppc64_elf_check_relocs): Pass NON_GOT with PLT_IFUNC.
2366 (get_tls_mask): Do toc lookup if tls_mask is just TLS_MARK.
2367 (ppc64_elf_relocate_section): Likewise.
2368 (ppc64_elf_tls_optimize): Don't attempt to optimize indirect
2369 __tls_get_addr calls lacking a marker reloc.
2370 * elf32-ppc.c (TLS_TLS, TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL,
2371 TLS_TPRELGD): Renumber. Update comment.
2372 (TLS_MARK, NON_GOT): Define.
2373 (PLT_IFUNC): Redefine, and test TLS_TLS throughout file as well.
2374 (update_local_sym_info): Don't create got entry when NON_GOT.
2375 (ppc_elf_check_relocs): Pass NON_GOT with PLT_IFUNC.
2377 (ppc_elf_tls_optimize): Don't attempt to optimize indirect
2378 __tls_get_addr calls lacking a marker reloc.
2380 2018-04-06 H.J. Lu <hongjiu.lu@intel.com>
2382 * elf64-x86-64.c (elf_x86_64_info_to_howto): Don't mask out
2383 R_X86_64_converted_reloc_bit.
2385 2018-04-05 H.J. Lu <hongjiu.lu@intel.com>
2388 * configure: Regenerated.
2390 2018-04-05 Alan Modra <amodra@gmail.com>
2392 * elf-hppa.h (elf_hppa_info_to_howto): Init howto to NULL.
2393 (elf_hppa_info_to_howto_rel): Likewise.
2395 2018-04-04 Maciej W. Rozycki <macro@mips.com>
2397 * elf-hppa.h (elf_hppa_info_to_howto): Also return
2398 unsuccessfully for unimplemented relocations.
2399 (elf_hppa_info_to_howto_rel): Likewise.
2401 2018-04-04 Maciej W. Rozycki <macro@mips.com>
2403 * elf32-i860.c (lookup_howto): Add `abfd' parameter. Set the
2404 `bfd_error_bad_value' error and call `_bfd_error_handler' on a
2405 howto lookup failure.
2406 (elf32_i860_reloc_type_lookup): Adjust `lookup_howto' call
2408 (elf32_i860_info_to_howto_rela): Likewise.
2409 (elf32_i860_relocate_splitn): Likewise.
2410 (elf32_i860_relocate_pc16): Likewise.
2411 (elf32_i860_relocate_pc26): Likewise.
2412 (elf32_i860_relocate_section): Likewise.
2414 2018-04-04 Maciej W. Rozycki <macro@mips.com>
2416 * elf32-visium.c (visium_info_to_howto_rela): Correct the range
2417 check for `visium_elf_howto_table' table access.
2419 2018-04-04 Maciej W. Rozycki <macro@mips.com>
2421 * elf32-iq2000.c (iq2000_info_to_howto_rela): Correct the range
2422 check for `iq2000_elf_howto_table' table access.
2424 2018-04-04 Maciej W. Rozycki <macro@mips.com>
2426 * elf32-frv.c (frv_info_to_howto_rela): Correct the range check
2427 for `elf32_frv_howto_table' table access.
2429 2018-04-04 Maciej W. Rozycki <macro@mips.com>
2431 * elf32-mips.c (mips_elf32_rtype_to_howto): Also return
2432 unsuccessfully for placeholder howtos.
2433 * elf64-mips.c (mips_elf64_rtype_to_howto): Likewise.
2434 * elfn32-mips.c (mips_elf_n32_rtype_to_howto): Likewise.
2436 2018-03-29 Maciej W. Rozycki <macro@mips.com>
2438 * elf32-mips.c (mips_info_to_howto_rel): Remove the calls to
2439 `_bfd_error_handler' and to set the `bfd_error_bad_value' error.
2441 2018-03-28 Maciej W. Rozycki <macro@mips.com>
2443 * elf-hppa.h (elf_hppa_info_to_howto_rel): Remove
2444 ATTRIBUTE_UNUSED from `abfd'.
2446 2018-03-28 Maciej W. Rozycki <macro@mips.com>
2448 * elf-hppa.h (elf_hppa_info_to_howto_rel): Correct
2449 `_bfd_error_handler' call formatting.
2451 2018-03-28 Maciej W. Rozycki <macro@mips.com>
2453 * elf32-mips.c (mips_info_to_howto_rel): Call
2454 `mips_elf32_rtype_to_howto' directly rather than via
2455 `->elf_backend_mips_rtype_to_howto'.
2457 2018-03-28 Renlin Li <renlin.li@arm.com>
2460 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Add cases for
2461 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12,
2462 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
2463 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12,
2464 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
2465 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12,
2466 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
2467 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12,
2468 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
2469 (elfNN_aarch64_final_link_relocate): Support new relocations.
2470 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Support new
2472 (_bfd_aarch64_elf_resolve_relocation): Support new relocations.
2474 2018-03-28 Renlin Li <renlin.li@arm.com>
2477 * reloc.c: Add BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12
2478 BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12_NC,
2479 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12,
2480 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
2481 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12,
2482 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
2483 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12,
2484 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
2485 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12,
2486 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
2487 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Add table entry for
2488 TLSLE_LDST16_TPREL_LO12,
2489 TLSLE_LDST16_TPREL_LO12_NC,
2490 TLSLE_LDST32_TPREL_LO12,
2491 TLSLE_LDST32_TPREL_LO12_NC,
2492 TLSLE_LDST64_TPREL_LO12,
2493 TLSLE_LDST64_TPREL_LO12_NC,
2494 TLSLE_LDST8_TPREL_LO12,
2495 TLSLE_LDST8_TPREL_LO12_NC.
2496 * bfd-in2.h: Regenerated.
2497 * libbfd.h: Regenerated.
2499 2018-03-28 Eric Botcazou <ebotcazou@adacore.com>
2502 * elfxx-sparc.c (struct _bfd_sparc_elf_link_hash_entry): Add new flag
2503 has_old_style_got_reloc.
2504 (_bfd_sparc_elf_check_relocs) <GOT relocations>: Set it for old-style
2505 relocations. Fix a couple of long lines.
2506 (_bfd_sparc_elf_relocate_section) <R_SPARC_GOTDATA_OP>: Do not generate
2507 a R_SPARC_NONE for the GOT slot if the symbol is also subject to old-style
2510 2018-03-25 H.J. Lu <hongjiu.lu@intel.com>
2513 * elf64-x86-64.c (elf_x86_64_finish_dynamic_sections): Add
2514 ENDBR64 to the TLSDESC PLT entry.
2516 2018-03-21 Alan Modra <amodra@gmail.com>
2518 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Trim uninteresting
2519 symbols. Use size_t counts. Delete redundant opd test.
2521 2018-03-21 Alan Modra <amodra@gmail.com>
2523 * elf32-ppc.c (ppc_elf_tls_optimize): Delete locsyms.
2525 2018-03-21 Alan Modra <amodra@gmail.com>
2527 * elf32-ppc.c (struct ppc_elf_link_hash_entry): Make tls_mask
2529 (update_local_sym_info): Likewise for local_got_tls_masks.
2530 (ppc_elf_tls_optimize): Likewise for lgot_masks.
2532 2018-03-21 Alan Modra <amodra@gmail.com>
2534 * elf64-ppc.c (ppc_size_one_stub): Fix comment typo.
2535 (ppc64_elf_layout_multitoc): Allocate relocs for tprel as we
2536 do in size_dynamic_sections.
2538 2018-03-21 Alan Modra <amodra@gmail.com>
2540 * elf64-ppc.c (ppc64_elf_relocate_section): Don't access rel[1]
2541 without first checking array bounds.
2542 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2544 2018-03-20 H.J. Lu <hongjiu.lu@intel.com>
2547 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Set
2548 non_ir_ref_dynamic if a symbol is made dynamic by --dynamic-list.
2550 2018-03-19 Nick Clifton <nickc@redhat.com>
2552 * po/es.po: Updated Spanish translation.
2554 2018-03-15 Max Filippov <jcmvbkbc@gmail.com>
2556 * elf32-xtensa.c (xlate_map_entry): Change types of address
2557 fields from 'unsigned' to 'bfd_vma'.
2558 (xlate_offset_with_removed_text): Use struct xlate_map_entry as
2559 the key argument to bsearch. Allow offsets past the end of a
2560 section, use the last map entry for translation of such offsets.
2562 2018-03-15 Kuan-Lin Chen <kuanlinchentw@gmail.com>
2564 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Removed.
2565 Not support the target feature.
2566 (nds32_elf_ex9_itb_base): Likewise.
2567 (nds32_elf_ex9_import_table): Likewise.
2568 (nds32_elf_ex9_finish): Likewise.
2569 (nds32_elf_ex9_reloc_jmp): Likewise.
2570 (nds32_elf_get_insn_with_reg): Likewise.
2571 (nds32_get_local_syms): Likewise.
2572 (nds32_elf_ex9_replace_instruction): Likewise.
2573 (nds32_elf_ifc_calc): Likewise.
2574 (nds32_elf_ifc_finish): Likewise.
2575 (nds32_elf_ifc_replace): Likewise.
2576 (nds32_elf_ifc_reloc): Likewise.
2578 2018-03-14 Alan Modra <amodra@gmail.com>
2580 * elf64-ppc.c (sfpr_define): Adjust for stub_sec size having
2581 sfpr size added before defining alias symbols.
2582 (ppc64_elf_build_stubs): Add stub section padding before
2583 copying sfpr contents and defining save/restore alias symbols.
2585 2018-03-14 H.J. Lu <hongjiu.lu@intel.com>
2588 * elflink.c (elf_gc_mark_debug_section): Also check the local
2589 debug definition section.
2591 2018-03-13 Nick Clifton <nickc@redhat.com>
2594 * pei-x86_64.c (pex64_get_unwind_info): Change to a boolean
2595 function. Add an end address parameter. Check access of the data
2596 pointer to make sure that they do not extend beyond the end
2597 address. Return FALSE if any check fails. Add the end address
2598 pointer to the ui structure.
2599 (pex64_xdata_print_uwd_codes): Check accesses of the raw unwind
2600 codes to make sure that they do not extend beyond the end address
2601 pointer. Print an error message and return immediately if any
2604 2018-03-09 Nick Clifton <nickc@redhat.com>
2606 * elf64-s390.c (elf_s390_relocate_section): Move check for
2607 relocations against non-allocated sections to before the code that
2608 handles ifunc relocations.
2609 * elf32-s390.c (elf_s390_relocate_section): Likewise.
2610 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Treat
2611 relocs against IFUNC symbols in non-allocated sections as relocs
2612 against FUNC symbols.
2613 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
2615 2018-03-08 H.J. Lu <hongjiu.lu@intel.com>
2618 * elf32-i386.c (elf_i386_relocate_section): Treat relocation
2619 against IFUNC symbol in SHT_NOTE section without SHF_ALLOC as
2620 relocation against FUNC symbol.
2621 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
2623 2018-03-07 Renlin Li <renlin.li@arm.com>
2626 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Check absolute
2627 symbol, and don't emit relocation in specific case.
2629 2018-03-07 Alan Modra <amodra@gmail.com>
2631 * elf64-mips.c (mips_elf64_rtype_to_howto): Return NULL on error.
2632 (mips_elf64_slurp_one_reloc_table): Pass on error.
2634 2018-03-03 James Cowgill <james.cowgill@mips.com>
2635 Maciej W. Rozycki <macro@mips.com>
2638 * elfxx-mips.c (mips_elf_calculate_relocation): Only return
2639 after calling `undefined_symbol' hook if this is an error
2640 condition. Assume the value of 0 for the symbol requested
2643 2018-03-02 Jim Wilson <jimw@sifive.com>
2646 * elfnn-aarch64.c (_bfd_aarch64_resize_stubs): Add 8 bytes for branch
2647 and nop instead of 4.
2648 (elfNN_arch64_build_stubs): Add nop after branch. Increase size by
2651 2018-03-01 Jim Wilson <jimw@sifive.com>
2654 * elfnn-riscv.c (riscv_relax_delete_bytes): When adjust st_size, use
2655 else if instead of if.
2657 2018-03-01 Alan Modra <amodra@gmail.com>
2659 * elf32-ft32.c (ft32_info_to_howto_rela): Correct range test.
2661 2018-02-28 Alan Modra <amodra@gmail.com>
2664 * aoutx.h (swap_std_reloc_in): Correct r_index bound check.
2666 2018-02-28 Nick Clifton <nickc@redhat.com>
2670 * dwarf2.c (read_n_bytes): Replace size parameter with dwarf_block
2671 pointer. Drop unused abfd parameter. Check the size of the block
2672 before initialising the data field. Return the end pointer if the
2674 (read_attribute_value): Adjust invocations of read_n_bytes.
2677 * dwarf1.c (parse_die): Check the length of form blocks before
2678 advancing the data pointer.
2680 2018-02-28 Alan Modra <amodra@gmail.com>
2683 * aoutx.h (translate_symbol_table): Print an error message and set
2684 bfd_error on finding an invalid name string offset.
2686 2018-02-27 H.J. Lu <hongjiu.lu@intel.com>
2688 * config.in: Regenerated.
2689 * configure: Likewise.
2690 * configure.ac: Add --enable-separate-code.
2691 (DEFAULT_LD_Z_SEPARATE_CODE): New AC_DEFINE_UNQUOTED. Default
2692 to 1 for Linux/x86 targets,
2693 * elf64-x86-64.c (ELF_MAXPAGESIZE): Set to 0x1000 if
2694 DEFAULT_LD_Z_SEPARATE_CODE is 1.
2696 2018-02-27 Nick Clifton <nickc@redhat.com>
2698 * aout-cris.c (swap_ext_reloc_out): Standadize error/warning
2700 * elf-hppa.h (elf_hppa_info_to_howto_rel): Likewise.
2701 * elf32-i386.c (elf_i386_reloc_type_lookup): Likewise.
2702 * elf32-xtensa.c (elf_xtensa_reloc_type_lookup): Likewise.
2703 * elf64-ppc.c (ppc64_elf_reloc_type_lookup): Likewise.
2704 * elf64-s390.c (elf_s390_reloc_type_lookup): Likewise.
2705 * elf64-sh64.c (sh_elf64_info_to_howto): Likewise.
2706 * elfxx-ia64.c (ia64_elf_reloc_type_lookup): Likewise.
2707 * elfxx-sparc.c (_bfd_sparc_elf_reloc_type_lookup): Likewise.
2708 * elfxx-tilegx.c (tilegx_reloc_type_lookup): Likewise.
2711 * elf-bfd.h (struct elf_backend_data): Change the return type of
2712 the elf_info_to_howto and elf_info_to_howto_rel function pointers
2714 * elfcode.h (elf_slurp_reloc_table_from_section): Check the return
2715 value from the info_to_howto function and fail if that function
2717 * elf32-h8300.c (elf32_h8_relocate_section): Check return value
2718 from the info_to_howto function.
2719 (elf32_h8_relax_section): Likewise.
2720 * elf32-lm32.c (lm32_elf_relocate_section): Likewise.
2721 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
2722 * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise.
2723 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
2724 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
2725 * elf64-ia64-vms.c (elf64_ia64_relocate_section): Likewise.
2726 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Likewise.
2727 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
2728 * elfnn-ia64.c (elfNN_ia64_relocate_section): Likewise.
2729 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
2730 (riscv_elf_relocate_section): Likewise.
2731 * elf-hppa.h (elf_hppa_info_to_howto): Change return type to
2732 bfd_boolean. Issue an error message, set an error value and
2733 return FALSE if the reloc is not recognized.
2734 (elf_hppa_info_to_howto_rel): Likewise.
2735 * elf-m10200.c (mn10200_info_to_howto): Likewise.
2736 * elf-m10300.c (mn10300_info_to_howto): Likewise.
2737 * elf.c (_bfd_elf_no_info_to_howto): Likewise.
2738 * elf32-arc.c (arc_info_to_howto_rel): Likewise.
2739 * elf32-arm.c (elf32_arm_info_to_howto): Likewise.
2740 * elf32-avr.c (avr_info_to_howto_rela): Likewise.
2741 * elf32-bfin.c (bfin_info_to_howto): Likewise.
2742 * elf32-cr16.c (elf_cr16_info_to_howto): Likewise.
2743 * elf32-cr16c.c (elf_cr16c_info_to_howto): Likewise.
2744 * elf32-cris.c (elf_cr16c_info_to_howto_rel)
2745 (cris_info_to_howto_rela): Likewise.
2746 * elf32-crx.c (elf_crx_info_to_howto): Likewise.
2747 * elf32-d10v.c (d10v_info_to_howto_rel): Likewise.
2748 * elf32-d30v.c (d30v_info_to_howto_rel, d30v_info_to_howto_rela):
2750 * elf32-dlx.c (dlx_rtype_to_howto, elf32_dlx_info_to_howto)
2751 (elf32_dlx_info_to_howto_rel): Likewise.
2752 * elf32-epiphany.c (epiphany_info_to_howto_rela): Likewise.
2753 * elf32-fr30.c (fr30_info_to_howto_rela): Likewise.
2754 * elf32-frv.c (frv_info_to_howto_rela)
2755 (frvfdpic_info_to_howto_rel): Likewise.
2756 * elf32-ft32.c (ft32_info_to_howto_rela): Likewise.
2757 * elf32-gen.c (elf_generic_info_to_howto)
2758 (elf_generic_info_to_howto_rel): Likewise.
2759 * elf32-h8300.c (elf32_h8_info_to_howto)
2760 (elf32_h8_info_to_howto_rel): Likewise.
2761 * elf32-i370.c (i370_elf_info_to_howto): Likewise.
2762 * elf32-i386.c (elf_i386_reloc_type_lookup)
2763 (elf_i386_rtype_to_howto, elf_i386_info_to_howto_rel): Likewise.
2764 * elf32-i860.c (lookup_howto, elf32_i860_info_to_howto_rela):
2766 * elf32-i960.c (elf32_i960_info_to_howto_rel): Likewise.
2767 * elf32-ip2k.c (ip2k_info_to_howto_rela): Likewise.
2768 * elf32-iq2000.c (iq2000_info_to_howto_rela): Likewise.
2769 * elf32-lm32.c (lm32_info_to_howto_rela): Likewise.
2770 * elf32-m32c.c (m32c_info_to_howto_rela): Likewise.
2771 * elf32-m32r.c (m32r_info_to_howto_rel, m32r_info_to_howto):
2773 * elf32-m68hc11.c (m68hc11_info_to_howto_rel): Likewise.
2774 * elf32-m68hc12.c (m68hc11_info_to_howto_rel): Likewise.
2775 * elf32-m68k.c (rtype_to_howto): Likewise.
2776 * elf32-mcore.c (mcore_elf_info_to_howto): Likewise.
2777 * elf32-mep.c (mep_info_to_howto_rela): Likewise.
2778 * elf32-metag.c (metag_info_to_howto_rela): Likewise.
2779 * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise.
2780 * elf32-mips.c (mips_info_to_howto_rel, mips_info_to_howto_rela):
2782 * elf32-moxie.c (moxie_info_to_howto_rela): Likewise.
2783 * elf32-msp430.c (msp430_info_to_howto_rela): Likewise.
2784 * elf32-mt.c (mt_info_to_howto_rela): Likewise.
2785 * elf32-nds32.c (nds32_info_to_howto_rel, nds32_info_to_howto):
2787 * elf32-nios2.c (nios2_elf32_info_to_howto): Likewise.
2788 * elf32-or1k.c (or1k_info_to_howto_rela): Likewise.
2789 * elf32-pj.c (pj_elf_info_to_howto): Likewise.
2790 * elf32-ppc.c (ppc_elf_info_to_howto): Likewise.
2791 * elf32-pru.c (pru_elf32_info_to_howto): Likewise.
2792 * elf32-rl78.c (rl78_info_to_howto_rela): Likewise.
2793 * elf32-rx.c (rx_info_to_howto_rela): Likewise.
2794 * elf32-s390.c (elf_s390_info_to_howto): Likewise.
2795 * elf32-score.c (s3_bfd_score_info_to_howto)
2796 (_bfd_score_info_to_howto): Likewise.
2797 * elf32-score7.c (s7_bfd_score_info_to_howto): Likewise.
2798 * elf32-sh.c (sh_elf_info_to_howto): Likewise.
2799 * elf32-spu.c (spu_elf_info_to_howto): Likewise.
2800 * elf32-tic6x.c (elf32_tic6x_info_to_howto)
2801 (elf32_tic6x_info_to_howto_rel): Likewise.
2802 * elf32-tilepro.c (tilepro_info_to_howto_rela): Likewise.
2803 * elf32-v850.c (v850_elf_info_to_howto_rel)
2804 (v850_elf_info_to_howto_rela, v800_elf_info_to_howto): Likewise.
2805 * elf32-vax.c (rtype_to_howto): Likewise.
2806 * elf32-visium.c (visium_info_to_howto_rela): Likewise.
2807 * elf32-wasm32.c (elf32_wasm32_rtype_to_howto)
2808 (elf32_wasm32_info_to_howto_rela): Likewise.
2809 * elf32-xc16x.c (elf32_xc16x_info_to_howto): Likewise.
2810 * elf32-xgate.c (xgate_info_to_howto_rel): Likewise.
2811 * elf32-xstormy16.c (xstormy16_info_to_howto_rela): Likewise.
2812 * elf32-xtensa.c (elf_xtensa_info_to_howto_rela): Likewise.
2813 * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise.
2814 * elf64-gen.c (elf_generic_info_to_howto)
2815 (elf_generic_info_to_howto_rel): Likewise.
2816 * elf64-ia64-vms.c (elf64_ia64_info_to_howto): Likewise.
2817 * elf64-mips.c (mips_elf64_info_to_howto_rela): Likewise.
2818 * elf64-mmix.c (mmix_info_to_howto_rela): Likewise.
2819 * elf64-ppc.c (ppc64_elf_info_to_howto): Likewise.
2820 * elf64-s390.c (elf_s390_reloc_type_lookup): Likewise.
2821 * elf64-sh64.c (elf_s390_info_to_howto, sh_elf64_info_to_howto):
2823 * elf64-x86-64.c (elf_x86_64_info_to_howto): Likewise.
2824 * elfn32-mips.c (mips_info_to_howto_rel, mips_info_to_howto_rela):
2826 * elfnn-aarch64.c (elfNN_aarch64_info_to_howto): Likewise.
2827 * elfnn-ia64.c (elfNN_ia64_info_to_howto): Likewise.
2828 * elfnn-riscv.c (riscv_info_to_howto_rela): Likewise.
2829 * elfxx-ia64.c (ia64_elf_reloc_type_lookup): Likewise.
2830 * elfxx-sparc.c (_bfd_sparc_elf_info_to_howto): Likewise.
2831 * elfxx-tilegx.c (tilegx_info_to_howto_rela): Likewise.
2832 * elf32-score.h (s7_bfd_score_info_to_howto): Update prototype.
2833 * elfxx-sparc.h (_bfd_sparc_elf_info_to_howto): Update prototype.
2834 * elfxx-tilegx.h (tilegx_info_to_howto_rela): Update prototype.
2835 * elfxx-target.h (elf_info_to_howto, elf_info_to_howto_rel):
2838 2018-02-26 Jim Wilson <jimw@sifive.com>
2839 Stephan Schreiber <info@fs-driver.org>
2842 * elfnn-ia64.c (elfNN_ia64_relax_section): After ia64_elf_relax_brl
2843 call, set changed_contents and changed_relocs. Likewise after
2844 successful ia64_elf_relax_br call.
2846 2018-02-26 Alan Modra <amodra@gmail.com>
2848 * elf.c (assign_file_positions_except_relocs): Don't segfault
2849 when actual number of phdrs is less than allocated. Delete
2850 outdated comment. Formatting.
2852 2018-02-26 Alan Modra <amodra@gmail.com>
2854 * elf-m10300.c, * elf-s390-common.c, * elf32-arc.c, * elf32-cris.c,
2855 * elf32-dlx.c, * elf32-frv.c, * elf32-i370.c, * elf32-lm32.c,
2856 * elf32-m32r.c, * elf32-m68hc1x.c, * elf32-m68k.c,
2857 * elf32-microblaze.c, * elf32-msp430.c, * elf32-nds32.c,
2858 * elf32-nios2.c, * elf32-or1k.c, * elf32-rl78.c, * elf32-rx.c,
2859 * elf32-score.c, * elf32-score7.c, * elf32-sh-symbian.c,
2860 * elf32-sh.c, * elf32-spu.c, * elf32-v850.c, * elf32-xtensa.c,
2861 * elf64-alpha.c, * elf64-ia64-vms.c, * elf64-mmix.c,
2862 * elf64-sh64.c, * elf64-sparc.c, * elfnn-ia64.c, * elfxx-tilegx.c,
2863 * mmo.c, * osf-core.c, * srec.c, * vms-alpha.c: Standardize
2864 error/warning messages.
2866 2018-02-26 Alan Modra <amodra@gmail.com>
2868 * archive.c, * bfd.c, * linker.c, * reloc.c, * stabs.c,
2869 * syms.c: Standardize error/warning messages.
2871 2018-02-26 Alan Modra <amodra@gmail.com>
2873 * aout-adobe.c, * aout-cris.c, * i386linux.c, * m68klinux.c,
2874 * sparclinux.c, * coff-alpha.c, * coff-arm.c, * coff-mcore.c,
2875 * coffcode.h, * coffgen.c, * cofflink.c, * ecoff.c, * pe-mips.c,
2876 * peXXigen.c, * peicode.h: Standardize error/warning messages.
2878 2018-02-26 Alan Modra <amodra@gmail.com>
2880 * elf32-arm.c, * elfnn-aarch64.c: Standardize error/warning messages.
2882 2018-02-26 Alan Modra <amodra@gmail.com>
2884 * elfxx-mips.c: Standardize error/warning messages.
2886 2018-02-26 Alan Modra <amodra@gmail.com>
2888 * dwarf2.c, * elf-attrs.c, * elf-eh-frame.c, * elf.c, * elf32-gen.c,
2889 * elflink.c: Standardize error/warning messages. Replace use of
2890 linker callback einfo with _bfd_error_handler when possible.
2892 2018-02-26 Alan Modra <amodra@gmail.com>
2894 * aoutx.h, * coff-alpha.c, * coff-i860.c, * coff-m68k.c,
2895 * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c,
2896 * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-w65.c,
2897 * elf-bfd.h, * elf-m10300.c, * elf.c, * elf32-avr.c, * elf32-bfin.c,
2898 * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c,
2899 * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c,
2900 * elf32-fr30.c, * elf32-frv.c, * elf32-i370.c, * elf32-i386.c,
2901 * elf32-i960.c, * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c,
2902 * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c,
2903 * elf32-m68k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c,
2904 * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c,
2905 * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-or1k.c,
2906 * elf32-pj.c, * elf32-ppc.c, * elf32-rl78.c, * elf32-rx.c,
2907 * elf32-s390.c, * elf32-sh.c, * elf32-spu.c, * elf32-tic6x.c,
2908 * elf32-v850.c, * elf32-vax.c, * elf32-visium.c, * elf32-wasm32.c,
2909 * elf32-xgate.c, * elf32-xtensa.c, * elf64-alpha.c,
2910 * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c,
2911 * elf64-ppc.c, * elf64-s390.c, * elf64-sparc.c, * elf64-x86-64.c,
2912 * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c,
2913 * elfnn-riscv.c, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-riscv.h,
2914 * elfxx-sparc.c, * elfxx-sparc.h, * reloc.c: Standardize
2915 unrecognized/unsupported reloc message.
2917 2018-02-26 Alan Modra <amodra@gmail.com>
2919 * elf32-ppc.c: Standardize error/warning messages. Use
2920 _bfd_error_handler rather than einfo when einfo features not used.
2921 * elf64-ppc.c: Likewise.
2923 2018-02-23 Alan Modra <amodra@gmail.com>
2926 * elf.c (assign_file_positions_for_non_load_sections): Remove RELRO
2927 segment if no matching LOAD segment.
2929 2018-02-23 Kuan-Lin Chen <kuanlinchentw@gmail.com>
2931 * elf32-nds32.h: Define mask for ict_model.
2933 2018-02-20 Jason Duerstock <jason.duerstock@gmail.com>
2935 * elfnn-ia64.c (elf_backend_can_gc_sections): Enable.
2937 2018-02-19 Maciej W. Rozycki <macro@mips.com>
2940 2018-01-12 Vlad Ivanov <vlad@ivanov.email>
2942 * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when
2943 .reginfo section has wrong size.
2945 2018-02-19 Maciej W. Rozycki <macro@mips.com>
2947 * elfxx-mips.c (_bfd_mips_elf_always_size_sections): Set
2948 SEC_FIXED_SIZE and SEC_HAS_CONTENTS flags for `.reginfo' and
2949 `.MIPS.abiflags' sections.
2950 (_bfd_mips_elf_final_link): Avoid reading beyond `.reginfo'
2953 2018-02-19 Maciej W. Rozycki <macro@mips.com>
2955 * section.c (SEC_FIXED_SIZE): New macro.
2956 * bfd-in2.h: Regenerate.
2958 2018-02-19 Maciej W. Rozycki <macro@mips.com>
2960 * section.c (SEC_HAS_GOT_REF): Remove macro.
2961 * bfd-in2.h: Regenerate.
2963 2018-02-19 Alan Modra <amodra@gmail.com>
2965 * elf-attrs.c (_bfd_elf_parse_attributes): Correct _bfd_error_handler
2967 * elfxx-mips.c (_bfd_mips_elf_final_link): Likewise.
2968 * elfnn-riscv.c (_bfd_riscv_relax_align): Likewise.
2969 (_bfd_riscv_relax_pc): Likewise and fix typos.
2970 * libbfd-in.h (_bfd_error_handler): Add attribute printf.
2971 * libbfd.h: Regenerate.
2973 2018-02-19 Alan Modra <amodra@gmail.com>
2975 * dwarf2.c (read_section): Don't use 'll' format modifier.
2976 (find_abstract_instance): Likewise.
2977 * elfcore.h (elf_core_file_p): Likewise.
2979 2018-02-19 Alan Modra <amodra@gmail.com>
2981 * bfd-in.h: Include inttypes.h or if not available define
2982 PRId64, PRIu64 and PRIx64.
2983 * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Remove support for L
2984 modifier to print bfd_vma.
2985 * coff-arm.c, * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c,
2986 * coff-sh.c, * coff-tic80.c, * coffcode.h, * coffgen.c, * cofflink.c,
2987 * compress.c, * dwarf2.c, * elf-m10300.c, * elf.c, * elf32-arc.c,
2988 * elf32-arm.c, * elf32-bfin.c, * elf32-cris.c, * elf32-hppa.c,
2989 * elf32-i386.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32r.c,
2990 * elf32-m68k.c, * elf32-metag.c, * elf32-nds32.c, * elf32-nios2.c,
2991 * elf32-ppc.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c,
2992 * elf32-score7.c, * elf32-sh.c, * elf32-sh64.c, * elf32-spu.c,
2993 * elf32-tic6x.c, * elf32-tilepro.c, * elf32-v850.c, * elf32-vax.c,
2994 * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c,
2995 * elf64-mmix.c, * elf64-s390.c, * elf64-sh64.c, * elf64-x86-64.c,
2996 * elfcode.h, * elfcore.h, * elflink.c, * elfnn-aarch64.c,
2997 * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-mips.c, * elfxx-sparc.c,
2998 * elfxx-tilegx.c, * ieee.c, * ihex.c, * mach-o.c, * merge.c, * mmo.c,
2999 * peXXigen.c, * xcofflink.c: Replace use of Lx modifier with PRIx64,
3000 and cast input to uint64_t, and similarly for Ld and Lu.
3001 * bfd-in2.h: Regenerate.
3003 2018-02-19 Alan Modra <amodra@gmail.com>
3005 * elf32-arm.c, * elf32-hppa.c, * elf32-lm32.c, * elf32-m32r.c,
3006 * elf32-metag.c, * elf32-nds32.c, * elf32-or1k.c, * elf32-ppc.c,
3007 * elf32-s390.c, * elf32-sh.c, * elf32-tic6x.c, * elf32-tilepro.c,
3008 * elf64-ppc.c, * elf64-s390.c, * elflink.c, * elfnn-aarch64.c,
3009 * elfnn-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c,
3010 * reloc.c: Replace use of %R and %T in format strings passed to
3011 einfo and friends by %pR and %pT.
3013 2018-02-19 Alan Modra <amodra@gmail.com>
3015 * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Handle %pA and %pB in place
3017 * aout-adobe.c: Update all messages using %A and %B.
3018 * aout-cris.c: Likewise.
3019 * aoutx.h: Likewise.
3020 * archive.c: Likewise.
3021 * binary.c: Likewise.
3022 * cache.c: Likewise.
3023 * coff-alpha.c: Likewise.
3024 * coff-arm.c: Likewise.
3025 * coff-i860.c: Likewise.
3026 * coff-mcore.c: Likewise.
3027 * coff-ppc.c: Likewise.
3028 * coff-rs6000.c: Likewise.
3029 * coff-sh.c: Likewise.
3030 * coff-tic4x.c: Likewise.
3031 * coff-tic54x.c: Likewise.
3032 * coff-tic80.c: Likewise.
3033 * coff64-rs6000.c: Likewise.
3034 * coffcode.h: Likewise.
3035 * coffgen.c: Likewise.
3036 * cofflink.c: Likewise.
3037 * coffswap.h: Likewise.
3038 * compress.c: Likewise.
3039 * cpu-arm.c: Likewise.
3040 * ecoff.c: Likewise.
3041 * elf-attrs.c: Likewise.
3042 * elf-eh-frame.c: Likewise.
3043 * elf-ifunc.c: Likewise.
3044 * elf-m10300.c: Likewise.
3045 * elf-properties.c: Likewise.
3046 * elf-s390-common.c: Likewise.
3048 * elf32-arc.c: Likewise.
3049 * elf32-arm.c: Likewise.
3050 * elf32-avr.c: Likewise.
3051 * elf32-bfin.c: Likewise.
3052 * elf32-cr16.c: Likewise.
3053 * elf32-cr16c.c: Likewise.
3054 * elf32-cris.c: Likewise.
3055 * elf32-crx.c: Likewise.
3056 * elf32-d10v.c: Likewise.
3057 * elf32-d30v.c: Likewise.
3058 * elf32-epiphany.c: Likewise.
3059 * elf32-fr30.c: Likewise.
3060 * elf32-frv.c: Likewise.
3061 * elf32-gen.c: Likewise.
3062 * elf32-hppa.c: Likewise.
3063 * elf32-i370.c: Likewise.
3064 * elf32-i386.c: Likewise.
3065 * elf32-i960.c: Likewise.
3066 * elf32-ip2k.c: Likewise.
3067 * elf32-iq2000.c: Likewise.
3068 * elf32-lm32.c: Likewise.
3069 * elf32-m32c.c: Likewise.
3070 * elf32-m32r.c: Likewise.
3071 * elf32-m68hc11.c: Likewise.
3072 * elf32-m68hc12.c: Likewise.
3073 * elf32-m68hc1x.c: Likewise.
3074 * elf32-m68k.c: Likewise.
3075 * elf32-mcore.c: Likewise.
3076 * elf32-mep.c: Likewise.
3077 * elf32-metag.c: Likewise.
3078 * elf32-microblaze.c: Likewise.
3079 * elf32-moxie.c: Likewise.
3080 * elf32-msp430.c: Likewise.
3081 * elf32-mt.c: Likewise.
3082 * elf32-nds32.c: Likewise.
3083 * elf32-nios2.c: Likewise.
3084 * elf32-or1k.c: Likewise.
3085 * elf32-pj.c: Likewise.
3086 * elf32-ppc.c: Likewise.
3087 * elf32-rl78.c: Likewise.
3088 * elf32-rx.c: Likewise.
3089 * elf32-s390.c: Likewise.
3090 * elf32-score.c: Likewise.
3091 * elf32-score7.c: Likewise.
3092 * elf32-sh-symbian.c: Likewise.
3093 * elf32-sh.c: Likewise.
3094 * elf32-sh64.c: Likewise.
3095 * elf32-sparc.c: Likewise.
3096 * elf32-spu.c: Likewise.
3097 * elf32-tic6x.c: Likewise.
3098 * elf32-tilepro.c: Likewise.
3099 * elf32-v850.c: Likewise.
3100 * elf32-vax.c: Likewise.
3101 * elf32-visium.c: Likewise.
3102 * elf32-wasm32.c: Likewise.
3103 * elf32-xgate.c: Likewise.
3104 * elf32-xtensa.c: Likewise.
3105 * elf64-alpha.c: Likewise.
3106 * elf64-gen.c: Likewise.
3107 * elf64-hppa.c: Likewise.
3108 * elf64-ia64-vms.c: Likewise.
3109 * elf64-mmix.c: Likewise.
3110 * elf64-ppc.c: Likewise.
3111 * elf64-s390.c: Likewise.
3112 * elf64-sh64.c: Likewise.
3113 * elf64-sparc.c: Likewise.
3114 * elf64-x86-64.c: Likewise.
3115 * elfcode.h: Likewise.
3116 * elfcore.h: Likewise.
3117 * elflink.c: Likewise.
3118 * elfnn-aarch64.c: Likewise.
3119 * elfnn-ia64.c: Likewise.
3120 * elfnn-riscv.c: Likewise.
3121 * elfxx-mips.c: Likewise.
3122 * elfxx-sparc.c: Likewise.
3123 * elfxx-tilegx.c: Likewise.
3124 * elfxx-x86.c: Likewise.
3125 * hpux-core.c: Likewise.
3128 * libbfd.c: Likewise.
3129 * linker.c: Likewise.
3130 * mach-o.c: Likewise.
3131 * merge.c: Likewise.
3133 * oasys.c: Likewise.
3134 * pdp11.c: Likewise.
3135 * pe-mips.c: Likewise.
3136 * peXXigen.c: Likewise.
3137 * peicode.h: Likewise.
3138 * reloc.c: Likewise.
3139 * rs6000-core.c: Likewise.
3141 * stabs.c: Likewise.
3142 * vms-alpha.c: Likewise.
3143 * xcofflink.c: Likewise.
3145 2018-02-19 Alan Modra <amodra@gmail.com>
3148 * elf.c (IS_TBSS): Define.
3149 (_bfd_elf_map_sections_to_segments): Use IS_TBSS.
3150 (assign_file_positions_for_non_load_sections): Revert last change.
3151 Properly calculate load segment limits to compare against relro limits.
3153 2018-02-17 Alan Modra <amodra@gmail.com>
3156 * elf.c (assign_file_positions_for_non_load_sections): Ignore
3157 degenerate zero size PT_LOAD segments when finding one overlapping
3158 the PT_GNU_RELRO segment.
3160 2018-02-16 Alan Modra <amodra@gmail.com>
3162 * libbfd.c (_bfd_bool_bfd_false_error): Rename from bfd_false.
3163 (_bfd_bool_bfd_true): Rename from bfd_true.
3164 (_bfd_ptr_bfd_null_error): Rename from bfd_nullvoidptr.
3165 (_bfd_int_bfd_0): Rename from bfd_0.
3166 (_bfd_uint_bfd_0): Rename from bfd_0u.
3167 (_bfd_long_bfd_0): Rename from bfd_0l.
3168 (_bfd_long_bfd_n1_error): Rename from _bfd_n1.
3169 (_bfd_void_bfd): Rename from bfd_void.
3170 (_bfd_bool_bfd_false, _bfd_bool_bfd_asymbol_false),
3171 (_bfd_bool_bfd_link_false_error),
3172 (_bfd_bool_bfd_link_true, _bfd_bool_bfd_bfd_true),
3173 (_bfd_bool_bfd_uint_true, _bfd_bool_bfd_ptr_true),
3174 (_bfd_bool_bfd_asection_bfd_asection_true),
3175 (_bfd_bool_bfd_asymbol_bfd_asymbol_true),
3176 (_bfd_void_bfd_link, _bfd_void_bfd_asection): New functions.
3177 * archive.c (_bfd_noarchive_get_elt_at_index),
3178 (_bfd_noarchive_openr_next_archived_file),
3179 (_bfd_noarchive_construct_extended_name_table),
3180 (_bfd_noarchive_write_ar_hdr, _bfd_noarchive_truncate_arname),
3181 (_bfd_noarchive_write_armap): New functions.
3182 * archures.c (_bfd_nowrite_set_arch_mach): New function.
3183 * coff-alpha.c (alpha_ecoff_swap_coff_aux_in),
3184 (alpha_ecoff_swap_coff_sym_in, alpha_ecoff_swap_coff_lineno_in),
3185 (alpha_ecoff_swap_coff_aux_out, alpha_ecoff_swap_coff_sym_out),
3186 (alpha_ecoff_swap_coff_lineno_out),
3187 (alpha_ecoff_swap_coff_reloc_out): New functions.
3188 * coff-mips.c (mips_ecoff_swap_coff_aux_in),
3189 (mips_ecoff_swap_coff_sym_in, mips_ecoff_swap_coff_lineno_in),
3190 (mips_ecoff_swap_coff_aux_out, mips_ecoff_swap_coff_sym_out),
3191 (mips_ecoff_swap_coff_lineno_out),
3192 (mips_ecoff_swap_coff_reloc_out): New functions.
3193 * coffcode.h (coff_set_alignment_hook): Replace define with
3195 (symname_in_debug_hook): Likewise.
3196 * ecoff.c (_bfd_ecoff_set_alignment_hook): New function.
3197 * elfxx-target.h (elf_backend_allow_non_load_phdr): Default to 0.
3198 * elf.c (assign_file_positions_except_relocs): Test
3199 elf_backend_allow_non_load_phdr for NULL.
3200 * elflink.c (_bfd_elf_omit_section_dynsym_default): Rename from
3201 _bfd_elf_link_omit_section_dynsym. Update uses.
3202 (_bfd_elf_omit_section_dynsym_all): New function.
3203 * elf-bfd.h (_bfd_elf_link_omit_section_dynsym): Delete.
3204 (_bfd_elf_omit_section_dynsym_default): Declare.
3205 (_bfd_elf_omit_section_dynsym_all): Declare.
3206 * linker.c (_bfd_nolink_sizeof_headers, _bfd_nolink_bfd_relax_section),
3207 (_bfd_nolink_bfd_get_relocated_section_contents),
3208 (_bfd_nolink_bfd_lookup_section_flags),
3209 (_bfd_nolink_bfd_is_group_section, _bfd_nolink_bfd_discard_group),
3210 (_bfd_nolink_bfd_link_hash_table_create),
3211 (_bfd_nolink_bfd_link_just_syms),
3212 (_bfd_nolink_bfd_copy_link_hash_symbol_type),
3213 (_bfd_nolink_bfd_link_split_section),
3214 (_bfd_nolink_section_already_linked),
3215 (_bfd_nolink_bfd_define_common_symbol),
3216 (_bfd_nolink_bfd_define_start_stop): New functions.
3217 * reloc.c (_bfd_norelocs_bfd_reloc_type_lookup),
3218 (_bfd_norelocs_bfd_reloc_name_lookup),
3219 (_bfd_nodynamic_canonicalize_dynamic_reloc): New functions.
3220 * section.c (_bfd_nowrite_set_section_contents): New function.
3221 * syms.c (_bfd_nosymbols_canonicalize_symtab),
3222 (_bfd_nosymbols_print_symbol, _bfd_nosymbols_get_symbol_info),
3223 (_bfd_nosymbols_get_symbol_version_string),
3224 (_bfd_nosymbols_bfd_is_local_label_name),
3225 (_bfd_nosymbols_get_lineno, _bfd_nosymbols_find_nearest_line),
3226 (_bfd_nosymbols_find_line, _bfd_nosymbols_find_inliner_info),
3227 (_bfd_nosymbols_bfd_make_debug_symbol),
3228 ( _bfd_nosymbols_read_minisymbols),
3229 ( _bfd_nosymbols_minisymbol_to_symbol),
3230 (_bfd_nodynamic_get_synthetic_symtab): New functions.
3231 * libbfd-in.h: Declare new functions. Update existing defines,
3233 * aix386-core.c: Update to use new hooks. Formatting.
3234 * aout-adobe.c: Likewise.
3235 * aout-arm.c: Likewise.
3236 * aout-target.h: Likewise.
3237 * aout-tic30.c: Likewise.
3238 * aoutf1.h: Likewise.
3239 * binary.c: Likewise.
3241 * cisco-core.c: Likewise.
3242 * coff-alpha.c: Likewise.
3243 * coff-i386.c: Likewise.
3244 * coff-i860.c: Likewise.
3245 * coff-i960.c: Likewise.
3246 * coff-ia64.c: Likewise.
3247 * coff-mips.c: Likewise.
3248 * coff-ppc.c: Likewise.
3249 * coff-rs6000.c: Likewise.
3250 * coff-sh.c: Likewise.
3251 * coff-tic30.c: Likewise.
3252 * coff-tic54x.c: Likewise.
3253 * coff-x86_64.c: Likewise.
3254 * coff64-rs6000.c: Likewise.
3255 * coffcode.h: Likewise.
3256 * elf-m10300.c: Likewise.
3257 * elf32-cr16.c: Likewise.
3258 * elf32-lm32.c: Likewise.
3259 * elf32-m32r.c: Likewise.
3260 * elf32-metag.c: Likewise.
3261 * elf32-score.c: Likewise.
3262 * elf32-score7.c: Likewise.
3263 * elf32-tilepro.c: Likewise.
3264 * elf32-xstormy16.c: Likewise.
3265 * elf32-xtensa.c: Likewise.
3266 * elf64-alpha.c: Likewise.
3267 * elf64-hppa.c: Likewise.
3268 * elf64-ia64-vms.c: Likewise.
3269 * elf64-mmix.c: Likewise.
3270 * elf64-sh64.c: Likewise.
3271 * elfnn-ia64.c: Likewise.
3272 * elfxx-sparc.c: Likewise.
3273 * elfxx-target.h: Likewise.
3274 * elfxx-tilegx.c: Likewise.
3275 * elfxx-x86.h: Likewise.
3276 * hp300hpux.c: Likewise.
3277 * hppabsd-core.c: Likewise.
3278 * hpux-core.c: Likewise.
3279 * i386msdos.c: Likewise.
3280 * i386os9k.c: Likewise.
3283 * irix-core.c: Likewise.
3284 * libaout.h: Likewise.
3285 * libecoff.h: Likewise.
3286 * mach-o-target.c: Likewise.
3287 * mach-o.c: Likewise.
3288 * mipsbsd.c: Likewise.
3290 * netbsd-core.c: Likewise.
3291 * nlm-target.h: Likewise.
3292 * oasys.c: Likewise.
3293 * osf-core.c: Likewise.
3294 * pdp11.c: Likewise.
3295 * pe-mips.c: Likewise.
3296 * pe-x86_64.c: Likewise.
3298 * plugin.c: Likewise.
3299 * ppcboot.c: Likewise.
3300 * ptrace-core.c: Likewise.
3301 * sco5-core.c: Likewise.
3303 * sparclynx.c: Likewise.
3305 * tekhex.c: Likewise.
3306 * trad-core.c: Likewise.
3307 * verilog.c: Likewise.
3308 * versados.c: Likewise.
3309 * vms-alpha.c: Likewise.
3310 * vms-lib.c: Likewise.
3311 * wasm-module.c: Likewise.
3313 * libbfd.h: Regenerate.
3315 2018-02-15 Jim Wilson <jimw@sifive.com>
3317 * elfnn-riscv.c (_bfd_riscv_relax_section): Ifdef out check to ignore
3318 symbols whose section address is zero.
3320 * elfnn-riscv.c (riscv_elf_relocate_section): Use bfd_reloc_dangerous
3321 when pcrel_lo reloc has an addend. Use reloc_dangerous callback for
3322 bfd_reloc_dangerous. Use einfo instead of warning callback for errors.
3323 Add %X%P to error messages.
3325 2018-02-15 Eric Botcazou <ebotcazou@adacore.com>
3328 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
3329 Pass FALSE instead of TRUE as 'create' argument to bfd_link_hash_lookup
3330 and assert that the result of the call is not NULL.
3332 2018-02-14 Nick Clifton <nickc@redhat.com>
3335 Revert previous delta. Add extra casts to avoid compile time
3337 * libbfd-in.h (_bfd_generic_bfd_copy_private_bfd_data): Add extra
3338 cast to avoid warning from gcc v8 compiler.
3339 (_bfd_generic_bfd_merge_private_bfd_data): Likewise.
3340 (_bfd_generic_bfd_set_private_flags): Likewise.
3341 (_bfd_generic_bfd_copy_private_section_data): Likewise.
3342 (_bfd_generic_bfd_copy_private_symbol_data): Likewise.
3343 (_bfd_generic_bfd_copy_private_header_data): Likewise.
3344 (_bfd_generic_bfd_print_private_bfd_data): Likewise.
3345 (_bfd_noarchive_construct_extended_name_table): Likewise.
3346 (_bfd_noarchive_truncate_arname): Likewise.
3347 (_bfd_noarchive_write_ar_hdr): Likewise.
3348 (_bfd_noarchive_get_elt_at_index): Likewise.
3349 (_bfd_nosymbols_canonicalize_symtab): Likewise.
3350 (_bfd_nosymbols_print_symbol): Likewise.
3351 (_bfd_nosymbols_get_symbol_info): Likewise.
3352 (_bfd_nosymbols_get_symbol_version_string): Likewise.
3353 (_bfd_nosymbols_bfd_is_local_label_name): Likewise.
3354 (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise.
3355 (_bfd_nosymbols_get_lineno): Likewise.
3356 (_bfd_nosymbols_find_nearest_line): Likewise.
3357 (_bfd_nosymbols_find_line): Likewise.
3358 (_bfd_nosymbols_find_inliner_info): Likewise.
3359 (_bfd_nosymbols_bfd_make_debug_symbol): Likewise.
3360 (_bfd_nosymbols_read_minisymbols): Likewise.
3361 (_bfd_nosymbols_minisymbol_to_symbol): Likewise.
3362 (_bfd_norelocs_bfd_reloc_type_lookup): Likewise.
3363 (_bfd_norelocs_bfd_reloc_name_lookup): Likewise.
3364 (_bfd_nowrite_set_arch_mach): Likewise.
3365 (_bfd_nowrite_set_section_contents): Likewise.
3366 (_bfd_nolink_sizeof_headers): Likewise.
3367 (_bfd_nolink_bfd_get_relocated_section_contents): Likewise.
3368 (_bfd_nolink_bfd_relax_section): Likewise.
3369 (_bfd_nolink_bfd_gc_sections): Likewise.
3370 (_bfd_nolink_bfd_lookup_section_flags): Likewise.
3371 (_bfd_nolink_bfd_merge_sections): Likewise.
3372 (_bfd_nolink_bfd_is_group_section): Likewise.
3373 (_bfd_nolink_bfd_discard_group): Likewise.
3374 (_bfd_nolink_bfd_link_hash_table_create): Likewise.
3375 (_bfd_nolink_bfd_link_add_symbols): Likewise.
3376 (_bfd_nolink_bfd_link_just_syms): Likewise.
3377 (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise.
3378 (_bfd_nolink_bfd_final_link): Likewise.
3379 (_bfd_nolink_bfd_link_split_section): Likewise.
3380 (_bfd_nolink_section_already_linked): Likewise.
3381 (_bfd_nolink_bfd_define_common_symbol): Likewise.
3382 (_bfd_nolink_bfd_define_start_stop): Likewise.
3383 (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise.
3384 (_bfd_nodynamic_get_synthetic_symtab): Likewise.
3385 (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise.
3386 (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise.
3387 * libbfd.c (bfd_false_any): Delete.
3388 (bfd_true_any, bfd_nullvoidptr_any, bfd_0_any): Delete.
3389 (bfd_0u_any, bfd_0l_any, _bfd_n1_any, bfd_void_any): Delete.
3390 * libbfd.h (extern): Regenerate
3391 * aout-target.h (MY_bfd_is_target_special_symbol): Add extra
3392 cast to avoid warning from gcc v8 compiler.
3393 * aout-tic30.c (tic30_aout_set_arch_mach): Likewise.
3394 * binary.c (binary_get_symbol_info): Likewise.
3395 * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
3396 * coff-mips.c (mips_ecoff_backend_data): Likewise.
3397 * coffcode.h (coff_set_alignment_hook): Likewise.
3398 (symname_in_debug_hook): Likewise.
3399 (bfd_coff_backend_data bigobj_swap_table): Likewise.
3400 * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise.
3401 * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise.
3402 * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise.
3403 * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise.
3404 * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise.
3405 * elf32-score.c (elf_backend_omit_section_dynsym): Likewise.
3406 * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise.
3407 * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise.
3408 * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise.
3409 * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise.
3410 * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise.
3411 * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise.
3412 * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise.
3413 * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise.
3414 * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise.
3415 * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise.
3416 (bfd_elfNN_bfd_make_debug_symbol): Likewise.
3417 (bfd_elfNN_bfd_merge_private_bfd_data): Likewise.
3418 (bfd_elfNN_bfd_set_private_flags): Likewise.
3419 (bfd_elfNN_bfd_is_target_special_symbol): Likewise.
3420 (elf_backend_init_index_section): Likewise.
3421 (elf_backend_allow_non_load_phdr): Likewise.
3422 * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise.
3423 * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise.
3424 * ieee.c (ieee_construct_extended_name_table): Likewise.
3425 (ieee_write_armap): Likewise.
3426 (ieee_write_ar_hdr): Likewise.
3427 (ieee_bfd_is_target_special_symbol): Likewise.
3428 * ihex.c (ihex_canonicalize_symtab): Likewise.
3429 (ihex_bfd_is_target_special_symbol): Likewise.
3430 * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise.
3431 * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise.
3432 (_bfd_ecoff_set_alignment_hook): Likewise.
3433 * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise.
3434 * mmo.c (mmo_bfd_is_target_special_symbol): Likewise.
3435 * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise.
3436 * oasys.c (oasys_construct_extended_name_table): Likewise.
3437 (oasys_write_armap): Likewise.
3438 (oasys_write_ar_hdr): Likewise.
3439 (oasys_bfd_is_target_special_symbol): Likewise.
3440 * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise.
3441 * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise.
3442 * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise.
3443 * som.c (som_bfd_is_target_special_symbol): Likewise.
3444 * srec.c (srec_bfd_is_target_special_symbol): Likewise.
3445 * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise.
3446 * verilog.c (verilog_bfd_is_target_special_symbol): Likewise.
3447 * versados.c (versados_bfd_is_target_special_symbol): Likewise.
3448 (versados_bfd_reloc_name_lookup): Likewise.
3449 * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise.
3450 (vms_bfd_define_start_stop): Likewise.
3451 (alpha_vms_bfd_is_target_special_symbol): Likewise.
3452 * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise.
3453 * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise.
3455 2018-02-14 H.J. Lu <hongjiu.lu@intel.com>
3458 * elf32-i386.c (elf_i386_check_relocs): Pass FALSE for non
3459 PC-relative PLT to NEED_DYNAMIC_RELOCATION_P.
3460 * elf64-x86-64.c (elf_x86_64_check_relocs): Create PLT for
3461 R_X86_64_PC32 reloc against dynamic function in data section.
3462 Pass TRUE for PC-relative PLT to NEED_DYNAMIC_RELOCATION_P.
3463 (elf_x86_64_relocate_section): Use PLT for R_X86_64_PC32 reloc
3464 against dynamic function in data section.
3465 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Use PLT in PIE as
3466 function address only if pcrel_plt is true.
3467 (_bfd_x86_elf_link_hash_table_create): Set pcrel_plt.
3468 * elfxx-x86.h (NEED_DYNAMIC_RELOCATION_P): Add PCREL_PLT for
3469 PC-relative PLT. If PLT is PC-relative, don't generate dynamic
3470 PC-relative relocation against a function definition in data
3471 secton in PIE. Remove the obsolete comments.
3472 (elf_x86_link_hash_table): Add pcrel_plt.
3474 2018-02-13 H.J. Lu <hongjiu.lu@intel.com>
3476 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Check bfd_link_dll,
3477 instead of bfd_link_pic, for building shared library.
3479 2018-02-13 H.J. Lu <hongjiu.lu@intel.com>
3482 * elf64-x86-64.c (is_32bit_relative_branch): Removed.
3483 (elf_x86_64_relocate_section): Check PIC relocations in PIE.
3484 Remove is_32bit_relative_branch usage. Disallow PC32 reloc
3485 against protected function in shared object.
3487 2018-02-13 Sergei Trofimovich <slyfox@inbox.ru>
3490 * po/ru.po: Fix typo in Russian translation.
3492 2018-02-13 Maciej W. Rozycki <macro@mips.com>
3494 * wasm-module.c (wasm_scan_name_function_section): Rename
3495 `index' local variable to `idx'.
3497 2018-02-13 Nick Clifton <nickc@redhat.com>
3500 Fix compile time warnings generated by gcc version 8.
3501 * libbfd-in.h: Remove extraneous text from prototypes.
3502 Add prototypes for bfd_false_any, bfd_true_any,
3503 bfd_nullvoidptr_any, bfd_0_any, bfd_0u_any, bfd_0l_any,
3504 bfd_n1_any, bfd_void_any.
3505 (_bfd_generic_bfd_copy_private_bfd_data): Use vararg based dummy
3507 (_bfd_generic_bfd_merge_private_bfd_data): Likewise.
3508 (_bfd_generic_bfd_set_private_flags): Likewise.
3509 (_bfd_generic_bfd_copy_private_section_data): Likewise.
3510 (_bfd_generic_bfd_copy_private_symbol_data): Likewise.
3511 (_bfd_generic_bfd_copy_private_header_data): Likewise.
3512 (_bfd_generic_bfd_print_private_bfd_data): Likewise.
3513 (_bfd_noarchive_construct_extended_name_table): Likewise.
3514 (_bfd_noarchive_truncate_arname): Likewise.
3515 (_bfd_noarchive_write_ar_hdr): Likewise.
3516 (_bfd_noarchive_get_elt_at_index): Likewise.
3517 (_bfd_nosymbols_canonicalize_symtab): Likewise.
3518 (_bfd_nosymbols_print_symbol): Likewise.
3519 (_bfd_nosymbols_get_symbol_info): Likewise.
3520 (_bfd_nosymbols_get_symbol_version_string): Likewise.
3521 (_bfd_nosymbols_bfd_is_local_label_name): Likewise.
3522 (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise.
3523 (_bfd_nosymbols_get_lineno): Likewise.
3524 (_bfd_nosymbols_find_nearest_line): Likewise.
3525 (_bfd_nosymbols_find_line): Likewise.
3526 (_bfd_nosymbols_find_inliner_info): Likewise.
3527 (_bfd_nosymbols_bfd_make_debug_symbol): Likewise.
3528 (_bfd_nosymbols_read_minisymbols): Likewise.
3529 (_bfd_nosymbols_minisymbol_to_symbol): Likewise.
3530 (_bfd_norelocs_bfd_reloc_type_lookup): Likewise.
3531 (_bfd_norelocs_bfd_reloc_name_lookup): Likewise.
3532 (_bfd_nowrite_set_arch_mach): Likewise.
3533 (_bfd_nowrite_set_section_contents): Likewise.
3534 (_bfd_nolink_sizeof_headers): Likewise.
3535 (_bfd_nolink_bfd_get_relocated_section_contents): Likewise.
3536 (_bfd_nolink_bfd_relax_section): Likewise.
3537 (_bfd_nolink_bfd_gc_sections): Likewise.
3538 (_bfd_nolink_bfd_lookup_section_flags): Likewise.
3539 (_bfd_nolink_bfd_merge_sections): Likewise.
3540 (_bfd_nolink_bfd_is_group_section): Likewise.
3541 (_bfd_nolink_bfd_discard_group): Likewise.
3542 (_bfd_nolink_bfd_link_hash_table_create): Likewise.
3543 (_bfd_nolink_bfd_link_add_symbols): Likewise.
3544 (_bfd_nolink_bfd_link_just_syms): Likewise.
3545 (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise.
3546 (_bfd_nolink_bfd_final_link): Likewise.
3547 (_bfd_nolink_bfd_link_split_section): Likewise.
3548 (_bfd_nolink_section_already_linked): Likewise.
3549 (_bfd_nolink_bfd_define_common_symbol): Likewise.
3550 (_bfd_nolink_bfd_define_start_stop): Likewise.
3551 (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise.
3552 (_bfd_nodynamic_get_synthetic_symtab): Likewise.
3553 (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise.
3554 (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise.
3555 * libbfd.c (bfd_false_any): New function. Like bfd_false but
3556 accepts one or more arguments.
3557 (bfd_true_any): Likewise.
3558 (bfd_nullvoidptr_any): Likewise.
3559 (bfd_0_any): Likewise.
3560 (bfd_0u_any): Likewise.
3561 (bfd_0l_any): Likewise.
3562 (_bfd_n1_any): Likewise.
3563 (bfd_void_any): Likewise.
3564 * libbfd.h (extern): Regenerate
3565 * aout-target.h (MY_bfd_is_target_special_symbol): Use vararg
3566 based dummy function.
3567 * aout-tic30.c (tic30_aout_set_arch_mach): Likewise.
3568 * binary.c (binary_get_symbol_info): Likewise.
3569 * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
3570 * coff-mips.c (mips_ecoff_backend_data): Likewise.
3571 * coffcode.h (coff_set_alignment_hook): Likewise.
3572 (symname_in_debug_hook): Likewise.
3573 (bfd_coff_backend_data bigobj_swap_table): Likewise.
3574 * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise.
3575 * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise.
3576 * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise.
3577 * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise.
3578 * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise.
3579 * elf32-score.c (elf_backend_omit_section_dynsym): Likewise.
3580 * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise.
3581 * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise.
3582 * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise.
3583 * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise.
3584 * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise.
3585 * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise.
3586 * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise.
3587 * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise.
3588 * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise.
3589 * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise.
3590 (bfd_elfNN_bfd_make_debug_symbol): Likewise.
3591 (bfd_elfNN_bfd_merge_private_bfd_data): Likewise.
3592 (bfd_elfNN_bfd_set_private_flags): Likewise.
3593 (bfd_elfNN_bfd_is_target_special_symbol): Likewise.
3594 (elf_backend_init_index_section): Likewise.
3595 (elf_backend_allow_non_load_phdr): Likewise.
3596 * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise.
3597 * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise.
3598 * ieee.c (ieee_construct_extended_name_table): Likewise.
3599 (ieee_write_armap): Likewise.
3600 (ieee_write_ar_hdr): Likewise.
3601 (ieee_bfd_is_target_special_symbol): Likewise.
3602 * ihex.c (ihex_canonicalize_symtab): Likewise.
3603 (ihex_bfd_is_target_special_symbol): Likewise.
3604 * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise.
3605 * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise.
3606 (_bfd_ecoff_set_alignment_hook): Likewise.
3607 * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise.
3608 * mmo.c (mmo_bfd_is_target_special_symbol): Likewise.
3609 * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise.
3610 * oasys.c (oasys_construct_extended_name_table): Likewise.
3611 (oasys_write_armap): Likewise.
3612 (oasys_write_ar_hdr): Likewise.
3613 (oasys_bfd_is_target_special_symbol): Likewise.
3614 * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise.
3615 * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise.
3616 * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise.
3617 * som.c (som_bfd_is_target_special_symbol): Likewise.
3618 * srec.c (srec_bfd_is_target_special_symbol): Likewise.
3619 * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise.
3620 * verilog.c (verilog_bfd_is_target_special_symbol): Likewise.
3621 * versados.c (versados_bfd_is_target_special_symbol): Likewise.
3622 (versados_bfd_reloc_name_lookup): Likewise.
3623 * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise.
3624 (vms_bfd_define_start_stop): Likewise.
3625 (alpha_vms_bfd_is_target_special_symbol): Likewise.
3626 * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise.
3627 * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise.
3628 * elf32-arc.c (get_replace_function): Assign replacement function
3630 * elf32-i370.c (i370_noop): Update prototype.
3632 2018-02-13 Alan Modra <amodra@gmail.com>
3635 * elf.c (_bfd_elf_fixup_group_sections): Account for removed
3636 relocation sections. If size reduces to just the flag word,
3637 remove that too and mark with SEC_EXCLUDE.
3638 * elflink.c (bfd_elf_final_link): Strip empty group sections.
3640 2018-02-13 Alan Modra <amodra@gmail.com>
3643 * elf.c (assign_file_positions_for_non_load_sections): Rewrite
3646 2018-02-12 Zebediah Figura <z.figura12@gmail.com>
3648 * i386msdos.c (msdos_mkobject); New function.
3649 (msdos_object_p): New function.
3650 (i386_msdos_vec): Use msdos_object_p as the check_format
3652 * peicode.h: Rename external_PEI_DOS_hdr, DOSMAGIC, and
3653 NT_SIGNATURE to external_DOS_hdr, IMAGE_DOS_SIGNATURE, and
3655 * peXXigen.c: Likewise.
3656 * coff-ia64.c: Likewise.
3658 2018-02-12 Nick Clifton <nickc@redhat.com>
3660 * elf32-nds32.c (nds32_elf_relax_longjump3): Remove redundant
3662 * elf32-arc.c (elf_arc_relocate_section): Likewise.
3664 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
3666 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Reorder conditions.
3667 (sparc_elf_append_rela): Assert that there is enough room in section.
3668 (_bfd_sparc_elf_copy_indirect_symbol): Fix formatting.
3669 (_bfd_sparc_elf_adjust_dynamic_symbol): Minor tweak.
3670 (allocate_dynrelocs): Remove outdated comments and reorder conditions.
3671 For a symbol subject to a GOT relocation, reserve a slot in the
3672 relocation section if the symbol isn't dynamic and we are in PIC mode.
3673 (_bfd_sparc_elf_relocate_section) <R_SPARC_GOTDATA_OP>: If relocation
3674 is relaxed and a slot was reserved, generate a R_SPARC_NONE relocation.
3675 <R_SPARC_GOTDATA_OP_HIX22>: Adjust comments.
3676 <R_SPARC_PC10>: Reorder conditions. Remove always-false assertion.
3677 (_bfd_sparc_elf_finish_dynamic_symbol): Rename local_undefweak into
3678 resolved_to_zero. Do not generate a dynamic GOT relocation for an
3679 undefined weak symbol with non-default visibility. Remove superfluous
3680 'else' and fix formatting.
3682 2018-02-09 H.J. Lu <hongjiu.lu@intel.com>
3684 * elf32-i386.c (elf_i386_get_synthetic_symtab): Also handle
3686 (i386_elf32_sol2_vec): Don't declare.
3687 (elf_i386_link_setup_gnu_properties): Also handle is_solaris.
3688 Don't set need_global_offset_table.
3689 (elf_i386_solaris_arch_bed): New.
3690 (elf_backend_arch_data): Set to elf_i386_solaris_arch_bed for
3692 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Check
3693 target_os != is_nacl instead of target_os == is_normal.
3694 (x86_64_elf64_sol2_vec): Don't declare.
3695 (elf_x86_64_link_setup_gnu_properties): Check target_os !=
3696 is_nacl instead of target_os == is_normal. Don't set
3697 need_global_offset_table.
3698 (elf_x86_64_solaris_arch_bed): New.
3699 (elf_backend_arch_data): Set to elf_x86_64_solaris_arch_bed for
3701 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep
3702 _GLOBAL_OFFSET_TABLE_ for Solaris.
3703 (_bfd_x86_elf_link_setup_gnu_properties): Don't copy
3704 need_global_offset_table.
3705 * elfxx-x86.h (elf_x86_target_os): Add is_solaris.
3706 (elf_x86_link_hash_table): Remove need_global_offset_table.
3707 (elf_x86_init_table): Likewise.
3709 2018-02-08 H.J. Lu <hongjiu.lu@intel.com>
3711 * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
3713 (i386_elf32_sol2_vec): Declared.
3714 (elf_i386_link_setup_gnu_properties): Set
3715 need_global_offset_table with info->output_bfd->xvec.
3716 * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
3718 (x86_64_elf64_sol2_vec): Declared.
3719 (elf_x86_64_link_setup_gnu_properties): Set
3720 need_global_offset_table with info->output_bfd->xvec.
3722 2018-02-08 H.J. Lu <hongjiu.lu@intel.com>
3724 * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
3726 (elf_i386_link_setup_gnu_properties): Set need_global_offset_table
3728 * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
3730 (elf_x86_64_link_setup_gnu_properties): Set
3731 need_global_offset_table for Solaris.
3732 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep the
3733 unused _GLOBAL_OFFSET_TABLE_ for Solaris.
3734 (_bfd_x86_elf_link_setup_gnu_properties): Copy
3735 need_global_offset_table.
3736 * elfxx-x86.h (elf_x86_link_hash_table): Add
3737 need_global_offset_table.
3738 (elf_x86_init_table): Likewise.
3740 2018-02-08 Jim Wilson <jimw@sifive.com>
3742 * elfnn-riscv.c (riscv_elf_relocate_section): Add comment for previous
3745 2018-02-08 Nick Clifton <nickc@redhat.com>
3748 * elf.c (elf_parse_notes): Reject notes with excessuively large
3751 2018-02-07 Alan Modra <amodra@gmail.com>
3753 Revert 2018-01-17 Alan Modra <amodra@gmail.com>
3754 * elf32-ppc.c: Remove speculation barrier support.
3755 * elf32-ppc.h: Likewise.
3756 * elf64-ppc.c: Likewise.
3757 * elf64-ppc.h: Likewise.
3759 2018-02-06 Jim Wilson <jimw@sifive.com>
3761 * elfnn-riscv.c (riscv_elf_relocate_section): Return TRUE if used
3762 callback to report an error.
3764 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
3767 * elfxx-sparc.c (sparc_elf_tls_transition): Turn call to bfd_link_pic
3768 into call to !bfd_link_executable and tidy up.
3769 (_bfd_sparc_elf_check_relocs): Fix formatting and tidy up.
3770 <R_SPARC_TLS_LE_HIX22>: Turn call to bfd_link_pic into call to
3771 !bfd_link_executable.
3772 <R_SPARC_TLS_IE_HI22>: Likewise.
3773 <GOT relocations>: Remove useless code, tidy and merge related blocks.
3774 <R_SPARC_TLS_GD_CALL>: Turn call to bfd_link_pic into call to
3775 !bfd_link_executable.
3776 <R_SPARC_WPLT30>: Tidy up.
3777 (_bfd_sparc_elf_gc_mark_hook): Turn call to bfd_link_pic into call to
3778 !bfd_link_executable.
3779 (allocate_dynrelocs): Likewise.
3780 (_bfd_sparc_elf_relocate_section): Fix formatting and tidy up.
3781 <R_SPARC_TLS_GD_HI22>: Merge into...
3782 <R_SPARC_TLS_GD_LO10>: ...this. Adjust 4th argument in call to
3783 sparc_elf_tls_transition and remove redundant code.
3784 <R_SPARC_TLS_LDM_HI22>: Turn call to bfd_link_pic into call to
3785 !bfd_link_executable.
3786 <R_SPARC_TLS_LDO_HIX22>: Likewise.
3787 <R_SPARC_TLS_LE_HIX22>: Likewise. Tidy up.
3788 <R_SPARC_TLS_LDM_CALL>: Likewise.
3789 <R_SPARC_TLS_GD_CALL>: Likewise. Tidy up.
3790 <R_SPARC_TLS_GD_ADD>: Likewise.
3791 <R_SPARC_TLS_LDM_ADD>: Likewise.
3792 <R_SPARC_TLS_LDO_ADD>: Likewise.
3793 <R_SPARC_TLS_IE_LD>: Likewise.
3795 2018-02-06 Miloš Stojanović <milos.stojanovic@rt-rk.com>
3798 * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): If the dwarf
3799 functions failed to find the function name, try the generic elf
3800 find function instead.
3802 2018-02-06 Sergio Durigan Junior <sergiodj@redhat.com>
3804 * coff-rs6000.c (xcoff_write_archive_contents_old): Use
3805 'memcpy' instead of 'strncpy' when writing the magic number.
3807 2018-02-06 Nick Clifton <nickc@redhat.com>
3810 * opncls.c (bfd_get_debug_link_info_1): Check the size of the
3811 section before attempting to read it in.
3812 (bfd_get_alt_debug_link_info): Likewise.
3814 2018-02-06 Paul Carroll <pcarroll@codesourcery.com>
3816 * bfd/dwarf2.c (find_abstract_name): Modified to return file and
3817 line information in addition to name, if they can be found.
3819 2018-02-05 Renlin Li <renlin.li@arm.com>
3822 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Relax the
3823 R_AARCH64_ABS32 and R_AARCH64_ABS16 for absolute symbol. Apply the
3824 check for writeable section as well.
3826 2018-02-05 H.J. Lu <hongjiu.lu@intel.com>
3829 * elf32-i386.c (elf_i386_check_relocs): Set got_referenced if
3830 _GLOBAL_OFFSET_TABLE_ is referenced or GOT is needed to resolve
3831 undefined weak symbol to 0.
3832 * elf64-x86-64.c (elf_x86_64_check_relocs): Set got_referenced
3833 if _GLOBAL_OFFSET_TABLE_ is referenced.
3834 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Check
3835 got_referenced instead of ref_regular_nonweak. Remove the
3836 unused _GLOBAL_OFFSET_TABLE_ from symbol table.
3837 * elfxx-x86.h (elf_x86_link_hash_table): Add got_referenced.
3839 2018-02-05 Maciej W. Rozycki <macro@mips.com>
3841 * elfnn-riscv.c (_bfd_riscv_relax_pc): Use `memset' to
3842 initialize `hi_reloc'.
3844 2018-02-05 Maciej W. Rozycki <macro@mips.com>
3846 * elfxx-mips.c (_bfd_mips_elf_section_processing): For
3847 SHT_MIPS_REGINFO sections don't assert the correct size and
3848 report an error instead.
3850 2018-02-05 Maciej W. Rozycki <macro@mips.com>
3852 * elf.c (_bfd_elf_write_object_contents): Propagate a failure
3853 status from `->elf_backend_section_processing'.
3855 2018-02-02 Jim Wilson <jimw@sifive.com>
3858 * elfnn-riscv.c (riscv_relax_delete_bytes): New parameter link_info.
3859 If link_info->wrap_hash, check for a duplicate symbol and ignore.
3860 (_bfd_riscv_relax_call, bfd_riscv_relax_lui, _bfd_riscv_relax_tls_le):
3861 Pass new argument to riscv_relax_delete_bytes.
3862 (_bfd_riscv_relax_align, _bfd_riscv_relax_delete): Likewise. Remove
3863 ATTRIBUTE_UNUSED from link_info parameter.
3865 2018-02-02 Alan Modra <amodra@gmail.com>
3867 * elf64-ppc.c (ppc64_elf_relocate_section): Don't relocate nops
3868 emitted for toc sequence optimization. Set and use "howto" later.
3870 2018-02-01 Simon Marchi <simon.marchi@ericsson.com>
3872 * elf64-ppc.c (ppc64_elf_archive_symbol_lookup): Avoid pointer
3873 arithmetic on NULL pointer.
3874 * elflink.c (_bfd_elf_archive_symbol_lookup,
3875 elf_link_add_archive_symbols): Likewise.
3877 2018-01-31 Michael Matz <matz@suse.de>
3879 * elflink.c (bfd_elf_define_start_stop): Fix check of
3882 2018-01-31 H.J. Lu <hongjiu.lu@intel.com>
3885 * elflink.c (bfd_elf_define_start_stop): Check if __start and
3886 __stop symbols are referenced by shared objects.
3888 2018-01-30 Alan Modra <amodra@gmail.com>
3891 * elf.c (_bfd_elf_map_sections_to_segments): Don't start a new
3892 segment when demand paged with lma on the same page. Test this
3893 before load/non-load, executable/non-executable,
3894 writable/non-writable tests and simplify. Delete bogus relro
3895 condition in writable/non-writable test. Delete outdated
3896 comment. Formatting.
3898 2018-01-30 Alan Modra <amodra@gmail.com>
3900 * elflink.c (bfd_elf_define_start_stop): Make __start and __stop
3903 2018-01-29 Alan Modra <amodra@gmail.com>
3906 * coffgen.c (coff_pointerize_aux): Ensure auxent tagndx is in
3907 range before converting to a symbol table pointer.
3909 2018-01-27 Nick Clifton <nickc@redhat.com>
3911 * po/ru.po: Updated Russian translation.
3913 2018-01-26 Alan Modra <amodra@gmail.com>
3915 * elflink.c (bfd_elf_define_start_stop): Override symbols when
3916 they are defined dynamically.
3918 2018-01-26 Alan Modra <amodra@gmail.com>
3920 * elf64-ppc.c (ppc64_elf_size_stubs): Iterate sizing when
3921 .branch_lt changes size.
3923 2018-01-25 Alan Modra <amodra@gmail.com>
3926 * elfcode.h (elf_object_p): Avoid integer overflow.
3928 2018-01-25 Eric Botcazou <ebotcazou@adacore.com>
3931 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
3932 Do a mere lookup of the __tls_get_addr symbol instead of adding it.
3935 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
3938 * elfxx-sparc.c (sparc_elf_tls_transition): Replace
3939 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
3940 bfd_link_executable for TLS check.
3941 (_bfd_sparc_elf_check_relocs): Likewise.
3942 (allocate_dynrelocs): Likewise.
3943 (_bfd_sparc_elf_relocate_section): Likewise.
3945 2018-01-24 Renlin Li <renlin.li@arm.com>
3947 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Add support for
3948 BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
3949 BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
3950 BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
3951 BFD_RELOC_AARCH64_MOVW_PREL_G3.
3952 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
3953 (_bfd_aarch64_elf_resolve_relocation): Likewise.
3955 2018-01-24 Renlin Li <renlin.li@arm.com>
3957 * reloc.c: Add BFD_RELOC_AARCH64_MOVW_PREL_G0,
3958 BFD_RELOC_AARCH64_MOVW_PREL_G0_NC, BFD_RELOC_AARCH64_MOVW_PREL_G1,
3959 BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, BFD_RELOC_AARCH64_MOVW_PREL_G2,
3960 BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, BFD_RELOC_AARCH64_MOVW_PREL_G3.
3961 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Add entries for
3962 BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
3963 BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
3964 BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
3965 BFD_RELOC_AARCH64_MOVW_PREL_G3.
3966 * bfd-in2.h: Regenerate.
3967 * libbfd.h: Regenerate.
3969 2018-01-23 Maciej W. Rozycki <macro@mips.com>
3971 * elfxx-mips.c (_bfd_mips_elf_final_link): Update a stale
3972 `mips_elf32_section_processing' comment reference.
3974 2018-01-20 H.J. Lu <hongjiu.lu@intel.com>
3977 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Check the
3978 versioned __tls_get_addr symbol.
3980 2018-01-19 Nick Clifton <nickc@redhat.com>
3982 * po/fr.po: Updated French translation.
3984 2018-01-18 Alan Modra <amodra@gmail.com>
3986 * elf32-ppc.c (ppc_elf_create_glink): Correct alignment of .glink.
3987 * elf64-ppc.c (ppc64_elf_size_stubs): Handle negative plt_stub_align.
3988 (ppc64_elf_build_stubs): Likewise.
3990 2018-01-17 Nick Clifton <nickc@redhat.com>
3992 * po/ru.po: Updated Russian translation.
3993 * po/uk/po: Updated Ukranian translation.
3995 2018-01-17 Alan Modra <amodra@gmail.com>
3997 * elf64-ppc.c (ppc64_elf_build_stubs): Silence gcc warning.
3999 2018-01-17 Alan Modra <amodra@gmail.com>
4001 * elf32-ppc.c (GLINK_ENTRY_SIZE): Handle speculation barrier.
4002 (CRSETEQ, BEQCTRM): Define.
4003 (is_nonpic_glink_stub): Don't check bctr.
4004 (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
4005 (ppc_elf_relax_section): Size speculation barrier.
4006 (output_bctr): New function.
4007 (write_glink_stub): Use output_bctr.
4008 (ppc_elf_relocate_section): Use output_bctr for long branch stub.
4009 (ppc_elf_finish_dynamic_symbol): Likewise.
4010 (ppc_elf_finish_dynamic_sections): Use output_bctr.
4011 * elf32-ppc.h (struct ppc_elf_params): Add speculate_indirect_jumps.
4012 * elf64-ppc.c (CRSETEQ, BEQCTRM, BEQCTRLM): Define.
4013 (GLINK_PLTRESOLVE_SIZE): Size speculation barrier.
4014 (size_global_entry_stubs): Handle speculation barrier sizing.
4015 (plt_stub_size): Likewise.
4016 (output_bctr): New function.
4017 (build_plt_stub, build_tls_get_addr_stub): Output speculation
4019 (ppc_build_one_stub): Likewise for ppc_stub_plt_branch.
4020 (ppc_size_one_stub): Size speculation barrier in ppc_stub_plt_branch.
4021 (build_global_entry_stubs): Output speculation barrier.
4022 (ppc64_elf_build_stubs): Likewise in __glink_PLTresolve stub.
4023 * elf64-ppc.h (struct ppc64_elf_params): Add speculate_indirect_jumps.
4025 2018-01-17 Alan Modra <amodra@gmail.com>
4027 * elf32-ppc.c (GLINK_ENTRY_SIZE): Add parameters, handle
4028 __tls_get_addr_opt, and alignment sizing.
4029 (TLS_GET_ADDR_GLINK_SIZE): Delete.
4030 (is_nonpic_glink_stub): Don't use GLINK_ENTRY_SIZE.
4031 (ppc_elf_get_synthetic_symtab): Recognize stubs spaced at 4, 6,
4033 (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
4034 (allocate_dynrelocs): Use new GLINK_ENTRY_SIZE.
4035 (ppc_elf_size_dynamic_sections): Likewise. Size branch table
4037 (write_glink_stub): Handle __tls_get_addr_opt stub.
4038 Pad out to size given by GLINK_ENTRY_SIZE.
4039 (ppc_elf_relocate_section): Adjust write_glink_stub call.
4040 (ppc_elf_finish_dynamic_symbol): Likewise.
4041 (ppc_elf_finish_dynamic_sections): Write PLTresolve without using
4042 insn array since so many need rewriting.
4043 * elf32-ppc.h (struct ppc_elf_params): Add plt_stub_align.
4044 * elf64-ppc.c (GLINK_PLTRESOLVE_SIZE): Rename from
4045 GLINK_CALL_STUB_SIZE. Add htab param and evaluate to size without
4046 nops. Adjust all uses.
4047 (ppc64_elf_get_synthetic_symtab): Don't use GLINK_CALL_STUB_SIZE
4048 in glink_vma calculation.
4049 (struct ppc_link_hash_table): Add global_entry section pointer.
4050 (create_linkage_sections): Create separate section for global
4052 (PPC_LO, PPC_HI, PPC_HA): Move earlier.
4053 (size_global_entry_stubs): Handle sizing for aligned stubs.
4054 (ppc64_elf_size_dynamic_sections): Handle global_entry alloc,
4055 and don't stash end of glink branch table in rawsize.
4056 (ppc_build_one_stub): Rewrite stub size calculations.
4057 (build_global_entry_stubs): Use new section.
4058 (ppc64_elf_build_stubs): Don't pad __glink_PLTresolve with nops.
4059 Build lazy link stubs out to end of section. Build global entry
4060 stubs in new section.
4062 2018-01-15 Nick Clifton <nickc@redhat.com>
4064 * po/uk.po: Updated Ukranian translation.
4066 2018-01-13 Nick Clifton <nickc@redhat.com>
4068 * po/bfd.pot: Regenerated.
4070 2018-01-13 Nick Clifton <nickc@redhat.com>
4072 * version.m4: Bump version to 2.30.51
4073 * configure: Regenerate.
4075 2018-01-13 Nick Clifton <nickc@redhat.com>
4077 2.30 branch created.
4079 2018-01-12 Jens Widell <jl@opera.com>
4081 * elf.c (setup_group): Optimize search for group by remembering
4082 last found group and restarting search at that index.
4083 * elf-bfd.h (struct elf_obj_tdata): Add group_search_offset field.
4085 2018-01-12 Gunther Nikl <gnikl@users.sourceforge.net>
4087 * aoutx.h (aout_link_check_ar_symbols): Remove default and handle
4088 bfd_link_common_skip_none in switch.
4090 2018-01-12 Alan Modra <amodra@gmail.com>
4093 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Ignore dynamic
4094 references on forced local symbols.
4096 2018-01-12 Vlad Ivanov <vlad@ivanov.email>
4098 * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when
4099 .reginfo section has wrong size.
4101 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
4104 * elf.c (_bfd_elf_map_sections_to_segments): When generating
4105 separate code and read-only data LOAD segments, create a new
4106 LOAD segment if the previous section contains text and the
4107 current section doesn't or vice versa. Don't put a writable
4108 section in a read-only segment if there is a RELRO segment.
4110 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
4113 * elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Ignore dynamic
4114 references on forced local symbols.
4116 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
4119 * elflink.c (bfd_elf_gc_sections): Keep all PREINIT_ARRAY,
4120 INIT_ARRAY as well as FINI_ARRAY sections for ld -r --gc-section.
4122 2018-01-09 Kuan-Lin Chen <kuanlinchentw@gmail.com>
4125 * elf32-nds32.c (nds32_elf_relax_loadstore): Fix a typographical error.
4127 2018-01-03 John Baldwin <jhb@FreeBSD.org>
4129 * elf.c (elfcore_grok_freebsd_note): Handle
4130 NT_FREEBSD_PROCSTAT_PROC, NT_FREEBSD_PROCSTAT_FILES, and
4131 NT_FREEBSD_PROCSTAT_VMMAP.
4133 2018-01-03 Alan Modra <amodra@gmail.com>
4135 Update year range in copyright notice of all files.
4137 For older changes see ChangeLog-2017
4139 Copyright (C) 2018 Free Software Foundation, Inc.
4141 Copying and distribution of this file, with or without modification,
4142 are permitted in any medium without royalty provided the copyright
4143 notice and this notice are preserved.
4149 version-control: never