1 2018-09-25 Jim Wilson <jimw@sifive.com>
3 * elfnn-riscv.c (riscv_make_plt_header): New arg output_bfd. Change
4 return type to bfd_boolean. If EF_RISCV_RVE call _bfd_error_handler
5 and return FALSE. Return TRUE at end.
6 (riscv_make_plt_entry): Likewise.
7 (riscv_elf_finish_dynamic_symbol): Update call to riscv_make_plt_entry.
8 (riscv_elf_finish_dynamic_sections): Update call to
11 2018-09-24 Jim Wilson <jimw@sifive.com>
13 * elfnn-riscv.c (_bfd_riscv_relax_pc) <R_RISCV_PCREL_LO12_I>: New local
14 hi_sec_off which is symbol address with addend subtracted. Use in
15 riscv_find_pcgp_hi_reloc and riscv_record_pcgp_lo_reloc calls.
17 * elfnn-riscv.c (riscv_resolve_pcrel_lo_relocs): Add check for reloc
18 overflow with addend. Use reloc_dangerous instead of reloc_overflow.
19 Add strings for the two errors handled here.
20 (riscv_elf_relocate_section) In case R_RISCV_PCREL_LO12_I, rewrite
21 comment. Only give error with addend when used with section symbol.
22 In case bfd_reloc_dangerous, update error string.
24 2018-09-24 Jozef Lawrynowicz <jozef.l@mittosystems.com>
27 * elf.c (_bfd_elf_write_object_contents): Return from function
28 early if abfd->direction == both_direction.
30 2018-09-21 Simon Marchi <simon.marchi@ericsson.com>
32 * configure.ac: Check for fls.
33 * elf32-nds32.c (fls): Only define if !HAVE_FLS.
34 * config.in: Re-generate.
35 * configure: Re-generate.
37 2018-09-20 Maciej W. Rozycki <macro@linux-mips.org>
39 * config.bfd <rs6000-*-aix5.[01], rs6000-*-aix[5-9]*>: Remove
40 duplicate `case' selectors.
42 2018-09-20 Nelson Chu <nelson.chu1990@gmail.com>
44 * elf32-nds32.c (nds32_elf_relax_loadstore):
45 Remove the unused target features.
46 (bfd_elf32_nds32_set_target_option): Remove the unused parameters.
47 (nds32_elf_relax_piclo12, nds32_elf_relax_letlslo12,
48 nds32_elf_relax_letlsadd, nds32_elf_relax_letlsls,
49 nds32_elf_relax_pltgot_suff, nds32_elf_relax_got_suff
50 nds32_elf_relax_gotoff_suff, calculate_plt_memory_address,
51 calculate_plt_offset, calculate_got_memory_address,
52 nds32_elf_check_dup_relocs): Removed.
54 * elf32-nds32.h: Remove the unused macros and defines.
55 (elf_nds32_link_hash_table): Remove the unused variable.
56 (bfd_elf32_nds32_set_target_option): Update prototype.
57 (nds32_elf_ex9_init): Removed.
58 * elf32-nds32.c (nds32_convert_32_to_16): Updated.
59 * elf32-nds32.c (HOWTO2, HOWTO3): Define new HOWTO macros
60 to initialize array nds32_elf_howto_table in any order
61 without lots of EMPTY_HOWTO.
62 (nds32_reloc_map): Updated.
63 * reloc.c: Add BFD_RELOC_NDS32_LSI.
64 * bfd-in2.h: Regenerated.
65 * bfd/libbfd.h: Regenerated.
66 * elf32-nds32.c (nds32_elf_relax_howto_table): Add R_NDS32_LSI.
67 (nds32_reloc_map): Likewise.
68 (nds32_elf_relax_flsi): New function.
69 (nds32_elf_relax_section): Support floating load/store relaxation.
70 * elf32-nds32.c (NDS32_GUARD_SEC_P, elf32_nds32_local_gp_offset):
72 (struct elf_nds32_link_hash_entry): New `offset_to_gp' field.
73 (struct elf_nds32_obj_tdata): New `offset_to_gp' and `hdr_size' fields.
74 (elf32_nds32_allocate_local_sym_info, nds32_elf_relax_guard,
75 nds32_elf_is_target_special_symbol, nds32_elf_maybe_function_sym):
77 (nds32_info_to_howto_rel): Add BFD_ASSERT.
78 (bfd_elf32_bfd_reloc_type_table_lookup, nds32_elf_link_hash_newfunc,
79 nds32_elf_link_hash_table_create, nds32_elf_relocate_section,
80 nds32_elf_relax_loadstore, nds32_elf_relax_lo12, nds32_relax_adjust_label,
81 bfd_elf32_nds32_set_target_option, nds32_fag_mark_relax): Updated.
82 (nds32_elf_final_sda_base): Improve it to find the better gp value.
83 (insert_nds32_elf_blank): Must consider `len' when inserting blanks.
84 * elf32-nds32.h (bfd_elf32_nds32_set_target_option): Update prototype.
85 (struct elf_nds32_link_hash_table): Add new variable `hyper_relax'.
86 * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): New function.
87 (create_got_section): Likewise.
88 (allocate_dynrelocs, nds32_elf_size_dynamic_sections,
89 nds32_elf_relocate_section, nds32_elf_finish_dynamic_symbol): Updated.
90 (nds32_elf_check_relocs): Fix the issue that the shared library may
91 has TEXTREL entry in the dynamic section.
92 (nds32_elf_create_dynamic_sections): Enable to call readonly_dynrelocs
93 since the TEXTREL issue is fixed in the nds32_elf_check_relocs.
94 (nds32_elf_finish_dynamic_sections): Update and add DT_RELASZ
96 (calculate_offset): Remove the unused parameter `pic_ext_target' and
99 (elf_backend_dtrel_excludes_plt): Disable it temporarily since it
100 will cause some errors for our test cases.
101 * elf32-nds32.c (nds32_elf_merge_private_bfd_data): Allow to link the
103 * reloc.c: Add TLS relocations.
104 * libbfd.h: Regenerated.
105 * bfd-in2.h: Regenerated.
106 * elf32-nds32.h (struct section_id_list_t): New.
107 (elf32_nds32_lookup_section_id, elf32_nds32_check_relax_group,
108 elf32_nds32_unify_relax_group, nds32_elf_unify_tls_model):
110 (elf32_nds32_compute_jump_table_size, elf32_nds32_local_tlsdesc_gotent):
112 (nds32_insertion_sort, bfd_elf32_nds32_set_target_option,
113 elf_nds32_link_hash_table): Updated.
114 * elf32-nds32.c (enum elf_nds32_tls_type): New.
115 (struct elf32_nds32_relax_group_t, struct relax_group_list_t): New.
116 (elf32_nds32_add_dynreloc, patch_tls_desc_to_ie, get_tls_type,
117 fls, ones32, list_insert, list_insert_sibling, dump_chain,
118 elf32_nds32_check_relax_group, elf32_nds32_lookup_section_id,
119 elf32_nds32_unify_relax_group, nds32_elf_unify_tls_model): New functions.
120 (elf_nds32_obj_tdata): Add new fields.
121 (elf32_nds32_relax_group_ptr, nds32_elf_local_tlsdesc_gotent): New macros.
122 (nds32_elf_howto_table): Add TLS relocations.
123 (nds32_reloc_map): Likewise.
124 (nds32_elf_copy_indirect_symbol, nds32_elf_size_dynamic_sections,
125 nds32_elf_finish_dynamic_symbol, elf32_nds32_allocate_local_sym_info,
126 nds32_elf_relocate_section, bfd_elf32_nds32_set_target_option,
127 nds32_elf_check_relocs, allocate_dynrelocs): Updated.
128 (nds32_elf_relax_section): Call nds32_elf_unify_tls_model.
129 (dtpoff_base): Rename it to `gottpof' and then update it.
131 2018-09-20 Alan Modra <amodra@gmail.com>
134 * peXXigen.c (pe_print_edata): Correct export address table
135 overflow checks. Check dataoff against section size too.
137 2018-09-20 Alan Modra <amodra@gmail.com>
140 * dwarf2.c (read_section): Error when attempting to malloc
141 "(bfd_size_type) -1".
142 * syms.c (_bfd_stab_section_find_nearest_line): Bounds check
143 function_name. Bounds check reloc address. Formatting. Ensure
144 .stabstr zero terminated.
146 2018-09-18 Nick Clifton <nickc@redhat.com>
149 * elfcode.h (elf_swap_shdr_in): Generate a warning message if an
150 ELF section has contents and size larger than the file size.
152 2018-09-14 Maciej W. Rozycki <macro@mips.com>
155 * elfxx-mips.h (_bfd_mips_elf_hide_symbol): New prototype.
156 (_bfd_mips_elf_linker_flags): Update prototype.
157 * elf32-mips.c (elf_backend_hide_symbol): New macro.
158 * elf64-mips.c (elf_backend_hide_symbol): Likewise.
159 * elfn32-mips.c (elf_backend_hide_symbol): Likewise.
160 * elfxx-mips.c (mips_elf_link_hash_table): Add
161 `use_absolute_zero' and `gnu_target' members.
162 (mips_elf_record_global_got_symbol): Call
163 `_bfd_mips_elf_hide_symbol' rather than
164 `_bfd_elf_link_hash_hide_symbol'.
165 (mips_use_local_got_p): Return FALSE if the symbol is absolute.
166 (mips_elf_obtain_contents): Reorder function.
167 (mips_elf_nullify_got_load): New function.
168 (mips_elf_calculate_relocation): Add `contents' parameter.
169 Nullify GOT loads or if it is not possible, then redirect GOT
170 relocations to the `__gnu_absolute_zero' symbol, for references
171 that are supposed to resolve to zero.
172 (mips_elf_define_absolute_zero): New function.
173 (_bfd_mips_elf_check_relocs): Prepare for arrangements made in
174 `mips_elf_calculate_relocation' for references made via the GOT
175 that are supposed to resolve to zero.
176 (_bfd_mips_elf_hide_symbol): New function.
177 (_bfd_mips_elf_linker_flags): Add the `gnu_target' parameter,
178 set the `gnu_target' member of the MIPS hash table.
179 (MIPS_LIBC_ABI_ABSOLUTE): New enumeration constant.
180 (_bfd_mips_post_process_headers): Use it.
182 2018-09-14 Maciej W. Rozycki <macro@mips.com>
184 * elfxx-mips.c (mips_elf_store_contents): New function...
185 (mips_elf_perform_relocation): ... factored out from here.
187 2018-09-14 Lifang Xia <lifang_xia@c-sky.com>
189 * elf32-csky.c (csky_elf_howto_table): Fill special_function of
191 (csky_elf_relocate_section): Add R_CKCORE_PCREL32 process.
193 2018-09-14 Alan Modra <amodra@gmail.com>
196 * reloc.c (bfd_generic_get_relocated_section_contents): Zero reloc
197 fields in debug sections when reloc is against an undefined symbol
198 and called from bfd_simple_get_relocated_section_contents or
200 * dwarf2.c (find_abstract_instance): Return true for zero offset
201 DW_FORM_ref_addr without returning values.
203 2018-09-06 Alan Modra <amodra@gmail.com>
206 * elf32-avr.c (elf_avr_special_sections): New.
207 (elf_backend_special_sections): Define.
209 2018-09-04 Jose E. Marchesi <jose.marchesi@oracle.com>
211 * elfxx-sparc.c (_bfd_sparc_elf_info_to_howto): Do not issue an
212 error when an invalid relocation is passed; this is already done
213 by `_bfd_sparc_elf_info_to_howto_ptr'.
215 2018-09-04 Jose E. Marchesi <jose.marchesi@oracle.com>
217 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Issue an
218 error when an invalid symbol index is retrieved in ELF64_R_SYM of
219 a relocation seen in an input file.
221 2018-09-03 Jozef Lawrynowicz <jozef.l@mittosystems.com>
222 Alan Modra <amodra@gmail.com>
225 elf.c (copy_elf_program_header): When first segment contains
226 only the headers and SHT_NOBITS sections, use segment p_filesz
227 to calculate header and padding size. Use filepos of the first
230 018-08-31 H.J. Lu <hongjiu.lu@intel.com>
233 * archures.c (bfd_arch_get_compatible): Allow an IR object with
234 unknown architecture.
236 2018-08-31 Alan Modra <amodra@gmail.com>
238 * elf64-ppc.c (num_relocs_for_offset): New function.
239 (emit_relocs_for_offset): New function.
240 (use_global_in_relocs): New function, split out from..
241 (ppc_build_one_stub): ..here. Output relocations for notoc stubs.
242 (ppc_size_one_stub): Calculate reloc count for notoc stubs.
243 (ppc64_elf_size_stubs): Don't count undefined syms in stub_globals.
245 2018-08-31 Alan Modra <amodra@gmail.com>
247 * reloc.c (BFD_RELOC_PPC64_REL16_HIGH, BFD_RELOC_PPC64_REL16_HIGHA),
248 (BFD_RELOC_PPC64_REL16_HIGHER, BFD_RELOC_PPC64_REL16_HIGHERA),
249 (BFD_RELOC_PPC64_REL16_HIGHEST, BFD_RELOC_PPC64_REL16_HIGHESTA):
251 * elf64-ppc.c (ppc64_elf_howto_raw): Add new REL16 howtos.
252 (ppc64_elf_reloc_type_lookup): Translate new REL16 relocs.
253 (ppc64_elf_check_relocs, ppc64_elf_relocate_section): Handle them.
254 * bfd-in2.h: Regenerate.
255 * libbfd.h: Regenerate.
257 2018-08-31 Alan Modra <amodra@gmail.com>
259 * elf64-ppc.c: Correct _notoc stub comments.
260 (ppc_build_one_stub): Simplify output of branch for notoc
261 long branch stub. Don't include label offset of 8 bytes in
262 "off" calculation for notoc plt stub. Don't emit insns to get pc.
263 (build_offset): Emit insns to get pc here instead.
264 (size_offset): Add 4 extra insns.
265 (plt_stub_size): Adjust for "off" and size_offset changes.
266 (ppc_size_one_stub): Rearrange code into a switch, duplicating
267 some to better match ppc_build_one_stub.
269 2018-08-29 Chenghua Xu <paul.hua.gm@gmail.com>
271 * archures.c (bfd_architecture): New machine
272 bfd_mach_mips_gs264e.
273 * bfd-in2.h (bfd_architecture): Likewise.
274 * cpu-mips.c (enum I_xxx): Likewise.
275 (arch_info_struct): Likewise.
276 * elfxx-mips.c (_bfd_elf_mips_mach): Handle
278 (mips_set_isa_flags): Likewise.
279 (mips_mach_extensions): Map bfd_mach_mips_gs264e to
280 bfd_mach_mips_gs464e extension.
282 2018-08-29 Chenghua Xu <paul.hua.gm@gmail.com>
284 * archures.c (bfd_architecture): New machine
285 bfd_mach_mips_gs464e.
286 * bfd-in2.h (bfd_architecture): Likewise.
287 * cpu-mips.c (enum I_xxx): Likewise.
288 (arch_info_struct): Likewise.
289 * elfxx-mips.c (_bfd_elf_mips_mach): Handle
291 (mips_set_isa_flags): Likewise.
292 (mips_mach_extensions): Map bfd_mach_mips_gs464e to
293 bfd_mach_mips_gs464 extension.
295 2018-08-29 Chenghua Xu <paul.hua.gm@gmail.com>
297 * archures.c (bfd_architecture): Rename
298 bfd_mach_mips_loongson_3a to bfd_mach_mips_gs464.
299 * bfd-in2.h (bfd_architecture): Likewise.
300 * cpu-mips.c (enum I_xxx): Likewise.
301 (arch_info_struct): Likewise.
302 * elfxx-mips.c (_bfd_elf_mips_mach): Likewise.
303 (mips_set_isa_flags): Likewise.
304 (mips_mach_extensions): Likewise.
305 (bfd_mips_isa_ext_mach): Likewise.
306 (bfd_mips_isa_ext): Likewise.
307 (print_mips_isa_ext): Delete AFL_EXT_LOONGSON_3A.
309 2018-08-29 Chenghua Xu <paul.hua.gm@gmail.com>
311 * elfxx-mips.c (print_mips_ases): Add Loongson EXT2 extension.
313 2018-08-29 Chenghua Xu <paul.hua.gm@gmail.com>
315 * elfxx-mips.c (infer_mips_abiflags): Use ases instead of
316 isa_ext for infer ABI flags.
317 (print_mips_ases): Add Loongson EXT extension.
319 2018-08-29 Chenghua Xu <paul.hua.gm@gmail.com>
321 * elfxx-mips.c (print_mips_ases): Add CAM extension.
323 2018-08-27 H.J. Lu <hongjiu.lu@intel.com>
325 * elfxx-x86.c (_bfd_x86_elf_parse_gnu_properties): Don't mask
326 out the GNU_PROPERTY_X86_UINT32_VALID bit.
328 2018-08-25 H.J. Lu <hongjiu.lu@intel.com>
331 * elf.c (_bfd_elf_get_symbol_version_string): Return
332 _("<corrupt>") for corrupt symbol version info.
334 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
336 * elfxx-x86.c (_bfd_x86_elf_parse_gnu_properties): Handle
337 X86_COMPAT_ISA_1_USED, X86_COMPAT_ISA_1_NEEDED,
338 X86_UINT32_AND_LO, X86_UINT32_AND_HI, X86_UINT32_OR_LO,
339 X86_UINT32_OR_HI, X86_UINT32_OR_AND_LO and X86_UINT32_OR_AND_HI
340 instead of X86_ISA_1_USED, X86_ISA_1_NEEDED and X86_FEATURE_1_AND.
341 (_bfd_x86_elf_merge_gnu_properties): Likewise.
342 (_bfd_x86_elf_link_setup_gnu_properties): Add X86_FEATURE_2_NEEDED
343 instead of X86_ISA_1_NEEDED.
344 (_bfd_x86_elf_link_fixup_gnu_properties): Handle
345 X86_COMPAT_ISA_1_USED, X86_COMPAT_ISA_1_NEEDED, X86_UINT32_AND_LO,
346 X86_UINT32_AND_HI, X86_UINT32_OR_LO, X86_UINT32_OR_HI,
347 X86_UINT32_OR_AND_LO and X86_UINT32_OR_AND_HI instead of
348 X86_ISA_1_USED, X86_ISA_1_NEEDED and X86_FEATURE_1_AND.
350 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
352 * elfxx-x86.c (_bfd_x86_elf_parse_gnu_properties): Mask out the
353 GNU_PROPERTY_X86_UINT32_VALID bit.
354 (_bfd_x86_elf_link_fixup_gnu_properties): Set the
355 GNU_PROPERTY_X86_UINT32_VALID bit for non-relocatable output.
357 2018-08-23 Zenith423 <zenith432@users.sourceforge.net>
360 * plugin.c (struct plugin_list_entry): New structure.
361 (plugin_list): New variable.
362 (try_load_plugin): Place opened plugins on a list. Ensure that
363 the refcount in the dynamic loader is kept at 1.
365 2018-08-23 Alan Modra <amodra@gmail.com>
367 * elf64-ppc.c (ppc64_elf_relocate_section): Revise "call lacks
370 2018-08-23 Nick Clifton <nickc@redhat.com>
372 * elf64-hppa.c (elf_hppa_final_link_relocate): Replace unworkable
373 code with an assertion.
375 2018-08-23 Nick Clifton <nickc@redhat.com>
378 * coffgen.c (coff_pointerize_aux): Add table_end parameter. Use
379 it to prevent walking off the end of the table.
380 (coff_get_normalized_symtab): Pass internal_end pointer to
383 2018-08-23 Alan Modra <amodra@gmail.com>
385 * elf64-ppc.c (ppc64_elf_relocate_section): Don't miss clearing
386 unresolved_reloc on ppc_stub_plt_call_notoc.
388 2018-08-22 H.J. Lu <hongjiu.lu@intel.com>
391 * development.sh (experimental): New.
393 2018-08-22 Helge Deller <deller@gmx.de>
394 Nick Clifton <nickc@redhat.com>
396 * elf-hppa.h (elf_hppa_fake_sections): Use SHT_PARISC_UNWIND as
397 the section type of the .PARISC.unwind section on 64-bit binaries
398 and SHT_PROGBITS for 32-bit binaries. Add a comment about it.
399 Add comment about the sh_entsize value.
401 2018-08-22 Rafeal Auler <rafaelauler@gmail.com>
404 * elfnn-aarch64.c (elfNN_aarch64_size_stubs): Always update the
405 stub's target, since it may have been changed after the layout.
407 2018-08-21 John Darington <john@darrington.wattle.id.au>
409 * elf32-s12z.c (opru18_reloc): New function.
410 (elf_s12z_howto_table): Adjust Howto according to new knowledge.
412 2018-08-21 mephi42 <mephi42@gmail.com>
415 * mach-o.c (bfd_mach_o_mangle_symbols): Update n_type even if
416 data is already considered filled.
418 2018-08-21 Alan Modra <amodra@gmail.com>
420 * elf64-ppc.c (HOW): Define.
422 (ppc64_elf_howto_raw): Use HOW to initialize entries.
423 * elf32-ppc.c (HOW): Define.
424 (ppc_elf_howto_raw): Use HOW to initialize entries, updating
425 R_PPC_VLE_REL15 and R_PPC_VLE_REL24 to use bitpos=0.
427 2018-08-21 Alan Modra <amodra@gmail.com>
429 * reloc.c (reloc_howto_type): Typedef.
430 (bfd_symbol): Delete forward declaration.
431 (struct reloc_howto_struct): Add "negate" field. Make "size",
432 "bitsize", "rightshift", "bitpos", "complain_on_overflow",
433 "pc_relative", "partial_inplace", and "pcrel_offset" bitfields.
434 Rearrange for better packing. Revise comments.
435 (HOWTO): Map to rearranged reloc_howto_struct.
436 (bfd_get_reloc_size): Delete now unused cases.
437 (read_reloc, write_reloc): Likewise.
438 (apply_reloc, _bfd_relocate_contents): Test howto->negate
439 rather than howto->size < 0 for negated relocation values.
440 * coff-rs6000.c (xcoff_complain_overflow_bitfield_func): Avoid
441 signed/unsigned warning.
442 (xcoff_ppc_relocate_section): Delete "condition is always false"
444 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Likewise.
445 * cpu-ns32k.c (do_ns32k_reloc): Adjust to suit reloc_howto_struct
447 * vms-alpha.c (_bfd_vms_write_etir, alpha_vms_slurp_relocs): Use
448 size 16 for ALPHA_R_LINKAGE.
449 (alpha_howto_table <ALPHA_R_LINKAGE>): Set encoded size and
451 * bfd-in.h (reloc_howto_type): Delete.
452 * bfd-in2.h: Regenerate.
454 2018-08-21 Alan Modra <amodra@gmail.com>
456 * reloc.c (HOWTO): Revise comment.
457 (NEWHOWTO, HOWTO_PREPARE): Delete.
458 * coff-arm.c (coff_arm_reloc_type_lookup): Replace const struc
459 reloc_howto_struct with reloc_howto_type.
460 * ns32knetbsd.c (MY_bfd_reloc_type_lookup): Likewise.
461 * vms-alpha.c (alpha_vms_bfd_reloc_type_lookup): Likewise.
462 * elf-hppa.h (HOW): Define.
463 (elf_hppa_howto_table): Use it to simplify this table, correcting
464 name of R_PARISC_LTOFF16WF, R_PARISC_LTOFF_FPTR64, and
465 R_PARISC_LTOFF_FPTR16DF.
466 * elf32-mep.c (MEPREL): Use HOWTO.
467 * bfd-in2.h: Regenerate.
469 2018-08-20 Alan Modra <amodra@gmail.com>
471 * mmo.c (valid_mmo_symbol_character_set): Initialize and make
473 (mmo_init): Don't init valid_mmo_symbol_character_set.
475 2018-08-20 Alan Modra <amodra@gmail.com>
477 * rs6000-core.c (CORE_COMMONSZ): Balance parentheses in expression.
479 2018-08-17 H.J. Lu <hongjiu.lu@intel.com>
482 * elf-bfd.h (elf_backend_data): Add fixup_gnu_properties.
483 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Call
484 backend fixup_gnu_properties if it isn't NULL. Discard
485 .note.gnu.property section if all properties have been removed.
486 * elfxx-target.h (elf_backend_fixup_gnu_properties): New.
487 (elfNN_bed): Initialize fixup_gnu_properties.
488 * elfxx-x86.c (_bfd_x86_elf_link_fixup_gnu_properties): New
490 * elfxx-x86.h (_bfd_x86_elf_link_fixup_gnu_properties): New
492 (elf_backend_fixup_gnu_properties): New.
494 2018-08-16 Alan Modra <amodra@gmail.com>
496 * elf64-ppc.c: Correct ppc_stub_long_branch_notoc example.
499 2018-08-12 H.J. Lu <hongjiu.lu@intel.com>
502 * Makefile.am (BFD32_LIBS): Add elf-properties.lo.
503 (BFD32_LIBS_CFILES): Add elf-properties.c.
504 (BFD32_BACKENDS): Remove elf-properties.lo.
505 (BFD32_BACKENDS_CFILES): Remove elf-properties.c.
506 * configure.ac (elf): Remove elf-properties.lo.
507 * Makefile.in: Regenerated.
508 * configure: Likewise.
510 2018-08-11 H.J. Lu <hongjiu.lu@intel.com>
513 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Don't
514 add X86_ISA_1_NEEDED property only if existing properties won't
517 2018-08-11 Alan Modra <amodra@gmail.com>
519 * reloc.c (bfd_get_reloc_size): Sort switch.
520 (read_reloc, write_reloc, apply_reloc): New functions.
521 (bfd_perform_relocation, bfd_install_relocation): Use apply_reloc.
522 (_bfd_relocate_contents): Use read_reloc and write_reloc.
523 (_bfd_clear_contents): Likewise.
525 2018-08-11 John Darrington <john@darrington.wattle.id.au>
527 * reloc.c (_bfd_relocate_contents): Handle 3 byte relocs.
528 (_bfd_clear_contents): Likewise.
529 (bfd_perform_relocation): Likewise.
530 (bfd_install_relocation): Likewise.
532 2018-08-10 H.J. Lu <hongjiu.lu@intel.com>
535 * elflink.c (bfd_elf_record_link_assignment): Always clear
536 h->verinfo.verdef when overriding a dynamic definition.
538 2018-08-10 H.J. Lu <hongjiu.lu@intel.com>
541 * elf-properties.c (elf_get_gnu_property_section_size): Always
542 use align_size as pr_datasz for GNU_PROPERTY_STACK_SIZE.
543 (elf_write_gnu_properties): Likewise.
545 2018-08-08 H.J. Lu <hongjiu.lu@intel.com>
548 * bfd.c (bfd_convert_section_size): Check BFD_DECOMPRESS after
549 calling _bfd_elf_convert_gnu_property_size to convert
550 .note.gnu.property section size.
551 (bfd_convert_section_contents): Check BFD_DECOMPRESS after
552 calling _bfd_elf_convert_gnu_properties to convert
553 .note.gnu.property section.
554 * elf-bfd.h (_bfd_elf_convert_gnu_property_size): New prototype.
555 (_bfd_elf_convert_gnu_properties): Likewise.
556 * elf-properties.c (elf_get_gnu_property_section_size): New
558 (elf_write_gnu_properties): Likewise.
559 (_bfd_elf_convert_gnu_property_size): Likewise.
560 (_bfd_elf_convert_gnu_properties): Likewise.
561 (_bfd_elf_link_setup_gnu_properties): Use
562 elf_get_gnu_property_section_size and elf_write_gnu_properties.
564 2018-08-08 H.J. Lu <hongjiu.lu@intel.com>
567 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Remove
568 GNU_PROPERTY_X86_ISA_1_USED if an input file doesn't have it.
569 (_bfd_x86_elf_link_setup_gnu_properties): Adding the
570 GNU_PROPERTY_X86_ISA_1_NEEDED, instead of
571 GNU_PROPERTY_X86_ISA_1_USED, property.
573 2018-08-07 Alan Modra <amodra@gmail.com>
575 * elf64-ppc.c (struct map_stub): Delete tls_get_addr_opt_bctrl.
576 Add lr_restore, eh_size and eh_base.
577 (eh_advance, eh_advance_size): New functions.
578 (build_tls_get_addr_stub): Emit EH info for stub.
579 (ppc_build_one_stub): Likewise for _notoc stubs.
580 (ppc_size_one_stub): Size EH info for stub.
581 (group_sections): Init new map_stub fields.
582 (stub_eh_frame_size): Delete.
583 (ppc64_elf_size_stubs): Size EH info for stubs. Set up dummy EH
585 (ppc64_elf_build_stubs): Reinit new map_stub fields. Set FDE
586 offset to stub section here..
587 (ppc64_elf_finish_dynamic_sections): ..rather than here.
589 2018-08-07 Alan Modra <amodra@gmail.com>
591 * elf64-ppc.c (ppc64_elf_relocate_section): Don't skip first
592 instruction of __tls_get_addr_opt stub.
593 (plt_stub_size): Omit ALWAYS_EMIT_R2SAVE condition when
594 dealing with __tls_get_addr_opt stub.
595 (build_tls_get_addr_stub, ppc_size_one_stub): Likewise.
597 2018-08-06 Claudiu Zissulescu <claziss@synopsys.com>
599 * elf32-arc.c (arc_elf_merge_private_bfd_data): Complain about
600 efalgs only when in/out exists.
601 (elf32_arc_section_from_shdr): Don't complain about 0x0c
602 section type. It is mwdt compiler specific.
604 2018-08-06 Claudiu Zissulescu <claziss@synopsys.com>
606 * elf32-arc.c (arc_elf_merge_attributes): Fix merge attributes.
608 2018-08-06 Claudiu Zissulescu <claziss@synopsys.com>
610 * elf32-arc.c (arc_elf_merge_attributes): Handle
613 2018-08-05 Alan Modra <amodra@gmail.com>
615 * elf64-ppc.c (ADDI_R12_R11, ADDI_R12_R12, LIS_R12),
616 (ADDIS_R12_R11, ORIS_R12_R12_0, ORI_R12_R12_0),
617 (SLDI_R12_R12_32, LDX_R12_R11_R12, ADD_R12_R11_R12): Define.
618 (ppc64_elf_howto_raw): Add R_PPC64_REL24_NOTOC entry.
619 (ppc64_elf_reloc_type_lookup): Support R_PPC64_REL24_NOTOC.
620 (ppc_stub_type): Add ppc_stub_long_branch_notoc,
621 ppc_stub_long_branch_both, ppc_stub_plt_branch_notoc,
622 ppc_stub_plt_branch_both, ppc_stub_plt_call_notoc, and
623 ppc_stub_plt_call_both.
624 (is_branch_reloc): Add R_PPC64_REL24_NOTOC.
625 (build_offset, size_offset): New functions.
626 (plt_stub_size): Support plt_call_notoc and plt_call_both.
627 (ppc_build_one_stub, ppc_size_one_stub): Support new stubs.
628 (toc_adjusting_stub_needed): Handle R_PPC64_REL24_NOTOC.
629 (ppc64_elf_size_stubs): Likewise, and new stubs.
630 (ppc64_elf_build_stubs, ppc64_elf_relocate_section): Likewise.
631 * reloc.c: Add BFD_RELOC_PPC64_REL24_NOTOC.
632 * bfd-in2.h: Regenerate.
633 * libbfd.h: Regenerate.
635 2018-08-05 Alan Modra <amodra@gmail.com>
637 * elf64-ppc.c (ppc_build_one_stub): Lose "_r2off" in stub symbols.
639 2018-08-02 Jim Wilson <jimw@sifive.com>
641 * elfnn-riscv.c (riscv_elf_create_dynamic_sections): For .tdata.dyn,
642 add SEC_LINKER_CREATED flag.
644 2018-08-01 Nick Clifton <nickc@redhat.com>
646 * coff-rs6000.c (_bfd_xcoff_put_ldsymbol_name): Suppress warnings
647 about potentially truncated strncpy operations.
648 (_bfd_xcoff_put_symbol_name): Likewise.
650 * elf32-avr.c (avr_stub_name): Check for a NULL return from
653 2018-08-01 Zenith <zenith432@users.sourceforge.net>
656 * plugin.c (bfd_plugin_open_input): Close file descriptor if the
658 (try_claim): Always close the file descriptor at the end of the
660 (try_load_plugin): If a plugin has already been registered, then
661 skip the dlopen and onload steps and go straight to claiming the
662 file. If these is an error, close the plugin.
664 2018-08-01 Alan Modra <amodra@gmail.com>
666 * elf64-ppc.c (plt_stub_pad): Delay plt_stub_size call until needed.
667 (ppc_build_one_stub): Don't set stub_offset, instead assert that
668 it is sane. Don't adjust stub_offset for alignment. Adjust size
669 calculation. Use "targ" temp when calculating offsets.
670 (ppc_size_one_stub): Set stub_offset here. Use "targ" temp when
671 calculating offsets. Adjust for alignment before setting
672 tls_get_addr_opt_bctrl.
674 2018-08-01 Alan Modra <amodra@gmail.com>
676 * po/SRC-POTFILES.in: Regenerate.
678 2018-07-30 Nick Clifton <nickc@redhat.com>
681 * elf32-sh.c (sh_elf_relocate_section): When processing
682 translation relocs, fail if the relocation offset is too small.
683 Replace BFD_ASSERTs with more helpful error messages.
685 2018-07-30 Andrew Jenner <andrew@codesourcery.com>
687 * Makefile.am (ALL_MACHINES, ALL_MACHINES_CFILES): Add C-SKY.
688 (BFD32_BACKENDS, BFD_BACKENDS_CFILES): Likewise.
689 * Makefile.in: Regenerated.
690 * archures.c (enum bfd_architecture): Add bfd_arch_csky and
691 related bfd_mach defines.
692 (bfd_csky_arch): Declare.
693 (bfd_archures_list): Add C-SKY.
694 * bfd-in.h (elf32_csky_build_stubs): Declare.
695 (elf32_csky_size_stubs): Declare.
696 (elf32_csky_next_input_section: Declare.
697 (elf32_csky_setup_section_lists): Declare.
698 * bfd-in2.h: Regenerated.
699 * config.bfd: Add C-SKY.
700 * configure.ac: Likewise.
701 * configure: Regenerated.
702 * cpu-csky.c: New file.
703 * elf-bfd.h (enum elf_target_id): Add C-SKY.
704 * elf32-csky.c: New file.
705 * libbfd.h: Regenerated.
706 * reloc.c: Add C-SKY relocations.
707 * targets.c (csky_elf32_be_vec, csky_elf32_le_vec): Declare.
708 (_bfd_target_vector): Add C-SKY target vector entries.
710 2018-07-27 John Darrington <john@darrington.wattle.id.au>
712 * elf32-s12z.c (ELF_TARGET_ID): Don't define.
714 2018-07-27 John Darrington <john@darrington.wattle.id.au>
716 * libbfd.c (bfd_getb24, bfd_getl24): New functions.
717 (bfd_get_24, bfd_put_24): New macros.
718 * bfd-in2.h: Regenerate.
720 2018-07-27 John Darrington <john@darrington.wattle.id.au>
722 * elf32-s12z.c (s12z_elf_set_mach_from_flags): Remove comment.
724 2018-07-26 Alan Modra <amodra@gmail.com>
726 * elf64-ppc.c (ppc64_elf_size_stubs): Use a ppc_stub_long_branch_r2off
727 for calls to symbols with STO_PPC64_LOCAL_MASK bits set to 1.
729 2018-07-25 Alan Modra <amodra@gmail.com>
731 * elf32-ppc.c (ppc_elf_relax_section): Ignore common or undef locals.
732 Avoid trashing toff with added when used as a symbol index.
733 Ignore R_PPC_PLTREL24 addends in unused example code. Avoid
734 creating unnecessary fixups when relocatable.
736 2018-07-25 Alan Modra <amodra@gmail.com>
738 * elf32-arm.c (elf32_arm_nabi_write_core_note): Disable
739 -Wstringop-truncation warning for gcc-8.0 too.
740 * elf32-ppc.c (ppc_elf_write_core_note): Likewise.
741 * elf64-ppc.c (ppc64_elf_write_core_note): Likewise.
742 * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewise.
743 * elf32-s390.c (elf_s390_write_core_note): Comment fix.
744 * elf64-s390.c (elf_s390_write_core_note): Likewise.
746 2018-07-24 Alan Modra <amodra@gmail.com>
749 * dwarf2.c (dwarf_debug_section_enum): Fix comment typo.
750 * elf.c (bfd_section_from_shdr, elf_sort_sections): Likewise.
752 2018-07-23 Max Filippov <jcmvbkbc@gmail.com>
754 * elf32-xtensa.c (elf_xtensa_finish_dynamic_sections): Move
755 relocation sections consistency check to always check both
756 .rela.dyn and .rela.plt when they exist. Rearrange variable
757 definition and assignment places.
759 2018-07-23 Max Filippov <jcmvbkbc@gmail.com>
761 * elf32-xtensa.c (shrink_dynamic_reloc_sections): Shrink dynamic
762 relocations section for dynamic undefined weak symbols when
763 linking a shared object.
765 2018-07-23 Tom Tromey <tom@tromey.com>
767 * elf.c (bfd_get_elf_phdrs): Don't call memcpy with size 0.
769 2018-07-21 Eric Botcazou <ebotcazou@adacore.com>
771 * elf32-arm.c (elf32_arm_final_link_relocate) <R_ARM_GOT32>: Small
772 cleanup for the case of a global symbol that binds locally. Also
773 install a value in the GOT slot in the case of a local symbol in
776 2018-07-20 H.J. Lu <hongjiu.lu@intel.com>
779 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): If the
780 separate code program header is needed, make sure that the first
781 read-only PT_LOAD segment has no code by adding a
782 GNU_PROPERTY_X86_ISA_1_USED note.
784 2018-07-20 Chenghua Xu <paul.hua.gm@gmail.com>
785 Maciej W. Rozycki <macro@mips.com>
787 * elfxx-mips.c (print_mips_ases): Add MMI extension.
789 2018-07-20 Maciej W. Rozycki <macro@mips.com>
791 * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Do not
792 create DT_REL, DT_RELSZ or DT_RELENT dynamic entries if the
793 dynamic relocation section will be discarded from output.
794 (_bfd_mips_elf_finish_dynamic_sections) <DT_RELSZ>: Assert that
795 the dynamic relocation section will be retained in output.
797 2018-07-18 Maciej W. Rozycki <macro@mips.com>
799 * xcofflink.c (xcoff_write_global_symbol): Fix symbol type
800 checks for defined weak symbols.
802 2018-07-17 Maciej W. Rozycki <macro@mips.com>
804 * elf32-nds32.c (nds32_elf_relax_loadstore): Use
805 `bfd_is_abs_symbol' rather than `bfd_is_abs_section' in checking
806 whether the symbol is absolute.
807 (nds32_elf_relax_lo12): Likewise.
808 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
809 (elfNN_aarch64_check_relocs): Likewise.
810 * xcofflink.c (xcoff_need_ldrel_p): Likewise.
811 (bfd_xcoff_import_symbol): Likewise.
812 (xcoff_write_global_symbol): Likewise.
814 2018-07-17 Maciej W. Rozycki <macro@mips.com>
816 * linker.c (bfd_is_abs_symbol): New macro.
817 * bfd-in2.h: Regenerate.
819 2018-07-16 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
821 * elf-bfd.h (elfcore_write_ppc_tar): Add prototype.
822 (elfcore_write_ppc_ppr): Likewise.
823 (elfcore_write_ppc_dscr): Likewise.
824 (elfcore_write_ppc_ebb): Likewise.
825 (elfcore_write_ppc_pmu): Likewise.
826 (elfcore_write_ppc_tm_cgpr): Likewise.
827 (elfcore_write_ppc_tm_cfpr): Likewise.
828 (elfcore_write_ppc_tm_cvmx): Likewise.
829 (elfcore_write_ppc_tm_cvsx): Likewise.
830 (elfcore_write_ppc_tm_spr): Likewise.
831 (elfcore_write_ppc_tm_ctar): Likewise.
832 (elfcore_write_ppc_tm_cppr): Likewise.
833 (elfcore_write_ppc_tm_cdscr): Likewise.
834 * elf.c (elfcore_write_ppc_tar): New function.
835 (elfcore_write_ppc_ppr): Likewise.
836 (elfcore_write_ppc_dscr): Likewise.
837 (elfcore_write_ppc_ebb): Likewise.
838 (elfcore_write_ppc_pmu): Likewise.
839 (elfcore_write_ppc_tm_cgpr): Likewise.
840 (elfcore_write_ppc_tm_cfpr): Likewise.
841 (elfcore_write_ppc_tm_cvmx): Likewise.
842 (elfcore_write_ppc_tm_cvsx): Likewise.
843 (elfcore_write_ppc_tm_spr): Likewise.
844 (elfcore_write_ppc_tm_ctar): Likewise.
845 (elfcore_write_ppc_tm_cppr): Likewise.
846 (elfcore_write_ppc_tm_cdscr): Likewise.
847 (elfcore_write_register_note): Call them.
848 (elfcore_grok_ppc_tar): New function.
849 (elfcore_grok_ppc_ppr): Likewise.
850 (elfcore_grok_ppc_dscr): Likewise.
851 (elfcore_grok_ppc_ebb): Likewise.
852 (elfcore_grok_ppc_pmu): Likewise.
853 (elfcore_grok_ppc_tm_cgpr): Likewise.
854 (elfcore_grok_ppc_tm_cfpr): Likewise.
855 (elfcore_grok_ppc_tm_cvmx): Likewise.
856 (elfcore_grok_ppc_tm_cvsx): Likewise.
857 (elfcore_grok_ppc_tm_spr): Likewise.
858 (elfcore_grok_ppc_tm_ctar): Likewise.
859 (elfcore_grok_ppc_tm_cppr): Likewise.
860 (elfcore_grok_ppc_tm_cdscr): Likewise.
861 (elfcore_grok_note): Call them.
863 2018-07-11 Maciej W. Rozycki <macro@mips.com>
865 * elfxx-mips.c (mips_tls_got_relocs): Use `bfd_link_dll' rather
866 than `!bfd_link_pic' in determining the dynamic symbol index.
867 Avoid the index of -1.
868 (mips_elf_initialize_tls_slots): Likewise. Flatten code by
869 moving `dyn' to the beginning of the function block.
871 2018-07-11 Maciej W. Rozycki <macro@mips.com>
872 Rich Felker <bugdal@aerifal.cx>
875 * elfxx-mips.c (mips_tls_got_relocs): Use `bfd_link_dll' rather
876 than `bfd_link_pic' to determine whether dynamic relocations are
878 (mips_elf_initialize_tls_slots): Likewise.
880 2018-07-10 Maciej W. Rozycki <macro@mips.com>
882 * elflink.c (bfd_elf_final_link): Rename `remove' local variable
885 2018-07-10 Alan Modra <amodra@gmail.com>
887 * elf32-xgate.h: Delete.
888 * elf32-xgate.c: Delete unnecessary forward declarations, add two
890 (xgate_elf_bfd_link_hash_table_create)
891 (xgate_elf_bfd_link_hash_table_free)
892 (xgate_elf_set_mach_from_flags, struct xgate_scan_param)
893 (stub_hash_newfunc, elf32_xgate_add_symbol_hook)
894 (elf32_xgate_setup_section_lists, elf32_xgate_size_stubs)
895 (elf32_xgate_build_stubs, elf32_xgate_check_relocs)
896 (elf32_xgate_relocate_section, _bfd_xgate_elf_set_private_flags)
897 (elf32_xgate_post_process_headers): Delete.
898 (elf32_xgate_backend_symbol_processing): New function.
899 (xgate_elf_ignore_reloc, xgate_elf_special_reloc)
900 (_bfd_xgate_elf_print_private_bfd_data): Make static.
901 (ELF_TARGET_ID, elf_info_to_howto, elf_backend_check_relocs)
902 (elf_backend_relocate_section, elf_backend_object_p)
903 (elf_backend_final_write_processing, elf_backend_can_gc_sections)
904 (elf_backend_post_process_headers, elf_backend_add_symbol_hook)
905 (bfd_elf32_bfd_link_hash_table_create)
906 (bfd_elf32_bfd_set_private_flags)
907 (xgate_stub_hash_lookup): Don't define.
908 (elf_backend_symbol_processing): Define.
909 * elf-bfd.h (elf_target_id): Delete XGATE_ELF_DATA.
911 2018-07-09 Maciej W. Rozycki <macro@mips.com>
913 * elfxx-mips.c (_bfd_mips_elf_adjust_dynamic_symbol): Don't set
914 `->needs_lazy_stub' if the stubs output section is the absolute
917 2018-07-09 H.J. Lu <hongjiu.lu@intel.com>
920 * configure.ac: Use changequote for "i[3-7]86-*-linux-*".
921 * configure: Regenerated.
923 2018-07-09 Alan Modra <amodra@gmail.com>
925 * elf32-m68hc1x.c (elf32_m68hc11_post_process_headers): Call
926 _bfd_elf_post_process_headers.
928 2018-07-06 Max Filippov <jcmvbkbc@gmail.com>
930 * elf32-xtensa.c (elf_xtensa_allocate_dynrelocs): Don't allocate
931 space for dynamic relocation for undefined weak symbol.
932 (elf_xtensa_relocate_section): Don't emit R_XTENSA_RELATIVE
933 relocation for undefined weak symbols.
934 (shrink_dynamic_reloc_sections): Don't shrink dynamic relocation
935 section for relocations against undefined weak symbols.
937 2018-07-06 Alan Hayward <alan.hayward@arm.com>
939 * elf.c (elfcore_grok_aarch_sve): New function.
940 (elfcore_grok_note): Check for Aarch64 SVE.
941 (elfcore_write_aarch_sve): New function.
942 (elfcore_write_register_note): Check for Aarch64 SVE.
943 * elf-bfd.h(elfcore_grok_aarch_sve): New declaration.
945 2018-07-06 Alan Modra <amodra@gmail.com>
947 * elf32-arm.c (elf32_arm_nabi_write_core_note): Don't use
948 DIAGNOTIC_PUSH and DIAGNOSTIC_POP unconditionally.
949 * elf32-ppc.c (ppc_elf_write_core_note): Likewise.
950 * elf32-s390.c (elf_s390_write_core_note): Likewise.
951 * elf64-ppc.c (ppc64_elf_write_core_note): Likewise.
952 * elf64-s390.c (elf_s390_write_core_note): Likewise.
953 * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewise.
955 2018-07-05 Jim Wilson <jimw@sifive.com>
957 * config.bfd (riscv32*-*-*): Renamed from riscv32-*-*.
958 (riscv64*-*-*): Likewise.
959 (riscv-*-*): Add as an alias for riscv32*-*-*.
961 2018-07-05 H.J. Lu <hongjiu.lu@intel.com>
964 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Remove x86
965 ISA properties with empty bits.
967 2018-07-05 Nick Clifton <nickc@redhat.com>
969 * po/ru.po: Updated Russian translation.
971 2018-07-05 Alan Modra <amodra@gmail.com>
973 * elf-bfd.h (_bfd_elf_ppc_merge_fp_attributes): Update prototype.
974 * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Return error
975 on mismatch. Remove "warning: " from messages. Track last bfd
977 (ppc_elf_merge_obj_attributes): Likewise. Handle status from
978 _bfd_elf_ppc_merge_fp_attributes.
979 * elf64-ppc.c (ppc64_elf_merge_private_bfd_data): Handle status
980 from _bfd_elf_ppc_merge_fp_attributes.
982 2018-07-04 H.J. Lu <hongjiu.lu@intel.com>
984 * Makefile.am (bfdinclude_HEADERS): Add $(INCDIR)/diagnostics.h.
985 * Makefile.in: Regenerated.
987 2018-07-03 Alan Modra <amodra@gmail.com>
989 * elflink.c (bfd_elf_final_link): Remove zero size .gnu.attributes
992 2018-07-03 Alan Modra <amodra@gmail.com>
994 * elf-bfd.h (ATTR_TYPE_FLAG_ERROR, ATTR_TYPE_HAS_ERROR): Define.
995 * elf-attrs.c (is_default_attr): Handle ATTR_TYPE_HAS_ERROR.
996 * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Use
997 ATTR_TYPE_FLAG_INT_VAL. Set ATTR_TYPE_HAS_ERROR on finding
998 incompatible attribute.
999 (ppc_elf_merge_obj_attributes): Likewise. Return
1000 _bfd_elf_merge_object_attributes result.
1001 * elf64-ppc.c (ppc64_elf_merge_private_bfd_data): Return
1002 _bfd_elf_merge_object_attributes result.
1004 2018-07-03 Alan Modra <amodra@gmail.com>
1007 * elflink.c (_bfd_elf_fix_symbol_flags): Hide dynamic symbols
1008 in discarded sections.
1010 2018-07-02 Maciej W. Rozycki <macro@mips.com>
1012 * elfxx-mips.c (_bfd_mips_elf_create_dynamic_sections): Set
1013 `mark' for symbols created from `mips_elf_dynsym_rtproc_names'
1016 2018-07-02 Maciej W. Rozycki <macro@mips.com>
1018 * elf64-mips.c (micromips_elf64_howto_table_rel): Add
1019 R_MICROMIPS_HI0_LO16, R_MICROMIPS_TLS_GD, R_MICROMIPS_TLS_LDM,
1020 R_MICROMIPS_TLS_DTPREL_HI16, R_MICROMIPS_TLS_DTPREL_LO16,
1021 R_MICROMIPS_TLS_GOTTPREL, R_MICROMIPS_TLS_TPREL_HI16,
1022 R_MICROMIPS_TLS_TPREL_LO16, R_MICROMIPS_GPREL7_S2 and
1023 R_MICROMIPS_PC23_S2 relocation entries.
1024 (micromips_elf64_howto_table_rela): Likewise.
1025 (micromips_reloc_map): Likewise.
1026 * elfn32-mips.c (elf_micromips_howto_table_rel): Likewise.
1027 (elf_micromips_howto_table_rela): Likewise.
1028 (micromips_reloc_map): Likewise.
1030 2018-07-02 H.J. Lu <hongjiu.lu@intel.com>
1033 * elf64-x86-64.c (elf_x86_64_relocate_section): Clear the
1034 R_X86_64_converted_reloc_bit bit.
1036 2018-07-02 Jeff Muizelaar <jrmuizel@gmail.com>
1037 Tom Tromey <tom@tromey.com>
1041 * mach-o.c (bfd_mach_o_fat_close_and_cleanup): New function.
1042 (bfd_mach_o_close_and_cleanup): Redefine.
1043 * archive.c (_bfd_unlink_from_archive_parent): New function,
1045 (_bfd_archive_close_and_cleanup): ..here.
1046 (bfd_generic_archive_p): Do not clear archive's format.
1047 * libbfd-in.h (_bfd_unlink_from_archive_parent): Declare.
1048 * libbfd.h: Regenerate.
1050 2018-07-02 Thomas Preud'homme <thomas.preudhomme@arm.com>
1052 * archures.c (bfd_mach_arm_5TEJ, bfd_mach_arm_6, bfd_mach_arm_6KZ,
1053 bfd_mach_arm_6T2, bfd_mach_arm_6K, bfd_mach_arm_7, bfd_mach_arm_6M,
1054 bfd_mach_arm_6SM, bfd_mach_arm_7EM, bfd_mach_arm_8, bfd_mach_arm_8R,
1055 bfd_mach_arm_8M_BASE, bfd_mach_arm_8M_MAIN): Define.
1056 * bfd-in2.h: Regenerate.
1057 * cpu-arm.c (arch_info_struct): Add entries for above new
1058 bfd_mach_arm values.
1059 * elf32-arm.c (bfd_arm_get_mach_from_attributes): Add Tag_CPU_arch to
1060 bfd_mach_arm mapping logic for pre Armv4 and Armv5TEJ and later
1061 architectures. Force assert failure for any new Tag_CPU_arch value.
1063 2018-07-02 Thomas Preud'homme <thomas.preudhomme@arm.com>
1065 * doc/bfdint.texi: Use command-line consistently when used in a
1067 * doc/bfdsumm.texi: Likewise.
1069 2018-06-29 Maciej W. Rozycki <macro@mips.com>
1071 * elfxx-mips.c (allocate_dynrelocs): Remove extraneous symbol
1072 visibility check made for undefined weak symbols.
1074 2018-06-26 Nick Clifton <nickc@redhat.com>
1076 * po/uk.po: Updated Ukranian translation.
1078 2018-06-25 Nick Clifton <nickc@redhat.com>
1080 * elfnn-aarch64.c (_bfd_aarch64_erratum_835769_stub_name): Check
1081 for malloc returning NULL.
1082 (_bfd_aarch64_erratum_843419_fixup): Check for
1083 _bfd_aarch64_erratum_835769_stub_name returning NULL.
1085 2018-06-24 Nick Clifton <nickc@redhat.com>
1087 * po/bfd.pot: Regenerate.
1089 2018-06-24 Nick Clifton <nickc@redhat.com>
1091 * version.m4: Update version string to 2.31.51.
1092 * configure: Regenerate.
1094 2018-06-24 Nick Clifton <nickc@redhat.com>
1096 2.31 branch created.
1098 2018-06-21 Maciej W. Rozycki <macro@mips.com>
1100 * elfxx-mips.c (_bfd_mips_elf_compact_eh_encoding)
1101 (_bfd_mips_elf_cant_unwind_opcode): Correct formatting.
1103 2018-06-21 Maciej W. Rozycki <macro@mips.com>
1105 * elfxx-mips.c (_bfd_mips_post_process_headers): Keep
1106 EI_ABIVERSION setting together.
1108 2018-06-21 Maciej W. Rozycki <macro@mips.com>
1110 * elfxx-mips.c (MIPS_LIBC_ABI_DEFAULT, MIPS_LIBC_ABI_MIPS_PLT)
1111 (MIPS_LIBC_ABI_UNIQUE, MIPS_LIBC_ABI_MIPS_O32_FP64)
1112 (MIPS_LIBC_ABI_MAX): New enumeration constants.
1113 (_bfd_mips_post_process_headers): Use them in place of magic
1116 2018-06-21 Jim Wilson <jimw@sifive.com>
1118 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Update comment.
1119 Use SYMBOL_REFERENCES_LOCAL. Add asserts for h->got.offset.
1121 2018-06-21 Alan Modra <amodra@gmail.com>
1123 * doc/Makefile.am (AUTOMAKE_OPTIONS): Add "foreign".
1124 * doc/Makefile.in: Regenerate.
1126 2018-06-20 Renlin Li <renlin.li@arm.com>
1128 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Use PG_OFFSET
1129 to resolve BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC,
1130 BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC,
1131 BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC,
1132 BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC,
1133 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
1134 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
1135 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
1136 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
1138 2018-06-20 Nick Clifton <nickc@redhat.com>
1141 * opncls.c (get_build_id): Check for a negative or excessive data
1142 size in the build-id note.
1144 2018-06-20 Nick Clifton <nickc@redhat.com>
1147 * mach-o.c (cputype): New function.
1148 (cpusubtype): New function.
1149 (bfd_mach_o_bfd_print_private_data): New function. Dispalys the
1150 values in the MACH-O file header.
1151 (bfd_mach_o_bfd_copy_private_header_data): Copy the cputype and
1152 cpusubtype fields from the input bfd's mach-o header to the output
1154 * mach-o-target.c (bfd_mach_o_bfd_print_private_bfd_data):
1155 Redefine to bfd_mach_o_bfd_print_private_data.
1156 * mach-o.h (bfd_mach_o_bfd_print_private_bfd_data): Prototype.
1158 2018-06-19 Maciej W. Rozycki <macro@mips.com>
1161 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Verify the
1162 `.got.plt' entry referred is in range.
1163 (mips_finish_exec_plt): Correct the range check for `.got.plt'
1164 start. Replace the assertion used for that with a proper error
1167 2018-06-19 Maciej W. Rozycki <macro@mips.com>
1169 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Fix
1172 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
1174 * Makefile.am (AUTOMAKE_OPTIONS): Remove 1.11.
1175 (INCLUDES): Rename to ...
1176 (AM_CPPFLAGS): ... this.
1177 * configure.ac: Remove AC_PREREQ.
1178 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove 1.9, cygnus, add
1179 info-in-builddir no-texinfo.tex.
1180 (info_TEXINFOS): Rename bfd.texinfo to bfd.texi.
1181 * doc/bfd.texinfo: Rename to ...
1182 * doc/bfd.texi: ... this.
1183 * Makefile.in: Re-generate.
1184 * aclocal.m4: Re-generate.
1185 * config.in: Re-generate.
1186 * configure: Re-generate.
1187 * doc/Makefile.in: Re-generate.
1189 2018-06-18 Mephi <mephi42@gmail.com>
1192 * mach-o-x86-64.c (x86_64_howto_table): Add entry for
1193 BFD_RELOC_MACH_O_X86_64_RELOC_TLV.
1194 (bfd_mach_o_x86_64_canonicalize_one_reloc): Handle the new reloc.
1195 (bfd_mach_o_x86_64_swap_reloc_out): Likewise.
1196 * reloc.c (BFD_RELOC_MACH_O_X86_64_TV): New entry.
1197 * bfd-in2.h: Regenerate.
1198 * libbfd.h: Regenerate.
1200 2018-06-14 Faraz Shahbazker <Faraz.Shahbazker@mips.com>
1202 * elfxx-mips.c (print_mips_ases): Add GINV extension.
1204 2018-06-14 H.J. Lu <hongjiu.lu@intel.com>
1207 * elf.c (_bfd_elf_get_symbol_version_string): Check if the first
1208 symbol version is base version.
1210 2018-06-14 Alan Modra <amodra@gmail.com>
1212 * elf-bfd.h (struct elf_link_hash_table): Add "dynamic_relocs".
1213 * elflink.c (_bfd_elf_init_2_index_sections): Comment fix.
1214 (_bfd_elf_add_dynamic_entry): Set "dynamic_relocs".
1215 (_bfd_elf_link_renumber_dynsyms): Exclude all section symbols when
1216 "dynamic_relocs" is not set.
1217 * elfxx-mips.c (count_section_dynsyms): Likewise.
1219 2018-06-14 Alan Modra <amodra@gmail.com>
1222 * bfdio.c (bfd_seek): Optimize away seeks to current position.
1224 2018-06-13 Scott Egerton <scott.egerton@imgtec.com>
1225 Faraz Shahbazker <Faraz.Shahbazker@mips.com>
1227 * elfxx-mips.c (print_mips_ases): Add CRC.
1229 2018-06-08 H.J. Lu <hongjiu.lu@intel.com>
1232 * elfxx-x86.c (elf_x86_hide_linker_defined): New function.
1233 (_bfd_x86_elf_link_check_relocs): Use it to hide hidden
1234 __bss_start, _end and _edata in shared libraries.
1236 2018-06-07 Alan Modra <amodra@gmail.com>
1238 * elf32-tic6x.c (elf32_tic6x_check_relocs): Reference
1239 __c6xabi_DSBT_BASE explicitly for R_C6000_SBR_* relocs.
1241 2018-06-05 Alan Modra <amodra@gmail.com>
1243 * bfd.c (struct bfd): Update comment on "where" usage.
1244 * bfdio.c (bfd_bwrite, bfd_stat): Use and update "iovec",
1245 "iostream", and "where" from containing archive file. Return
1246 error on NULL iovec.
1247 (bfd_bread): Similarly, and return error attempted out of
1248 bounds archive element access.
1249 (bfd_tell, bfd_flush): Use and update "iovec", "iostream", and
1250 "where" from containing archive file.
1251 (bfd_seek): Likewise. Return error on NULL iovec. Don't
1252 attempt to optimize away seeks. Don't paper over errors by
1254 (bfd_get_mtime): Call bfd_stat rather than iovec->bstat.
1255 (bfd_get_size): Likewise.
1256 (bfd_mmap): Operate on and use iovec of containing archive
1257 file. Return error on NULL iovec.
1258 * cache.c (bfd_cache_lookup_worker): Abort if working on
1259 archive element bfd.
1260 (cache_bread_1): Delete bfd parameter, add FILE* parameter.
1261 Don't ignore zero byte reads.
1262 (cache_bread): Look up FILE* in cache here. Error on NULL
1264 (cache_bwrite): Rename "where" to "from".
1265 (cache_bmmap): Don't handle archive elements.
1266 * coffcode.h (coff_slurp_line_table): Exit early on zero
1268 * bfd-in2.h: Regenerate.
1270 2018-06-05 Alan Modra <amodra@gmail.com>
1273 * plugin.c (bfd_plugin_open_input): Allow for possibility of
1274 nested archives. Open file again for plugin.
1275 (try_claim): Don't save and restore file position. Close file
1277 * sysdep.h (O_BINARY): Define.
1279 2018-06-04 Max Filippov <jcmvbkbc@gmail.com>
1281 * elf32-xtensa.c (xtensa_read_table_entries): Make global.
1282 (compute_fill_extra_space): Drop declaration. Rename function to
1283 xtensa_compute_fill_extra_space.
1284 (compute_ebb_actions, remove_dead_literal): Update references to
1285 compute_fill_extra_space.
1287 2018-06-04 Volodymyr Arbatov <arbatov@cadence.com>
1289 * elf32-xtensa.c (elf32xtensa_separate_props): New global
1291 (xtensa_add_names): New function.
1292 (xtensa_property_section_name): Add new parameter
1293 separate_sections, use it to choose property section name.
1294 (xtensa_get_separate_property_section): New function.
1295 (xtensa_get_property_section): Invoke
1296 xtensa_get_separate_property_section to get individual property
1297 section if it exists, common property section otherwise.
1298 (xtensa_make_property_section): Pass elf32xtensa_separate_props
1299 to xtensa_property_section_name.
1301 2018-06-04 H.J. Lu <hongjiu.lu@intel.com>
1304 * bfd-in.h: Include "diagnostics.h".
1305 * bfd-in2.h: Regenerated.
1306 * elf32-arm.c (elf32_arm_nabi_write_core_note): Use
1307 DIAGNOSTIC_PUSH, DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION and
1308 DIAGNOSTIC_POP to silence GCC 8.1 warnings with
1309 -Wstringop-truncation.
1310 * elf32-ppc.c (ppc_elf_write_core_note): Likewse.
1311 * elf32-s390.c (elf_s390_write_core_note): Likewse.
1312 * elf64-ppc.c (ppc64_elf_write_core_note): Likewse.
1313 * elf64-s390.c (elf_s390_write_core_note): Likewse.
1314 * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewse.
1316 2018-06-03 Jim Wilson <jimw@sifive.com>
1319 * elfnn-riscv.c (riscv_elf_relocate_section) <R_RISCV_CALL>: Check
1320 for and handle an undefined weak with no PLT.
1323 * elfnn-riscv.c (riscv_relax_delete_bytes): Add versioned_hidden check
1324 to code that ignores duplicate symbols.
1326 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
1328 * version.m4: Bump version to 2.30.52
1329 * configure: Regenerated.
1331 2018-06-01 Alan Modra <amodra@gmail.com>
1333 * bfd.c (_bfd_error_handler): Arrange for this function to be
1334 declared in bfd-in2.h.
1335 * libbfd-in.h (_bfd_error_handler): Don't declare.
1336 * libbfd.h: Regenerate.
1337 * bfd-in2.h: Regenerate.
1339 2018-05-30 Amaan Cheval <amaan.cheval@gmail.com>
1341 * config.bfd (x86_64-*-*): Add pei-x86-64 target to x86_64-*-rtems*
1342 This is needed to generate UEFI application image files from ELFs.
1344 2018-05-28 H.J. Lu <hongjiu.lu@intel.com>
1346 * elf32-i386.c (elf_i386_lazy_plt): Add plt_tlsdesc_entry,
1347 plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset,
1348 plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and
1349 plt_tlsdesc_got2_insn_end for TLSDESC entry.
1350 (elf_i386_lazy_ibt_plt): Likewise.
1351 (elf_i386_nacl_plt): Likewise.
1352 * elf64-x86-64.c (tlsdesc_plt_entry): Moved and renamed to ...
1353 (elf_x86_64_tlsdesc_plt_entry): This.
1354 (elf_x86_64_lazy_plt): Add plt_tlsdesc_entry,
1355 plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset,
1356 plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and
1357 plt_tlsdesc_got2_insn_end for TLSDESC entry.
1358 (elf_x86_64_lazy_bnd_plt): Likewise.
1359 (elf_x86_64_lazy_ibt_plt): Likewise.
1360 (elf_x32_lazy_ibt_plt): Likewise.
1361 (elf_x86_64_nacl_plt): Likewise.
1362 (elf_x86_64_finish_dynamic_sections): Use plt_tlsdesc_entry,
1363 plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset,
1364 plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and
1365 plt_tlsdesc_got2_insn_end to update TLSDESC entry.
1366 * elfxx-x86.h (elf_x86_lazy_plt_layout): Update comments.
1367 Add plt_tlsdesc_entry, plt_tlsdesc_entry_size,
1368 plt_tlsdesc_got1_offset, plt_tlsdesc_got2_offset,
1369 plt_tlsdesc_got1_insn_end and plt_tlsdesc_got2_insn_end.
1370 (elf_x86_non_lazy_plt_layout): Update comments.
1371 (elf_x86_plt_layout): Likewise.
1373 2018-05-28 H.J. Lu <hongjiu.lu@intel.com>
1376 * elf-s390-common.c (elf_s390_add_symbol_hook): Removed.
1377 * elf32-arc.c (elf_arc_add_symbol_hook): Likewise.
1378 (elf_backend_add_symbol_hook): Likewise.
1379 * elf32-m68k.c (elf_m68k_add_symbol_hook): Likewise.
1380 (elf_backend_add_symbol_hook): Likewise.
1381 * elf32-s390.c (elf_backend_add_symbol_hook): Likewise.
1382 * elf32-sparc.c (elf32_sparc_add_symbol_hook): Likewise.
1383 (elf_backend_add_symbol_hook): Likewise.
1384 * elf64-s390.c (elf_backend_add_symbol_hook): Likewise.
1385 * elfxx-aarch64.c (_bfd_aarch64_elf_add_symbol_hook): Likewise.
1386 * elfxx-aarch64.h (_bfd_aarch64_elf_add_symbol_hook): Likewise.
1387 (elf_backend_add_symbol_hook): Likewise.
1388 * elf32-arm.c (elf32_arm_add_symbol_hook): Remove STT_GNU_IFUNC
1390 * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise.
1391 * elf64-ppc.c (ppc64_elf_add_symbol_hook): Likewise.
1392 * elf64-sparc.c (elf64_sparc_add_symbol_hook): Likewise.
1393 * elflink.c (elf_link_add_object_symbols): Set
1394 elf_gnu_symbol_ifunc for STT_GNU_IFUNC symbols.
1396 2018-05-26 H.J. Lu <hongjiu.lu@intel.com>
1399 * elf-bfd.h (_bfd_elf_link_hide_sym_by_version): New.
1400 * elflink.c (_bfd_elf_link_hide_versioned_symbol): New function.
1401 Extracted from _bfd_elf_link_assign_sym_version.
1402 (_bfd_elf_link_hide_sym_by_version): New function.
1403 (_bfd_elf_link_assign_sym_version): Use
1404 _bfd_elf_link_hide_versioned_symbol.
1405 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Call
1406 _bfd_elf_link_hide_sym_by_version instead of
1407 bfd_hide_sym_by_version. Don't check unversioned symbol.
1409 2018-05-25 Alan Modra <amodra@gmail.com>
1411 * Makefile.in: Regenerate.
1412 * po/SRC-POTFILES.in: Regenerate.
1414 2018-05-25 Alan Modra <amodra@gmail.com>
1416 * configure.ac (bfd_cv_hidden): Run test with -Werror in CFLAGS.
1417 * configure: Regenerate.
1419 2018-05-23 H.J. Lu <hongjiu.lu@intel.com>
1421 * elf64-ppc.c (ppc64_elf_write_core_note): Add ATTRIBUTE_NONSTRING
1424 2018-05-22 Alan Modra <amodra@gmail.com>
1427 * elf32-hppa.c (hppa_get_stub_entry): Return NULL when link_sec
1429 (elf32_hppa_size_stubs): Only create stubs for load, alloc, code
1431 (final_link_relocate): Revert last change.
1433 2018-05-22 Alan Modra <amodra@gmail.com>
1436 * elf32-hppa.c (final_link_relocate): Don't look for plt call
1437 stubs in non-alloc sections.
1439 2018-05-21 H.J. Lu <hongjiu.lu@intel.com>
1442 * aout-target.h (MY_bfd_link_hide_symbol): New.
1443 * aout-tic30.c (MY_bfd_link_hide_symbol): Likewise.
1444 * binary.c (binary_bfd_link_hide_symbol): Likewise.
1445 * coff-alpha.c (_bfd_ecoff_bfd_link_hide_symbol): Likewise.
1446 * coff-mips.c (_bfd_ecoff_bfd_link_hide_symbol): Likewise.
1447 * coff-rs6000.c (_bfd_xcoff_bfd_link_hide_symbol): Likewise.
1448 * coffcode.h (coff_bfd_link_hide_symbol): Likewise.
1449 * elf-bfd.h (_bfd_elf_link_hide_symbol): Likewise.
1450 * elfxx-target.h (bfd_elfNN_bfd_link_hide_symbol): Likewise.
1451 * i386msdos.c (msdos_bfd_link_hide_symbol): Likewise.
1452 * ihex.c (ihex_bfd_link_hide_symbol): Likewise.
1453 * libbfd-in.h (_bfd_nolink_bfd_link_hide_symbol): Likewise.
1454 * linker.c (_bfd_generic_link_hide_symbol): Likewise.
1455 (bfd_link_hide_symbol): Likewise.
1456 * mach-o-target.c (bfd_mach_o_bfd_link_hide_symbol): Likewise.
1457 * mmo.c (mmo_bfd_link_hide_symbol): Likewise.
1458 * pef.c (bfd_pef_bfd_link_hide_symbol): Likewise.
1459 * plugin.c (bfd_plugin_bfd_link_hide_symbol): Likewise.
1460 * ppcboot.c (ppcboot_bfd_link_hide_symbol): Likewise.
1461 * som.c (som_bfd_link_hide_symbol): Likewise.
1462 * srec.c (srec_bfd_link_hide_symbol): Likewise.
1463 * tekhex.c (tekhex_bfd_link_hide_symbol): Likewise.
1464 * vms-alpha.c (vms_bfd_link_hide_symbol): Likewise.
1465 (alpha_vms_bfd_link_hide_symbol): Likewise.
1466 * xsym.c (bfd_sym_bfd_link_hide_symbol): Likewise.
1467 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
1468 _bfd_generic_link_hide_symbol.
1469 (rs6000_xcoff64_aix_vec): Likewise.
1470 * elflink.c (bfd_elf_record_link_assignment): Don't make forced
1471 local symbol dynamic.
1472 (_bfd_elf_link_hide_symbol): New function.
1473 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
1474 check root.ldscript_def.
1475 * targets.c (bfd_target): Add _bfd_link_hide_symbol.
1476 (BFD_JUMP_TABLE_LINK): Add NAME##_bfd_link_hide_symbol.
1477 * bfd-in2.h: Regenerated.
1478 * libbfd.h: Likewise.
1480 2018-05-21 H.J. Lu <hongjiu.lu@intel.com>
1483 * elf.c (setup_group): Mark section in a section group with
1486 2018-05-18 H.J. Lu <hongjiu.lu@intel.com>
1489 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
1490 set eh->local_ref to 1 if a symbol is versioned and there is a
1493 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
1495 * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Handle
1498 2018-05-18 Jim Wilson <jimw@sifive.com>
1500 * elfnn-riscv.c (allocate_dynrelocs): Discard dynamic relocations if
1501 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1502 (riscv_elf_relocate_section): Don't generate dynamic relocation if
1503 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1504 (riscv_elf_finish_dynamic_symbol): Likewise.
1506 2018-05-18 John Darrington <john@darrington.wattle.id.au>
1508 * Makefile.am: Add s12z files.
1509 * Makefile.in: Regenerate.
1510 * archures.c: Add bfd_s12z_arch.
1511 * bfd-in.h: Add exports of bfd_putb24 and bfd_putl24.
1512 * bfd-in2.h: Regenerate.
1513 * config.bfd: Add s12z target.
1514 * configure.ac: Add s12z target.
1515 * configure: Regenerate.
1516 * cpu-s12z.c: New file.
1517 * elf32-s12z.c: New file.
1518 * libbfd.c (bfd_putb24): New function.
1519 (bfd_putl24): New function.
1520 * libbfd.h: Regenerate.
1521 * reloc.c: Add s12z relocations.
1522 (bfd_get_reloc_size): Handle size 5 relocs.
1523 * targets.c: Add s12z_elf32_vec.
1525 2018-05-18 H.J. Lu <hongjiu.lu@intel.com>
1528 * elf32-i386.c (elf_i386_relocate_section): Handle R_386_GOT32X
1530 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
1531 set eh->local_ref to 1 for linker defined symbols.
1533 2018-05-18 Alan Modra <amodra@gmail.com>
1536 * elf.c (setup_group): Formatting. Check that SHT_GROUP entries
1537 don't point at other SHT_GROUP sections. Set shdr corresponding
1538 to invalid entry, to NULL rather than section 0. Identify
1539 SHT_GROUP section index when reporting an error. Cope with NULL
1542 2018-05-18 Alan Modra <amodra@gmail.com>
1544 * libbfd-in.h (ATTRIBUTE_HIDDEN): Define and use throughout.
1545 * configure.ac (HAVE_HIDDEN): Check compiler support for hidden
1547 * libbfd.h: Regenerate.
1548 * configure: Regenerate.
1549 * config.in: Regenerate.
1551 2018-05-18 Alan Modra <amodra@gmail.com>
1553 * libbfd-in.h: Add include guard.
1554 * libcoff-in.h: Likewise.
1555 * doc/Makefile.am (libbfd.h, libcoff.h): Append another #endif.
1556 * doc/Makefile.in: Regenerate.
1557 * libbfd.h: Regenerate.
1558 * libcoff.h: Regenerate.
1560 2018-05-16 Maciej W. Rozycki <macro@mips.com>
1562 * elf32-nds32.c (nds32_convert_32_to_16): Preset `insn_type'.
1564 2018-05-16 Alan Modra <amodra@gmail.com>
1567 * format.c (struct bfd_preserve): Add section_id.
1568 (bfd_preserve_save, bfd_preserve_restore): Save and restore
1570 (bfd_reinit): Set _bfd_section_id.
1571 (bfd_check_format_matches): Put all matches of any priority into
1572 matching_vector. Save initial section id and start each attempted
1573 match at that section id.
1574 * libbfd-in.h (_bfd_section_id): Declare.
1575 * section.c (_bfd_section_id): Rename from section_id and make
1576 global. Adjust uses.
1577 (bfd_get_next_section_id): Delete.
1578 * elf64-ppc.c (ppc64_elf_setup_section_lists): Replace use of
1579 bfd_get_section_id with _bfd_section_id.
1580 * libbfd.h: Regenerate.
1581 * bfd-in2.h: Regenerate.
1583 2018-05-15 Christophe Guillon <christophe.guillon@st.com>
1585 * coffcode.h (coff_bigobj_swap_aux_in): Make sure that all fields
1586 of the aux structure are initialised.
1588 2018-05-15 Francois H. Theron <francois.theron@netronome.com>
1590 * targets.c: Wrap nfp_elf64_vec in BFD64 ifdef.
1592 2018-05-15 Nick Clifton <nickc@redhat.com>
1594 * po/pt.po: New Portuguese translation.
1595 * configure.ac (ALL_LINGUAS): Add pt.
1596 * configure: Regenerate.
1598 2018-05-14 H.J. Lu <hongjiu.lu@intel.com>
1601 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Don't issue
1602 an error on IFUNC pointer defined in PDE.
1603 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Call
1604 _bfd_x86_elf_link_fixup_ifunc_symbol.
1605 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
1606 * elfxx-x86.c (_bfd_x86_elf_link_fixup_ifunc_symbol): New
1608 * elfxx-x86.h (_bfd_x86_elf_link_fixup_ifunc_symbol): New.
1610 2018-05-14 H.J. Lu <hongjiu.lu@intel.com>
1613 * elfxx-x86.c (elf_x86_linker_defined): New function.
1614 (_bfd_x86_elf_link_check_relocs): Use it to mark __bss_start,
1615 _end and _edata locally defined within executables.
1617 2018-05-12 Alan Modra <amodra@gmail.com>
1620 * elf.c (rewrite_elf_program_header): Use segment_mark only for
1621 PT_LOAD headers. Delete first_matching_lma and first_suggested_lma.
1622 Instead make matching_lma and suggested_lma pointers to the
1623 sections. Align section vma and lma calculated from segment.
1624 Don't clear includes_phdrs or includes_filehdr based on p_paddr
1625 test. Try to handle alignment padding before first section by
1626 adjusting new segment lma down. Adjust PT_PHDR map p_paddr.
1628 2018-05-09 Dimitar Dimitrov <dimitar@dinux.eu>
1630 * elf32-pru.c (pru_elf32_do_ldi32_relocate): Make LDI32 relocation
1631 conformant to TI ABI.
1632 (pru_elf32_relax_section): Likewise.
1633 (pru_elf_relax_delete_bytes): Fix offsets for new LDI32 code.
1634 * elf32-pru.c (pru_elf32_do_ldi32_relocate): Ignore addend.
1635 (pru_elf32_pmem_relocate): Trap - should not get here.
1636 (pru_elf32_relocate_section): Add support for REL relocations.
1637 (elf_info_to_howto_rel): Enable REL.
1638 (elf_backend_may_use_rel_p): Likewise.
1639 (elf_backend_may_use_rela_p): Likewise.
1640 (elf_backend_default_use_rela_p): Likewise.
1642 2018-05-09 Alan Modra <amodra@gmail.com>
1645 * peXXigen.c (pe_print_edata): Correct minimum size.
1647 2018-05-09 Alan Modra <amodra@gmail.com>
1650 * peXXigen.c (pe_print_idata): Bound check hint_addr.
1652 2018-05-08 Nick Clifton <nickc@redhat.com>
1655 * elf.c (bfd_elf_get_str_section): Check for an excessively large
1657 * elf-attrs.c (_bfd_elf_parse_attributes): Issue an error if the
1658 attribute section is larger than the size of the file.
1660 2018-05-07 Alan Modra <amodra@gmail.com>
1662 * cofflink.c (_bfd_coff_link_input_bfd): Use memcmp rather than
1663 strncmp when checking for ".bf" special symbol.
1664 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Make pe_required_section_flags
1665 section name a char array, remove sentinal known_sections entry,
1666 and adjust loop over known_sections to suit. Use memcmp rather
1669 2018-05-04 Alan Modra <amodra@gmail.com>
1671 * elf-linux-core.h (struct elf_external_linux_prpsinfo32_ugid32),
1672 (struct elf_external_linux_prpsinfo32_ugid16),
1673 (struct elf_external_linux_prpsinfo64_ugid32),
1674 (struct elf_external_linux_prpsinfo64_ugid16): Add ATTRIBUTE_NONSTRING
1675 to pr_fname and pr_psargs fields. Remove GCC diagnostic pragmas.
1677 * elf.c (elfcore_write_prpsinfo): ..here. Indent nested preprocessor
1679 * elf32-arm.c (elf32_arm_nabi_write_core_note): Add ATTRIBUTE_NONSTRING
1681 * elf32-ppc.c (ppc_elf_write_core_note): Likewise.
1682 * elf32-s390.c (elf_s390_write_core_note): Likewise.
1683 * elf64-s390.c (elf_s390_write_core_note): Likewise.
1684 * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewise.
1685 * elf64-x86-64.c (elf_x86_64_write_core_note): Add GCC diagnostic
1687 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Use strnlen to avoid
1688 false positive gcc-8 warning.
1689 * cofflink.c (_bfd_coff_link_input_bfd): Likewise.
1691 2018-05-04 Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
1693 * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Fix the order
1694 of arguments when warning about different long double types.
1696 2018-05-03 Simon Atanasyan <simon@atanasyan.com>
1698 * elf32-mips.c: (elf32_mips_fixup_symbol): New function.
1699 (elf_backend_fixup_symbol): New macro.
1700 * elfxx-mips.c: (mips_elf_output_extsym): Discard _gp_disp
1702 (_bfd_mips_elf_finish_dynamic_symbol): Likewise.
1704 2018-04-30 Francois H. Theron <francois.theron@netronome.com>
1706 * Makefile.am: Added NFP files to build.
1707 * archures.c: Added bfd_arch_nfp
1708 * config.bfd: Added NFP support.
1709 * configure.ac: Added NFP support.
1710 * cpu-nfp.c: New, for NFP support.
1711 * elf-bfd.h: Added elf_section_info()
1712 * elf64-nfp.c: New, for NFP support.
1713 * po/SRC-POTFILES.in: Added NFP source files.
1714 * targets.c: Added nfp_elf64_vec
1715 * bfd-in2.h: Regenerate.
1716 * Makefile.in: Regenerate.
1717 * configure: Regenerate.
1719 2018-04-27 Alan Modra <amodra@gmail.com>
1721 * bfd-in2.h: Regenerate.
1722 * libbfd.h: Regenerate.
1724 2018-04-27 Alan Modra <amodra@gmail.com>
1728 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't drop plt
1730 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Comment fixes.
1732 2018-04-26 Pedro Alves <palves@redhat.com>
1734 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't consider
1735 ifunc and non-ifunc symbols duplicates.
1737 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1738 Mickaël Guêné <mickael.guene@st.com>
1740 * elf32-arm.c (elf32_arm_fdpic_thumb_plt_entry): New.
1741 (elf32_arm_plt_needs_thumb_stub_p): Handle thumb-only case.
1742 (elf32_arm_populate_plt_entry): Likewise.
1743 (elf32_arm_output_plt_map_1): Likewise.
1744 (elf32_arm_output_arch_local_syms): Likewise.
1746 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1747 Mickaël Guêné <mickael.guene@st.com>
1749 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Handle
1750 _GLOBAL_OFFSET_TABLE_ in FDPIC mode.
1752 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1753 Mickaël Guêné <mickael.guene@st.com>
1755 * elf32-arm.c (bfd_elf32_arm_set_target_params): Handle FDPIC case
1758 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1759 Mickaël Guêné <mickael.guene@st.com>
1761 * elf32-arm.c (DEFAULT_STACK_SIZE): New.
1762 (elf32_arm_always_size_sections): Create stack segment.
1764 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1765 Mickaël Guêné <mickael.guene@st.com>
1767 * bfd-in2.h (BFD_RELOC_ARM_TLS_GD32_FDPIC)
1768 (BFD_RELOC_ARM_TLS_LDM32_FDPIC, BFD_RELOC_ARM_TLS_IE32_FDPIC): New
1770 * elf32-arm.c (elf32_arm_howto_table_2): Add R_ARM_TLS_GD32_FDPIC,
1771 R_ARM_TLS_LDM32_FDPIC, R_ARM_TLS_IE32_FDPIC relocations.
1772 (elf32_arm_reloc_map): Add R_ARM_TLS_GD32_FDPIC,
1773 R_ARM_TLS_LDM32_FDPIC, R_ARM_TLS_IE32_FDPIC.
1774 (struct elf32_arm_link_hash_table): Update comment.
1775 (elf32_arm_final_link_relocate): Handle TLS FDPIC relocations.
1776 (IS_ARM_TLS_RELOC): Likewise.
1777 (elf32_arm_check_relocs): Likewise.
1778 (allocate_dynrelocs_for_symbol): Likewise.
1779 (elf32_arm_size_dynamic_sections): Update comment.
1780 * reloc.c: Add BFD_RELOC_ARM_TLS_GD32_FDPIC,
1781 BFD_RELOC_ARM_TLS_LDM32_FDPIC, BFD_RELOC_ARM_TLS_IE32_FDPIC.
1783 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1784 Mickaël Guêné <mickael.guene@st.com>
1786 * elf32-arm.c (elf32_arm_fdpic_plt_entry): New.
1787 (elf32_arm_create_dynamic_sections): Handle FDPIC.
1788 (elf32_arm_allocate_plt_entry): Likewise.
1789 (elf32_arm_populate_plt_entry): Likewise.
1790 (elf32_arm_output_plt_map_1): Likewise.
1792 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1793 Mickaël Guêné <mickael.guene@st.com>
1795 * elf32-arm.c (struct fdpic_local): New.
1796 (elf_arm_obj_tdata): Add local_fdpic_cnts field.
1797 (elf32_arm_local_fdpic_cnts): New.
1798 (struct fdpic_global): New.
1799 (elf32_arm_link_hash_entry): Add fdpic_cnts field.
1800 (elf32_arm_link_hash_table): Add srofixup field.
1801 (arm_elf_add_rofixup): New.
1802 (arm_elf_fill_funcdesc): New.
1803 (elf32_arm_link_hash_newfunc): Handle fdpic_cnts.
1804 (elf32_arm_allocate_local_sym_info): Likewise.
1805 (create_got_section): Create .rofixup section.
1806 (elf32_arm_copy_indirect_symbol): Handle fdpic_cnts.
1807 (bfd_elf32_arm_set_target_params): Handle FDPIC.
1808 (elf32_arm_final_link_relocate): Likewise.
1809 (elf32_arm_check_relocs): Likewise.
1810 (allocate_dynrelocs_for_symbol): Likewise.
1811 (elf32_arm_size_dynamic_sections): Likewise.
1812 (elf32_arm_finish_dynamic_sections): Likewise.
1813 (elf32_arm_output_arch_local_syms): Likewise.
1814 (elf32_arm_fdpic_omit_section_dynsym): New.
1816 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1817 Mickaël Guêné <mickael.guene@st.com>
1819 * bfd-in2.c (BFD_RELOC_ARM_GOTFUNCDESC)
1820 (BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC)
1821 (BFD_RELOC_ARM_FUNCDESC_VALUE): New.
1822 * elf32-arm.c (elf32_arm_howto_table_2): Add R_ARM_GOTFUNCDESC,
1823 R_ARM_GOTOFFFUNCDESC, R_ARM_FUNCDESC, R_ARM_FUNCDESC_VALUE.
1824 (elf32_arm_howto_from_type): Take new members of
1825 elf32_arm_howto_table_2 into account.
1826 (elf32_arm_reloc_map): Add BFD_RELOC_ARM_GOTFUNCDESC,
1827 BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC,
1828 BFD_RELOC_ARM_FUNCDESC_VALUE.
1829 * reloc.c: Add BFD_RELOC_ARM_GOTFUNCDESC,
1830 BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC,
1831 BFD_RELOC_ARM_FUNCDESC_VALUE.
1833 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1834 Mickaël Guêné <mickael.guene@st.com>
1836 * elf32-arm.c (elf32_arm_print_private_bfd_data): Support
1837 EF_ARM_PIC and ELFOSABI_ARM_FDPIC.
1838 (elf32_arm_post_process_headers): Support ELFOSABI_ARM_FDPIC.
1839 (ELF_OSABI): Define to ELFOSABI_ARM_FDPIC.
1841 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1842 Mickaël Guêné <mickael.guene@st.com>
1844 * config.bfd (arm*-*-linux-*): Add arm_elf32_fdpic_be_vec and
1845 arm_elf32_fdpic_le_vec to targ_selvecs. Accept
1846 arm*-*-uclinuxfdpiceabi.
1847 * configure.ac: Add support for arm_elf32_fdpic_be_vec and
1848 arm_elf32_fdpic_le_vec.
1849 * configure: Regenerate.
1850 * elf32-arm.c (struct elf32_arm_link_hash_table): Add fdpic_p.
1851 (elf32_arm_link_hash_table_create): Initialize fdpic_p.
1852 (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME, TARGET_BIG_SYM)
1853 (TARGET_BIG_NAME, elf_match_priority): Define for FDPIC targets.
1854 (elf32_arm_fdpic_link_hash_table_create): New.
1855 * targets.c (_bfd_target_vector): Add arm_elf32_fdpic_be_vec and
1856 arm_elf32_fdpic_le_vec.
1858 2018-04-25 Alan Modra <amodra@gmail.com>
1860 * elf-linux-core.h: Disable gcc-8 string truncation warning.
1861 * elf.c (elfcore_write_prpsinfo): Likewise.
1863 2018-04-25 Alan Modra <amodra@gmail.com>
1865 * Makefile.am: Remove arm-aout and arm-coff support.
1866 * config.bfd: Likewise.
1867 * configure.ac: Likewise.
1868 * targets.c: Likewise.
1869 * aout-arm.c: Delete.
1870 * armnetbsd.c: Delete.
1872 * Makefile.in: Regenerate.
1873 * configure: Regenerate.
1874 * po/SRC-POTFILES.in: Regenerate.
1876 2018-04-24 Nick Clifton <nickc@redhat.com>
1879 * elf.c (ignore_section_sym): Check for the output_section pointer
1880 being NULL before dereferencing it.
1883 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Check for
1884 a negative PE_DEBUG_DATA size before iterating over the debug data.
1886 2018-04-23 Alan Modra <amodra@gmail.com>
1888 * elf-linux-core.h: Revert last change.
1891 2018-04-23 Nick Clifton <nickc@redhat.com>
1894 * aoutx.h (aout_get_external_symbols): Allocate an extra byte at
1895 the end of the string table, and zero it.
1897 2018-04-23 Alan Modra <amodra@gmail.com>
1899 * elf-linux-core.h (swap_linux_prpsinfo32_ugid32_out): Disable
1900 gcc-8 string truncation warning.
1901 (swap_linux_prpsinfo32_ugid16_out): Likewise.
1902 (swap_linux_prpsinfo64_ugid32_out): Likewise.
1903 (swap_linux_prpsinfo64_ugid16_out): Likewise.
1904 * elf.c (elfcore_write_prpsinfo): Likewise.
1906 2018-04-23 Nick Clifton <nickc@redhat.com>
1909 * aoutx.h (aout_get_external_symbols): Allocate an extra byte at
1910 the end of the string table, and zero it.
1912 2018-04-20 Alan Modra <amodra@gmail.com>
1915 * elf32-hppa.c (got_relocs_needed): Add extra param to special
1916 case both dtprel and tprel relocs.
1917 (allocate_dynrelocs): Adjust conditions for got relocs.
1918 (elf32_hppa_relocate_section): Likewise for local sym got relocs.
1919 Emit dynamic relocs on TLS GOT entries for shared libraries,
1920 not when pic. Omit dynamic reloc on dtprel entry when local,
1921 and on tprel entry when local and executable.
1923 2018-04-19 Alan Modra <amodra@gmail.com>
1926 * elf32-hppa.c (elf32_hppa_size_stubs): Init "destination" to -1.
1927 (hppa_type_of_stub): Don't return a long branch stub for
1928 symbols other than those defined statically.
1930 2018-04-19 Alan Modra <amodra@gmail.com>
1932 * Makefile.am: Revert 2018-04-18 coff-mips changes.
1933 * config.bfd: Add back mips_ecoff_le_vec and mips_ecoff_be_vec
1934 to selvecs for mips targets change 2018-04-18.
1935 * configure.ac: Reinstate mips_ecoff_le_vec, mips_ecoff_be_vec
1936 and mips_ecoff_bele_vec.
1937 * targets.c: Likewise.
1938 * coff-mips.c: Resurrect.
1939 * Makefile.in: Regenerate.
1940 * configure: Regenerate.
1941 * po/SRC-POTFILES.in: Regenerate.
1943 2018-04-18 Alan Modra <amodra@gmail.com>
1945 * Makefile.am: Remove mips aout and coff support.
1946 * config.bfd: Likewise.
1947 * configure.ac: Likewise.
1948 * targets.c: Likewise.
1949 * coff-mips.c: Delete
1952 * pei-mips.c: Delete
1953 * Makefile.in: Regenerate.
1954 * configure: Regenerate.
1955 * po/SRC-POTFILES.in: Regenerate.
1957 2018-04-17 H.J. Lu <hongjiu.lu@intel.com>
1959 * elf32-i386.c (elf32_bed): Define before including
1961 * elf64-x86-64.c (elf64_bed): Define before including
1963 (elf32_bed): Define before including "elf32-target.h".
1965 2018-04-17 H.J. Lu <hongjiu.lu@intel.com>
1968 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Use a
1969 normal input file with compatible relocation.
1971 2018-04-18 Alan Modra <amodra@gmail.com>
1973 * Makefile.am: Remove support for assorted i386 aout and coff targets.
1974 * config.bfd: Likewise.
1975 * configure.ac: Likewise.
1976 * doc/bfdint.texi: Likewise.
1977 * targets.c: Likewise.
1978 * freebsd.h: Delete.
1979 * i386dynix.c: Delete.
1980 * i386freebsd.c: Delete.
1981 * i386linux.c: Delete.
1982 * i386mach3.c: Delete.
1983 * i386netbsd.c: Delete.
1984 * i386os9k.c: Delete.
1985 * Makefile.in: Regenerate.
1986 * configure: Regenerate.
1987 * po/SRC-POTFILES.in: Regenerate.
1989 2018-04-17 Andrew Sadek <andrew.sadek.se@gmail.com>
1991 Microblaze Target: PIC data text relative
1993 * bfd/reloc.c (2 new BFD relocations):
1994 BFD_RELOC_MICROBLAZE_64_TEXTPCREL &
1995 BFD_RELOC_MICROBLAZE_64_TEXTPCREL
1996 * bfd/bfd-in2.h: Regenerate
1997 * bfd/libbfd.h: Regenerate
1998 * bfd/elf32-microblaze.c (Handle new relocs): define 'HOWTO' of 3
1999 new relocs and handle them in both relocate and relax functions.
2000 (microblaze_elf_reloc_type_lookup): add mapping between for new
2002 (microblaze_elf_relocate_section): Handle new relocs in case of
2004 (microblaze_elf_relax_section): Handle new relocs for elf relaxation.
2006 2018-04-17 Nick Clifton <nickc@redhat.com>
2009 * aoutx.h (find_nearest_line): Check that the symbol name exists
2010 and is long enough, before attempting to see if it is for a .o
2012 * hash.c (bfd_hash_hash): Add an assertion that the string is not
2014 * linker.c (bfd_link_hash_lookup): Fail if the table or string are
2016 (_bfd_generic_link_add_archive_symbols): Fail if an archive entry
2020 * dwarf2.c (concat_filename): Check for a NULL table pointer.
2022 2018-04-16 Nick Clifton <nickc@redhat.com>
2025 * coffgen.c (coff_pointerize_aux): Check for an out of range
2028 2018-04-16 Alan Modra <amodra@gmail.com>
2030 * Makefile.am: Remove arm-epoc-pe support.
2031 * coff-arm.c: Likewise.
2032 * config.bfd: Likewise.
2033 * configure.ac: Likewise.
2034 * targets.c: Likewise.
2035 * epoc-pe-arm.c: Delete.
2036 * epoc-pei-arm.c: Delete.
2037 * Makefile.in: Regenerate.
2038 * configure: Regenerate.
2039 * po/SRC-POTFILES.in: Regenerate.
2041 2018-04-16 Alan Modra <amodra@gmail.com>
2043 * Makefile.am: Remove sparc-aout and sparc-coff support.
2044 * config.bfd: Likewise.
2045 * configure.ac: Likewise.
2046 * targets.c: Likewise.
2047 * aout-sparcle.c: Delete.
2049 * cf-sparclynx.c: Delete.
2050 * coff-sparc.c: Delete.
2052 * sparclinux.c: Delete.
2053 * sparclynx.c: Delete.
2054 * sparcnetbsd.c: Delete.
2056 * Makefile.in: Regenerate.
2057 * configure: Regenerate.
2058 * po/SRC-POTFILES.in: Regenerate.
2060 2018-04-16 Alan Modra <amodra@gmail.com>
2062 * Makefile.am: Remove m68k-aout and m68k-coff support.
2063 * aoutf1.h: Likewise.
2064 * aoutx.h: Likewise.
2065 * archive.c: Likewise.
2066 * bfd-in.h: Likewise.
2068 * coffcode.h: Likewise.
2069 * coffswap.h: Likewise.
2070 * config.bfd: Likewise.
2071 * configure.ac: Likewise.
2072 * configure.host: Likewise.
2073 * doc/bfd.texinfo: Likewise.
2074 * doc/bfdint.texi: Likewise.
2075 * freebsd.h: Likewise.
2076 * gen-aout.c: Likewise.
2077 * hpux-core.c: Likewise.
2078 * libaout.h: Likewise.
2079 * libbfd-in.h: Likewise.
2080 * pdp11.c: Likewise.
2081 * peicode.h: Likewise.
2082 * riscix.c: Likewise.
2083 * targets.c: Likewise.
2085 * coff-apollo.c: Delete.
2086 * coff-aux.c: Delete.
2087 * coff-m68k.c: Delete.
2088 * coff-svm68k.c: Delete.
2089 * coff-u68k.c: Delete.
2090 * hosts/delta68.h: Delete.
2091 * hosts/hp300bsd.h: Delete.
2092 * hosts/m68kaux.h: Delete.
2093 * hosts/news.h: Delete.
2094 * hp300bsd.c: Delete.
2095 * hp300hpux.c: Delete.
2096 * liboasys.h: Delete.
2097 * m68k4knetbsd.c: Delete.
2098 * m68klinux.c: Delete.
2099 * m68knetbsd.c: Delete.
2101 * versados.c: Delete.
2102 * Makefile.in: Regenerate.
2103 * bfd-in2.h: Regenerate.
2104 * configure: Regenerate.
2105 * libbfd.h: Regenerate.
2106 * po/SRC-POTFILES.in: Regenerate.
2108 2018-04-16 Alan Modra <amodra@gmail.com>
2110 * Makefile.am: Remove sh5 and sh64 support.
2111 * archures.c: Likewise.
2112 * config.bfd: Likewise.
2113 * configure.ac: Likewise.
2114 * cpu-sh.c: Likewise.
2115 * elf32-sh-relocs.h: Likewise.
2116 * elf32-sh.c: Likewise.
2117 * targets.c: Likewise.
2118 * elf32-sh64-com.c: Delete.
2119 * elf32-sh64.c: Delete.
2120 * elf32-sh64.h: Delete.
2121 * elf64-sh64.c: Delete.
2122 * Makefile.in: Regenerate.
2123 * bfd-in2.h: Regenerate.
2124 * configure: Regenerate.
2125 * po/SRC-POTFILES.in: Regenerate.
2127 2018-04-16 Alan Modra <amodra@gmail.com>
2129 * Makefile.am: Remove sh-symbianelf support.
2130 * config.bfd: Likewise.
2131 * configure.ac: Likewise.
2132 * targets.c: Likewise.
2133 * elf32-sh-symbian.c: Delete.
2134 * Makefile.in: Regenerate.
2135 * configure: Regenerate.
2136 * po/SRC-POTFILES.in: Regenerate.
2138 2018-04-16 Alan Modra <amodra@gmail.com>
2140 * Makefile.am: Remove vax-bsd and vax-ultrix support.
2141 * config.bfd: Likewise.
2142 * configure.ac: Likewise.
2143 * targets.c: Likewise.
2145 * Makefile.in: Regenerate.
2146 * configure: Regenerate.
2147 * po/SRC-POTFILES.in: Regenerate.
2149 2018-04-16 Alan Modra <amodra@gmail.com>
2151 * Makefile.am: Remove w65 support.
2152 * archures.c: Likewise.
2153 * coffcode.h: Likewise.
2154 * config.bfd: Likewise.
2155 * configure.ac: Likewise.
2156 * targets.c: Likewise.
2157 * coff-w65.c: Delete.
2158 * cpu-w65.c: Delete.
2159 * Makefile.in: Regenerate.
2160 * bfd-in2.h: Regenerate.
2161 * configure: Regenerate.
2162 * po/SRC-POTFILES.in: Regenerate.
2164 2018-04-16 Alan Modra <amodra@gmail.com>
2166 * Makefile.am: Remove we32k support.
2167 * archures.c: Likewise.
2168 * coffcode.h: Likewise.
2169 * config.bfd: Likewise.
2170 * configure.ac: Likewise.
2171 * targets.c: Likewise.
2172 * coff-we32k.c: Delete.
2173 * cpu-we32k.c: Delete.
2174 * Makefile.in: Regenerate.
2175 * bfd-in2.h: Regenerate.
2176 * configure: Regenerate.
2177 * po/SRC-POTFILES.in: Regenerate.
2179 2018-04-16 Alan Modra <amodra@gmail.com>
2181 * Makefile.am: Remove m88k support.
2182 * aoutx.h: Likewise.
2183 * archures.c: Likewise.
2184 * coffcode.h: Likewise.
2185 * coffswap.h: Likewise.
2186 * config.bfd: Likewise.
2187 * configure.ac: Likewise.
2188 * cpu-ns32k.c: Likewise.
2189 * elf32-nds32.c: Likewise.
2190 * mach-o.c: Likewise.
2191 * netbsd-core.c: Likewise.
2192 * reloc.c: Likewise.
2193 * targets.c: Likewise.
2194 * coff-m88k.c: Delete.
2195 * cpu-m88k.c: Delete.
2196 * elf32-m88k.c: Delete.
2197 * hosts/m88kmach3.h: Delete.
2198 * m88kmach3.c: Delete.
2199 * m88kopenbsd.c: Delete.
2200 * Makefile.in: Regenerate.
2201 * bfd-in2.h: Regenerate.
2202 * configure: Regenerate.
2203 * po/SRC-POTFILES.in: Regenerate.
2205 2018-04-16 Alan Modra <amodra@gmail.com>
2207 * Makefile.am: Remove i370 support.
2208 * archures.c: Likewise.
2209 * config.bfd: Likewise.
2210 * configure.ac: Likewise.
2211 * targets.c: Likewise.
2212 * cpu-i370.c: Delete.
2213 * elf32-i370.c: Delete.
2214 * Makefile.in: Regenerate.
2215 * bfd-in2.h: Regenerate.
2216 * configure: Regenerate.
2217 * po/SRC-POTFILES.in: Regenerate.
2219 2018-04-16 Alan Modra <amodra@gmail.com>
2221 * Makefile.am: Remove h8500 support.
2222 * archures.c: Likewise.
2223 * coffcode.h: Likewise.
2224 * config.bfd: Likewise.
2225 * configure.ac: Likewise.
2226 * targets.c: Likewise.
2227 * coff-h8500.c: Delete.
2228 * cpu-h8500.c: Delete.
2229 * Makefile.in: Regenerate.
2230 * bfd-in2.h: Regenerate.
2231 * configure: Regenerate.
2232 * po/SRC-POTFILES.in: Regenerate.
2234 2018-04-16 Alan Modra <amodra@gmail.com>
2236 * Makefile.am: Remove h8300-coff support.
2237 * coffcode.h: Likewise.
2238 * config.bfd: Likewise.
2239 * configure.ac: Likewise.
2240 * reloc16.c: Likewise.
2241 * targets.c: Likewise.
2242 * coff-h8300.c: Delete.
2243 * Makefile.in: Regenerate.
2244 * configure: Regenerate.
2245 * po/SRC-POTFILES.in: Regenerate.
2247 2018-04-16 Alan Modra <amodra@gmail.com>
2249 * Makefile.am: Remove IEEE 695 support.
2250 * archures.c: Likewise.
2252 * config.bfd: Likewise.
2253 * configure.ac: Likewise.
2254 * doc/bfd.texinfo: Likewise.
2255 * doc/bfdint.texi: Likewise.
2256 * doc/bfdsumm.texi: Likewise.
2257 * section.c: Likewise.
2258 * targets.c: Likewise.
2260 * libieee.h: Delete.
2261 * Makefile.in: Regenerate.
2262 * bfd-in2.h: Regenerate.
2263 * configure: Regenerate.
2264 * po/SRC-POTFILES.in: Regenerate.
2266 2018-04-16 Alan Modra <amodra@gmail.com>
2268 * config.bfd: Remove tandem support.
2270 2018-04-16 Alan Modra <amodra@gmail.com>
2272 * Makefile.am: Remove newsos3 support.
2273 * aoutx.h: Likewise.
2274 * config.bfd: Likewise.
2275 * configure.ac: Likewise.
2276 * targets.c: Likewise.
2277 * newsos3.c: Delete.
2278 * Makefile.in: Regenerate.
2279 * configure: Regenerate.
2280 * po/SRC-POTFILES.in: Regenerate.
2282 2018-04-16 Alan Modra <amodra@gmail.com>
2284 * Makefile.am: Remove netware support.
2285 * bfd-in.h: Likewise.
2287 * config.bfd: Likewise.
2288 * configure.ac: Likewise.
2289 * doc/bfdint.texi: Likewise.
2290 * ecoff.c: Likewise.
2291 * targets.c: Likewise.
2293 * nlm-target.h: Delete.
2295 * nlm32-alpha.c: Delete.
2296 * nlm32-i386.c: Delete.
2297 * nlm32-ppc.c: Delete.
2298 * nlm32-sparc.c: Delete.
2301 * nlmcode.h: Delete.
2302 * nlmswap.h: Delete.
2303 * Makefile.in: Regenerate.
2304 * bfd-in2.h: Regenerate.
2305 * configure: Regenerate.
2306 * po/SRC-POTFILES.in: Regenerate.
2308 2018-04-16 Alan Modra <amodra@gmail.com>
2310 * archures.c: Remove tahoe support.
2311 * config.bfd: Likewise.
2312 * configure.ac: Likewise.
2313 * hosts/tahoe.h: Delete.
2314 * bfd-in2.h: Regenerate.
2315 * configure: Regenerate.
2317 2018-04-14 Alan Modra <amodra@gmail.com>
2319 * elf-bfd.h (struct elf_backend_data): Add relropagesize.
2320 * elfxx-target.h (ELF_RELROPAGESIZE): Provide default and
2322 (elfNN_bed): Init relropagesize.
2323 * bfd.c (bfd_emul_get_commonpagesize): Add boolean param to
2324 select relropagesize.
2325 * elf32-ppc.c (ELF_COMMONPAGESIZE): Define as 0x1000.
2326 (ELF_RELROPAGESIZE): Define as ELF_MAXPAGESIZE.
2327 (ELF_MINPAGESIZE): Don't define.
2328 * elf64-ppc.c (ELF_COMMONPAGESIZE): Define as 0x1000.
2329 (ELF_RELROPAGESIZE): Define as ELF_MAXPAGESIZE.
2330 * bfd-in2.h: Regenerate.
2332 2018-04-14 Alan Modra <amodra@gmail.com>
2334 * elf32-ppc.c (ELF_MAXPAGESIZE, ELF_COMMONPAGESIZE): Don't depend
2335 on __QNXTARGET__ define.
2337 2018-04-14 Alan Modra <amodra@gmail.com>
2339 * config.bfd: Add powerpc-*-lynxos* and powerpc-*-windiss*
2342 2018-04-11 Alan Modra <amodra@gmail.com>
2344 * aout-adobe.c: Delete.
2346 * coff-i860.c: Delete.
2347 * coff-i960.c: Delete.
2348 * cpu-i860.c: Delete.
2349 * cpu-i960.c: Delete.
2350 * elf32-i860.c: Delete.
2351 * elf32-i960.c: Delete.
2352 * hosts/i860mach3.h: Delete.
2353 * Makefile.am: Remove i860, i960, bout, and adobe support.
2354 * archures.c: Remove i860 and i960 support.
2355 * coffcode.h: Likewise.
2356 * reloc.c: Likewise.
2357 * aoutx.h: Comment updates.
2358 * archive.c: Remove BOUT and i960 support.
2359 * bfd.c: Remove BOUT support.
2360 * coffswap.h: Remove i960 support.
2361 * config.bfd: Remove i860, i960 and adobe targets.
2362 * configure.ac: Remove adode, bout, i860, i960, icoff targets.
2363 * targets.c: Likewise.
2364 * ieee.c: Remove i960 support.
2365 * mach-o.c: Remove i860 support.
2366 * Makefile.in: Regenerate.
2367 * bfd-in2.h: Regenerate.
2368 * configure: Regenerate.
2369 * libbfd.h: Regenerate.
2370 * po/SRC-POTFILES.in: Regenerate.
2372 2018-04-09 Maciej W. Rozycki <macro@mips.com>
2374 * elf64-mips.c (mips_elf64_write_rel): Handle a NULL BFD pointer
2375 in the BFD symbol referred by the relocation.
2376 (mips_elf64_write_rela): Likewise.
2378 2018-04-09 Maciej W. Rozycki <macro@mips.com>
2380 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Issue an
2381 error for out-of-range `r_sym' values.
2383 2018-04-09 Alan Modra <amodra@gmail.com>
2385 * elf64-ppc.c (struct _ppc64_elf_section_data): Add has_pltcall field.
2386 (struct ppc_link_hash_table): Add can_convert_all_inline_plt.
2387 (ppc64_elf_check_relocs): Set has_pltcall.
2388 (ppc64_elf_adjust_dynamic_symbol): Discard some PLT entries.
2389 (ppc64_elf_inline_plt): New function.
2390 (ppc64_elf_size_dynamic_sections): Discard some PLT entries for locals.
2391 * elf64-ppc.h (ppc64_elf_inline_plt): Declare.
2392 * elf32-ppc.c (has_pltcall): Define.
2393 (struct ppc_elf_link_hash_table): Add can_convert_all_inline_plt.
2394 (ppc_elf_check_relocs): Set has_pltcall.
2395 (ppc_elf_inline_plt): New function.
2396 (ppc_elf_adjust_dynamic_symbol): Discard some PLT entries.
2397 (ppc_elf_size_dynamic_sections): Likewise.
2398 * elf32-ppc.h (ppc_elf_inline_plt): Declare.
2400 2018-04-09 Alan Modra <amodra@gmail.com>
2402 * elf32-ppc.c (ppc_elf_howto_raw): Add PLTSEQ and PLTCALL howtos.
2403 (is_plt_seq_reloc): New function.
2404 (ppc_elf_check_relocs): Handle PLTSEQ and PLTCALL relocs.
2405 (ppc_elf_tls_optimize): Handle inline plt call sequence.
2406 (ppc_elf_relax_section): Handle PLTCALL reloc.
2407 (ppc_elf_relocate_section): Nop out inline plt call sequence when
2409 * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_PLTSEQ and
2410 R_PPC64_PLTCALL entries. Comment R_PPC64_TOCSAVE.
2411 (has_tls_get_addr_call): Correct comment.
2412 (is_branch_reloc): Add PLTCALL.
2413 (is_plt_seq_reloc): New function.
2414 (ppc64_elf_check_relocs): Handle PLT16_LO_DS reloc. Set
2415 has_tls_reloc for R_PPC64_TLSGD and R_PPC64_TLSLD. Create plt
2416 entry for R_PPC64_PLTCALL.
2417 (ppc64_elf_tls_optimize): Handle inline plt call sequence.
2418 (ppc_type_of_stub): Handle PLTCALL reloc.
2419 (toc_adjusting_stub_needed): Likewise.
2420 (ppc64_elf_relocate_section): Set "can_plt_call" for PLTCALL
2421 reloc insn. Nop out inline plt call sequence when resolving
2422 locally. Handle __tls_get_addr inline plt call optimization.
2424 2018-04-09 Alan Modra <amodra@gmail.com>
2426 * elf64-ppc.c (LOCAL_PLT_ENTRY_SIZE): Define.
2427 (struct ppc_stub_hash_entry): Add symtype field.
2429 (struct ppc_link_hash_table): Add pltlocal and relpltlocal.
2430 (create_linkage_sections): Create pltlocal and relpltlocal.
2431 (ppc64_elf_check_relocs): Allow PLT relocs on local symbols.
2433 (ppc64_elf_adjust_dynamic_symbol): Keep PLT entries for inline calls.
2434 (allocate_dynrelocs): Allocate pltlocal and relpltlocal.
2435 (ppc64_elf_size_dynamic_sections): Size pltlocal and relpltlocal.
2436 Keep PLT entries for inline calls against locals.
2437 (ppc_build_one_stub): Use pltlocal as appropriate.
2438 (ppc_size_one_stub): Likewise.
2439 (ppc64_elf_size_stubs): Set symtype.
2440 (build_global_entry_stubs_and_plt): Init pltlocal and write
2441 relpltlocal for globals.
2442 (write_plt_relocs_for_local_syms): Likewise for local syms.
2443 (ppc64_elf_relocate_section): Support PLT for local syms.
2444 * elf32-ppc.c (PLT_KEEP): Define.
2445 (struct ppc_elf_link_hash_table): Add pltlocal and relpltlocal.
2446 (ppc_elf_create_glink): Create pltlocal and relpltlocal.
2447 (ppc_elf_check_relocs): Allow PLT relocs on local symbols.
2448 Set PLT_KEEP. Adjust update_local_sym_info call.
2449 (ppc_elf_adjust_dynamic_symbol): Keep PLT entries for inline calls.
2450 (allocate_dynrelocs): Allocate pltlocal and relpltlocal.
2451 (ppc_elf_size_dynamic_sections): Size pltlocal and relpltlocal.
2452 (ppc_elf_relocate_section): Support PLT16 relocs for local syms.
2453 (write_global_sym_plt): Init pltlocal and write relpltlocal.
2454 (ppc_finish_symbols): Likewise for locals.
2456 2018-04-09 Alan Modra <amodra@gmail.com>
2458 * elf64-ppc.c (ppc_build_one_stub): Move output of PLT relocs
2459 for local symbols to..
2460 (write_plt_relocs_for_local_syms): ..here. New function.
2461 (ppc64_elf_finish_dynamic_symbol): Move output of PLT relocs for
2463 (build_global_entry_stubs_and_plt): ..here. Rename from
2464 build_global_entry_stubs.
2465 (ppc64_elf_build_stubs): Always call build_global_entry_stubs_and_plt.
2466 Call write_plt_relocs_for_local_syms.
2467 * elf32-ppc.c (get_sym_h): New function.
2468 (ppc_elf_relax_section): Use get_sym_h.
2469 (ppc_elf_relocate_section): Move output of PLT relocs and glink
2470 stubs for local symbols to..
2471 (ppc_finish_symbols): ..here. New function.
2472 (ppc_elf_finish_dynamic_symbol): Move output of PLT relocs for
2474 (write_global_sym_plt): ..here. New function.
2475 * elf32-ppc.h (ppc_elf_modify_segment_map): Delete attribute.
2476 (ppc_finish_symbols): Declare.
2478 2018-04-09 Alan Modra <amodra@gmail.com>
2480 * elf32-ppc.c (ppc_elf_check_relocs): Handle PLT16 relocs.
2481 (ppc_elf_relocate_section): Likewise.
2482 * elf64-ppc.c (ppc64_elf_check_relocs): Handle PLT16_LO_DS.
2483 (ppc64_elf_relocate_section): Likewise. Correct PLT16
2484 resolution to plt entry relative to toc pointer.
2486 2018-04-09 Alan Modra <amodra@gmail.com>
2488 * elf64-ppc.c (TLS_TLS, TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL,
2489 TLS_TPRELGD, TLS_EXPLICIT): Renumber. Test TLS_TLS throughout
2490 file when other TLS flags are tested in a mask.
2491 (TLS_MARK, NON_GOT): Define.
2492 (PLT_IFUNC): Redefine, and test TLS_TLS throughout file as well.
2493 (update_local_sym_info): Don't create got entry when NON_GOT.
2494 (ppc64_elf_check_relocs): Pass NON_GOT with PLT_IFUNC.
2496 (get_tls_mask): Do toc lookup if tls_mask is just TLS_MARK.
2497 (ppc64_elf_relocate_section): Likewise.
2498 (ppc64_elf_tls_optimize): Don't attempt to optimize indirect
2499 __tls_get_addr calls lacking a marker reloc.
2500 * elf32-ppc.c (TLS_TLS, TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL,
2501 TLS_TPRELGD): Renumber. Update comment.
2502 (TLS_MARK, NON_GOT): Define.
2503 (PLT_IFUNC): Redefine, and test TLS_TLS throughout file as well.
2504 (update_local_sym_info): Don't create got entry when NON_GOT.
2505 (ppc_elf_check_relocs): Pass NON_GOT with PLT_IFUNC.
2507 (ppc_elf_tls_optimize): Don't attempt to optimize indirect
2508 __tls_get_addr calls lacking a marker reloc.
2510 2018-04-06 H.J. Lu <hongjiu.lu@intel.com>
2512 * elf64-x86-64.c (elf_x86_64_info_to_howto): Don't mask out
2513 R_X86_64_converted_reloc_bit.
2515 2018-04-05 H.J. Lu <hongjiu.lu@intel.com>
2518 * configure: Regenerated.
2520 2018-04-05 Alan Modra <amodra@gmail.com>
2522 * elf-hppa.h (elf_hppa_info_to_howto): Init howto to NULL.
2523 (elf_hppa_info_to_howto_rel): Likewise.
2525 2018-04-04 Maciej W. Rozycki <macro@mips.com>
2527 * elf-hppa.h (elf_hppa_info_to_howto): Also return
2528 unsuccessfully for unimplemented relocations.
2529 (elf_hppa_info_to_howto_rel): Likewise.
2531 2018-04-04 Maciej W. Rozycki <macro@mips.com>
2533 * elf32-i860.c (lookup_howto): Add `abfd' parameter. Set the
2534 `bfd_error_bad_value' error and call `_bfd_error_handler' on a
2535 howto lookup failure.
2536 (elf32_i860_reloc_type_lookup): Adjust `lookup_howto' call
2538 (elf32_i860_info_to_howto_rela): Likewise.
2539 (elf32_i860_relocate_splitn): Likewise.
2540 (elf32_i860_relocate_pc16): Likewise.
2541 (elf32_i860_relocate_pc26): Likewise.
2542 (elf32_i860_relocate_section): Likewise.
2544 2018-04-04 Maciej W. Rozycki <macro@mips.com>
2546 * elf32-visium.c (visium_info_to_howto_rela): Correct the range
2547 check for `visium_elf_howto_table' table access.
2549 2018-04-04 Maciej W. Rozycki <macro@mips.com>
2551 * elf32-iq2000.c (iq2000_info_to_howto_rela): Correct the range
2552 check for `iq2000_elf_howto_table' table access.
2554 2018-04-04 Maciej W. Rozycki <macro@mips.com>
2556 * elf32-frv.c (frv_info_to_howto_rela): Correct the range check
2557 for `elf32_frv_howto_table' table access.
2559 2018-04-04 Maciej W. Rozycki <macro@mips.com>
2561 * elf32-mips.c (mips_elf32_rtype_to_howto): Also return
2562 unsuccessfully for placeholder howtos.
2563 * elf64-mips.c (mips_elf64_rtype_to_howto): Likewise.
2564 * elfn32-mips.c (mips_elf_n32_rtype_to_howto): Likewise.
2566 2018-03-29 Maciej W. Rozycki <macro@mips.com>
2568 * elf32-mips.c (mips_info_to_howto_rel): Remove the calls to
2569 `_bfd_error_handler' and to set the `bfd_error_bad_value' error.
2571 2018-03-28 Maciej W. Rozycki <macro@mips.com>
2573 * elf-hppa.h (elf_hppa_info_to_howto_rel): Remove
2574 ATTRIBUTE_UNUSED from `abfd'.
2576 2018-03-28 Maciej W. Rozycki <macro@mips.com>
2578 * elf-hppa.h (elf_hppa_info_to_howto_rel): Correct
2579 `_bfd_error_handler' call formatting.
2581 2018-03-28 Maciej W. Rozycki <macro@mips.com>
2583 * elf32-mips.c (mips_info_to_howto_rel): Call
2584 `mips_elf32_rtype_to_howto' directly rather than via
2585 `->elf_backend_mips_rtype_to_howto'.
2587 2018-03-28 Renlin Li <renlin.li@arm.com>
2590 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Add cases for
2591 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12,
2592 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
2593 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12,
2594 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
2595 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12,
2596 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
2597 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12,
2598 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
2599 (elfNN_aarch64_final_link_relocate): Support new relocations.
2600 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Support new
2602 (_bfd_aarch64_elf_resolve_relocation): Support new relocations.
2604 2018-03-28 Renlin Li <renlin.li@arm.com>
2607 * reloc.c: Add BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12
2608 BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12_NC,
2609 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12,
2610 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
2611 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12,
2612 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
2613 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12,
2614 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
2615 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12,
2616 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
2617 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Add table entry for
2618 TLSLE_LDST16_TPREL_LO12,
2619 TLSLE_LDST16_TPREL_LO12_NC,
2620 TLSLE_LDST32_TPREL_LO12,
2621 TLSLE_LDST32_TPREL_LO12_NC,
2622 TLSLE_LDST64_TPREL_LO12,
2623 TLSLE_LDST64_TPREL_LO12_NC,
2624 TLSLE_LDST8_TPREL_LO12,
2625 TLSLE_LDST8_TPREL_LO12_NC.
2626 * bfd-in2.h: Regenerated.
2627 * libbfd.h: Regenerated.
2629 2018-03-28 Eric Botcazou <ebotcazou@adacore.com>
2632 * elfxx-sparc.c (struct _bfd_sparc_elf_link_hash_entry): Add new flag
2633 has_old_style_got_reloc.
2634 (_bfd_sparc_elf_check_relocs) <GOT relocations>: Set it for old-style
2635 relocations. Fix a couple of long lines.
2636 (_bfd_sparc_elf_relocate_section) <R_SPARC_GOTDATA_OP>: Do not generate
2637 a R_SPARC_NONE for the GOT slot if the symbol is also subject to old-style
2640 2018-03-25 H.J. Lu <hongjiu.lu@intel.com>
2643 * elf64-x86-64.c (elf_x86_64_finish_dynamic_sections): Add
2644 ENDBR64 to the TLSDESC PLT entry.
2646 2018-03-21 Alan Modra <amodra@gmail.com>
2648 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Trim uninteresting
2649 symbols. Use size_t counts. Delete redundant opd test.
2651 2018-03-21 Alan Modra <amodra@gmail.com>
2653 * elf32-ppc.c (ppc_elf_tls_optimize): Delete locsyms.
2655 2018-03-21 Alan Modra <amodra@gmail.com>
2657 * elf32-ppc.c (struct ppc_elf_link_hash_entry): Make tls_mask
2659 (update_local_sym_info): Likewise for local_got_tls_masks.
2660 (ppc_elf_tls_optimize): Likewise for lgot_masks.
2662 2018-03-21 Alan Modra <amodra@gmail.com>
2664 * elf64-ppc.c (ppc_size_one_stub): Fix comment typo.
2665 (ppc64_elf_layout_multitoc): Allocate relocs for tprel as we
2666 do in size_dynamic_sections.
2668 2018-03-21 Alan Modra <amodra@gmail.com>
2670 * elf64-ppc.c (ppc64_elf_relocate_section): Don't access rel[1]
2671 without first checking array bounds.
2672 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2674 2018-03-20 H.J. Lu <hongjiu.lu@intel.com>
2677 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Set
2678 non_ir_ref_dynamic if a symbol is made dynamic by --dynamic-list.
2680 2018-03-19 Nick Clifton <nickc@redhat.com>
2682 * po/es.po: Updated Spanish translation.
2684 2018-03-15 Max Filippov <jcmvbkbc@gmail.com>
2686 * elf32-xtensa.c (xlate_map_entry): Change types of address
2687 fields from 'unsigned' to 'bfd_vma'.
2688 (xlate_offset_with_removed_text): Use struct xlate_map_entry as
2689 the key argument to bsearch. Allow offsets past the end of a
2690 section, use the last map entry for translation of such offsets.
2692 2018-03-15 Kuan-Lin Chen <kuanlinchentw@gmail.com>
2694 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Removed.
2695 Not support the target feature.
2696 (nds32_elf_ex9_itb_base): Likewise.
2697 (nds32_elf_ex9_import_table): Likewise.
2698 (nds32_elf_ex9_finish): Likewise.
2699 (nds32_elf_ex9_reloc_jmp): Likewise.
2700 (nds32_elf_get_insn_with_reg): Likewise.
2701 (nds32_get_local_syms): Likewise.
2702 (nds32_elf_ex9_replace_instruction): Likewise.
2703 (nds32_elf_ifc_calc): Likewise.
2704 (nds32_elf_ifc_finish): Likewise.
2705 (nds32_elf_ifc_replace): Likewise.
2706 (nds32_elf_ifc_reloc): Likewise.
2708 2018-03-14 Alan Modra <amodra@gmail.com>
2710 * elf64-ppc.c (sfpr_define): Adjust for stub_sec size having
2711 sfpr size added before defining alias symbols.
2712 (ppc64_elf_build_stubs): Add stub section padding before
2713 copying sfpr contents and defining save/restore alias symbols.
2715 2018-03-14 H.J. Lu <hongjiu.lu@intel.com>
2718 * elflink.c (elf_gc_mark_debug_section): Also check the local
2719 debug definition section.
2721 2018-03-13 Nick Clifton <nickc@redhat.com>
2724 * pei-x86_64.c (pex64_get_unwind_info): Change to a boolean
2725 function. Add an end address parameter. Check access of the data
2726 pointer to make sure that they do not extend beyond the end
2727 address. Return FALSE if any check fails. Add the end address
2728 pointer to the ui structure.
2729 (pex64_xdata_print_uwd_codes): Check accesses of the raw unwind
2730 codes to make sure that they do not extend beyond the end address
2731 pointer. Print an error message and return immediately if any
2734 2018-03-09 Nick Clifton <nickc@redhat.com>
2736 * elf64-s390.c (elf_s390_relocate_section): Move check for
2737 relocations against non-allocated sections to before the code that
2738 handles ifunc relocations.
2739 * elf32-s390.c (elf_s390_relocate_section): Likewise.
2740 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Treat
2741 relocs against IFUNC symbols in non-allocated sections as relocs
2742 against FUNC symbols.
2743 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
2745 2018-03-08 H.J. Lu <hongjiu.lu@intel.com>
2748 * elf32-i386.c (elf_i386_relocate_section): Treat relocation
2749 against IFUNC symbol in SHT_NOTE section without SHF_ALLOC as
2750 relocation against FUNC symbol.
2751 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
2753 2018-03-07 Renlin Li <renlin.li@arm.com>
2756 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Check absolute
2757 symbol, and don't emit relocation in specific case.
2759 2018-03-07 Alan Modra <amodra@gmail.com>
2761 * elf64-mips.c (mips_elf64_rtype_to_howto): Return NULL on error.
2762 (mips_elf64_slurp_one_reloc_table): Pass on error.
2764 2018-03-03 James Cowgill <james.cowgill@mips.com>
2765 Maciej W. Rozycki <macro@mips.com>
2768 * elfxx-mips.c (mips_elf_calculate_relocation): Only return
2769 after calling `undefined_symbol' hook if this is an error
2770 condition. Assume the value of 0 for the symbol requested
2773 2018-03-02 Jim Wilson <jimw@sifive.com>
2776 * elfnn-aarch64.c (_bfd_aarch64_resize_stubs): Add 8 bytes for branch
2777 and nop instead of 4.
2778 (elfNN_arch64_build_stubs): Add nop after branch. Increase size by
2781 2018-03-01 Jim Wilson <jimw@sifive.com>
2784 * elfnn-riscv.c (riscv_relax_delete_bytes): When adjust st_size, use
2785 else if instead of if.
2787 2018-03-01 Alan Modra <amodra@gmail.com>
2789 * elf32-ft32.c (ft32_info_to_howto_rela): Correct range test.
2791 2018-02-28 Alan Modra <amodra@gmail.com>
2794 * aoutx.h (swap_std_reloc_in): Correct r_index bound check.
2796 2018-02-28 Nick Clifton <nickc@redhat.com>
2800 * dwarf2.c (read_n_bytes): Replace size parameter with dwarf_block
2801 pointer. Drop unused abfd parameter. Check the size of the block
2802 before initialising the data field. Return the end pointer if the
2804 (read_attribute_value): Adjust invocations of read_n_bytes.
2807 * dwarf1.c (parse_die): Check the length of form blocks before
2808 advancing the data pointer.
2810 2018-02-28 Alan Modra <amodra@gmail.com>
2813 * aoutx.h (translate_symbol_table): Print an error message and set
2814 bfd_error on finding an invalid name string offset.
2816 2018-02-27 H.J. Lu <hongjiu.lu@intel.com>
2818 * config.in: Regenerated.
2819 * configure: Likewise.
2820 * configure.ac: Add --enable-separate-code.
2821 (DEFAULT_LD_Z_SEPARATE_CODE): New AC_DEFINE_UNQUOTED. Default
2822 to 1 for Linux/x86 targets,
2823 * elf64-x86-64.c (ELF_MAXPAGESIZE): Set to 0x1000 if
2824 DEFAULT_LD_Z_SEPARATE_CODE is 1.
2826 2018-02-27 Nick Clifton <nickc@redhat.com>
2828 * aout-cris.c (swap_ext_reloc_out): Standadize error/warning
2830 * elf-hppa.h (elf_hppa_info_to_howto_rel): Likewise.
2831 * elf32-i386.c (elf_i386_reloc_type_lookup): Likewise.
2832 * elf32-xtensa.c (elf_xtensa_reloc_type_lookup): Likewise.
2833 * elf64-ppc.c (ppc64_elf_reloc_type_lookup): Likewise.
2834 * elf64-s390.c (elf_s390_reloc_type_lookup): Likewise.
2835 * elf64-sh64.c (sh_elf64_info_to_howto): Likewise.
2836 * elfxx-ia64.c (ia64_elf_reloc_type_lookup): Likewise.
2837 * elfxx-sparc.c (_bfd_sparc_elf_reloc_type_lookup): Likewise.
2838 * elfxx-tilegx.c (tilegx_reloc_type_lookup): Likewise.
2841 * elf-bfd.h (struct elf_backend_data): Change the return type of
2842 the elf_info_to_howto and elf_info_to_howto_rel function pointers
2844 * elfcode.h (elf_slurp_reloc_table_from_section): Check the return
2845 value from the info_to_howto function and fail if that function
2847 * elf32-h8300.c (elf32_h8_relocate_section): Check return value
2848 from the info_to_howto function.
2849 (elf32_h8_relax_section): Likewise.
2850 * elf32-lm32.c (lm32_elf_relocate_section): Likewise.
2851 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
2852 * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise.
2853 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
2854 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
2855 * elf64-ia64-vms.c (elf64_ia64_relocate_section): Likewise.
2856 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Likewise.
2857 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
2858 * elfnn-ia64.c (elfNN_ia64_relocate_section): Likewise.
2859 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
2860 (riscv_elf_relocate_section): Likewise.
2861 * elf-hppa.h (elf_hppa_info_to_howto): Change return type to
2862 bfd_boolean. Issue an error message, set an error value and
2863 return FALSE if the reloc is not recognized.
2864 (elf_hppa_info_to_howto_rel): Likewise.
2865 * elf-m10200.c (mn10200_info_to_howto): Likewise.
2866 * elf-m10300.c (mn10300_info_to_howto): Likewise.
2867 * elf.c (_bfd_elf_no_info_to_howto): Likewise.
2868 * elf32-arc.c (arc_info_to_howto_rel): Likewise.
2869 * elf32-arm.c (elf32_arm_info_to_howto): Likewise.
2870 * elf32-avr.c (avr_info_to_howto_rela): Likewise.
2871 * elf32-bfin.c (bfin_info_to_howto): Likewise.
2872 * elf32-cr16.c (elf_cr16_info_to_howto): Likewise.
2873 * elf32-cr16c.c (elf_cr16c_info_to_howto): Likewise.
2874 * elf32-cris.c (elf_cr16c_info_to_howto_rel)
2875 (cris_info_to_howto_rela): Likewise.
2876 * elf32-crx.c (elf_crx_info_to_howto): Likewise.
2877 * elf32-d10v.c (d10v_info_to_howto_rel): Likewise.
2878 * elf32-d30v.c (d30v_info_to_howto_rel, d30v_info_to_howto_rela):
2880 * elf32-dlx.c (dlx_rtype_to_howto, elf32_dlx_info_to_howto)
2881 (elf32_dlx_info_to_howto_rel): Likewise.
2882 * elf32-epiphany.c (epiphany_info_to_howto_rela): Likewise.
2883 * elf32-fr30.c (fr30_info_to_howto_rela): Likewise.
2884 * elf32-frv.c (frv_info_to_howto_rela)
2885 (frvfdpic_info_to_howto_rel): Likewise.
2886 * elf32-ft32.c (ft32_info_to_howto_rela): Likewise.
2887 * elf32-gen.c (elf_generic_info_to_howto)
2888 (elf_generic_info_to_howto_rel): Likewise.
2889 * elf32-h8300.c (elf32_h8_info_to_howto)
2890 (elf32_h8_info_to_howto_rel): Likewise.
2891 * elf32-i370.c (i370_elf_info_to_howto): Likewise.
2892 * elf32-i386.c (elf_i386_reloc_type_lookup)
2893 (elf_i386_rtype_to_howto, elf_i386_info_to_howto_rel): Likewise.
2894 * elf32-i860.c (lookup_howto, elf32_i860_info_to_howto_rela):
2896 * elf32-i960.c (elf32_i960_info_to_howto_rel): Likewise.
2897 * elf32-ip2k.c (ip2k_info_to_howto_rela): Likewise.
2898 * elf32-iq2000.c (iq2000_info_to_howto_rela): Likewise.
2899 * elf32-lm32.c (lm32_info_to_howto_rela): Likewise.
2900 * elf32-m32c.c (m32c_info_to_howto_rela): Likewise.
2901 * elf32-m32r.c (m32r_info_to_howto_rel, m32r_info_to_howto):
2903 * elf32-m68hc11.c (m68hc11_info_to_howto_rel): Likewise.
2904 * elf32-m68hc12.c (m68hc11_info_to_howto_rel): Likewise.
2905 * elf32-m68k.c (rtype_to_howto): Likewise.
2906 * elf32-mcore.c (mcore_elf_info_to_howto): Likewise.
2907 * elf32-mep.c (mep_info_to_howto_rela): Likewise.
2908 * elf32-metag.c (metag_info_to_howto_rela): Likewise.
2909 * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise.
2910 * elf32-mips.c (mips_info_to_howto_rel, mips_info_to_howto_rela):
2912 * elf32-moxie.c (moxie_info_to_howto_rela): Likewise.
2913 * elf32-msp430.c (msp430_info_to_howto_rela): Likewise.
2914 * elf32-mt.c (mt_info_to_howto_rela): Likewise.
2915 * elf32-nds32.c (nds32_info_to_howto_rel, nds32_info_to_howto):
2917 * elf32-nios2.c (nios2_elf32_info_to_howto): Likewise.
2918 * elf32-or1k.c (or1k_info_to_howto_rela): Likewise.
2919 * elf32-pj.c (pj_elf_info_to_howto): Likewise.
2920 * elf32-ppc.c (ppc_elf_info_to_howto): Likewise.
2921 * elf32-pru.c (pru_elf32_info_to_howto): Likewise.
2922 * elf32-rl78.c (rl78_info_to_howto_rela): Likewise.
2923 * elf32-rx.c (rx_info_to_howto_rela): Likewise.
2924 * elf32-s390.c (elf_s390_info_to_howto): Likewise.
2925 * elf32-score.c (s3_bfd_score_info_to_howto)
2926 (_bfd_score_info_to_howto): Likewise.
2927 * elf32-score7.c (s7_bfd_score_info_to_howto): Likewise.
2928 * elf32-sh.c (sh_elf_info_to_howto): Likewise.
2929 * elf32-spu.c (spu_elf_info_to_howto): Likewise.
2930 * elf32-tic6x.c (elf32_tic6x_info_to_howto)
2931 (elf32_tic6x_info_to_howto_rel): Likewise.
2932 * elf32-tilepro.c (tilepro_info_to_howto_rela): Likewise.
2933 * elf32-v850.c (v850_elf_info_to_howto_rel)
2934 (v850_elf_info_to_howto_rela, v800_elf_info_to_howto): Likewise.
2935 * elf32-vax.c (rtype_to_howto): Likewise.
2936 * elf32-visium.c (visium_info_to_howto_rela): Likewise.
2937 * elf32-wasm32.c (elf32_wasm32_rtype_to_howto)
2938 (elf32_wasm32_info_to_howto_rela): Likewise.
2939 * elf32-xc16x.c (elf32_xc16x_info_to_howto): Likewise.
2940 * elf32-xgate.c (xgate_info_to_howto_rel): Likewise.
2941 * elf32-xstormy16.c (xstormy16_info_to_howto_rela): Likewise.
2942 * elf32-xtensa.c (elf_xtensa_info_to_howto_rela): Likewise.
2943 * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise.
2944 * elf64-gen.c (elf_generic_info_to_howto)
2945 (elf_generic_info_to_howto_rel): Likewise.
2946 * elf64-ia64-vms.c (elf64_ia64_info_to_howto): Likewise.
2947 * elf64-mips.c (mips_elf64_info_to_howto_rela): Likewise.
2948 * elf64-mmix.c (mmix_info_to_howto_rela): Likewise.
2949 * elf64-ppc.c (ppc64_elf_info_to_howto): Likewise.
2950 * elf64-s390.c (elf_s390_reloc_type_lookup): Likewise.
2951 * elf64-sh64.c (elf_s390_info_to_howto, sh_elf64_info_to_howto):
2953 * elf64-x86-64.c (elf_x86_64_info_to_howto): Likewise.
2954 * elfn32-mips.c (mips_info_to_howto_rel, mips_info_to_howto_rela):
2956 * elfnn-aarch64.c (elfNN_aarch64_info_to_howto): Likewise.
2957 * elfnn-ia64.c (elfNN_ia64_info_to_howto): Likewise.
2958 * elfnn-riscv.c (riscv_info_to_howto_rela): Likewise.
2959 * elfxx-ia64.c (ia64_elf_reloc_type_lookup): Likewise.
2960 * elfxx-sparc.c (_bfd_sparc_elf_info_to_howto): Likewise.
2961 * elfxx-tilegx.c (tilegx_info_to_howto_rela): Likewise.
2962 * elf32-score.h (s7_bfd_score_info_to_howto): Update prototype.
2963 * elfxx-sparc.h (_bfd_sparc_elf_info_to_howto): Update prototype.
2964 * elfxx-tilegx.h (tilegx_info_to_howto_rela): Update prototype.
2965 * elfxx-target.h (elf_info_to_howto, elf_info_to_howto_rel):
2968 2018-02-26 Jim Wilson <jimw@sifive.com>
2969 Stephan Schreiber <info@fs-driver.org>
2972 * elfnn-ia64.c (elfNN_ia64_relax_section): After ia64_elf_relax_brl
2973 call, set changed_contents and changed_relocs. Likewise after
2974 successful ia64_elf_relax_br call.
2976 2018-02-26 Alan Modra <amodra@gmail.com>
2978 * elf.c (assign_file_positions_except_relocs): Don't segfault
2979 when actual number of phdrs is less than allocated. Delete
2980 outdated comment. Formatting.
2982 2018-02-26 Alan Modra <amodra@gmail.com>
2984 * elf-m10300.c, * elf-s390-common.c, * elf32-arc.c, * elf32-cris.c,
2985 * elf32-dlx.c, * elf32-frv.c, * elf32-i370.c, * elf32-lm32.c,
2986 * elf32-m32r.c, * elf32-m68hc1x.c, * elf32-m68k.c,
2987 * elf32-microblaze.c, * elf32-msp430.c, * elf32-nds32.c,
2988 * elf32-nios2.c, * elf32-or1k.c, * elf32-rl78.c, * elf32-rx.c,
2989 * elf32-score.c, * elf32-score7.c, * elf32-sh-symbian.c,
2990 * elf32-sh.c, * elf32-spu.c, * elf32-v850.c, * elf32-xtensa.c,
2991 * elf64-alpha.c, * elf64-ia64-vms.c, * elf64-mmix.c,
2992 * elf64-sh64.c, * elf64-sparc.c, * elfnn-ia64.c, * elfxx-tilegx.c,
2993 * mmo.c, * osf-core.c, * srec.c, * vms-alpha.c: Standardize
2994 error/warning messages.
2996 2018-02-26 Alan Modra <amodra@gmail.com>
2998 * archive.c, * bfd.c, * linker.c, * reloc.c, * stabs.c,
2999 * syms.c: Standardize error/warning messages.
3001 2018-02-26 Alan Modra <amodra@gmail.com>
3003 * aout-adobe.c, * aout-cris.c, * i386linux.c, * m68klinux.c,
3004 * sparclinux.c, * coff-alpha.c, * coff-arm.c, * coff-mcore.c,
3005 * coffcode.h, * coffgen.c, * cofflink.c, * ecoff.c, * pe-mips.c,
3006 * peXXigen.c, * peicode.h: Standardize error/warning messages.
3008 2018-02-26 Alan Modra <amodra@gmail.com>
3010 * elf32-arm.c, * elfnn-aarch64.c: Standardize error/warning messages.
3012 2018-02-26 Alan Modra <amodra@gmail.com>
3014 * elfxx-mips.c: Standardize error/warning messages.
3016 2018-02-26 Alan Modra <amodra@gmail.com>
3018 * dwarf2.c, * elf-attrs.c, * elf-eh-frame.c, * elf.c, * elf32-gen.c,
3019 * elflink.c: Standardize error/warning messages. Replace use of
3020 linker callback einfo with _bfd_error_handler when possible.
3022 2018-02-26 Alan Modra <amodra@gmail.com>
3024 * aoutx.h, * coff-alpha.c, * coff-i860.c, * coff-m68k.c,
3025 * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c,
3026 * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-w65.c,
3027 * elf-bfd.h, * elf-m10300.c, * elf.c, * elf32-avr.c, * elf32-bfin.c,
3028 * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c,
3029 * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c,
3030 * elf32-fr30.c, * elf32-frv.c, * elf32-i370.c, * elf32-i386.c,
3031 * elf32-i960.c, * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c,
3032 * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c,
3033 * elf32-m68k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c,
3034 * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c,
3035 * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-or1k.c,
3036 * elf32-pj.c, * elf32-ppc.c, * elf32-rl78.c, * elf32-rx.c,
3037 * elf32-s390.c, * elf32-sh.c, * elf32-spu.c, * elf32-tic6x.c,
3038 * elf32-v850.c, * elf32-vax.c, * elf32-visium.c, * elf32-wasm32.c,
3039 * elf32-xgate.c, * elf32-xtensa.c, * elf64-alpha.c,
3040 * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c,
3041 * elf64-ppc.c, * elf64-s390.c, * elf64-sparc.c, * elf64-x86-64.c,
3042 * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c,
3043 * elfnn-riscv.c, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-riscv.h,
3044 * elfxx-sparc.c, * elfxx-sparc.h, * reloc.c: Standardize
3045 unrecognized/unsupported reloc message.
3047 2018-02-26 Alan Modra <amodra@gmail.com>
3049 * elf32-ppc.c: Standardize error/warning messages. Use
3050 _bfd_error_handler rather than einfo when einfo features not used.
3051 * elf64-ppc.c: Likewise.
3053 2018-02-23 Alan Modra <amodra@gmail.com>
3056 * elf.c (assign_file_positions_for_non_load_sections): Remove RELRO
3057 segment if no matching LOAD segment.
3059 2018-02-23 Kuan-Lin Chen <kuanlinchentw@gmail.com>
3061 * elf32-nds32.h: Define mask for ict_model.
3063 2018-02-20 Jason Duerstock <jason.duerstock@gmail.com>
3065 * elfnn-ia64.c (elf_backend_can_gc_sections): Enable.
3067 2018-02-19 Maciej W. Rozycki <macro@mips.com>
3070 2018-01-12 Vlad Ivanov <vlad@ivanov.email>
3072 * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when
3073 .reginfo section has wrong size.
3075 2018-02-19 Maciej W. Rozycki <macro@mips.com>
3077 * elfxx-mips.c (_bfd_mips_elf_always_size_sections): Set
3078 SEC_FIXED_SIZE and SEC_HAS_CONTENTS flags for `.reginfo' and
3079 `.MIPS.abiflags' sections.
3080 (_bfd_mips_elf_final_link): Avoid reading beyond `.reginfo'
3083 2018-02-19 Maciej W. Rozycki <macro@mips.com>
3085 * section.c (SEC_FIXED_SIZE): New macro.
3086 * bfd-in2.h: Regenerate.
3088 2018-02-19 Maciej W. Rozycki <macro@mips.com>
3090 * section.c (SEC_HAS_GOT_REF): Remove macro.
3091 * bfd-in2.h: Regenerate.
3093 2018-02-19 Alan Modra <amodra@gmail.com>
3095 * elf-attrs.c (_bfd_elf_parse_attributes): Correct _bfd_error_handler
3097 * elfxx-mips.c (_bfd_mips_elf_final_link): Likewise.
3098 * elfnn-riscv.c (_bfd_riscv_relax_align): Likewise.
3099 (_bfd_riscv_relax_pc): Likewise and fix typos.
3100 * libbfd-in.h (_bfd_error_handler): Add attribute printf.
3101 * libbfd.h: Regenerate.
3103 2018-02-19 Alan Modra <amodra@gmail.com>
3105 * dwarf2.c (read_section): Don't use 'll' format modifier.
3106 (find_abstract_instance): Likewise.
3107 * elfcore.h (elf_core_file_p): Likewise.
3109 2018-02-19 Alan Modra <amodra@gmail.com>
3111 * bfd-in.h: Include inttypes.h or if not available define
3112 PRId64, PRIu64 and PRIx64.
3113 * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Remove support for L
3114 modifier to print bfd_vma.
3115 * coff-arm.c, * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c,
3116 * coff-sh.c, * coff-tic80.c, * coffcode.h, * coffgen.c, * cofflink.c,
3117 * compress.c, * dwarf2.c, * elf-m10300.c, * elf.c, * elf32-arc.c,
3118 * elf32-arm.c, * elf32-bfin.c, * elf32-cris.c, * elf32-hppa.c,
3119 * elf32-i386.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32r.c,
3120 * elf32-m68k.c, * elf32-metag.c, * elf32-nds32.c, * elf32-nios2.c,
3121 * elf32-ppc.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c,
3122 * elf32-score7.c, * elf32-sh.c, * elf32-sh64.c, * elf32-spu.c,
3123 * elf32-tic6x.c, * elf32-tilepro.c, * elf32-v850.c, * elf32-vax.c,
3124 * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c,
3125 * elf64-mmix.c, * elf64-s390.c, * elf64-sh64.c, * elf64-x86-64.c,
3126 * elfcode.h, * elfcore.h, * elflink.c, * elfnn-aarch64.c,
3127 * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-mips.c, * elfxx-sparc.c,
3128 * elfxx-tilegx.c, * ieee.c, * ihex.c, * mach-o.c, * merge.c, * mmo.c,
3129 * peXXigen.c, * xcofflink.c: Replace use of Lx modifier with PRIx64,
3130 and cast input to uint64_t, and similarly for Ld and Lu.
3131 * bfd-in2.h: Regenerate.
3133 2018-02-19 Alan Modra <amodra@gmail.com>
3135 * elf32-arm.c, * elf32-hppa.c, * elf32-lm32.c, * elf32-m32r.c,
3136 * elf32-metag.c, * elf32-nds32.c, * elf32-or1k.c, * elf32-ppc.c,
3137 * elf32-s390.c, * elf32-sh.c, * elf32-tic6x.c, * elf32-tilepro.c,
3138 * elf64-ppc.c, * elf64-s390.c, * elflink.c, * elfnn-aarch64.c,
3139 * elfnn-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c,
3140 * reloc.c: Replace use of %R and %T in format strings passed to
3141 einfo and friends by %pR and %pT.
3143 2018-02-19 Alan Modra <amodra@gmail.com>
3145 * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Handle %pA and %pB in place
3147 * aout-adobe.c: Update all messages using %A and %B.
3148 * aout-cris.c: Likewise.
3149 * aoutx.h: Likewise.
3150 * archive.c: Likewise.
3151 * binary.c: Likewise.
3152 * cache.c: Likewise.
3153 * coff-alpha.c: Likewise.
3154 * coff-arm.c: Likewise.
3155 * coff-i860.c: Likewise.
3156 * coff-mcore.c: Likewise.
3157 * coff-ppc.c: Likewise.
3158 * coff-rs6000.c: Likewise.
3159 * coff-sh.c: Likewise.
3160 * coff-tic4x.c: Likewise.
3161 * coff-tic54x.c: Likewise.
3162 * coff-tic80.c: Likewise.
3163 * coff64-rs6000.c: Likewise.
3164 * coffcode.h: Likewise.
3165 * coffgen.c: Likewise.
3166 * cofflink.c: Likewise.
3167 * coffswap.h: Likewise.
3168 * compress.c: Likewise.
3169 * cpu-arm.c: Likewise.
3170 * ecoff.c: Likewise.
3171 * elf-attrs.c: Likewise.
3172 * elf-eh-frame.c: Likewise.
3173 * elf-ifunc.c: Likewise.
3174 * elf-m10300.c: Likewise.
3175 * elf-properties.c: Likewise.
3176 * elf-s390-common.c: Likewise.
3178 * elf32-arc.c: Likewise.
3179 * elf32-arm.c: Likewise.
3180 * elf32-avr.c: Likewise.
3181 * elf32-bfin.c: Likewise.
3182 * elf32-cr16.c: Likewise.
3183 * elf32-cr16c.c: Likewise.
3184 * elf32-cris.c: Likewise.
3185 * elf32-crx.c: Likewise.
3186 * elf32-d10v.c: Likewise.
3187 * elf32-d30v.c: Likewise.
3188 * elf32-epiphany.c: Likewise.
3189 * elf32-fr30.c: Likewise.
3190 * elf32-frv.c: Likewise.
3191 * elf32-gen.c: Likewise.
3192 * elf32-hppa.c: Likewise.
3193 * elf32-i370.c: Likewise.
3194 * elf32-i386.c: Likewise.
3195 * elf32-i960.c: Likewise.
3196 * elf32-ip2k.c: Likewise.
3197 * elf32-iq2000.c: Likewise.
3198 * elf32-lm32.c: Likewise.
3199 * elf32-m32c.c: Likewise.
3200 * elf32-m32r.c: Likewise.
3201 * elf32-m68hc11.c: Likewise.
3202 * elf32-m68hc12.c: Likewise.
3203 * elf32-m68hc1x.c: Likewise.
3204 * elf32-m68k.c: Likewise.
3205 * elf32-mcore.c: Likewise.
3206 * elf32-mep.c: Likewise.
3207 * elf32-metag.c: Likewise.
3208 * elf32-microblaze.c: Likewise.
3209 * elf32-moxie.c: Likewise.
3210 * elf32-msp430.c: Likewise.
3211 * elf32-mt.c: Likewise.
3212 * elf32-nds32.c: Likewise.
3213 * elf32-nios2.c: Likewise.
3214 * elf32-or1k.c: Likewise.
3215 * elf32-pj.c: Likewise.
3216 * elf32-ppc.c: Likewise.
3217 * elf32-rl78.c: Likewise.
3218 * elf32-rx.c: Likewise.
3219 * elf32-s390.c: Likewise.
3220 * elf32-score.c: Likewise.
3221 * elf32-score7.c: Likewise.
3222 * elf32-sh-symbian.c: Likewise.
3223 * elf32-sh.c: Likewise.
3224 * elf32-sh64.c: Likewise.
3225 * elf32-sparc.c: Likewise.
3226 * elf32-spu.c: Likewise.
3227 * elf32-tic6x.c: Likewise.
3228 * elf32-tilepro.c: Likewise.
3229 * elf32-v850.c: Likewise.
3230 * elf32-vax.c: Likewise.
3231 * elf32-visium.c: Likewise.
3232 * elf32-wasm32.c: Likewise.
3233 * elf32-xgate.c: Likewise.
3234 * elf32-xtensa.c: Likewise.
3235 * elf64-alpha.c: Likewise.
3236 * elf64-gen.c: Likewise.
3237 * elf64-hppa.c: Likewise.
3238 * elf64-ia64-vms.c: Likewise.
3239 * elf64-mmix.c: Likewise.
3240 * elf64-ppc.c: Likewise.
3241 * elf64-s390.c: Likewise.
3242 * elf64-sh64.c: Likewise.
3243 * elf64-sparc.c: Likewise.
3244 * elf64-x86-64.c: Likewise.
3245 * elfcode.h: Likewise.
3246 * elfcore.h: Likewise.
3247 * elflink.c: Likewise.
3248 * elfnn-aarch64.c: Likewise.
3249 * elfnn-ia64.c: Likewise.
3250 * elfnn-riscv.c: Likewise.
3251 * elfxx-mips.c: Likewise.
3252 * elfxx-sparc.c: Likewise.
3253 * elfxx-tilegx.c: Likewise.
3254 * elfxx-x86.c: Likewise.
3255 * hpux-core.c: Likewise.
3258 * libbfd.c: Likewise.
3259 * linker.c: Likewise.
3260 * mach-o.c: Likewise.
3261 * merge.c: Likewise.
3263 * oasys.c: Likewise.
3264 * pdp11.c: Likewise.
3265 * pe-mips.c: Likewise.
3266 * peXXigen.c: Likewise.
3267 * peicode.h: Likewise.
3268 * reloc.c: Likewise.
3269 * rs6000-core.c: Likewise.
3271 * stabs.c: Likewise.
3272 * vms-alpha.c: Likewise.
3273 * xcofflink.c: Likewise.
3275 2018-02-19 Alan Modra <amodra@gmail.com>
3278 * elf.c (IS_TBSS): Define.
3279 (_bfd_elf_map_sections_to_segments): Use IS_TBSS.
3280 (assign_file_positions_for_non_load_sections): Revert last change.
3281 Properly calculate load segment limits to compare against relro limits.
3283 2018-02-17 Alan Modra <amodra@gmail.com>
3286 * elf.c (assign_file_positions_for_non_load_sections): Ignore
3287 degenerate zero size PT_LOAD segments when finding one overlapping
3288 the PT_GNU_RELRO segment.
3290 2018-02-16 Alan Modra <amodra@gmail.com>
3292 * libbfd.c (_bfd_bool_bfd_false_error): Rename from bfd_false.
3293 (_bfd_bool_bfd_true): Rename from bfd_true.
3294 (_bfd_ptr_bfd_null_error): Rename from bfd_nullvoidptr.
3295 (_bfd_int_bfd_0): Rename from bfd_0.
3296 (_bfd_uint_bfd_0): Rename from bfd_0u.
3297 (_bfd_long_bfd_0): Rename from bfd_0l.
3298 (_bfd_long_bfd_n1_error): Rename from _bfd_n1.
3299 (_bfd_void_bfd): Rename from bfd_void.
3300 (_bfd_bool_bfd_false, _bfd_bool_bfd_asymbol_false),
3301 (_bfd_bool_bfd_link_false_error),
3302 (_bfd_bool_bfd_link_true, _bfd_bool_bfd_bfd_true),
3303 (_bfd_bool_bfd_uint_true, _bfd_bool_bfd_ptr_true),
3304 (_bfd_bool_bfd_asection_bfd_asection_true),
3305 (_bfd_bool_bfd_asymbol_bfd_asymbol_true),
3306 (_bfd_void_bfd_link, _bfd_void_bfd_asection): New functions.
3307 * archive.c (_bfd_noarchive_get_elt_at_index),
3308 (_bfd_noarchive_openr_next_archived_file),
3309 (_bfd_noarchive_construct_extended_name_table),
3310 (_bfd_noarchive_write_ar_hdr, _bfd_noarchive_truncate_arname),
3311 (_bfd_noarchive_write_armap): New functions.
3312 * archures.c (_bfd_nowrite_set_arch_mach): New function.
3313 * coff-alpha.c (alpha_ecoff_swap_coff_aux_in),
3314 (alpha_ecoff_swap_coff_sym_in, alpha_ecoff_swap_coff_lineno_in),
3315 (alpha_ecoff_swap_coff_aux_out, alpha_ecoff_swap_coff_sym_out),
3316 (alpha_ecoff_swap_coff_lineno_out),
3317 (alpha_ecoff_swap_coff_reloc_out): New functions.
3318 * coff-mips.c (mips_ecoff_swap_coff_aux_in),
3319 (mips_ecoff_swap_coff_sym_in, mips_ecoff_swap_coff_lineno_in),
3320 (mips_ecoff_swap_coff_aux_out, mips_ecoff_swap_coff_sym_out),
3321 (mips_ecoff_swap_coff_lineno_out),
3322 (mips_ecoff_swap_coff_reloc_out): New functions.
3323 * coffcode.h (coff_set_alignment_hook): Replace define with
3325 (symname_in_debug_hook): Likewise.
3326 * ecoff.c (_bfd_ecoff_set_alignment_hook): New function.
3327 * elfxx-target.h (elf_backend_allow_non_load_phdr): Default to 0.
3328 * elf.c (assign_file_positions_except_relocs): Test
3329 elf_backend_allow_non_load_phdr for NULL.
3330 * elflink.c (_bfd_elf_omit_section_dynsym_default): Rename from
3331 _bfd_elf_link_omit_section_dynsym. Update uses.
3332 (_bfd_elf_omit_section_dynsym_all): New function.
3333 * elf-bfd.h (_bfd_elf_link_omit_section_dynsym): Delete.
3334 (_bfd_elf_omit_section_dynsym_default): Declare.
3335 (_bfd_elf_omit_section_dynsym_all): Declare.
3336 * linker.c (_bfd_nolink_sizeof_headers, _bfd_nolink_bfd_relax_section),
3337 (_bfd_nolink_bfd_get_relocated_section_contents),
3338 (_bfd_nolink_bfd_lookup_section_flags),
3339 (_bfd_nolink_bfd_is_group_section, _bfd_nolink_bfd_discard_group),
3340 (_bfd_nolink_bfd_link_hash_table_create),
3341 (_bfd_nolink_bfd_link_just_syms),
3342 (_bfd_nolink_bfd_copy_link_hash_symbol_type),
3343 (_bfd_nolink_bfd_link_split_section),
3344 (_bfd_nolink_section_already_linked),
3345 (_bfd_nolink_bfd_define_common_symbol),
3346 (_bfd_nolink_bfd_define_start_stop): New functions.
3347 * reloc.c (_bfd_norelocs_bfd_reloc_type_lookup),
3348 (_bfd_norelocs_bfd_reloc_name_lookup),
3349 (_bfd_nodynamic_canonicalize_dynamic_reloc): New functions.
3350 * section.c (_bfd_nowrite_set_section_contents): New function.
3351 * syms.c (_bfd_nosymbols_canonicalize_symtab),
3352 (_bfd_nosymbols_print_symbol, _bfd_nosymbols_get_symbol_info),
3353 (_bfd_nosymbols_get_symbol_version_string),
3354 (_bfd_nosymbols_bfd_is_local_label_name),
3355 (_bfd_nosymbols_get_lineno, _bfd_nosymbols_find_nearest_line),
3356 (_bfd_nosymbols_find_line, _bfd_nosymbols_find_inliner_info),
3357 (_bfd_nosymbols_bfd_make_debug_symbol),
3358 ( _bfd_nosymbols_read_minisymbols),
3359 ( _bfd_nosymbols_minisymbol_to_symbol),
3360 (_bfd_nodynamic_get_synthetic_symtab): New functions.
3361 * libbfd-in.h: Declare new functions. Update existing defines,
3363 * aix386-core.c: Update to use new hooks. Formatting.
3364 * aout-adobe.c: Likewise.
3365 * aout-arm.c: Likewise.
3366 * aout-target.h: Likewise.
3367 * aout-tic30.c: Likewise.
3368 * aoutf1.h: Likewise.
3369 * binary.c: Likewise.
3371 * cisco-core.c: Likewise.
3372 * coff-alpha.c: Likewise.
3373 * coff-i386.c: Likewise.
3374 * coff-i860.c: Likewise.
3375 * coff-i960.c: Likewise.
3376 * coff-ia64.c: Likewise.
3377 * coff-mips.c: Likewise.
3378 * coff-ppc.c: Likewise.
3379 * coff-rs6000.c: Likewise.
3380 * coff-sh.c: Likewise.
3381 * coff-tic30.c: Likewise.
3382 * coff-tic54x.c: Likewise.
3383 * coff-x86_64.c: Likewise.
3384 * coff64-rs6000.c: Likewise.
3385 * coffcode.h: Likewise.
3386 * elf-m10300.c: Likewise.
3387 * elf32-cr16.c: Likewise.
3388 * elf32-lm32.c: Likewise.
3389 * elf32-m32r.c: Likewise.
3390 * elf32-metag.c: Likewise.
3391 * elf32-score.c: Likewise.
3392 * elf32-score7.c: Likewise.
3393 * elf32-tilepro.c: Likewise.
3394 * elf32-xstormy16.c: Likewise.
3395 * elf32-xtensa.c: Likewise.
3396 * elf64-alpha.c: Likewise.
3397 * elf64-hppa.c: Likewise.
3398 * elf64-ia64-vms.c: Likewise.
3399 * elf64-mmix.c: Likewise.
3400 * elf64-sh64.c: Likewise.
3401 * elfnn-ia64.c: Likewise.
3402 * elfxx-sparc.c: Likewise.
3403 * elfxx-target.h: Likewise.
3404 * elfxx-tilegx.c: Likewise.
3405 * elfxx-x86.h: Likewise.
3406 * hp300hpux.c: Likewise.
3407 * hppabsd-core.c: Likewise.
3408 * hpux-core.c: Likewise.
3409 * i386msdos.c: Likewise.
3410 * i386os9k.c: Likewise.
3413 * irix-core.c: Likewise.
3414 * libaout.h: Likewise.
3415 * libecoff.h: Likewise.
3416 * mach-o-target.c: Likewise.
3417 * mach-o.c: Likewise.
3418 * mipsbsd.c: Likewise.
3420 * netbsd-core.c: Likewise.
3421 * nlm-target.h: Likewise.
3422 * oasys.c: Likewise.
3423 * osf-core.c: Likewise.
3424 * pdp11.c: Likewise.
3425 * pe-mips.c: Likewise.
3426 * pe-x86_64.c: Likewise.
3428 * plugin.c: Likewise.
3429 * ppcboot.c: Likewise.
3430 * ptrace-core.c: Likewise.
3431 * sco5-core.c: Likewise.
3433 * sparclynx.c: Likewise.
3435 * tekhex.c: Likewise.
3436 * trad-core.c: Likewise.
3437 * verilog.c: Likewise.
3438 * versados.c: Likewise.
3439 * vms-alpha.c: Likewise.
3440 * vms-lib.c: Likewise.
3441 * wasm-module.c: Likewise.
3443 * libbfd.h: Regenerate.
3445 2018-02-15 Jim Wilson <jimw@sifive.com>
3447 * elfnn-riscv.c (_bfd_riscv_relax_section): Ifdef out check to ignore
3448 symbols whose section address is zero.
3450 * elfnn-riscv.c (riscv_elf_relocate_section): Use bfd_reloc_dangerous
3451 when pcrel_lo reloc has an addend. Use reloc_dangerous callback for
3452 bfd_reloc_dangerous. Use einfo instead of warning callback for errors.
3453 Add %X%P to error messages.
3455 2018-02-15 Eric Botcazou <ebotcazou@adacore.com>
3458 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
3459 Pass FALSE instead of TRUE as 'create' argument to bfd_link_hash_lookup
3460 and assert that the result of the call is not NULL.
3462 2018-02-14 Nick Clifton <nickc@redhat.com>
3465 Revert previous delta. Add extra casts to avoid compile time
3467 * libbfd-in.h (_bfd_generic_bfd_copy_private_bfd_data): Add extra
3468 cast to avoid warning from gcc v8 compiler.
3469 (_bfd_generic_bfd_merge_private_bfd_data): Likewise.
3470 (_bfd_generic_bfd_set_private_flags): Likewise.
3471 (_bfd_generic_bfd_copy_private_section_data): Likewise.
3472 (_bfd_generic_bfd_copy_private_symbol_data): Likewise.
3473 (_bfd_generic_bfd_copy_private_header_data): Likewise.
3474 (_bfd_generic_bfd_print_private_bfd_data): Likewise.
3475 (_bfd_noarchive_construct_extended_name_table): Likewise.
3476 (_bfd_noarchive_truncate_arname): Likewise.
3477 (_bfd_noarchive_write_ar_hdr): Likewise.
3478 (_bfd_noarchive_get_elt_at_index): Likewise.
3479 (_bfd_nosymbols_canonicalize_symtab): Likewise.
3480 (_bfd_nosymbols_print_symbol): Likewise.
3481 (_bfd_nosymbols_get_symbol_info): Likewise.
3482 (_bfd_nosymbols_get_symbol_version_string): Likewise.
3483 (_bfd_nosymbols_bfd_is_local_label_name): Likewise.
3484 (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise.
3485 (_bfd_nosymbols_get_lineno): Likewise.
3486 (_bfd_nosymbols_find_nearest_line): Likewise.
3487 (_bfd_nosymbols_find_line): Likewise.
3488 (_bfd_nosymbols_find_inliner_info): Likewise.
3489 (_bfd_nosymbols_bfd_make_debug_symbol): Likewise.
3490 (_bfd_nosymbols_read_minisymbols): Likewise.
3491 (_bfd_nosymbols_minisymbol_to_symbol): Likewise.
3492 (_bfd_norelocs_bfd_reloc_type_lookup): Likewise.
3493 (_bfd_norelocs_bfd_reloc_name_lookup): Likewise.
3494 (_bfd_nowrite_set_arch_mach): Likewise.
3495 (_bfd_nowrite_set_section_contents): Likewise.
3496 (_bfd_nolink_sizeof_headers): Likewise.
3497 (_bfd_nolink_bfd_get_relocated_section_contents): Likewise.
3498 (_bfd_nolink_bfd_relax_section): Likewise.
3499 (_bfd_nolink_bfd_gc_sections): Likewise.
3500 (_bfd_nolink_bfd_lookup_section_flags): Likewise.
3501 (_bfd_nolink_bfd_merge_sections): Likewise.
3502 (_bfd_nolink_bfd_is_group_section): Likewise.
3503 (_bfd_nolink_bfd_discard_group): Likewise.
3504 (_bfd_nolink_bfd_link_hash_table_create): Likewise.
3505 (_bfd_nolink_bfd_link_add_symbols): Likewise.
3506 (_bfd_nolink_bfd_link_just_syms): Likewise.
3507 (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise.
3508 (_bfd_nolink_bfd_final_link): Likewise.
3509 (_bfd_nolink_bfd_link_split_section): Likewise.
3510 (_bfd_nolink_section_already_linked): Likewise.
3511 (_bfd_nolink_bfd_define_common_symbol): Likewise.
3512 (_bfd_nolink_bfd_define_start_stop): Likewise.
3513 (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise.
3514 (_bfd_nodynamic_get_synthetic_symtab): Likewise.
3515 (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise.
3516 (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise.
3517 * libbfd.c (bfd_false_any): Delete.
3518 (bfd_true_any, bfd_nullvoidptr_any, bfd_0_any): Delete.
3519 (bfd_0u_any, bfd_0l_any, _bfd_n1_any, bfd_void_any): Delete.
3520 * libbfd.h (extern): Regenerate
3521 * aout-target.h (MY_bfd_is_target_special_symbol): Add extra
3522 cast to avoid warning from gcc v8 compiler.
3523 * aout-tic30.c (tic30_aout_set_arch_mach): Likewise.
3524 * binary.c (binary_get_symbol_info): Likewise.
3525 * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
3526 * coff-mips.c (mips_ecoff_backend_data): Likewise.
3527 * coffcode.h (coff_set_alignment_hook): Likewise.
3528 (symname_in_debug_hook): Likewise.
3529 (bfd_coff_backend_data bigobj_swap_table): Likewise.
3530 * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise.
3531 * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise.
3532 * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise.
3533 * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise.
3534 * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise.
3535 * elf32-score.c (elf_backend_omit_section_dynsym): Likewise.
3536 * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise.
3537 * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise.
3538 * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise.
3539 * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise.
3540 * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise.
3541 * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise.
3542 * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise.
3543 * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise.
3544 * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise.
3545 * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise.
3546 (bfd_elfNN_bfd_make_debug_symbol): Likewise.
3547 (bfd_elfNN_bfd_merge_private_bfd_data): Likewise.
3548 (bfd_elfNN_bfd_set_private_flags): Likewise.
3549 (bfd_elfNN_bfd_is_target_special_symbol): Likewise.
3550 (elf_backend_init_index_section): Likewise.
3551 (elf_backend_allow_non_load_phdr): Likewise.
3552 * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise.
3553 * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise.
3554 * ieee.c (ieee_construct_extended_name_table): Likewise.
3555 (ieee_write_armap): Likewise.
3556 (ieee_write_ar_hdr): Likewise.
3557 (ieee_bfd_is_target_special_symbol): Likewise.
3558 * ihex.c (ihex_canonicalize_symtab): Likewise.
3559 (ihex_bfd_is_target_special_symbol): Likewise.
3560 * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise.
3561 * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise.
3562 (_bfd_ecoff_set_alignment_hook): Likewise.
3563 * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise.
3564 * mmo.c (mmo_bfd_is_target_special_symbol): Likewise.
3565 * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise.
3566 * oasys.c (oasys_construct_extended_name_table): Likewise.
3567 (oasys_write_armap): Likewise.
3568 (oasys_write_ar_hdr): Likewise.
3569 (oasys_bfd_is_target_special_symbol): Likewise.
3570 * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise.
3571 * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise.
3572 * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise.
3573 * som.c (som_bfd_is_target_special_symbol): Likewise.
3574 * srec.c (srec_bfd_is_target_special_symbol): Likewise.
3575 * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise.
3576 * verilog.c (verilog_bfd_is_target_special_symbol): Likewise.
3577 * versados.c (versados_bfd_is_target_special_symbol): Likewise.
3578 (versados_bfd_reloc_name_lookup): Likewise.
3579 * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise.
3580 (vms_bfd_define_start_stop): Likewise.
3581 (alpha_vms_bfd_is_target_special_symbol): Likewise.
3582 * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise.
3583 * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise.
3585 2018-02-14 H.J. Lu <hongjiu.lu@intel.com>
3588 * elf32-i386.c (elf_i386_check_relocs): Pass FALSE for non
3589 PC-relative PLT to NEED_DYNAMIC_RELOCATION_P.
3590 * elf64-x86-64.c (elf_x86_64_check_relocs): Create PLT for
3591 R_X86_64_PC32 reloc against dynamic function in data section.
3592 Pass TRUE for PC-relative PLT to NEED_DYNAMIC_RELOCATION_P.
3593 (elf_x86_64_relocate_section): Use PLT for R_X86_64_PC32 reloc
3594 against dynamic function in data section.
3595 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Use PLT in PIE as
3596 function address only if pcrel_plt is true.
3597 (_bfd_x86_elf_link_hash_table_create): Set pcrel_plt.
3598 * elfxx-x86.h (NEED_DYNAMIC_RELOCATION_P): Add PCREL_PLT for
3599 PC-relative PLT. If PLT is PC-relative, don't generate dynamic
3600 PC-relative relocation against a function definition in data
3601 secton in PIE. Remove the obsolete comments.
3602 (elf_x86_link_hash_table): Add pcrel_plt.
3604 2018-02-13 H.J. Lu <hongjiu.lu@intel.com>
3606 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Check bfd_link_dll,
3607 instead of bfd_link_pic, for building shared library.
3609 2018-02-13 H.J. Lu <hongjiu.lu@intel.com>
3612 * elf64-x86-64.c (is_32bit_relative_branch): Removed.
3613 (elf_x86_64_relocate_section): Check PIC relocations in PIE.
3614 Remove is_32bit_relative_branch usage. Disallow PC32 reloc
3615 against protected function in shared object.
3617 2018-02-13 Sergei Trofimovich <slyfox@inbox.ru>
3620 * po/ru.po: Fix typo in Russian translation.
3622 2018-02-13 Maciej W. Rozycki <macro@mips.com>
3624 * wasm-module.c (wasm_scan_name_function_section): Rename
3625 `index' local variable to `idx'.
3627 2018-02-13 Nick Clifton <nickc@redhat.com>
3630 Fix compile time warnings generated by gcc version 8.
3631 * libbfd-in.h: Remove extraneous text from prototypes.
3632 Add prototypes for bfd_false_any, bfd_true_any,
3633 bfd_nullvoidptr_any, bfd_0_any, bfd_0u_any, bfd_0l_any,
3634 bfd_n1_any, bfd_void_any.
3635 (_bfd_generic_bfd_copy_private_bfd_data): Use vararg based dummy
3637 (_bfd_generic_bfd_merge_private_bfd_data): Likewise.
3638 (_bfd_generic_bfd_set_private_flags): Likewise.
3639 (_bfd_generic_bfd_copy_private_section_data): Likewise.
3640 (_bfd_generic_bfd_copy_private_symbol_data): Likewise.
3641 (_bfd_generic_bfd_copy_private_header_data): Likewise.
3642 (_bfd_generic_bfd_print_private_bfd_data): Likewise.
3643 (_bfd_noarchive_construct_extended_name_table): Likewise.
3644 (_bfd_noarchive_truncate_arname): Likewise.
3645 (_bfd_noarchive_write_ar_hdr): Likewise.
3646 (_bfd_noarchive_get_elt_at_index): Likewise.
3647 (_bfd_nosymbols_canonicalize_symtab): Likewise.
3648 (_bfd_nosymbols_print_symbol): Likewise.
3649 (_bfd_nosymbols_get_symbol_info): Likewise.
3650 (_bfd_nosymbols_get_symbol_version_string): Likewise.
3651 (_bfd_nosymbols_bfd_is_local_label_name): Likewise.
3652 (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise.
3653 (_bfd_nosymbols_get_lineno): Likewise.
3654 (_bfd_nosymbols_find_nearest_line): Likewise.
3655 (_bfd_nosymbols_find_line): Likewise.
3656 (_bfd_nosymbols_find_inliner_info): Likewise.
3657 (_bfd_nosymbols_bfd_make_debug_symbol): Likewise.
3658 (_bfd_nosymbols_read_minisymbols): Likewise.
3659 (_bfd_nosymbols_minisymbol_to_symbol): Likewise.
3660 (_bfd_norelocs_bfd_reloc_type_lookup): Likewise.
3661 (_bfd_norelocs_bfd_reloc_name_lookup): Likewise.
3662 (_bfd_nowrite_set_arch_mach): Likewise.
3663 (_bfd_nowrite_set_section_contents): Likewise.
3664 (_bfd_nolink_sizeof_headers): Likewise.
3665 (_bfd_nolink_bfd_get_relocated_section_contents): Likewise.
3666 (_bfd_nolink_bfd_relax_section): Likewise.
3667 (_bfd_nolink_bfd_gc_sections): Likewise.
3668 (_bfd_nolink_bfd_lookup_section_flags): Likewise.
3669 (_bfd_nolink_bfd_merge_sections): Likewise.
3670 (_bfd_nolink_bfd_is_group_section): Likewise.
3671 (_bfd_nolink_bfd_discard_group): Likewise.
3672 (_bfd_nolink_bfd_link_hash_table_create): Likewise.
3673 (_bfd_nolink_bfd_link_add_symbols): Likewise.
3674 (_bfd_nolink_bfd_link_just_syms): Likewise.
3675 (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise.
3676 (_bfd_nolink_bfd_final_link): Likewise.
3677 (_bfd_nolink_bfd_link_split_section): Likewise.
3678 (_bfd_nolink_section_already_linked): Likewise.
3679 (_bfd_nolink_bfd_define_common_symbol): Likewise.
3680 (_bfd_nolink_bfd_define_start_stop): Likewise.
3681 (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise.
3682 (_bfd_nodynamic_get_synthetic_symtab): Likewise.
3683 (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise.
3684 (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise.
3685 * libbfd.c (bfd_false_any): New function. Like bfd_false but
3686 accepts one or more arguments.
3687 (bfd_true_any): Likewise.
3688 (bfd_nullvoidptr_any): Likewise.
3689 (bfd_0_any): Likewise.
3690 (bfd_0u_any): Likewise.
3691 (bfd_0l_any): Likewise.
3692 (_bfd_n1_any): Likewise.
3693 (bfd_void_any): Likewise.
3694 * libbfd.h (extern): Regenerate
3695 * aout-target.h (MY_bfd_is_target_special_symbol): Use vararg
3696 based dummy function.
3697 * aout-tic30.c (tic30_aout_set_arch_mach): Likewise.
3698 * binary.c (binary_get_symbol_info): Likewise.
3699 * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
3700 * coff-mips.c (mips_ecoff_backend_data): Likewise.
3701 * coffcode.h (coff_set_alignment_hook): Likewise.
3702 (symname_in_debug_hook): Likewise.
3703 (bfd_coff_backend_data bigobj_swap_table): Likewise.
3704 * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise.
3705 * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise.
3706 * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise.
3707 * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise.
3708 * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise.
3709 * elf32-score.c (elf_backend_omit_section_dynsym): Likewise.
3710 * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise.
3711 * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise.
3712 * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise.
3713 * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise.
3714 * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise.
3715 * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise.
3716 * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise.
3717 * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise.
3718 * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise.
3719 * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise.
3720 (bfd_elfNN_bfd_make_debug_symbol): Likewise.
3721 (bfd_elfNN_bfd_merge_private_bfd_data): Likewise.
3722 (bfd_elfNN_bfd_set_private_flags): Likewise.
3723 (bfd_elfNN_bfd_is_target_special_symbol): Likewise.
3724 (elf_backend_init_index_section): Likewise.
3725 (elf_backend_allow_non_load_phdr): Likewise.
3726 * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise.
3727 * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise.
3728 * ieee.c (ieee_construct_extended_name_table): Likewise.
3729 (ieee_write_armap): Likewise.
3730 (ieee_write_ar_hdr): Likewise.
3731 (ieee_bfd_is_target_special_symbol): Likewise.
3732 * ihex.c (ihex_canonicalize_symtab): Likewise.
3733 (ihex_bfd_is_target_special_symbol): Likewise.
3734 * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise.
3735 * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise.
3736 (_bfd_ecoff_set_alignment_hook): Likewise.
3737 * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise.
3738 * mmo.c (mmo_bfd_is_target_special_symbol): Likewise.
3739 * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise.
3740 * oasys.c (oasys_construct_extended_name_table): Likewise.
3741 (oasys_write_armap): Likewise.
3742 (oasys_write_ar_hdr): Likewise.
3743 (oasys_bfd_is_target_special_symbol): Likewise.
3744 * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise.
3745 * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise.
3746 * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise.
3747 * som.c (som_bfd_is_target_special_symbol): Likewise.
3748 * srec.c (srec_bfd_is_target_special_symbol): Likewise.
3749 * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise.
3750 * verilog.c (verilog_bfd_is_target_special_symbol): Likewise.
3751 * versados.c (versados_bfd_is_target_special_symbol): Likewise.
3752 (versados_bfd_reloc_name_lookup): Likewise.
3753 * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise.
3754 (vms_bfd_define_start_stop): Likewise.
3755 (alpha_vms_bfd_is_target_special_symbol): Likewise.
3756 * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise.
3757 * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise.
3758 * elf32-arc.c (get_replace_function): Assign replacement function
3760 * elf32-i370.c (i370_noop): Update prototype.
3762 2018-02-13 Alan Modra <amodra@gmail.com>
3765 * elf.c (_bfd_elf_fixup_group_sections): Account for removed
3766 relocation sections. If size reduces to just the flag word,
3767 remove that too and mark with SEC_EXCLUDE.
3768 * elflink.c (bfd_elf_final_link): Strip empty group sections.
3770 2018-02-13 Alan Modra <amodra@gmail.com>
3773 * elf.c (assign_file_positions_for_non_load_sections): Rewrite
3776 2018-02-12 Zebediah Figura <z.figura12@gmail.com>
3778 * i386msdos.c (msdos_mkobject); New function.
3779 (msdos_object_p): New function.
3780 (i386_msdos_vec): Use msdos_object_p as the check_format
3782 * peicode.h: Rename external_PEI_DOS_hdr, DOSMAGIC, and
3783 NT_SIGNATURE to external_DOS_hdr, IMAGE_DOS_SIGNATURE, and
3785 * peXXigen.c: Likewise.
3786 * coff-ia64.c: Likewise.
3788 2018-02-12 Nick Clifton <nickc@redhat.com>
3790 * elf32-nds32.c (nds32_elf_relax_longjump3): Remove redundant
3792 * elf32-arc.c (elf_arc_relocate_section): Likewise.
3794 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
3796 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Reorder conditions.
3797 (sparc_elf_append_rela): Assert that there is enough room in section.
3798 (_bfd_sparc_elf_copy_indirect_symbol): Fix formatting.
3799 (_bfd_sparc_elf_adjust_dynamic_symbol): Minor tweak.
3800 (allocate_dynrelocs): Remove outdated comments and reorder conditions.
3801 For a symbol subject to a GOT relocation, reserve a slot in the
3802 relocation section if the symbol isn't dynamic and we are in PIC mode.
3803 (_bfd_sparc_elf_relocate_section) <R_SPARC_GOTDATA_OP>: If relocation
3804 is relaxed and a slot was reserved, generate a R_SPARC_NONE relocation.
3805 <R_SPARC_GOTDATA_OP_HIX22>: Adjust comments.
3806 <R_SPARC_PC10>: Reorder conditions. Remove always-false assertion.
3807 (_bfd_sparc_elf_finish_dynamic_symbol): Rename local_undefweak into
3808 resolved_to_zero. Do not generate a dynamic GOT relocation for an
3809 undefined weak symbol with non-default visibility. Remove superfluous
3810 'else' and fix formatting.
3812 2018-02-09 H.J. Lu <hongjiu.lu@intel.com>
3814 * elf32-i386.c (elf_i386_get_synthetic_symtab): Also handle
3816 (i386_elf32_sol2_vec): Don't declare.
3817 (elf_i386_link_setup_gnu_properties): Also handle is_solaris.
3818 Don't set need_global_offset_table.
3819 (elf_i386_solaris_arch_bed): New.
3820 (elf_backend_arch_data): Set to elf_i386_solaris_arch_bed for
3822 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Check
3823 target_os != is_nacl instead of target_os == is_normal.
3824 (x86_64_elf64_sol2_vec): Don't declare.
3825 (elf_x86_64_link_setup_gnu_properties): Check target_os !=
3826 is_nacl instead of target_os == is_normal. Don't set
3827 need_global_offset_table.
3828 (elf_x86_64_solaris_arch_bed): New.
3829 (elf_backend_arch_data): Set to elf_x86_64_solaris_arch_bed for
3831 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep
3832 _GLOBAL_OFFSET_TABLE_ for Solaris.
3833 (_bfd_x86_elf_link_setup_gnu_properties): Don't copy
3834 need_global_offset_table.
3835 * elfxx-x86.h (elf_x86_target_os): Add is_solaris.
3836 (elf_x86_link_hash_table): Remove need_global_offset_table.
3837 (elf_x86_init_table): Likewise.
3839 2018-02-08 H.J. Lu <hongjiu.lu@intel.com>
3841 * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
3843 (i386_elf32_sol2_vec): Declared.
3844 (elf_i386_link_setup_gnu_properties): Set
3845 need_global_offset_table with info->output_bfd->xvec.
3846 * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
3848 (x86_64_elf64_sol2_vec): Declared.
3849 (elf_x86_64_link_setup_gnu_properties): Set
3850 need_global_offset_table with info->output_bfd->xvec.
3852 2018-02-08 H.J. Lu <hongjiu.lu@intel.com>
3854 * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
3856 (elf_i386_link_setup_gnu_properties): Set need_global_offset_table
3858 * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
3860 (elf_x86_64_link_setup_gnu_properties): Set
3861 need_global_offset_table for Solaris.
3862 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep the
3863 unused _GLOBAL_OFFSET_TABLE_ for Solaris.
3864 (_bfd_x86_elf_link_setup_gnu_properties): Copy
3865 need_global_offset_table.
3866 * elfxx-x86.h (elf_x86_link_hash_table): Add
3867 need_global_offset_table.
3868 (elf_x86_init_table): Likewise.
3870 2018-02-08 Jim Wilson <jimw@sifive.com>
3872 * elfnn-riscv.c (riscv_elf_relocate_section): Add comment for previous
3875 2018-02-08 Nick Clifton <nickc@redhat.com>
3878 * elf.c (elf_parse_notes): Reject notes with excessuively large
3881 2018-02-07 Alan Modra <amodra@gmail.com>
3883 Revert 2018-01-17 Alan Modra <amodra@gmail.com>
3884 * elf32-ppc.c: Remove speculation barrier support.
3885 * elf32-ppc.h: Likewise.
3886 * elf64-ppc.c: Likewise.
3887 * elf64-ppc.h: Likewise.
3889 2018-02-06 Jim Wilson <jimw@sifive.com>
3891 * elfnn-riscv.c (riscv_elf_relocate_section): Return TRUE if used
3892 callback to report an error.
3894 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
3897 * elfxx-sparc.c (sparc_elf_tls_transition): Turn call to bfd_link_pic
3898 into call to !bfd_link_executable and tidy up.
3899 (_bfd_sparc_elf_check_relocs): Fix formatting and tidy up.
3900 <R_SPARC_TLS_LE_HIX22>: Turn call to bfd_link_pic into call to
3901 !bfd_link_executable.
3902 <R_SPARC_TLS_IE_HI22>: Likewise.
3903 <GOT relocations>: Remove useless code, tidy and merge related blocks.
3904 <R_SPARC_TLS_GD_CALL>: Turn call to bfd_link_pic into call to
3905 !bfd_link_executable.
3906 <R_SPARC_WPLT30>: Tidy up.
3907 (_bfd_sparc_elf_gc_mark_hook): Turn call to bfd_link_pic into call to
3908 !bfd_link_executable.
3909 (allocate_dynrelocs): Likewise.
3910 (_bfd_sparc_elf_relocate_section): Fix formatting and tidy up.
3911 <R_SPARC_TLS_GD_HI22>: Merge into...
3912 <R_SPARC_TLS_GD_LO10>: ...this. Adjust 4th argument in call to
3913 sparc_elf_tls_transition and remove redundant code.
3914 <R_SPARC_TLS_LDM_HI22>: Turn call to bfd_link_pic into call to
3915 !bfd_link_executable.
3916 <R_SPARC_TLS_LDO_HIX22>: Likewise.
3917 <R_SPARC_TLS_LE_HIX22>: Likewise. Tidy up.
3918 <R_SPARC_TLS_LDM_CALL>: Likewise.
3919 <R_SPARC_TLS_GD_CALL>: Likewise. Tidy up.
3920 <R_SPARC_TLS_GD_ADD>: Likewise.
3921 <R_SPARC_TLS_LDM_ADD>: Likewise.
3922 <R_SPARC_TLS_LDO_ADD>: Likewise.
3923 <R_SPARC_TLS_IE_LD>: Likewise.
3925 2018-02-06 Miloš Stojanović <milos.stojanovic@rt-rk.com>
3928 * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): If the dwarf
3929 functions failed to find the function name, try the generic elf
3930 find function instead.
3932 2018-02-06 Sergio Durigan Junior <sergiodj@redhat.com>
3934 * coff-rs6000.c (xcoff_write_archive_contents_old): Use
3935 'memcpy' instead of 'strncpy' when writing the magic number.
3937 2018-02-06 Nick Clifton <nickc@redhat.com>
3940 * opncls.c (bfd_get_debug_link_info_1): Check the size of the
3941 section before attempting to read it in.
3942 (bfd_get_alt_debug_link_info): Likewise.
3944 2018-02-06 Paul Carroll <pcarroll@codesourcery.com>
3946 * bfd/dwarf2.c (find_abstract_name): Modified to return file and
3947 line information in addition to name, if they can be found.
3949 2018-02-05 Renlin Li <renlin.li@arm.com>
3952 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Relax the
3953 R_AARCH64_ABS32 and R_AARCH64_ABS16 for absolute symbol. Apply the
3954 check for writeable section as well.
3956 2018-02-05 H.J. Lu <hongjiu.lu@intel.com>
3959 * elf32-i386.c (elf_i386_check_relocs): Set got_referenced if
3960 _GLOBAL_OFFSET_TABLE_ is referenced or GOT is needed to resolve
3961 undefined weak symbol to 0.
3962 * elf64-x86-64.c (elf_x86_64_check_relocs): Set got_referenced
3963 if _GLOBAL_OFFSET_TABLE_ is referenced.
3964 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Check
3965 got_referenced instead of ref_regular_nonweak. Remove the
3966 unused _GLOBAL_OFFSET_TABLE_ from symbol table.
3967 * elfxx-x86.h (elf_x86_link_hash_table): Add got_referenced.
3969 2018-02-05 Maciej W. Rozycki <macro@mips.com>
3971 * elfnn-riscv.c (_bfd_riscv_relax_pc): Use `memset' to
3972 initialize `hi_reloc'.
3974 2018-02-05 Maciej W. Rozycki <macro@mips.com>
3976 * elfxx-mips.c (_bfd_mips_elf_section_processing): For
3977 SHT_MIPS_REGINFO sections don't assert the correct size and
3978 report an error instead.
3980 2018-02-05 Maciej W. Rozycki <macro@mips.com>
3982 * elf.c (_bfd_elf_write_object_contents): Propagate a failure
3983 status from `->elf_backend_section_processing'.
3985 2018-02-02 Jim Wilson <jimw@sifive.com>
3988 * elfnn-riscv.c (riscv_relax_delete_bytes): New parameter link_info.
3989 If link_info->wrap_hash, check for a duplicate symbol and ignore.
3990 (_bfd_riscv_relax_call, bfd_riscv_relax_lui, _bfd_riscv_relax_tls_le):
3991 Pass new argument to riscv_relax_delete_bytes.
3992 (_bfd_riscv_relax_align, _bfd_riscv_relax_delete): Likewise. Remove
3993 ATTRIBUTE_UNUSED from link_info parameter.
3995 2018-02-02 Alan Modra <amodra@gmail.com>
3997 * elf64-ppc.c (ppc64_elf_relocate_section): Don't relocate nops
3998 emitted for toc sequence optimization. Set and use "howto" later.
4000 2018-02-01 Simon Marchi <simon.marchi@ericsson.com>
4002 * elf64-ppc.c (ppc64_elf_archive_symbol_lookup): Avoid pointer
4003 arithmetic on NULL pointer.
4004 * elflink.c (_bfd_elf_archive_symbol_lookup,
4005 elf_link_add_archive_symbols): Likewise.
4007 2018-01-31 Michael Matz <matz@suse.de>
4009 * elflink.c (bfd_elf_define_start_stop): Fix check of
4012 2018-01-31 H.J. Lu <hongjiu.lu@intel.com>
4015 * elflink.c (bfd_elf_define_start_stop): Check if __start and
4016 __stop symbols are referenced by shared objects.
4018 2018-01-30 Alan Modra <amodra@gmail.com>
4021 * elf.c (_bfd_elf_map_sections_to_segments): Don't start a new
4022 segment when demand paged with lma on the same page. Test this
4023 before load/non-load, executable/non-executable,
4024 writable/non-writable tests and simplify. Delete bogus relro
4025 condition in writable/non-writable test. Delete outdated
4026 comment. Formatting.
4028 2018-01-30 Alan Modra <amodra@gmail.com>
4030 * elflink.c (bfd_elf_define_start_stop): Make __start and __stop
4033 2018-01-29 Alan Modra <amodra@gmail.com>
4036 * coffgen.c (coff_pointerize_aux): Ensure auxent tagndx is in
4037 range before converting to a symbol table pointer.
4039 2018-01-27 Nick Clifton <nickc@redhat.com>
4041 * po/ru.po: Updated Russian translation.
4043 2018-01-26 Alan Modra <amodra@gmail.com>
4045 * elflink.c (bfd_elf_define_start_stop): Override symbols when
4046 they are defined dynamically.
4048 2018-01-26 Alan Modra <amodra@gmail.com>
4050 * elf64-ppc.c (ppc64_elf_size_stubs): Iterate sizing when
4051 .branch_lt changes size.
4053 2018-01-25 Alan Modra <amodra@gmail.com>
4056 * elfcode.h (elf_object_p): Avoid integer overflow.
4058 2018-01-25 Eric Botcazou <ebotcazou@adacore.com>
4061 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
4062 Do a mere lookup of the __tls_get_addr symbol instead of adding it.
4065 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
4068 * elfxx-sparc.c (sparc_elf_tls_transition): Replace
4069 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
4070 bfd_link_executable for TLS check.
4071 (_bfd_sparc_elf_check_relocs): Likewise.
4072 (allocate_dynrelocs): Likewise.
4073 (_bfd_sparc_elf_relocate_section): Likewise.
4075 2018-01-24 Renlin Li <renlin.li@arm.com>
4077 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Add support for
4078 BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
4079 BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
4080 BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
4081 BFD_RELOC_AARCH64_MOVW_PREL_G3.
4082 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
4083 (_bfd_aarch64_elf_resolve_relocation): Likewise.
4085 2018-01-24 Renlin Li <renlin.li@arm.com>
4087 * reloc.c: Add BFD_RELOC_AARCH64_MOVW_PREL_G0,
4088 BFD_RELOC_AARCH64_MOVW_PREL_G0_NC, BFD_RELOC_AARCH64_MOVW_PREL_G1,
4089 BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, BFD_RELOC_AARCH64_MOVW_PREL_G2,
4090 BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, BFD_RELOC_AARCH64_MOVW_PREL_G3.
4091 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Add entries for
4092 BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
4093 BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
4094 BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
4095 BFD_RELOC_AARCH64_MOVW_PREL_G3.
4096 * bfd-in2.h: Regenerate.
4097 * libbfd.h: Regenerate.
4099 2018-01-23 Maciej W. Rozycki <macro@mips.com>
4101 * elfxx-mips.c (_bfd_mips_elf_final_link): Update a stale
4102 `mips_elf32_section_processing' comment reference.
4104 2018-01-20 H.J. Lu <hongjiu.lu@intel.com>
4107 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Check the
4108 versioned __tls_get_addr symbol.
4110 2018-01-19 Nick Clifton <nickc@redhat.com>
4112 * po/fr.po: Updated French translation.
4114 2018-01-18 Alan Modra <amodra@gmail.com>
4116 * elf32-ppc.c (ppc_elf_create_glink): Correct alignment of .glink.
4117 * elf64-ppc.c (ppc64_elf_size_stubs): Handle negative plt_stub_align.
4118 (ppc64_elf_build_stubs): Likewise.
4120 2018-01-17 Nick Clifton <nickc@redhat.com>
4122 * po/ru.po: Updated Russian translation.
4123 * po/uk/po: Updated Ukranian translation.
4125 2018-01-17 Alan Modra <amodra@gmail.com>
4127 * elf64-ppc.c (ppc64_elf_build_stubs): Silence gcc warning.
4129 2018-01-17 Alan Modra <amodra@gmail.com>
4131 * elf32-ppc.c (GLINK_ENTRY_SIZE): Handle speculation barrier.
4132 (CRSETEQ, BEQCTRM): Define.
4133 (is_nonpic_glink_stub): Don't check bctr.
4134 (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
4135 (ppc_elf_relax_section): Size speculation barrier.
4136 (output_bctr): New function.
4137 (write_glink_stub): Use output_bctr.
4138 (ppc_elf_relocate_section): Use output_bctr for long branch stub.
4139 (ppc_elf_finish_dynamic_symbol): Likewise.
4140 (ppc_elf_finish_dynamic_sections): Use output_bctr.
4141 * elf32-ppc.h (struct ppc_elf_params): Add speculate_indirect_jumps.
4142 * elf64-ppc.c (CRSETEQ, BEQCTRM, BEQCTRLM): Define.
4143 (GLINK_PLTRESOLVE_SIZE): Size speculation barrier.
4144 (size_global_entry_stubs): Handle speculation barrier sizing.
4145 (plt_stub_size): Likewise.
4146 (output_bctr): New function.
4147 (build_plt_stub, build_tls_get_addr_stub): Output speculation
4149 (ppc_build_one_stub): Likewise for ppc_stub_plt_branch.
4150 (ppc_size_one_stub): Size speculation barrier in ppc_stub_plt_branch.
4151 (build_global_entry_stubs): Output speculation barrier.
4152 (ppc64_elf_build_stubs): Likewise in __glink_PLTresolve stub.
4153 * elf64-ppc.h (struct ppc64_elf_params): Add speculate_indirect_jumps.
4155 2018-01-17 Alan Modra <amodra@gmail.com>
4157 * elf32-ppc.c (GLINK_ENTRY_SIZE): Add parameters, handle
4158 __tls_get_addr_opt, and alignment sizing.
4159 (TLS_GET_ADDR_GLINK_SIZE): Delete.
4160 (is_nonpic_glink_stub): Don't use GLINK_ENTRY_SIZE.
4161 (ppc_elf_get_synthetic_symtab): Recognize stubs spaced at 4, 6,
4163 (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
4164 (allocate_dynrelocs): Use new GLINK_ENTRY_SIZE.
4165 (ppc_elf_size_dynamic_sections): Likewise. Size branch table
4167 (write_glink_stub): Handle __tls_get_addr_opt stub.
4168 Pad out to size given by GLINK_ENTRY_SIZE.
4169 (ppc_elf_relocate_section): Adjust write_glink_stub call.
4170 (ppc_elf_finish_dynamic_symbol): Likewise.
4171 (ppc_elf_finish_dynamic_sections): Write PLTresolve without using
4172 insn array since so many need rewriting.
4173 * elf32-ppc.h (struct ppc_elf_params): Add plt_stub_align.
4174 * elf64-ppc.c (GLINK_PLTRESOLVE_SIZE): Rename from
4175 GLINK_CALL_STUB_SIZE. Add htab param and evaluate to size without
4176 nops. Adjust all uses.
4177 (ppc64_elf_get_synthetic_symtab): Don't use GLINK_CALL_STUB_SIZE
4178 in glink_vma calculation.
4179 (struct ppc_link_hash_table): Add global_entry section pointer.
4180 (create_linkage_sections): Create separate section for global
4182 (PPC_LO, PPC_HI, PPC_HA): Move earlier.
4183 (size_global_entry_stubs): Handle sizing for aligned stubs.
4184 (ppc64_elf_size_dynamic_sections): Handle global_entry alloc,
4185 and don't stash end of glink branch table in rawsize.
4186 (ppc_build_one_stub): Rewrite stub size calculations.
4187 (build_global_entry_stubs): Use new section.
4188 (ppc64_elf_build_stubs): Don't pad __glink_PLTresolve with nops.
4189 Build lazy link stubs out to end of section. Build global entry
4190 stubs in new section.
4192 2018-01-15 Nick Clifton <nickc@redhat.com>
4194 * po/uk.po: Updated Ukranian translation.
4196 2018-01-13 Nick Clifton <nickc@redhat.com>
4198 * po/bfd.pot: Regenerated.
4200 2018-01-13 Nick Clifton <nickc@redhat.com>
4202 * version.m4: Bump version to 2.30.51
4203 * configure: Regenerate.
4205 2018-01-13 Nick Clifton <nickc@redhat.com>
4207 2.30 branch created.
4209 2018-01-12 Jens Widell <jl@opera.com>
4211 * elf.c (setup_group): Optimize search for group by remembering
4212 last found group and restarting search at that index.
4213 * elf-bfd.h (struct elf_obj_tdata): Add group_search_offset field.
4215 2018-01-12 Gunther Nikl <gnikl@users.sourceforge.net>
4217 * aoutx.h (aout_link_check_ar_symbols): Remove default and handle
4218 bfd_link_common_skip_none in switch.
4220 2018-01-12 Alan Modra <amodra@gmail.com>
4223 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Ignore dynamic
4224 references on forced local symbols.
4226 2018-01-12 Vlad Ivanov <vlad@ivanov.email>
4228 * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when
4229 .reginfo section has wrong size.
4231 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
4234 * elf.c (_bfd_elf_map_sections_to_segments): When generating
4235 separate code and read-only data LOAD segments, create a new
4236 LOAD segment if the previous section contains text and the
4237 current section doesn't or vice versa. Don't put a writable
4238 section in a read-only segment if there is a RELRO segment.
4240 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
4243 * elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Ignore dynamic
4244 references on forced local symbols.
4246 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
4249 * elflink.c (bfd_elf_gc_sections): Keep all PREINIT_ARRAY,
4250 INIT_ARRAY as well as FINI_ARRAY sections for ld -r --gc-section.
4252 2018-01-09 Kuan-Lin Chen <kuanlinchentw@gmail.com>
4255 * elf32-nds32.c (nds32_elf_relax_loadstore): Fix a typographical error.
4257 2018-01-03 John Baldwin <jhb@FreeBSD.org>
4259 * elf.c (elfcore_grok_freebsd_note): Handle
4260 NT_FREEBSD_PROCSTAT_PROC, NT_FREEBSD_PROCSTAT_FILES, and
4261 NT_FREEBSD_PROCSTAT_VMMAP.
4263 2018-01-03 Alan Modra <amodra@gmail.com>
4265 Update year range in copyright notice of all files.
4267 For older changes see ChangeLog-2017
4269 Copyright (C) 2018 Free Software Foundation, Inc.
4271 Copying and distribution of this file, with or without modification,
4272 are permitted in any medium without royalty provided the copyright
4273 notice and this notice are preserved.
4279 version-control: never