1 2019-10-11 Max Filippov <jcmvbkbc@gmail.com>
3 * dwarf2.c (stash_maybe_enable_info_hash_tables): Only set
4 stash->info_hash_status = STASH_INFO_HASH_ON when
5 stash_maybe_update_info_hash_tables succeeds.
7 2019-10-09 Alan Modra <amodra@gmail.com>
10 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Catch overflow of
11 total_size calculation.
13 2019-10-08 Alan Modra <amodra@gmail.com>
16 * dwarf2.c (find_abstract_instance): Delete orig_info_ptr, add
17 recur_count. Error on recur_count reaching 100 rather than
18 info_ptr matching orig_info_ptr. Adjust calls.
20 2019-10-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
22 * elf32-msp430.c (elf32_msp430_merge_mspabi_attributes): Rename to..
23 (elf32_msp430_merge_msp430_attributes): Add support for merging
24 the GNU object attribute for data region.
26 2019-10-07 Alan Modra <amodra@gmail.com>
28 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Do allocate
29 space for local got non-tls relocs when PIE.
31 2019-10-07 Alan Modra <amodra@gmail.com>
33 * elflink.c (elf_fixup_link_order): Don't attempt to find
34 an elf_section for linker created bfd sections.
36 2019-10-07 Alan Modra <amodra@gmail.com>
38 * elf32-ppc.c (ppc_elf_tls_optimize): Don't process R_PPC_TLSLD
39 with non-local symbol. Don't double count __tls_get_addr calls
41 * elf64-ppc.c (ppc64_elf_tls_optimize): Likewise.
43 2019-10-07 Alan Modra <amodra@gmail.com>
45 * elf32-ppc.c (nomark_tls_get_addr): Rename from has_tls_get_addr_call
47 * elf64-ppc.c (nomark_tls_get_addr): Likewise.
49 2019-10-04 Alan Modra <amodra@gmail.com>
51 * elf64-ppc.c (ppc64_elf_check_relocs): Move initialisation of vars.
52 (ppc64_elf_tls_optimize): Correct is_local condition.
53 (allocate_got): Don't reserve dynamic relocations for any of the
54 tls got relocs in PIEs when the symbol is local.
55 (allocate_dynrelocs): Correct validity test for local sym using
57 (ppc64_elf_size_dynamic_sections): Don't reserve dynamic relocations
58 for any of the tls got relocs in PIEs.
59 (ppc64_elf_layout_multitoc): Likewise.
60 (ppc64_elf_relocate_section): Correct validity test for local sym
61 using tlsld_got slot. Don't emit dynamic relocations for any of
62 the tls got relocs in PIEs when the symbol is local.
63 * elf32-ppc.c (ppc_elf_tls_optimize): Correct is_local condition.
64 (got_relocs_needed): Delete.
65 (allocate_dynrelocs): Correct validity test for local sym using
66 tlsld_got slot. Don't reserve dynamic relocations for any of the
67 tls got relocs in PIEs when the symbol is local.
68 (ppc_elf_size_dynamic_sections): Don't reserve dynamic relocations
69 for any of the tls got relocs in PIEs.
70 (ppc_elf_relocate_section): Correct validity test for local sym
71 using tlsld_got slot. Don't emit dynamic relocations for any of
72 the tls got relocs in PIEs when the symbol is local.
74 2019-10-04 Szabolcs Nagy <szabolcs.nagy@arm.com>
78 * elf32-arm.c (elf32_arm_tls_transition): Use bfd_link_dll instead of
79 bfd_link_pic for TLS checks.
80 (elf32_arm_final_link_relocate): Likewise.
81 (allocate_dynrelocs_for_symbol): Likewise.
83 2019-10-04 Szabolcs Nagy <szabolcs.nagy@arm.com>
86 * elf32-arm.c (elf32_arm_final_link_relocate): Sign extend data.
88 2019-09-30 Nick Alcock <nick.alcock@oracle.com>
90 * elf-bfd.h (bfd_section_is_ctf): New inline function.
91 * elf.c (special_sections_c): Add ".ctf".
92 (assign_file_positions_for_non_load_sections): Note that
93 compressed debugging sections etc are not assigned here. Treat
94 CTF sections like SEC_ELF_COMPRESS sections when is_linker_output:
96 (assign_file_positions_except_relocs): Likewise.
97 (find_section_in_list): Note that debugging and CTF sections, as
98 well as reloc sections, are assigned later.
99 (_bfd_elf_assign_file_positions_for_non_load): CTF sections get
100 their size and contents updated.
101 (_bfd_elf_set_section_contents): Skip CTF sections: unlike
102 compressed sections, they have no uncompressed content to copy at
104 * elflink.c (elf_link_swap_symbols_out): Call the examine_strtab
105 callback right before the strtab is written out.
106 (bfd_elf_final_link): Don't cache the section contents of CTF
107 sections: they are not populated yet. Call the emit_ctf callback
108 right at the end, after all the symbols and strings are flushed
111 2019-07-13 Nick Alcock <nick.alcock@oracle.com>
113 * elf-strtab.c (_bfd_elf_strtab_len): New.
114 (_bfd_elf_strtab_str): Likewise.
115 * bfd-elf.h: Declare them.
117 2019-07-13 Nick Alcock <nick.alcock@oracle.com>
119 * elf-bfd.h (bfd_elf_get_str_section): Add.
120 * elf.c (bfd_elf_get_str_section): No longer static.
122 2019-09-26 Alan Modra <amodra@gmail.com>
125 * Makefile.am (AM_CPPFLAGS): Add -DLIBDIR.
126 * plugin.c (load_plugin): Search both ${libdir}/bfd-plugins and
127 ${bindir}/../lib/bfd-plugins if different.
128 * Makefile.in: Regenerate.
130 2019-09-23 Alan Modra <amodra@gmail.com>
132 * elf64-ppc.c (ppc64_elf_check_relocs): Use bfd_link_executable
133 in choosing between different actions for shared library and
134 non-shared library cases. Delete ELIMINATE_COPY_RELOCS test.
135 (dec_dynrel_count): Likewise. Account for ifunc special case.
136 (ppc64_elf_adjust_dynamic_symbol): Copy relocs are for executables,
138 (allocate_dynrelocs): Comment fixes. Delete ELIMINATE_COPY_RELOCS
141 2019-09-23 Alan Modra <amodra@gmail.com>
143 * Makefile.am (SOURCE_HFILES): Add many missing .h files.
144 * Makefile.in: Regenerate.
145 * po/SRC-POTFILES.in: Regenerate.
147 2019-09-23 Alan Modra <amodra@gmail.com>
149 * bfd-in.h (bfd_symbol, bfd_section_already_linked),
150 (bfd_elf_version_tree): Delete forward declarations.
151 Move other forward decls and remaining elf function decl later.
152 (bfd_section_already_linked_table_init),
153 (bfd_section_already_linked_table_free),
154 (_bfd_handle_already_linked, _bfd_nearby_section),
155 (_bfd_fix_excluded_sec_syms): Move to bfdlink.h.
157 2019-09-23 Alan Modra <amodra@gmail.com>
159 * bfd-in.h: Move ecoff function declarations..
160 * ecoff-bfd.h: ..to here, new file.
161 * ecoff.c: Include ecoff-bfd.h.
162 * ecofflink.c: Likewise.
163 * elf64-alpha.c: Likewise.
164 * elfxx-mips.c: Likewise.
165 * bfd-in2.h: Regenerate.
167 2019-09-23 Alan Modra <amodra@gmail.com>
169 * bfd-in.h (enum notice_asneeded_action): Move to bfdlink.h.
170 Move most other elf declarations..
171 * elf-bfd.h: ..to here.
172 * bfd-in2.h: Regenerate.
174 2019-09-23 Alan Modra <amodra@gmail.com>
176 * bfd-in.h: Move m68k function declaration..
177 * cpu-m68k.h: ..to here, new file..
178 * elf32-m68k.h: ..and here, new file.
179 * elf32-m68k.c: Include cpu-m68k.h and elf32-m68k.h.
180 * bfd-in2.h: Regenerate.
182 2019-09-23 Alan Modra <amodra@gmail.com>
184 * bfd-in.h: Move bfin function declaration..
185 * elf32-bfin.h: ..to here, new file.
186 * elf32-bfin.c: Include elf32-bfin.h.
187 * bfd-in2.h: Regenerate.
189 2019-09-23 Alan Modra <amodra@gmail.com>
191 * bfd-in.h: Move cr16 function declaration..
192 * elf32-cr16.h: ..to here, new file.
193 * elf32-cr16.c: Include elf32-cr16.h.
194 * bfd-in2.h: Regenerate.
196 2019-09-23 Alan Modra <amodra@gmail.com>
198 * bfd-in.h (bfd_sunos_get_needed_list),
199 (bfd_sunos_record_link_assignment),
200 (bfd_sunos_size_dynamic_sections),
201 (bfd_i386linux_size_dynamic_sections),
202 (bfd_sparclinux_size_dynamic_sections): Delete obsolete decls.
203 * bfd-in2.h: Regenerate.
205 2019-09-23 Alan Modra <amodra@gmail.com>
207 * bfd-in.h: Move xcoff function declarations..
208 * xcofflink.h: ..to here, new file.
209 * xcofflink.c: Include xcofflink.h.
210 * coff-rs6000.c (bfd_xcoff_ar_archive_set_magic): Delete unused func.
211 * bfd-in2.h: Regenerate.
213 2019-09-23 Alan Modra <amodra@gmail.com>
215 * bfd-in.h: Delete coff forward refs and move coff declaration..
216 * coff-bfd.h: ..to here.
217 * bfd-in2.h: Regenerate.
219 2019-09-23 Alan Modra <amodra@gmail.com>
221 * bfd-in.h: Move arm declaraions..
222 * cpu-arm.h: ..to here, new file..
223 * coff-arm.h: ..and here, new file..
224 * elf32-arm.h: ..and here, new file.
225 * cpu-arm.c: Include cpu-arm.h.
226 * coff-arm.c: Include cpu-arm.h and coff-arm.h.
227 * elf32-arm.c: Include cpu-arm.h and elf32-arm.h.
228 * pe-arm.c: Move function rename defines later.
229 * pe-arm-wince.c: Likewise and include sysdep.h and bfd.h early.
230 * bfd-in2.h: Regenerate.
232 2019-09-23 Alan Modra <amodra@gmail.com>
234 * bfd-in.h: Move tic6x function declaration..
235 * elf32-tic6x.h: ..to here.
236 * bfd-in2.h: Regenerate.
238 2019-09-23 Alan Modra <amodra@gmail.com>
240 * bfd-in.h: Move aarch64 declarations and defines..
241 * cpu-aarch64.h: ..to here, new file..
242 * elfxx-aarch64.h: ..and here.
243 * cpu-aarch64.c: Include cpu-aarch64.h.
244 * elfnn-aarch64.c: Likewise.
245 * bfd-in2.h: Regenerate.
247 2019-09-23 Alan Modra <amodra@gmail.com>
249 * bfd-in.h: Delete ticoff function declarations.
250 * coff-tic54x.c (bfd_ticoff_set_section_load_page),
251 (bfd_ticoff_get_section_load_page): Make static.
252 * bfd-in2.h: Regenerate.
254 2019-09-23 Alan Modra <amodra@gmail.com>
256 * bfd-in.h: Move h8300 function declaration to..
257 * cpu-h8300.h: ..here, new file.
258 * cpu-h8300.c: Include cpu-h8300.h.
259 * elf32-h8300.c: Likewise.
260 * bfd-in2.h: Regenerate.
262 2019-09-23 Alan Modra <amodra@gmail.com>
264 * bfd-in.h: Move ia64 function declarations..
265 * elfxx-ia64.h: ..to here.
266 * bfd-in2.h: Regenerate.
268 2019-09-23 Alan Modra <amodra@gmail.com>
270 * bfd-in.h: Move v850 function declarations..
271 * elf32-v850.h: ..to here, new file.
272 * elf32-v850.c: Include elf32-v850.h.
273 * bfd-in2.h: Regenerate.
275 2019-09-23 Alan Modra <amodra@gmail.com>
277 * bfd-in.h: Move mips function declaration to..
278 * elfxx-mips.h: ..here.
279 * bfd-in2.h: Regenerate.
281 2019-09-23 Alan Modra <amodra@gmail.com>
283 * bfd-in.h: Move csky function declarations to..
284 * elf32-csky.h: ..here, new file.
285 * elf32-csky.c: Include elf32-csky.h.
286 * bfd-in2.h: Regenerate.
288 2019-09-20 Nelson Chu <nelson.chu@sifive.com>
290 * elfnn-riscv.c (riscv_pcgp_hi_reloc): Add new field undefined_weak.
291 (riscv_record_pcgp_hi_reloc): New parameter undefined_weak.
292 Set undefined_weak field from it.
293 (relax_func_t): New parameter undefined_weak.
294 (_bfd_riscv_relax_call): New ignored parameter undefined_weak.
295 (_bfd_riscv_relax_tls_le): Likewise.
296 (_bfd_riscv_relax_align): Likewise.
297 (_bfd_riscv_relax_delete): Likewise.
298 (_bfd_riscv_relax_lui): New parameter undefined_weak. If true,
299 allow relaxing. For LO12* relocs, set rs1 to x0 when undefined_weak.
300 (_bfd_riscv_relax_pc): New parameter undefined_weak. For LO12* relocs,
301 set undefined_weak from hi_reloc. If true, allow relaxing. For LO12*
302 relocs, set rs1 to x0 when undefined_weak and change to non-pcrel
304 (_bfd_riscv_relax_section): New local undefined_weak. Set for
305 undef weak relocs that can be relaxed. Pass to relax_func call.
307 2019-09-20 Alan Modra <amodra@gmail.com>
309 * bfd-in.h (bfd_section_name, bfd_section_size, bfd_section_vma),
310 (bfd_section_lma, bfd_section_alignment, bfd_section_flags),
311 (bfd_section_userdata, bfd_is_com_section, discarded_section),
312 (bfd_get_section_limit_octets, bfd_get_section_limit): Delete macros.
313 * bfd.c (bfd_get_section_limit_octets, bfd_get_section_limit),
314 (bfd_section_list_remove, bfd_section_list_append),
315 (bfd_section_list_prepend, bfd_section_list_insert_after),
316 (bfd_section_list_insert_before, bfd_section_removed_from_list):
317 New inline functions.
318 * section.c (bfd_is_und_section, bfd_is_abs_section),
319 (bfd_is_ind_section, bfd_is_const_section, bfd_section_list_remove),
320 (bfd_section_list_append, bfd_section_list_prepend),
321 (bfd_section_list_insert_after, bfd_section_list_insert_before),
322 (bfd_section_removed_from_list): Delete macros.
323 (bfd_section_name, bfd_section_size, bfd_section_vma),
324 (bfd_section_lma, bfd_section_alignment, bfd_section_flags),
325 (bfd_section_userdata, bfd_is_com_section, bfd_is_und_section),
326 (bfd_is_abs_section, bfd_is_ind_section, bfd_is_const_section),
327 (discarded_section): New inline functions.
328 * bfd-in2.h: Regenerate.
330 2019-09-20 Alan Modra <amodra@gmail.com>
332 * bfd-in.h (bfd_asymbol_section, bfd_asymbol_value, bfd_asymbol_name),
333 (bfd_asymbol_bfd, bfd_asymbol_flavour, bfd_set_asymbol_name): Delete.
334 * bfd.c (bfd_asymbol_section, bfd_asymbol_value, bfd_asymbol_name),
335 (bfd_asymbol_bfd, bfd_set_asymbol_name): New inline functions.
336 * targets.c (bfd_asymbol_flavour): Likewise.
337 * bfd-in2.h: Regenerate.
339 2019-09-20 Alan Modra <amodra@gmail.com>
341 * archive.c (bfd_generic_archive_p): Use bfd_set_thin_archive.
342 * bfd-in.h (bfd_get_filename, bfd_get_cacheable, bfd_get_format),
343 (bfd_get_target, bfd_get_flavour, bfd_family_coff, bfd_big_endian),
344 (bfd_little_endian, bfd_header_big_endian, bfd_header_little_endian),
345 (bfd_get_file_flags, bfd_applicable_file_flags),
346 (bfd_applicable_section_flags, bfd_has_map, bfd_is_thin_archive),
347 (bfd_valid_reloc_types, bfd_usrdata, bfd_get_start_address),
348 (bfd_get_symcount, bfd_get_outsymbols, bfd_count_sections),
349 (bfd_get_dynamic_symcount, bfd_get_symbol_leading_char): Delete.
350 * bfd/bfd.c (bfd_get_filename, bfd_get_cacheable, bfd_get_format),
351 (bfd_get_file_flags, bfd_get_start_address, bfd_get_symcount),
352 (bfd_get_dynamic_symcount, bfd_get_outsymbols, bfd_count_sections),
353 (bfd_has_map, bfd_is_thin_archive, bfd_set_thin_archive),
354 (bfd_usrdata, bfd_set_usrdata): New inline functions.
355 * targets.c (bfd_get_target, bfd_get_flavour),
356 (bfd_applicable_file_flags, bfd_family_coff, bfd_big_endian),
357 (bfd_little_endian, bfd_header_big_endian),
358 (bfd_header_little_endian, bfd_applicable_section_flags),
359 (bfd_get_symbol_leading_char): New inline functions.
360 * bfd-in2.h: Regenerate.
362 2019-09-20 Alan Modra <amodra@gmail.com>
364 * elf64-ppc.c (ppc64_glibc_dynamic_reloc): New function.
365 (ppc64_elf_relocate_section): Warn if emitting unsupported dynamic
368 2019-09-18 Alan Modra <amodra@gmail.com>
370 * bfd-in.h (bfd_get_section_name, bfd_get_section_vma),
371 (bfd_get_section_lma, bfd_get_section_alignment),
372 (bfd_get_section_size, bfd_get_section_flags),
373 (bfd_get_section_userdata): Delete.
374 (bfd_section_name, bfd_section_size, bfd_section_vma),
375 (bfd_section_lma, bfd_section_alignment): Lose bfd parameter.
376 (bfd_section_flags, bfd_section_userdata): New.
377 (bfd_is_com_section): Rename parameter.
378 * section.c (bfd_set_section_userdata, bfd_set_section_vma),
379 (bfd_set_section_alignment, bfd_set_section_flags, bfd_rename_section),
380 (bfd_set_section_size): Delete bfd parameter, rename section parameter.
381 (bfd_set_section_lma): New.
382 * bfd-in2.h: Regenerate.
383 * mach-o.c (bfd_mach_o_init_section_from_mach_o): Delete bfd param,
385 * aoutx.h, * bfd.c, * coff-alpha.c, * coff-arm.c, * coff-mips.c,
386 * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c,
387 * compress.c, * ecoff.c, * elf-eh-frame.c, * elf-hppa.h,
388 * elf-ifunc.c, * elf-m10200.c, * elf-m10300.c, * elf-properties.c,
389 * elf-s390-common.c, * elf-vxworks.c, * elf.c, * elf32-arc.c,
390 * elf32-arm.c, * elf32-avr.c, * elf32-bfin.c, * elf32-cr16.c,
391 * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-csky.c,
392 * elf32-d10v.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c,
393 * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c,
394 * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c, * elf32-m32c.c,
395 * elf32-m32r.c, * elf32-m68hc1x.c, * elf32-m68k.c, * elf32-mcore.c,
396 * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c,
397 * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c,
398 * elf32-nios2.c, * elf32-or1k.c, * elf32-ppc.c, * elf32-pru.c,
399 * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c,
400 * elf32-score7.c, * elf32-sh.c, * elf32-spu.c, * elf32-tic6x.c,
401 * elf32-tilepro.c, * elf32-v850.c, * elf32-vax.c, * elf32-visium.c,
402 * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c,
403 * elf64-bpf.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mmix.c,
404 * elf64-ppc.c, * elf64-s390.c, * elf64-sparc.c, * elf64-x86-64.c,
405 * elflink.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c,
406 * elfxx-aarch64.c, * elfxx-mips.c, * elfxx-sparc.c,
407 * elfxx-tilegx.c, * elfxx-x86.c, * i386msdos.c, * linker.c,
408 * mach-o.c, * mmo.c, * opncls.c, * pdp11.c, * pei-x86_64.c,
409 * peicode.h, * reloc.c, * section.c, * syms.c, * vms-alpha.c,
410 * xcofflink.c: Update throughout for bfd section macro and function
413 2019-09-18 Alan Modra <amodra@gmail.com>
415 * bfd-in.h (bfd_asymbol_section): Rename from bfd_get_section.
416 (bfd_get_output_section): Delete.
417 (bfd_asymbol_base): Delete.
418 (bfd_asymbol_section, bfd_asymbol_value, bfd_asymbol_name),
419 (bfd_asymbol_bfd, bfd_asymbol_flavour): Tidy.
420 (bfd_set_asymbol_name): New macro.
421 * bfd-in2.h: Regenerate.
422 * aout-cris.c: Update throughout to use bfd_asymbol_section.
424 * cofflink.c: Likewise.
425 * dwarf2.c: Likewise.
428 * elf32-arm.c: Likewise.
429 * elf32-mips.c: Likewise.
430 * elf32-score.c: Likewise.
431 * elf32-score7.c: Likewise.
432 * elfn32-mips.c: Likewise.
433 * elfnn-aarch64.c: Likewise.
434 * elfxx-mips.c: Likewise.
435 * linker.c: Likewise.
437 * elf64-mmix.c (mmix_elf_reloc): Part expand bfd_get_output_section.
439 2019-09-18 Simon Marchi <simon.marchi@polymtl.ca>
441 * Makefile.in: Re-generate.
442 * configure: Re-generate.
443 * doc/Makefile.in: Re-generate.
445 2019-09-18 Alan Modra <amodra@gmail.com>
447 * aoutx.h (slurp_symbol_table): Don't set symcount using bfd_get
449 * pdp11.c (slurp_symbol_table): Likewise.
450 * som.c (som_slurp_symbol_table): Likewise.
451 * coff-ppc.c (ppc_bfd_coff_final_link): Likewise.
452 * coffcode.h (coff_slurp_symbol_table): Likewise.
453 * cofflink.c (_bfd_coff_final_link): Likewise.
454 * ecoff.c (ecoff_slurp_symbolic_header): Likewise.
455 (_bfd_ecoff_slurp_symbolic_info): Likewise.
456 (_bfd_ecoff_slurp_symbol_table): Likewise.
457 (_bfd_ecoff_bfd_final_link): Likewise.
458 * elf.c (_bfd_elf_canonicalize_symtab): Likewise.
459 * elflink.c (elf_link_output_symstrtab): Likewise.
460 (bfd_elf_final_link): Likewise.
461 * peicode.h (pe_ILF_build_a_bfd): Likewise.
462 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
463 * aoutx.h (some_aout_object_p, slurp_symbol_table): Don't set
464 start_address or symcount using bfd_get macros.
465 * coffgen.c (coff_real_object_p): Likewise.
466 * pdp11.c (some_aout_object_p, slurp_symbol_table): Likewise.
467 * som.c (som_object_setup, som_slurp_symbol_table): Likewise.
468 * elfcore.h (elf_core_file_p): Don't set start_address using
470 * elf.c (_bfd_elf_canonicalize_dynamic_symtab): Don't set dynsymcount
472 * bfd.c (bfd_set_file_flags): Don't set flags using bfd_get macro.
473 * linker.c (bfd_generic_link_read_symbols): Don't set outsymbols
474 or symcount using bfd_get macros.
475 (_bfd_generic_final_link, generic_add_output_symbol): Likewise.
476 * syms.c (bfd_set_symtab): Likewise.
477 * vms-alpha.c (alpha_vms_bfd_final_link): Likewise.
478 * archive.c (do_slurp_bsd_armap): Don't set has_armap using
480 (do_slurp_coff_armap, bfd_slurp_armap): Likewise.
481 * archive64.c (_bfd_archive_64_bit_slurp_armap): Likewise.
482 * coff-rs6000.c (_bfd_xcoff_slurp_armap): Likewise.
483 * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
484 * ecoff.c (_bfd_ecoff_slurp_armap): Likewise.
485 * som.c (som_slurp_armap): Likewise.
487 2019-09-18 Alan Modra <amodra@gmail.com>
489 * archures.c (bfd_get_arch): Make param const.
490 (bfd_get_mach, bfd_arch_bits_per_byte): Likewise.
491 (bfd_arch_bits_per_address, bfd_octets_per_byte): Likewise.
492 * bfd-in2.h: Regenerate.
494 2019-09-18 Alan Modra <amodra@gmail.com>
496 * bfd-in.h (carsym.name): Make const.
497 * reloc.c (struct reloc_howto_struct.name): Likewise.
498 * targets.c (bfd_target.name): Likewise.!
499 * bfd.c (bfd_get_sign_extend_vma): Make variable const.
500 * som.c (som_bfd_fill_in_ar_symbols): Use an intermediary variable
501 when setting carsym.name.
502 * bfd-in2.h: Regenerate.
504 2019-09-18 Alan Modra <amodra@gmail.com>
506 * mach-o.c (bfd_mach_o_fat_member_init): Likewise. Replace
507 xstrdup and xmalloc with bfd_strdup and bfd_malloc. Return an
508 error status. Adjust calls.
509 * vms-lib.c (_bfd_vms_lib_get_module): Test mhd->id earlier.
510 Close bfd on failure. Replace xstrdup/bfd_alloc use with
511 bfd_malloc. Use bfd_set_filename.
513 2019-09-18 Alan Modra <amodra@gmail.com>
515 * elf64-ppc.c (must_be_dyn_reloc): Return 0 for TOC16 relocs.
516 (ppc64_elf_check_relocs): Support dynamic/copy relocs for TOC16.
517 (ppc64_elf_adjust_dynamic_symbol): Don't keep dynamic reloc when
518 needs_copy even if all relocs are in rw sections.
519 (dec_dynrel_count): Handle TOC16 relocs.
520 (ppc64_elf_relocate_section): Support dynamic relocs for TOC16.
521 (ppc64_elf_finish_dynamic_symbol): Adjust to handle needs_copy
524 2019-09-16 Phil Blundell <pb@pbcl.net>
526 * version.m4: Set version to 2.33.50.
527 * Makefile.in, configure, doc/Makefile.in: Regenerated.
529 2019-09-11 Tom Tromey <tom@tromey.com>
531 * opncls.c (bfd_set_filename): New function.
532 * bfd-in2.h: Regenerate.
534 2019-09-11 Alan Modra <amodra@gmail.com>
536 * targets.c (struct bfd_target): Add _bfd_group_name.
537 (BFD_JUMP_TABLE): Likewise.
538 * coffgen.c (bfd_coff_group_name): New function.
539 * elf.c (bfd_elf_group_name): New function.
540 * linker.c (_bfd_nolink_bfd_group_name): New function.
541 * section.c (bfd_generic_group_name): New function.
542 * elf-bfd.h (bfd_elf_group_name): Declare.
543 * libbfd-in.h (_bfd_nolink_bfd_group_name): Declare.
544 * libcoff-in.h (bfd_coff_group_name): Declare.
545 * aout-target.h (MY_bfd_group_name): Define.
546 * aout-tic30.c (MY_bfd_group_name): Define.
547 * bfd.c (bfd_group_name): Define.
548 * binary.c (binary_bfd_group_name): Define.
549 * coff-alpha.c (_bfd_ecoff_bfd_group_name): Define.
550 * coff-mips.c (_bfd_ecoff_bfd_group_name): Define.
551 * coff-rs6000.c (_bfd_xcoff_bfd_group_name): Define.
552 * coffcode.h (coff_bfd_group_name): Define.
553 * elfxx-target.h (bfd_elfNN_bfd_group_name): Define.
554 * i386msdos.c (msdos_bfd_group_name): Define.
555 * ihex.c (ihex_bfd_group_name): Define.
556 * mach-o-target.c (bfd_mach_o_bfd_group_name): Define.
557 * mmo.c (mmo_bfd_group_name): Define.
558 * pef.c (bfd_pef_bfd_group_name): Define.
559 * plugin.c (bfd_plugin_bfd_group_name): Define.
560 * ppcboot.c (ppcboot_bfd_group_name): Define.
561 * som.c (som_bfd_group_name): Define.
562 * srec.c (srec_bfd_group_name): Define.
563 * tekhex.c (tekhex_bfd_group_name): Define.
564 * verilog.c (verilog_bfd_group_name): Define.
565 * vms-alpha.c (vms_bfd_group_name, alpha_vms_bfd_group_name): Define.
566 * xsym.c (bfd_sym_bfd_group_name): Define.
567 * coff64-rs6000.c (rs6000_xcoff64_vec): Init new field.
568 (rs6000_xcoff64_aix_vec): Likewise.
569 * bfd-in2.h: Regenerate.
570 * libbfd.h: Regenerate.
571 * libcoff.h: Regenerate.
573 2019-09-10 Nick Clifton <nickc@redhat.com>
576 * archures.c (bfd_arch_info_type): Add max_reloc_offset_into_insn
578 (bfd_default_arch_struct): Initialise the new field.
579 * bfd-in2.h: Regenerate.
580 * cpu-aarch64.c: Initialise the new field.
581 * cpu-alpha.c: Likewise.
582 * cpu-arc.c: Likewise.
583 * cpu-arm.c: Likewise.
584 * cpu-avr.c: Likewise.
585 * cpu-bfin.c: Likewise.
586 * cpu-bpf.c: Likewise.
587 * cpu-cr16.c: Likewise.
588 * cpu-cr16c.c: Likewise.
589 * cpu-cris.c: Likewise.
590 * cpu-crx.c: Likewise.
591 * cpu-csky.c: Likewise.
592 * cpu-d10v.c: Likewise.
593 * cpu-d30v.c: Likewise.
594 * cpu-dlx.c: Likewise.
595 * cpu-epiphany.c: Likewise.
596 * cpu-fr30.c: Likewise.
597 * cpu-frv.c: Likewise.
598 * cpu-ft32.c: Likewise.
599 * cpu-h8300.c: Likewise.
600 * cpu-hppa.c: Likewise.
601 * cpu-i386.c: Likewise.
602 * cpu-ia64.c: Likewise.
603 * cpu-iamcu.c: Likewise.
604 * cpu-ip2k.c: Likewise.
605 * cpu-iq2000.c: Likewise.
606 * cpu-k1om.c: Likewise.
607 * cpu-l1om.c: Likewise.
608 * cpu-lm32.c: Likewise.
609 * cpu-m10200.c: Likewise.
610 * cpu-m10300.c: Likewise.
611 * cpu-m32c.c: Likewise.
612 * cpu-m32r.c: Likewise.
613 * cpu-m68hc11.c: Likewise.
614 * cpu-m68hc12.c: Likewise.
615 * cpu-m68k.c: Likewise.
616 * cpu-m9s12x.c: Likewise.
617 * cpu-m9s12xg.c: Likewise.
618 * cpu-mcore.c: Likewise.
619 * cpu-mep.c: Likewise.
620 * cpu-metag.c: Likewise.
621 * cpu-microblaze.c: Likewise.
622 * cpu-mips.c: Likewise.
623 * cpu-mmix.c: Likewise.
624 * cpu-moxie.c: Likewise.
625 * cpu-msp430.c: Likewise.
626 * cpu-mt.c: Likewise.
627 * cpu-nds32.c: Likewise.
628 * cpu-nfp.c: Likewise.
629 * cpu-nios2.c: Likewise.
630 * cpu-ns32k.c: Likewise.
631 * cpu-or1k.c: Likewise.
632 * cpu-pdp11.c: Likewise.
633 * cpu-pj.c: Likewise.
634 * cpu-plugin.c: Likewise.
635 * cpu-powerpc.c: Likewise.
636 * cpu-pru.c: Likewise.
637 * cpu-riscv.c: Likewise.
638 * cpu-rl78.c: Likewise.
639 * cpu-rs6000.c: Likewise.
640 * cpu-rx.c: Likewise.
641 * cpu-s12z.c: Likewise.
642 * cpu-s390.c: Likewise.
643 * cpu-score.c: Likewise.
644 * cpu-sh.c: Likewise.
645 * cpu-sparc.c: Likewise.
646 * cpu-spu.c: Likewise.
647 * cpu-tic30.c: Likewise.
648 * cpu-tic4x.c: Likewise.
649 * cpu-tic54x.c: Likewise.
650 * cpu-tic6x.c: Likewise.
651 * cpu-tic80.c: Likewise.
652 * cpu-tilegx.c: Likewise.
653 * cpu-tilepro.c: Likewise.
654 * cpu-v850.c: Likewise.
655 * cpu-v850_rh850.c: Likewise.
656 * cpu-vax.c: Likewise.
657 * cpu-visium.c: Likewise.
658 * cpu-wasm32.c: Likewise.
659 * cpu-xc16x.c: Likewise.
660 * cpu-xgate.c: Likewise.
661 * cpu-xstormy16.c: Likewise.
662 * cpu-xtensa.c: Likewise.
663 * cpu-z80.c: Likewise.
664 * cpu-z8k.c: Likewise.
666 2019-09-09 Phil Blundell <pb@pbcl.net>
668 binutils 2.33 branch created.
670 2019-09-06 Alan Modra <amodra@gmail.com>
672 * aout-target.h (object_p): Formatting.
673 * bfd-in.h (bfd_get_filename): Don't cast to char*.
674 * corefile.c (generic_core_file_matches_executable_p): Constify
675 variables and remove cast.
676 * bfd-in2.h: Regenerate.
678 2019-09-05 Alan Modra <amodra@gmail.com>
680 * elf64-ppc.c (ppc64_elf_check_relocs): Interpret an addend in
681 GOT_PCREL and PLT_PCREL relocs as affecting the value stored
682 in the GOT/PLT entry rather than affecting the offset to that
684 (ppc64_elf_edit_toc, ppc64_elf_relocate_section): Likewise.
686 2019-09-05 Alan Modra <amodra@gmail.com>
688 * elf64-ppc.c (xlate_pcrel_opt): Handle prefix loads and stores
689 in second instruction.
690 (ppc64_elf_relocate_section): Likewise.
692 2019-09-05 Alan Modra <amodra@gmail.com>
695 * libbfd-in.h (bfd_strdup): New inline function.
696 * archive.c (_bfd_get_elt_at_filepos): Use bfd_strdup. Close
698 * elfcode.h (_bfd_elf_bfd_from_remote_memory): Use bfd_strdup.
699 * opncls.c (bfd_fopen): Use bfd_strdup. Close fd and stream
701 (bfd_openstreamr): Use bfd_strdup.
702 (bfd_openr_iovec, bfd_openw, bfd_create): Likewise.
703 * plugin.c (try_load_plugin): Use bfd_malloc.
704 * libbfd.h: Regenerate.
706 2019-09-02 Alan Modra <amodra@gmail.com>
709 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Free debug_filename
711 (read_alt_indirect_string): Likewise.
712 (read_alt_indirect_ref): Likewise.
714 2019-08-31 Jim Wilson <jimw@sifive.com>
717 * elfnn-riscv.c (riscv_elf_create_dynamic_sections): Add SEC_LOAD,
718 SEC_DATA, and SEC_HAS_CONTENTS to .tdata.dyn section.
720 2019-08-30 Jim Wilson <jimw@sifive.com>
722 * elfnn-riscv.c (riscv_elf_relocate_section): For unresolvable reloc
723 error, call bfd_set_error, set ret to FALSE, and goto out label.
725 2019-08-30 H.J. Lu <hongjiu.lu@intel.com>
728 * archive.c (_bfd_get_elt_at_filepos): Copy BFD_COMPRESS,
729 BFD_DECOMPRESS and BFD_COMPRESS_GABI flags for thin archive.
731 2019-08-29 Alan Modra <amodra@gmail.com>
734 * elf32-ppc.c (ppc_elf_check_relocs): Call bad_shared_reloc
735 when !bfd_link_executable for R_PPC_EMB_SDA2I16 and
736 R_PPC_EMB_SDA2REL. Don't call bad_shared_reloc for any other
739 2019-08-29 Alan Modra <amodra@gmail.com>
741 * elf64-ppc.c (xlate_pcrel_opt): Add poff parameter. Allow offset
742 on second insn, return it in poff.
743 (ppc64_elf_relocate_section): Add offset to paddi addend for
746 2019-08-28 Jim Wilson <jimw@sifive.com>
748 * elfnn-riscv.c (_bfd_riscv_relax_lui): Add check to exclude abs
749 section when setting max_alignment. Update comment.
750 (_bfd_riscv_relax_pc): Likewise.
752 2019-08-29 Alan Modra <amodra@gmail.com>
755 * bfd.c (struct bfd): Add no_element_cache.
756 * archive.c (_bfd_get_elt_at_filepos): Don't add element to
757 archive cache when no_element_cache.
758 (bfd_generic_archive_p): Set no_element_cache when opening first
759 element to check format. Close first element too.
760 (do_slurp_bsd_armap): Don't zero ardata->cache here.
761 * bfd-in2.h: Regenerate.
763 2019-08-24 Alan Modra <amodra@gmail.com>
765 * elf64-ppc.c (ppc64_elf_edit_toc): Exclude undefined weak
766 symbols from GOT optimisation.
768 2019-08-23 Stafford Horne <shorne@gmail.com>
770 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Use correct value for
773 2019-08-23 Nick Clifton <nickc@redhat.com>
776 * elf.c (bfd_section_from_shdr): Issue an informative warning
777 message and continue processing other sections after encountering
778 a reloc section for a section which already has other relocs
781 2019-08-23 Alan Modra <amodra@gmail.com>
784 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Don't exit
785 on error without freeing plts[] contents.
787 2019-08-22 Dennis Zhang <dennis.zhang@arm.com>
789 * cpu-arm.c: New entries for Cortex-M35P, Cortex-A77, Cortex-A76AE.
791 2019-08-22 Nick Clifton <nickc@redhat.com>
794 * pei-x86_64.c (pex64_xdata_print_uwd_codes): Add checks before
795 reading data from extra records.
797 2019-08-22 Tamar Christina <tamar.christina@arm.com>
800 * elfnn-aarch64.c (aarch64_relocate): Handle weak TLS and undefined TLS.
801 Also Pass input_bfd to _bfd_aarch64_elf_resolve_relocation.
802 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Use it.
803 * elfxx-aarch64.h (_bfd_aarch64_elf_resolve_relocation): Emit warning
806 2019-08-22 Alan Modra <amodra@gmail.com>
808 * elf32-arm.c (cmse_scan): Don't use ARM_GET_SYM_CMSE_SPCL,
809 instead recognize CMSE_PREFIX in symbol name.
810 (elf32_arm_gc_mark_extra_sections): Likewise.
811 (elf32_arm_filter_cmse_symbols): Don't test ARM_GET_SYM_CMSE_SPCL.
812 (elf32_arm_swap_symbol_in): Don't invoke ARM_SET_SYM_CMSE_SPCL.
814 2019-08-20 Dennis Zhang <dennis.zhang@arm.com>
816 * cpu-aarch64.c: New entries for Cortex-A34, Cortex-A65,
817 Cortex-A77, cortex-A65AE, and Cortex-A76AE.
819 2019-08-20 Tamar Christina <tamar.christina@arm.com>
821 * elf32-arm.c (elf32_thumb2_plt_entry, elf32_arm_plt_thumb_stub,
822 elf32_arm_stub_long_branch_v4t_thumb_thumb,
823 elf32_arm_stub_long_branch_v4t_thumb_arm,
824 elf32_arm_stub_short_branch_v4t_thumb_arm,
825 elf32_arm_stub_long_branch_v4t_thumb_arm_pic,
826 elf32_arm_stub_long_branch_v4t_thumb_thumb_pic,
827 elf32_arm_stub_long_branch_v4t_thumb_tls_pic): Change nop to branch to
828 previous instruction.
830 2019-08-19 Tom Tromey <tromey@adacore.com>
832 * dwarf2.c (_bfd_dwarf2_find_symbol_bias): Create hash table
835 2019-08-19 Alan Modra <amodra@gmail.com>
837 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Rename has_gotrel
839 (struct _ppc64_elf_section_data): Likewise.
840 (ppc64_elf_check_relocs): Set has_optrel for more relocs.
841 (ppc64_elf_edit_toc): Do ha/lo insn checks in GOT loop rather
842 than TOC loop. Check PLT16 insns too.
844 2019-08-16 H.J. Lu <hongjiu.lu@intel.com>
847 * elf64-x86-64.c (elf_x86_64_check_relocs): Move PIC check for
848 PC-relative relocations back to ...
849 (elf_x86_64_relocate_section): Here.
851 2019-08-16 Martin Liska <mliska@suse.cz>
854 * elflink.c: Report error only for not relocatable.
855 * linker.c (_bfd_generic_link_add_one_symbol): Do not handle
856 here lto_slim_object as it's handled in caller.
858 2019-08-16 Alan Modra <amodra@gmail.com>
860 * elf32-ppc.c (ppc_elf_relocate_section): Optimize unaligned relocs.
862 2019-08-15 Jim Wilson <jimw@sifive.com>
864 * elfnn-riscv.c (perform_relocation) <R_RISCV_RVC_LUI>: If
865 RISCV_CONST_HIGH_PART (value) is zero, then convert c.lui instruction
866 to c.li instruction, and use ENCODE_RVC_IMM to set value.
868 2019-08-15 Tom Tromey <tromey@adacore.com>
870 * dwarf2.c (scan_unit_for_symbols): Check for end of CU, not end
873 2019-08-14 Alan Modra <amodra@gmail.com>
876 * dwarf2.c (stash_comp_unit): New function, extracted from..
877 (_bfd_dwarf2_find_nearest_line): ..here.
878 (find_abstract_instance): Parse comp units and decode line info
881 2019-08-14 Alan Modra <amodra@gmail.com>
883 * dwarf2.c (comp_unit_maybe_decode_line_info): Declare.
884 (comp_unit_find_nearest_line): Use it here..
885 (_bfd_dwarf2_find_symbol_bias): ..and here.
887 2019-08-14 Alan Modra <amodra@gmail.com>
889 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Remove addr_size parameter.
890 * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype.
891 * coffgen.c (coff_find_nearest_line_with_names): Adjust
892 _bfd_dwarf2_find_nearest_line calls.
893 * elf.c (_bfd_elf_find_nearest_line, _bfd_elf_find_line): Likewise.
894 * elf32-arm.c (elf32_arm_find_nearest_line): Likewise.
895 * elf64-alpha.c (elf64_alpha_find_nearest_line): Likewise.
896 * elfnn-aarch64.c (elfNN_aarch64_find_nearest_line): Likewise.
897 * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): Likewise.
898 * mach-o.c (bfd_mach_o_find_nearest_line): Likewise.
899 * libbfd.h: Regenerate.
901 2019-08-09 Mihailo Stojanovic <mihailo.stojanovic@rt-rk.com>
903 * elf-bfd.h (struct elf_backend_data): New members.
904 * elflink.c (_bfd_elf_link_create_dynamic_sections): Create
905 .gnu.hash section if necessary.
906 (struct collect_gnu_hash_codes): New member.
907 (elf_gnu_hash_process_symidx): New function name.
908 (elf_renumber_gnu_hash_syms): Ignore local and undefined
909 symbols. Record xlat location for every symbol which should have
911 (bfd_elf_size_dynamic_sections): Add DT_GNU_HASH dynamic tag to
912 dynamic section if necessary.
913 (GNU_HASH_SECTION_NAME): New define.
914 (bfd_elf_size_dynsym_hash_dynstr): Get .MIPS.xhash section.
915 Update the section size info.
916 * elfxx-mips.c (struct mips_elf_hash_sort_data): New members.
917 (struct mips_elf_link_hash_entry): New member.
918 (mips_elf_link_hash_newfunc): Initialize .MIPS.xhash translation
920 (mips_elf_sort_hash_table): Initialize the pointer to the
922 (mips_elf_sort_hash_table_f): Populate the .MIPS.xhash
923 translation table entry with the symbol dynindx.
924 (_bfd_mips_elf_section_from_shdr): Add SHT_MIPS_XHASH.
925 (_bfd_mips_elf_fake_sections): Initialize .MIPS.xhash section
927 (_bfd_mips_elf_create_dynamic_sections): Create .MIPS.xhash
929 (_bfd_mips_elf_size_dynamic_sections): Add DT_MIPS_XHASH tag to
931 (_bfd_mips_elf_finish_synamic_sections): Add DT_MIPS_XHASH.
932 (_bfd_mips_elf_final_write_processing): Set .MIPS.xhash section
934 (_bfd_mips_elf_get_target_dtag): Get DT_MIPS_XHASH tag.
935 (MIPS_LIBC_ABI_XHASH): New ABI version enum value.
936 (_bfd_mips_post_process_headers): Mark the ABI version as
937 MIPS_LIBC_ABI_XHASH if there exists a .MIPS.xhash section,
938 but not a .hash section.
939 (_bfd_mips_elf_record_xhash_symbol): New function. Record a
940 position in the translation table, associated with the hash
942 * elfxx-mips.h (literal_reloc_p): Define
943 elf_backend_record_xhash_symbol backend hook.
944 * elfxx-target.h: Initialize elf_backend_record_xhash_symbol
947 2019-08-07 Jose E. Marchesi <jose.marchesi@oracle.com>
949 * elf64-bpf.c (bpf_elf_relocate_section): New function.
950 (bpf_elf_insn_disp_reloc): Delete function.
951 (elf_backend_relocate_section): Define.
953 2019-08-07 Alan Modra <amodra@gmail.com>
956 * archive64.c (_bfd_archive_64_bit_slurp_armap): Properly check
957 for overflow in expressions involving nsymz.
959 2019-08-01 Ilia Diachkov <ilia.diachkov@optimitech.com>
961 * elfnn-riscv.c (_bfd_riscv_relax_lui): Set lui relax safety area to
962 two pages in relro presence.
964 2019-08-01 Max Filippov <jcmvbkbc@gmail.com>
966 * elf32-xtensa.c (insn_num_slots, get_rsr_lend_opcode)
967 (get_wsr_lbeg_opcode): New functions.
968 (check_loop_aligned): Detect relaxed loops and adjust loop_len
969 and insn_len for the first actual instruction of the loop.
971 2019-07-30 Alan Modra <amodra@gmail.com>
974 * bfd.c (struct bfd): Add lto_slim_object flag.
975 * bfd-in2.h: Regenerate.
977 2019-07-29 Martin Liska <mliska@suse.cz>
980 * archive.c (_bfd_compute_and_write_armap): Come up with
981 report_plugin_err variable.
982 * bfd-in2.h (struct bfd): Add lto_slim_object flag.
983 * elf.c (struct lto_section): New.
984 (_bfd_elf_make_section_from_shdr): Parse content of
985 .gnu_lto_.lto section.
986 * elflink.c: Report error for a missing LTO plugin.
987 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
989 2019-07-28 Alan Modra <amodra@gmail.com>
993 * elflink.c (elf_link_add_object_symbols): Report an informative
994 error on finding local symbols with index equal or greater than
995 symbol table sh_info. Correct comment. Allow such symbols in
996 dynamic objects. Abort on NULL section for symbol.
998 2019-07-26 Alan Modra <amodra@gmail.com>
1000 * elf-bfd.h (struct output_elf_obj_tdata): Delete "linker" field.
1001 (elf_linker): Don't define.
1002 * elflink.c (bfd_elf_final_link): Don't set elf_linker.
1004 2019-07-25 YunQiang Su <syq@debian.org>
1007 * elfxx-mips.c (mips_set_isa_flags): Default to MIPS 3 for 64-bit
1010 2019-07-24 Claudiu Zissulescu <claziss@synopsys.com>
1012 * elf32-arc.c (bfd_get_32_me): Add a small description, fix
1014 (reloc_type_to_name): Fix formating.
1015 (arc_elf_object_p): Likewise.
1016 (debug_arc_reloc): Likewise.
1017 (arc_do_relocation): Likewise.
1019 2019-07-24 Claudiu Zissulescu <claziss@synopsys.com>
1021 * elf32-arc.c (bfd_get_32_me): New function.
1022 (bfd_put_32_me): Likewise.
1023 (arc_elf_relax_section): Likewise.
1024 (bfd_elf32_bfd_relax_section): Define.
1026 2019-07-24 Alan Modra <amodra@gmail.com>
1028 * elf-bfd.h (struct elf_backend_data): Return bfd_boolean from
1029 elf_backend_final_write_processing, don't pass linker arg.
1030 (_bfd_elf_final_write_processing): Update prototype.
1031 * elf.c (_bfd_elf_write_object_contents): Adjust call.
1032 (_bfd_elf_final_write_processing): Return error on incompatible
1033 OSABI and has_gnu_osabi. Remove linker arg.
1034 * elf-nacl.h (nacl_final_write_processing): Update prototype.
1035 * elf-vxworks.h (elf_vxworks_final_write_processing): Likewise.
1036 * elfxx-mips.h (_bfd_mips_final_write_processing): Likewise.
1037 (_bfd_mips_elf_final_write_processing): Likewise.
1038 * elf-hppa.h (elf_hppa_final_write_processing): Return status
1039 and remove linker arg.
1040 * elf-m10300.c (_bfd_mn10300_elf_final_write_processing): Likewise.
1041 * elf-nacl.c (nacl_final_write_processing): Likewise.
1042 * elf-vxworks.c (elf_vxworks_final_write_processing): Likewise.
1043 * elf32-arc.c (arc_elf_final_write_processing): Likewise.
1044 * elf32-arm.c (arm_final_write_processing): Likewise.
1045 (elf32_arm_final_write_processing): Likewise.
1046 (elf32_arm_nacl_final_write_processing): Likewise.
1047 (elf32_arm_vxworks_final_write_processing): Likewise.
1048 * elf32-avr.c (bfd_elf_avr_final_write_processing): Likewise.
1049 * elf32-bfin.c (elf32_bfin_final_write_processing): Likewise.
1050 * elf32-cr16.c (_bfd_cr16_elf_final_write_processing): Likewise.
1051 * elf32-cris.c (cris_elf_final_write_processing): Likewise.
1052 * elf32-h8300.c (elf32_h8_final_write_processing): Likewise.
1053 * elf32-lm32.c (lm32_elf_final_write_processing): Likewise.
1054 * elf32-m32r.c (m32r_elf_final_write_processing): Likewise.
1055 * elf32-m68k.c (elf_m68k_final_write_processing): Likewise.
1056 * elf32-mips.c (mips_vxworks_final_write_processing): Likewise.
1057 * elf32-msp430.c (bfd_elf_msp430_final_write_processing): Likewise.
1058 * elf32-nds32.c (nds32_elf_final_write_processing): Likewise.
1059 * elf32-or1k.c (or1k_elf_final_write_processing): Likewise.
1060 * elf32-pj.c (pj_elf_final_write_processing): Likewise.
1061 * elf32-ppc.c (ppc_final_write_processing): Likewise.
1062 (ppc_elf_final_write_processing): Likewise.
1063 (ppc_elf_vxworks_final_write_processing): Likewise.
1064 * elf32-sparc.c (sparc_final_write_processing): Likewise.
1065 (elf32_sparc_final_write_processing): Likewise.
1066 (elf32_sparc_vxworks_final_write_processing): Likewise.
1067 * elf32-v850.c (v850_elf_final_write_processing): Likewise.
1068 * elf32-xc16x.c (elf32_xc16x_final_write_processing): Likewise.
1069 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
1070 * elf64-ia64-vms.c (elf64_vms_final_write_processing): Likewise.
1071 * elfnn-ia64.c (elfNN_ia64_final_write_processing): Likewise.
1072 * elfxx-mips.c (_bfd_mips_final_write_processing): Likewise.
1073 (_bfd_mips_elf_final_write_processing): Likewise.
1075 2019-07-24 Alan Modra <amodra@gmail.com>
1077 * elf-vxworks.c (elf_vxworks_final_write_processing): Don't return
1079 * elf32-arc.c (arc_elf_final_write_processing): Likewise.
1080 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
1082 2019-07-24 Alan Modra <amodra@gmail.com>
1084 * elf32-visium.c (visium_elf_post_process_headers): Don't set
1085 EI_OSABI header byte here.
1086 (ELF_OSABI): Define.
1088 2019-07-23 Alan Modra <amodra@gmail.com>
1090 * elf-bfd.h (enum elf_gnu_osabi): Add elf_gnu_osabi_mbind.
1091 * elf.c (_bfd_elf_make_section_from_shdr): Set elf_gnu_osabi_mbind.
1092 (get_program_header_size): Formatting. Only test SH_GNU_MBIND
1093 when elf_gnu_osabi_mbind is set.
1094 (_bfd_elf_map_sections_to_segments): Likewise.
1095 (_bfd_elf_init_private_section_data): Likewise.
1096 (_bfd_elf_final_write_processing): Update comment.
1097 * elf64-hppa.c (elf64_hppa_special_sections): Move .tbss entry.
1098 (elf_backend_special_sections): Define without .tbss for linux.
1100 2019-07-23 Alan Modra <amodra@gmail.com>
1102 * elf-bfd.h (enum elf_gnu_osabi): Rename from elf_gnu_symbols.
1103 Remove none, any, all enums.
1104 (struct elf_obj_tdata): Rename has_gnu_symbols field to has_gnu_osabi.
1105 (_bfd_elf_final_write_processing): Declare.
1106 * elf.c (_bfd_elf_write_object_contents): Unconditionally call
1107 elf_backend_final_write_processing.
1108 (_bfd_elf_post_process_headers): Move body of function to..
1109 (_bfd_elf_final_write_processing): ..here, but set EI_OSABI byte
1110 only when not already set. Adjust for rename.
1111 * elfxx-target.h (elf_backend_final_write_processing): Default to
1112 _bfd_elf_final_write_processing.
1113 * elf-hppa.h (elf_hppa_final_write_processing): Call
1114 _bfd_elf_final_write_processing.
1115 * elf-m10300.c (_bfd_mn10300_elf_final_write_processing): Likewise.
1116 * elf-nacl.c (nacl_final_write_processing): Likewise.
1117 * elf-vxworks.c (elf_vxworks_final_write_processing): Likewise.
1118 * elf32-arc.c (arc_elf_final_write_processing): Likewise.
1119 * elf32-avr.c (bfd_elf_avr_final_write_processing): Likewise.
1120 * elf32-bfin.c (elf32_bfin_final_write_processing): Likewise.
1121 * elf32-cr16.c (_bfd_cr16_elf_final_write_processing): Likewise.
1122 * elf32-cris.c (cris_elf_final_write_processing): Likewise.
1123 * elf32-h8300.c (elf32_h8_final_write_processing): Likewise.
1124 * elf32-lm32.c (lm32_elf_final_write_processing): Likewise.
1125 * elf32-m32r.c (m32r_elf_final_write_processing): Likewise.
1126 * elf32-m68k.c (elf_m68k_final_write_processing): Likewise.
1127 * elf32-msp430.c (bfd_elf_msp430_final_write_processing): Likewise.
1128 * elf32-nds32.c (nds32_elf_final_write_processing): Likewise.
1129 * elf32-or1k.c (or1k_elf_final_write_processing): Likewise.
1130 * elf32-pj.c (pj_elf_final_write_processing): Likewise.
1131 * elf32-v850.c (v850_elf_final_write_processing): Likewise.
1132 * elf32-xc16x.c (elf32_xc16x_final_write_processing): Likewise.
1133 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
1134 * elf64-ia64-vms.c (elf64_vms_final_write_processing): Likewise.
1135 * elfnn-ia64.c (elfNN_ia64_final_write_processing): Likewise.
1136 * elf32-arm.c (arm_final_write_processing): Split out from..
1137 (elf32_arm_final_write_processing): ..here. Call
1138 _bfd_elf_final_write_processing.
1139 (elf32_arm_nacl_final_write_processing): Adjust.
1140 * elfxx-mips.c (_bfd_mips_final_write_processing): Split out from..
1141 (_bfd_mips_elf_final_write_processing): ..here. Call
1142 _bfd_elf_final_write_processing.
1143 * elfxx-mips.h (_bfd_mips_final_write_processing): Declare.
1144 * elf32-mips.c (mips_vxworks_final_write_processing): Adjust.
1145 * elf32-ppc.c (ppc_final_write_processing): Split out from..
1146 (ppc_elf_final_write_processing): ..here. Call
1147 _bfd_elf_final_write_processing.
1148 (ppc_elf_vxworks_final_write_processing): Adjust.
1149 * elf32-sparc.c (sparc_final_write_processing): Split out from..
1150 (elf32_sparc_final_write_processing): ..here. Call
1151 _bfd_elf_final_write_processing.
1152 (elf32_sparc_vxworks_final_write_processing): Adjust.
1153 * elf32-d10v.c (elf_backend_final_write_processing): Don't define.
1154 * elf32-d30v.c (elf_backend_final_write_processing): Don't define.
1155 * elf32-m68hc11.c (elf_backend_final_write_processing): Don't define.
1156 * elf32-m68hc12.c (elf_backend_final_write_processing): Don't define.
1157 * elf32-s12z.c (elf_backend_final_write_processing): Don't define.
1158 * elf32-i386.c (elf_i386_check_relocs): Don't set has_gnu_symbols.
1159 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1160 * elflink.c (elf_link_add_object_symbols): Likewise.
1161 (elf_link_output_symstrtab): Set has_gnu_osabi for symbols here
1164 2019-07-23 Omar Majid <omajid@redhat.com>
1166 * coffcode.h (coff_set_arch_mach_hook): Handle I386_APPLE_MAGIC,
1167 I386_FREEBSD_MAGIC, I386_LINUX_MAGIC, I386_NETBSD_MAGIC,
1168 AMD64_APPLE_MAGIC, AMD64_FREEBSD_MAGIC, AMD64_LINUX_MAGIC,
1170 * peXXigen.c: Add comment about source of .NET magic numbers.
1172 2019-07-19 Alan Modra <amodra@gmail.com>
1174 * reloc.c (BFD_RELOC_PPC64_TPREL34, BFD_RELOC_PPC64_DTPREL34),
1175 (BFD_RELOC_PPC64_GOT_TLSGD34, BFD_RELOC_PPC64_GOT_TLSLD34),
1176 (BFD_RELOC_PPC64_GOT_TPREL34, BFD_RELOC_PPC64_GOT_DTPREL34),
1177 (BFD_RELOC_PPC64_TLS_PCREL): New pcrel tls relocs.
1178 * elf64-ppc.c (ppc64_elf_howto_raw): Add howtos for pcrel tls relocs.
1179 (ppc64_elf_reloc_type_lookup): Translate pcrel tls relocs.
1180 (must_be_dyn_reloc, dec_dynrel_count): Add R_PPC64_TPREL64.
1181 (ppc64_elf_check_relocs): Support pcrel tls relocs.
1182 (ppc64_elf_tls_optimize, ppc64_elf_relocate_section): Likewise.
1183 * bfd-in2.h: Regenerate.
1184 * libbfd.h: Regenerate.
1186 2019-07-18 Alan Modra <amodra@gmail.com>
1188 * elf64-ppc.c (ppc64_elf_relocate_section): Don't bother selecting
1189 a TLS section symbol for edited relocs. Tighten TLS symbol/reloc
1192 2019-07-18 Alan Modra <amodra@gmail.com>
1194 * elf64-ppc.c (TLS_EXPLICIT): Define as 256.
1195 (ppc64_elf_check_relocs): Don't store TLS_EXPLICIT even if char
1196 is more than 8 bits.
1197 (ppc64_elf_tls_optimize): Likewise. Make tls_set, tls_clear, and
1198 tls_type vars unsigned int.
1199 (ppc64_elf_relocate_section): Use r_type rather than TLS_EXPLICIT
1200 to select r_type edit.
1202 2019-07-18 Alan Modra <amodra@gmail.com>
1204 * elf32-ppc.c (TLS_GDIE): Rename from TLS_TPRELGD throughout file.
1206 * elf64-ppc.c (TLS_GDIE): Likewise.
1208 2019-07-18 Alan Modra <amodra@gmail.com>
1210 * elf64-ppc.c (ppc64_elf_tls_optimize): Correct test for allowed
1211 range of tp-relative offsets.
1213 2019-07-15 Alan Modra <amodra@gmail.com>
1215 * elflink.c (_bfd_elf_fix_symbol_flags): If the def for an
1216 alias is no longer bfd_link_hash_defined, clear the alias.
1218 2019-07-13 Alan Modra <amodra@gmail.com>
1220 * elflink.c (_bfd_elf_omit_section_dynsym_default): Don't keep
1222 (_bfd_elf_init_1_index_section): Prefer not using TLS sections.
1223 (_bfd_elf_init_2_index_sections): Likewise.
1224 * elf64-ppc.c (ppc64_elf_relocate_section): When emitting dynamic
1225 relocations for local TLS symbols, use STN_UNDEF as the relocation
1227 * elf32-ppc.c (ppc_elf_relocate_section): Likewise, and don't
1228 leave TLS symbol value in the addend.
1230 2019-07-08 Alan Modra <amodra@gmail.com>
1233 * elf32-ppc.c (_bfd_elf_ppc_set_arch): Sanity check .PPC.EMB.apuinfo
1234 size before reading first word.
1236 2019-07-02 Nick Clifton <nickc@redhat.com>
1239 * elf.c (is_debuginfo_file): New function.
1240 (assign_file_positions_for_non_load_sections): Do not warn about
1241 allocated sections outside of loadable segments if they are found
1242 in a debuginfo file.
1243 * elf-bfd.h (is_debuginfo_file): Prototype.
1245 2019-07-02 Nick Clifton <nickc@redhat.com>
1248 * compress.c (bfd_get_full_section_contents): Do not complain
1249 about linker created sections that are larger than the file size.
1251 2019-07-02 Christophe Lyon <christophe.lyon@linaro.org>
1253 * bfd/elf32-arm.c (CMSE_STUB_NAME): New define.
1254 (elf32_arm_get_stub_entry): Do not try to emit long-branch stubs
1256 (arm_dedicated_stub_output_section_name): Use CMSE_STUB_NAME.
1258 2019-07-02 Srinath Parvathaneni <srinath.parvathaneni@arm.com>
1260 * elf32-arm.c (elf32_arm_gc_mark_extra_sections): Mark debug
1261 sections when .text section contain secure entry functions
1264 2019-07-01 Nick Clifton <nickc@redhat.com>
1267 * elf32-arm.c (elf32_arm_update_relocs): Do not include the
1268 section VMA in the offset used to update exidx relocs.
1270 2019-06-28 Nick Clifton <nickc@redhat.com>
1273 * elf.c (_bfd_elf_slurp_version_tables): Check for an excessively
1274 large version reference section.
1275 * compress.c (bfd_get_full_section_contents): Check for an
1276 uncompressed section whose size is larger than the file size.
1278 2019-06-28 Alan Modra <amodra@gmail.com>
1280 * format.c (bfd_check_format_matches): Don't match plugin target
1281 if another target matches. Expand comment.
1282 * targets.c (_bfd_target_vector): Move plugin_vec after all other
1283 non-corefile targets, outside !SELECT_VECS.
1284 * config.bfd: Don't handle targ=plugin here.
1285 * configure.ac: Don't add plugin to enable_targets or handle in
1286 target loop setting selvecs and other target vars.
1287 * configure: Regenerate.
1289 2019-06-26 Nick Clifton <nickc@redhat.com>
1292 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add error
1293 messages for failures.
1294 * mach-o.c (bfd_mach_o_canonicalize_relocs): Set an bfd error code
1295 if returning an error value.
1297 2019-06-25 Jan Beulich <jbeulich@suse.com>
1299 * elf-properties.c (elf_find_and_remove_property): Rename last
1300 parameter. Mention it in comment.
1302 2019-06-24 Ilia Diachkov <ilia.diachkov@optimitech.com>
1304 * elfnn-riscv.c (_bfd_riscv_relax_lui): Delete early exit when
1305 SEC_MERGE or SEC_CODE flags are set.
1306 (_bfd_riscv_relax_section): New local symtype. Set sym_sec and
1307 symtype consistently. Don't include sec_addr (sym_sec) in symval.
1308 Add check for SEC_INFO_TYPE_MERGE and call _bfd_merged_section_offset.
1309 Add sec_addr (sym_sec) after handling merge sections.
1311 2019-06-24 H.J. Lu <hongjiu.lu@intel.com>
1314 * elf-properties.c (elf_merge_gnu_property_list): Remove the
1315 property after reporting property removal.
1317 2019-06-23 Alan Modra <amodra@gmail.com>
1320 * elf64-ppc.c (R_PPC64_GOT16_DS): Don't set has_gotrel.
1321 (ppc64_elf_edit_toc): Don't remove R_PPC64_GOT16_DS got entries.
1322 Reduce range of offsets allowed for other GOT relocs.
1324 2019-06-23 Alan Modra <amodra@gmail.com>
1327 * elfcode.h (elf_object_p): Warning fix.
1329 2019-06-21 Alan Modra <amodra@gmail.com>
1332 * elfcode.h (elf_object_p): Check type of e_shstrndx section.
1334 2019-06-19 Alan Modra <amodra@gmail.com>
1337 * elf32-ppc.c (ppc_elf_relocate_section): Don't read insn for
1338 R_PPC_EMB_RELSDA. Mask low bit of R_PPC_EMB_SDA21 r_offset.
1340 2019-06-19 Alan Modra <amodra@gmail.com>
1342 * elf64-ppc.c (ppc64_elf_inline_plt): Correct st_other test for
1343 functions that require r2 valid to use local entry.
1344 (ppc64_elf_size_stubs, ppc64_elf_relocate_section): Likewise.
1346 2019-06-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
1348 * elfnn-aarch64.c (elfNN_aarch64_allocate_local_dynrelocs): Remove.
1349 (elfNN_aarch64_size_dynamic_sections): Remove loc_hash_table traversal
1350 with elfNN_aarch64_allocate_local_dynrelocs.
1352 2019-06-14 Szabolcs Nagy <szabolcs.nagy@arm.com>
1354 * elfnn-aarch64.c: Enable MOVW_PREL relocs for ELF32.
1356 2019-06-14 Alan Modra <amodra@gmail.com>
1358 * Makefile.in: Regenerate.
1359 * configure: Regenerate.
1361 2019-06-14 Alan Modra <amodra@gmail.com>
1363 * elf64-ppc.c: Fix comments involving paddi.
1365 2019-06-12 Adam Lackorzymski <adam@os.inf.tu-dresden.de>
1368 * elf32-arm.c (arm_elf_find_function): Fail if the symol table is
1369 absent, or the bfd is not in the ELF formart.
1370 * elfnn-aarch64.c (aarch64_elf_find_function): Likewise.
1372 2019-06-10 Christos Zoulas <christos@zoulas.com>
1375 * elf.c (elfcore_make_auxv_note_section): New function.
1376 (elfcore_grok_note): Use it.
1377 (elfcore_grok_freebsd_note): Likewise.
1378 (elfcore_grok_openbsd_note): Likewise.
1379 (elfcore_grok_netbsd_note): Likewise. Plus add support for
1380 NT_NETBSDCORE_AUXV notes.
1382 2019-06-06 Sudakshina Das <sudi.das@arm.com>
1384 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Set
1385 alignment of the new gnu property section.
1387 2019-06-06 Sudakshina Das <sudi.das@arm.com>
1389 * bfd-in.h: Change comment.
1390 * bfd-in2.h: Regenerate.
1391 * elfnn-aarch64.c (elfNN_aarch64_merge_gnu_properties): Update warning.
1392 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties):
1395 2019-05-28 Faraz Shahbazker <fshahbazker@wavecomp.com>
1397 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_PCHI16>:
1398 Remove overflow check.
1400 2019-05-28 Alan Modra <amodra@gmail.com>
1403 * cofflink.c (coff_link_check_archive_element): Don't assume
1404 element is a coff object file after calling add_archive_element.
1406 2019-05-28 Alan Modra <amodra@gmail.com>
1409 * elf32-microblaze.c (microblaze_elf_finish_dynamic_sections): Don't
1410 attempt to set sh_entsize for excluded PLT section.
1412 2019-05-28 Alan Modra <amodra@gmail.com>
1415 * elf64-alpha.c (elf64_alpha_relocate_section): Don't attempt
1416 to emit R_ALPHA_GOTTPREL in PIEs, for which no space is
1417 allocated in alpha_dynamic_entries_for_reloc.
1419 2019-05-28 Alan Modra <amodra@gmail.com>
1422 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Don't segfault
1423 on NULL output_section.
1424 * elflink.c (elf_final_link_free): Don't free -1 symshndxbuf.
1426 2019-05-28 Alan Modra <amodra@gmail.com>
1429 * elf32-m68k.c (elf_m68k_get_got_entry): Don't create a new
1430 entry when MUST_FIND. Abort when MUST_FIND not found.
1431 (elf_m68k_get_bfd2got_entry): Likewise.
1432 (elf_m68k_relocate_section): Remove now useless assert.
1434 2019-05-28 Alan Modra <amodra@gmail.com>
1437 * elf64-hppa.c (elf64_hppa_finalize_dynreloc): Get the output bfd
1438 from bfd_link_info, not an output section owner.
1439 (elf64_hppa_finish_dynamic_symbol, elf64_hppa_finalize_opd): Likewise.
1440 (elf_hppa_final_link_relocate): Likewise.
1442 2019-05-28 Alan Modra <amodra@gmail.com>
1445 * aout-tic30.c (MY_bfd_final_link): Don't segfault on missing
1446 create_object_symbols_section, obj_textsec, obj_datasec or
1447 obj_bsssec. Fix other errors in placement.
1448 * config.bfd: Obsolete tic30-aout.
1450 2019-05-28 Alan Modra <amodra@gmail.com>
1453 * dwarf2.c (save_section_vma, section_vma_same): Check for NULL
1454 end of section list as well as section_count.
1455 * xcofflink.c (xcoff_link_add_symbols): Fix temporarily changed
1456 section list before returning error.
1458 2019-05-27 Alan Modra <amodra@gmail.com>
1460 * elf.c (bfd_elf_set_group_contents): Exit on zero size section.
1462 2019-05-27 Alan Modra <amodra@gmail.com>
1465 * linker.c (_bfd_generic_link_output_symbols): Heed BSF_KEEP.
1467 2019-05-24 Szabolcs Nagy <szabolcs.nagy@arm.com>
1469 * elfnn-aarch64.c (elfNN_aarch64_merge_symbol_attribute): New function.
1470 (struct elf_aarch64_link_hash_table): Add variant_pcs member.
1471 (elfNN_aarch64_allocate_dynrelocs): Update variant_pcs.
1472 (elfNN_aarch64_size_dynamic_sections): Add DT_AARCH64_VARIANT_PCS.
1473 (elf_backend_merge_symbol_attribute): Define.
1475 2019-05-24 Alan Modra <amodra@gmail.com>
1477 * po/SRC-POTFILES.in: Regenerate.
1479 2019-05-24 Alan Modra <amodra@gmail.com>
1481 * elf64-ppc.c: Comment on powerxx _notoc stub variants.
1482 (LI_R11_0, LIS_R11, ORI_R11_R11_0, SLDI_R11_R11_34): Define.
1483 (PADDI_R12_PC, PLD_R12_PC, D34, HA34): Define.
1484 (struct ppc_link_hash_table): Add powerxx_stubs.
1485 (ppc64_elf_check_relocs): Set powerxx_stubs.
1486 (build_powerxx_offset, size_powerxx_offset),
1487 (num_relocs_for_powerxx_offset),
1488 (emit_relocs_for_powerxx_offset): New functions.
1489 (plt_stub_size): Size powerxx stubs.
1490 (ppc_build_one_stub): Emit powerxx stubs.
1491 (ppc_size_one_stub): Size powerxx stubs. Omit .eh_frame for
1494 2019-05-24 Alan Modra <amodra@gmail.com>
1496 * elf64-ppc.c (ppc64_elf_check_relocs): Set has_gotrel for
1497 R_PPC64_GOT_PCREL34.
1498 (xlate_pcrel_opt): New function.
1499 (ppc64_elf_edit_toc): Handle R_PPC64_GOT_PCREL34.
1500 (ppc64_elf_relocate_section): Edit GOT indirect to GOT relative
1501 for R_PPC64_GOT_PCREL34. Implement R_PPC64_PCREL_OPT optimisation.
1503 2019-05-24 Alan Modra <amodra@gmail.com>
1505 * reloc.c (BFD_RELOC_PPC64_D34, BFD_RELOC_PPC64_D34_LO),
1506 (BFD_RELOC_PPC64_D34_HI30, BFD_RELOC_PPC64_D34_HA30),
1507 (BFD_RELOC_PPC64_PCREL34, BFD_RELOC_PPC64_GOT_PCREL34),
1508 (BFD_RELOC_PPC64_PLT_PCREL34),
1509 (BFD_RELOC_PPC64_ADDR16_HIGHER34, BFD_RELOC_PPC64_ADDR16_HIGHERA34),
1510 (BFD_RELOC_PPC64_ADDR16_HIGHEST34, BFD_RELOC_PPC64_ADDR16_HIGHESTA34),
1511 (BFD_RELOC_PPC64_REL16_HIGHER34, BFD_RELOC_PPC64_REL16_HIGHERA34),
1512 (BFD_RELOC_PPC64_REL16_HIGHEST34, BFD_RELOC_PPC64_REL16_HIGHESTA34),
1513 (BFD_RELOC_PPC64_D28, BFD_RELOC_PPC64_PCREL28): New reloc enums.
1514 * elf64-ppc.c (PNOP): Define.
1515 (ppc64_elf_howto_raw): Add reloc howtos for new relocations.
1516 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc numbers.
1517 (ppc64_elf_ha_reloc): Adjust addend for highera34 and highesta34
1519 (ppc64_elf_prefix_reloc): New function.
1520 (struct ppc_link_hash_table): Add notoc_plt.
1521 (is_branch_reloc): Add R_PPC64_PLTCALL_NOTOC.
1522 (is_plt_seq_reloc): Add R_PPC64_PLT_PCREL34,
1523 R_PPC64_PLT_PCREL34_NOTOC, and R_PPC64_PLTSEQ_NOTOC.
1524 (ppc64_elf_check_relocs): Handle pcrel got and plt relocs. Set
1525 has_pltcall for section on seeing R_PPC64_PLTCALL_NOTOC. Handle
1526 possible need for dynamic relocs on non-pcrel powerxx relocs.
1527 (dec_dynrel_count): Handle non-pcrel powerxx relocs.
1528 (ppc64_elf_inline_plt): Handle R_PPC64_PLTCALL_NOTOC.
1529 (toc_adjusting_stub_needed): Likewise.
1530 (ppc64_elf_tls_optimize): Handle R_PPC64_PLTSEQ_NOTOC.
1531 (ppc64_elf_relocate_section): Handle new powerxx relocs.
1532 * bfd-in2.h: Regenerate.
1533 * libbfd.h: Regenerate.
1535 2019-05-23 Jose E. Marchesi <jose.marchesi@oracle.com>
1537 * config.bfd (targ_cpu): Process bpf-*-none only if BFD64.
1538 * configure.ac: Set target_size=64 for bpf_elf64_le_vec and
1540 * configure: Regenerate.
1542 2019-05-23 Jose E. Marchesi <jose.marchesi@oracle.com>
1544 * configure: Regenerated.
1545 * Makefile.am (ALL_MACHINES): Add cpu-bpf.lo.
1546 (ALL_MACHINES_CFILES): Add cpu-bpf.c.
1547 (BFD64_BACKENDS): Add elf64-bpf.lo.
1548 (BFD64_BACKENDS_CFILES): Add elf64-bpf.c.
1549 * Makefile.in (SOURCE_HFILES): Regenerate.
1550 * config.bfd (targ_cpu): Handle bpf-*-* targets.
1551 * cpu-bpf.c: New file.
1552 * elf64-bpf.c: Likewise.
1553 * targets.c (_bfd_target_vector): Add bpf_elf64_be_vec and
1555 * archures.c: Define architecture bfd_arch_bpf and machine
1557 * reloc.c: Define BFD relocations used by the BPF target.
1558 * bfd-in2.h: Regenerated.
1559 * libbfd.h: Likewise.
1561 2019-05-22 Alan Modra <amodra@gmail.com>
1563 * elf32-arm.c (arm_allocate_glue_section_space): Clear section
1566 2019-05-22 Alan Modra <amodra@gmail.com>
1568 * vms-alpha.c (_bfd_vms_write_etir): Don't attempt further
1569 processing on "size error in section".
1571 2019-05-22 Alan Modra <amodra@gmail.com>
1573 * som.c (som_bfd_free_cached_info): Call
1574 _bfd_generic_close_and_cleanup.
1576 2019-05-21 Faraz Shahbazker <fshahbazker@wavecomp.com>
1578 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Generate error
1579 for TLS_TPREL_HI16(/LO16) relocations in shared library.
1581 2019-05-21 Faraz Shahbazker <fshahbazker@wavecomp.com>
1583 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Add NULL pointer
1584 checks. Search the RELA table for n64 relocations.
1586 2019-05-21 Matthew Fortune <matthew.fortune@mips.com>
1587 Faraz Shahbazker <fshahbazker@wavecomp.com>
1589 * elfxx-mips.c (LA25_BC): New macro.
1590 (mips_elf_link_hash_table)<compact_branches>: New field.
1591 (STUB_JALRC): New macro.
1592 (mipsr6_o32_exec_plt0_entry_compact): New array.
1593 (mipsr6_n32_exec_plt0_entry_compact): Likewise.
1594 (mipsr6_n64_exec_plt0_entry_compact): Likewise.
1595 (mipsr6_exec_plt_entry_compact): Likewise.
1596 (mips_elf_create_la25_stub): Use BC instead of J for stubs
1597 when compact_branches is true.
1598 (_bfd_mips_elf_finish_dynamic_symbol): Choose the compact
1599 PLT for MIPSR6 with compact_branches. Do not reorder the
1600 compact branches PLT. Switch the lazy stub for MIPSR6
1601 with compact_branches to use JALRC.
1602 (mips_finish_exec_plt): Choose the compact PLT0 for MIPSR6
1603 when compact_branches is true.
1604 (_bfd_mips_elf_compact_branches): New function.
1605 * elfxx-mips.h (_bfd_mips_elf_compact_branches): New prototype.
1607 2019-05-21 Tamar Christina <tamar.christina@arm.com>
1610 * elfnn-aarch64.c (_bfd_aarch64_erratum_843419_branch_to_stub):
1611 Fix print formatter.
1613 2019-05-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
1616 * elf32-arm.c (get_value_helper): Remove.
1617 (elf32_arm_final_link_relocate): Fix branch future relocations.
1619 2019-05-21 Tamar Christina <tamar.christina@arm.com>
1622 * bfd-in.h (enum erratum_84319_opts): New
1623 (bfd_elf64_aarch64_set_options, bfd_elf32_aarch64_set_options): Change
1624 int to enum erratum_84319_opts.
1625 * bfd-in2.h: Regenerate.
1626 * elfnn-aarch64.c (struct elf_aarch64_link_hash_table): Change
1627 fix_erratum_843419 to use new enum, remove fix_erratum_843419_adr.
1628 (_bfd_aarch64_add_stub_entry_after): Conditionally create erratum stub.
1629 (aarch64_size_one_stub): Conditionally size erratum 843419 stubs.
1630 (_bfd_aarch64_resize_stubs): Amend comment.
1631 (elfNN_aarch64_size_stubs): Don't generate stubs when no workaround
1633 (bfd_elfNN_aarch64_set_options): Use new fix_erratum_843419 enum.
1634 (_bfd_aarch64_erratum_843419_branch_to_stub): Implement selection of
1636 (clear_erratum_843419_entry): Update erratum conditional.
1638 2019-05-21 Senthil Kumar Selvaraj <senthilkumar.selvaraj@microchip.com>
1641 * bfd/elf32-avr.c (elf32_avr_relax_section): Adjust range check
1642 when computing distance_short_enough.
1644 2019-05-21 Senthil Kumar Selvaraj <senthilkumar.selvaraj@microchip.com>
1647 * bfd/elf32-avr.c (avr_relative_distance_considering_wrap_around):
1648 Wrap around even if distance equals avr_pc_wrap_around.
1650 2019-05-20 Nick Clifton <nickc@redhat.com>
1652 * po/fr.po: Updated French translation.
1654 2019-05-16 Andre Vieira <andre.simoesdiasvieira@arm.com>
1656 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Add case for Tag_MVE_arch.
1658 2019-05-16 Alan Modra <amodra@gmail.com>
1660 * elf32-arm.c (elf32_arm_write_section): Revert last change.
1662 2019-05-15 Alan Modra <amodra@gmail.com>
1664 * elf32-arm.c (elf32_arm_write_section): Don't leave
1665 error case of STM32L4XX_ERRATUM_BRANCH_TO_VENEER with
1666 unitialised section contents.
1668 2019-05-14 Jamey Hicks <jamey.hicks@gmail.com>
1671 * verilog.c: (VerilogDataWidth): New variable.
1672 (verilog_write_record): Emit bytes in VerilogDataWidth bundles.
1674 2019-05-08 Nick Clifton <nickc@redhat.com>
1677 * elf32-m68k.c (elf32_m68k_merge_private_bfd_data): Return TRUE
1678 rather than FALSE if encountering a non-ELF file.
1680 2019-05-06 Alan Modra <amodra@gmail.com>
1682 * elf32-pj.c (pj_elf_reloc): Don't report undefined weak as an error.
1684 2019-05-06 Alan Modra <amodra@gmail.com>
1686 * reloc.c (BFD_RELOC_PPC64_TPREL16_HIGH, BFD_RELOC_PPC64_TPREL16_HIGHA),
1687 (BFD_RELOC_PPC64_DTPREL16_HIGH, BFD_RELOC_PPC64_DTPREL16_HIGHA):
1688 Sort before BFD_RELOC_PPC64_DTPREL16_HIGHESTA entry.
1689 * libbfd.h: Regenerate.
1690 * bfd-in2.h: Regenerate.
1692 2019-05-04 Alan Modra <amodra@gmail.com>
1695 * syms.c (coff_section_type): Only allow '.', '$' and numeric
1696 following the standard section names.
1697 (bfd_decode_symclass): Prioritize section flag tests in
1698 decode_section_type before name tests in coff_section_type.
1699 * plugin.c (bfd_plugin_canonicalize_symtab): Init fake_section
1700 and fake_common_section using BFD_FAKE_SECTION. Use "fake" as
1701 their names and choose standard .text section flags for
1704 2019-05-02 Nick Clifton <nickc@redhat.com>
1707 * coffcode.h (styp_to_sec_flags): Treat .gnu.debuglink and
1708 .gnu.debugaltlink sections as debugging sections.
1710 2019-04-30 Alan Modra <amodra@gmail.com>
1712 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add has_gotrel.
1713 (struct _ppc64_elf_section_data): Likewise.
1714 (ppc64_elf_check_relocs): Set above fields.
1715 (ppc64_elf_edit_toc): Add a pass over GOT relocs.
1716 (ppc64_elf_relocate_section): Edit GOT indirect to GOT relative
1719 2019-04-26 H.J. Lu <hongjiu.lu@intel.com>
1722 * elflink.c (elf_link_output_extsym): Don't complain undefined
1723 weak dynamic reference.
1725 2019-04-25 Sudakshina Das <sudi.das@arm.com>
1727 * elfnn-aarch64.c (PLT_BTI_ENTRY_SIZE): Remove.
1728 (PLT_BTI_TLSDESC_ENTRY_SIZE): Remove.
1729 (PLT_PAC_ENTRY_SIZE, PLT_BTI_PAC_ENTRY_SIZE): Remove.
1730 (PLT_BTI_SMALL_ENTRY_SIZE, PLT_PAC_SMALL_ENTRY_SIZE): Update.
1731 (elfNN_aarch64_small_plt0_pac_entry): Remove.
1732 (elfNN_aarch64_small_plt0_bti_pac_entry): Remove.
1733 (elfNN_aarch64_small_plt0_bti_entry): Update.
1734 (elfNN_aarch64_small_plt_bti_entry): Update.
1735 (elfNN_aarch64_small_plt_pac_entry): Update.
1736 (elfNN_aarch64_tlsdesc_small_plt_bti_entry): Update.
1737 (setup_plt_values): Setup new entries.
1738 (elfNN_aarch64_finish_dynamic_sections): Remove size change.
1739 (elfNN_aarch64_plt_sym_val): Likewise.
1741 2019-04-22 Jim Wilson <jimw@sifive.com>
1743 * elfnn-riscv.c (PRSTATUS_SIZE) [ARCH_SIZE==32]: Change from 0 to 204.
1745 2019-04-19 Alan Modra <amodra@gmail.com>
1747 * elf32-s12z.c (elf_backend_can_gc_sections): Don't define
1749 2019-04-17 H.J. Lu <hongjiu.lu@intel.com>
1751 * elf64-x86-64.c (elf_x86_64_need_pic): Suggest -fPIE when not
1752 building shared object.
1753 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Likewise.
1755 2019-04-17 H.J. Lu <hongjiu.lu@intel.com>
1758 * elfxx-x86.h (SYMBOL_DEFINED_NON_SHARED_P): Also check x86
1761 2019-04-15 Thomas Preud'homme <thomas.preudhomme@arm.com>
1763 * reloc.c (BFD_RELOC_ARM_T32_VLDR_VSTR_OFF_IMM): New internal
1765 * bfd-in2.h: Regenerate.
1766 * libbfd.h: Likewise.
1768 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1770 * reloc.c (BFD_RELOC_ARM_THUMB_LOOP12): New.
1771 * bfd-in2.h: Regenerated.
1772 * libbfd.h: Regenerated.
1774 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1776 * reloc.c (BFD_RELOC_THUMB_PCREL_BFCSEL): New relocation.
1777 * bfd-in2.h: Regenerated.
1778 * libbfd.h: Likewise.
1780 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1782 * reloc.c (BFD_RELOC_ARM_THUMB_BF13): New.
1783 * bfd-in2.h: Regenerated.
1784 * libbfd.h: Regenerated.
1785 * elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF13.
1786 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF13
1787 and R_ARM_THM_BF12 together.
1788 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF13.
1790 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1792 * reloc.c (BFD_RELOC_ARM_THUMB_BF19): New
1793 * libbfd.h: Regenerated.
1794 * bfd-in2.h: Regenerated.
1795 * bfd-elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF18.
1796 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF19
1797 and R_ARM_THM_BF18 together.
1798 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF19.
1800 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1802 * reloc.c (BFD_RELOC_ARM_THUMB_BF17): New enum.
1803 * bfd-in2.h: Regenerated.
1804 * libbfd.h: Regenerated.
1805 * bfd-elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF16.
1806 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF17
1807 and R_ARM_THM_BF16 together.
1808 (get_value_helper): New reloc helper.
1809 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF16.
1811 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1813 * reloc.c (BFD_RELOC_THUMB_PCREL_BRANCH5): New enum.
1814 * bfd-in2.h: Regenerate.
1815 * libbfd.h: Regenerate.
1817 2019-04-15 Thomas Preud'homme <thomas.preudhomme@arm.com>
1819 * archures.c (bfd_mach_arm_8_1M_MAIN): Define.
1820 * bfd-in2.h: Regenerate.
1821 * cpu-arm.c (arch_info_struct): Add entry for Armv8.1-M Mainline.
1822 * elf32-arm.c (using_thumb_only): Return true for Armv8.1-M Mainline
1824 (using_thumb2): Likewise.
1825 (using_thumb2_bl): Update assert.
1826 (arch_has_arm_nop): Likewise.
1827 (bfd_arm_get_mach_from_attributes): Add case for Armv8.1-M Mainline.
1828 (tag_cpu_arch_combine): Add logic for Armv8.1-M Mainline merging.
1830 2019-04-11 H.J. Lu <hongjiu.lu@intel.com>
1832 * elf-linker-x86.h (elf_x86_cet_report): New.
1833 (elf_linker_x86_params): Add cet_report.
1834 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Report
1835 missing IBT and SHSTK properties if needed.
1837 2019-04-11 H.J. Lu <hongjiu.lu@intel.com>
1840 * elf-m10300.c (mn10300_elf_check_relocs): Remove BFD_ASSERT of
1841 "h != NULL". Don't check "h != NULL" before calling.
1842 bfd_elf_gc_record_vtentry.
1843 * elf32-arm.c (elf32_arm_check_relocs): Likewise.
1844 * elf32-bfin.c (bfin_check_relocs): Likewise.
1845 * elf32-cris.c (cris_elf_check_relocs): Likewise.
1846 * elf32-csky.c (csky_elf_check_relocs): Likewise.
1847 * elf32-d10v.c (elf32_d10v_check_relocs): Likewise.
1848 * elf32-dlx.c (elf32_dlx_check_relocs): Likewise.
1849 * elf32-fr30.c (fr30_elf_check_relocs): Likewise.
1850 * elf32-frv.c (elf32_frv_check_relocs): Likewise.
1851 * elf32-hppa.c (elf32_hppa_check_relocs): Likewise.
1852 * elf32-i386.c (elf_i386_check_relocs): Likewise.
1853 * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
1854 * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
1855 * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise.
1856 * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
1857 * elf32-mcore.c (mcore_elf_check_relocs): Likewise.
1858 * elf32-metag.c (elf_metag_check_relocs): Likewise.
1859 * elf32-or1k.c (or1k_elf_check_relocs): Likewise.
1860 * elf32-ppc.c (ppc_elf_check_relocs): Likewise.
1861 * elf32-s390.c (elf_s390_check_relocs): Likewise.
1862 * elf32-sh.c (sh_elf_check_relocs): Likewise.
1863 * elf32-v850.c (v850_elf_check_relocs): Likewise.
1864 * elf32-vax.c (elf_vax_check_relocs): Likewise.
1865 * elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise.
1866 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
1867 * elf64-mmix.c (mmix_elf_check_relocs): Likewise.
1868 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
1869 * elf64-s390.c (elf_s390_check_relocs): Likewise.
1870 * elf64-x86-64.c (elf_s390_check_relocs): Likewise.
1871 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
1872 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
1873 * elflink.c (bfd_elf_gc_record_vtinherit): Check for corrupt
1876 2019-04-11 Alan Modra <amodra@gmail.com>
1879 * elflink.c (elf_link_add_object_symbols): Don't read partial
1880 dynamic entries from fuzzed objects.
1882 2019-04-11 Tamar Christina <tamar.christina@arm.com>
1885 * elfnn-aarch64.c (elfNN_aarch64_size_dynamic_sections): Don't emit
1886 DT_TLSDESC_GOT and DT_TLSDESC_PLT when DF_BIND_NOW.
1887 (elfNN_aarch64_finish_dynamic_sections): Don't write PLT if DF_BIND_NOW.
1889 2019-04-10 Michael Forney <mforney@mforney.org>
1892 * doc/chew.c (free_words): Correctly free "push_text" strings.
1894 2019-04-08 H.J. Lu <hongjiu.lu@intel.com>
1896 * config.bfd: Remove i[3-7]86-*-kaos* and i[3-7]86-*-chaos targets.
1898 2019-04-08 Alan Modra <amodra@gmail.com>
1900 * configure.ac (elfxx_x86): Define and use.
1901 * configure: Regenerate.
1903 2019-04-06 H.J. Lu <hongjiu.lu@intel.com>
1905 * elf-linker-x86.h: New file.
1906 * elf32-i386.c (elf_i386_convert_load_reloc): Use htab->params
1907 to get x86-specific linker options.
1908 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
1909 (elf_x86_64_check_relocs): Likewise.
1910 (elf_x86_64_relocate_section): Likewise.
1911 (elf_x86_64_link_setup_gnu_properties): Likewise.
1912 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Likewise.
1913 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
1914 (_bfd_elf_linker_x86_set_options): New function.
1915 * elfxx-x86.h: Include "elf-linker-x86.h".
1916 (elf_x86_link_hash_table): Add params.
1918 2019-04-03 Alan Modra <amodra@gmail.com>
1920 * coff-i386.c, * coff-x86_64.c, * coffgen.c, * dwarf2.c,
1921 * elf-m10200.c, * elf.c, * elf32-arm.c, * elf32-bfin.c,
1922 * elf32-csky.c, * elf32-m32r.c, * elf32-microblaze.c, * elf32-pru.c,
1923 * elf32-rx.c, * elf32-xgate.c, * elf64-sparc.c, * elfnn-ia64.c,
1924 * elfxx-riscv.c, * elfxx-sparc.c, * linker.c, * mach-o.c,
1925 * pe-x86_64.c, * pei-x86_64.c, * plugin.c: Whitespace fixes.
1927 2019-04-02 Jim Wilson <jimw@sifive.com>
1930 * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Move read of
1931 ELF header flags to after check for ELF object file. Loop through
1932 sections looking for code sections, if none, then skip ABI checks.
1934 2019-03-30 Andrew Waterman <andrew@sifive.com>
1936 * elfnn-riscv.c (_bfd_riscv_relax_call): Only check ARCH_SIZE for
1939 2019-03-29 Max Filippov <jcmvbkbc@gmail.com>
1941 * elf32-xtensa.c (shrink_dynamic_reloc_sections): Add
1942 info->export_dynamic to the conditional.
1944 2019-03-28 Alan Modra <amodra@gmail.com>
1947 * configure.ac: Invoke AC_CHECK_SIZEOF(int).
1948 * configure: Regenerate.
1949 * coffgen.c (coff_get_reloc_upper_bound): Replace gcc diagnostic
1950 workaround with SIZEOF_LONG vs. SIZEOF_INT check.
1951 * elf.c (_bfd_elf_get_reloc_upper_bound): Likewise.
1952 * elf64-sparc.c (elf64_sparc_get_reloc_upper_bound): Likewise.
1953 * mach-o.c (bfd_mach_o_get_reloc_upper_bound): Likewise.
1955 2019-03-21 Jim Wilson <jimw@sifive.com>
1958 * elfnn-riscv.c (riscv_elf_relocate_section): For STT_SECTION check,
1959 verify sym non-NULL before using. Add identical check using h.
1961 2019-03-21 Sudakshina Das <sudi.das@arm.com>
1963 * elf-bfd.h (struct elf_backend_data): Add argument to
1964 merge_gnu_properties.
1965 * elf-properties.c (elf_merge_gnu_properties): Add argument to
1966 itself and while calling bed->merge_gnu_properties.
1967 (elf_merge_gnu_property_list): Update the calls for
1968 elf_merge_gnu_properties.
1969 * elfnn-aarch64.c (elfNN_aarch64_merge_gnu_properties): Update handling
1970 of --force-bti warning and add argument.
1971 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Add
1973 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Add argument.
1974 * elfxx-x86.h (_bfd_x86_elf_merge_gnu_properties): Likewise in
1977 2019-03-20 Sudakshina Das <sudi.das@arm.com>
1979 * elfxx-aarch64.c (_bfd_aarch64_elf_link_fixup_gnu_properties): Define.
1980 * elfxx-aarch64.h (_bfd_aarch64_elf_link_fixup_gnu_properties): Declare.
1981 (elf_backend_fixup_gnu_properties): Define for AArch64.
1983 2019-03-18 Alan Modra <amodra@gmail.com>
1986 * elf32-ppc.c (ppc_finish_symbols): Don't call write_glink_stub
1987 for local iplt syms with ent->plt.offset == -1. Remove ineffective
1988 attempt at writing glink stubs only once.
1990 2019-03-16 Alan Modra <amodra@gmail.com>
1993 * elf.c (_bfd_elf_rela_local_sym): Revert last change.
1994 (_bfd_elf_rel_local_sym): Likewise.
1995 * elflink.c (elf_link_input_bfd): Use bfd_und_section for
1996 section of symbols with unrecognized shndx.
1998 2019-03-15 H.J. Lu <hongjiu.lu@intel.com>
2001 * coffgen.c (_bfd_coff_section_already_linked): Skip discarded
2003 * cofflink.c (coff_link_add_symbols): Check for symbols defined
2004 in discarded section.
2006 2019-03-15 Alan Modra <amodra@gmail.com>
2009 * elflink.c (elf_link_add_object_symbols): Bail out on a local
2010 symbol after globals if elf_bad_symtab is not set.
2012 2019-03-15 Alan Modra <amodra@gmail.com>
2015 * elf.c (_bfd_elf_rela_local_sym): Don't segfault on NULL sec.
2016 (_bfd_elf_rel_local_sym): Likewise.
2018 2019-03-15 Alan Modra <amodra@gmail.com>
2021 * elflink.c (elf_link_read_relocs_from_section): Handle fuzzed
2022 object files with sh_size not a multiple of sh_entsize.
2024 2019-03-15 H.J. Lu <hongjiu.lu@intel.com>
2027 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for corrupt
2028 input with bad relocation.
2030 22019-03-15 H.J. Lu <hongjiu.lu@intel.com>
2032 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
2034 2019-03-14 Nick Clifton <nickc@redhat.com>
2037 * dwarf2.c (struct dwarf2_debug): Add sec_vma_count field.
2038 (save_section_vma): Initialise field to the number of entries in
2040 (section_vma_same): Check that the number of entries in the
2041 sec_vma table matches the number of sections in the bfd.
2043 2019-03-14 Nick Clifton <nickc@redhat.com>
2046 * elflink.c (_bfd_elf_add_default_symbol): Add a check for a NULL
2047 section owner pointer when adding the default symbol.
2049 2019-03-14 Nick Clifton <nickc@redhat.com>
2052 * elflink.c (elf_link_add_object_symbols): Add new local variable
2053 extversym_end. Initialise it to point to the end of the version
2054 symbol table, if present. Check it when initialising and updating
2057 2019-03-13 Sudakshina Das <sudi.das@arm.com>
2059 * elfnn-aarch64.c (PLT_PAC_ENTRY_SIZE, PLT_PAC_SMALL_ENTRY_SIZE): New.
2060 (PLT_BTI_PAC_ENTRY_SIZE, PLT_BTI_PAC_SMALL_ENTRY_SIZE): New.
2061 (setup_plt_values): Account for PAC or PAC and BTI enabled PLTs.
2062 (elfNN_aarch64_size_dynamic_sections): Add checks for PLT_BTI_PAC
2064 (elfNN_aarch64_finish_dynamic_sections): Account for PLT_BTI_PAC.
2065 (get_plt_type): Add case for DT_AARCH64_PAC_PLT.
2066 (elfNN_aarch64_plt_sym_val): Add cases for PLT_BTI_PAC and PLT_PAC.
2068 2019-03-13 Sudakshina Das <sudi.das@arm.com>
2069 Szabolcs Nagy <szabolcs.nagy@arm.com>
2071 * bfd-in.h (aarch64_plt_type, aarch64_enable_bti_type): New.
2072 (aarch64_bti_pac_info): New.
2073 (bfd_elf64_aarch64_set_options): Add aarch64_bti_pac_info argument.
2074 (bfd_elf32_aarch64_set_options): Likewise.
2075 * bfd-in2.h: Regenerate
2076 * elfnn-aarch64.c (PLT_BTI_ENTRY_SIZE): New.
2077 (PLT_BTI_SMALL_ENTRY_SIZE, PLT_BTI_TLSDESC_ENTRY_SIZE): New.
2078 (elfNN_aarch64_small_plt0_bti_entry): New.
2079 (elfNN_aarch64_small_plt_bti_entry): New.
2080 (elfNN_aarch64_tlsdesc_small_plt_bti_entry): New.
2081 (elf_aarch64_obj_tdata): Add no_bti_warn and plt_type fields.
2082 (elf_aarch64_link_hash_table): Add plt0_entry, plt_entry and
2083 tlsdesc_plt_entry_size fields.
2084 (elfNN_aarch64_link_hash_table_create): Initialise the new fields.
2085 (setup_plt_values): New helper function.
2086 (bfd_elfNN_aarch64_set_options): Use new bp_info to set plt sizes and
2088 (elfNN_aarch64_allocate_dynrelocs): Use new size members instead of
2090 (elfNN_aarch64_size_dynamic_sections): Likewise and add checks.
2091 (elfNN_aarch64_create_small_pltn_entry): Use new generic pointers
2092 to plt stubs instead of fixed ones and update filling them according
2093 to the need for bti.
2094 (elfNN_aarch64_init_small_plt0_entry): Likewise.
2095 (elfNN_aarch64_finish_dynamic_sections): Likewise.
2096 (get_plt_type, elfNN_aarch64_get_synthetic_symtab): New.
2097 (elfNN_aarch64_plt_sym_val): Update size accordingly.
2098 (elfNN_aarch64_link_setup_gnu_properties): Set up plts if BTI GNU NOTE
2100 (bfd_elfNN_get_synthetic_symtab): Define.
2101 (elfNN_aarch64_merge_gnu_properties): Give out warning with --force-bti
2102 and mising BTI NOTE SECTION.
2105 2019-03-13 Sudakshina Das <sudi.das@arm.com>
2107 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Exclude
2108 linker created inputs from merge.
2109 * elfnn-aarch64.c (struct elf_aarch64_obj_tdata): Add field for
2110 GNU_PROPERTY_AARCH64_FEATURE_1_AND properties.
2111 (elfNN_aarch64_link_setup_gnu_properties): New.
2112 (elfNN_aarch64_merge_gnu_properties): New.
2113 (elf_backend_setup_gnu_properties): Define for AArch64.
2114 (elf_backend_merge_gnu_properties): Likewise.
2115 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Define.
2116 (_bfd_aarch64_elf_parse_gnu_properties): Define.
2117 (_bfd_aarch64_elf_merge_gnu_properties): Define.
2118 * elfxx-aarch64.h (_bfd_aarch64_elf_link_setup_gnu_properties): Declare.
2119 (_bfd_aarch64_elf_parse_gnu_properties): Declare.
2120 (_bfd_aarch64_elf_merge_gnu_properties): Declare.
2121 (elf_backend_parse_gnu_properties): Define for AArch64.
2123 2019-03-13 H.J. Lu <hongjiu.lu@intel.com>
2126 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Properly
2127 merge GNU_PROPERTY_X86_FEATURE_1_[IBT|SHSTK].
2129 2019-03-12 Alan Modra <amodra@gmail.com>
2131 * coffcode.h (buy_and_read): Delete unnecessary forward decl. Add
2132 nmemb parameter. Use bfd_alloc2.
2133 (coff_slurp_line_table): Use bfd_alloc2. Update buy_and_read calls.
2135 (coff_slurp_symbol_table): Use bfd_alloc2 and bfd_zalloc2.
2136 (coff_slurp_reloc_table): Use bfd_alloc2. Update buy_and_read calls.
2137 * coffgen.c (coff_get_reloc_upper_bound): Ensure size calculation
2139 * elf.c (bfd_section_from_shdr): Use bfd_zalloc2. Style fix.
2140 (assign_section_numbers): Style fix.
2141 (swap_out_syms): Use bfd_malloc2.
2142 (_bfd_elf_get_reloc_upper_bound): Ensure size calculation doesn't
2144 (_bfd_elf_make_empty_symbol): Style fix.
2145 (elfobj_grok_stapsdt_note_1): Formatting.
2146 * elfcode.h (elf_object_p): Use bfd_alloc2.
2147 (elf_write_relocs, elf_write_shdrs_and_ehdr): Likewise.
2148 (elf_slurp_symbol_table): Use bfd_zalloc2.
2149 (elf_slurp_reloc_table): Use bfd_alloc2.
2150 (_bfd_elf_bfd_from_remote_memory): Use bfd_malloc2.
2151 * elf64-sparc (elf64_sparc_get_reloc_upper_bound): Ensure
2152 size calculation doesn't overflow.
2153 (elf64_sparc_get_dynamic_reloc_upper_bound): Likewise.
2154 * mach-o.c (bfd_mach_o_get_reloc_upper_bound): Likewise.
2155 * pdp11.c (get_reloc_upper_bound): Copy aoutx.h version.
2157 2019-03-08 Alan Modra <amodra@gmail.com>
2160 * merge.c (merge_strings): Return secinfo. Don't pad section
2162 (_bfd_merge_sections): Pad section to alignment here, if input
2163 sections contributing to merged output all pad to alignment.
2166 2019-03-06 Nick Clifton <nickc@redhat.com>
2168 * dwarf2.c (_bfd_dwarf2_find_symbol_bias): Check for a NULL symbol
2170 * coffgen.c (coff_find_nearest_line_with_names): Do not call
2171 _bfd_dwarf2_find_symbol_bias if there is no symbol table available.
2173 2019-03-01 Andreas Krebbel <krebbel@linux.ibm.com>
2175 This reverts commit 5a12586d44fa8d5dfc74cbca4f2f36a273a16335.
2176 2019-01-14 Maamoun Tarsha <maamountk@hotmail.com>
2179 * elf32-s390.c (allocate_dynrelocs): Update comment.
2181 2019-02-28 Tamar Christina <tamar.christina@arm.com>
2183 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Correct CIE parse.
2185 2019-02-28 Nick Clifton <nickc@redhat.com>
2188 * elf.c (bfd_elf_string_from_elf_section): Check for a string
2189 section that is not NUL terminated.
2191 2019-02-27 H.J. Lu <hongjiu.lu@intel.com>
2194 * elf64-x86-64.c (elf_x86_64_check_relocs): Skip symbol defined
2195 by linker when checking copy reloc on protected symbol.
2197 2019-02-24 Alan Modra <amodra@gmail.com>
2200 * pdp11.c (set_section_contents): Revert 2015-02-24 change.
2202 2019-02-20 Eric Tsai <erictsai@cadence.com>
2204 * elf32-xtensa.c (is_resolvable_asm_expansion): Scan output
2205 sections between the call site and call destination and adjust
2206 call distance by the largest alignment.
2208 2019-02-20 Alan Hayward <alan.hayward@arm.com>
2210 * elf-bfd.h (elfcore_write_aarch_pauth): Add declaration.
2211 * elf.c (elfcore_grok_aarch_pauth): New function.
2212 (elfcore_grok_note): Check for NT_ARM_PAC_MASK.
2213 (elfcore_write_aarch_pauth): New function.
2214 (elfcore_write_register_note): Check for AArch64 pauth section.
2216 2019-02-20 Alan Modra <amodra@gmail.com>
2219 * elf32-nios2.c (nios2_elf32_relocate_section): Check asprintf
2222 2019-02-20 Michael Roitzsch <reactorcontrol@icloud.com>
2224 * configure.ac (SHARED_LIBADD): Add -liberty -lintl for all
2225 Darwin hosts, not just or1k.
2226 * configure: Regenerate.
2228 2019-02-20 Alan Modra <amodra@gmail.com>
2231 * archive64.c (_bfd_archive_64_bit_slurp_armap): Move code adding
2232 sentinel NUL to string buffer nearer to loop where it is used.
2233 Don't go past sentinel when scanning strings, and don't write
2235 * archive.c (do_slurp_coff_armap): Simplify string handling to
2238 2019-02-19 Alan Modra <amodra@gmail.com>
2241 * pei-x86_64.c (pex64_bfd_print_pdata_section): Correct checks
2242 attempting to prevent read past end of section.
2244 2019-02-18 Alan Modra <amodra@gmail.com>
2247 * elf32-nios2.c (nios2_elf32_relocate_section): Use asprintf and
2248 PRIx64 to generate warning messages. Print local sym names too.
2250 2019-02-09 Vineet Gupta <vgupta@synopsys.com>
2252 * elf32-arc (INIT_SYM_STRING): Delete.
2253 (FINI_SYM_STRING): Likewise.
2254 (init_str): Likewise.
2255 (fini_str): Likewise.
2257 2019-02-08 Alan Modra <amodra@gmail.com>
2259 * elf32-ppc.c (ppc_elf_relocate_section): Add %X to "unsupported
2260 for bss-plt" warning to make it an error.
2262 2019-02-07 Eric Botcazou <ebotcazou@adacore.com>
2265 * elf32-sparc.c (elf32_sparc_reloc_type_class): Return
2266 reloc_class_ifunc for ifunc symbols.
2267 * elf64-sparc.c (elf64_sparc_reloc_type_class): Likewise.
2269 2019-02-07 Eric Botcazou <ebotcazou@adacore.com>
2271 * elf32-visium.c (visium_elf_howto_parity_reloc): Minor tweak.
2272 <R_VISIUM_PC16>: Use explicit range test to detect an overflow.
2274 2019-02-07 Nick Clifton <nickc@redhat.com>
2276 * config.bfd: Move the powerpc-lynxos and powerpc-windiss targets
2277 into the definitely obsolete list.
2279 2019-02-05 H.J. Lu <hongjiu.lu@intel.com>
2282 * elf64-x86-64.c (elf_x86_64_need_pic): Check
2283 SYMBOL_DEFINED_NON_SHARED_P instead of def_regular.
2284 (elf_x86_64_relocate_section): Move PIC check for PC-relative
2286 (elf_x86_64_check_relocs): Here.
2287 (elf_x86_64_finish_dynamic_symbol): Use SYMBOL_DEFINED_NON_SHARED_P
2288 to check if a symbol is defined in a non-shared object.
2289 * elfxx-x86.h (SYMBOL_DEFINED_NON_SHARED_P): New.
2291 2019-01-21 Sergio Durigan Junior <sergiodj@redhat.com>
2293 * elf32-arm.c (elf32_arm_final_link_relocate): Use 'llabs' instead
2294 of 'labs' (and fix GCC warning).
2296 2019-01-25 Nick Clifton <nickc@redhat.com>
2298 * po/ru.po: Updated Russian translation.
2300 2019-01-23 Nick Clifton <nickc@redhat.com>
2302 * po/fr.po: Updated French translation.
2304 2019-01-21 Nick Clifton <nickc@redhat.com>
2306 * po/pt.po: Updated Portuguese translation.
2307 * po/uk.po: Updated Ukranian translation.
2309 2019-01-21 Yuri Chornoivan <yurchor@ukr.net>
2312 * elf32-nds32.c (nds32_relocate_section): Add space between words
2314 * elfnn-riscv.c (riscv_version_mismatch): Fix spelling mistake in
2316 (riscv_i_or_e_p): Likewise.
2317 (riscv_merge_arch_attr_info): Likewise.
2319 2019-01-19 Nick Clifton <nickc@redhat.com>
2321 * version.m4: Reset to 2.32.51
2322 * configure: Regenerate.
2323 * po/bfd.pot: Regenerate.
2325 2018-06-24 Nick Clifton <nickc@redhat.com>
2327 2.32 branch created.
2329 2019-01-16 Kito Cheng <kito@andestech.com>
2331 * elf-attrs.c (vendor_obj_attr_size): Return 0 if size is 0 even
2334 2019-01-16 Kito Cheng <kito@andestech.com>
2335 Nelson Chu <nelson@andestech.com>
2337 * elfnn-riscv.c (in_subsets): New.
2338 (out_subsets): Likewise.
2339 (merged_subsets): Likewise.
2340 (riscv_std_ext_p): Likewise.
2341 (riscv_non_std_ext_p): Likewise.
2342 (riscv_std_sv_ext_p): Likewise.
2343 (riscv_non_std_sv_ext_p): Likewise.
2344 (riscv_version_mismatch): Likewise.
2345 (riscv_i_or_e_p): Likewise.
2346 (riscv_merge_std_ext): Likewise.
2347 (riscv_merge_non_std_and_sv_ext): Likewise.
2348 (riscv_merge_arch_attr_info): Likewise.
2349 (riscv_merge_attributes): Likewise.
2350 (_bfd_riscv_elf_merge_private_bfd_data): Merge attribute.
2352 * elfnn-riscv.c (riscv_elf_obj_attrs_arg_type): New.
2353 (elf_backend_obj_attrs_vendor): Define.
2354 (elf_backend_obj_attrs_section_type): Likewise.
2355 (elf_backend_obj_attrs_section): Likewise.
2356 (elf_backend_obj_attrs_arg_type): Define as
2357 riscv_elf_obj_attrs_arg_type.
2358 * elfxx-riscv.c (riscv_estimate_digit): New.
2359 (riscv_estimate_arch_strlen1): Likewise.
2360 (riscv_estimate_arch_strlen): Likewise.
2361 (riscv_arch_str1): Likewise.
2362 (riscv_arch_str): Likewise.
2363 * elfxx-riscv.h (riscv_arch_str): Declare.
2365 2019-01-14 John Darrington <john@darrington.wattle.id.au>
2367 * bfd-in2.h [BFD_RELOC_S12Z_OPR]: New reloc.
2369 * elf32-s12z.c (eld_s12z_howto_table): R_S12Z_OPR takes non zero
2370 source field. (md_apply_fix): Apply final fix
2371 to BFD_RELOC_S12Z_OPR.
2372 * reloc.c[BFD_RELOC_S12Z_OPR]: New reloc.
2374 2019-01-14 Maamoun Tarsha <maamountk@hotmail.com>
2377 * elf32-s390.c (allocate_dynrelocs): Update comment.
2379 2019-01-09 Andrew Paprocki <andrew@ishiboo.com>
2381 * warning.m4: Adjust egrep pattern for non-GNU compilers.
2382 * configure: Regenerate.
2384 2019-01-08 Alan Modra <amodra@gmail.com>
2388 * ihex.c (ihex_write_object_contents): Properly check 32-bit
2391 2019-01-05 Yoshinori Sato <ysato@users.sourceforge.jp>
2393 * bfd/archures.c: Add bfd_mach_rx_v2 and bfd_mach_rx_v3.
2394 * bfd/bfd-in2.h: Regenerate.
2395 * bfd/cpu-rx.c (arch_info_struct): Add RXv2 and RXv3 entry.
2396 * bfd/elf32-rx.c (elf32_rx_machine): Add RXv2 and RXv3 support.
2398 2019-01-04 Lifang Xia <lifang_xia@c-sky.com>
2400 * config.bfd (csky-*-elf* | csky-*-linux*): Modify the csky
2401 default target, little endian target is more suitable.
2403 2019-01-04 Alan Modra <amodra@gmail.com>
2407 * coff-rs6000.c (GET_VALUE_IN_FIELD): Add base parameter and
2409 (EQ_VALUE_IN_FIELD): Likewise.
2410 * coff64-rs6000.c (GET_VALUE_IN_FIELD): Likewise.
2412 2019-01-01 Alan Modra <amodra@gmail.com>
2414 Update year range in copyright notice of all files.
2416 For older changes see ChangeLog-2018
2418 Copyright (C) 2019 Free Software Foundation, Inc.
2420 Copying and distribution of this file, with or without modification,
2421 are permitted in any medium without royalty provided the copyright
2422 notice and this notice are preserved.
2428 version-control: never