1 2019-10-14 Alan Modra <amodra@gmail.com>
3 * elf.c (_bfd_elf_map_sections_to_segments): Init target_index
4 for sections about to be sorted.
5 (assign_file_positions_for_load_sections): Likewise.
6 (elf_sort_sections): Don't bother optimising both TOEND case.
7 * elflink.c (bfd_elf_final_link): Reset target_index.
9 2019-10-14 Alan Modra <amodra@gmail.com>
11 * elflink.c (elf_get_linked_section_vma): Delete.
12 (compare_link_order): Use elf_linked_to_section and sort by lma,
14 (elf_fixup_link_order): Use size_t variables where appropriate.
15 Make use of elf_linked_to_section. Formatting. Properly align
18 2019-10-14 Alan Modra <amodra@gmail.com>
20 * elf-strtab.c (strrevcmp): Comment.
21 * merge.c (strrevcmp): Likewise.
22 * elf64-ppc.c (compare_symbols): Correct final pointer comparison.
23 Comment on why comparing pointers ensures a stable sort.
24 * elflink.c (struct elf_symbol): Add void* to union.
25 (elf_sort_elf_symbol): Ensure a stable sort with pointer comparison.
26 (elf_sym_name_compare): Likewise.
27 (bfd_elf_match_symbols_in_sections): Style fix.
28 (elf_link_sort_cmp1): Comment.
30 2019-10-14 Alan Modra <amodra@gmail.com>
33 * elflink.c (elf_output_implib): Don't use xmalloc. Don't ignore
34 return value of bfd_alloc2.
35 * peXXigen.c (_bfd_XXi_write_codeview_record): Don't use xmalloc.
36 * pef.c (bfd_pef_print_symbol): Likewise. Don't ignore return
37 value of bfd_get_section_contents.
38 * som.c (som_write_space_strings): Don't use xmalloc.
39 (som_write_symbol_strings): Likewise.
41 2019-10-11 Max Filippov <jcmvbkbc@gmail.com>
43 * dwarf2.c (stash_maybe_enable_info_hash_tables): Only set
44 stash->info_hash_status = STASH_INFO_HASH_ON when
45 stash_maybe_update_info_hash_tables succeeds.
47 2019-10-09 Alan Modra <amodra@gmail.com>
50 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Catch overflow of
51 total_size calculation.
53 2019-10-08 Alan Modra <amodra@gmail.com>
56 * dwarf2.c (find_abstract_instance): Delete orig_info_ptr, add
57 recur_count. Error on recur_count reaching 100 rather than
58 info_ptr matching orig_info_ptr. Adjust calls.
60 2019-10-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
62 * elf32-msp430.c (elf32_msp430_merge_mspabi_attributes): Rename to..
63 (elf32_msp430_merge_msp430_attributes): Add support for merging
64 the GNU object attribute for data region.
66 2019-10-07 Alan Modra <amodra@gmail.com>
68 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Do allocate
69 space for local got non-tls relocs when PIE.
71 2019-10-07 Alan Modra <amodra@gmail.com>
73 * elflink.c (elf_fixup_link_order): Don't attempt to find
74 an elf_section for linker created bfd sections.
76 2019-10-07 Alan Modra <amodra@gmail.com>
78 * elf32-ppc.c (ppc_elf_tls_optimize): Don't process R_PPC_TLSLD
79 with non-local symbol. Don't double count __tls_get_addr calls
81 * elf64-ppc.c (ppc64_elf_tls_optimize): Likewise.
83 2019-10-07 Alan Modra <amodra@gmail.com>
85 * elf32-ppc.c (nomark_tls_get_addr): Rename from has_tls_get_addr_call
87 * elf64-ppc.c (nomark_tls_get_addr): Likewise.
89 2019-10-04 Alan Modra <amodra@gmail.com>
91 * elf64-ppc.c (ppc64_elf_check_relocs): Move initialisation of vars.
92 (ppc64_elf_tls_optimize): Correct is_local condition.
93 (allocate_got): Don't reserve dynamic relocations for any of the
94 tls got relocs in PIEs when the symbol is local.
95 (allocate_dynrelocs): Correct validity test for local sym using
97 (ppc64_elf_size_dynamic_sections): Don't reserve dynamic relocations
98 for any of the tls got relocs in PIEs.
99 (ppc64_elf_layout_multitoc): Likewise.
100 (ppc64_elf_relocate_section): Correct validity test for local sym
101 using tlsld_got slot. Don't emit dynamic relocations for any of
102 the tls got relocs in PIEs when the symbol is local.
103 * elf32-ppc.c (ppc_elf_tls_optimize): Correct is_local condition.
104 (got_relocs_needed): Delete.
105 (allocate_dynrelocs): Correct validity test for local sym using
106 tlsld_got slot. Don't reserve dynamic relocations for any of the
107 tls got relocs in PIEs when the symbol is local.
108 (ppc_elf_size_dynamic_sections): Don't reserve dynamic relocations
109 for any of the tls got relocs in PIEs.
110 (ppc_elf_relocate_section): Correct validity test for local sym
111 using tlsld_got slot. Don't emit dynamic relocations for any of
112 the tls got relocs in PIEs when the symbol is local.
114 2019-10-04 Szabolcs Nagy <szabolcs.nagy@arm.com>
118 * elf32-arm.c (elf32_arm_tls_transition): Use bfd_link_dll instead of
119 bfd_link_pic for TLS checks.
120 (elf32_arm_final_link_relocate): Likewise.
121 (allocate_dynrelocs_for_symbol): Likewise.
123 2019-10-04 Szabolcs Nagy <szabolcs.nagy@arm.com>
126 * elf32-arm.c (elf32_arm_final_link_relocate): Sign extend data.
128 2019-09-30 Nick Alcock <nick.alcock@oracle.com>
130 * elf-bfd.h (bfd_section_is_ctf): New inline function.
131 * elf.c (special_sections_c): Add ".ctf".
132 (assign_file_positions_for_non_load_sections): Note that
133 compressed debugging sections etc are not assigned here. Treat
134 CTF sections like SEC_ELF_COMPRESS sections when is_linker_output:
136 (assign_file_positions_except_relocs): Likewise.
137 (find_section_in_list): Note that debugging and CTF sections, as
138 well as reloc sections, are assigned later.
139 (_bfd_elf_assign_file_positions_for_non_load): CTF sections get
140 their size and contents updated.
141 (_bfd_elf_set_section_contents): Skip CTF sections: unlike
142 compressed sections, they have no uncompressed content to copy at
144 * elflink.c (elf_link_swap_symbols_out): Call the examine_strtab
145 callback right before the strtab is written out.
146 (bfd_elf_final_link): Don't cache the section contents of CTF
147 sections: they are not populated yet. Call the emit_ctf callback
148 right at the end, after all the symbols and strings are flushed
151 2019-07-13 Nick Alcock <nick.alcock@oracle.com>
153 * elf-strtab.c (_bfd_elf_strtab_len): New.
154 (_bfd_elf_strtab_str): Likewise.
155 * bfd-elf.h: Declare them.
157 2019-07-13 Nick Alcock <nick.alcock@oracle.com>
159 * elf-bfd.h (bfd_elf_get_str_section): Add.
160 * elf.c (bfd_elf_get_str_section): No longer static.
162 2019-09-26 Alan Modra <amodra@gmail.com>
165 * Makefile.am (AM_CPPFLAGS): Add -DLIBDIR.
166 * plugin.c (load_plugin): Search both ${libdir}/bfd-plugins and
167 ${bindir}/../lib/bfd-plugins if different.
168 * Makefile.in: Regenerate.
170 2019-09-23 Alan Modra <amodra@gmail.com>
172 * elf64-ppc.c (ppc64_elf_check_relocs): Use bfd_link_executable
173 in choosing between different actions for shared library and
174 non-shared library cases. Delete ELIMINATE_COPY_RELOCS test.
175 (dec_dynrel_count): Likewise. Account for ifunc special case.
176 (ppc64_elf_adjust_dynamic_symbol): Copy relocs are for executables,
178 (allocate_dynrelocs): Comment fixes. Delete ELIMINATE_COPY_RELOCS
181 2019-09-23 Alan Modra <amodra@gmail.com>
183 * Makefile.am (SOURCE_HFILES): Add many missing .h files.
184 * Makefile.in: Regenerate.
185 * po/SRC-POTFILES.in: Regenerate.
187 2019-09-23 Alan Modra <amodra@gmail.com>
189 * bfd-in.h (bfd_symbol, bfd_section_already_linked),
190 (bfd_elf_version_tree): Delete forward declarations.
191 Move other forward decls and remaining elf function decl later.
192 (bfd_section_already_linked_table_init),
193 (bfd_section_already_linked_table_free),
194 (_bfd_handle_already_linked, _bfd_nearby_section),
195 (_bfd_fix_excluded_sec_syms): Move to bfdlink.h.
197 2019-09-23 Alan Modra <amodra@gmail.com>
199 * bfd-in.h: Move ecoff function declarations..
200 * ecoff-bfd.h: ..to here, new file.
201 * ecoff.c: Include ecoff-bfd.h.
202 * ecofflink.c: Likewise.
203 * elf64-alpha.c: Likewise.
204 * elfxx-mips.c: Likewise.
205 * bfd-in2.h: Regenerate.
207 2019-09-23 Alan Modra <amodra@gmail.com>
209 * bfd-in.h (enum notice_asneeded_action): Move to bfdlink.h.
210 Move most other elf declarations..
211 * elf-bfd.h: ..to here.
212 * bfd-in2.h: Regenerate.
214 2019-09-23 Alan Modra <amodra@gmail.com>
216 * bfd-in.h: Move m68k function declaration..
217 * cpu-m68k.h: ..to here, new file..
218 * elf32-m68k.h: ..and here, new file.
219 * elf32-m68k.c: Include cpu-m68k.h and elf32-m68k.h.
220 * bfd-in2.h: Regenerate.
222 2019-09-23 Alan Modra <amodra@gmail.com>
224 * bfd-in.h: Move bfin function declaration..
225 * elf32-bfin.h: ..to here, new file.
226 * elf32-bfin.c: Include elf32-bfin.h.
227 * bfd-in2.h: Regenerate.
229 2019-09-23 Alan Modra <amodra@gmail.com>
231 * bfd-in.h: Move cr16 function declaration..
232 * elf32-cr16.h: ..to here, new file.
233 * elf32-cr16.c: Include elf32-cr16.h.
234 * bfd-in2.h: Regenerate.
236 2019-09-23 Alan Modra <amodra@gmail.com>
238 * bfd-in.h (bfd_sunos_get_needed_list),
239 (bfd_sunos_record_link_assignment),
240 (bfd_sunos_size_dynamic_sections),
241 (bfd_i386linux_size_dynamic_sections),
242 (bfd_sparclinux_size_dynamic_sections): Delete obsolete decls.
243 * bfd-in2.h: Regenerate.
245 2019-09-23 Alan Modra <amodra@gmail.com>
247 * bfd-in.h: Move xcoff function declarations..
248 * xcofflink.h: ..to here, new file.
249 * xcofflink.c: Include xcofflink.h.
250 * coff-rs6000.c (bfd_xcoff_ar_archive_set_magic): Delete unused func.
251 * bfd-in2.h: Regenerate.
253 2019-09-23 Alan Modra <amodra@gmail.com>
255 * bfd-in.h: Delete coff forward refs and move coff declaration..
256 * coff-bfd.h: ..to here.
257 * bfd-in2.h: Regenerate.
259 2019-09-23 Alan Modra <amodra@gmail.com>
261 * bfd-in.h: Move arm declaraions..
262 * cpu-arm.h: ..to here, new file..
263 * coff-arm.h: ..and here, new file..
264 * elf32-arm.h: ..and here, new file.
265 * cpu-arm.c: Include cpu-arm.h.
266 * coff-arm.c: Include cpu-arm.h and coff-arm.h.
267 * elf32-arm.c: Include cpu-arm.h and elf32-arm.h.
268 * pe-arm.c: Move function rename defines later.
269 * pe-arm-wince.c: Likewise and include sysdep.h and bfd.h early.
270 * bfd-in2.h: Regenerate.
272 2019-09-23 Alan Modra <amodra@gmail.com>
274 * bfd-in.h: Move tic6x function declaration..
275 * elf32-tic6x.h: ..to here.
276 * bfd-in2.h: Regenerate.
278 2019-09-23 Alan Modra <amodra@gmail.com>
280 * bfd-in.h: Move aarch64 declarations and defines..
281 * cpu-aarch64.h: ..to here, new file..
282 * elfxx-aarch64.h: ..and here.
283 * cpu-aarch64.c: Include cpu-aarch64.h.
284 * elfnn-aarch64.c: Likewise.
285 * bfd-in2.h: Regenerate.
287 2019-09-23 Alan Modra <amodra@gmail.com>
289 * bfd-in.h: Delete ticoff function declarations.
290 * coff-tic54x.c (bfd_ticoff_set_section_load_page),
291 (bfd_ticoff_get_section_load_page): Make static.
292 * bfd-in2.h: Regenerate.
294 2019-09-23 Alan Modra <amodra@gmail.com>
296 * bfd-in.h: Move h8300 function declaration to..
297 * cpu-h8300.h: ..here, new file.
298 * cpu-h8300.c: Include cpu-h8300.h.
299 * elf32-h8300.c: Likewise.
300 * bfd-in2.h: Regenerate.
302 2019-09-23 Alan Modra <amodra@gmail.com>
304 * bfd-in.h: Move ia64 function declarations..
305 * elfxx-ia64.h: ..to here.
306 * bfd-in2.h: Regenerate.
308 2019-09-23 Alan Modra <amodra@gmail.com>
310 * bfd-in.h: Move v850 function declarations..
311 * elf32-v850.h: ..to here, new file.
312 * elf32-v850.c: Include elf32-v850.h.
313 * bfd-in2.h: Regenerate.
315 2019-09-23 Alan Modra <amodra@gmail.com>
317 * bfd-in.h: Move mips function declaration to..
318 * elfxx-mips.h: ..here.
319 * bfd-in2.h: Regenerate.
321 2019-09-23 Alan Modra <amodra@gmail.com>
323 * bfd-in.h: Move csky function declarations to..
324 * elf32-csky.h: ..here, new file.
325 * elf32-csky.c: Include elf32-csky.h.
326 * bfd-in2.h: Regenerate.
328 2019-09-20 Nelson Chu <nelson.chu@sifive.com>
330 * elfnn-riscv.c (riscv_pcgp_hi_reloc): Add new field undefined_weak.
331 (riscv_record_pcgp_hi_reloc): New parameter undefined_weak.
332 Set undefined_weak field from it.
333 (relax_func_t): New parameter undefined_weak.
334 (_bfd_riscv_relax_call): New ignored parameter undefined_weak.
335 (_bfd_riscv_relax_tls_le): Likewise.
336 (_bfd_riscv_relax_align): Likewise.
337 (_bfd_riscv_relax_delete): Likewise.
338 (_bfd_riscv_relax_lui): New parameter undefined_weak. If true,
339 allow relaxing. For LO12* relocs, set rs1 to x0 when undefined_weak.
340 (_bfd_riscv_relax_pc): New parameter undefined_weak. For LO12* relocs,
341 set undefined_weak from hi_reloc. If true, allow relaxing. For LO12*
342 relocs, set rs1 to x0 when undefined_weak and change to non-pcrel
344 (_bfd_riscv_relax_section): New local undefined_weak. Set for
345 undef weak relocs that can be relaxed. Pass to relax_func call.
347 2019-09-20 Alan Modra <amodra@gmail.com>
349 * bfd-in.h (bfd_section_name, bfd_section_size, bfd_section_vma),
350 (bfd_section_lma, bfd_section_alignment, bfd_section_flags),
351 (bfd_section_userdata, bfd_is_com_section, discarded_section),
352 (bfd_get_section_limit_octets, bfd_get_section_limit): Delete macros.
353 * bfd.c (bfd_get_section_limit_octets, bfd_get_section_limit),
354 (bfd_section_list_remove, bfd_section_list_append),
355 (bfd_section_list_prepend, bfd_section_list_insert_after),
356 (bfd_section_list_insert_before, bfd_section_removed_from_list):
357 New inline functions.
358 * section.c (bfd_is_und_section, bfd_is_abs_section),
359 (bfd_is_ind_section, bfd_is_const_section, bfd_section_list_remove),
360 (bfd_section_list_append, bfd_section_list_prepend),
361 (bfd_section_list_insert_after, bfd_section_list_insert_before),
362 (bfd_section_removed_from_list): Delete macros.
363 (bfd_section_name, bfd_section_size, bfd_section_vma),
364 (bfd_section_lma, bfd_section_alignment, bfd_section_flags),
365 (bfd_section_userdata, bfd_is_com_section, bfd_is_und_section),
366 (bfd_is_abs_section, bfd_is_ind_section, bfd_is_const_section),
367 (discarded_section): New inline functions.
368 * bfd-in2.h: Regenerate.
370 2019-09-20 Alan Modra <amodra@gmail.com>
372 * bfd-in.h (bfd_asymbol_section, bfd_asymbol_value, bfd_asymbol_name),
373 (bfd_asymbol_bfd, bfd_asymbol_flavour, bfd_set_asymbol_name): Delete.
374 * bfd.c (bfd_asymbol_section, bfd_asymbol_value, bfd_asymbol_name),
375 (bfd_asymbol_bfd, bfd_set_asymbol_name): New inline functions.
376 * targets.c (bfd_asymbol_flavour): Likewise.
377 * bfd-in2.h: Regenerate.
379 2019-09-20 Alan Modra <amodra@gmail.com>
381 * archive.c (bfd_generic_archive_p): Use bfd_set_thin_archive.
382 * bfd-in.h (bfd_get_filename, bfd_get_cacheable, bfd_get_format),
383 (bfd_get_target, bfd_get_flavour, bfd_family_coff, bfd_big_endian),
384 (bfd_little_endian, bfd_header_big_endian, bfd_header_little_endian),
385 (bfd_get_file_flags, bfd_applicable_file_flags),
386 (bfd_applicable_section_flags, bfd_has_map, bfd_is_thin_archive),
387 (bfd_valid_reloc_types, bfd_usrdata, bfd_get_start_address),
388 (bfd_get_symcount, bfd_get_outsymbols, bfd_count_sections),
389 (bfd_get_dynamic_symcount, bfd_get_symbol_leading_char): Delete.
390 * bfd/bfd.c (bfd_get_filename, bfd_get_cacheable, bfd_get_format),
391 (bfd_get_file_flags, bfd_get_start_address, bfd_get_symcount),
392 (bfd_get_dynamic_symcount, bfd_get_outsymbols, bfd_count_sections),
393 (bfd_has_map, bfd_is_thin_archive, bfd_set_thin_archive),
394 (bfd_usrdata, bfd_set_usrdata): New inline functions.
395 * targets.c (bfd_get_target, bfd_get_flavour),
396 (bfd_applicable_file_flags, bfd_family_coff, bfd_big_endian),
397 (bfd_little_endian, bfd_header_big_endian),
398 (bfd_header_little_endian, bfd_applicable_section_flags),
399 (bfd_get_symbol_leading_char): New inline functions.
400 * bfd-in2.h: Regenerate.
402 2019-09-20 Alan Modra <amodra@gmail.com>
404 * elf64-ppc.c (ppc64_glibc_dynamic_reloc): New function.
405 (ppc64_elf_relocate_section): Warn if emitting unsupported dynamic
408 2019-09-18 Alan Modra <amodra@gmail.com>
410 * bfd-in.h (bfd_get_section_name, bfd_get_section_vma),
411 (bfd_get_section_lma, bfd_get_section_alignment),
412 (bfd_get_section_size, bfd_get_section_flags),
413 (bfd_get_section_userdata): Delete.
414 (bfd_section_name, bfd_section_size, bfd_section_vma),
415 (bfd_section_lma, bfd_section_alignment): Lose bfd parameter.
416 (bfd_section_flags, bfd_section_userdata): New.
417 (bfd_is_com_section): Rename parameter.
418 * section.c (bfd_set_section_userdata, bfd_set_section_vma),
419 (bfd_set_section_alignment, bfd_set_section_flags, bfd_rename_section),
420 (bfd_set_section_size): Delete bfd parameter, rename section parameter.
421 (bfd_set_section_lma): New.
422 * bfd-in2.h: Regenerate.
423 * mach-o.c (bfd_mach_o_init_section_from_mach_o): Delete bfd param,
425 * aoutx.h, * bfd.c, * coff-alpha.c, * coff-arm.c, * coff-mips.c,
426 * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c,
427 * compress.c, * ecoff.c, * elf-eh-frame.c, * elf-hppa.h,
428 * elf-ifunc.c, * elf-m10200.c, * elf-m10300.c, * elf-properties.c,
429 * elf-s390-common.c, * elf-vxworks.c, * elf.c, * elf32-arc.c,
430 * elf32-arm.c, * elf32-avr.c, * elf32-bfin.c, * elf32-cr16.c,
431 * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-csky.c,
432 * elf32-d10v.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c,
433 * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c,
434 * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c, * elf32-m32c.c,
435 * elf32-m32r.c, * elf32-m68hc1x.c, * elf32-m68k.c, * elf32-mcore.c,
436 * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c,
437 * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c,
438 * elf32-nios2.c, * elf32-or1k.c, * elf32-ppc.c, * elf32-pru.c,
439 * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c,
440 * elf32-score7.c, * elf32-sh.c, * elf32-spu.c, * elf32-tic6x.c,
441 * elf32-tilepro.c, * elf32-v850.c, * elf32-vax.c, * elf32-visium.c,
442 * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c,
443 * elf64-bpf.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mmix.c,
444 * elf64-ppc.c, * elf64-s390.c, * elf64-sparc.c, * elf64-x86-64.c,
445 * elflink.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c,
446 * elfxx-aarch64.c, * elfxx-mips.c, * elfxx-sparc.c,
447 * elfxx-tilegx.c, * elfxx-x86.c, * i386msdos.c, * linker.c,
448 * mach-o.c, * mmo.c, * opncls.c, * pdp11.c, * pei-x86_64.c,
449 * peicode.h, * reloc.c, * section.c, * syms.c, * vms-alpha.c,
450 * xcofflink.c: Update throughout for bfd section macro and function
453 2019-09-18 Alan Modra <amodra@gmail.com>
455 * bfd-in.h (bfd_asymbol_section): Rename from bfd_get_section.
456 (bfd_get_output_section): Delete.
457 (bfd_asymbol_base): Delete.
458 (bfd_asymbol_section, bfd_asymbol_value, bfd_asymbol_name),
459 (bfd_asymbol_bfd, bfd_asymbol_flavour): Tidy.
460 (bfd_set_asymbol_name): New macro.
461 * bfd-in2.h: Regenerate.
462 * aout-cris.c: Update throughout to use bfd_asymbol_section.
464 * cofflink.c: Likewise.
465 * dwarf2.c: Likewise.
468 * elf32-arm.c: Likewise.
469 * elf32-mips.c: Likewise.
470 * elf32-score.c: Likewise.
471 * elf32-score7.c: Likewise.
472 * elfn32-mips.c: Likewise.
473 * elfnn-aarch64.c: Likewise.
474 * elfxx-mips.c: Likewise.
475 * linker.c: Likewise.
477 * elf64-mmix.c (mmix_elf_reloc): Part expand bfd_get_output_section.
479 2019-09-18 Simon Marchi <simon.marchi@polymtl.ca>
481 * Makefile.in: Re-generate.
482 * configure: Re-generate.
483 * doc/Makefile.in: Re-generate.
485 2019-09-18 Alan Modra <amodra@gmail.com>
487 * aoutx.h (slurp_symbol_table): Don't set symcount using bfd_get
489 * pdp11.c (slurp_symbol_table): Likewise.
490 * som.c (som_slurp_symbol_table): Likewise.
491 * coff-ppc.c (ppc_bfd_coff_final_link): Likewise.
492 * coffcode.h (coff_slurp_symbol_table): Likewise.
493 * cofflink.c (_bfd_coff_final_link): Likewise.
494 * ecoff.c (ecoff_slurp_symbolic_header): Likewise.
495 (_bfd_ecoff_slurp_symbolic_info): Likewise.
496 (_bfd_ecoff_slurp_symbol_table): Likewise.
497 (_bfd_ecoff_bfd_final_link): Likewise.
498 * elf.c (_bfd_elf_canonicalize_symtab): Likewise.
499 * elflink.c (elf_link_output_symstrtab): Likewise.
500 (bfd_elf_final_link): Likewise.
501 * peicode.h (pe_ILF_build_a_bfd): Likewise.
502 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
503 * aoutx.h (some_aout_object_p, slurp_symbol_table): Don't set
504 start_address or symcount using bfd_get macros.
505 * coffgen.c (coff_real_object_p): Likewise.
506 * pdp11.c (some_aout_object_p, slurp_symbol_table): Likewise.
507 * som.c (som_object_setup, som_slurp_symbol_table): Likewise.
508 * elfcore.h (elf_core_file_p): Don't set start_address using
510 * elf.c (_bfd_elf_canonicalize_dynamic_symtab): Don't set dynsymcount
512 * bfd.c (bfd_set_file_flags): Don't set flags using bfd_get macro.
513 * linker.c (bfd_generic_link_read_symbols): Don't set outsymbols
514 or symcount using bfd_get macros.
515 (_bfd_generic_final_link, generic_add_output_symbol): Likewise.
516 * syms.c (bfd_set_symtab): Likewise.
517 * vms-alpha.c (alpha_vms_bfd_final_link): Likewise.
518 * archive.c (do_slurp_bsd_armap): Don't set has_armap using
520 (do_slurp_coff_armap, bfd_slurp_armap): Likewise.
521 * archive64.c (_bfd_archive_64_bit_slurp_armap): Likewise.
522 * coff-rs6000.c (_bfd_xcoff_slurp_armap): Likewise.
523 * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
524 * ecoff.c (_bfd_ecoff_slurp_armap): Likewise.
525 * som.c (som_slurp_armap): Likewise.
527 2019-09-18 Alan Modra <amodra@gmail.com>
529 * archures.c (bfd_get_arch): Make param const.
530 (bfd_get_mach, bfd_arch_bits_per_byte): Likewise.
531 (bfd_arch_bits_per_address, bfd_octets_per_byte): Likewise.
532 * bfd-in2.h: Regenerate.
534 2019-09-18 Alan Modra <amodra@gmail.com>
536 * bfd-in.h (carsym.name): Make const.
537 * reloc.c (struct reloc_howto_struct.name): Likewise.
538 * targets.c (bfd_target.name): Likewise.!
539 * bfd.c (bfd_get_sign_extend_vma): Make variable const.
540 * som.c (som_bfd_fill_in_ar_symbols): Use an intermediary variable
541 when setting carsym.name.
542 * bfd-in2.h: Regenerate.
544 2019-09-18 Alan Modra <amodra@gmail.com>
546 * mach-o.c (bfd_mach_o_fat_member_init): Likewise. Replace
547 xstrdup and xmalloc with bfd_strdup and bfd_malloc. Return an
548 error status. Adjust calls.
549 * vms-lib.c (_bfd_vms_lib_get_module): Test mhd->id earlier.
550 Close bfd on failure. Replace xstrdup/bfd_alloc use with
551 bfd_malloc. Use bfd_set_filename.
553 2019-09-18 Alan Modra <amodra@gmail.com>
555 * elf64-ppc.c (must_be_dyn_reloc): Return 0 for TOC16 relocs.
556 (ppc64_elf_check_relocs): Support dynamic/copy relocs for TOC16.
557 (ppc64_elf_adjust_dynamic_symbol): Don't keep dynamic reloc when
558 needs_copy even if all relocs are in rw sections.
559 (dec_dynrel_count): Handle TOC16 relocs.
560 (ppc64_elf_relocate_section): Support dynamic relocs for TOC16.
561 (ppc64_elf_finish_dynamic_symbol): Adjust to handle needs_copy
564 2019-09-16 Phil Blundell <pb@pbcl.net>
566 * version.m4: Set version to 2.33.50.
567 * Makefile.in, configure, doc/Makefile.in: Regenerated.
569 2019-09-11 Tom Tromey <tom@tromey.com>
571 * opncls.c (bfd_set_filename): New function.
572 * bfd-in2.h: Regenerate.
574 2019-09-11 Alan Modra <amodra@gmail.com>
576 * targets.c (struct bfd_target): Add _bfd_group_name.
577 (BFD_JUMP_TABLE): Likewise.
578 * coffgen.c (bfd_coff_group_name): New function.
579 * elf.c (bfd_elf_group_name): New function.
580 * linker.c (_bfd_nolink_bfd_group_name): New function.
581 * section.c (bfd_generic_group_name): New function.
582 * elf-bfd.h (bfd_elf_group_name): Declare.
583 * libbfd-in.h (_bfd_nolink_bfd_group_name): Declare.
584 * libcoff-in.h (bfd_coff_group_name): Declare.
585 * aout-target.h (MY_bfd_group_name): Define.
586 * aout-tic30.c (MY_bfd_group_name): Define.
587 * bfd.c (bfd_group_name): Define.
588 * binary.c (binary_bfd_group_name): Define.
589 * coff-alpha.c (_bfd_ecoff_bfd_group_name): Define.
590 * coff-mips.c (_bfd_ecoff_bfd_group_name): Define.
591 * coff-rs6000.c (_bfd_xcoff_bfd_group_name): Define.
592 * coffcode.h (coff_bfd_group_name): Define.
593 * elfxx-target.h (bfd_elfNN_bfd_group_name): Define.
594 * i386msdos.c (msdos_bfd_group_name): Define.
595 * ihex.c (ihex_bfd_group_name): Define.
596 * mach-o-target.c (bfd_mach_o_bfd_group_name): Define.
597 * mmo.c (mmo_bfd_group_name): Define.
598 * pef.c (bfd_pef_bfd_group_name): Define.
599 * plugin.c (bfd_plugin_bfd_group_name): Define.
600 * ppcboot.c (ppcboot_bfd_group_name): Define.
601 * som.c (som_bfd_group_name): Define.
602 * srec.c (srec_bfd_group_name): Define.
603 * tekhex.c (tekhex_bfd_group_name): Define.
604 * verilog.c (verilog_bfd_group_name): Define.
605 * vms-alpha.c (vms_bfd_group_name, alpha_vms_bfd_group_name): Define.
606 * xsym.c (bfd_sym_bfd_group_name): Define.
607 * coff64-rs6000.c (rs6000_xcoff64_vec): Init new field.
608 (rs6000_xcoff64_aix_vec): Likewise.
609 * bfd-in2.h: Regenerate.
610 * libbfd.h: Regenerate.
611 * libcoff.h: Regenerate.
613 2019-09-10 Nick Clifton <nickc@redhat.com>
616 * archures.c (bfd_arch_info_type): Add max_reloc_offset_into_insn
618 (bfd_default_arch_struct): Initialise the new field.
619 * bfd-in2.h: Regenerate.
620 * cpu-aarch64.c: Initialise the new field.
621 * cpu-alpha.c: Likewise.
622 * cpu-arc.c: Likewise.
623 * cpu-arm.c: Likewise.
624 * cpu-avr.c: Likewise.
625 * cpu-bfin.c: Likewise.
626 * cpu-bpf.c: Likewise.
627 * cpu-cr16.c: Likewise.
628 * cpu-cr16c.c: Likewise.
629 * cpu-cris.c: Likewise.
630 * cpu-crx.c: Likewise.
631 * cpu-csky.c: Likewise.
632 * cpu-d10v.c: Likewise.
633 * cpu-d30v.c: Likewise.
634 * cpu-dlx.c: Likewise.
635 * cpu-epiphany.c: Likewise.
636 * cpu-fr30.c: Likewise.
637 * cpu-frv.c: Likewise.
638 * cpu-ft32.c: Likewise.
639 * cpu-h8300.c: Likewise.
640 * cpu-hppa.c: Likewise.
641 * cpu-i386.c: Likewise.
642 * cpu-ia64.c: Likewise.
643 * cpu-iamcu.c: Likewise.
644 * cpu-ip2k.c: Likewise.
645 * cpu-iq2000.c: Likewise.
646 * cpu-k1om.c: Likewise.
647 * cpu-l1om.c: Likewise.
648 * cpu-lm32.c: Likewise.
649 * cpu-m10200.c: Likewise.
650 * cpu-m10300.c: Likewise.
651 * cpu-m32c.c: Likewise.
652 * cpu-m32r.c: Likewise.
653 * cpu-m68hc11.c: Likewise.
654 * cpu-m68hc12.c: Likewise.
655 * cpu-m68k.c: Likewise.
656 * cpu-m9s12x.c: Likewise.
657 * cpu-m9s12xg.c: Likewise.
658 * cpu-mcore.c: Likewise.
659 * cpu-mep.c: Likewise.
660 * cpu-metag.c: Likewise.
661 * cpu-microblaze.c: Likewise.
662 * cpu-mips.c: Likewise.
663 * cpu-mmix.c: Likewise.
664 * cpu-moxie.c: Likewise.
665 * cpu-msp430.c: Likewise.
666 * cpu-mt.c: Likewise.
667 * cpu-nds32.c: Likewise.
668 * cpu-nfp.c: Likewise.
669 * cpu-nios2.c: Likewise.
670 * cpu-ns32k.c: Likewise.
671 * cpu-or1k.c: Likewise.
672 * cpu-pdp11.c: Likewise.
673 * cpu-pj.c: Likewise.
674 * cpu-plugin.c: Likewise.
675 * cpu-powerpc.c: Likewise.
676 * cpu-pru.c: Likewise.
677 * cpu-riscv.c: Likewise.
678 * cpu-rl78.c: Likewise.
679 * cpu-rs6000.c: Likewise.
680 * cpu-rx.c: Likewise.
681 * cpu-s12z.c: Likewise.
682 * cpu-s390.c: Likewise.
683 * cpu-score.c: Likewise.
684 * cpu-sh.c: Likewise.
685 * cpu-sparc.c: Likewise.
686 * cpu-spu.c: Likewise.
687 * cpu-tic30.c: Likewise.
688 * cpu-tic4x.c: Likewise.
689 * cpu-tic54x.c: Likewise.
690 * cpu-tic6x.c: Likewise.
691 * cpu-tic80.c: Likewise.
692 * cpu-tilegx.c: Likewise.
693 * cpu-tilepro.c: Likewise.
694 * cpu-v850.c: Likewise.
695 * cpu-v850_rh850.c: Likewise.
696 * cpu-vax.c: Likewise.
697 * cpu-visium.c: Likewise.
698 * cpu-wasm32.c: Likewise.
699 * cpu-xc16x.c: Likewise.
700 * cpu-xgate.c: Likewise.
701 * cpu-xstormy16.c: Likewise.
702 * cpu-xtensa.c: Likewise.
703 * cpu-z80.c: Likewise.
704 * cpu-z8k.c: Likewise.
706 2019-09-09 Phil Blundell <pb@pbcl.net>
708 binutils 2.33 branch created.
710 2019-09-06 Alan Modra <amodra@gmail.com>
712 * aout-target.h (object_p): Formatting.
713 * bfd-in.h (bfd_get_filename): Don't cast to char*.
714 * corefile.c (generic_core_file_matches_executable_p): Constify
715 variables and remove cast.
716 * bfd-in2.h: Regenerate.
718 2019-09-05 Alan Modra <amodra@gmail.com>
720 * elf64-ppc.c (ppc64_elf_check_relocs): Interpret an addend in
721 GOT_PCREL and PLT_PCREL relocs as affecting the value stored
722 in the GOT/PLT entry rather than affecting the offset to that
724 (ppc64_elf_edit_toc, ppc64_elf_relocate_section): Likewise.
726 2019-09-05 Alan Modra <amodra@gmail.com>
728 * elf64-ppc.c (xlate_pcrel_opt): Handle prefix loads and stores
729 in second instruction.
730 (ppc64_elf_relocate_section): Likewise.
732 2019-09-05 Alan Modra <amodra@gmail.com>
735 * libbfd-in.h (bfd_strdup): New inline function.
736 * archive.c (_bfd_get_elt_at_filepos): Use bfd_strdup. Close
738 * elfcode.h (_bfd_elf_bfd_from_remote_memory): Use bfd_strdup.
739 * opncls.c (bfd_fopen): Use bfd_strdup. Close fd and stream
741 (bfd_openstreamr): Use bfd_strdup.
742 (bfd_openr_iovec, bfd_openw, bfd_create): Likewise.
743 * plugin.c (try_load_plugin): Use bfd_malloc.
744 * libbfd.h: Regenerate.
746 2019-09-02 Alan Modra <amodra@gmail.com>
749 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Free debug_filename
751 (read_alt_indirect_string): Likewise.
752 (read_alt_indirect_ref): Likewise.
754 2019-08-31 Jim Wilson <jimw@sifive.com>
757 * elfnn-riscv.c (riscv_elf_create_dynamic_sections): Add SEC_LOAD,
758 SEC_DATA, and SEC_HAS_CONTENTS to .tdata.dyn section.
760 2019-08-30 Jim Wilson <jimw@sifive.com>
762 * elfnn-riscv.c (riscv_elf_relocate_section): For unresolvable reloc
763 error, call bfd_set_error, set ret to FALSE, and goto out label.
765 2019-08-30 H.J. Lu <hongjiu.lu@intel.com>
768 * archive.c (_bfd_get_elt_at_filepos): Copy BFD_COMPRESS,
769 BFD_DECOMPRESS and BFD_COMPRESS_GABI flags for thin archive.
771 2019-08-29 Alan Modra <amodra@gmail.com>
774 * elf32-ppc.c (ppc_elf_check_relocs): Call bad_shared_reloc
775 when !bfd_link_executable for R_PPC_EMB_SDA2I16 and
776 R_PPC_EMB_SDA2REL. Don't call bad_shared_reloc for any other
779 2019-08-29 Alan Modra <amodra@gmail.com>
781 * elf64-ppc.c (xlate_pcrel_opt): Add poff parameter. Allow offset
782 on second insn, return it in poff.
783 (ppc64_elf_relocate_section): Add offset to paddi addend for
786 2019-08-28 Jim Wilson <jimw@sifive.com>
788 * elfnn-riscv.c (_bfd_riscv_relax_lui): Add check to exclude abs
789 section when setting max_alignment. Update comment.
790 (_bfd_riscv_relax_pc): Likewise.
792 2019-08-29 Alan Modra <amodra@gmail.com>
795 * bfd.c (struct bfd): Add no_element_cache.
796 * archive.c (_bfd_get_elt_at_filepos): Don't add element to
797 archive cache when no_element_cache.
798 (bfd_generic_archive_p): Set no_element_cache when opening first
799 element to check format. Close first element too.
800 (do_slurp_bsd_armap): Don't zero ardata->cache here.
801 * bfd-in2.h: Regenerate.
803 2019-08-24 Alan Modra <amodra@gmail.com>
805 * elf64-ppc.c (ppc64_elf_edit_toc): Exclude undefined weak
806 symbols from GOT optimisation.
808 2019-08-23 Stafford Horne <shorne@gmail.com>
810 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Use correct value for
813 2019-08-23 Nick Clifton <nickc@redhat.com>
816 * elf.c (bfd_section_from_shdr): Issue an informative warning
817 message and continue processing other sections after encountering
818 a reloc section for a section which already has other relocs
821 2019-08-23 Alan Modra <amodra@gmail.com>
824 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Don't exit
825 on error without freeing plts[] contents.
827 2019-08-22 Dennis Zhang <dennis.zhang@arm.com>
829 * cpu-arm.c: New entries for Cortex-M35P, Cortex-A77, Cortex-A76AE.
831 2019-08-22 Nick Clifton <nickc@redhat.com>
834 * pei-x86_64.c (pex64_xdata_print_uwd_codes): Add checks before
835 reading data from extra records.
837 2019-08-22 Tamar Christina <tamar.christina@arm.com>
840 * elfnn-aarch64.c (aarch64_relocate): Handle weak TLS and undefined TLS.
841 Also Pass input_bfd to _bfd_aarch64_elf_resolve_relocation.
842 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Use it.
843 * elfxx-aarch64.h (_bfd_aarch64_elf_resolve_relocation): Emit warning
846 2019-08-22 Alan Modra <amodra@gmail.com>
848 * elf32-arm.c (cmse_scan): Don't use ARM_GET_SYM_CMSE_SPCL,
849 instead recognize CMSE_PREFIX in symbol name.
850 (elf32_arm_gc_mark_extra_sections): Likewise.
851 (elf32_arm_filter_cmse_symbols): Don't test ARM_GET_SYM_CMSE_SPCL.
852 (elf32_arm_swap_symbol_in): Don't invoke ARM_SET_SYM_CMSE_SPCL.
854 2019-08-20 Dennis Zhang <dennis.zhang@arm.com>
856 * cpu-aarch64.c: New entries for Cortex-A34, Cortex-A65,
857 Cortex-A77, cortex-A65AE, and Cortex-A76AE.
859 2019-08-20 Tamar Christina <tamar.christina@arm.com>
861 * elf32-arm.c (elf32_thumb2_plt_entry, elf32_arm_plt_thumb_stub,
862 elf32_arm_stub_long_branch_v4t_thumb_thumb,
863 elf32_arm_stub_long_branch_v4t_thumb_arm,
864 elf32_arm_stub_short_branch_v4t_thumb_arm,
865 elf32_arm_stub_long_branch_v4t_thumb_arm_pic,
866 elf32_arm_stub_long_branch_v4t_thumb_thumb_pic,
867 elf32_arm_stub_long_branch_v4t_thumb_tls_pic): Change nop to branch to
868 previous instruction.
870 2019-08-19 Tom Tromey <tromey@adacore.com>
872 * dwarf2.c (_bfd_dwarf2_find_symbol_bias): Create hash table
875 2019-08-19 Alan Modra <amodra@gmail.com>
877 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Rename has_gotrel
879 (struct _ppc64_elf_section_data): Likewise.
880 (ppc64_elf_check_relocs): Set has_optrel for more relocs.
881 (ppc64_elf_edit_toc): Do ha/lo insn checks in GOT loop rather
882 than TOC loop. Check PLT16 insns too.
884 2019-08-16 H.J. Lu <hongjiu.lu@intel.com>
887 * elf64-x86-64.c (elf_x86_64_check_relocs): Move PIC check for
888 PC-relative relocations back to ...
889 (elf_x86_64_relocate_section): Here.
891 2019-08-16 Martin Liska <mliska@suse.cz>
894 * elflink.c: Report error only for not relocatable.
895 * linker.c (_bfd_generic_link_add_one_symbol): Do not handle
896 here lto_slim_object as it's handled in caller.
898 2019-08-16 Alan Modra <amodra@gmail.com>
900 * elf32-ppc.c (ppc_elf_relocate_section): Optimize unaligned relocs.
902 2019-08-15 Jim Wilson <jimw@sifive.com>
904 * elfnn-riscv.c (perform_relocation) <R_RISCV_RVC_LUI>: If
905 RISCV_CONST_HIGH_PART (value) is zero, then convert c.lui instruction
906 to c.li instruction, and use ENCODE_RVC_IMM to set value.
908 2019-08-15 Tom Tromey <tromey@adacore.com>
910 * dwarf2.c (scan_unit_for_symbols): Check for end of CU, not end
913 2019-08-14 Alan Modra <amodra@gmail.com>
916 * dwarf2.c (stash_comp_unit): New function, extracted from..
917 (_bfd_dwarf2_find_nearest_line): ..here.
918 (find_abstract_instance): Parse comp units and decode line info
921 2019-08-14 Alan Modra <amodra@gmail.com>
923 * dwarf2.c (comp_unit_maybe_decode_line_info): Declare.
924 (comp_unit_find_nearest_line): Use it here..
925 (_bfd_dwarf2_find_symbol_bias): ..and here.
927 2019-08-14 Alan Modra <amodra@gmail.com>
929 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Remove addr_size parameter.
930 * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype.
931 * coffgen.c (coff_find_nearest_line_with_names): Adjust
932 _bfd_dwarf2_find_nearest_line calls.
933 * elf.c (_bfd_elf_find_nearest_line, _bfd_elf_find_line): Likewise.
934 * elf32-arm.c (elf32_arm_find_nearest_line): Likewise.
935 * elf64-alpha.c (elf64_alpha_find_nearest_line): Likewise.
936 * elfnn-aarch64.c (elfNN_aarch64_find_nearest_line): Likewise.
937 * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): Likewise.
938 * mach-o.c (bfd_mach_o_find_nearest_line): Likewise.
939 * libbfd.h: Regenerate.
941 2019-08-09 Mihailo Stojanovic <mihailo.stojanovic@rt-rk.com>
943 * elf-bfd.h (struct elf_backend_data): New members.
944 * elflink.c (_bfd_elf_link_create_dynamic_sections): Create
945 .gnu.hash section if necessary.
946 (struct collect_gnu_hash_codes): New member.
947 (elf_gnu_hash_process_symidx): New function name.
948 (elf_renumber_gnu_hash_syms): Ignore local and undefined
949 symbols. Record xlat location for every symbol which should have
951 (bfd_elf_size_dynamic_sections): Add DT_GNU_HASH dynamic tag to
952 dynamic section if necessary.
953 (GNU_HASH_SECTION_NAME): New define.
954 (bfd_elf_size_dynsym_hash_dynstr): Get .MIPS.xhash section.
955 Update the section size info.
956 * elfxx-mips.c (struct mips_elf_hash_sort_data): New members.
957 (struct mips_elf_link_hash_entry): New member.
958 (mips_elf_link_hash_newfunc): Initialize .MIPS.xhash translation
960 (mips_elf_sort_hash_table): Initialize the pointer to the
962 (mips_elf_sort_hash_table_f): Populate the .MIPS.xhash
963 translation table entry with the symbol dynindx.
964 (_bfd_mips_elf_section_from_shdr): Add SHT_MIPS_XHASH.
965 (_bfd_mips_elf_fake_sections): Initialize .MIPS.xhash section
967 (_bfd_mips_elf_create_dynamic_sections): Create .MIPS.xhash
969 (_bfd_mips_elf_size_dynamic_sections): Add DT_MIPS_XHASH tag to
971 (_bfd_mips_elf_finish_synamic_sections): Add DT_MIPS_XHASH.
972 (_bfd_mips_elf_final_write_processing): Set .MIPS.xhash section
974 (_bfd_mips_elf_get_target_dtag): Get DT_MIPS_XHASH tag.
975 (MIPS_LIBC_ABI_XHASH): New ABI version enum value.
976 (_bfd_mips_post_process_headers): Mark the ABI version as
977 MIPS_LIBC_ABI_XHASH if there exists a .MIPS.xhash section,
978 but not a .hash section.
979 (_bfd_mips_elf_record_xhash_symbol): New function. Record a
980 position in the translation table, associated with the hash
982 * elfxx-mips.h (literal_reloc_p): Define
983 elf_backend_record_xhash_symbol backend hook.
984 * elfxx-target.h: Initialize elf_backend_record_xhash_symbol
987 2019-08-07 Jose E. Marchesi <jose.marchesi@oracle.com>
989 * elf64-bpf.c (bpf_elf_relocate_section): New function.
990 (bpf_elf_insn_disp_reloc): Delete function.
991 (elf_backend_relocate_section): Define.
993 2019-08-07 Alan Modra <amodra@gmail.com>
996 * archive64.c (_bfd_archive_64_bit_slurp_armap): Properly check
997 for overflow in expressions involving nsymz.
999 2019-08-01 Ilia Diachkov <ilia.diachkov@optimitech.com>
1001 * elfnn-riscv.c (_bfd_riscv_relax_lui): Set lui relax safety area to
1002 two pages in relro presence.
1004 2019-08-01 Max Filippov <jcmvbkbc@gmail.com>
1006 * elf32-xtensa.c (insn_num_slots, get_rsr_lend_opcode)
1007 (get_wsr_lbeg_opcode): New functions.
1008 (check_loop_aligned): Detect relaxed loops and adjust loop_len
1009 and insn_len for the first actual instruction of the loop.
1011 2019-07-30 Alan Modra <amodra@gmail.com>
1014 * bfd.c (struct bfd): Add lto_slim_object flag.
1015 * bfd-in2.h: Regenerate.
1017 2019-07-29 Martin Liska <mliska@suse.cz>
1020 * archive.c (_bfd_compute_and_write_armap): Come up with
1021 report_plugin_err variable.
1022 * bfd-in2.h (struct bfd): Add lto_slim_object flag.
1023 * elf.c (struct lto_section): New.
1024 (_bfd_elf_make_section_from_shdr): Parse content of
1025 .gnu_lto_.lto section.
1026 * elflink.c: Report error for a missing LTO plugin.
1027 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
1029 2019-07-28 Alan Modra <amodra@gmail.com>
1033 * elflink.c (elf_link_add_object_symbols): Report an informative
1034 error on finding local symbols with index equal or greater than
1035 symbol table sh_info. Correct comment. Allow such symbols in
1036 dynamic objects. Abort on NULL section for symbol.
1038 2019-07-26 Alan Modra <amodra@gmail.com>
1040 * elf-bfd.h (struct output_elf_obj_tdata): Delete "linker" field.
1041 (elf_linker): Don't define.
1042 * elflink.c (bfd_elf_final_link): Don't set elf_linker.
1044 2019-07-25 YunQiang Su <syq@debian.org>
1047 * elfxx-mips.c (mips_set_isa_flags): Default to MIPS 3 for 64-bit
1050 2019-07-24 Claudiu Zissulescu <claziss@synopsys.com>
1052 * elf32-arc.c (bfd_get_32_me): Add a small description, fix
1054 (reloc_type_to_name): Fix formating.
1055 (arc_elf_object_p): Likewise.
1056 (debug_arc_reloc): Likewise.
1057 (arc_do_relocation): Likewise.
1059 2019-07-24 Claudiu Zissulescu <claziss@synopsys.com>
1061 * elf32-arc.c (bfd_get_32_me): New function.
1062 (bfd_put_32_me): Likewise.
1063 (arc_elf_relax_section): Likewise.
1064 (bfd_elf32_bfd_relax_section): Define.
1066 2019-07-24 Alan Modra <amodra@gmail.com>
1068 * elf-bfd.h (struct elf_backend_data): Return bfd_boolean from
1069 elf_backend_final_write_processing, don't pass linker arg.
1070 (_bfd_elf_final_write_processing): Update prototype.
1071 * elf.c (_bfd_elf_write_object_contents): Adjust call.
1072 (_bfd_elf_final_write_processing): Return error on incompatible
1073 OSABI and has_gnu_osabi. Remove linker arg.
1074 * elf-nacl.h (nacl_final_write_processing): Update prototype.
1075 * elf-vxworks.h (elf_vxworks_final_write_processing): Likewise.
1076 * elfxx-mips.h (_bfd_mips_final_write_processing): Likewise.
1077 (_bfd_mips_elf_final_write_processing): Likewise.
1078 * elf-hppa.h (elf_hppa_final_write_processing): Return status
1079 and remove linker arg.
1080 * elf-m10300.c (_bfd_mn10300_elf_final_write_processing): Likewise.
1081 * elf-nacl.c (nacl_final_write_processing): Likewise.
1082 * elf-vxworks.c (elf_vxworks_final_write_processing): Likewise.
1083 * elf32-arc.c (arc_elf_final_write_processing): Likewise.
1084 * elf32-arm.c (arm_final_write_processing): Likewise.
1085 (elf32_arm_final_write_processing): Likewise.
1086 (elf32_arm_nacl_final_write_processing): Likewise.
1087 (elf32_arm_vxworks_final_write_processing): Likewise.
1088 * elf32-avr.c (bfd_elf_avr_final_write_processing): Likewise.
1089 * elf32-bfin.c (elf32_bfin_final_write_processing): Likewise.
1090 * elf32-cr16.c (_bfd_cr16_elf_final_write_processing): Likewise.
1091 * elf32-cris.c (cris_elf_final_write_processing): Likewise.
1092 * elf32-h8300.c (elf32_h8_final_write_processing): Likewise.
1093 * elf32-lm32.c (lm32_elf_final_write_processing): Likewise.
1094 * elf32-m32r.c (m32r_elf_final_write_processing): Likewise.
1095 * elf32-m68k.c (elf_m68k_final_write_processing): Likewise.
1096 * elf32-mips.c (mips_vxworks_final_write_processing): Likewise.
1097 * elf32-msp430.c (bfd_elf_msp430_final_write_processing): Likewise.
1098 * elf32-nds32.c (nds32_elf_final_write_processing): Likewise.
1099 * elf32-or1k.c (or1k_elf_final_write_processing): Likewise.
1100 * elf32-pj.c (pj_elf_final_write_processing): Likewise.
1101 * elf32-ppc.c (ppc_final_write_processing): Likewise.
1102 (ppc_elf_final_write_processing): Likewise.
1103 (ppc_elf_vxworks_final_write_processing): Likewise.
1104 * elf32-sparc.c (sparc_final_write_processing): Likewise.
1105 (elf32_sparc_final_write_processing): Likewise.
1106 (elf32_sparc_vxworks_final_write_processing): Likewise.
1107 * elf32-v850.c (v850_elf_final_write_processing): Likewise.
1108 * elf32-xc16x.c (elf32_xc16x_final_write_processing): Likewise.
1109 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
1110 * elf64-ia64-vms.c (elf64_vms_final_write_processing): Likewise.
1111 * elfnn-ia64.c (elfNN_ia64_final_write_processing): Likewise.
1112 * elfxx-mips.c (_bfd_mips_final_write_processing): Likewise.
1113 (_bfd_mips_elf_final_write_processing): Likewise.
1115 2019-07-24 Alan Modra <amodra@gmail.com>
1117 * elf-vxworks.c (elf_vxworks_final_write_processing): Don't return
1119 * elf32-arc.c (arc_elf_final_write_processing): Likewise.
1120 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
1122 2019-07-24 Alan Modra <amodra@gmail.com>
1124 * elf32-visium.c (visium_elf_post_process_headers): Don't set
1125 EI_OSABI header byte here.
1126 (ELF_OSABI): Define.
1128 2019-07-23 Alan Modra <amodra@gmail.com>
1130 * elf-bfd.h (enum elf_gnu_osabi): Add elf_gnu_osabi_mbind.
1131 * elf.c (_bfd_elf_make_section_from_shdr): Set elf_gnu_osabi_mbind.
1132 (get_program_header_size): Formatting. Only test SH_GNU_MBIND
1133 when elf_gnu_osabi_mbind is set.
1134 (_bfd_elf_map_sections_to_segments): Likewise.
1135 (_bfd_elf_init_private_section_data): Likewise.
1136 (_bfd_elf_final_write_processing): Update comment.
1137 * elf64-hppa.c (elf64_hppa_special_sections): Move .tbss entry.
1138 (elf_backend_special_sections): Define without .tbss for linux.
1140 2019-07-23 Alan Modra <amodra@gmail.com>
1142 * elf-bfd.h (enum elf_gnu_osabi): Rename from elf_gnu_symbols.
1143 Remove none, any, all enums.
1144 (struct elf_obj_tdata): Rename has_gnu_symbols field to has_gnu_osabi.
1145 (_bfd_elf_final_write_processing): Declare.
1146 * elf.c (_bfd_elf_write_object_contents): Unconditionally call
1147 elf_backend_final_write_processing.
1148 (_bfd_elf_post_process_headers): Move body of function to..
1149 (_bfd_elf_final_write_processing): ..here, but set EI_OSABI byte
1150 only when not already set. Adjust for rename.
1151 * elfxx-target.h (elf_backend_final_write_processing): Default to
1152 _bfd_elf_final_write_processing.
1153 * elf-hppa.h (elf_hppa_final_write_processing): Call
1154 _bfd_elf_final_write_processing.
1155 * elf-m10300.c (_bfd_mn10300_elf_final_write_processing): Likewise.
1156 * elf-nacl.c (nacl_final_write_processing): Likewise.
1157 * elf-vxworks.c (elf_vxworks_final_write_processing): Likewise.
1158 * elf32-arc.c (arc_elf_final_write_processing): Likewise.
1159 * elf32-avr.c (bfd_elf_avr_final_write_processing): Likewise.
1160 * elf32-bfin.c (elf32_bfin_final_write_processing): Likewise.
1161 * elf32-cr16.c (_bfd_cr16_elf_final_write_processing): Likewise.
1162 * elf32-cris.c (cris_elf_final_write_processing): Likewise.
1163 * elf32-h8300.c (elf32_h8_final_write_processing): Likewise.
1164 * elf32-lm32.c (lm32_elf_final_write_processing): Likewise.
1165 * elf32-m32r.c (m32r_elf_final_write_processing): Likewise.
1166 * elf32-m68k.c (elf_m68k_final_write_processing): Likewise.
1167 * elf32-msp430.c (bfd_elf_msp430_final_write_processing): Likewise.
1168 * elf32-nds32.c (nds32_elf_final_write_processing): Likewise.
1169 * elf32-or1k.c (or1k_elf_final_write_processing): Likewise.
1170 * elf32-pj.c (pj_elf_final_write_processing): Likewise.
1171 * elf32-v850.c (v850_elf_final_write_processing): Likewise.
1172 * elf32-xc16x.c (elf32_xc16x_final_write_processing): Likewise.
1173 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
1174 * elf64-ia64-vms.c (elf64_vms_final_write_processing): Likewise.
1175 * elfnn-ia64.c (elfNN_ia64_final_write_processing): Likewise.
1176 * elf32-arm.c (arm_final_write_processing): Split out from..
1177 (elf32_arm_final_write_processing): ..here. Call
1178 _bfd_elf_final_write_processing.
1179 (elf32_arm_nacl_final_write_processing): Adjust.
1180 * elfxx-mips.c (_bfd_mips_final_write_processing): Split out from..
1181 (_bfd_mips_elf_final_write_processing): ..here. Call
1182 _bfd_elf_final_write_processing.
1183 * elfxx-mips.h (_bfd_mips_final_write_processing): Declare.
1184 * elf32-mips.c (mips_vxworks_final_write_processing): Adjust.
1185 * elf32-ppc.c (ppc_final_write_processing): Split out from..
1186 (ppc_elf_final_write_processing): ..here. Call
1187 _bfd_elf_final_write_processing.
1188 (ppc_elf_vxworks_final_write_processing): Adjust.
1189 * elf32-sparc.c (sparc_final_write_processing): Split out from..
1190 (elf32_sparc_final_write_processing): ..here. Call
1191 _bfd_elf_final_write_processing.
1192 (elf32_sparc_vxworks_final_write_processing): Adjust.
1193 * elf32-d10v.c (elf_backend_final_write_processing): Don't define.
1194 * elf32-d30v.c (elf_backend_final_write_processing): Don't define.
1195 * elf32-m68hc11.c (elf_backend_final_write_processing): Don't define.
1196 * elf32-m68hc12.c (elf_backend_final_write_processing): Don't define.
1197 * elf32-s12z.c (elf_backend_final_write_processing): Don't define.
1198 * elf32-i386.c (elf_i386_check_relocs): Don't set has_gnu_symbols.
1199 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1200 * elflink.c (elf_link_add_object_symbols): Likewise.
1201 (elf_link_output_symstrtab): Set has_gnu_osabi for symbols here
1204 2019-07-23 Omar Majid <omajid@redhat.com>
1206 * coffcode.h (coff_set_arch_mach_hook): Handle I386_APPLE_MAGIC,
1207 I386_FREEBSD_MAGIC, I386_LINUX_MAGIC, I386_NETBSD_MAGIC,
1208 AMD64_APPLE_MAGIC, AMD64_FREEBSD_MAGIC, AMD64_LINUX_MAGIC,
1210 * peXXigen.c: Add comment about source of .NET magic numbers.
1212 2019-07-19 Alan Modra <amodra@gmail.com>
1214 * reloc.c (BFD_RELOC_PPC64_TPREL34, BFD_RELOC_PPC64_DTPREL34),
1215 (BFD_RELOC_PPC64_GOT_TLSGD34, BFD_RELOC_PPC64_GOT_TLSLD34),
1216 (BFD_RELOC_PPC64_GOT_TPREL34, BFD_RELOC_PPC64_GOT_DTPREL34),
1217 (BFD_RELOC_PPC64_TLS_PCREL): New pcrel tls relocs.
1218 * elf64-ppc.c (ppc64_elf_howto_raw): Add howtos for pcrel tls relocs.
1219 (ppc64_elf_reloc_type_lookup): Translate pcrel tls relocs.
1220 (must_be_dyn_reloc, dec_dynrel_count): Add R_PPC64_TPREL64.
1221 (ppc64_elf_check_relocs): Support pcrel tls relocs.
1222 (ppc64_elf_tls_optimize, ppc64_elf_relocate_section): Likewise.
1223 * bfd-in2.h: Regenerate.
1224 * libbfd.h: Regenerate.
1226 2019-07-18 Alan Modra <amodra@gmail.com>
1228 * elf64-ppc.c (ppc64_elf_relocate_section): Don't bother selecting
1229 a TLS section symbol for edited relocs. Tighten TLS symbol/reloc
1232 2019-07-18 Alan Modra <amodra@gmail.com>
1234 * elf64-ppc.c (TLS_EXPLICIT): Define as 256.
1235 (ppc64_elf_check_relocs): Don't store TLS_EXPLICIT even if char
1236 is more than 8 bits.
1237 (ppc64_elf_tls_optimize): Likewise. Make tls_set, tls_clear, and
1238 tls_type vars unsigned int.
1239 (ppc64_elf_relocate_section): Use r_type rather than TLS_EXPLICIT
1240 to select r_type edit.
1242 2019-07-18 Alan Modra <amodra@gmail.com>
1244 * elf32-ppc.c (TLS_GDIE): Rename from TLS_TPRELGD throughout file.
1246 * elf64-ppc.c (TLS_GDIE): Likewise.
1248 2019-07-18 Alan Modra <amodra@gmail.com>
1250 * elf64-ppc.c (ppc64_elf_tls_optimize): Correct test for allowed
1251 range of tp-relative offsets.
1253 2019-07-15 Alan Modra <amodra@gmail.com>
1255 * elflink.c (_bfd_elf_fix_symbol_flags): If the def for an
1256 alias is no longer bfd_link_hash_defined, clear the alias.
1258 2019-07-13 Alan Modra <amodra@gmail.com>
1260 * elflink.c (_bfd_elf_omit_section_dynsym_default): Don't keep
1262 (_bfd_elf_init_1_index_section): Prefer not using TLS sections.
1263 (_bfd_elf_init_2_index_sections): Likewise.
1264 * elf64-ppc.c (ppc64_elf_relocate_section): When emitting dynamic
1265 relocations for local TLS symbols, use STN_UNDEF as the relocation
1267 * elf32-ppc.c (ppc_elf_relocate_section): Likewise, and don't
1268 leave TLS symbol value in the addend.
1270 2019-07-08 Alan Modra <amodra@gmail.com>
1273 * elf32-ppc.c (_bfd_elf_ppc_set_arch): Sanity check .PPC.EMB.apuinfo
1274 size before reading first word.
1276 2019-07-02 Nick Clifton <nickc@redhat.com>
1279 * elf.c (is_debuginfo_file): New function.
1280 (assign_file_positions_for_non_load_sections): Do not warn about
1281 allocated sections outside of loadable segments if they are found
1282 in a debuginfo file.
1283 * elf-bfd.h (is_debuginfo_file): Prototype.
1285 2019-07-02 Nick Clifton <nickc@redhat.com>
1288 * compress.c (bfd_get_full_section_contents): Do not complain
1289 about linker created sections that are larger than the file size.
1291 2019-07-02 Christophe Lyon <christophe.lyon@linaro.org>
1293 * bfd/elf32-arm.c (CMSE_STUB_NAME): New define.
1294 (elf32_arm_get_stub_entry): Do not try to emit long-branch stubs
1296 (arm_dedicated_stub_output_section_name): Use CMSE_STUB_NAME.
1298 2019-07-02 Srinath Parvathaneni <srinath.parvathaneni@arm.com>
1300 * elf32-arm.c (elf32_arm_gc_mark_extra_sections): Mark debug
1301 sections when .text section contain secure entry functions
1304 2019-07-01 Nick Clifton <nickc@redhat.com>
1307 * elf32-arm.c (elf32_arm_update_relocs): Do not include the
1308 section VMA in the offset used to update exidx relocs.
1310 2019-06-28 Nick Clifton <nickc@redhat.com>
1313 * elf.c (_bfd_elf_slurp_version_tables): Check for an excessively
1314 large version reference section.
1315 * compress.c (bfd_get_full_section_contents): Check for an
1316 uncompressed section whose size is larger than the file size.
1318 2019-06-28 Alan Modra <amodra@gmail.com>
1320 * format.c (bfd_check_format_matches): Don't match plugin target
1321 if another target matches. Expand comment.
1322 * targets.c (_bfd_target_vector): Move plugin_vec after all other
1323 non-corefile targets, outside !SELECT_VECS.
1324 * config.bfd: Don't handle targ=plugin here.
1325 * configure.ac: Don't add plugin to enable_targets or handle in
1326 target loop setting selvecs and other target vars.
1327 * configure: Regenerate.
1329 2019-06-26 Nick Clifton <nickc@redhat.com>
1332 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add error
1333 messages for failures.
1334 * mach-o.c (bfd_mach_o_canonicalize_relocs): Set an bfd error code
1335 if returning an error value.
1337 2019-06-25 Jan Beulich <jbeulich@suse.com>
1339 * elf-properties.c (elf_find_and_remove_property): Rename last
1340 parameter. Mention it in comment.
1342 2019-06-24 Ilia Diachkov <ilia.diachkov@optimitech.com>
1344 * elfnn-riscv.c (_bfd_riscv_relax_lui): Delete early exit when
1345 SEC_MERGE or SEC_CODE flags are set.
1346 (_bfd_riscv_relax_section): New local symtype. Set sym_sec and
1347 symtype consistently. Don't include sec_addr (sym_sec) in symval.
1348 Add check for SEC_INFO_TYPE_MERGE and call _bfd_merged_section_offset.
1349 Add sec_addr (sym_sec) after handling merge sections.
1351 2019-06-24 H.J. Lu <hongjiu.lu@intel.com>
1354 * elf-properties.c (elf_merge_gnu_property_list): Remove the
1355 property after reporting property removal.
1357 2019-06-23 Alan Modra <amodra@gmail.com>
1360 * elf64-ppc.c (R_PPC64_GOT16_DS): Don't set has_gotrel.
1361 (ppc64_elf_edit_toc): Don't remove R_PPC64_GOT16_DS got entries.
1362 Reduce range of offsets allowed for other GOT relocs.
1364 2019-06-23 Alan Modra <amodra@gmail.com>
1367 * elfcode.h (elf_object_p): Warning fix.
1369 2019-06-21 Alan Modra <amodra@gmail.com>
1372 * elfcode.h (elf_object_p): Check type of e_shstrndx section.
1374 2019-06-19 Alan Modra <amodra@gmail.com>
1377 * elf32-ppc.c (ppc_elf_relocate_section): Don't read insn for
1378 R_PPC_EMB_RELSDA. Mask low bit of R_PPC_EMB_SDA21 r_offset.
1380 2019-06-19 Alan Modra <amodra@gmail.com>
1382 * elf64-ppc.c (ppc64_elf_inline_plt): Correct st_other test for
1383 functions that require r2 valid to use local entry.
1384 (ppc64_elf_size_stubs, ppc64_elf_relocate_section): Likewise.
1386 2019-06-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
1388 * elfnn-aarch64.c (elfNN_aarch64_allocate_local_dynrelocs): Remove.
1389 (elfNN_aarch64_size_dynamic_sections): Remove loc_hash_table traversal
1390 with elfNN_aarch64_allocate_local_dynrelocs.
1392 2019-06-14 Szabolcs Nagy <szabolcs.nagy@arm.com>
1394 * elfnn-aarch64.c: Enable MOVW_PREL relocs for ELF32.
1396 2019-06-14 Alan Modra <amodra@gmail.com>
1398 * Makefile.in: Regenerate.
1399 * configure: Regenerate.
1401 2019-06-14 Alan Modra <amodra@gmail.com>
1403 * elf64-ppc.c: Fix comments involving paddi.
1405 2019-06-12 Adam Lackorzymski <adam@os.inf.tu-dresden.de>
1408 * elf32-arm.c (arm_elf_find_function): Fail if the symol table is
1409 absent, or the bfd is not in the ELF formart.
1410 * elfnn-aarch64.c (aarch64_elf_find_function): Likewise.
1412 2019-06-10 Christos Zoulas <christos@zoulas.com>
1415 * elf.c (elfcore_make_auxv_note_section): New function.
1416 (elfcore_grok_note): Use it.
1417 (elfcore_grok_freebsd_note): Likewise.
1418 (elfcore_grok_openbsd_note): Likewise.
1419 (elfcore_grok_netbsd_note): Likewise. Plus add support for
1420 NT_NETBSDCORE_AUXV notes.
1422 2019-06-06 Sudakshina Das <sudi.das@arm.com>
1424 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Set
1425 alignment of the new gnu property section.
1427 2019-06-06 Sudakshina Das <sudi.das@arm.com>
1429 * bfd-in.h: Change comment.
1430 * bfd-in2.h: Regenerate.
1431 * elfnn-aarch64.c (elfNN_aarch64_merge_gnu_properties): Update warning.
1432 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties):
1435 2019-05-28 Faraz Shahbazker <fshahbazker@wavecomp.com>
1437 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_PCHI16>:
1438 Remove overflow check.
1440 2019-05-28 Alan Modra <amodra@gmail.com>
1443 * cofflink.c (coff_link_check_archive_element): Don't assume
1444 element is a coff object file after calling add_archive_element.
1446 2019-05-28 Alan Modra <amodra@gmail.com>
1449 * elf32-microblaze.c (microblaze_elf_finish_dynamic_sections): Don't
1450 attempt to set sh_entsize for excluded PLT section.
1452 2019-05-28 Alan Modra <amodra@gmail.com>
1455 * elf64-alpha.c (elf64_alpha_relocate_section): Don't attempt
1456 to emit R_ALPHA_GOTTPREL in PIEs, for which no space is
1457 allocated in alpha_dynamic_entries_for_reloc.
1459 2019-05-28 Alan Modra <amodra@gmail.com>
1462 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Don't segfault
1463 on NULL output_section.
1464 * elflink.c (elf_final_link_free): Don't free -1 symshndxbuf.
1466 2019-05-28 Alan Modra <amodra@gmail.com>
1469 * elf32-m68k.c (elf_m68k_get_got_entry): Don't create a new
1470 entry when MUST_FIND. Abort when MUST_FIND not found.
1471 (elf_m68k_get_bfd2got_entry): Likewise.
1472 (elf_m68k_relocate_section): Remove now useless assert.
1474 2019-05-28 Alan Modra <amodra@gmail.com>
1477 * elf64-hppa.c (elf64_hppa_finalize_dynreloc): Get the output bfd
1478 from bfd_link_info, not an output section owner.
1479 (elf64_hppa_finish_dynamic_symbol, elf64_hppa_finalize_opd): Likewise.
1480 (elf_hppa_final_link_relocate): Likewise.
1482 2019-05-28 Alan Modra <amodra@gmail.com>
1485 * aout-tic30.c (MY_bfd_final_link): Don't segfault on missing
1486 create_object_symbols_section, obj_textsec, obj_datasec or
1487 obj_bsssec. Fix other errors in placement.
1488 * config.bfd: Obsolete tic30-aout.
1490 2019-05-28 Alan Modra <amodra@gmail.com>
1493 * dwarf2.c (save_section_vma, section_vma_same): Check for NULL
1494 end of section list as well as section_count.
1495 * xcofflink.c (xcoff_link_add_symbols): Fix temporarily changed
1496 section list before returning error.
1498 2019-05-27 Alan Modra <amodra@gmail.com>
1500 * elf.c (bfd_elf_set_group_contents): Exit on zero size section.
1502 2019-05-27 Alan Modra <amodra@gmail.com>
1505 * linker.c (_bfd_generic_link_output_symbols): Heed BSF_KEEP.
1507 2019-05-24 Szabolcs Nagy <szabolcs.nagy@arm.com>
1509 * elfnn-aarch64.c (elfNN_aarch64_merge_symbol_attribute): New function.
1510 (struct elf_aarch64_link_hash_table): Add variant_pcs member.
1511 (elfNN_aarch64_allocate_dynrelocs): Update variant_pcs.
1512 (elfNN_aarch64_size_dynamic_sections): Add DT_AARCH64_VARIANT_PCS.
1513 (elf_backend_merge_symbol_attribute): Define.
1515 2019-05-24 Alan Modra <amodra@gmail.com>
1517 * po/SRC-POTFILES.in: Regenerate.
1519 2019-05-24 Alan Modra <amodra@gmail.com>
1521 * elf64-ppc.c: Comment on powerxx _notoc stub variants.
1522 (LI_R11_0, LIS_R11, ORI_R11_R11_0, SLDI_R11_R11_34): Define.
1523 (PADDI_R12_PC, PLD_R12_PC, D34, HA34): Define.
1524 (struct ppc_link_hash_table): Add powerxx_stubs.
1525 (ppc64_elf_check_relocs): Set powerxx_stubs.
1526 (build_powerxx_offset, size_powerxx_offset),
1527 (num_relocs_for_powerxx_offset),
1528 (emit_relocs_for_powerxx_offset): New functions.
1529 (plt_stub_size): Size powerxx stubs.
1530 (ppc_build_one_stub): Emit powerxx stubs.
1531 (ppc_size_one_stub): Size powerxx stubs. Omit .eh_frame for
1534 2019-05-24 Alan Modra <amodra@gmail.com>
1536 * elf64-ppc.c (ppc64_elf_check_relocs): Set has_gotrel for
1537 R_PPC64_GOT_PCREL34.
1538 (xlate_pcrel_opt): New function.
1539 (ppc64_elf_edit_toc): Handle R_PPC64_GOT_PCREL34.
1540 (ppc64_elf_relocate_section): Edit GOT indirect to GOT relative
1541 for R_PPC64_GOT_PCREL34. Implement R_PPC64_PCREL_OPT optimisation.
1543 2019-05-24 Alan Modra <amodra@gmail.com>
1545 * reloc.c (BFD_RELOC_PPC64_D34, BFD_RELOC_PPC64_D34_LO),
1546 (BFD_RELOC_PPC64_D34_HI30, BFD_RELOC_PPC64_D34_HA30),
1547 (BFD_RELOC_PPC64_PCREL34, BFD_RELOC_PPC64_GOT_PCREL34),
1548 (BFD_RELOC_PPC64_PLT_PCREL34),
1549 (BFD_RELOC_PPC64_ADDR16_HIGHER34, BFD_RELOC_PPC64_ADDR16_HIGHERA34),
1550 (BFD_RELOC_PPC64_ADDR16_HIGHEST34, BFD_RELOC_PPC64_ADDR16_HIGHESTA34),
1551 (BFD_RELOC_PPC64_REL16_HIGHER34, BFD_RELOC_PPC64_REL16_HIGHERA34),
1552 (BFD_RELOC_PPC64_REL16_HIGHEST34, BFD_RELOC_PPC64_REL16_HIGHESTA34),
1553 (BFD_RELOC_PPC64_D28, BFD_RELOC_PPC64_PCREL28): New reloc enums.
1554 * elf64-ppc.c (PNOP): Define.
1555 (ppc64_elf_howto_raw): Add reloc howtos for new relocations.
1556 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc numbers.
1557 (ppc64_elf_ha_reloc): Adjust addend for highera34 and highesta34
1559 (ppc64_elf_prefix_reloc): New function.
1560 (struct ppc_link_hash_table): Add notoc_plt.
1561 (is_branch_reloc): Add R_PPC64_PLTCALL_NOTOC.
1562 (is_plt_seq_reloc): Add R_PPC64_PLT_PCREL34,
1563 R_PPC64_PLT_PCREL34_NOTOC, and R_PPC64_PLTSEQ_NOTOC.
1564 (ppc64_elf_check_relocs): Handle pcrel got and plt relocs. Set
1565 has_pltcall for section on seeing R_PPC64_PLTCALL_NOTOC. Handle
1566 possible need for dynamic relocs on non-pcrel powerxx relocs.
1567 (dec_dynrel_count): Handle non-pcrel powerxx relocs.
1568 (ppc64_elf_inline_plt): Handle R_PPC64_PLTCALL_NOTOC.
1569 (toc_adjusting_stub_needed): Likewise.
1570 (ppc64_elf_tls_optimize): Handle R_PPC64_PLTSEQ_NOTOC.
1571 (ppc64_elf_relocate_section): Handle new powerxx relocs.
1572 * bfd-in2.h: Regenerate.
1573 * libbfd.h: Regenerate.
1575 2019-05-23 Jose E. Marchesi <jose.marchesi@oracle.com>
1577 * config.bfd (targ_cpu): Process bpf-*-none only if BFD64.
1578 * configure.ac: Set target_size=64 for bpf_elf64_le_vec and
1580 * configure: Regenerate.
1582 2019-05-23 Jose E. Marchesi <jose.marchesi@oracle.com>
1584 * configure: Regenerated.
1585 * Makefile.am (ALL_MACHINES): Add cpu-bpf.lo.
1586 (ALL_MACHINES_CFILES): Add cpu-bpf.c.
1587 (BFD64_BACKENDS): Add elf64-bpf.lo.
1588 (BFD64_BACKENDS_CFILES): Add elf64-bpf.c.
1589 * Makefile.in (SOURCE_HFILES): Regenerate.
1590 * config.bfd (targ_cpu): Handle bpf-*-* targets.
1591 * cpu-bpf.c: New file.
1592 * elf64-bpf.c: Likewise.
1593 * targets.c (_bfd_target_vector): Add bpf_elf64_be_vec and
1595 * archures.c: Define architecture bfd_arch_bpf and machine
1597 * reloc.c: Define BFD relocations used by the BPF target.
1598 * bfd-in2.h: Regenerated.
1599 * libbfd.h: Likewise.
1601 2019-05-22 Alan Modra <amodra@gmail.com>
1603 * elf32-arm.c (arm_allocate_glue_section_space): Clear section
1606 2019-05-22 Alan Modra <amodra@gmail.com>
1608 * vms-alpha.c (_bfd_vms_write_etir): Don't attempt further
1609 processing on "size error in section".
1611 2019-05-22 Alan Modra <amodra@gmail.com>
1613 * som.c (som_bfd_free_cached_info): Call
1614 _bfd_generic_close_and_cleanup.
1616 2019-05-21 Faraz Shahbazker <fshahbazker@wavecomp.com>
1618 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Generate error
1619 for TLS_TPREL_HI16(/LO16) relocations in shared library.
1621 2019-05-21 Faraz Shahbazker <fshahbazker@wavecomp.com>
1623 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Add NULL pointer
1624 checks. Search the RELA table for n64 relocations.
1626 2019-05-21 Matthew Fortune <matthew.fortune@mips.com>
1627 Faraz Shahbazker <fshahbazker@wavecomp.com>
1629 * elfxx-mips.c (LA25_BC): New macro.
1630 (mips_elf_link_hash_table)<compact_branches>: New field.
1631 (STUB_JALRC): New macro.
1632 (mipsr6_o32_exec_plt0_entry_compact): New array.
1633 (mipsr6_n32_exec_plt0_entry_compact): Likewise.
1634 (mipsr6_n64_exec_plt0_entry_compact): Likewise.
1635 (mipsr6_exec_plt_entry_compact): Likewise.
1636 (mips_elf_create_la25_stub): Use BC instead of J for stubs
1637 when compact_branches is true.
1638 (_bfd_mips_elf_finish_dynamic_symbol): Choose the compact
1639 PLT for MIPSR6 with compact_branches. Do not reorder the
1640 compact branches PLT. Switch the lazy stub for MIPSR6
1641 with compact_branches to use JALRC.
1642 (mips_finish_exec_plt): Choose the compact PLT0 for MIPSR6
1643 when compact_branches is true.
1644 (_bfd_mips_elf_compact_branches): New function.
1645 * elfxx-mips.h (_bfd_mips_elf_compact_branches): New prototype.
1647 2019-05-21 Tamar Christina <tamar.christina@arm.com>
1650 * elfnn-aarch64.c (_bfd_aarch64_erratum_843419_branch_to_stub):
1651 Fix print formatter.
1653 2019-05-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
1656 * elf32-arm.c (get_value_helper): Remove.
1657 (elf32_arm_final_link_relocate): Fix branch future relocations.
1659 2019-05-21 Tamar Christina <tamar.christina@arm.com>
1662 * bfd-in.h (enum erratum_84319_opts): New
1663 (bfd_elf64_aarch64_set_options, bfd_elf32_aarch64_set_options): Change
1664 int to enum erratum_84319_opts.
1665 * bfd-in2.h: Regenerate.
1666 * elfnn-aarch64.c (struct elf_aarch64_link_hash_table): Change
1667 fix_erratum_843419 to use new enum, remove fix_erratum_843419_adr.
1668 (_bfd_aarch64_add_stub_entry_after): Conditionally create erratum stub.
1669 (aarch64_size_one_stub): Conditionally size erratum 843419 stubs.
1670 (_bfd_aarch64_resize_stubs): Amend comment.
1671 (elfNN_aarch64_size_stubs): Don't generate stubs when no workaround
1673 (bfd_elfNN_aarch64_set_options): Use new fix_erratum_843419 enum.
1674 (_bfd_aarch64_erratum_843419_branch_to_stub): Implement selection of
1676 (clear_erratum_843419_entry): Update erratum conditional.
1678 2019-05-21 Senthil Kumar Selvaraj <senthilkumar.selvaraj@microchip.com>
1681 * bfd/elf32-avr.c (elf32_avr_relax_section): Adjust range check
1682 when computing distance_short_enough.
1684 2019-05-21 Senthil Kumar Selvaraj <senthilkumar.selvaraj@microchip.com>
1687 * bfd/elf32-avr.c (avr_relative_distance_considering_wrap_around):
1688 Wrap around even if distance equals avr_pc_wrap_around.
1690 2019-05-20 Nick Clifton <nickc@redhat.com>
1692 * po/fr.po: Updated French translation.
1694 2019-05-16 Andre Vieira <andre.simoesdiasvieira@arm.com>
1696 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Add case for Tag_MVE_arch.
1698 2019-05-16 Alan Modra <amodra@gmail.com>
1700 * elf32-arm.c (elf32_arm_write_section): Revert last change.
1702 2019-05-15 Alan Modra <amodra@gmail.com>
1704 * elf32-arm.c (elf32_arm_write_section): Don't leave
1705 error case of STM32L4XX_ERRATUM_BRANCH_TO_VENEER with
1706 unitialised section contents.
1708 2019-05-14 Jamey Hicks <jamey.hicks@gmail.com>
1711 * verilog.c: (VerilogDataWidth): New variable.
1712 (verilog_write_record): Emit bytes in VerilogDataWidth bundles.
1714 2019-05-08 Nick Clifton <nickc@redhat.com>
1717 * elf32-m68k.c (elf32_m68k_merge_private_bfd_data): Return TRUE
1718 rather than FALSE if encountering a non-ELF file.
1720 2019-05-06 Alan Modra <amodra@gmail.com>
1722 * elf32-pj.c (pj_elf_reloc): Don't report undefined weak as an error.
1724 2019-05-06 Alan Modra <amodra@gmail.com>
1726 * reloc.c (BFD_RELOC_PPC64_TPREL16_HIGH, BFD_RELOC_PPC64_TPREL16_HIGHA),
1727 (BFD_RELOC_PPC64_DTPREL16_HIGH, BFD_RELOC_PPC64_DTPREL16_HIGHA):
1728 Sort before BFD_RELOC_PPC64_DTPREL16_HIGHESTA entry.
1729 * libbfd.h: Regenerate.
1730 * bfd-in2.h: Regenerate.
1732 2019-05-04 Alan Modra <amodra@gmail.com>
1735 * syms.c (coff_section_type): Only allow '.', '$' and numeric
1736 following the standard section names.
1737 (bfd_decode_symclass): Prioritize section flag tests in
1738 decode_section_type before name tests in coff_section_type.
1739 * plugin.c (bfd_plugin_canonicalize_symtab): Init fake_section
1740 and fake_common_section using BFD_FAKE_SECTION. Use "fake" as
1741 their names and choose standard .text section flags for
1744 2019-05-02 Nick Clifton <nickc@redhat.com>
1747 * coffcode.h (styp_to_sec_flags): Treat .gnu.debuglink and
1748 .gnu.debugaltlink sections as debugging sections.
1750 2019-04-30 Alan Modra <amodra@gmail.com>
1752 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add has_gotrel.
1753 (struct _ppc64_elf_section_data): Likewise.
1754 (ppc64_elf_check_relocs): Set above fields.
1755 (ppc64_elf_edit_toc): Add a pass over GOT relocs.
1756 (ppc64_elf_relocate_section): Edit GOT indirect to GOT relative
1759 2019-04-26 H.J. Lu <hongjiu.lu@intel.com>
1762 * elflink.c (elf_link_output_extsym): Don't complain undefined
1763 weak dynamic reference.
1765 2019-04-25 Sudakshina Das <sudi.das@arm.com>
1767 * elfnn-aarch64.c (PLT_BTI_ENTRY_SIZE): Remove.
1768 (PLT_BTI_TLSDESC_ENTRY_SIZE): Remove.
1769 (PLT_PAC_ENTRY_SIZE, PLT_BTI_PAC_ENTRY_SIZE): Remove.
1770 (PLT_BTI_SMALL_ENTRY_SIZE, PLT_PAC_SMALL_ENTRY_SIZE): Update.
1771 (elfNN_aarch64_small_plt0_pac_entry): Remove.
1772 (elfNN_aarch64_small_plt0_bti_pac_entry): Remove.
1773 (elfNN_aarch64_small_plt0_bti_entry): Update.
1774 (elfNN_aarch64_small_plt_bti_entry): Update.
1775 (elfNN_aarch64_small_plt_pac_entry): Update.
1776 (elfNN_aarch64_tlsdesc_small_plt_bti_entry): Update.
1777 (setup_plt_values): Setup new entries.
1778 (elfNN_aarch64_finish_dynamic_sections): Remove size change.
1779 (elfNN_aarch64_plt_sym_val): Likewise.
1781 2019-04-22 Jim Wilson <jimw@sifive.com>
1783 * elfnn-riscv.c (PRSTATUS_SIZE) [ARCH_SIZE==32]: Change from 0 to 204.
1785 2019-04-19 Alan Modra <amodra@gmail.com>
1787 * elf32-s12z.c (elf_backend_can_gc_sections): Don't define
1789 2019-04-17 H.J. Lu <hongjiu.lu@intel.com>
1791 * elf64-x86-64.c (elf_x86_64_need_pic): Suggest -fPIE when not
1792 building shared object.
1793 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Likewise.
1795 2019-04-17 H.J. Lu <hongjiu.lu@intel.com>
1798 * elfxx-x86.h (SYMBOL_DEFINED_NON_SHARED_P): Also check x86
1801 2019-04-15 Thomas Preud'homme <thomas.preudhomme@arm.com>
1803 * reloc.c (BFD_RELOC_ARM_T32_VLDR_VSTR_OFF_IMM): New internal
1805 * bfd-in2.h: Regenerate.
1806 * libbfd.h: Likewise.
1808 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1810 * reloc.c (BFD_RELOC_ARM_THUMB_LOOP12): New.
1811 * bfd-in2.h: Regenerated.
1812 * libbfd.h: Regenerated.
1814 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1816 * reloc.c (BFD_RELOC_THUMB_PCREL_BFCSEL): New relocation.
1817 * bfd-in2.h: Regenerated.
1818 * libbfd.h: Likewise.
1820 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1822 * reloc.c (BFD_RELOC_ARM_THUMB_BF13): New.
1823 * bfd-in2.h: Regenerated.
1824 * libbfd.h: Regenerated.
1825 * elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF13.
1826 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF13
1827 and R_ARM_THM_BF12 together.
1828 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF13.
1830 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1832 * reloc.c (BFD_RELOC_ARM_THUMB_BF19): New
1833 * libbfd.h: Regenerated.
1834 * bfd-in2.h: Regenerated.
1835 * bfd-elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF18.
1836 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF19
1837 and R_ARM_THM_BF18 together.
1838 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF19.
1840 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1842 * reloc.c (BFD_RELOC_ARM_THUMB_BF17): New enum.
1843 * bfd-in2.h: Regenerated.
1844 * libbfd.h: Regenerated.
1845 * bfd-elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF16.
1846 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF17
1847 and R_ARM_THM_BF16 together.
1848 (get_value_helper): New reloc helper.
1849 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF16.
1851 2019-04-15 Sudakshina Das <sudi.das@arm.com>
1853 * reloc.c (BFD_RELOC_THUMB_PCREL_BRANCH5): New enum.
1854 * bfd-in2.h: Regenerate.
1855 * libbfd.h: Regenerate.
1857 2019-04-15 Thomas Preud'homme <thomas.preudhomme@arm.com>
1859 * archures.c (bfd_mach_arm_8_1M_MAIN): Define.
1860 * bfd-in2.h: Regenerate.
1861 * cpu-arm.c (arch_info_struct): Add entry for Armv8.1-M Mainline.
1862 * elf32-arm.c (using_thumb_only): Return true for Armv8.1-M Mainline
1864 (using_thumb2): Likewise.
1865 (using_thumb2_bl): Update assert.
1866 (arch_has_arm_nop): Likewise.
1867 (bfd_arm_get_mach_from_attributes): Add case for Armv8.1-M Mainline.
1868 (tag_cpu_arch_combine): Add logic for Armv8.1-M Mainline merging.
1870 2019-04-11 H.J. Lu <hongjiu.lu@intel.com>
1872 * elf-linker-x86.h (elf_x86_cet_report): New.
1873 (elf_linker_x86_params): Add cet_report.
1874 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Report
1875 missing IBT and SHSTK properties if needed.
1877 2019-04-11 H.J. Lu <hongjiu.lu@intel.com>
1880 * elf-m10300.c (mn10300_elf_check_relocs): Remove BFD_ASSERT of
1881 "h != NULL". Don't check "h != NULL" before calling.
1882 bfd_elf_gc_record_vtentry.
1883 * elf32-arm.c (elf32_arm_check_relocs): Likewise.
1884 * elf32-bfin.c (bfin_check_relocs): Likewise.
1885 * elf32-cris.c (cris_elf_check_relocs): Likewise.
1886 * elf32-csky.c (csky_elf_check_relocs): Likewise.
1887 * elf32-d10v.c (elf32_d10v_check_relocs): Likewise.
1888 * elf32-dlx.c (elf32_dlx_check_relocs): Likewise.
1889 * elf32-fr30.c (fr30_elf_check_relocs): Likewise.
1890 * elf32-frv.c (elf32_frv_check_relocs): Likewise.
1891 * elf32-hppa.c (elf32_hppa_check_relocs): Likewise.
1892 * elf32-i386.c (elf_i386_check_relocs): Likewise.
1893 * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
1894 * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
1895 * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise.
1896 * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
1897 * elf32-mcore.c (mcore_elf_check_relocs): Likewise.
1898 * elf32-metag.c (elf_metag_check_relocs): Likewise.
1899 * elf32-or1k.c (or1k_elf_check_relocs): Likewise.
1900 * elf32-ppc.c (ppc_elf_check_relocs): Likewise.
1901 * elf32-s390.c (elf_s390_check_relocs): Likewise.
1902 * elf32-sh.c (sh_elf_check_relocs): Likewise.
1903 * elf32-v850.c (v850_elf_check_relocs): Likewise.
1904 * elf32-vax.c (elf_vax_check_relocs): Likewise.
1905 * elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise.
1906 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
1907 * elf64-mmix.c (mmix_elf_check_relocs): Likewise.
1908 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
1909 * elf64-s390.c (elf_s390_check_relocs): Likewise.
1910 * elf64-x86-64.c (elf_s390_check_relocs): Likewise.
1911 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
1912 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
1913 * elflink.c (bfd_elf_gc_record_vtinherit): Check for corrupt
1916 2019-04-11 Alan Modra <amodra@gmail.com>
1919 * elflink.c (elf_link_add_object_symbols): Don't read partial
1920 dynamic entries from fuzzed objects.
1922 2019-04-11 Tamar Christina <tamar.christina@arm.com>
1925 * elfnn-aarch64.c (elfNN_aarch64_size_dynamic_sections): Don't emit
1926 DT_TLSDESC_GOT and DT_TLSDESC_PLT when DF_BIND_NOW.
1927 (elfNN_aarch64_finish_dynamic_sections): Don't write PLT if DF_BIND_NOW.
1929 2019-04-10 Michael Forney <mforney@mforney.org>
1932 * doc/chew.c (free_words): Correctly free "push_text" strings.
1934 2019-04-08 H.J. Lu <hongjiu.lu@intel.com>
1936 * config.bfd: Remove i[3-7]86-*-kaos* and i[3-7]86-*-chaos targets.
1938 2019-04-08 Alan Modra <amodra@gmail.com>
1940 * configure.ac (elfxx_x86): Define and use.
1941 * configure: Regenerate.
1943 2019-04-06 H.J. Lu <hongjiu.lu@intel.com>
1945 * elf-linker-x86.h: New file.
1946 * elf32-i386.c (elf_i386_convert_load_reloc): Use htab->params
1947 to get x86-specific linker options.
1948 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
1949 (elf_x86_64_check_relocs): Likewise.
1950 (elf_x86_64_relocate_section): Likewise.
1951 (elf_x86_64_link_setup_gnu_properties): Likewise.
1952 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Likewise.
1953 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
1954 (_bfd_elf_linker_x86_set_options): New function.
1955 * elfxx-x86.h: Include "elf-linker-x86.h".
1956 (elf_x86_link_hash_table): Add params.
1958 2019-04-03 Alan Modra <amodra@gmail.com>
1960 * coff-i386.c, * coff-x86_64.c, * coffgen.c, * dwarf2.c,
1961 * elf-m10200.c, * elf.c, * elf32-arm.c, * elf32-bfin.c,
1962 * elf32-csky.c, * elf32-m32r.c, * elf32-microblaze.c, * elf32-pru.c,
1963 * elf32-rx.c, * elf32-xgate.c, * elf64-sparc.c, * elfnn-ia64.c,
1964 * elfxx-riscv.c, * elfxx-sparc.c, * linker.c, * mach-o.c,
1965 * pe-x86_64.c, * pei-x86_64.c, * plugin.c: Whitespace fixes.
1967 2019-04-02 Jim Wilson <jimw@sifive.com>
1970 * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Move read of
1971 ELF header flags to after check for ELF object file. Loop through
1972 sections looking for code sections, if none, then skip ABI checks.
1974 2019-03-30 Andrew Waterman <andrew@sifive.com>
1976 * elfnn-riscv.c (_bfd_riscv_relax_call): Only check ARCH_SIZE for
1979 2019-03-29 Max Filippov <jcmvbkbc@gmail.com>
1981 * elf32-xtensa.c (shrink_dynamic_reloc_sections): Add
1982 info->export_dynamic to the conditional.
1984 2019-03-28 Alan Modra <amodra@gmail.com>
1987 * configure.ac: Invoke AC_CHECK_SIZEOF(int).
1988 * configure: Regenerate.
1989 * coffgen.c (coff_get_reloc_upper_bound): Replace gcc diagnostic
1990 workaround with SIZEOF_LONG vs. SIZEOF_INT check.
1991 * elf.c (_bfd_elf_get_reloc_upper_bound): Likewise.
1992 * elf64-sparc.c (elf64_sparc_get_reloc_upper_bound): Likewise.
1993 * mach-o.c (bfd_mach_o_get_reloc_upper_bound): Likewise.
1995 2019-03-21 Jim Wilson <jimw@sifive.com>
1998 * elfnn-riscv.c (riscv_elf_relocate_section): For STT_SECTION check,
1999 verify sym non-NULL before using. Add identical check using h.
2001 2019-03-21 Sudakshina Das <sudi.das@arm.com>
2003 * elf-bfd.h (struct elf_backend_data): Add argument to
2004 merge_gnu_properties.
2005 * elf-properties.c (elf_merge_gnu_properties): Add argument to
2006 itself and while calling bed->merge_gnu_properties.
2007 (elf_merge_gnu_property_list): Update the calls for
2008 elf_merge_gnu_properties.
2009 * elfnn-aarch64.c (elfNN_aarch64_merge_gnu_properties): Update handling
2010 of --force-bti warning and add argument.
2011 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Add
2013 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Add argument.
2014 * elfxx-x86.h (_bfd_x86_elf_merge_gnu_properties): Likewise in
2017 2019-03-20 Sudakshina Das <sudi.das@arm.com>
2019 * elfxx-aarch64.c (_bfd_aarch64_elf_link_fixup_gnu_properties): Define.
2020 * elfxx-aarch64.h (_bfd_aarch64_elf_link_fixup_gnu_properties): Declare.
2021 (elf_backend_fixup_gnu_properties): Define for AArch64.
2023 2019-03-18 Alan Modra <amodra@gmail.com>
2026 * elf32-ppc.c (ppc_finish_symbols): Don't call write_glink_stub
2027 for local iplt syms with ent->plt.offset == -1. Remove ineffective
2028 attempt at writing glink stubs only once.
2030 2019-03-16 Alan Modra <amodra@gmail.com>
2033 * elf.c (_bfd_elf_rela_local_sym): Revert last change.
2034 (_bfd_elf_rel_local_sym): Likewise.
2035 * elflink.c (elf_link_input_bfd): Use bfd_und_section for
2036 section of symbols with unrecognized shndx.
2038 2019-03-15 H.J. Lu <hongjiu.lu@intel.com>
2041 * coffgen.c (_bfd_coff_section_already_linked): Skip discarded
2043 * cofflink.c (coff_link_add_symbols): Check for symbols defined
2044 in discarded section.
2046 2019-03-15 Alan Modra <amodra@gmail.com>
2049 * elflink.c (elf_link_add_object_symbols): Bail out on a local
2050 symbol after globals if elf_bad_symtab is not set.
2052 2019-03-15 Alan Modra <amodra@gmail.com>
2055 * elf.c (_bfd_elf_rela_local_sym): Don't segfault on NULL sec.
2056 (_bfd_elf_rel_local_sym): Likewise.
2058 2019-03-15 Alan Modra <amodra@gmail.com>
2061 * elflink.c (elf_link_read_relocs_from_section): Handle fuzzed
2062 object files with sh_size not a multiple of sh_entsize.
2064 2019-03-15 H.J. Lu <hongjiu.lu@intel.com>
2067 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for corrupt
2068 input with bad relocation.
2070 22019-03-15 H.J. Lu <hongjiu.lu@intel.com>
2072 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
2074 2019-03-14 Nick Clifton <nickc@redhat.com>
2077 * dwarf2.c (struct dwarf2_debug): Add sec_vma_count field.
2078 (save_section_vma): Initialise field to the number of entries in
2080 (section_vma_same): Check that the number of entries in the
2081 sec_vma table matches the number of sections in the bfd.
2083 2019-03-14 Nick Clifton <nickc@redhat.com>
2086 * elflink.c (_bfd_elf_add_default_symbol): Add a check for a NULL
2087 section owner pointer when adding the default symbol.
2089 2019-03-14 Nick Clifton <nickc@redhat.com>
2092 * elflink.c (elf_link_add_object_symbols): Add new local variable
2093 extversym_end. Initialise it to point to the end of the version
2094 symbol table, if present. Check it when initialising and updating
2097 2019-03-13 Sudakshina Das <sudi.das@arm.com>
2099 * elfnn-aarch64.c (PLT_PAC_ENTRY_SIZE, PLT_PAC_SMALL_ENTRY_SIZE): New.
2100 (PLT_BTI_PAC_ENTRY_SIZE, PLT_BTI_PAC_SMALL_ENTRY_SIZE): New.
2101 (setup_plt_values): Account for PAC or PAC and BTI enabled PLTs.
2102 (elfNN_aarch64_size_dynamic_sections): Add checks for PLT_BTI_PAC
2104 (elfNN_aarch64_finish_dynamic_sections): Account for PLT_BTI_PAC.
2105 (get_plt_type): Add case for DT_AARCH64_PAC_PLT.
2106 (elfNN_aarch64_plt_sym_val): Add cases for PLT_BTI_PAC and PLT_PAC.
2108 2019-03-13 Sudakshina Das <sudi.das@arm.com>
2109 Szabolcs Nagy <szabolcs.nagy@arm.com>
2111 * bfd-in.h (aarch64_plt_type, aarch64_enable_bti_type): New.
2112 (aarch64_bti_pac_info): New.
2113 (bfd_elf64_aarch64_set_options): Add aarch64_bti_pac_info argument.
2114 (bfd_elf32_aarch64_set_options): Likewise.
2115 * bfd-in2.h: Regenerate
2116 * elfnn-aarch64.c (PLT_BTI_ENTRY_SIZE): New.
2117 (PLT_BTI_SMALL_ENTRY_SIZE, PLT_BTI_TLSDESC_ENTRY_SIZE): New.
2118 (elfNN_aarch64_small_plt0_bti_entry): New.
2119 (elfNN_aarch64_small_plt_bti_entry): New.
2120 (elfNN_aarch64_tlsdesc_small_plt_bti_entry): New.
2121 (elf_aarch64_obj_tdata): Add no_bti_warn and plt_type fields.
2122 (elf_aarch64_link_hash_table): Add plt0_entry, plt_entry and
2123 tlsdesc_plt_entry_size fields.
2124 (elfNN_aarch64_link_hash_table_create): Initialise the new fields.
2125 (setup_plt_values): New helper function.
2126 (bfd_elfNN_aarch64_set_options): Use new bp_info to set plt sizes and
2128 (elfNN_aarch64_allocate_dynrelocs): Use new size members instead of
2130 (elfNN_aarch64_size_dynamic_sections): Likewise and add checks.
2131 (elfNN_aarch64_create_small_pltn_entry): Use new generic pointers
2132 to plt stubs instead of fixed ones and update filling them according
2133 to the need for bti.
2134 (elfNN_aarch64_init_small_plt0_entry): Likewise.
2135 (elfNN_aarch64_finish_dynamic_sections): Likewise.
2136 (get_plt_type, elfNN_aarch64_get_synthetic_symtab): New.
2137 (elfNN_aarch64_plt_sym_val): Update size accordingly.
2138 (elfNN_aarch64_link_setup_gnu_properties): Set up plts if BTI GNU NOTE
2140 (bfd_elfNN_get_synthetic_symtab): Define.
2141 (elfNN_aarch64_merge_gnu_properties): Give out warning with --force-bti
2142 and mising BTI NOTE SECTION.
2145 2019-03-13 Sudakshina Das <sudi.das@arm.com>
2147 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Exclude
2148 linker created inputs from merge.
2149 * elfnn-aarch64.c (struct elf_aarch64_obj_tdata): Add field for
2150 GNU_PROPERTY_AARCH64_FEATURE_1_AND properties.
2151 (elfNN_aarch64_link_setup_gnu_properties): New.
2152 (elfNN_aarch64_merge_gnu_properties): New.
2153 (elf_backend_setup_gnu_properties): Define for AArch64.
2154 (elf_backend_merge_gnu_properties): Likewise.
2155 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Define.
2156 (_bfd_aarch64_elf_parse_gnu_properties): Define.
2157 (_bfd_aarch64_elf_merge_gnu_properties): Define.
2158 * elfxx-aarch64.h (_bfd_aarch64_elf_link_setup_gnu_properties): Declare.
2159 (_bfd_aarch64_elf_parse_gnu_properties): Declare.
2160 (_bfd_aarch64_elf_merge_gnu_properties): Declare.
2161 (elf_backend_parse_gnu_properties): Define for AArch64.
2163 2019-03-13 H.J. Lu <hongjiu.lu@intel.com>
2166 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Properly
2167 merge GNU_PROPERTY_X86_FEATURE_1_[IBT|SHSTK].
2169 2019-03-12 Alan Modra <amodra@gmail.com>
2171 * coffcode.h (buy_and_read): Delete unnecessary forward decl. Add
2172 nmemb parameter. Use bfd_alloc2.
2173 (coff_slurp_line_table): Use bfd_alloc2. Update buy_and_read calls.
2175 (coff_slurp_symbol_table): Use bfd_alloc2 and bfd_zalloc2.
2176 (coff_slurp_reloc_table): Use bfd_alloc2. Update buy_and_read calls.
2177 * coffgen.c (coff_get_reloc_upper_bound): Ensure size calculation
2179 * elf.c (bfd_section_from_shdr): Use bfd_zalloc2. Style fix.
2180 (assign_section_numbers): Style fix.
2181 (swap_out_syms): Use bfd_malloc2.
2182 (_bfd_elf_get_reloc_upper_bound): Ensure size calculation doesn't
2184 (_bfd_elf_make_empty_symbol): Style fix.
2185 (elfobj_grok_stapsdt_note_1): Formatting.
2186 * elfcode.h (elf_object_p): Use bfd_alloc2.
2187 (elf_write_relocs, elf_write_shdrs_and_ehdr): Likewise.
2188 (elf_slurp_symbol_table): Use bfd_zalloc2.
2189 (elf_slurp_reloc_table): Use bfd_alloc2.
2190 (_bfd_elf_bfd_from_remote_memory): Use bfd_malloc2.
2191 * elf64-sparc (elf64_sparc_get_reloc_upper_bound): Ensure
2192 size calculation doesn't overflow.
2193 (elf64_sparc_get_dynamic_reloc_upper_bound): Likewise.
2194 * mach-o.c (bfd_mach_o_get_reloc_upper_bound): Likewise.
2195 * pdp11.c (get_reloc_upper_bound): Copy aoutx.h version.
2197 2019-03-08 Alan Modra <amodra@gmail.com>
2200 * merge.c (merge_strings): Return secinfo. Don't pad section
2202 (_bfd_merge_sections): Pad section to alignment here, if input
2203 sections contributing to merged output all pad to alignment.
2206 2019-03-06 Nick Clifton <nickc@redhat.com>
2208 * dwarf2.c (_bfd_dwarf2_find_symbol_bias): Check for a NULL symbol
2210 * coffgen.c (coff_find_nearest_line_with_names): Do not call
2211 _bfd_dwarf2_find_symbol_bias if there is no symbol table available.
2213 2019-03-01 Andreas Krebbel <krebbel@linux.ibm.com>
2215 This reverts commit 5a12586d44fa8d5dfc74cbca4f2f36a273a16335.
2216 2019-01-14 Maamoun Tarsha <maamountk@hotmail.com>
2219 * elf32-s390.c (allocate_dynrelocs): Update comment.
2221 2019-02-28 Tamar Christina <tamar.christina@arm.com>
2223 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Correct CIE parse.
2225 2019-02-28 Nick Clifton <nickc@redhat.com>
2228 * elf.c (bfd_elf_string_from_elf_section): Check for a string
2229 section that is not NUL terminated.
2231 2019-02-27 H.J. Lu <hongjiu.lu@intel.com>
2234 * elf64-x86-64.c (elf_x86_64_check_relocs): Skip symbol defined
2235 by linker when checking copy reloc on protected symbol.
2237 2019-02-24 Alan Modra <amodra@gmail.com>
2240 * pdp11.c (set_section_contents): Revert 2015-02-24 change.
2242 2019-02-20 Eric Tsai <erictsai@cadence.com>
2244 * elf32-xtensa.c (is_resolvable_asm_expansion): Scan output
2245 sections between the call site and call destination and adjust
2246 call distance by the largest alignment.
2248 2019-02-20 Alan Hayward <alan.hayward@arm.com>
2250 * elf-bfd.h (elfcore_write_aarch_pauth): Add declaration.
2251 * elf.c (elfcore_grok_aarch_pauth): New function.
2252 (elfcore_grok_note): Check for NT_ARM_PAC_MASK.
2253 (elfcore_write_aarch_pauth): New function.
2254 (elfcore_write_register_note): Check for AArch64 pauth section.
2256 2019-02-20 Alan Modra <amodra@gmail.com>
2259 * elf32-nios2.c (nios2_elf32_relocate_section): Check asprintf
2262 2019-02-20 Michael Roitzsch <reactorcontrol@icloud.com>
2264 * configure.ac (SHARED_LIBADD): Add -liberty -lintl for all
2265 Darwin hosts, not just or1k.
2266 * configure: Regenerate.
2268 2019-02-20 Alan Modra <amodra@gmail.com>
2271 * archive64.c (_bfd_archive_64_bit_slurp_armap): Move code adding
2272 sentinel NUL to string buffer nearer to loop where it is used.
2273 Don't go past sentinel when scanning strings, and don't write
2275 * archive.c (do_slurp_coff_armap): Simplify string handling to
2278 2019-02-19 Alan Modra <amodra@gmail.com>
2281 * pei-x86_64.c (pex64_bfd_print_pdata_section): Correct checks
2282 attempting to prevent read past end of section.
2284 2019-02-18 Alan Modra <amodra@gmail.com>
2287 * elf32-nios2.c (nios2_elf32_relocate_section): Use asprintf and
2288 PRIx64 to generate warning messages. Print local sym names too.
2290 2019-02-09 Vineet Gupta <vgupta@synopsys.com>
2292 * elf32-arc (INIT_SYM_STRING): Delete.
2293 (FINI_SYM_STRING): Likewise.
2294 (init_str): Likewise.
2295 (fini_str): Likewise.
2297 2019-02-08 Alan Modra <amodra@gmail.com>
2299 * elf32-ppc.c (ppc_elf_relocate_section): Add %X to "unsupported
2300 for bss-plt" warning to make it an error.
2302 2019-02-07 Eric Botcazou <ebotcazou@adacore.com>
2305 * elf32-sparc.c (elf32_sparc_reloc_type_class): Return
2306 reloc_class_ifunc for ifunc symbols.
2307 * elf64-sparc.c (elf64_sparc_reloc_type_class): Likewise.
2309 2019-02-07 Eric Botcazou <ebotcazou@adacore.com>
2311 * elf32-visium.c (visium_elf_howto_parity_reloc): Minor tweak.
2312 <R_VISIUM_PC16>: Use explicit range test to detect an overflow.
2314 2019-02-07 Nick Clifton <nickc@redhat.com>
2316 * config.bfd: Move the powerpc-lynxos and powerpc-windiss targets
2317 into the definitely obsolete list.
2319 2019-02-05 H.J. Lu <hongjiu.lu@intel.com>
2322 * elf64-x86-64.c (elf_x86_64_need_pic): Check
2323 SYMBOL_DEFINED_NON_SHARED_P instead of def_regular.
2324 (elf_x86_64_relocate_section): Move PIC check for PC-relative
2326 (elf_x86_64_check_relocs): Here.
2327 (elf_x86_64_finish_dynamic_symbol): Use SYMBOL_DEFINED_NON_SHARED_P
2328 to check if a symbol is defined in a non-shared object.
2329 * elfxx-x86.h (SYMBOL_DEFINED_NON_SHARED_P): New.
2331 2019-01-21 Sergio Durigan Junior <sergiodj@redhat.com>
2333 * elf32-arm.c (elf32_arm_final_link_relocate): Use 'llabs' instead
2334 of 'labs' (and fix GCC warning).
2336 2019-01-25 Nick Clifton <nickc@redhat.com>
2338 * po/ru.po: Updated Russian translation.
2340 2019-01-23 Nick Clifton <nickc@redhat.com>
2342 * po/fr.po: Updated French translation.
2344 2019-01-21 Nick Clifton <nickc@redhat.com>
2346 * po/pt.po: Updated Portuguese translation.
2347 * po/uk.po: Updated Ukranian translation.
2349 2019-01-21 Yuri Chornoivan <yurchor@ukr.net>
2352 * elf32-nds32.c (nds32_relocate_section): Add space between words
2354 * elfnn-riscv.c (riscv_version_mismatch): Fix spelling mistake in
2356 (riscv_i_or_e_p): Likewise.
2357 (riscv_merge_arch_attr_info): Likewise.
2359 2019-01-19 Nick Clifton <nickc@redhat.com>
2361 * version.m4: Reset to 2.32.51
2362 * configure: Regenerate.
2363 * po/bfd.pot: Regenerate.
2365 2018-06-24 Nick Clifton <nickc@redhat.com>
2367 2.32 branch created.
2369 2019-01-16 Kito Cheng <kito@andestech.com>
2371 * elf-attrs.c (vendor_obj_attr_size): Return 0 if size is 0 even
2374 2019-01-16 Kito Cheng <kito@andestech.com>
2375 Nelson Chu <nelson@andestech.com>
2377 * elfnn-riscv.c (in_subsets): New.
2378 (out_subsets): Likewise.
2379 (merged_subsets): Likewise.
2380 (riscv_std_ext_p): Likewise.
2381 (riscv_non_std_ext_p): Likewise.
2382 (riscv_std_sv_ext_p): Likewise.
2383 (riscv_non_std_sv_ext_p): Likewise.
2384 (riscv_version_mismatch): Likewise.
2385 (riscv_i_or_e_p): Likewise.
2386 (riscv_merge_std_ext): Likewise.
2387 (riscv_merge_non_std_and_sv_ext): Likewise.
2388 (riscv_merge_arch_attr_info): Likewise.
2389 (riscv_merge_attributes): Likewise.
2390 (_bfd_riscv_elf_merge_private_bfd_data): Merge attribute.
2392 * elfnn-riscv.c (riscv_elf_obj_attrs_arg_type): New.
2393 (elf_backend_obj_attrs_vendor): Define.
2394 (elf_backend_obj_attrs_section_type): Likewise.
2395 (elf_backend_obj_attrs_section): Likewise.
2396 (elf_backend_obj_attrs_arg_type): Define as
2397 riscv_elf_obj_attrs_arg_type.
2398 * elfxx-riscv.c (riscv_estimate_digit): New.
2399 (riscv_estimate_arch_strlen1): Likewise.
2400 (riscv_estimate_arch_strlen): Likewise.
2401 (riscv_arch_str1): Likewise.
2402 (riscv_arch_str): Likewise.
2403 * elfxx-riscv.h (riscv_arch_str): Declare.
2405 2019-01-14 John Darrington <john@darrington.wattle.id.au>
2407 * bfd-in2.h [BFD_RELOC_S12Z_OPR]: New reloc.
2409 * elf32-s12z.c (eld_s12z_howto_table): R_S12Z_OPR takes non zero
2410 source field. (md_apply_fix): Apply final fix
2411 to BFD_RELOC_S12Z_OPR.
2412 * reloc.c[BFD_RELOC_S12Z_OPR]: New reloc.
2414 2019-01-14 Maamoun Tarsha <maamountk@hotmail.com>
2417 * elf32-s390.c (allocate_dynrelocs): Update comment.
2419 2019-01-09 Andrew Paprocki <andrew@ishiboo.com>
2421 * warning.m4: Adjust egrep pattern for non-GNU compilers.
2422 * configure: Regenerate.
2424 2019-01-08 Alan Modra <amodra@gmail.com>
2428 * ihex.c (ihex_write_object_contents): Properly check 32-bit
2431 2019-01-05 Yoshinori Sato <ysato@users.sourceforge.jp>
2433 * bfd/archures.c: Add bfd_mach_rx_v2 and bfd_mach_rx_v3.
2434 * bfd/bfd-in2.h: Regenerate.
2435 * bfd/cpu-rx.c (arch_info_struct): Add RXv2 and RXv3 entry.
2436 * bfd/elf32-rx.c (elf32_rx_machine): Add RXv2 and RXv3 support.
2438 2019-01-04 Lifang Xia <lifang_xia@c-sky.com>
2440 * config.bfd (csky-*-elf* | csky-*-linux*): Modify the csky
2441 default target, little endian target is more suitable.
2443 2019-01-04 Alan Modra <amodra@gmail.com>
2447 * coff-rs6000.c (GET_VALUE_IN_FIELD): Add base parameter and
2449 (EQ_VALUE_IN_FIELD): Likewise.
2450 * coff64-rs6000.c (GET_VALUE_IN_FIELD): Likewise.
2452 2019-01-01 Alan Modra <amodra@gmail.com>
2454 Update year range in copyright notice of all files.
2456 For older changes see ChangeLog-2018
2458 Copyright (C) 2019 Free Software Foundation, Inc.
2460 Copying and distribution of this file, with or without modification,
2461 are permitted in any medium without royalty provided the copyright
2462 notice and this notice are preserved.
2468 version-control: never