1 2020-08-25 Alan Modra <amodra@gmail.com>
4 * elf32-ppc.c (ppc_elf_hash_table): Test is_elf_hash_table before
5 accessing elf_hash_table_id.
7 2020-08-24 Mark Wielaard <mark@klomp.org>
9 * dwarf2.c (read_attribute_value): Handle DW_FORM_data16.
10 (read_formatted_entries): Likewise. And skip zero entry.
12 2020-08-24 Cooper Qu <cooper.qu@linux.alibaba.com>
14 * bfd-in2.h (bfd_mach_ck860): New.
15 * cpu-csky.c (arch_info_struct): Add item for CK860.
17 2020-08-24 Alan Modra <amodra@gmail.com>
19 * elf32-ppc.c (ppc_elf_check_relocs): Set has_tls_reloc for
20 high part tprel16 relocs.
21 (ppc_elf_tls_optimize): Sanity check high part tprel16 relocs.
22 Clear do_tls_opt on odd instructions.
23 (ppc_elf_relocate_section): Move TPREL16_HA/LO optimisation later.
24 Don't sanity check them here.
25 * elf64-ppc.c (ppc64_elf_check_relocs): Set has_tls_reloc for
26 high part tprel16 relocs.
27 (ppc64_elf_tls_optimize): Sanity check high part tprel16 relocs.
28 Clear do_tls_opt on odd instructions.
29 (ppc64_elf_relocate_section): Don't sanity check TPREL16_HA.
31 2020-08-23 John David Anglin <danglin@gcc.gnu.org>
34 * configure.ac: Disable plugins by default on 32-bit hppa*-*-hpux*.
35 * configure: Regenerate.
37 2020-08-22 H.J. Lu <hongjiu.lu@intel.com>
40 * elflink.c (elf_link_output_symstrtab): Keep only one '@' for
41 versioned symbols, which are defined in shared objects, in
44 2020-08-21 Nick Clifton <nickc@redhat.com>
46 * elfnn-aarch64.c (_bfd_aarch64_erratum_835769_scan): Only sort
47 the data map if there are entries in it.
48 (_bfd_aarch64_erratum_843419_scan): Likewise.
50 2020-08-21 Jan Beulich <jbeulich@suse.com>
52 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Check
53 last byte of debug dir, not first.
55 2020-08-20 Nick Clifton <nickc@redhat.com>
58 * bfd.c (bfd_update_compression_header): Also set the sh_addralign
59 field in the ELF header of the compressed sections.
61 2020-08-20 Nick Clifton <nickc@redhat.com>
64 * elf-bfd.h (struct bfd_elf_section_data): Add
65 has_secondary_relocs field.
66 * elf.c (_bfd_elf_copy_special_section_fields): Set the
67 has_secondary_relocs field for sections which have associated
69 * elfcode.h (elf_write_relocs): Only call write_secondary_relocs
70 on sections which have associated secondary relocs.
72 2020-08-15 Alan Modra <amodra@gmail.com>
74 * elf32-frv.c (elf32_frv_add_symbol_hook): Set SEC_SMALL_DATA on
76 * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
77 * elf32-microblaze.c (microblaze_elf_add_symbol_hook): Likewise.
78 * elf32-nds32.c (nds32_elf_add_symbol_hook): Likewise.
79 * elf32-nios2.c (nios2_elf_add_symbol_hook): Likewise.
80 * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise.
81 * elf32-score.c (s3_bfd_score_elf_add_symbol_hook): Likewise.
82 * elf32-score7.c (s7_bfd_score_elf_add_symbol_hook): Likewise.
83 * elf32-tic6x.c (elf32_tic6x_add_symbol_hook): Likewise.
84 * elf32-v850.c (v850_elf_check_relocs): Likewise.
85 (v850_elf_add_symbol_hook): Likewise.
86 * elf64-alpha.c (elf64_alpha_add_symbol_hook): Likewise.
87 * elf64-ia64-vms.c (elf64_ia64_add_symbol_hook): Likewise.
88 * elfnn-ia64.c (elfNN_ia64_add_symbol_hook): Likewise.
89 * elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Likewise.
91 2020-08-15 Alan Modra <amodra@gmail.com>
94 * syms.c (bfd_decode_symclass): Choose 'c' for commons only when
96 * elf32-m32r.c (_bfd_m32r_elf_symbol_processing): Set SEC_SMALL_DATA
97 on small common section.
98 * elf32-score.c (s3_bfd_score_elf_symbol_processing): Likewise.
99 * elf32-score7.c (s7_bfd_score_elf_symbol_processing): Likewise.
100 * elf32-tic6x.c (elf32_tic6x_symbol_processing): Likewise.
101 * elf32-v850.c (v850_elf_symbol_processing): Likewise.
102 * elfxx-mips.c (_bfd_mips_elf_symbol_processing): Likewise.
103 * ecoff.c (ecoff_set_symbol_info, ecoff_link_add_externals): Likewise.
105 2020-08-14 Alan Modra <amodra@gmail.com>
107 * hash.c (bfd_hash_set_default_size): Use higher_prime_number
108 rather than another copy of primes. Increase maximum default
111 2020-08-13 Alan Modra <amodra@gmail.com>
113 * config.bfd: Obsolete arm*-*-symbianelf*, and ia64*-*-*.
115 2020-08-13 Alan Modra <amodra@gmail.com>
117 * elf64-ppc.h (struct ppc64_elf_params): Add no_pcrel_opt.
118 * elf64-ppc.c (ppc64_elf_relocate_section): Disable GOT reloc
119 optimizations when --no-toc-optimize. Disable R_PPC64_PCREL_OPT
120 optimization when --no-pcrel-optimize.
122 2020-08-13 Alan Modra <amodra@gmail.com>
125 * bfd.c (struct bfd): Add read_only.
126 * elfcode.h (elf_swap_shdr_in): Test both sh_offset and sh_size.
127 Set read_only on warning.
128 (elf_object_p): Sanity check program header alignment. Set
129 read_only on warning.
130 * bfd-in2.h: Regenerate.
132 2020-08-12 Jon Turney <jon.turney@dronecode.org.uk>
134 * elf.c (elfcore_grok_win32pstatus): Use unsigned int for
135 win32pstatus note type to avoid signedness comparison warning.
137 2020-07-21 Jon Turney <jon.turney@dronecode.org.uk>
139 * elf.c (elfcore_grok_win32pstatus): Warn on malformed
140 win32pstatus notes, and return TRUE so we continue rather than
141 stopping as if it was an error.
143 2020-07-01 Jon Turney <jon.turney@dronecode.org.uk>
145 * elf.c (elfcore_grok_win32pstatus): Handle NOTE_INFO_MODULE64.
147 2020-07-11 Jon Turney <jon.turney@dronecode.org.uk>
149 * elf.c (elfcore_grok_win32pstatus): Don't apply size constraint
150 for NOTE_INFO_THREAD to all win32pstatus ELF notes, instead apply
151 appropriate size constraint for each win32pstatus note type.
153 2020-07-01 Jon Turney <jon.turney@dronecode.org.uk>
155 * elf.c (elfcore_grok_win32pstatus): Don't hardcode the size of
156 the Win32 API thread CONTEXT type read from a NOTE_INFO_THREAD
159 2020-07-11 Jon Turney <jon.turney@dronecode.org.uk>
161 * elf.c (NOTE_INFO{_PROCESS,_THREAD,_MODULE}): Define.
162 (elfcore_grok_win32pstatus): Use.
164 2020-07-01 Jon Turney <jon.turney@dronecode.org.uk>
166 * elf.c (elfcore_grok_win32pstatus): Fix the offset used to read
167 the tid from a win32pstatus NOTE_INFO_THREAD ELF note. Fix
168 offsets used to read NOTE_INFO_PROCESS.
170 2020-08-12 Nick Clifton <nickc@redhat.com>
172 * po/ru.po: Updated Russian translation.
173 * po/sr.po: Updated Serbian translation.
175 2020-08-07 David Faust <david.faust@oracle.com>
177 * elf64-bpf.c (bpf_elf_relocate_section): Ensure signed division for
178 DISP16 and DISP32 relocations.
180 2020-08-05 David Faust <david.faust@oracle.com>
182 * elf64-bpf.c (bpf_elf_generic_reloc): New function.
183 (bpf_elf_howto_table): Use it here.
184 (bpf_elf_relocate_section): Use addends recorded in input_bfd for
185 instruction and data relocations.
187 2020-08-03 Alan Modra <amodra@gmail.com>
189 * vms-lib.c (vms_traverse_index): Sanity check size remaining
190 before accessing vms_idx or vms_elfidx.
192 2020-08-03 Alan Modra <amodra@gmail.com>
195 * elf.c (_bfd_elf_get_symtab_upper_bound): Sanity check symbol table
196 size against file size. Correct LONG_MAX limit check.
197 (_bfd_elf_get_dynamic_symtab_upper_bound): Likewise.
198 (_bfd_elf_get_reloc_upper_bound): Don't check file size if writing.
199 (_bfd_elf_get_dynamic_reloc_upper_bound): Likewise.
200 * elf64-x86-64-.c (elf_x86_64_get_synthetic_symtab): Use
201 bfd_malloc_and_get_section.
203 2020-07-31 Alan Modra <amodra@gmail.com>
206 * elflink.c (bfd_elf_link_record_dynamic_symbol): Don't allow
207 IR symbols to become dynamic.
208 (elf_link_add_object_symbols): Don't exclude IR symbols when
209 deciding whether an as-needed shared library is needed.
211 2020-07-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
214 * elfnn-aarch64.c (elfNN_aarch64_init_small_plt0_entry): Set sh_entsize
216 (elfNN_aarch64_finish_dynamic_sections): Remove sh_entsize setting.
218 2020-07-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
220 * bfd.m4 (BFD_SYS_PROCFS_H): New macro.
221 (BFD_HAVE_SYS_PROCFS_TYPE): Require BFD_SYS_PROCFS_H.
222 Don't define _STRUCTURED_PROC.
223 (BFD_HAVE_SYS_PROCFS_TYPE_MEMBER): Likewise.
224 * elf.c [HAVE_SYS_PROCFS_H] (_STRUCTURED_PROC): Don't define.
225 * configure.ac: Use BFD_SYS_PROCFS_H to check for <sys/procfs.h>.
226 * configure, config.in: Regenerate.
227 * Makefile.am (AM_CPPFLAGS): Add LARGEFILE_CPPFLAGS.
228 * Makefile.in, doc/Makefile.in: Regenerate.
230 2020-07-30 H.J. Lu <hongjiu.lu@intel.com>
232 * elf-bfd.h (sym_cache): Moved before elf_link_hash_table.
233 (elf_link_hash_table): Add sym_cache.
234 * elf32-arm.c (elf32_arm_link_hash_table): Remove sym_cache.
235 (elf32_arm_check_relocs): Updated.
236 (elf32_arm_size_dynamic_sections): Likewise.
237 * elf32-bfin.c (bfin_link_hash_table): Removed.
238 (bfin_link_hash_newfunc): Updated.
239 (bfin_hash_table): Removed.
240 * elf32-csky.c (csky_elf_link_hash_table): Remove sym_cache.
241 (csky_elf_check_relocs): Updated.
242 * elf32-hppa.c (elf32_hppa_link_hash_table): Remove sym_cache.
243 (elf32_hppa_check_relocs): Updated.
244 * elf32-i386.c (elf_i386_tls_transition): Updated.
245 (elf_i386_convert_load_reloc): Likewise.
246 (elf_i386_check_relocs): Likewise.
247 * elf32-m32r.c (elf_m32r_link_hash_table): Removed.
248 (m32r_elf_hash_table): Updated.
249 (m32r_elf_link_hash_table_create): Likewise.
250 (m32r_elf_create_dynamic_sections): Likewise.
251 (m32r_elf_adjust_dynamic_symbol): Likewise.
252 (allocate_dynrelocs): Likewise.
253 (m32r_elf_size_dynamic_sections): Likewise.
254 (m32r_elf_relocate_section): Likewise.
255 (m32r_elf_finish_dynamic_symbol): Likewise.
256 (m32r_elf_check_relocs): Likewise.
257 * elf32-m68hc1x.h (m68hc11_elf_link_hash_table): Remove
259 * elf32-m68k.c (elf_m68k_link_hash_table): Likewise.
260 (elf_m68k_check_relocs): Updated.
261 * elf32-metag.c (elf_metag_link_hash_table): Remove sym_cache.
262 (elf_metag_check_relocs): Updated.
263 * elf32-microblaze.c (elf32_mb_link_hash_table): Remove sym_sec.
264 (microblaze_elf_check_relocs): Updated.
265 * elf32-nds32.c (nds32_elf_link_hash_table_create): Likewise.
266 (nds32_elf_create_dynamic_sections): Likewise.
267 (nds32_elf_adjust_dynamic_symbol): Likewise.
268 (nds32_elf_check_relocs): Likewise.
269 * elf32-nds32.h (elf_nds32_link_hash_table): Remove sdynbss,
270 srelbss and aym_cache.
271 * elf32-nios2.c (elf32_nios2_link_hash_table): Remove sym_cache.
272 (nios2_elf32_check_relocs): Updated.
273 * elf32-or1k.c (elf_or1k_link_hash_table): Remove sym_sec.
274 (or1k_elf_check_relocs): Updated.
275 * elf32-ppc.c (ppc_elf_check_relocs): Remove sym_cache.
276 (ppc_elf_check_relocs): Updated.
277 * elf32-s390.c (elf_s390_link_hash_table): Remove sym_cache.
278 (elf_s390_check_relocs): Updated.
279 (elf_s390_finish_dynamic_sections): Likewise.
280 * elf32-sh.c (elf_sh_link_hash_table): Remove sdynbss, srelbss
282 (sh_elf_create_dynamic_sections): Updated.
283 (sh_elf_adjust_dynamic_symbol): Likewise.
284 (sh_elf_size_dynamic_sections): Likewise.
285 (sh_elf_check_relocs): Likewise.
286 * elf32-tic6x.c (elf32_tic6x_link_hash_table): Remove sym_cache.
287 (elf32_tic6x_check_relocs): Updated.
288 * elf32-tilepro.c (tilepro_elf_link_hash_table): Removed.
289 (tilepro_elf_hash_table): Updated.
290 (tilepro_elf_link_hash_table_create): Likewise.
291 (tilepro_elf_check_relocs): Likewise.
292 (tilepro_elf_adjust_dynamic_symbol): Likewise.
293 (allocate_dynrelocs): Likewise.
294 (tilepro_elf_size_dynamic_sections): Likewise.
295 (tilepro_elf_relocate_section): Likewise.
296 (tilepro_elf_finish_dynamic_symbol): Likewise.
297 (tilepro_finish_dyn): Likewise.
298 (tilepro_elf_finish_dynamic_sections): Likewise.
299 * elf64-ppc.c (ppc_link_hash_table): Remove sym_cache.
300 (ppc64_elf_before_check_relocs): Updated.
301 (ppc64_elf_check_relocs): Likewise.
302 * elf64-s390.c (elf_s390_link_hash_table): Remove sym_cache.
303 (elf_s390_check_relocs): Updated.
304 (elf_s390_relocate_section): Likewise.
305 (elf_s390_finish_dynamic_sections): Likewise.
306 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
307 (elf_x86_64_check_relocs): Likewise.
308 * elfnn-aarch64.c (elf_aarch64_link_hash_table): Remove
310 (elfNN_aarch64_check_relocs): Updated.
311 * elfnn-riscv.c (riscv_elf_link_hash_table): Remove sym_cache.
312 (riscv_elf_check_relocs): Updated.
313 * elfxx-mips.c (mips_elf_link_hash_table): Remove sym_cache.
314 (mips_elf_resolve_got_page_ref): Updated.
315 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
316 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Remove
318 * elfxx-tilegx.c (tilegx_elf_link_hash_table): Likewise.
319 (tilegx_elf_check_relocs): Updated.
320 * elfxx-x86.h (elf_x86_link_hash_table): Remove sym_cache.
322 2020-07-29 Maciej W. Rozycki <macro@linux-mips.org>
324 * elflink.c (bfd_elf_final_link): Give local symbols a name if
326 * elfxx-mips.c (_bfd_mips_elf_name_local_section_symbols): Only
327 return TRUE if making ET_REL output.
329 2020-07-29 Maciej W. Rozycki <macro@linux-mips.org>
331 * elf-bfd.h (elf_backend_data): Add
332 `elf_backend_elfsym_local_is_section' member.
333 * elfxx-target.h (elf_backend_elfsym_local_is_section): New
335 (elfNN_bed): Add `elf_backend_elfsym_local_is_section' member.
336 * elflink.c (bfd_elf_final_link): Use it to determine whether
337 set the `.symtab' section's `sh_info' value to the index of the
338 first non-local or non-section symbol.
339 * elf32-mips.c (mips_elf32_elfsym_local_is_section): New
341 (elf_backend_elfsym_local_is_section): New macro.
342 * elfn32-mips.c (mips_elf_n32_elfsym_local_is_section): New
344 (elf_backend_elfsym_local_is_section): New macro.
346 2020-07-29 Alan Modra <amodra@gmail.com>
348 * elflink.c (bfd_elf_final_link): Don't segfault on local dynsyms
349 defined in excluded sections.
351 2020-07-28 Alan Modra <amodra@gmail.com>
353 * elf.c (assign_section_numbers): Comment. Don't segfault on
354 discarded sections when setting linked-to section for generic
356 * elflink.c (bfd_elf_match_symbols_in_sections): Allow NULL info.
358 2020-07-27 Alan Modra <amodra@gmail.com>
360 * xcofflink.c (xcoff_need_ldrel_p): Accept --just-symbols symbols and
362 (bfd_xcoff_import_symbol): Don't fuss over absolute symbol
365 2020-07-24 Nick Clifton <nickc@redhat.com>
367 * config.bfd: Move xc16x target to the obsolete list.
369 2020-07-22 Kevin Buettner <kevinb@redhat.com>
371 * binary.c (binary_get_section_contents): Seek using offset
372 from section's file position.
374 2020-07-22 Kevin Buettner <kevinb@redhat.com>
376 * elf.c (_bfd_elf_make_section_from_phdr): Remove hack for GDB.
378 2020-07-22 Max Filippov <jcmvbkbc@gmail.com>
381 * elf32-xtensa.c (removed_literal_compare): Use correct pointer
382 type for the first function argument. Rename pointers to reflect
383 that they have distinct types.
385 2020-07-20 Alan Modra <amodra@gmail.com>
387 * elflink.c (_bfd_elf_gc_keep): Use bfd_is_const_section.
389 2020-07-19 Alan Modra <amodra@gmail.com>
391 * elf64-ppc.c (struct ppc_link_hash_table): Add has_power10_relocs.
392 (select_alt_stub): New function.
393 (ppc_get_stub_entry): Use it here.
394 (ppc64_elf_check_relocs): Set had_power10_relocs rather than
396 (ppc64_elf_size_stubs): Clear power10_stubs here instead. Don't
397 merge notoc stubs with other varieties when power10_stubs is "auto".
398 Instead dup the stub hash table entry.
399 (plt_stub_size, ppc_build_one_stub, ppc_size_one_stub): Adjust
400 tests of power10_stubs.
402 2020-07-15 Alan Modra <amodra@gmail.com>
405 * coffgen.c (_bfd_coff_close_and_cleanup): Free dwarf2 info.
407 2020-07-15 Nick Clifton <nickc@redhat.com>
410 * coffgen.c (coff_get_normalized_symtab): Fix off-by-one error in
411 check for aux entries that overflow the buufer.
413 2020-07-15 Hans-Peter Nilsson <hp@bitrange.com>
415 * elf64-mmix.c (mmix_elf_relax_section): Improve accounting for
416 R_MMIX_PUSHJ_STUBBABLE relocs against undefined symbols.
418 2020-07-15 Markus Böck <markus.boeck02@gmail.com>
419 Alan Modra <amodra@gmail.com>
422 * coffgen.c (_bfd_coff_section_already_linked): Allow for plugin
423 objects both before and after normal object files.
424 * elflink.c (_bfd_elf_section_already_linked): Likewise.
426 2020-07-10 Alan Modra <amodra@gmail.com>
428 * elf64-ppc.h (struct ppc64_elf_params): Add power10_stubs.
429 * elf64-ppc.c (struct ppc_link_hash_table): Delete
431 (ppc64_elf_check_relocs): Adjust setting of power10_stubs.
432 (plt_stub_size, ppc_build_one_stub, ppc_size_one_stub): Adjust
433 uses of power10_stubs.
435 2020-07-09 Alan Modra <amodra@gmail.com>
437 * coff-ppc.c: Delete.
440 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Remove PE PPC.
441 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags): Remove
443 (coff_write_object_contents): Remove PPC_PE code.
444 * config.bfd: Move powerpcle-pe to removed targets.
445 * configure.ac: Remove powerpc PE entries.
446 * libcoff-in.h (ppc_allocate_toc_section): Delete.
447 (ppc_process_before_allocation): Delete.
448 * peXXigen.c: Remove POWERPC_LE_PE code and comments.
449 * targets.c: Remove powerpc PE vectors.
450 * po/SRC-POTFILES.in: Regenerate.
451 * libcoff.h: Regenerate.
452 * Makefile.in: Regenerate.
453 * configure: Regenerate.
455 2020-07-09 Nick Clifton <nickc@redhat.com>
457 * po/fr.po: Updated French translation.
459 2020-07-07 Alan Modra <amodra@gmail.com>
461 * xcofflink.c (xcoff_mark): Don't mark const sections.
462 (bfd_xcoff_record_link_assignment): Add FIXME.
463 (_bfd_xcoff_bfd_final_link): Don't segfault on assorted magic
464 sections being discarded by linker script.
466 2020-07-07 Alan Modra <amodra@gmail.com>
468 * coff-rs6000.c (xcoff_write_archive_contents_old): Set default
469 time, uid, gid and mode for deterministic archive.
470 (xcoff_write_archive_contents_big): Likewise.
472 2020-07-07 Alan Modra <amodra@gmail.com>
474 * coffcode.h (coff_classify_symbol): Handle C_HIDEXT and
477 2020-07-06 Nick Clifton <nickc@redhat.com>
479 * po/pt.po: Updated Portuguese translation.
480 * po/uk.po: Updated Ukranian translation.
482 2020-07-04 Nick Clifton <nickc@redhat.com>
484 * version.m4: Set version to 2.35.50.
485 * configure: Regenerate.
486 * po/bbfd.pot: Regenerate.
488 2020-07-04 Nick Clifton <nickc@redhat.com>
490 Binutils 2.35 branch created.
492 2020-07-01 Alan Modra <amodra@gmail.com>
495 * coffgen.c (coff_find_nearest_line_with_names): Sanity check
496 raw syment index before dereferencing.
498 2020-07-01 Alan Modra <amodra@gmail.com>
500 * elf32-i386.c (elf_backend_object_p): Undef for vxworks.
502 2020-07-01 Alan Modra <amodra@gmail.com>
504 * config.bfd: Obsolete xc16x.
506 2020-06-30 H.J. Lu <hongjiu.lu@intel.com>
508 * archures.c (bfd_mach_i386_nacl): Removed.
509 (bfd_mach_i386_i386_nacl): Likewise.
510 (bfd_mach_x86_64_nacl): Likewise.
511 (bfd_mach_x64_32_nacl): Likewise.
512 * config.bfd: Remove *-*-nacl* targets.
513 * configure.ac: Remove x86 NaCl target vectors.
514 * cpu-i386.c (bfd_arch_i386_onebyte_nop_fill): Removed.
515 (bfd_x64_32_nacl_arch): Likewise.
516 (bfd_x86_64_nacl_arch): Likewise.
517 (bfd_i386_nacl_arch): Likewise.
518 (bfd_x64_32_arch_intel_syntax): Updated.
519 * elf32-i386.c: Don't include "elf-nacl.h".
520 (elf_i386_nacl_plt): Removed.
521 (elf_i386_nacl_plt0_entry): Likewise.
522 (elf_i386_nacl_plt_entry): Likewise.
523 (elf_i386_nacl_pic_plt0_entry): Likewise.
524 (elf_i386_nacl_pic_plt_entry): Likewise.
525 (elf_i386_nacl_eh_frame_plt): Likewise.
526 (elf_i386_nacl_plt): Likewise.
527 (elf32_i386_nacl_elf_object_p): Likewise.
528 (elf_i386_get_synthetic_symtab): Updated.
529 (elf_i386_link_setup_gnu_properties): Likewise.
530 * elf64-x86-64.c: Don't include "elf-nacl.h".
531 (elf_x86_64_nacl_plt): Removed.
532 (elf64_x86_64_nacl_elf_object_p): Likewise.
533 (elf_x86_64_nacl_plt0_entry): Likewise.
534 (elf_x86_64_nacl_plt_entry): Likewise.
535 (elf_x86_64_nacl_eh_frame_plt): Likewise.
536 (elf_x86_64_nacl_plt): Likewise.
537 (elf32_x86_64_nacl_elf_object_p): Likewise.
538 (elf_x86_64_get_synthetic_symtab): Updated.
539 (elf_x86_64_link_setup_gnu_properties): Likewise.
540 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
541 * targets.c: Remove x86 NaCl target vectors.
542 * bfd-in2.h: Regenerated.
543 * configure: Likewise.
545 2020-06-29 H.J. Lu <hongjiu.lu@intel.com>
547 * elf32-tic6x.c (elf32_tic6x_size_dynamic_sections): Call
548 _bfd_elf_add_dynamic_tags.
550 2020-06-29 Alan Modra <amodra@gmail.com>
552 * peXXigen.c (_bfd_XXi_slurp_codeview_record): Properly check
553 return value of bfd_bread. Don't read more than requested length.
554 Sanity check length. Properly terminate file name.
556 2020-06-29 Alan Modra <amodra@gmail.com>
558 * arc-got.h: Use C style comments.
559 * coff-z80.c: Likewise.
560 * elf32-csky.c: Likewise.
561 * peXXigen.c: Likewise.
562 * elf32-m32c.c (m32c_elf_relax_delete_bytes): Remove commented out
565 2020-06-26 Pat Bernardi <bernardi@adacore.com>
567 * elf32-m68k.c (m68k_elf_merge_obj_attributes): New function.
568 (elf32_m68k_merge_private_bfd_data): Merge GNU attributes.
570 2020-06-26 Alan Modra <amodra@gmail.com>
572 * elfxx-riscv.c (struct priv_spec_t, priv_specs),
573 (riscv_get_priv_spec_class, riscv_get_priv_spec_class_from_numbers),
574 (riscv_get_priv_spec_name): Move to..
575 * cpu-riscv.c: ..here.
576 (riscv_get_priv_spec_class_from_numbers): Don't xmalloc temp buffer.
577 Use %u to print unsigned numbers.
579 2020-06-24 Andrew Burgess <andrew.burgess@embecosm.com>
581 * cpu-riscv.c (riscv_scan): Don't allow shorter matches using the
582 default architecture.
584 2020-06-24 H.J. Lu <hongjiu.lu@intel.com>
587 * elf32-csky.c (csky_elf_size_dynamic_sections): Call
588 _bfd_elf_add_dynamic_tags.
590 2020-06-24 H.J. Lu <hongjiu.lu@intel.com>
593 * elf32-cris.c (elf_cris_size_dynamic_sections): Call
594 _bfd_elf_add_dynamic_tags.
596 2020-06-24 Alan Modra <amodra@gmail.com>
598 * vms-alpha.c (_bfd_vms_slurp_etir <ETIR__C_OPR_ASH>): Implement
599 shifts without undefined behaviour.
601 2020-06-23 H.J. Lu <hongjiu.lu@intel.com>
603 * elf-bfd.h (elf_link_hash_table): Add dt_pltgot_required and
605 (_bfd_elf_add_dynamic_tags): New.
606 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Call
607 _bfd_elf_add_dynamic_tags.
608 * elf32-arc.c (elf_arc_size_dynamic_sections): Likewise.
609 * elf32-bfin.c (elf32_bfinfdpic_size_dynamic_sections): Likewise.
610 * elf32-cr16.c (_bfd_cr16_elf_size_dynamic_sections): Likewise.
611 * elf32-frv.c (elf32_frvfdpic_size_dynamic_sections): Likewise.
612 * elf32-lm32.c (lm32_elf_size_dynamic_sections): Likewise.
613 * elf32-m32r.c (m32r_elf_size_dynamic_sections): Likewise.
614 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
615 * elf32-microblaze.c (microblaze_elf_size_dynamic_sections):
617 * elf32-nds32.c (nds32_elf_size_dynamic_sections): Likewise.
618 * elf32-nios2.c (nios2_elf32_size_dynamic_sections): Likewise.
619 * elf32-or1k.c (or1k_elf_size_dynamic_sections): Likewise.
620 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
621 * elf32-tilepro.c (tilepro_elf_size_dynamic_sections): Likewise.
622 * elf32-vax.c (elf_vax_size_dynamic_sections): Likewise.
623 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
624 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
625 * elfnn-aarch64.c (elfNN_aarch64_size_dynamic_sections):
627 * elfnn-riscv.c (riscv_elf_size_dynamic_sections): Likewise.
628 * elfxx-tilegx.c (tilegx_elf_size_dynamic_sections): Likewise.
629 * elf32-arm.c (elf32_arm_size_dynamic_sections): Call
630 _bfd_elf_maybe_vxworks_add_dynamic_tags.
631 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
632 * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections):
634 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Likewise.
635 (_bfd_x86_elf_size_dynamic_sections): Likewise.
636 * elfxx-x86.h (elf_x86_link_hash_table): Remove dt_reloc,
637 dt_reloc_sz and dt_reloc_ent.
638 * elf-vxworks.c (_bfd_elf_maybe_vxworks_add_dynamic_tags): New.
639 * elf-vxworks.h (_bfd_elf_maybe_vxworks_add_dynamic_tags):
641 * elf32-hppa.c (elf32_hppa_link_hash_table_create): Set
642 etab.dt_pltgot_required.
643 (elf32_hppa_size_dynamic_sections): Call
644 _bfd_elf_add_dynamic_tags.
645 * elf32-metag.c (elf_metag_link_hash_table_create): Set
646 etab.dt_pltgot_required.
647 (elf_metag_size_dynamic_sections): Call _bfd_elf_add_dynamic_tags.
648 * elf32-sh.c (sh_elf_link_hash_table_create): Set
649 root.dt_pltgot_required for FDPIC output.
650 (sh_elf_size_dynamic_sections): Call
651 _bfd_elf_maybe_vxworks_add_dynamic_tags.
652 * elf32-xtensa.c (elf_xtensa_link_hash_table_create): Set
653 elf.dt_pltgot_required.
654 (elf_xtensa_size_dynamic_sections): Call
655 _bfd_elf_add_dynamic_tags.
656 * elf64-hppa.c (elf64_hppa_hash_table_create): Set
657 root.dt_pltgot_required.
658 (elf64_hppa_size_dynamic_sections): Call
659 _bfd_elf_add_dynamic_tags.
660 * elfnn-ia64.c (elfNN_ia64_hash_table_create): Set
661 root.dt_pltgot_required.
662 (elfNN_ia64_size_dynamic_sections): Set root.dt_jmprel_required
663 for rel_pltoff_sec. Call _bfd_elf_add_dynamic_tags.
664 * elflink.c (_bfd_elf_add_dynamic_tags): New.
666 2020-06-22 Saagar Jha <saagar@saagarjha.com>
668 * mach-o.c: Support the new load commands by reading a linkedit
669 data command for them.
671 2020-06-22 Nelson Chu <nelson.chu@sifive.com>
673 * elfxx-riscv.c (struct priv_spec_t priv_specs[]): Move them from
674 opcodes/riscv-opc.c to bfd/elfxx-riscv.c, since we need it in linker.
675 (riscv_get_priv_spec_class): Likewise.
676 (riscv_get_priv_spec_name): Likewise.
677 (riscv_get_priv_spec_class_from_numbers): New function, convert
678 the version numbers into string, then call riscv_get_priv_spec_class
679 to get the priv spec class.
680 * elfxx-riscv.h (riscv_get_priv_spec_class): Move forward declaration
681 from include/opcode/riscv.h to bfd/elfxx-riscv.h.
682 (riscv_get_priv_spec_name): Likewise.
683 (riscv_get_priv_spec_class_from_numbers): New forward declaration.
684 (opcode/riscv.h): Include it in the header rather than elfxx-riscv.c.
685 * elfnn-riscv.c (riscv_merge_attributes): Get the priv spec classes
686 of input and output objects form their priv spec attributes by
687 riscv_get_priv_spec_class_from_numbers. Report warning rather than
688 errors when linking objects with differnet priv spec versions. We do
689 know v1.9.1 may have conflicts to other versions, so report the
690 warning, too. After that, update the output priv spec version to the
693 2020-06-22 Nelson Chu <nelson.chu@sifive.com>
695 * elfnn-riscv.c (riscv_merge_attributes): Once we meet one of the
696 priv attributes, we will check the conflicts for all of them (major,
697 minor and revision), and then set the priv_attrs_merged to TRUE to
698 indicate that we have handled all of the priv attributes. Remove
699 the unused boolean priv_may_conflict, in_priv_zero and out_priv_zero.
701 2020-06-21 Alan Modra <amodra@gmail.com>
704 * configure.ac: Disable plugins by default for some targets.
705 * plugin.c: Comment typo fix.
706 * configure: Regenerate.
708 2020-06-19 Nick Clifton <nickc@redhat.com>
710 * plugin.c (try_load_plugin): Suppress the error message about
711 being unable to open a plugin if creating a list of viable
714 2020-06-16 Alan Modra <amodra@gmail.com>
716 * aout-tic30.c: Delete file.
717 * Makefile.am (BFD32_BACKENDS): Remove aout-tic30.lo.
718 (BFD32_BACKENDS_CFILES): Remove aout-tic30.c.
719 * config.bfd (c30-*-*aout*, tic30-*-*aout*): Remove entry.
720 (xc16x-*-elf): Sort properly.
721 * configure.ac: Remove tic30_aout_vec.
722 * targets.c: Likewise.
723 * Makefile.in: Regenerate.
724 * configure: Regenerate.
725 * po/SRC-POTFILES.in: Regenerate.
727 2020-06-15 Max Filippov <jcmvbkbc@gmail.com>
729 * elf32-xtensa.c (XSHAL_ABI, XTHAL_ABI_UNDEFINED)
730 (XTHAL_ABI_WINDOWED, XTHAL_ABI_CALL0): New macros.
731 (elf32xtensa_abi): New global variable.
732 (xtensa_abi_choice): New function.
733 (elf_xtensa_create_plt_entry): Use xtensa_abi_choice instead of
734 XSHAL_ABI to select PLT code.
736 2020-06-15 Roland McGrath <mcgrathr@google.com>
738 * elflink.c (bfd_elf_define_start_stop): Use start_stop_visibility
739 field of bfd_link_info.
741 2020-06-15 Alan Modra <amodra@gmail.com>
743 * config.bfd: Obsolete powerpcle-*-pe targets.
745 2020-06-15 Alan Modra <amodra@gmail.com>
748 * elflink.c (elf_link_add_archive_symbols): Exclude undefined
749 symbols that were defined in discarded sections.
750 * cofflink.c (coff_link_check_archive_element): Likewise.
751 (coff_link_add_symbols): Set indx to -3 for symbols defined in
753 (_bfd_coff_write_global_sym): Don't emit such symbols.
754 libcoff-in.h (struct coff_link_hash_entry): Update indx comment.
755 libcoff.h: Regenerate.
757 2020-06-11 Alan Modra <amodra@gmail.com>
760 * pdp11.c (is_stab): Replace legacy "index" function with "strchr".
762 2020-06-10 H.J. Lu <hongjiu.lu@intel.com>
764 * elfnn-ia64.c (elfNN_ia64_link_hash_table): Remove reltext.
765 (allocate_dynrel_entries): Set DF_TEXTREL instead of reltext.
766 (elfNN_ia64_size_dynamic_sections): Check DF_TEXTREL instead
769 2020-06-10 H.J. Lu <hongjiu.lu@intel.com>
772 * elflink.c (bfd_elf_define_start_stop): Handle common symbols.
773 Clear verinfo.verdef.
775 2020-06-09 H.J. Lu <hongjiu.lu@intel.com>
778 * elf-bfd.h (elf_link_hash_table): Add ifunc_resolvers.
779 (_bfd_elf_allocate_ifunc_dyn_relocs): Remove the
780 bfd_boolean * argument. Set ifunc_resolvers if there are IFUNC
782 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Updated.
783 Set ifunc_resolvers if there are FUNC resolvers.
784 * elf64-ppc.c (ppc_link_hash_table): Remove local_ifunc_resolver.
785 (build_global_entry_stubs_and_plt): Replace local_ifunc_resolver
786 with elf.ifunc_resolvers.
787 (write_plt_relocs_for_local_syms): Likewise.
788 (ppc64_elf_relocate_section): Likewise.
789 (ppc64_elf_finish_dynamic_sections): Likewise.
790 * elfnn-aarch64.c (elfNN_aarch64_allocate_ifunc_dynrelocs):
792 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Likewise.
793 (_bfd_x86_elf_size_dynamic_sections): Check elf.ifunc_resolvers
794 instead of readonly_dynrelocs_against_ifunc.
795 * elfxx-x86.h (elf_x86_link_hash_table): Remove
796 readonly_dynrelocs_against_ifunc.
798 2020-06-09 Alan Modra <amodra@gmail.com>
800 * elf64-ppc.c (struct ppc_link_hash_table): Delete
801 maybe_local_ifunc_resolver field.
802 (build_global_entry_stubs_and_plt): Set local_ifunc_resolver in
803 cases where maybe_local_ifunc_resolver was set.
804 (ppc64_elf_relocate_section): Likewise.
805 (ppc64_elf_finish_dynamic_sections): Downgrade ifunc with textrel
808 2020-06-08 H.J. Lu <hongjiu.lu@intel.com>
810 * elf-bfd.h (elf_link_hash_entry): Add tlsdesc_plt and
812 * elf32-arm.c (elf32_arm_link_hash_table): Remove tlsdesc_plt
814 (elf32_arm_size_dynamic_sections): Updated. Clear
815 root.tlsdesc_plt for DF_BIND_NOW.
816 (elf32_arm_finish_dynamic_sections): Updated.
817 (elf32_arm_output_arch_local_syms): Likewise.
818 * elf32-nds32.c (nds32_elf_size_dynamic_sections): Updated.
819 Clear root.tlsdesc_plt for DF_BIND_NOW.
820 (nds32_elf_finish_dynamic_sections): Updated.
821 * elf32-nds32.h (elf_nds32_link_hash_table): Remove
822 dt_tlsdesc_plt and dt_tlsdesc_got.
823 * elf64-x86-64.c (elf_x86_64_finish_dynamic_sections): Updated.
824 * elfnn-aarch64.c (elf_aarch64_link_hash_table): Remove
825 tlsdesc_plt and dt_tlsdesc_got.
826 (elfNN_aarch64_allocate_dynrelocs): Updated.
827 (elfNN_aarch64_finish_dynamic_sections): Likewise.
828 (elfNN_aarch64_size_dynamic_sections): Updated. Clear
829 root.tlsdesc_plt for DF_BIND_NOW. Don't check DF_BIND_NOW
831 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Updated.
832 (_bfd_x86_elf_size_dynamic_sections): Likewise.
833 (_bfd_x86_elf_finish_dynamic_sections): Likewise.
834 * elfxx-x86.h (elf_x86_link_hash_table): Remove tlsdesc_plt and
837 2020-06-07 H.J. Lu <hongjiu.lu@intel.com>
839 * elf32-tic6x.c (elf32_bed): Defined the default to
842 2020-06-07 H.J. Lu <hongjiu.lu@intel.com>
844 * elf64-hppa.c (elf64_hppa_link_hash_table): Remove plt_sec and
846 (elf64_hppa_check_relocs): Replace plt_sec/plt_rel_sec with
847 root.splt/root.srelplt.
848 (elf64_hppa_create_dynamic_sections): Likewise.
849 (elf64_hppa_size_dynamic_sections): Likewise.
850 (elf64_hppa_finish_dynamic_symbol): Likewise.
851 (elf_hppa_final_link): Likewise.
852 (elf_hppa_final_link_relocate): Likewise.
854 2020-06-06 H.J. Lu <hongjiu.lu@intel.com>
856 * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Updated.
857 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Remove
860 2020-06-06 H.J. Lu <hongjiu.lu@intel.com>
862 * elf-bfd.h (elf_target_os): New.
863 (elf_link_hash_table): Add target_os.
864 (elf_backend_data): Add target_os.
865 * elf32-arm.c (elf32_arm_link_hash_table): Remove vxworks_p,
866 symbian_p and nacl_p.
867 (create_got_section): Updated.
868 (elf32_arm_create_dynamic_sections): Likewise.
869 (arm_type_of_stub): Likewise.
870 (elf32_arm_create_or_find_stub_sec): Likewise.
871 (elf32_arm_allocate_plt_entry): Likewise.
872 (elf32_arm_populate_plt_entry): Likewise.
873 (elf32_arm_final_link_relocate): Likewise.
874 (elf32_arm_check_relocs): Likewise.
875 (allocate_dynrelocs_for_symbol): Likewise.
876 (elf32_arm_finish_dynamic_symbol): Likewise.
877 (elf32_arm_finish_dynamic_sections): Likewise.
878 (elf32_arm_output_plt_map_1): Likewise.
879 (elf32_arm_output_arch_local_syms): Likewise.
880 (elf32_arm_add_symbol_hook): Likewise.
881 (elf32_arm_nacl_link_hash_table_create): Likewise.
882 (elf32_arm_vxworks_link_hash_table_create): Likewise.
883 (elf32_arm_symbian_link_hash_table_create): Likewise.
884 (ELF_TARGET_OS): New.
885 * elf32-i386.c (elf_i386_arch_bed): Removed.
886 (elf_backend_arch_data): Likewise.
887 (elf_i386_solaris_arch_bed): Likewise.
888 (elf_i386_nacl_arch_bed): Likewise.
889 (elf_i386_vxworks_arch_bed): Likewise.
890 (elf_i386_relocate_section): Updated.
891 (elf_i386_finish_dynamic_sections): Likewise.
892 (elf_i386_get_synthetic_symtab): Likewise.
893 (elf_i386_link_setup_gnu_properties): Likewise.
894 (ELF_TARGET_OS): New.
895 * elf32-mips.c (ELF_TARGET_OS): New.
896 * elf32-ppc.c (ppc_elf_link_hash_table): Remove is_vxworks.
897 (ppc_elf_create_got): Updated.
898 (ppc_elf_create_dynamic_sections): Likewise.
899 (ppc_elf_check_relocs): Likewise.
900 (ppc_elf_adjust_dynamic_symbol): Likewise.
901 (ppc_elf_size_dynamic_sections): Likewise.
902 (ppc_elf_relocate_section): Likewise.
903 (ppc_elf_finish_dynamic_sections): Likewise.
904 (ppc_elf_vxworks_link_hash_table_create): Likewise.
905 (ELF_TARGET_OS): New.
906 * elf32-sh.c (elf_sh_link_hash_table): Remove vxworks_p.
907 (sh_elf_link_hash_table_create): Updated.
908 (sh_elf_create_dynamic_sections): Likewise.
909 (allocate_dynrelocs): Likewise.
910 (sh_elf_size_dynamic_sections): Likewise.
911 (sh_elf_relocate_section): Likewise.
912 (sh_elf_finish_dynamic_symbol): Likewise.
913 (sh_elf_finish_dynamic_sections): Likewise.
914 (ELF_TARGET_OS): New.
915 * elf32-sparc.c (elf32_sparc_vxworks_link_hash_table_create):
917 (bfd_elf32_bfd_link_hash_table_create): Likewise.
918 (ELF_TARGET_OS): New.
919 * elf64-x86-64.c (elf_x86_64_arch_bed): Removed.
920 (elf_x86_64_solaris_arch_bed): Likewise.
921 (elf_x86_64_nacl_arch_bed): Likewise.
922 (elf_x86_64_finish_dynamic_sections): Updated.
923 (elf_x86_64_get_synthetic_symtab): Likewise.
924 (elf_x86_64_link_setup_gnu_properties): Likewise.
925 (ELF_TARGET_OS): New.
926 * elflink.c (_bfd_elf_link_hash_table_init): Initialize
928 * elfxx-mips.c (mips_elf_link_hash_table): Remove is_vxworks.
929 (MIPS_ELF_REL_DYN_NAME): Updated.
930 (ELF_MIPS_GP_OFFSET): Likewise.
931 (mips_elf_create_local_got_entry): Likewise.
932 (mips_elf_allocate_dynamic_relocations): Likewise.
933 (mips_elf_count_got_symbols): Likewise.
934 (is_gott_symbol): Likewise.
935 (mips_elf_calculate_relocation): Likewise.
936 (mips_elf_create_dynamic_relocation): Likewise.
937 (_bfd_mips_elf_check_relocs): Likewise.
938 (allocate_dynrelocs): Likewise.
939 (_bfd_mips_elf_adjust_dynamic_symbol): Likewise.
940 (mips_elf_lay_out_got): Likewise.
941 (mips_elf_set_plt_sym_value): Likewise.
942 (_bfd_mips_elf_size_dynamic_sections): Likewise.
943 (_bfd_mips_elf_finish_dynamic_symbol): Likewise.
944 (_bfd_mips_elf_finish_dynamic_sections): Likewise.
945 (_bfd_mips_elf_final_link): Likewise.
946 (_bfd_mips_init_file_header): Likewise.
947 * elfxx-sparc.c (_bfd_sparc_elf_create_dynamic_sections):
949 (allocate_dynrelocs): Likewise.
950 (_bfd_sparc_elf_size_dynamic_sections): Likewise.
951 (_bfd_sparc_elf_relocate_section): Likewise.
952 (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
953 (sparc_finish_dyn): Likewise.
954 (_bfd_sparc_elf_finish_dynamic_sections): Likewise.
955 * elfxx-target.h (ELF_TARGET_OS): New.
956 (elfNN_bed): Add ELF_TARGET_OS.
957 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Updated.
958 (_bfd_x86_elf_link_hash_table_create): Likewise.
959 (_bfd_x86_elf_size_dynamic_sections): Likewise.
960 (_bfd_x86_elf_finish_dynamic_sections): Likewise.
961 (_bfd_x86_elf_adjust_dynamic_symbol): Likewise.
962 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
963 * elfxx-x86.h (elf_x86_target_os): Removed.
964 (elf_x86_backend_data): Likewise.
965 (get_elf_x86_backend_data): Likewise.
966 (elf_x86_link_hash_table): Remove target_os.
968 2020-06-06 Alan Modra <amodra@gmail.com>
971 BFD_RELOC_PPC64_GOT_TLSGD34 to BFD_RELOC_PPC64_GOT_TLSGD_PCREL34,
972 BFD_RELOC_PPC64_GOT_TLSLD34 to BFD_RELOC_PPC64_GOT_TLSLD_PCREL34,
973 BFD_RELOC_PPC64_GOT_TPREL34 to BFD_RELOC_PPC64_GOT_TPREL_PCREL34,
974 BFD_RELOC_PPC64_GOT_DTPREL34 to BFD_RELOC_PPC64_GOT_DTPREL_PCREL34.
975 * elf64-ppc.c: Update throughout for reloc renaming.
976 (ppc64_elf_reloc_name_lookup): Handle old reloc names.
977 * libbfd.h: Regenerate.
978 * bfd-in2.h: Regenerate.
980 2020-06-05 H.J. Lu <hongjiu.lu@intel.com>
983 * elf32-bfin.c (bfinfdpic_relocate_section): Skip non SEC_ALLOC
986 2020-06-05 Nick Clifton <nickc@redhat.com>
988 * pdp11.c (aout_link_add_symbols): Fix use before initialisation
991 2020-06-05 Nelson Chu <nelson.chu@sifive.com>
993 * elfnn-riscv.c (riscv_merge_attributes): Add new boolean
994 priv_may_conflict, in_priv_zero and out_priv_zero to decide
995 whether the object can be linked according to it's priv
996 attributes. The object without any priv spec attributes can
997 be linked with others. If the first input object doesn't contain
998 any priv attributes, then we need to copy the setting from the
999 next input one. Also report more detailed error messages to user.
1001 2020-06-04 Stephen Casner <casner@acm.org>
1003 Extend pdp11-aout symbol table format to accommodate .stab
1004 symbols and implement correct handling of them.
1006 * pdp11.c (pdp11_external_nlist): Repurposed e_unused to e_desc.
1007 (N_STAB, is_stab): Needed new function is_stab to disambiguate
1008 normal vs. .stab symbol table type values, replacing N_STAB mask.
1009 (translate_from_native_sym_flags): Determine correct section for
1010 different .stab types.
1011 (translate_to_native_sym_flags): Leave .stab types intact.
1012 (translate_symbol_table): Error if symbol indicates overlay;
1013 store desc field from .stab symbols.
1014 (write_syms): Output desc field with symbol.
1015 (aout_link_check_ar_symbols): Skip .stab symbols.
1016 (aout_link_add_symbols): Correctly distinguish .stab symbols.
1017 (aout_link_write_other_symbol): Write 0 for desk and ovly fields.
1018 (aout_link_write_symbols): Write 0 for desk and ovly fields;
1019 correctly distinguish .stab symbols and select calculate their
1020 section and value; and copy desc and ovly fields from input symbol
1023 2020-06-04 Stephen Casner <casner@acm.org>
1025 * aoutx.h (translate_symbol_table): Comment had external and
1027 * pdp11.c (translate_symbol_table): Likewise.
1029 2020-06-04 H.J. Lu <hongjiu.lu@intel.com>
1031 * elfxx-x86.h (elf_x86_link_hash_table): Remove target_id.
1032 (is_x86_elf): Check elf.hash_table_id instead of target_id.
1033 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Updated.
1035 2020-06-04 H.J. Lu <hongjiu.lu@intel.com>
1038 * elf-m10300.c (mn10300_elf_relocate_section): Resolve relocation
1039 in debug section against symbol defined in shared library to 0.
1040 * elf32-i386.c (elf_i386_check_relocs): Remove SEC_ALLOC check.
1041 * elf32-lm32.c (lm32_elf_check_relocs): Likewise.
1042 * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
1043 * elf32-nds32.c (nds32_elf_check_relocs): Likewise.
1044 * elf32-nios2.c (nios2_elf32_check_relocs): Likewise.
1045 * elf32-or1k.c (or1k_elf_check_relocs): Likewise.
1046 * elf32-ppc.c (ppc_elf_check_relocs): Likewise.
1047 * elf32-sh.c (sh_elf_check_relocs): Likewise.
1048 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
1049 * elf64-alpha.c (elf64_alpha_check_relocs): Likewise.
1050 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
1051 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1052 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
1053 * elf32-vax.c (elf_vax_check_relocs): Set non_got_ref for non-GOT
1055 (elf_vax_adjust_dynamic_symbol): Generate a copy reloc only if
1056 there is non-GOT reference.
1057 * elflink.c (_bfd_elf_link_check_relocs): Skip non-loaded,
1058 non-alloced sections.
1060 2020-06-03 Stephen Casner <casner@acm.org>
1062 Copy several years of fixes from bfd/aoutx.h to bfd/pdp11.c.
1064 * pdp11.c (some_aout_object_p): 4c1534c7a2a - Don't set EXEC_P for
1066 (aout_get_external_symbols): 6b8f0fd579d - Return if count is zero.
1067 0301ce1486b PR 22306 - Handle stringsize of zero, and error for any
1068 other size that doesn't qcover the header word.
1069 bf82069dce1 PR 23056 - Allocate an extra byte at the end of the
1070 string table, and zero it.
1071 (translate_symbol_table): 0d329c0a83a PR 22887 - Print an error
1072 message and set bfd_error on finding an invalid name string offset.
1073 (add_to_stringtab): INLINE -> inline
1074 (pdp11_aout_swap_reloc_in): 116acb2c268 PR 22887 - Correct r_index
1076 (squirt_out_relocs): e2996cc315d PR 20921 - Check for and report
1077 any relocs that could not be recognised.
1078 92744f05809 PR 20929 - Check for relocs without an associated symbol.
1079 (find_nearest_line): 808346fcfcf PR 23055 - Check that the symbol
1080 name exists and is long enough, before attempting to see if it is
1082 c3864421222 - Correct case for N_SO being the last symbol.
1083 50455f1ab29 PR 20891 - Handle the case where the main file name
1084 and the directory name are both empty.
1085 e82ab856bb4 PR 20892 - Handle the case where function name is empty.
1086 (aout_link_add_symbols): e517df3dbf7 PR 19629 - Check for out of
1087 range string table offsets.
1088 531336e3a0b PR 20909 - Fix off-by-one error in check for an
1089 illegal string offset.
1090 (aout_link_includes_newfunc): Add comment.
1091 (pdp11_aout_link_input_section): ad756e3f9e6 - Return with an error
1092 on unexpected relocation type rather than ASSERT.
1094 2020-06-03 H.J. Lu <hongjiu.lu@intel.com>
1097 * elf32-nios2.c (nios2_elf32_size_dynamic_sections): Call
1098 _bfd_elf_maybe_set_textrel to set DF_TEXTREL.
1100 2020-06-03 H.J. Lu <hongjiu.lu@intel.com>
1103 * elf32-nios2.c (nios2_elf32_check_relocs): Skip non-loaded,
1104 non-alloced sections.
1106 2020-06-03 H.J. Lu <hongjiu.lu@intel.com>
1108 * elf32-frv.c (elf32_frv_relocate_section): Don't generate
1109 dynamic relocations for non SEC_ALLOC sections.
1111 2020-06-03 Gunther Nikl <gnikl@justmail.de>
1113 * aout64.c (BMAGIC, QMAGIC): Do not define.
1114 * aoutx.h (N_IS_BMAGIC, N_SET_QMAGIC): New defines.
1115 (NAME (aout, some_aout_object_p)): Use N_IS_QMAGIC and N_IS_BMAGIC
1116 to check the file format.
1117 (adjust_z_magic): Use N_SET_QMAGIC to set file format.
1118 * i386aout.c (NO_WRITE_HEADER_KLUDGE): Delete define.
1119 * libaout.h (NO_WRITE_HEADER_KLUDGE): Do not define.
1121 2020-06-03 H.J. Lu <hongjiu.lu@intel.com>
1123 * elf32-arc.c (elf_arc_relocate_section): Don't generate dynamic
1124 relocations for non SEC_ALLOC sections.
1126 2020-06-03 H.J. Lu <hongjiu.lu@intel.com>
1128 * elf-bfd.h (_bfd_elf_maybe_set_textrel): New
1129 * elf32-arm.c (maybe_set_textrel): Removed.
1130 (elf32_arm_size_dynamic_sections): Replace maybe_set_textrel
1131 with _bfd_elf_maybe_set_textrel.
1132 * elf32-csky.c (maybe_set_textrel): Removed.
1133 (csky_elf_size_dynamic_sections): Replace maybe_set_textrel
1134 with _bfd_elf_maybe_set_textrel.
1135 * elf32-hppa.c (maybe_set_textrel): Removed.
1136 (elf32_hppa_size_dynamic_sections): Replace maybe_set_textrel
1137 with _bfd_elf_maybe_set_textrel.
1138 * elf32-lm32.c (maybe_set_textrel): Removed.
1139 (lm32_elf_size_dynamic_sections): Replace maybe_set_textrel
1140 with _bfd_elf_maybe_set_textrel.
1141 * elf32-m32r.c (maybe_set_textrel): Removed.
1142 (m32r_elf_size_dynamic_sections): Replace maybe_set_textrel
1143 with _bfd_elf_maybe_set_textrel.
1144 * elf32-metag.c (maybe_set_textrel): Removed.
1145 (elf_metag_size_dynamic_sections): Replace maybe_set_textrel
1146 with _bfd_elf_maybe_set_textrel.
1147 * elf32-nds32.c (maybe_set_textrel): Removed.
1148 (nds32_elf_size_dynamic_sections): Replace maybe_set_textrel
1149 with _bfd_elf_maybe_set_textrel.
1150 * elf32-or1k.c (maybe_set_textrel): Removed.
1151 (or1k_elf_size_dynamic_sections): Replace maybe_set_textrel
1152 with _bfd_elf_maybe_set_textrel.
1153 * elf32-ppc.c (maybe_set_textrel): Removed.
1154 (ppc_elf_size_dynamic_sections): Replace maybe_set_textrel
1155 with _bfd_elf_maybe_set_textrel.
1156 * elf32-s390.c (maybe_set_textrel): Removed.
1157 (elf_s390_size_dynamic_sections): Replace maybe_set_textrel
1158 with _bfd_elf_maybe_set_textrel.
1159 * elf32-sh.c (maybe_set_textrel): Removed.
1160 (sh_elf_size_dynamic_sections): Replace maybe_set_textrel
1161 with _bfd_elf_maybe_set_textrel.
1162 * elf32-tic6x.c (maybe_set_textrel): Removed.
1163 (elf32_tic6x_size_dynamic_sections): Replace maybe_set_textrel
1164 with _bfd_elf_maybe_set_textrel.
1165 * elf32-tilepro.c (maybe_set_textrel): Removed.
1166 (tilepro_elf_size_dynamic_sections): Replace maybe_set_textrel
1167 with _bfd_elf_maybe_set_textrel.
1168 * elf64-ppc.c (maybe_set_textrel): Removed.
1169 (ppc64_elf_size_dynamic_sections): Replace maybe_set_textrel
1170 with _bfd_elf_maybe_set_textrel.
1171 * elf64-s390.c (maybe_set_textrel): Removed.
1172 (elf_s390_size_dynamic_sections): Replace maybe_set_textrel
1173 with _bfd_elf_maybe_set_textrel.
1174 * elfnn-aarch64.c (maybe_set_textrel): Removed.
1175 (elfNN_aarch64_size_dynamic_sections): Replace maybe_set_textrel
1176 with _bfd_elf_maybe_set_textrel.
1177 * elfnn-riscv.c (maybe_set_textrel): Removed.
1178 (riscv_elf_size_dynamic_sections): Replace maybe_set_textrel
1179 with _bfd_elf_maybe_set_textrel.
1180 * elfxx-sparc.c (maybe_set_textrel): Removed.
1181 (_bfd_sparc_elf_size_dynamic_sections): Replace maybe_set_textrel
1182 with _bfd_elf_maybe_set_textrel.
1183 * elfxx-tilegx.c (maybe_set_textrel): Removed.
1184 (tilegx_elf_size_dynamic_sections): Replace maybe_set_textrel
1185 with _bfd_elf_maybe_set_textrel.
1186 * elfxx-x86.c (maybe_set_textrel): Removed.
1187 (_bfd_x86_elf_size_dynamic_sections): Replace maybe_set_textrel
1188 with _bfd_elf_maybe_set_textrel.
1189 * elflink.c (_bfd_elf_maybe_set_textrel): New.
1191 2020-06-03 H.J. Lu <hongjiu.lu@intel.com>
1194 * elf32-arm.c (elf32_arm_copy_indirect_symbol): Don't copy
1196 * elf32-csky.c (csky_elf_copy_indirect_symbol): Likewise.
1197 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
1198 * elf32-metag.c (elf_metag_copy_indirect_symbol): Likewise.
1199 * elf32-microblaze.c (microblaze_elf_copy_indirect_symbol):
1201 * elf32-nds32.c (nds32_elf_copy_indirect_symbol): Likewise.
1202 * elf32-nios2.c (nios2_elf32_copy_indirect_symbol): Likewise.
1203 * elf32-or1k.c (or1k_elf_copy_indirect_symbol): Likewise.
1204 * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
1205 * elf32-sh.c (sh_elf_copy_indirect_symbol): Likewise.
1206 * elf32-tilepro.c (tilepro_elf_copy_indirect_symbol): Likewise.
1207 * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
1208 * elfnn-aarch64.c (elfNN_aarch64_copy_indirect_symbol): Likewise.
1209 * elfnn-riscv.c (riscv_elf_copy_indirect_symbol): Likewise.
1210 * elfxx-sparc.c (_bfd_sparc_elf_copy_indirect_symbol): Likewise.
1211 * elfxx-tilegx.c (tilegx_elf_copy_indirect_symbol): Likewise.
1212 * elfxx-x86.c (_bfd_x86_elf_copy_indirect_symbol): Likewise.
1213 * elf32-lm32.c (lm32_elf_copy_indirect_symbol): Removed.
1214 (elf_backend_copy_indirect_symbol): Likewise.
1215 * elf32-m32r.c (m32r_elf_copy_indirect_symbol): Removed.
1216 (elf_backend_copy_indirect_symbol): Likewise.
1217 * elflink.c (_bfd_elf_link_hash_copy_indirect): Copy dyn_relocs.
1219 2020-06-03 H.J. Lu <hongjiu.lu@intel.com>
1222 * elf-bfd.h (_bfd_elf_readonly_dynrelocs): New.
1223 * elf32-arm.c (readonly_dynrelocs): Removed.
1224 (maybe_set_textrel): Replace readonly_dynrelocs with
1225 _bfd_elf_readonly_dynrelocs.
1226 * elf32-csky.c (readonly_dynrelocs): Removed.
1227 (maybe_set_textrel): Replace readonly_dynrelocs with
1228 _bfd_elf_readonly_dynrelocs.
1229 * elf32-hppa.c(readonly_dynrelocs): Removed.
1230 (alias_readonly_dynrelocs): Replace readonly_dynrelocs with
1231 _bfd_elf_readonly_dynrelocs.
1232 (maybe_set_textrel): Likewise.
1233 * elf32-lm32.c (readonly_dynrelocs): Removed.
1234 (lm32_elf_adjust_dynamic_symbol): Replace readonly_dynrelocs
1235 with _bfd_elf_readonly_dynrelocs.
1236 (maybe_set_textrel): Likewise.
1237 * elf32-m32r.c (readonly_dynrelocs): Removed.
1238 (m32r_elf_adjust_dynamic_symbol): Replace readonly_dynrelocs
1239 with _bfd_elf_readonly_dynrelocs.
1240 (maybe_set_textrel): Likewise.
1241 * elf32-metag.c (readonly_dynrelocs): Removed.
1242 (elf_metag_adjust_dynamic_symbol): Replace readonly_dynrelocs
1243 with _bfd_elf_readonly_dynrelocs.
1244 (maybe_set_textrel): Likewise.
1245 * elf32-microblaze.c (readonly_dynrelocs): Removed.
1246 (microblaze_elf_adjust_dynamic_symbol): Replace readonly_dynrelocs
1247 with _bfd_elf_readonly_dynrelocs.
1248 * elf32-nds32.c (readonly_dynrelocs): Removed.
1249 (nds32_elf_adjust_dynamic_symbol): Replace readonly_dynrelocs
1250 with _bfd_elf_readonly_dynrelocs.
1251 (maybe_set_textrel): Likewise.
1252 * elf32-or1k.c (readonly_dynrelocs): Removed.
1253 (or1k_elf_adjust_dynamic_symbol): Replace readonly_dynrelocs
1254 with _bfd_elf_readonly_dynrelocs.
1255 * elf32-ppc.c (readonly_dynrelocs): Removed.
1256 (alias_readonly_dynrelocs): Replace readonly_dynrelocs with
1257 _bfd_elf_readonly_dynrelocs.
1258 (ppc_elf_adjust_dynamic_symbol): Likewise.
1259 (maybe_set_textrel): Likewise.
1260 * elf32-s390.c (readonly_dynrelocs): Removed.
1261 (elf_s390_adjust_dynamic_symbol): Replace readonly_dynrelocs
1262 with _bfd_elf_readonly_dynrelocs.
1263 (maybe_set_textrel): Likewise.
1264 * elf32-sh.c (readonly_dynrelocs): Removed.
1265 (sh_elf_adjust_dynamic_symbol): Replace readonly_dynrelocs with
1266 _bfd_elf_readonly_dynrelocs.
1267 (maybe_set_textrel): Likewise.
1268 * elf32-tic6x.c (readonly_dynrelocs): Removed.
1269 (maybe_set_textrel): Replace readonly_dynrelocs with
1270 _bfd_elf_readonly_dynrelocs.
1271 * elf32-tilepro.c (readonly_dynrelocs): Removed.
1272 (tilepro_elf_adjust_dynamic_symbol): Replace readonly_dynrelocs
1273 with _bfd_elf_readonly_dynrelocs.
1274 (maybe_set_textrel): Likewise.
1275 * elf64-ppc.c (readonly_dynrelocs): Removed.
1276 (alias_readonly_dynrelocs): Replace readonly_dynrelocs with
1277 _bfd_elf_readonly_dynrelocs.
1278 (ppc64_elf_adjust_dynamic_symbol): Likewise.
1279 (maybe_set_textrel): Likewise.
1280 * elf64-s390.c (readonly_dynrelocs): Removed.
1281 (elf_s390_adjust_dynamic_symbol): Replace readonly_dynrelocs
1282 with _bfd_elf_readonly_dynrelocs.
1283 (maybe_set_textrel): Likewise.
1284 * elflink.c (_bfd_elf_readonly_dynrelocs): New.
1285 * elfnn-aarch64.c (readonly_dynrelocs): Removed.
1286 (maybe_set_textrel): Replace readonly_dynrelocs with
1287 _bfd_elf_readonly_dynrelocs.
1288 * elfnn-riscv.c (readonly_dynrelocs): Removed.
1289 (riscv_elf_adjust_dynamic_symbol): Replace readonly_dynrelocs
1290 with _bfd_elf_readonly_dynrelocs.
1291 (maybe_set_textrel): Likewise.
1292 * elfxx-sparc.c (readonly_dynrelocs): Removed.
1293 (_bfd_sparc_elf_adjust_dynamic_symbol): Replace
1294 readonly_dynrelocs with _bfd_elf_readonly_dynrelocs.
1295 (maybe_set_textrel): Likewise.
1296 * elfxx-tilegx.c (readonly_dynrelocs): Removed.
1297 (tilegx_elf_adjust_dynamic_symbol): Replace readonly_dynrelocs
1298 with _bfd_elf_readonly_dynrelocs.
1299 (maybe_set_textrel): Likewise.
1300 * elfxx-x86.c (readonly_dynrelocs): Removed.
1301 (maybe_set_textrel): Replace readonly_dynrelocs with
1302 _bfd_elf_readonly_dynrelocs.
1303 (_bfd_x86_elf_adjust_dynamic_symbol): Likewise.
1305 2020-06-03 H.J. Lu <hongjiu.lu@intel.com>
1307 * elfxx-x86.h (GENERATE_DYNAMIC_RELOCATION_P): Silence
1308 -fsanitize=undefined.
1310 2020-06-03 Alan Modra <amodra@gmail.com>
1314 * peicode.h (pe_ILF_make_a_section): Align data for compilers
1316 (pe_ILF_build_a_bfd): Likewise.
1318 2020-06-03 Alan Modra <amodra@gmail.com>
1321 * elf.c (_bfd_elf_close_and_cleanup): Free elf_shstrtab for
1322 core files as well as objects.
1324 2020-06-01 H.J. Lu <hongjiu.lu@intel.com>
1327 * elf-bfd.h (elf_link_hash_entry): Add dyn_relocs after size.
1328 * elf-s390-common.c (s390_elf_allocate_ifunc_dyn_relocs):
1330 * elf32-arc.c (elf_arc_link_hash_entry): Remove dyn_relocs.
1331 (elf_arc_link_hash_newfunc): Updated.
1332 * elf32-arm.c (elf32_arm_link_hash_entry): Remove dyn_relocs.
1333 (elf32_arm_link_hash_newfunc): Updated.
1334 (elf32_arm_copy_indirect_symbol): Likewise.
1335 (elf32_arm_check_relocs): Likewise.
1336 (readonly_dynrelocs): Likewise.
1337 (allocate_dynrelocs_for_symbol): Likewise.
1338 * elf32-csky.c (csky_elf_link_hash_entry): Remove dyn_relocs.
1339 (csky_elf_link_hash_newfunc): Updated.
1340 (csky_allocate_dynrelocs): Likewise.
1341 (readonly_dynrelocs): Likewise.
1342 (csky_elf_copy_indirect_symbol): Likewise.
1343 * elf32-hppa.c (elf32_hppa_link_hash_entry): Remove dyn_relocs.
1344 (hppa_link_hash_newfunc): Updated.
1345 (elf32_hppa_copy_indirect_symbol): Likewise.
1346 (elf32_hppa_hide_symbol): Likewise.
1347 (elf32_hppa_adjust_dynamic_symbol): Likewise.
1348 (allocate_dynrelocs): Likewise.
1349 (elf32_hppa_relocate_section): Likewise.
1350 * elf32-i386.c (elf_i386_check_relocs): Likewise.
1351 * elf32-lm32.c (elf_lm32_link_hash_entry): Removed.
1352 (lm32_elf_link_hash_newfunc): Likewise.
1353 (lm32_elf_link_hash_table_create): Updated.
1354 (readonly_dynrelocs): Likewise.
1355 (allocate_dynrelocs): Likewise.
1356 (lm32_elf_copy_indirect_symbol): Likewise.
1357 * elf32-m32r.c (elf_m32r_link_hash_entry): Removed.
1358 (m32r_elf_link_hash_newfunc): Likewise.
1359 (m32r_elf_link_hash_table_create): Updated.
1360 (m32r_elf_copy_indirect_symbol): Likewise.
1361 (allocate_dynrelocs): Likewise.
1362 * elf32-metag.c (elf_metag_link_hash_entry): Remove dyn_relocs.
1363 (metag_link_hash_newfunc): Updated.
1364 (elf_metag_copy_indirect_symbol): Likewise.
1365 (readonly_dynrelocs): Likewise.
1366 (allocate_dynrelocs): Likewise.
1367 * elf32-microblaze.c (elf32_mb_link_hash_entry): Remove
1369 (link_hash_newfunc): Updated.
1370 (microblaze_elf_check_relocs): Likewise.
1371 (microblaze_elf_copy_indirect_symbol): Likewise.
1372 (readonly_dynrelocs): Likewise.
1373 (allocate_dynrelocs): Likewise.
1374 * elf32-nds32.c (elf_nds32_link_hash_entry): Remove dyn_relocs.
1375 (nds32_elf_link_hash_newfunc): Updated.
1376 (nds32_elf_copy_indirect_symbol): Likewise.
1377 (readonly_dynrelocs): Likewise.
1378 (allocate_dynrelocs): Likewise.
1379 (nds32_elf_check_relocs): Likewise.
1380 * elf32-nios2.c (elf32_nios2_link_hash_entry): Remove dyn_relocs.
1381 (link_hash_newfunc): Updated.
1382 (nios2_elf32_copy_indirect_symbol): Likewise.
1383 (nios2_elf32_check_relocs): Likewise.
1384 (allocate_dynrelocs): Likewise.
1385 * elf32-or1k.c (elf_or1k_link_hash_entry): Remove dyn_relocs.
1386 (or1k_elf_link_hash_newfunc): Updated.
1387 (readonly_dynrelocs): Likewise.
1388 (allocate_dynrelocs): Likewise.
1389 (or1k_elf_copy_indirect_symbol): Likewise.
1390 * elf32-ppc.c (ppc_elf_link_hash_entry): Remove dyn_relocs.
1391 (ppc_elf_link_hash_newfunc): Updated.
1392 (ppc_elf_copy_indirect_symbol): Likewise.
1393 (ppc_elf_check_relocs): Likewise.
1394 (readonly_dynrelocs): Likewise.
1395 (ppc_elf_adjust_dynamic_symbol): Likewise.
1396 (allocate_dynrelocs): Likewise.
1397 (ppc_elf_relocate_section): Likewise.
1398 * elf32-s390.c (elf_s390_link_hash_entry): Remove dyn_relocs.
1399 (link_hash_newfunc): Updated.
1400 (elf_s390_copy_indirect_symbol): Likewise.
1401 (readonly_dynrelocs): Likewise.
1402 (elf_s390_adjust_dynamic_symbol): Likewise.
1403 (allocate_dynrelocs): Likewise.
1404 * elf32-sh.c (elf_sh_link_hash_entry): Remove dyn_relocs.
1405 (sh_elf_link_hash_newfunc): Updated.
1406 (readonly_dynrelocs): Likewise.
1407 (allocate_dynrelocs): Likewise.
1408 (sh_elf_copy_indirect_symbol): Likewise.
1409 (sh_elf_check_relocs): Likewise.
1410 * elf32-tic6x.c (elf32_tic6x_link_hash_entry): Removed.
1411 (elf32_tic6x_link_hash_newfunc): Likewise.
1412 (elf32_tic6x_link_hash_table_create): Updated.
1413 (readonly_dynrelocs): Likewise.
1414 (elf32_tic6x_check_relocs): Likewise.
1415 (elf32_tic6x_allocate_dynrelocs): Likewise.
1416 * elf32-tilepro.c (tilepro_elf_link_hash_entry): Remove
1418 (link_hash_newfunc): Updated.
1419 (tilepro_elf_copy_indirect_symbol): Likewise.
1420 (tilepro_elf_check_relocs): Likewise.
1421 (allocate_dynrelocs): Likewise.
1422 * elf64-ppc.c (ppc_link_hash_entry): Remove dyn_relocs.
1423 (ppc64_elf_copy_indirect_symbol): Updated.
1424 (ppc64_elf_check_relocs): Likewise.
1425 (readonly_dynrelocs): Likewise.
1426 (ppc64_elf_adjust_dynamic_symbol): Likewise.
1427 (dec_dynrel_count): Likewise.
1428 (allocate_dynrelocs): Likewise.
1429 (ppc64_elf_relocate_section): Likewise.
1430 * elf64-s390.c (elf_s390_link_hash_entry): Remove dyn_relocs.
1431 (link_hash_newfunc): Updated.
1432 (elf_s390_copy_indirect_symbol): Likewise.
1433 (readonly_dynrelocs): Likewise.
1434 (allocate_dynrelocs): Likewise.
1435 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1436 * elfnn-aarch64.c (elf_aarch64_link_hash_entry): Remove
1438 (elfNN_aarch64_link_hash_newfunc): Updated.
1439 (elfNN_aarch64_copy_indirect_symbol): Likewise.
1440 (readonly_dynrelocs): Likewise.
1441 (need_copy_relocation_p): Likewise.
1442 (elfNN_aarch64_allocate_dynrelocs): Likewise.
1443 (elfNN_aarch64_allocate_ifunc_dynrelocs): Likewise.
1444 * elfnn-riscv.c (riscv_elf_link_hash_entry): Remove dyn_relocs.
1445 (link_hash_newfunc): Updated.
1446 (riscv_elf_copy_indirect_symbol): Likewise.
1447 (riscv_elf_check_relocs): Likewise.
1448 (readonly_dynrelocs): Likewise.
1449 (allocate_dynrelocs): Likewise.
1450 * elfxx-sparc.c (_bfd_sparc_elf_link_hash_entry): Remove
1452 (link_hash_newfunc): Updated.
1453 (_bfd_sparc_elf_copy_indirect_symbol): Likewise.
1454 (_bfd_sparc_elf_check_relocs): Likewise.
1455 (readonly_dynrelocs): Likewise.
1456 (allocate_dynrelocs): Likewise.
1457 * elfxx-tilegx.c (tilegx_elf_link_hash_entry): Remove dyn_relocs.
1458 (link_hash_newfunc): Updated.
1459 (tilegx_elf_copy_indirect_symbol): Likewise.
1460 (tilegx_elf_check_relocs): Likewise.
1461 (readonly_dynrelocs): Likewise.
1462 (allocate_dynrelocs): Likewise.
1463 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Likewise.
1464 (readonly_dynrelocs): Likewise.
1465 (_bfd_x86_elf_copy_indirect_symbol): Likewise.
1466 * elfxx-x86.h (elf_x86_link_hash_entry): Remove dyn_relocs.
1468 2020-06-01 Alan Modra <amodra@gmail.com>
1470 * vms-alpha.c (_bfd_vms_slurp_etir): Check bound for the current
1471 command against cmd_length, not the end of record. For
1472 ETIR__C_STO_IMMR check size against cmd_length, mask repeat count
1473 to 32-bits and break out on zero size. Add ETIR__C_STC_LP_PSB
1476 2020-05-28 David Faust <david.faust@oracle.com>
1478 * elf64-bpf.c (bpf_elf_relocate_section): Fix handling of
1479 R_BPF_INSN_{32,64} relocations.
1481 2020-05-28 Stephen Casner <casner@acm.org>
1483 * pdp11.c: Implement BRD_RELOC_32 to relocate the low 16 bits of
1484 addreses in .long (used in testsuites) and .stab values.
1486 2020-05-27 H.J. Lu <hongjiu.lu@intel.com>
1489 * elflink.c (bfd_elf_final_link): Use bfd_link_textrel_check.
1490 Check bfd_link_dll when issue a DT_TEXTREL warning.
1491 * elfxx-x86.c (maybe_set_textrel): Likewise.
1492 (_bfd_x86_elf_size_dynamic_sections): Likewise.
1494 2020-05-26 Nick Clifton <nickc@redhat.com>
1496 * plugin.c (try_load_plugin): Extend error message when a plugin
1499 2020-05-23 Alan Modra <amodra@gmail.com>
1501 * bfdio.c (bfd_get_file_size): Don't segfault on NULL arch_header.
1503 2020-05-22 Alan Modra <amodra@gmail.com>
1506 * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Don't init FP
1507 attributes from shared libraries, and do not return an error if
1510 2020-05-21 Alan Modra <amodra@gmail.com>
1513 * opncls.c (_bfd_free_cached_info): Keep a copy of the bfd
1515 (_bfd_delete_bfd): Free the copy.
1516 (_bfd_new_bfd): Free nbfd->memory on error.
1518 2020-05-21 Alan Modra <amodra@gmail.com>
1520 * aoutx.h: Replace "if (x) free (x)" with "free (x)" throughout.
1521 * archive.c, * bfd.c, * bfdio.c, * coff-alpha.c, * coff-ppc.c,
1522 * coff-sh.c, * coff-stgo32.c, * coffcode.h, * coffgen.c,
1523 * cofflink.c, * cpu-arm.c, * doc/chew.c, * dwarf2.c, * ecoff.c,
1524 * ecofflink.c, * elf-eh-frame.c, * elf-m10200.c, * elf-m10300.c,
1525 * elf-strtab.c, * elf.c, * elf32-arc.c, * elf32-arm.c,
1526 * elf32-avr.c, * elf32-bfin.c, * elf32-cr16.c, * elf32-crx.c,
1527 * elf32-epiphany.c, * elf32-ft32.c, * elf32-h8300.c,
1528 * elf32-ip2k.c, * elf32-m32c.c, * elf32-m68hc11.c,
1529 * elf32-m68k.c, * elf32-microblaze.c, * elf32-msp430.c,
1530 * elf32-nds32.c, * elf32-nios2.c, * elf32-ppc.c, * elf32-pru.c,
1531 * elf32-rl78.c, * elf32-rx.c, * elf32-sh.c, * elf32-spu.c,
1532 * elf32-v850.c, * elf32-xtensa.c, * elf64-alpha.c,
1533 * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c
1534 * elf64-mmix.c, * elf64-ppc.c, * elf64-sparc.c, * elfcode.h,
1535 * elflink.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-mips.c,
1536 * elfxx-x86.c, * format.c, * ihex.c, * libbfd.c, * linker.c,
1537 * mmo.c, * opncls.c, * pdp11.c, * peXXigen.c, * pef.c,
1538 * peicode.h, * simple.c, * som.c, * srec.c, * stabs.c, * syms.c,
1539 * targets.c, * vms-lib.c, * xcofflink.c, * xtensa-isa.c: Likewise.
1541 2020-05-20 Nelson Chu <nelson.chu@sifive.com>
1543 * elfxx-riscv.h (riscv_parse_subset_t): Add new callback function
1544 get_default_version. It is used to find the default version for
1545 the specific extension.
1546 * elfxx-riscv.c (riscv_parsing_subset_version): Remove the parameters
1547 default_major_version and default_minor_version. Add new bfd_boolean
1548 parameter *use_default_version. Set it to TRUE if we need to call
1549 the callback rps->get_default_version to find the default version.
1550 (riscv_parse_std_ext): Call rps->get_default_version if we fail to find
1551 the default version in riscv_parsing_subset_version, and then call
1552 riscv_add_subset to add the subset into subset list.
1553 (riscv_parse_prefixed_ext): Likewise.
1554 (riscv_std_z_ext_strtab): Support Zicsr extensions.
1555 * elfnn-riscv.c (riscv_merge_std_ext): Use strcasecmp to compare the
1556 strings rather than characters.
1557 riscv_merge_arch_attr_info): The callback function get_default_version
1558 is only needed for assembler, so set it to NULL int the linker.
1559 * elfxx-riscv.c (riscv_estimate_digit): Remove the static.
1560 * elfxx-riscv.h: Updated.
1562 2020-05-20 Alan Modra <amodra@gmail.com>
1565 * archive.c (_bfd_get_elt_at_filepos): Don't strdup filename,
1566 use bfd_set_filename.
1567 * elfcode.h (_bfd_elf_bfd_from_remote_memory): Likewise.
1568 * mach-o.c (bfd_mach_o_fat_member_init): Likewise.
1569 * opncls.c (bfd_fopen, bfd_openstreamr, bfd_openr_iovec, bfd_openw),
1570 (bfd_create): Likewise.
1571 (_bfd_delete_bfd): Don't free filename.
1572 (bfd_set_filename): Copy filename param to bfd_alloc'd memory,
1573 return pointer to the copy or NULL on alloc fail.
1574 * vms-lib.c (_bfd_vms_lib_get_module): Free newname and test
1575 result of bfd_set_filename.
1576 * bfd-in2.h: Regenerate.
1578 2020-05-20 Alan Modra <amodra@gmail.com>
1581 * elf.c (_bfd_elf_get_reloc_upper_bound): Sanity check reloc
1582 section size against file size.
1583 (_bfd_elf_get_dynamic_reloc_upper_bound): Likewise.
1585 2020-05-19 Gunther Nikl <gnikl@justmail.de>
1588 * elf.c (bfd_section_from_shdr): Replace bfd_zmalloc with bfd_malloc
1589 and memset when allocating memory for the sections_being_created
1592 2020-05-19 Stafford Horne <shorne@gmail.com>
1594 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Rename srela
1596 (or1k_elf_relocate_section): Access srelgot via
1597 htab->root.srelgot. Add assertions for srelgot->contents.
1598 Introduce local variable for srelgot to not reuse global
1600 (or1k_elf_relocate_section): Fixup dynamic symbol detection.
1601 (or1k_set_got_and_rela_sizes): New function.
1602 (or1k_initial_exec_offset): New function.
1603 (TLS_GD, TLS_IE, TLS_LD, TLS_LE): Redefine macros as masks.
1604 (or1k_elf_relocate_section): Allow for TLS to handle multiple
1606 (or1k_elf_check_relocs): Use OR to set TLS access.
1607 (allocate_dynrelocs): Use or1k_set_got_and_rela_sizes to set
1609 (or1k_elf_size_dynamic_sections): Use
1610 or1k_set_got_and_rela_sizes to set sizes.
1611 (or1k_elf_relocate_section): Fixup PCREL relocation calculation.
1612 (TCB_SIZE): New macro.
1613 (tpoff): Use TCB_SIZE and alignment to calculate offset.
1614 (allocate_dynrelocs, readonly_dynrelocs, or1k_elf_check_relocs)
1615 (or1k_elf_size_dynamic_sections): Rename p to sec_relocs.
1616 (allocate_dynrelocs): Rename s to splt or sgot based on usage.
1617 (tpoff): Add dynamic boolean argument.
1618 (or1k_elf_relocate_section): Pass dynamic flag to tpoff.
1620 2020-05-19 Siddhesh Poyarekar <siddesh.poyarekar@arm.com>
1622 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Club
1623 BFD_RELOC_AARCH64_BRANCH19 and BFD_RELOC_AARCH64_TSTBR14
1624 cases with BFD_RELOC_AARCH64_JUMP26.
1625 (elfNN_aarch64_check_relocs): Likewise.
1627 2020-05-19 Alan Modra <amodra@gmail.com>
1629 * aix5ppc-core.c (xcoff64_core_file_matches_executable_p): Use
1630 bfd_get_filename rather than accessing bfd->filename directly.
1631 * aout-target.h (MY (object_p)): Likewise.
1632 * aoutx.h (aout_find_nearest_line, aout_link_write_symbols): Likewise.
1633 * archive.c (find_nested_archive, _bfd_generic_read_ar_hdr_mag),
1634 (_bfd_construct_extended_name_table, _bfd_bsd44_write_ar_hdr),
1635 (_bfd_archive_bsd44_construct_extended_name_table),
1636 (_bfd_write_archive_contents, _bfd_compute_and_write_armap),
1637 (_bfd_bsd_write_armap): Likewise.
1638 * bfd.c (bfd_errmsg, _bfd_doprnt): Likewise.
1639 * cache.c (bfd_open_file): Likewise.
1640 * ecoff.c (_bfd_ecoff_write_armap): Likewise.
1641 * ecofflink.c (bfd_ecoff_debug_accumulate_other): Likewise.
1642 * elf32-bfin.c (bfinfdpic_relocate_section): Likewise.
1643 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
1644 * elf32-hppa.c (elf32_hppa_final_link): Likewise.
1645 * elf32-nds32.c (nds32_elf_output_symbol_hook),
1646 (patch_tls_desc_to_ie): Likewise.
1647 * elf32-spu.c (sort_bfds, print_one_overlay_section),
1648 (spu_elf_auto_overlay): Likewise.
1649 * elf64-hppa.c (elf_hppa_final_link): Likewise.
1650 * elf64-ia64-vms.c (elf64_ia64_size_dynamic_sections): Likewise.
1651 * elfcore.h (elf_core_file_matches_executable_p): Likewise.
1652 * elflink.c (bfd_elf_size_dynamic_sections),
1653 (elf_link_input_bfd): Likewise.
1654 * linker.c (_bfd_generic_link_output_symbols): Likewise.
1655 * mach-o.c (bfd_mach_o_follow_dsym),
1656 (bfd_mach_o_close_and_cleanup): Likewise.
1657 * opncls.c (_bfd_delete_bfd, _maybe_make_executable),
1658 (find_separate_debug_file, get_build_id_name): Likewise.
1659 * pdp11.c (aout_find_nearest_line, aout_link_write_symbols): Likewise.
1660 * plugin.c (bfd_plugin_open_input): Likewise.
1661 * rs6000-core.c (rs6000coff_core_file_matches_executable_p): Likewise.
1662 * som.c (som_write_armap): Likewise.
1663 * srec.c (srec_write_record, srec_write_symbols): Likewise.
1664 * vms-lib.c (_bfd_vms_lib_get_imagelib_file),
1665 (_bfd_vms_lib_write_archive_contents): Likewise.
1666 * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
1668 2020-05-19 Alan Modra <amodra@gmail.com>
1671 * bfdio.c (_bfd_real_fopen): Typo fix.
1673 2020-05-18 Nick Clifton <nickc@redhat.com>
1676 * elf.c (bfd_section_from_shdr): Use bfd_malloc to allocate memory
1677 for the sections_being_created array.
1679 2020-05-18 Alan Modra <amodra@gmail.com>
1681 * ecoff.c (ecoff_slurp_reloc_table): Malloc external_relocs so
1682 they can be freed without also freeing internal_relocs.
1684 2020-05-18 Jaydeep Chauhan <jaydeepchauhan1494@gmail.com>
1687 * bfdio.c (_bfd_real_fopen): Convert UNIX style sirectory
1688 separators into DOS style when creating a WIN32 fullpath.
1690 2020-05-14 Nelson Chu <nelson.chu@sifive.com>
1692 * elfnn-riscv.c (elfNN_riscv_mkobject): New function. We need this
1693 to initialize RISC-V tdata.
1695 2020-05-12 Gunther Nikl <gnikl@justmail.de>
1697 * aoutx.h (NAME (aout, swap_std_reloc_out)): Reject an unsupported
1700 2020-05-11 Alan Modra <amodra@gmail.com>
1702 * elf64-ppc.c (xlate_pcrel_opt): Handle lxvp and stxvp.
1704 2020-05-11 Alan Modra <amodra@gmail.com>
1706 * elf64-ppc.c: Rename powerxx to power10 throughout.
1708 2020-05-11 Alan Modra <amodra@gmail.com>
1711 * coffgen.c (coff_get_normalized_symtab): Check that buffer
1712 contains required number of auxents before processing any auxent.
1713 * coffswap.h (coff_swap_aux_in <C_FILE>): Only swap in extended
1714 file name from auxents for PE.
1716 2020-05-04 Gunther Nikl <gnikl@justmail.de>
1718 * aout-cris.c (DEFAULT_ARCH): Delete define.
1719 (MY_set_arch_mach): Likewise.
1720 (SET_ARCH_MACH): Use bfd_set_arch_mach with an explicit architecture
1722 (swap_ext_reloc_in): Add casts to r_index extraction. Mask valid bits
1723 of r_type before the shift.
1725 2020-05-04 Wilco Dijkstra <wdijkstr@arm.com>
1728 * elfnn-aarch64.c (group_sections): Copy implementation from
1731 2020-05-01 Alan Modra <amodra@gmail.com>
1734 * elfnn-riscv.c (_bfd_riscv_relax_section): Check root.type before
1735 accessing root.u.def of symbols. Also check root.u.def.section
1736 is non-NULL. Reverse tests so as to make the logic positive.
1738 2020-05-01 Alan Modra <amodra@gmail.com>
1741 * elf32-tic6x.c (elf32_tic6x_merge_attributes): Don't transfer
1742 Tag_ABI_PIC or Tag_ABI_PID from dynamic objects to the output.
1744 2020-05-01 Alan Modra <amodra@gmail.com>
1747 * elf32-bfin.c (elf32_bfin_merge_private_bfd_data): Add FIXME.
1748 * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
1749 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Likewise.
1750 * elf32-nds32.c (nds32_elf_merge_private_bfd_data): Likewise.
1751 * elf32-score.c (s3_elf32_score_merge_private_bfd_data): Likewise.
1752 * elf32-score7.c (s7_elf32_score_merge_private_bfd_data): Likewise.
1753 * elf32-sh.c (sh_elf_merge_private_data): Likewise.
1754 * elf32-tic6x.c (elf32_tic6x_merge_attributes): Likewise.
1755 * elf64-ia64-vms.c (elf64_ia64_merge_private_bfd_data): Likewise.
1756 * elfnn-ia64.c (elfNN_ia64_merge_private_bfd_data): Likewise.
1758 2020-05-01 Alan Modra <amodra@gmail.com>
1761 * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Ignore e_flags
1762 from shared libraries.
1764 2020-04-29 Max Filippov <jcmvbkbc@gmail.com>
1766 * elf32-xtensa.c (relax_section): Don't negate diff_value for
1767 XTENSA_NDIFF relocations. Don't add sign bits whe diff_value
1768 equals 0. Report overflow when the result has negative sign but
1769 all significant bits are zero.
1771 2020-04-29 Gunther Nikl <gnikl@justmail.de>
1773 * aoutx.h (swap_std_reloc_out): Special case 64 bit relocations.
1774 (aout_link_reloc_link_order): Likewise. Make r_length an unsigned.
1776 2020-04-28 Alan Modra <amodra@gmail.com>
1778 * vms-alpha.c (_bfd_vms_slurp_etir): Correct divide by zero check.
1779 Emit warning message.
1781 2020-04-27 Tamar Christina <tamar.christina@arm.com>
1783 * coff-i386.c (COFF_WITH_PE_BIGOBJ): New.
1784 * coff-x86_64.c (COFF_WITH_PE_BIGOBJ): New.
1785 * config.bfd (targ_selvecs): Rename x86_64_pe_be_vec
1786 to x86_64_pe_big_vec as it not a big-endian format.
1787 (vec i386_pe_big_vec): New.
1788 * configure.ac: Likewise.
1789 * targets.c: Likewise.
1790 * configure: Regenerate.
1791 * pe-i386.c (TARGET_SYM_BIG, TARGET_NAME_BIG,
1792 COFF_WITH_PE_BIGOBJ): New.
1793 * pe-x86_64.c (TARGET_SYM_BIG, TARGET_NAME_BIG):
1795 (x86_64_pe_be_vec): Moved.
1797 2020-04-23 Anton Kolesov <anton.kolesov@synopsys.com>
1799 * elf-bfd.h (elfcore_write_arc_v2): Add prototype.
1800 * elf.c (elfcore_grok_arc_v2): New function.
1801 (elfcore_grok_note): Call the new function to handle the corresponding
1803 (elfcore_write_arc_v2): New function.
1804 (elfcore_write_register_note): Call the new function to handle the
1805 corresponding pseudo-sections.
1807 2020-04-22 Max Filippov <jcmvbkbc@gmail.com>
1810 * bfd-in2.h: Regenerated.
1811 * elf32-xtensa.c (elf_howto_table): New entries for
1812 R_XTENSA_PDIFF{8,16,32} and R_XTENSA_NDIFF{8,16,32}.
1813 (elf_xtensa_reloc_type_lookup, elf_xtensa_do_reloc)
1814 (relax_section): Add cases for R_XTENSA_PDIFF{8,16,32} and
1815 R_XTENSA_NDIFF{8,16,32}.
1816 * libbfd.h (bfd_reloc_code_real_names): Add names for
1817 BFD_RELOC_XTENSA_PDIFF{8,16,32} and
1818 BFD_RELOC_XTENSA_NDIFF{8,16,32}.
1819 * reloc.c: Add documentation for BFD_RELOC_XTENSA_PDIFF{8,16,32}
1820 and BFD_RELOC_XTENSA_NDIFF{8,16,32}.
1822 2020-04-21 Tamar Christina <tamar.christina@arm.com>
1825 * compress.c (bfd_get_full_section_contents): Exclude sections with no
1828 2020-04-21 H.J. Lu <hongjiu.lu@intel.com>
1831 * elf-bfd.h (elf_backend_data): Add
1832 elf_backend_strip_zero_sized_dynamic_sections.
1833 (_bfd_elf_strip_zero_sized_dynamic_sections): New prototype.
1834 * elf64-alpha.c (elf_backend_strip_zero_sized_dynamic_sections):
1836 * elflink.c (_bfd_elf_strip_zero_sized_dynamic_sections): New
1838 * elfxx-target.h (elf_backend_strip_zero_sized_dynamic_sections):
1840 (elfNN_bed): Add elf_backend_strip_zero_sized_dynamic_sections.
1842 2020-04-21 H.J. Lu <hongjiu.lu@intel.com>
1844 * elf64-alpha.c (alpha_elf_reloc_entry): Replace reltext with
1846 (elf64_alpha_check_relocs): Set sec instead of reltext. Warn
1848 (elf64_alpha_calc_dynrel_sizes): Warn DT_TEXTREL with -M.
1850 2020-04-21 Nick Clifton <nickc@redhat.com>
1852 * po/sr.po: Updated Serbian translation.
1854 2020-04-21 Alan Modra <amodra@gmail.com>
1856 * elf32-sh.c (sh_elf_relocate_section): Remove STO_SH5_ISA32
1859 2020-04-20 Stephen Casner <casner@acm.org>
1861 * pdp11.c (N_STAB): Modify value to avoid conflict with N_EXT
1862 causing globals from linker script to be treated as debug symbols.
1863 (translate_symbol_table): Don't sign-extend symbol values from 16
1864 to 64 bits in nm output.
1866 2020-04-20 Alan Modra <amodra@gmail.com>
1868 * elf64-ppc.c (ppc64_elf_size_stubs): Strip relbrlt too.
1870 2020-04-18 Alan Modra <amodra@gmail.com>
1872 * section.c (bfd_is_const_section): Correct test for special
1874 * bfd-in2.h: Regenerate.
1876 2020-04-17 Alan Modra <amodra@gmail.com>
1879 * elf.c (_bfd_elf_get_symbol_version_string): Don't segfault on
1882 2020-04-16 Nick Clifton <nickc@redhat.com>
1885 * elfxx-mips.c (_bfd_mips_elf_adjust_dynamic_symbol): Replace an
1886 abort with a more helpful error message.
1888 2020-04-16 Alan Modra <amodra@gmail.com>
1891 * dwarf2.c (scan_unit_for_symbols): Wrap overlong lines. Don't
1894 2020-04-15 Fangrui Song <maskray@google.com>
1897 * coff-rs6000.c (xcoff_ppc_relocate_section): Change RM_GENERATE_ERROR
1898 to RM_DIAGNOSE plus a check of warn_unresolved_syms.
1899 * coff64-rs6000.c (xcoff_ppc_relocate_section): Likewise.
1900 * elf-bfd.h (_bfd_elf_large_com_section): Likewise.
1901 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
1902 * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise.
1903 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
1904 * elf32-sh.c (sh_elf_relocate_section): Likewise.
1905 * elf32-spu.c (spu_elf_relocate_section): Likewise.
1906 * elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
1907 * elflink.c (elf_link_output_extsym): Likewise.
1908 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
1910 2020-04-15 Alan Modra <amodra@gmail.com>
1913 * peXXigen.c (_bfd_XXi_swap_sym_in <C_SECTION>): Don't use a
1914 pointer into strings that may be freed for section name, always
1915 allocate a new string.
1917 2020-04-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1918 Jan W. Jagersma <jwjagersma@gmail.com>
1920 * coff-go32.c (COFF_GO32, IMAGE_SCN_LNK_NRELOC_OVFL)
1921 (coff_SWAP_scnhdr_in, coff_SWAP_scnhdr_out): Define.
1922 (_bfd_go32_swap_scnhdr_in, _bfd_go32_swap_scnhdr_out)
1923 (_bfd_go32_mkobject): New functions.
1924 * coff-stgo32.c (IMAGE_SCN_LNK_NRELOC_OVFL)
1925 (coff_SWAP_scnhdr_in, coff_SWAP_scnhdr_out): Define.
1926 (go32exe_mkobject): Call _bfd_go32_mkobject.
1927 * coffcode.h (COFF_WITH_EXTENDED_RELOC_COUNTER): Define.
1928 (coff_set_alignment_hook): Define function for COFF_GO32_EXE
1930 (coff_write_relocs): Enable extended reloc counter code if
1931 COFF_WITH_EXTENDED_RELOC_COUNTER is defined. Test for obj_go32.
1932 (coff_write_object_contents): Likewise. Pad section headers
1933 for COFF_GO32 and COFF_GO32EXE. Use bfd_coff_swap_scnhdr_out
1934 instead of coff_swap_scnhdr_out.
1935 * cofflink.c (_bfd_coff_final_link): Test also for obj_go32 to
1936 enable extended reloc counter.
1937 * coffswap.h: (coff_swap_scnhdr_in, coff_swap_scnhdr_out):
1938 Declare with ATTRIBUTE_UNUSED.
1939 * libcoff-in.h: (struct coff_tdata): New field go32.
1941 * libcoff.h: Regenerate.
1943 2020-04-14 Fangrui Song <maskray@google.com>
1946 * elf.c (assign_section_numbers): Always set .stab sh_entsize to
1949 2020-04-14 Stephen Casner <casner@acm.org>
1952 * pdp11.c: Add implementation of --imagic option.
1953 (adjust_o_magic): Fix objcopy --extract-symbol test.
1954 * libaout.h (enum aout_magic): Add i_magic.
1956 2020-04-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1957 Nick Clifton <nickc@redhat.com>
1959 * elf32-sparc.c (sparc_final_write_processing): Fix whitespace.
1961 <default>: Error rather than abort.
1963 2020-04-03 H.J. Lu <hongjiu.lu@intel.com>
1966 * elf.c (_bfd_elf_fixup_group_sections): Remove zero-sized
1967 relocation section from section group.
1969 2020-04-02 Jan W. Jagersma <jwjagersma@gmail.com>
1971 * bfdio.c (bfd_bread, bfd_tell, bfd_seek, bfd_mmap): Always add
1972 bfd->origin to file offset.
1973 * bfdwin.c (bfd_get_file_window): Likewise.
1974 * bfd.c: Clarify the use of the bfd->origin field.
1975 * bfd-in2.h: Regenerate.
1976 * coff-i386.c: Don't include go32exe.h. Allow overriding
1977 coff_write_object_contents via COFF_WRITE_CONTENTS.
1978 * coff-stgo32.c (go32exe_cleanup, go32exe_mkobject)
1979 (go32exe_write_object_contents): New functions.
1980 (go32exe_temp_stub, go32exe_temp_stub_size): New static globals.
1981 (COFF_WRITE_CONTENTS, GO32EXE_DEFAULT_STUB_SIZE): Define.
1982 (create_go32_stub): Remove check for 2k size limit. Read stub
1983 from go32exe_temp_stub if present.
1984 (go32_stubbed_coff_bfd_copy_private_bfd_data): Allocate and
1985 copy variable-length stub.
1986 (go32_check_format): Read stub to go32exe_temp_stub, set
1987 origin, return go32exe_cleanup.
1988 (adjust_filehdr_in_post, adjust_filehdr_out_pre)
1989 (adjust_filehdr_out_post, adjust_scnhdr_in_post)
1990 (adjust_scnhdr_out_pre, adjust_scnhdr_out_post)
1991 (adjust_aux_in_post, adjust_aux_out_pre, adjust_aux_out_post):
1992 Remove functions and their associated #defines.
1993 * coffcode.h (coff_mkobject_hook): Remove stub copying code.
1994 * libcoff-in.h: (struct coff_tdata): New field stub_size.
1995 Rename field go32stub to stub.
1996 * libcoff.h: Regenerate.
1997 * coff-stgo32.c (go32_check_format): Rename to...
1998 (go32exe_check_format): ...this.
1999 (go32_stubbed_coff_bfd_copy_private_bfd_data): Rename to...
2000 (go32exe_copy_private_bfd_data): ...this.
2001 (stub_bytes): Rename to...
2002 (go32exe_default_stub): ...this.
2003 (create_go32_stub): Rename to...
2004 (go32exe_create_stub): ...this.
2005 * coff-stgo32.c (go32exe_copy_private_bfd_data): Avoid realloc
2008 2020-04-01 H.J. Lu <hongjiu.lu@intel.com>
2012 * elf32-i386.c (elf_i386_convert_load_reloc): Convert load
2013 relocation to R_386_32 for relocation against non-preemptible
2015 (elf_i386_check_relocs): Call _bfd_elf_x86_valid_reloc_p. Don't
2016 allocate dynamic relocation for non-preemptible absolute symbol.
2017 (elf_i386_relocate_section): Pass sec to
2018 GENERATE_DYNAMIC_RELOCATION_P.
2019 * elf64-x86-64.c (R_X86_64_converted_reloc_bit): Moved.
2020 (elf_x86_64_convert_load_reloc): Covert load relocation to
2021 R_X86_64_32S or R_X86_64_32 for relocation against non-preemptible
2022 absolute symbol. Don't convert to R_X86_64_32S nor R_X86_64_32
2023 for non-preemptible absolute symbol if they overflow.
2024 (elf_x86_64_check_relocs): Call _bfd_elf_x86_valid_reloc_p. Set
2025 tls_type for GOT slot to GOT_ABS for non-preemptible absolute
2026 symbol. Don't allocate dynamic relocation for non-preemptible
2028 (elf_x86_64_relocate_section): Don't generate relative relocation
2029 for GOTPCREL relocations aganst local absolute symbol. Pass sec
2030 to GENERATE_DYNAMIC_RELOCATION_P.
2031 * elfxx-x86.c (elf_x86_allocate_dynrelocs): No dynamic relocation
2032 against non-preemptible absolute symbol.
2033 (_bfd_elf_x86_valid_reloc_p): New function.
2034 (_bfd_x86_elf_size_dynamic_sections): No dynamic relocation for
2036 * elfxx-x86.h (GENERATE_DYNAMIC_RELOCATION_P): Add an SEC
2037 argument. Don't generate dynamic relocation against
2038 non-preemptible absolute symbol.
2039 (ABS_SYMBOL_P): New.
2040 (GENERATE_RELATIVE_RELOC_P): Don't generate relative relocation
2041 against non-preemptible absolute symbol.
2043 (R_X86_64_converted_reloc_bit): New. Moved from elf64-x86-64.c.
2044 (_bfd_elf_x86_valid_reloc_p): New.
2046 2020-04-01 Tamar Christina <tamar.christina@arm.com>
2049 * elf32-arm.c (elf32_arm_populate_plt_entry): Set LSB of the PLT0
2050 address in the GOT if in thumb only mode.
2052 2020-04-01 Tamar Christina <tamar.christina@arm.com>
2054 * elf32-arm.c (elf32_thumb2_plt_entry): Fix PC-rel offset.
2056 2020-04-01 Hans-Peter Nilsson <hp@bitrange.com>
2058 * mmo.c (mmo_scan): Create .text section only when needed, not
2061 2020-03-31 Alan Modra <amodra@gmail.com>
2063 * coff-alpha.c (alpha_ecoff_get_elt_at_filepos): Correct bfd_bread
2066 2020-03-31 Alan Modra <amodra@gmail.com>
2068 * vms-alpha.c (image_write): Check bounds for sections without
2069 contents too. Error on non-zero write to section without
2071 (_bfd_vms_slurp_etir): Check return of image_write* functions.
2073 2020-03-31 Alan Modra <amodra@gmail.com>
2075 * tekhex.c (pass_over): Check is_eof before reading buffer.
2077 2020-03-30 Nick Clifton <nickc@redhat.com>
2080 * libcoff-in.h (struct pe_tdata): Rename the insert_timestamp
2081 field to timestamp and make it an integer.
2082 * libcoff.h: Regenerate.
2083 * peXXigen.c (_bfd_XXi_only_swap_filehdr_out): Test the timestamp
2084 field in the pe_data structure rather than the insert_timestamp
2087 2020-03-30 Alan Modra <amodra@gmail.com>
2090 * elf64-ppc.c (ppc64_elf_build_stubs): Use asprintf to form
2093 2020-03-26 Nick Clifton <nickc@redhat.com>
2095 * cofflink.c (bfd_coff_get_internal_extra_pe_aouthdr): Delete.
2096 * libbfd-in.h (bfd_coff_get_internal_extra_pe_aouthdr): Remove
2098 * libbfd.h: Regenerate.
2100 2020-03-26 Alan Modra <amodra@gmail.com>
2102 * i386msdos.c (msdos_object_p): Catch -1 return from bfd_bread.
2104 2020-03-26 Alan Modra <amodra@gmail.com>
2106 * vms-alpha.c (dst_define_location): Limit size of dst_ptr_offsets
2108 (_bfd_vms_slurp_object_records): Rename "err" to "ok".
2110 2020-03-25 Nick Clifton <nickc@redhat.com>
2112 * cofflink.c (bfd_coff_get_internal_extra_pe_aouthdr): New
2114 * libbfd-in.h (bfd_coff_get_internal_extra_pe_aouthdr): Prototype.
2115 * libbfd.h: Regenerate.
2117 2020-03-25 Shahab Vahedi <shahab@synopsys.com>
2119 * elf32-arc.c (PRINT_DEBUG_RELOC_INFO_BEFORE): Use the
2120 correct field name in the output string.
2122 2020-03-25 Alan Modra <amodra@gmail.com>
2125 * elf.c (assign_file_positions_for_load_sections): Adjust offset
2126 for SHT_NOBITS section if first in segment.
2128 2020-03-24 H.J. Lu <hongjiu.lu@intel.com>
2131 * elf-bfd.h (_bfd_elf_get_symbol_version_name): Renamed to ...
2132 (_bfd_elf_get_symbol_version_string): This.
2133 * elf.c (_bfd_elf_get_symbol_version_name): Renamed to ...
2134 (_bfd_elf_get_symbol_version_string): This.
2135 (bfd_elf_print_symbol): Pass TRUE to
2136 _bfd_elf_get_symbol_version_string.
2137 * libbfd-in.h (_bfd_nosymbols_get_symbol_version_string): Add a
2138 bfd_boolean argument.
2139 * syms.c (_bfd_nosymbols_get_symbol_version_string): Likewise.
2140 * targets.c (_bfd_get_symbol_version_string): Likewise.
2141 (bfd_get_symbol_version_string): Likewise.
2142 * bfd-in2.h: Regenerated.
2144 2020-03-24 Nick Clifton <nickc@redhat.com>
2145 Jaydeep Chauhan <jaydeepchauhan1494@gmail.com>
2148 * bfdio.c (_bfd_real_fopen): Add code to handle long filenames on
2151 2020-03-24 Nick Clifton <nickc@redhat.com>
2154 * elf.c (_bfd_elf_map_sections_to_segments): When looking for a
2155 segment to use for PT_GNU_RELRO, ignore empty sections in a
2156 segment's current list.
2158 2020-03-24 H.J. Lu <hongjiu.lu@intel.com>
2161 * elf-bfd.h (elf_obj_tdata): Change num_group to unsigned int.
2163 2020-03-24 H.J. Lu <hongjiu.lu@intel.com>
2166 * elf-bfd.h (_bfd_elf_get_symbol_version_name): New.
2167 * elf.c (_bfd_elf_get_symbol_version_name): New function. Based
2168 on the previous _bfd_elf_get_symbol_version_string.
2169 (_bfd_elf_get_symbol_version_string): Use it.
2171 2020-03-24 Alan Modra <amodra@gmail.com>
2173 * archive.c (_bfd_generic_read_ar_hdr_mag): Sanity check extended
2174 name size. Use bfd_malloc rather than bfd_zmalloc, clearing just
2177 2020-03-23 Sebastian Huber <sebastian.huber@embedded-brains.de>
2179 * elflink.c (_bfd_elf_tls_setup): Mention .tdata in comment.
2181 2020-03-23 Alan Modra <amodra@gmail.com>
2183 * ecoff.c (_bfd_ecoff_slurp_armap): Sanity check parsed_size and
2184 symbol count. Allocate an extra byte to ensure name strings
2185 are terminated. Sanity check name offsets. Release memory on
2188 2020-03-23 Alan Modra <amodra@gmail.com>
2190 * i386msdos.c (msdos_object_p): Don't access e_lfanew when that
2191 field hasn't been read. Remove unnecessary casts.
2193 2020-03-22 Alan Modra <amodra@gmail.com>
2195 * coff64-rs6000.c (xcoff64_slurp_armap): Ensure size is large
2196 enough to read number of symbols.
2198 2020-03-20 H.J. Lu <hongjiu.lu@intel.com>
2200 * configure.ac (HAVE_EXECUTABLE_SUFFIX): Removed.
2201 (EXECUTABLE_SUFFIX): Likewise.
2202 * config.in: Regenerated.
2203 * configure: Likewise.
2204 * plugin.c (bfd_plugin_close_and_cleanup): Defined as
2205 _bfd_generic_close_and_cleanup.
2206 (plugin_list_entry): Remove resolution_file, resolution_option,
2207 real_bfd, real_nsyms, real_syms, lto_nsyms, lto_syms, gcc,
2208 lto_wrapper, gcc_env and initialized,
2209 (need_lto_wrapper_p): Removed.
2210 (get_lto_wrapper): Likewise.
2211 (setup_lto_wrapper_env): Likewise.
2212 (register_all_symbols_read): Likewise.
2213 (egister_cleanup): Likewise.
2214 (get_symbols): Likewise.
2215 (add_input_file): Likewise.
2216 (bfd_plugin_set_program_name): Remove need_lto_wrapper.
2217 (add_symbols): Updated.
2218 (try_claim): Likewise.
2219 (try_load_plugin): Likewise.
2220 (bfd_plugin_canonicalize_symtab): Likewise.
2221 * plugin.h (bfd_plugin_set_program_name): Remove int argument.
2222 (plugin_data_struct): Remove real_bfd, real_nsyms and real_syms.
2224 2020-03-19 H.J. Lu <hongjiu.lu@intel.com>
2227 * plugin.c (plugin_list_entry): Add has_symbol_type.
2228 (add_symbols_v2): New function.
2229 (bfd_plugin_open_input): Don't invoke LTO wrapper if LTO plugin
2230 provides symbol type.
2231 (try_load_plugin): Add LDPT_ADD_SYMBOLS_V2.
2232 (bfd_plugin_canonicalize_symtab): Use LTO plugin symbol type if
2235 2020-03-20 Alan Modra <amodra@gmail.com>
2237 * coff-rs6000.c (_bfd_xcoff_slurp_armap): Ensure size is large
2238 enough to read number of symbols.
2240 2020-03-20 Alan Modra <amodra@gmail.com>
2242 * elf.c (_bfd_elf_setup_sections): Don't test known non-NULL
2243 backend functions for NULL before calling.
2244 (copy_special_section_fields, _bfd_elf_copy_private_bfd_data),
2245 (bfd_section_from_shdr, assign_section_numbers): Likewise.
2246 * elfcode.h (elf_write_relocs, elf_slurp_reloc_table): Likewise.
2247 * elfnn-ia64.c (ignore_errors): New function.
2248 (elf_backend_link_order_error_handler): Redefine as ignore_errors.
2250 2020-03-19 Nick Clifton <nickc@redhat.com>
2253 * dwarf2.c (struct varinfo): Add unit_offset field to record the
2254 location of the varinfo in the unit's debug info data. Change the
2255 type of the stack field to a boolean.
2256 (lookup_var_by_offset): New function. Returns the varinfo
2257 structure for the variable described at the given offset in the
2259 (scan_unit_for_symbols): Add support for variables which have the
2260 DW_AT_specification attribute.
2262 2020-03-19 Nick Clifton <nickc@redhat.com>
2265 * elf.c (bfd_elf_set_group_contents): Replace assertion with an
2268 2020-03-19 Sebastian Huber <sebastian.huber@embedded-brains.de>
2270 * elfxx-riscv.c (riscv_parse_subset): Don't use C99.
2272 2020-03-18 Nick Clifton <nickc@redhat.com>
2275 * elf.c (_bfd_elf_write_secondary_reloc_section): Fix illegal
2276 memory access when processing a corrupt secondary reloc section.
2278 2020-03-18 Christophe Lyon <christophe.lyon@linaro.org>
2280 * elf32-arm.c (arm_build_one_stub): Emit a fatal error message
2281 instead of calling abort.
2282 * elf32-csky.c (csky_build_one_stub): Likewise.
2283 * elf32-hppa.c (hppa_build_one_stub): Likewise.
2284 * elf32-m68hc11.c (m68hc11_elf_build_one_stub): Likewise.
2285 * elf32-m68hc12.c (m68hc12_elf_build_one_stub): Likewise.
2286 * elf32-metag.c (metag_build_one_stub): Likewise.
2287 * elf32-nios2.c (nios2_build_one_stub): Likewise.
2288 * elf64-ppc.c (ppc_build_one_stub): Likewise.
2289 (ppc_size_one_stub): Likewise.
2290 * elfnn-aarch64.c (aarch64_build_one_stub): Likewise.
2292 2020-03-17 Nick Clifton <nickc@redhat.com>
2295 * elf.c (_bfd_elf_copy_special_section_fields): Replace assertions
2296 with error messages.
2298 2020-03-17 Nick Clifton <nickc@redhat.com>
2301 * elf.c (_bfd_elf_slurp_secondary_reloc_section): Remove redundant
2302 free. Add free on another failure path.
2304 2020-03-16 Alan Modra <amodra@gmail.com>
2307 * elf.c (elf_sort_segments): Don't call bfd_octets_per_byte unless
2308 we have a non-zero section count. Do lma comparison in octets.
2310 2020-03-16 Alan Modra <amodra@gmail.com>
2312 * vms-alpha.c (dst_restore_location): Validate index into
2313 dst_ptr_offsets array before accessing. Return status.
2314 (dst_retrieve_location): Similarly, making "loc" parameter a
2315 pointer to return value.
2316 (_bfd_vms_slurp_etir): Update calls to above functions.
2318 2020-03-14 Kamil Rytarowski <n54@gmx.com>
2320 * configure.ac: Include netbsd-core.lo for all NetBSD arm and mips
2322 * configure: Regenerated.
2324 2020-03-14 Alan Modra <amodra@gmail.com>
2326 * section.c (BFD_FAKE_SECTIONS): Formatting.
2327 * bfd-in2.h: Regenerate.
2329 2020-03-13 Kamil Rytarowski <n54@gmx.com>
2331 * elf.c (elfcore_grok_netbsd_note): Add support for
2332 NT_NETBSDCORE_LWPSTATUS notes.
2334 2020-03-13 Christophe Lyon <christophe.lyon@linaro.org>
2336 * bfd-in2.h: Regenerate.
2337 * section.c (asection): Add already_assigned field.
2338 (BFD_FAKE_SECTION): Add default initializer for it.
2339 * ecoff.c (bfd_debug_section): Initialize already_assigned field.
2340 * elf32-arm.c (arm_build_one_stub): Add support for
2341 non_contiguous_regions.
2342 * elf32-csky.c (csky_build_one_stub): Likewise.
2343 * elf32-hppa.c (hppa_build_one_stub): Likewise.
2344 * elf32-m68hc11.c (m68hc11_elf_build_one_stub): Likewise.
2345 * elf32-m68hc12.c (m68hc12_elf_build_one_stub): Likewise.
2346 * elf32-metag.c (metag_build_one_stub): Likewise.
2347 * elf32-nios2.c (nios2_build_one_stub): Likewise.
2348 * elf64-ppc.c (ppc_build_one_stub): Likewise.
2349 (ppc_size_one_stub): Likewise.
2350 * elfnn-aarch64.c (aarch64_build_one_stub): Likewise.
2351 * elflink.c (elf_link_input_bfd): Likewise.
2353 2020-03-13 H.J. Lu <hongjiu.lu@intel.com>
2356 * elf-linker-x86.h (elf_linker_x86_params): Add
2357 static_before_all_inputs and has_dynamic_linker.
2358 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Report
2359 dynamic input objects if -static is passed at command-line
2360 before all input files without --dynamic-linker unless
2361 --no-dynamic-linker is used.
2363 2020-03-13 Kamil Rytarowski <n54@gmx.com>
2365 * elf.c (elfcore_grok_netbsd_note): Add support for aarch64.
2367 2020-03-13 Christian Eggers <ceggers@gmx.de>
2369 * bfd.c (bfd_record_phdr): New local "opb". Fix assignment of
2370 "p_paddr" from "at".
2371 * elfcode.h (bfd_from_remote_memory): Add units to several
2372 parameters. New local "opb". Fix usage of p_align. Fix
2373 calculation of "localbase" from "ehdr_vma" and "p_vaddr". Fix
2374 call of target_read_memory.
2375 * elflink.c (elf_fixup_link_order): Fix scope of "s" local. Fix
2376 calculation of "offset" and "output_offset".
2377 (bfd_elf_final_link): New local "opb". Fix calculation of "size"
2378 from "offset" and fix calculation of "end" from "vma+size". Fix
2379 comparison between "sh_addr" and "vma"/"output_offset".
2380 (bfd_elf_discard_info): Fix calculation of "eh_alignment".
2381 * elf-bfd.h (struct elf_link_hash_table): Add unit to tls_size
2383 * elf.c (_bfd_elf_map_sections_to_segments): Add unit (bytes/
2384 octets) to "wrap_to2 and "phdr_size" locals. Fix calculation of
2385 "wrap_to" value. Add unit (bytes) to phdr_lma variable. Fix
2386 assignment of p_paddr from phdr_lma. Fix comparison between
2387 "lma+size" and "next->lma".
2388 (elf_sort_segments): Fix assignment from p_paddr to lma.
2389 (assign_file_positions_for_load_sections): Add unit (bytes) to
2390 local "align". Fix calculation of local "off_adjust". Fix
2391 calculation of local "filehdr_vaddr".
2392 (assign_file_positions_for_non_load_sections): New local "opb".
2393 Fix calculation of "end" from "p_size". Fix comparison between
2394 "vma+SECTION_SIZE" and "start". Fix calculation of "p_memsz"
2395 from "end" and "p_vaddr".
2396 (rewrite_elf_program_header): Fix comparison between p_vaddr and
2397 vma. Fix assignment to p_paddr from lma. Fix comparison between
2398 p_paddr and lma. Fix assignment to p_paddr from lma.
2399 * merge.c (sec_merge_emit): New local "opb". Convert
2400 "alignment_power" to octets.
2401 (_bfd_add_merge_section): New locals "alignment_power" and
2402 "opb". Fix comparison between "alignment_power" and
2404 (_bfd_merge_sections): New local "opb". Divide size by opb
2405 before checking align mask.
2407 2020-03-13 Christian Eggers <ceggers@gmx.de>
2409 * elf.c (_bfd_elf_make_section_from_shdr): Introduce new temp
2410 opb. Divide Elf_Internal_Shdr::sh_addr by opb when setting
2412 (_bfd_elf_make_section_from_phdr): Similarly.
2413 (elf_fake_sections): Fix calculation of
2414 Elf_Internal_shdr::sh_addr from section VMA.
2415 (_bfd_elf_map_sections_to_segments): Fix mixup between octets
2417 (assign_file_positions_for_load_sections): Fix calculations of
2418 Elf_Internal_shdr::p_vaddr and p_paddr from section LMA/VMA. Fix
2419 comparison between program header address and section LMA.
2420 (assign_file_positions_for_non_load_sections): Likewise.
2421 (rewrite_elf_program_header): Likewise. Introduce new temp opb.
2422 (IS_CONTAINED_BY_VMA): Add parameter opb.
2423 (IS_CONTAINED_BY_LMA,IS_SECTION_IN_INPUT_SEGMENT,
2424 INCLUDE_SECTION_IN_SEGMENT): Likewise.
2425 (copy_elf_program_header): Update call to ELF_SECTION_IN_SEGMENT.
2426 Fix calculations of p_addr_valid and p_vaddr_offset.
2427 * elflink.c (elf_link_add_object_symbols): Multiply section VMA
2428 with octets per byte when comparing against p_vaddr.
2430 2020-03-11 Alan Modra <amodra@gmail.com>
2432 * som.c (setup_sections): Sanity check subspace.name.
2434 2020-03-11 Alan Modra <amodra@gmail.com>
2436 * elf64-ppc.c (ppc64_elf_inline_plt): Do increment rel in for loop.
2438 2020-03-10 Alan Modra <amodra@gmail.com>
2441 * ihex.c (ihex_write_object_contents): Don't assume ordering of
2444 2020-03-09 Alan Modra <amodra@gmail.com>
2446 * wasm-module.c (wasm_scan): Sanity check file name length
2447 before allocating memory. Move common section setup code. Do
2448 without bfd_tell to calculate section size.
2450 2020-03-06 Nick Clifton <nickc@redhat.com>
2452 * elf.c (_bfd_elf_set_section_contents): Replace call to abort
2453 with error messages and failure return values.
2455 2020-03-05 Max Filippov <jcmvbkbc@gmail.com>
2457 * elf32-xtensa.c (shrink_dynamic_reloc_sections): Shrink dynamic
2458 relocation sections for any removed reference to a dynamic symbol.
2460 2020-03-05 Nick Clifton <nickc@redhat.com>
2462 * elf-bfd.h (struct elf_backend_data): Add new fields:
2463 init_secondary_reloc_section, slurp_secondary_reloc_section,
2464 write_secondary_reloc_section.
2465 (_bfd_elf_init_secondary_reloc_section): Prototype.
2466 (_bfd_elf_slurp_secondary_reloc_section): Prototype.
2467 (_bfd_elf_write_secondary_reloc_section): Prototype.
2468 * elf.c ( bfd_section_from_shdr): Invoke the new
2469 init_secondary_reloc_section backend function, if defined, when a
2470 second reloc section is encountered.
2471 (swap_out_syms): Invoke the new symbol_section_index function, if
2472 defined, when computing the section index of an OS/PROC specific
2474 (_bfd_elf_init_secondary_reloc_section): New function.
2475 (_bfd_elf_slurp_secondary_reloc_section): New function.
2476 (_bfd_elf_write_secondary_reloc_section): New function.
2477 (_bfd_elf_copy_special_section_fields): New function.
2478 * elfcode.h (elf_write_relocs): Invoke the new
2479 write_secondary_relocs function, if defined, in order to emit
2481 (elf_slurp_reloc_table): Invoke the new slurp_secondary_relocs
2482 function, if defined, in order to read in secondary relocs.
2483 * elfxx-target.h (elf_backend_copy_special_section_fields):
2484 Provide a non-NULL default definition.
2485 (elf_backend_init_secondary_reloc_section): Likewise.
2486 (elf_backend_slurp_secondary_reloc_section): Likewise.
2487 (elf_backend_write_secondary_reloc_section): Likewise.
2488 (struct elf_backend_data elfNN_bed): Add initialisers for the new
2490 * configure.ac (score_elf32_[bl]e_vec): Add elf64.lo
2491 * configure: Regenerate.
2493 2020-03-05 Alan Modra <amodra@gmail.com>
2495 * archive64.c (_bfd_archive_64_bit_slurp_armap): Check parsed_size
2496 against file size before allocating memory. Use bfd_alloc rather
2497 than bfd_zalloc for carsym/strings memory.
2499 2020-03-04 Alan Modra <amodra@gmail.com>
2501 * elf.c (elf_fake_sections): Ensure sh_addralign is such that
2502 sh_addr mod sh_addalign is zero.
2504 2020-03-04 Alan Modra <amodra@gmail.com>
2506 * format.c (bfd_check_format_matches): Call cleanup on error exit.
2508 2020-03-03 Alan Modra <amodra@gmail.com>
2510 * format.c (struct bfd_preserve): Add cleanup field.
2511 (bfd_preserve_save): Add cleanup param and save.
2512 (bfd_preserve_restore): Return cleanup.
2513 (bfd_preserve_finish): Call the cleanup for the discarded match.
2514 (bfd_check_format_matches): Pass cleanup to bfd_preserve_save,
2515 and clear when preserving a match. Restore cleanup too when
2516 restoring that match.
2518 2020-03-02 Alan Modra <amodra@gmail.com>
2520 * cisco-core.c (cisco_core_file_p): Return bfd_cleanup.
2521 * hpux-core.c (hpux_core_core_file_p): Update prototype.
2522 * sco5-core.c (sco5_core_file_p): Return bfd_cleanup.
2523 (core_sco5_vec): Correct initialisers.
2525 2020-03-02 Alan Modra <amodra@gmail.com>
2527 * aix386-core.c (aix386_core_file_p): Return bfd_cleanup.
2528 * aix5ppc-core.c (xcoff64_core_p): Likewise.
2529 * cisco-core.c (cisco_core_file_validate): Likewise.
2530 * hppabsd-core.c (hppabsd_core_core_file_p): Likewise.
2531 * hpux-core.c (hpux_core_core_file_p): Likewise.
2532 * irix-core.c (irix_core_core_file_p): Likewise.
2533 * lynx-core.c (lynx_core_file_p): Likewise.
2534 * netbsd-core.c (netbsd_core_file_p): Likewise.
2535 * osf-core.c (osf_core_core_file_p): Likewise.
2536 * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
2537 * sco5-core.c (sco5_core_file_p): Likewise.
2539 2020-03-02 H.J. Lu <hongjiu.lu@intel.com>
2541 * trad-core.c (trad_unix_core_file_p): Return bfd_cleanup.
2543 2020-03-02 Alan Modra <amodra@gmail.com>
2545 * targets.c (bfd_cleanup): New typedef.
2546 (struct bfd <_bfd_check_format>): Return a bfd_cleanup.
2547 * libbfd-in.h (_bfd_no_cleanup): Define.
2548 * format.c (bfd_reinit): Add cleanup parameter, call it.
2549 (bfd_check_format_matches): Set cleanup from _bfd_check_format
2550 call and pass to bfd_reinit. Delete temp, use abfd->xvec instead.
2551 * aout-target.h (callback, object_p): Return bfd_cleanup.
2552 * aout-tic30.c (tic30_aout_callback, tic30_aout_object_p): Likewise.
2553 * archive.c (bfd_generic_archive_p): Likewise.
2554 * binary.c (binary_object_p): Likewise.
2555 * coff-alpha.c (alpha_ecoff_object_p): Likewise.
2556 * coff-ia64.c (ia64coff_object_p): Likewise.
2557 * coff-rs6000.c (_bfd_xcoff_archive_p, rs6000coff_core_p): Likewise.
2558 * coff-sh.c (coff_small_object_p): Likewise.
2559 * coff-stgo32.c (go32_check_format): Likewise.
2560 * coff64-rs6000.c (xcoff64_archive_p, rs6000coff_core_p),
2561 (xcoff64_core_p): Likewise.
2562 * coffgen.c (coff_real_object_p, coff_object_p): Likewise.
2563 * elf-bfd.h (bfd_elf32_object_p, bfd_elf32_core_file_p),
2564 (bfd_elf64_object_p, bfd_elf64_core_file_p): Likewise.
2565 * elfcode.h (elf_object_p): Likewise.
2566 * elfcore.h (elf_core_file_p): Likewise.
2567 * i386msdos.c (msdos_object_p): Likewise.
2568 * ihex.c (ihex_object_p): Likewise.
2569 * libaout.h (some_aout_object_p): Likewise.
2570 * libbfd-in.h (bfd_generic_archive_p, _bfd_dummy_target),
2571 (_bfd_vms_lib_alpha_archive_p, _bfd_vms_lib_ia64_archive_p): Likewise.
2572 * libbfd.c (_bfd_dummy_target): Likewise.
2573 * libcoff-in.h (coff_object_p): Likewise.
2574 * mach-o-aarch64.c (bfd_mach_o_arm64_object_p),
2575 (bfd_mach_o_arm64_core_p): Likewise.
2576 * mach-o-arm.c (bfd_mach_o_arm_object_p),
2577 (bfd_mach_o_arm_core_p): Likewise.
2578 * mach-o-i386.c (bfd_mach_o_i386_object_p),
2579 (bfd_mach_o_i386_core_p): Likewise.
2580 * mach-o-x86-64.c (bfd_mach_o_x86_64_object_p),
2581 (bfd_mach_o_x86_64_core_p): Likewise.
2582 * mach-o.c (bfd_mach_o_header_p, bfd_mach_o_gen_object_p),
2583 (bfd_mach_o_gen_core_p, bfd_mach_o_fat_archive_p): Likewise.
2584 * mach-o.h (bfd_mach_o_object_p, bfd_mach_o_core_p),
2585 (bfd_mach_o_fat_archive_p, bfd_mach_o_header_p): Likewise.
2586 * mmo.c (mmo_object_p): Likewise.
2587 * pef.c (bfd_pef_object_p, bfd_pef_xlib_object_p): Likewise.
2588 * peicode.h (coff_real_object_p, pe_ILF_object_p),
2589 (pe_bfd_object_p): Likewise.
2590 * plugin.c (ld_plugin_object_p, bfd_plugin_object_p): Likewise.
2591 * ppcboot.c (ppcboot_object_p): Likewise.
2592 * rs6000-core.c (rs6000coff_core_p): Likewise.
2593 * som.c (som_object_setup, som_object_p): Likewise.
2594 * srec.c (srec_object_p, symbolsrec_object_p): Likewise.
2595 * tekhex.c (tekhex_object_p): Likewise.
2596 * vms-alpha.c (alpha_vms_object_p): Likewise.
2597 * vms-lib.c (_bfd_vms_lib_archive_p, _bfd_vms_lib_alpha_archive_p),
2598 (_bfd_vms_lib_ia64_archive_p, _bfd_vms_lib_txt_archive_p): Likewise.
2599 * wasm-module.c (wasm_object_p): Likewise.
2600 * xsym.c (bfd_sym_object_p): Likewise.
2601 * xsym.h (bfd_sym_object_p): Likewise.
2602 * aoutx.h (some_aout_object_p): Likewise, and callback parameter
2604 * pdp11.c (some_aout_object_p): Likewise.
2605 * plugin.c (register_ld_plugin_object_p): Update object_p
2607 * plugin.h (register_ld_plugin_object_p): Likewise.
2608 * bfd-in2.h: Regenerate.
2609 * libbfd.h: Regenerate.
2610 * libcoff.h: Regenerate.
2612 2020-03-02 Alan Modra <amodra@gmail.com>
2614 * coff-alpha.c (alpha_ecoff_le_vec): Add SEC_SMALL_DATA to
2615 applicable section flags.
2616 * coff-mips.c (mips_ecoff_le_vec, mips_ecoff_be_vec): Likewise.
2617 (mips_ecoff_bele_vec): Likewise.
2618 * coffcode.h (sec_to_styp_flags): Set SEC_SMALL_DATA for .sdata
2620 * ecoff.c (_bfd_ecoff_new_section_hook): Likewise.
2621 (_bfd_ecoff_styp_to_sec_flags): Likewise.
2623 2020-03-02 Alan Modra <amodra@gmail.com>
2625 * elf32-m32r.c (m32r_elf_section_flags): New function.
2626 (elf_backend_section_flags): Define.
2627 * elf32-nds32.c (nds32_elf_section_flags): New function.
2628 (elf_backend_section_flags): Define.
2629 * elf32-ppc.c (ppc_elf_section_from_shdr): Set SEC_SMALL_DATA for
2630 .sbss and .sdata sections.
2631 * elf32-v850.c (v850_elf_section_from_shdr): Set SEC_SMALL_DATA
2632 for SHF_V850_GPREL sections.
2633 * elf64-alpha.c (elf64_alpha_section_from_shdr): Delete outdated
2635 * elf64-hppa.c (elf64_hppa_section_from_shdr): Set SEC_SMALL_DATA
2636 for SHF_PARISC_SHORT sections.
2637 * elf64-ppc.c (ppc64_elf_section_flags): New function.
2638 (elf_backend_section_flags): Define.
2639 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Set SEC_SMALL_DATA
2640 for SHF_MIPS_GPREL sections. Delete FIXME.
2642 2020-03-02 Alan Modra <amodra@gmail.com>
2644 * elf-bfd.h (elf_backend_section_flags): Remove flagword* param.
2645 * elf.c (_bfd_elf_make_section_from_shdr): Set section flags before
2646 calling elf_backend_section_flags with adjusted params. Use
2647 newsect->flags past that point.
2648 (_bfd_elf_new_section_hook): Always set sh_type and sh_flags for
2650 (_bfd_elf_init_private_section_data): Allow normal sh_type sections
2651 to have their type overridden, and all sh_flags but processor and
2653 * elf32-arm.c (elf32_arm_section_flags): Adjust for changed params.
2654 * elf32-mep.c (mep_elf_section_flags): Likewise.
2655 * elf32-nios2.c (nios2_elf32_section_flags): Likewise.
2656 * elf64-alpha.c (elf64_alpha_section_flags): Likewise.
2657 * elf64-ia64-vms.c (elf64_ia64_section_flags): Likewise.
2658 * elfnn-ia64.c (elfNN_ia64_section_flags): Likewise.
2659 * elfnn-aarch64.c (elfNN_aarch64_size_stubs): Exclude the linker
2660 stub BFD and non-aarch64 input files when scanning for stubs.
2662 2020-03-02 Alan Modra <amodra@gmail.com>
2664 * coff-alpha.c (alpha_ecoff_get_elt_at_filepos): Provide an upper
2665 limit to decompressed element size.
2667 2020-03-02 Alan Modra <amodra@gmail.com>
2669 * vms-lib.c (vms_traverse_index): Add recur_count param and
2670 update calls. Fail on excessive recursion.
2672 2020-03-02 Alan Modra <amodra@gmail.com>
2674 * vms-alpha.c (vms_get_remaining_object_record): Use
2675 bfd_realloc_or_free rather than bfd_realloc.
2676 (add_symbol_entry, vector_grow1, alpha_vms_slurp_relocs): Likewise.
2677 (dst_define_location, parse_module): Likewise, and check realloc
2678 return status before using memory. Return status from function
2679 adjusting all callers.
2681 2020-02-28 Alan Modra <amodra@gmail.com>
2683 * vms-lib.c (_bfd_vms_lib_archive_p): Free memory on error paths.
2685 2020-02-28 Alan Modra <amodra@gmail.com>
2687 * vms-alpha.c (alpha_vms_object_p): Use _bfd_malloc_and_read.
2688 Remove duplicate undersize check.
2690 2020-02-27 Alan Modra <amodra@gmail.com>
2693 * mmo.c (mmo_scan): Set SEC_DATA for .data.
2695 2020-02-27 Alan Modra <amodra@gmail.com>
2698 * syms.c (stt): Trim off all but 'e', 'i' and 'p' entries.
2699 (coff_section_type): Adjust comment.
2700 (decode_section_type): Likewise. Call coff_section_type before
2701 decode_section_type.
2702 (bfd_decode_symclass): Use 'c' for common sections other than
2705 2020-02-27 Alan Modra <amodra@gmail.com>
2707 * coff-rs6000.c (_bfd_xcoff_read_ar_hdr): Put all data in one
2710 2020-02-27 Alan Modra <amodra@gmail.com>
2712 * bfd.c (bfd_stat_arch_elt): Use vector of containing archive,
2713 if file is an archive element.
2714 * bfd-in2.h: Regenerate.
2716 2020-02-26 Alan Modra <amodra@gmail.com>
2718 * archive.c (do_slurp_bsd_armap): Increase minimum parsed_size, and
2719 bfd_set_error on failing test. Don't bother changing bfd_error on
2720 file read error. Check symdef_count is multiple of BSD_SYMDEF_SIZE.
2721 Check sym name is within string buffer. Use size_t for some vars.
2722 (do_slurp_coff_armap): Use size_t for some variables, fix size of
2723 int_buf. Don't change bfd_error on file read error. Use
2724 _bfd_mul_overflow when calculating carsym buffer size. Reorder
2725 calculations to catch overflows before they occur. malloc and
2726 free raw armap rather than using bfd_alloc. Read raw armap before
2727 allocating carsym+strings buffer.
2728 (_bfd_slurp_extended_name_table): Localize variables. Check
2729 name size against file size.
2731 2020-02-26 Alan Modra <amodra@gmail.com>
2733 * vms-lib.c (vms_lib_read_index): Release correct buffer.
2735 2020-02-26 Alan Modra <amodra@gmail.com>
2737 * elf32-rx.c (rx_elf_relocate_section): Use bfd_malloc rather than
2738 malloc. Check for NULL return from bfd_malloc.
2739 (rx_table_find, rx_table_map): Likewise.
2740 (rx_set_section_contents): Check bfd_alloc return.
2741 (rx_dump_symtab): Don't alloc internal_syms or external_syms.
2743 2020-02-26 Alan Modra <amodra@gmail.com>
2745 * aoutx.h: Indent labels correctly. Format error strings.
2746 * archive.c: Likewise.
2747 * archive64.c: Likewise.
2748 * coff-arm.c: Likewise.
2749 * coff-rs6000.c: Likewise.
2750 * coff-stgo32.c: Likewise.
2751 * cpu-arm.c: Likewise.
2752 * dwarf2.c: Likewise.
2753 * elf-ifunc.c: Likewise.
2754 * elf-properties.c: Likewise.
2755 * elf-s390-common.c: Likewise.
2756 * elf-strtab.c: Likewise.
2758 * elf32-arm.c: Likewise.
2759 * elf32-bfin.c: Likewise.
2760 * elf32-cr16.c: Likewise.
2761 * elf32-csky.c: Likewise.
2762 * elf32-i386.c: Likewise.
2763 * elf32-m68k.c: Likewise.
2764 * elf32-msp430.c: Likewise.
2765 * elf32-nds32.c: Likewise.
2766 * elf32-nios2.c: Likewise.
2767 * elf32-pru.c: Likewise.
2768 * elf32-xtensa.c: Likewise.
2769 * elf64-ia64-vms.c: Likewise.
2770 * elf64-x86-64.c: Likewise.
2771 * elfcode.h: Likewise.
2772 * elfcore.h: Likewise.
2773 * elflink.c: Likewise.
2774 * elfnn-aarch64.c: Likewise.
2775 * elfnn-ia64.c: Likewise.
2776 * elfnn-riscv.c: Likewise.
2777 * elfxx-mips.c: Likewise.
2778 * elfxx-sparc.c: Likewise.
2779 * elfxx-x86.c: Likewise.
2780 * i386lynx.c: Likewise.
2781 * merge.c: Likewise.
2782 * pdp11.c: Likewise.
2783 * plugin.c: Likewise.
2784 * reloc.c: Likewise.
2786 2020-02-26 Alan Modra <amodra@gmail.com>
2789 * elf-bfd.h (struct elf_link_hash_table): Rename "loaded" to
2791 (bfd_elf_add_dt_needed_tag): Declare.
2792 * elf-strtab.c (_bfd_elf_strtab_restore): Handle NULL buf.
2793 * elflink.c (bfd_elf_add_dt_needed_tag): Make global and rename
2794 from elf_add_dt_needed_tag. Remove soname and doit param.
2795 (elf_link_add_object_symbols): Don't use elf_add_dt_needed_tag
2796 to see whether as-needed lib is already loaded, use dyn_loaded
2797 list instead. When saving and restoring around as-needed lib
2798 handle possibility that dynstr has not been initialised. Don't
2799 add DT_NEEDED tags here. Limit dyn_loaded list to dynamic libs.
2800 Mark libs loaded via DT_NEEDED entries of other libs with
2801 DYN_NO_NEEDED if they should not be mentioned in DT_NEEDED of
2803 (elf_link_check_versioned_symbol): Remove now unneccesary
2804 DYNAMIC check when traversing dyn_loaded list.
2806 2020-02-26 Alan Modra <amodra@gmail.com>
2808 * bfdio.c (bfd_get_file_size): Ignore bogus archive element sizes.
2810 2020-02-25 H.J. Lu <hongjiu.lu@intel.com>
2813 * plugin.c (need_lto_wrapper_p): New.
2814 (bfd_plugin_set_program_name): Add an int argument to set
2816 (get_lto_wrapper): Return FALSE if need_lto_wrapper_p isn't
2818 * plugin.h (bfd_plugin_set_program_name): Add an int argument.
2820 2020-02-24 Alan Modra <amodra@gmail.com>
2822 * vms-lib.c (_bfd_vms_lib_archive_p): Correct overflow checks.
2824 2020-02-24 Alan Modra <amodra@gmail.com>
2826 * vms-lib.c (struct carsym_mem): Add limit.
2827 (vms_add_index): Heed limit.
2828 (vms_traverse_index): Catch buffer overflows. Remove outdated fixme.
2829 (vms_lib_read_index): Set up limit. Catch 32-bit overflow.
2830 Always return actual number read.
2831 (_bfd_vms_lib_archive_p): Catch buffer overflows. Replace
2832 assertion with error exit.
2834 2020-02-22 Alan Modra <amodra@gmail.com>
2837 * elf.c (assign_file_positions_for_load_sections): Continue linking
2838 on "PHDR segment not covered by LOAD segment" errors.
2840 2020-02-21 Alan Modra <amodra@gmail.com>
2842 * mach-o.c (bfd_mach_o_canonicalize_relocs): Fix ineffective
2844 (bfd_mach_o_canonicalize_reloc): Likewise.
2845 (bfd_mach_o_canonicalize_dynamic_reloc): Likewise. Sanity check
2846 counts and offsets against file size.
2847 (bfd_mach_o_build_dysymtab): Fix ineffective overflow check.
2848 (bfd_mach_o_mangle_sections): Remove unnecessary overflow check.
2849 (bfd_mach_o_read_symtab_symbols): Sanity check count and offset
2850 against file size. Delete symbol table error message.
2851 (bfd_mach_o_read_dysymtab): Sanity check counts and offsets
2853 (bfd_mach_o_read_symtab): Likewise.
2854 (bfd_mach_o_read_command): Pass file size.
2855 (bfd_mach_o_scan): Sanity check command count against file size.
2857 2020-02-21 Alan Modra <amodra@gmail.com>
2860 * aoutx.h (adjust_o_magic, adjust_z_magic, adjust_n_magic): Use
2861 "text", "data" and "bss" section pointer vars. Don't update
2862 section size, just exec header sizes.
2863 (adjust_sizes_and_vmas): Don't update text section size. Set
2864 initial exec header a_text. Print exec headers sizes.
2865 * pdp11.c (adjust_o_magic, adjust_z_magic, adjust_n_magic),
2866 (adjust_sizes_and_vmas): Similarly. Formatting.
2867 (final_link): Correct final file extension.
2869 2020-02-20 Nick Clifton <nickc@redhat.com>
2871 * elf-bfd.h (struct elf_backend_data): Add symbol_section_index
2873 * elfxx-target.h (elf_backend_symbol_section_index): Provide
2875 (elfNN_bed): Initialise the symbol_section_index field.
2876 * elf.c (swap_out_syms): Call symbol_section_index, if defined, on
2877 OS and PROC specific section indicies. Warn if converting other
2878 reserved incidies to SHN_ABS.
2880 2020-02-19 Sergey Belyashov <sergey.belyashov@gmail.com>
2883 * cpu-z80.c: Add machine type compatibility checking.
2885 2020-02-19 H.J. Lu <hongjiu.lu@intel.com>
2888 * plugin.c (plugin_list_entry): Remove handle.
2889 (try_load_plugin): Call dlclose before return.
2891 2020-02-19 Alan Modra <amodra@gmail.com>
2893 * libbfd-in.h (_bfd_constant_p): Define.
2894 (_bfd_alloc_and_read, _bfd_malloc_and_read): Check read size against
2895 file size before allocating memory.
2896 * coffgen.c (_bfd_coff_get_external_symbols): Remove file size check.
2897 * elf.c (bfd_elf_get_str_section): Likewise.
2898 (_bfd_elf_slurp_version_tables): Likewise.
2899 * libbfd.h: Regenerate.
2901 2020-02-19 Alan Modra <amodra@gmail.com>
2903 * libbfd-in.h (_bfd_alloc_and_read, _bfd_malloc_and_read): New.
2904 * aoutx.h (aout_get_external_symbols): Replace calls to
2905 bfd_[m]alloc and bfd_bread with call to _bfd_[m]alloc_and_read.
2906 (slurp_reloc_table): Likewise.
2907 * archive.c (do_slurp_bsd_armap): Likewise.
2908 (do_slurp_coff_armap): Likewise.
2909 * archive64.c (_bfd_archive_64_bit_slurp_armap): Likewise.
2910 * coff-rs6000.c (_bfd_xcoff_slurp_armap): Likewise.
2911 * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
2912 * coffcode.h (coff_set_arch_mach_hook, buy_and_read): Likewise.
2913 * coffgen.c (coff_real_object_p, coff_object_p, build_debug_section),
2914 (_bfd_coff_get_external_symbols): Likewise.
2915 * ecoff.c (ecoff_slurp_symbolic_header),
2916 (_bfd_ecoff_slurp_symbolic_info, ecoff_slurp_reloc_table),
2917 (_bfd_ecoff_slurp_armap, ecoff_link_add_object_symbols, READ),
2918 (ecoff_indirect_link_order): Likewise.
2919 * elf.c (bfd_elf_get_str_section, setup_group, elf_read_notes),
2920 (_bfd_elf_slurp_version_tables): Likewise.
2921 * elf32-m32c.c (m32c_elf_relax_section): Likewise.
2922 * elf32-rl78.c (rl78_elf_relax_section): Likewise.
2923 * elf32-rx.c (elf32_rx_relax_section): Likewise.
2924 * elf64-alpha.c (READ): Likewise.
2925 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Likewise.
2926 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Likewise.
2927 * elfcode.h (elf_slurp_symbol_table),
2928 (elf_slurp_reloc_table_from_section): Likewise.
2929 * elflink.c (elf_link_add_object_symbols),
2930 (elf_link_check_versioned_symbol): Likewise.
2931 * elfxx-mips.c (READ): Likewise.
2932 * i386lynx.c (slurp_reloc_table): Likewise.
2933 * lynx-core.c (lynx_core_file_p): Likewise.
2934 * mach-o.c (bfd_mach_o_canonicalize_relocs),
2935 (bfd_mach_o_read_symtab_strtab, bfd_mach_o_alloc_and_read),
2936 (bfd_mach_o_read_prebound_dylib, bfd_mach_o_read_dyld_content
2937 * pdp11.c (aout_get_external_symbols, slurp_reloc_table
2938 * pef.c (bfd_pef_print_loader_section, bfd_pef_scan_start_address),
2939 (bfd_pef_parse_symbols): Likewise.
2940 * peicode.h (pe_ILF_object_p, pe_bfd_object_p
2941 * som.c (setup_sections, som_slurp_string_table),
2942 (som_slurp_reloc_table, som_bfd_count_ar_symbols),
2943 (som_bfd_fill_in_ar_symbols): Likewise.
2944 * vms-alpha.c (module_find_nearest_line, evax_bfd_print_dst),
2945 (evax_bfd_print_image): Likewise.
2946 * vms-lib.c (_bfd_vms_lib_archive_p): Likewise.
2947 * wasm-module.c (wasm_scan): Likewise.
2948 * xcofflink.c (xcoff_link_add_symbols): Likewise.
2949 * xsym.c (bfd_sym_read_name_table),
2950 (bfd_sym_print_type_information_table_entry): Likewise.
2951 * libbfd.h: Regenerate.
2953 2020-02-19 Alan Modra <amodra@gmail.com>
2955 * aoutx.h (slurp_reloc_table): Allocate reloc_cache after
2956 reading external relocs.
2957 * ecoff.c (ecoff_slurp_reloc_table): Likewise.
2958 * archive.c (_bfd_write_archive_contents): Don't twiddle bfd_error
2960 * archive64.c (_bfd_archive_64_bit_slurp_armap): Remove unnecessary
2962 * elf32-m32c.c (m32c_offset_for_reloc): Make shndx_buf a bfd_byte*.
2963 (m32c_elf_relax_section): Likewise.
2964 * elf32-rl78.c (rl78_offset_for_reloc): Likewise.
2965 (rl78_elf_relax_section): Likewise.
2966 * elf32-rx.c (rx_offset_for_reloc): Likewise.
2967 (elf32_rx_relax_section): Likewise.
2968 * mach-o.c (bfd_mach_o_alloc_and_read): Move earlier with better
2969 parameter types and use..
2970 (bfd_mach_o_read_dylinker, bfd_mach_o_read_dylib),
2971 (bfd_mach_o_read_fvmlib, bfd_mach_o_read_str): ..in these functions.
2972 * peicode.h (pe_bfd_object_p): Don't zero the part of opthdr
2973 being read from file, just the extra.
2974 * som.c (som_slurp_symbol_table): Allocate internal symbol buffer
2975 after reading external syms. Free on failure.
2977 2020-02-19 Alan Modra <amodra@gmail.com>
2979 * coffcode.h (buy_and_read, coff_slurp_line_table),
2980 (coff_slurp_symbol_table, coff_slurp_reloc_table): Replace
2981 bfd_[z][m]alloc2 calls with _bfd_mul_overflow followed by the
2982 corresponding bfd_alloc call. Adjust variables to suit.
2983 * coffgen.c (_bfd_coff_get_external_symbols): Likewise.
2984 * ecoff.c (_bfd_ecoff_slurp_symbolic_info),
2985 (_bfd_ecoff_slurp_symbol_table, READ): Likewise.
2986 * elf.c (bfd_elf_get_elf_syms, setup_group, bfd_section_from_shdr),
2987 (swap_out_syms, _bfd_elf_slurp_version_tables): Likewise.
2988 * elf32-m32c.c (m32c_elf_relax_section): Likewise.
2989 * elf32-rl78.c (rl78_elf_relax_section): Likewise.
2990 * elf32-rx.c (elf32_rx_relax_section): Likewise.
2991 * elf64-alpha.c (READ): Likewise.
2992 * elfcode.h (elf_object_p, elf_write_relocs, elf_write_shdrs_and_ehdr),
2993 (elf_slurp_symbol_table, elf_slurp_reloc_table),
2994 (bfd_from_remote_memory): Likewise.
2995 * elfcore.h (core_find_build_id): Likewise.
2996 * elfxx-mips.c (READ): Likewise.
2997 * mach-o.c (bfd_mach_o_mangle_sections),
2998 (bfd_mach_o_read_symtab_symbols, bfd_mach_o_read_thread),
2999 (bfd_mach_o_read_dysymtab, bfd_mach_o_flatten_sections),
3000 (bfd_mach_o_scan, bfd_mach_o_fat_archive_p): Likewise.
3001 * som.c (setup_sections, som_prep_for_fixups)
3002 (som_build_and_write_symbol_table, som_slurp_symbol_table),
3003 (som_slurp_reloc_table, som_bfd_count_ar_symbols),
3004 (som_bfd_fill_in_ar_symbols, som_slurp_armap),
3005 (som_bfd_ar_write_symbol_stuff): Likewise.
3006 * vms-alpha.c (vector_grow1): Likewise.
3007 * vms-lib.c (vms_add_index): Likewise.
3008 * wasm-module.c (wasm_scan_name_function_section): Likewise.
3009 * libbfd.c (bfd_malloc2, bfd_realloc2, bfd_zmalloc2): Delete.
3010 * opncls.c (bfd_alloc2, bfd_zalloc2): Delete.
3011 * libbfd-in.h (bfd_malloc2, bfd_realloc2, bfd_zmalloc2),
3012 (bfd_alloc2, bfd_zalloc2): Delete.
3013 (_bfd_mul_overflow): Define.
3014 * libbfd.h: Regenerate.
3016 2020-02-19 Alan Modra <amodra@gmail.com>
3018 * elf.c (bfd_section_from_shdr): Use bfd_zalloc rather than
3020 (assign_section_numbers): Likewise.
3021 (elf_map_symbols): Likewise, and bfd_alloc rather than bfd_alloc2.
3022 (_bfd_elf_map_sections_to_segments): Use bfd_malloc rather than
3023 bfd_malloc2, size_t amt, and unsigned tls_count.
3024 (rewrite_elf_program_header): Use bfd_malloc and size_t amt.
3025 * elflink.c (elf_create_symbuf): Use bfd_malloc.
3026 (elf_output_implib): Use bfd_alloc.
3028 2020-02-19 Alan Modra <amodra@gmail.com>
3030 * bfd.c (struct bfd): Move format and direction to other
3031 bitfields. Add "size".
3032 * bfdio.c (bfd_get_size): Cache size when not writing file.
3033 * opncls.c (bfd_get_debug_link_info_1): Allow for bfd_get_size
3034 returning zero, ie. unknown.
3035 (bfd_get_alt_debug_link_info): Likewise.
3036 * bfd-in2.h: Regenerate.
3038 2020-02-19 Alan Modra <amodra@gmail.com>
3040 * coffgen.c (_bfd_coff_get_external_symbols): Don't call
3041 bfd_get_file_size twice.
3042 (_bfd_coff_read_string_table): Allow for bfd_get_file_size
3043 zero, ie. unknown, return.
3044 * elf-attrs.c (_bfd_elf_parse_attributes): Likewise.
3045 * elfcode.h (elf_swap_shdr_in): Likewise.
3046 (elf_object_p): Don't call bfd_get_file_size twice and correct
3049 2020-02-19 Alan Modra <amodra@gmail.com>
3051 * mach-o.c (bfd_mach_o_flatten_sections): Return a bfd_boolean,
3052 FALSE if memory alloc fails. Adjust calls.
3053 * som.c (som_prep_for_fixups): Likewise.
3054 * vms-alpha.c (alpha_vms_add_fixup_lp, alpha_vms_add_fixup_ca),
3055 (alpha_vms_add_fixup_qr, alpha_vms_add_fixup_lr),
3056 (alpha_vms_add_lw_reloc, alpha_vms_add_qw_reloc): Likewise.
3057 * som.c (som_build_and_write_symbol_table): Return via error_return
3059 * vms-alpha.c (VEC_APPEND): Adjust for vector_grow1 changes.
3060 (VEC_APPEND_EL): Delete.
3061 (vector_grow1): Return pointer to element. Catch overflow.
3062 Return NULL on memory allocation failure.
3063 (alpha_vms_add_fixup_lp): Replace VEC_APPEND_EL with VEC_APPEND.
3064 (alpha_vms_add_fixup_ca): Likewise.
3065 (alpha_vms_link_add_object_symbols): Check VEC_APPEND result
3067 * elf.c (bfd_section_from_shdr): Check bfd_zalloc2 result.
3069 2020-02-19 Alan Modra <amodra@gmail.com>
3071 * aix386-core.c (aix386_core_file_p): Use size_t for "amt".
3072 * aout-target.h (object_p): Likewise.
3073 * aout-tic30.c (tic30_aout_object_p): Likewise.
3074 * aoutx.h (some_aout_object_p, mkobject, make_empty_symbol),
3075 (emit_stringtab, write_syms, link_hash_table_create),
3076 (aout_link_write_other_symbol): Likewise.
3077 * archive.c (_bfd_generic_mkarchive, bfd_generic_archive_p),
3078 (bfd_ar_hdr_from_filesystem, _bfd_write_archive_contents),
3079 (_bfd_compute_and_write_armap): Likewise.
3080 * archures.c (bfd_arch_list): Likewise.
3081 * bfd.c (bfd_record_phdr): Likewise.
3082 * binary.c (binary_canonicalize_symtab): Likewise.
3083 * cisco-core.c (cisco_core_file_validate): Likewise.
3084 * coff-arm.c (coff_arm_link_hash_table_create, find_thumb_glue),
3085 (find_arm_glue, record_arm_to_thumb_glue),
3086 (record_thumb_to_arm_glue): Likewise.
3087 * coff-ppc.c (ppc_coff_link_hash_table_create, record_toc),
3088 (ppc_allocate_toc_section): Likewise.
3089 * coff-rs6000.c (_bfd_xcoff_mkobject, _bfd_xcoff_archive_p): Likewise.
3090 * coff-sh.c (sh_relax_section): Likewise.
3091 * coff64-rs6000.c (xcoff64_archive_p): Likewise.
3092 * coffcode.h (handle_COMDAT, coff_new_section_hook),
3093 (coff_set_alignment_hook, coff_mkobject),
3094 (coff_compute_section_file_positions): Likewise.
3095 * coffgen.c (coff_make_empty_symbol, coff_bfd_make_debug_symbol),
3096 (coff_find_nearest_line_with_names),
3097 ( bfd_coff_set_symbol_class): Likewise.
3098 * cofflink.c (_bfd_coff_link_hash_table_create),
3099 (_bfd_coff_link_input_bfd): Likewise.
3100 * dwarf1.c (alloc_dwarf1_unit, alloc_dwarf1_func): Likewise.
3101 * dwarf2.c (read_abbrevs, read_attribute_value, add_line_info),
3102 (build_line_info_table, sort_line_sequences),
3103 (line_info_add_include_dir, line_info_add_file_name),
3104 (decode_line_info, scan_unit_for_symbols, parse_comp_unit),
3105 (place_sections, _bfd_dwarf2_slurp_debug_info): Likewise.
3106 * ecoff.c (_bfd_ecoff_mkobject, _bfd_ecoff_make_empty_symbol),
3107 (_bfd_ecoff_find_nearest_line),
3108 (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
3109 * ecofflink.c (bfd_ecoff_debug_init): Likewise.
3110 * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Likewise.
3111 * elf-m10300.c (mn10300_elf_relax_section),
3112 (elf32_mn10300_link_hash_table_create): Likewise.
3113 * elf-strtab.c (_bfd_elf_strtab_init): Likewise.
3114 * elf.c (make_mapping, copy_elf_program_header): Likewise.
3115 * elf32-arm.c (elf32_arm_link_hash_table_create),
3116 (elf32_arm_setup_section_lists, elf32_arm_check_relocs),
3117 (elf32_arm_new_section_hook): Likewise.
3118 * elf32-avr.c (elf_avr_new_section_hook),
3119 (elf32_avr_link_hash_table_create, get_local_syms),
3120 (elf32_avr_setup_section_lists): Likewise.
3121 * elf32-bfin.c (bfinfdpic_elf_link_hash_table_create),
3122 (bfin_link_hash_table_create): Likewise.
3123 * elf32-cr16.c (elf32_cr16_link_hash_table_create): Likewise.
3124 * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
3125 * elf32-csky.c (csky_elf_link_hash_table_create),
3126 (csky_elf_check_relocs, elf32_csky_setup_section_lists): Likewise.
3127 * elf32-frv.c (frvfdpic_elf_link_hash_table_create): Likewise.
3128 * elf32-hppa.c (elf32_hppa_link_hash_table_create),
3129 (elf32_hppa_setup_section_lists, get_local_syms): Likewise.
3130 * elf32-i386.c (elf_i386_check_relocs): Likewise.
3131 * elf32-lm32.c (lm32_elf_link_hash_table_create): Likewise.
3132 * elf32-m32r.c (m32r_elf_link_hash_table_create),
3133 (m32r_elf_check_relocs): Likewise.
3134 * elf32-m68hc1x.c (m68hc11_elf_hash_table_create),
3135 (elf32_m68hc11_setup_section_lists),
3136 (elf32_m68hc11_size_stubs): Likewise.
3137 * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
3138 * elf32-metag.c (elf_metag_link_hash_table_create),
3139 (elf_metag_setup_section_lists): Likewise.
3140 * elf32-microblaze.c (microblaze_elf_link_hash_table_create),
3141 (microblaze_elf_check_relocs): Likewise.
3142 * elf32-nds32.c (nds32_elf_link_hash_table_create),
3143 (nds32_elf_check_relocs): Likewise.
3144 * elf32-nios2.c (nios2_elf32_setup_section_lists),
3145 (get_local_syms, nios2_elf32_check_relocs),
3146 (nios2_elf32_link_hash_table_create): Likewise.
3147 * elf32-or1k.c (or1k_elf_link_hash_table_create),
3148 (or1k_elf_check_relocs): Likewise.
3149 * elf32-ppc.c (ppc_elf_modify_segment_map, update_plt_info): Likewise.
3150 * elf32-pru.c (pru_elf32_link_hash_table_create): Likewise.
3151 * elf32-s390.c (elf_s390_link_hash_table_create),
3152 (elf_s390_check_relocs): Likewise.
3153 * elf32-score.c (score_elf_create_got_section),
3154 (s3_elf32_score_new_section_hook),
3155 (elf32_score_link_hash_table_create): Likewise.
3156 * elf32-score7.c (score_elf_create_got_section),
3157 (s7_elf32_score_new_section_hook): Likewise.
3158 * elf32-sh.c (sh_elf_link_hash_table_create),
3159 (sh_elf_check_relocs): Likewise.
3160 * elf32-tic6x.c (elf32_tic6x_link_hash_table_create),
3161 (elf32_tic6x_new_section_hook, elf32_tic6x_check_relocs): Likewise.
3162 * elf32-tilepro.c (tilepro_elf_link_hash_table_create),
3163 (tilepro_elf_check_relocs): Likewise.
3164 * elf32-v850.c (remember_hi16s_reloc): Likewise.
3165 * elf32-vax.c (elf_vax_link_hash_table_create): Likewise.
3166 * elf32-xtensa.c (elf_xtensa_link_hash_table_create),
3167 (elf_xtensa_new_section_hook): Likewise.
3168 * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create),
3169 (get_got_entry, elf64_alpha_check_relocs): Likewise.
3170 * elf64-hppa.c (elf64_hppa_hash_table_create): Likewise.
3171 * elf64-ia64-vms.c (elf64_ia64_object_p): Likewise.
3172 * elf64-mmix.c (mmix_elf_new_section_hook): Likewise.
3173 * elf64-ppc.c (ppc64_elf_new_section_hook),
3174 (ppc64_elf_link_hash_table_create, update_local_sym_info),
3175 (update_plt_info, ppc64_elf_check_relocs): Likewise.
3176 * elf64-s390.c (elf_s390_link_hash_table_create),
3177 (elf_s390_check_relocs): Likewise.
3178 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
3179 * elflink.c (bfd_elf_link_record_local_dynamic_symbol),
3180 (_bfd_elf_link_find_version_dependencies, elf_link_add_object_symbols),
3181 (elf_link_add_archive_symbols, compute_bucket_count),
3182 (bfd_elf_size_dynsym_hash_dynstr, _bfd_elf_link_hash_table_create),
3183 (bfd_elf_get_bfd_needed_list, elf_link_swap_symbols_out),
3184 (bfd_elf_final_link): Likewise.
3185 * elfnn-aarch64.c (elfNN_aarch64_link_hash_table_create),
3186 (elfNN_aarch64_setup_section_lists, elfNN_aarch64_check_relocs),
3187 (elfNN_aarch64_new_section_hook): Likewise.
3188 * elfnn-ia64.c (elfNN_ia64_object_p): Likewise.
3189 * elfnn-riscv.c (riscv_elf_link_hash_table_create),
3190 (riscv_elf_check_relocs): Likewise.
3191 * elfxx-mips.c (_bfd_mips_elf_new_section_hook),
3192 (_bfd_mips_elf_add_symbol_hook, _bfd_mips_elf_check_relocs),
3193 (_bfd_mips_elf_modify_segment_map, _bfd_mips_elf_set_section_contents),
3194 (_bfd_mips_elf_link_hash_table_create): Likewise.
3195 * elfxx-sparc.c (_bfd_sparc_elf_link_hash_table_create),
3196 (_bfd_sparc_elf_check_relocs),
3197 (_bfd_sparc_elf_new_section_hook): Likewise.
3198 * elfxx-tilegx.c (tilegx_elf_link_hash_table_create),
3199 (tilegx_elf_check_relocs): Likewise.
3200 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Likewise.
3201 * format.c (bfd_check_format_matches): Likewise.
3202 * hash.c (_bfd_stringtab_init): Likewise.
3203 * ihex.c (ihex_scan): Likewise.
3204 * irix-core.c (irix_core_core_file_p): Likewise.
3205 * linker.c (bfd_wrapped_link_hash_lookup),
3206 (_bfd_generic_link_hash_table_create),
3207 (_bfd_generic_reloc_link_order): Likewise.
3208 * lynx-core.c (lynx_core_file_p): Likewise.
3209 * netbsd-core.c (netbsd_core_file_p): Likewise.
3210 * osf-core.c (osf_core_core_file_p): Likewise.
3211 * pdp11.c (some_aout_object_p, mkobject, make_empty_symbol),
3212 (link_hash_table_create, aout_link_write_other_symbol): Likewise.
3213 * peXXigen.c (_bfd_XX_bfd_copy_private_section_data): Likewise.
3214 * peicode.h (pe_mkobject): Likewise.
3215 * ppcboot.c (ppcboot_mkobject, ppcboot_canonicalize_symtab): Likewise.
3216 * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
3217 * sco5-core.c (read_uarea): Likewise.
3218 * som.c (hppa_som_gen_reloc_type, som_object_p, som_prep_headers),
3219 (som_write_fixups, som_write_space_strings, som_write_symbol_strings),
3220 (som_finish_writing, som_canonicalize_symtab, som_new_section_hook),
3221 (som_bfd_copy_private_section_data, bfd_som_set_section_attributes),
3222 (bfd_som_attach_aux_hdr, som_write_armap): Likewise.
3223 * srec.c (srec_scan): Likewise.
3224 * syms.c (_bfd_generic_make_empty_symbol): Likewise.
3225 * targets.c (bfd_target_list): Likewise.
3226 * tekhex.c (first_phase, tekhex_sizeof_headers): Likewise.
3227 * trad-core.c (trad_unix_core_file_p): Likewise.
3228 * vms-alpha.c (vms_initialize, alpha_vms_bfd_link_hash_table_create),
3229 (vms_new_section_hook): Likewise.
3230 * wasm-module.c (wasm_make_empty_symbol): Likewise.
3231 * xcofflink.c (xcoff_get_section_contents),
3232 (_bfd_xcoff_bfd_link_hash_table_create, xcoff_set_import_path),
3233 (xcoff_find_function, bfd_xcoff_link_record_set, xcoff_build_ldsym),
3234 (bfd_xcoff_size_dynamic_sections, xcoff_link_input_bfd): Likewise.
3236 2020-02-19 Alan Modra <amodra@gmail.com>
3238 * elfxx-riscv.c (riscv_multi_letter_ext_valid_p): Don't use C99.
3240 2020-02-13 H.J. Lu <hongjiu.lu@intel.com>
3242 * plugin.c (try_load_plugin): Make plugin_list_iter an argument
3243 and use it if it isn't NULL. Remove has_plugin_p argument. Add
3244 a build_list_p argument. Don't search plugin_list. Short circuit
3245 when building the plugin list.
3246 (has_plugin): Renamed to has_plugin_list.
3247 (bfd_plugin_set_plugin): Don't set has_plugin.
3248 (bfd_plugin_specified_p): Check plugin_list instead.
3249 (build_plugin_list): New function.
3250 (load_plugin): Call build_plugin_list and use plugin_list.
3252 2020-02-11 H.J. Lu <hongjiu.lu@intel.com>
3255 * plugin.c (try_claim): Always clean up for LTO wrapper.
3256 (try_load_plugin): Treat each object as independent. Create a
3257 copy for plugin name.
3259 2020-02-11 Nick Clifton <nickc@redhat.com>
3261 * elf32-msp430.c (msp430_final_link_relocate): Always use longs
3262 for addresses in print statements.
3263 (msp430_elf_relax_delete_bytes): Likewise.
3264 (msp430_elf_relax_add_words): Likewise.
3265 (msp430_elf_relax_section): Likewise.
3267 2020-02-11 H.J. Lu <hongjiu.lu@intel.com>
3269 * plugin.c (add_symbols): Clear plugin_data memory.
3271 2020-02-10 H.J. Lu <hongjiu.lu@intel.com>
3274 * configure.ac (HAVE_EXECUTABLE_SUFFIX): New AC_DEFINE.
3275 (EXECUTABLE_SUFFIX): Likewise.
3276 * config.in: Regenerated.
3277 * configure: Likewise.
3278 * plugin.c (bfd_plugin_close_and_cleanup): Removed.
3279 (plugin_list_entry): Add all_symbols_read, cleanup_handler,
3280 gcc, lto_wrapper, resolution_file, resolution_option, gcc_env,
3281 real_bfd, real_nsyms, real_syms, lto_nsyms and lto_syms.
3282 (get_lto_wrapper): New.
3283 (setup_lto_wrapper_env): Likewise.
3284 (current_plugin): Likewise.
3285 (register_all_symbols_read): Likewise.
3286 (register_cleanup): Likewise.
3287 (get_symbols): Likewise.
3288 (add_input_file): Likewise.
3289 (bfd_plugin_close_and_cleanup): Likewise.
3290 (claim_file): Removed.
3291 (register_claim_file): Set current_plugin->claim_file.
3292 (add_symbols): Make a copy of LTO symbols. Set lto_nsyms and
3293 lto_syms in current_plugin.
3294 (try_claim): Use current_plugin->claim_file. Call LTO plugin
3295 all_symbols_read handler. Copy real symbols to plugin_data.
3296 Call LTO plugin cleanup handler. Clean up for LTO wrapper.
3297 (try_load_plugin): Don't reuse the previous plugin for LTO
3298 wrapper. Set up GCC LTO wrapper if possible. Don't set
3299 plugin_list_iter->claim_file.
3300 (bfd_plugin_canonicalize_symtab): Use real LTO symbols if
3302 * plugin.h (plugin_data_struct): Add real_bfd, real_nsyms and
3305 2020-02-10 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3307 * elf32-msp430.c (msp430_elf_relax_section): Before relaxing a branch,
3308 check if previous instruction matches a conditional jump inserted
3309 earlier. Invert conditional jump and delete branch in this case.
3311 2020-02-10 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3313 * elf32-msp430.c (msp430_elf_relax_add_two_words): Rename to
3314 msp430_elf_relax_add_words. Support insertion of either one or two
3316 (msp430_elf_relax_section): Catch opcode of 0x3c00 when relocation
3317 needs to be grown. Handle insertion of branch instruction to replace
3320 2020-02-10 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3322 * elf32-msp430.c (msp430_final_link_relocate): Add printf statements for
3323 debugging relocations.
3324 (msp430_elf_relax_delete_bytes): Likewise.
3325 (msp430_elf_relax_add_two_words): Likewise.
3326 (msp430_elf_relax_section): Likewise.
3328 2020-02-10 Alan Modra <amodra@gmail.com>
3330 * archures.c: Wrap overlong z80 comments.
3331 * bfd-in2.h: Regenerate.
3333 2020-02-07 Sergey Belyashov <sergey.belyashov@gmail.com>
3336 * archures.c: Add GBZ80 and Z80N machine values.
3337 * reloc.c: Add BFD_RELOC_Z80_16_BE.
3338 * coff-z80.c: Add support for new reloc.
3339 * coffcode.h: Add support for new machine values.
3340 * cpu-z80.c: Add support for new machine names.
3341 * elf32-z80.c: Add support for new reloc.
3342 * bfd-in2.h: Regenerate.
3343 * libbfd.h: Regenerate.
3345 2020-02-07 Nick Clifton <nickc@redhat.com>
3348 * elf.c (rewrite_elf_program_header): Do not complain if no
3349 sections are mapped to a segment.
3351 2020-02-06 H.J. Lu <hongjiu.lu@intel.com>
3354 * elflink.c (_bfd_elf_gc_mark_extra_sections): Issue an error
3355 for garbage collection on __patchable_function_entries section
3356 without linked-to section.
3358 2020-02-06 H.J. Lu <hongjiu.lu@intel.com>
3361 * bfd-in2.h: Regenerated.
3362 * elflink.c (_bfd_elf_gc_mark_extra_sections): Call mark_hook
3363 on section if gc_mark of any of its linked-to sections is set
3364 and don't set gc_mark again.
3365 * section.c (asection): Add linked_to_symbol_name to map_head
3368 2020-02-06 Maciej W. Rozycki <macro@wdc.com>
3370 * elf32-v850.c (v850_elf_relax_section): Fix the index used for
3371 reporting an unrecognized instruction with R_V850_LONGJUMP.
3373 2020-02-05 Alan Modra <amodra@gmail.com>
3375 * elf64-ppc.c (ppc_stub_plt_branch): Match comment with reality.
3377 2020-02-04 Alan Modra <amodra@gmail.com>
3379 * elf32-ppc.c (ppc_elf_relocate_section): After applying
3380 R_PPC_VLE_ADDR20, goto copy_reloc.
3382 2020-02-02 H.J. Lu <hongjiu.lu@intel.com>
3384 * bfd-in2.h: Regenerated.
3385 * section.c (SEC_ASSEMBLER_SECTION_ID): Fix a typo in comments.
3387 2020-02-02 H.J. Lu <hongjiu.lu@intel.com>
3390 * bfd-in2.h: Regenerated.
3391 * ecoff.c (bfd_debug_section): Add section_id.
3392 * section.c (bfd_section): Add section_id.
3393 (SEC_ASSEMBLER_SECTION_ID): New.
3394 (BFD_FAKE_SECTION): Add section_id.
3396 2020-02-01 Nick Clifton <nickc@redhat.com>
3398 * config.bfd: Move the c30-aout and tic30-aout targets onto the
3401 2020-01-31 Sandra Loosemore <sandra@codesourcery.com>
3403 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): DW_EH_PE_datarel
3404 encodings are relative to the GOT on nios2, too.
3406 2020-01-31 Alan Modra <amodra@gmail.com>
3408 * Makefile.am (elf32-target.h, elf64-target.h): Don't use a temp
3409 file. Use $< and $@ in rules.
3410 (elf32-aarch64.c, elf64-aarch64.c): Likewise.
3411 (elf32-ia64.c, elf64-ia64.c): Likewise.
3412 (elf32-riscv.c, elf64-riscv.c): Likewise.
3413 (peigen.c, pepigen.c, pex64igen.c): Likewise.
3414 (elf32-aarch64.c, elf64-aarch64.c): Don't emit $srcdir on #line.
3415 (elf32-riscv.c, elf64-riscv.c): Likewise, and use $(SED).
3416 (elf32-ia64.c, elf64-ia64.c): Do emit #line.
3417 (peigen.c, pepigen.c, pex64igen.c): Likewise.
3418 * Makefile.in: Regenerate.
3420 2020-01-31 Alan Modra <amodra@gmail.com>
3423 * elf.c (setup_group): Don't clear entire section contents,
3424 just the padding after group flags. Release alloc'd memory
3425 after a seek or read failure.
3427 2020-01-16 Jon Turney <jon.turney@dronecode.org.uk>
3429 * peXXigen.c (pe_is_repro): New function.
3430 (_bfd_XX_print_private_bfd_data_common): Note timestamp is
3431 actually a build hash if PE_IMAGE_DEBUG_TYPE_REPRO is present.
3433 2020-01-16 Jon Turney <jon.turney@dronecode.org.uk>
3435 * peXXigen.c (debug_type_names): Add names for new debug data type
3438 2020-01-16 Jon Turney <jon.turney@dronecode.org.uk>
3440 * peXXigen.c (pe_print_debugdata): Fix the iteration variable for
3441 inner loop. Fix a memory leak.
3443 2020-01-30 Alan Modra <amodra@gmail.com>
3445 * coffgen.c (coff_real_object_p): Don't clear obj_coff_keep_syms
3446 or obj_coff_keep_strings here.
3447 (coff_get_normalized_symtab): Free external syms directly.
3448 * xcofflink.c (xcoff_link_input_bfd): Restore obj_coff_keep_syms
3451 2020-01-27 Jim Wilson <jimw@sifive.com>
3453 * cpu-riscv.c (riscv_scan): New.
3454 (N): Change bfd_default_scan to riscv_scan.
3456 2020-01-27 Andreas Schwab <schwab@suse.de>
3458 * Makefile.am (ALL_MACHINES): Remove cpu-plugin.lo.
3459 (ALL_MACHINES_CFILES): Remove cpu-plugin.c.
3460 * Makefile.in: Regenerate.
3461 * cpu-plugin.c: Remove.
3462 * archures.c (enum bfd_architecture): Remove bfd_arch_plugin.
3463 (bfd_plugin_arch): Remove declaration.
3464 * bfd-in2.h: Regenerate.
3465 * po/SRC-POTFILES.in: Regenerate.
3467 2020-01-27 H.J. Lu <hongjiu.lu@intel.com>
3468 Alan Modra <amodra@gmail.com>
3471 * elflink.c (_bfd_elf_gc_mark_rsec): Mark all weak aliases.
3473 2020-01-24 Jim Wilson <jimw@sifive.com>
3475 * elfxx-riscv.c (riscv_get_prefix_class): Format s case like others.
3476 (riscv_parse_prefixed_ext): Fix s extension comment and reword to
3477 avoid over long line.
3479 2020-01-24 Nick Clifton <nickc@redhat.com>
3482 * coffgen.c (_bfd_coff_close_and_cleanup): Do not clear the keep
3483 syms and keep strings flags as these may have been set in order to
3484 prevent a bogus call to free.
3486 2020-01-23 Nick Clifton <nickc@redhat.com>
3488 * po/fr.po: Updated French translation.
3490 2020-01-23 Alan Modra <amodra@gmail.com>
3493 * elf.c (assign_file_positions_for_load_sections): Avoid divide
3494 by zero when p_align is zero.
3496 2020-01-22 Maxim Blinov <maxim.blinov@embecosm.com>
3498 * bfd/elfnn-riscv.c (riscv_skip_prefix): New.
3499 (riscv_prefix_cmp): Likewise.
3500 (riscv_non_std_ext_p): Deleted.
3501 (riscv_std_sv_ext_p): Likewise.
3502 (riscv_non_std_sv_ext_p): Likewise.
3503 (riscv_merge_non_std_and_sv_ext): Rename to...
3504 (riscv_merge_multi_letter_ext): and modified to use riscv_prefix_cmp.
3505 (riscv_merge_arch_attr_info): Replace 3 calls to
3506 riscv_merge_non_std_and_sv_ext with single call to
3507 riscv_merge_multi_letter_ext.
3508 * bfd/elfxx-riscv.c (riscv_parse_std_ext): Break if we
3509 encounter a 'z' prefix.
3510 (riscv_get_prefix_class): New function, return prefix class based
3511 on first few characters of input string.
3512 (riscv_parse_config): New structure to factor out minor differences
3513 in extension class parsing behaviour.
3514 (riscv_parse_sv_or_non_std_ext): Rename to...
3515 (riscv_parse_prefixed_ext): and parameterise with
3517 (riscv_std_z_ext_strtab, riscv_std_s_ext_strtab): New.
3518 (riscv_multi_letter_ext_valid_p): New.
3519 (riscv_ext_x_valid_p, riscv_ext_z_valid_p, riscv_ext_s_valid_p): New.
3520 (riscv_parse_subset): Delegate all non-single-letter parsing work
3521 to riscv_parse_prefixed_ext.
3522 * bfd/elfxx-riscv.h (riscv_isa_ext_class): New type.
3523 (riscv_get_prefix_class): Declare.
3525 2020-01-22 Alan Modra <amodra@gmail.com>
3527 * elf64-ppc.c (struct ppc_link_hash_table): Add tga_group.
3528 (ppc64_elf_archive_symbol_lookup): Extract __tls_get_addr_opt for
3529 __tls_get_addr_desc.
3530 (ppc64_elf_size_stubs): Add section for linker generated
3531 __tls_get_addr_desc wrapper function. Loop at least once if
3532 generating this function.
3533 (emit_tga_desc, emit_tga_desc_eh_frame): New functions.
3534 (ppc64_elf_build_stubs): Generate __tls_get_addr_desc.
3536 2020-01-22 Alan Modra <amodra@gmail.com>
3538 * elf64-ppc.h (struct ppc64_elf_params): Add no_tls_get_addr_regsave.
3539 * elf64-ppc.c (struct ppc_link_hash_table): Add tga_desc and
3541 (is_tls_get_addr): Match tga_desc and tga_desc_df too.
3542 (STDU_R1_0R1, ADDI_R1_R1): Define.
3543 (tls_get_addr_prologue, tls_get_addr_epilogue): New functions.
3544 (ppc64_elf_tls_setup): Set up tga_desc and tga_desc_fd. Indirect
3545 tga_desc_fd to opt_fd, and tga_desc to opt. Set
3546 no_tls_get_addr_regsave.
3547 (branch_reloc_hash_match): Add hash3 and hash4.
3548 (ppc64_elf_tls_optimize): Handle tga_desc_fd and tga_desc too.
3549 (ppc64_elf_size_dynamic_sections): Likewise.
3550 (ppc64_elf_relocate_section): Likewise.
3551 (plt_stub_size, build_plt_stub): Likewise. Size regsave
3552 __tls_get_addr stub.
3553 (build_tls_get_addr_stub): Build regsave __tls_get_addr stub and
3555 (ppc_size_one_stub): Handle tga_desc_fd and tga_desc too. Size
3556 eh_frame for regsave __tls_get_addr.
3558 2020-01-22 Alan Modra <amodra@gmail.com>
3560 * elf64-ppc.c (ppc64_elf_size_stubs): Correct condition under
3561 which __tls_get_addr calls will be eliminated.
3563 2020-01-20 Nick Clifton <nickc@redhat.com>
3565 * po/pt.po: Updates Portuguese translation.
3566 * po/ru.po: Updated Russian translation.
3567 * po/uk.po: Updated Ukranian translation.
3569 2020-01-20 H.J. Lu <hongjiu.lu@intel.com>
3572 * elf64-x86-64.c (elf_x86_64_check_tls_transition): Support
3573 "rex leal x@tlsdesc(%rip), %reg" and "call *x@tlsdesc(%eax)" in
3575 (elf_x86_64_relocate_section): In x32 mode, for GDesc -> LE
3576 transition, relax "rex leal x@tlsdesc(%rip), %reg" to
3577 "rex movl $x@tpoff, %reg", for GDesc -> IE transition, relax
3578 "rex leal x@tlsdesc(%rip), %reg" to
3579 "rex movl x@gottpoff(%rip), %eax". For both transitions, relax
3580 "call *(%eax)" to "nopl (%rax)".
3582 2020-01-20 Alan Modra <amodra@gmail.com>
3584 * elf64-ppc.c (LD_R11_0R3, CMPDI_R11_0, STD_R11_0R1, LD_R11_0R1),
3585 (MTLR_R11): Don't define.
3586 (LD_R0_0R3, CMPDI_R0_0): Define.
3587 (build_tls_get_addr_stub): Don't use r11 in stub.
3589 2020-01-20 Alan Modra <amodra@gmail.com>
3591 * elf64-ppc.c (ppc_elf_hash_entry): New function, use throughout file.
3592 (defined_sym_val, is_tls_get_addr): Likewise.
3594 2020-01-18 Nick Clifton <nickc@redhat.com>
3596 * version.m4 (BFD_VERSION): Set to 2.34.50.
3597 * configure: Regenerate.
3598 * po/bfd.pot: Regenerate.
3600 2020-01-18 Nick Clifton <nickc@redhat.com>
3602 Binutils 2.34 branch created.
3604 2020-01-17 Christian Biesinger <cbiesinger@google.com>
3606 * coff-arm.c: Fix spelling error (seperate).
3607 * elfxx-riscv.c (riscv_parse_sv_or_non_std_ext): Fix spelling
3609 * sysdep.h (strnlen): Fix spelling error (seperate).
3611 2020-01-15 Lars Brinkhoff <lars@nocrew.org>
3614 * pdp11.c (TARGET_PAGE_SIZE): Set to 8192.
3616 2020-01-15 Alan Modra <amodra@gmail.com>
3619 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Update comment.
3620 (ppc64_elf_adjust_dynamic_symbol): Don't allow .dynbss copies
3621 of function symbols unless dot symbols are present. Do warn
3622 whenever one is created, regardles of whether a PLT entry is
3623 also emitted for the function symbol.
3625 2020-01-14 Alan Modra <amodra@gmail.com>
3627 * som.c (som_bfd_count_ar_symbols): Error when file position
3628 of symbols on chains is not strictly increasing.
3630 2020-01-14 Alan Modra <amodra@gmail.com>
3632 * vms.h (VMS_DEBUG): Define as 0.
3633 * vms-alpha.c (image_write): Move debug output after bounds check.
3635 (_bfd_vms_slurp_eihd): Warning fix.
3636 (_bfd_vms_slurp_etir): Init variables to avoid bogus warnings.
3638 2020-01-13 Alan Modra <amodra@gmail.com>
3640 * vms-alpha.c (_bfd_vms_slurp_egsd): Ensure minimum size even
3641 for "ignored" records.
3643 2020-01-13 Alan Modra <amodra@gmail.com>
3645 * wasm-module.c (wasm_scan_name_function_section): Formatting.
3646 Delete asect name check. Move asect NULL check to wasm_object_p.
3647 Correct bounds check of sizes against end. Replace uses of
3648 bfd_zalloc with bfd_alloc, zeroing only necessary bytes. Use
3649 just one bfd_release.
3650 (wasm_scan): Don't use malloc/strdup for section names,
3651 bfd_alloc instead. Simplify code prefixing section name.
3652 Formatting. Don't attempt to free memory here..
3653 (wasm_object_p): ..do so here.
3655 2020-01-10 Szabolcs Nagy <szabolcs.nagy@arm.com>
3658 * elf32-arm.c (elf32_arm_final_link_relocate): Use
3659 UNDEFWEAK_NO_DYNAMIC_RELOC.
3660 (allocate_dynrelocs_for_symbol): Likewise.
3662 2020-01-10 Tamar Christina <tamar.christina@arm.com>
3665 * elfnn-aarch64.c (_bfd_aarch64_create_stub_section): Remove elfclass.
3667 2020-01-10 Alan Modra <amodra@gmail.com>
3669 * coff-alpha.c (alpha_ecoff_object_p): Calculate size in bfd_size_type.
3671 2020-01-09 Nick Clifton <nickc@redhat.com>
3674 * bfd.c (bfd_convert_section_contents): Check for a compress
3675 header size that is larger than the actual section size.
3677 2020-01-08 Alan Modra <amodra@gmail.com>
3680 * elflink.c (bfd_elf_final_link): Call _bfd_fix_excluded_sec_syms
3681 after removing sections.
3683 2020-01-06 Jim Wilson <jimw@sifive.com>
3686 * elfnn-riscv.c (riscv_elf_relocate_section) <R_RISCV_CALL>: Add
3687 check for !bfd_link_pic (info).
3688 <R_RISCV_CALL_PLT>: Move next to R_RISCV_CALL.
3689 <R_RISCV_JAL>: Add comment.
3690 (_bfd_riscv_relax_section): For plt.offset check, add check for
3691 bfd_link_pic (info). Add comment.
3693 2020-01-06 Alan Modra <amodra@gmail.com>
3695 * format.c (bfd_check_format_matches): Ignore bfd_error on target
3696 match failures. Don't init to bfd_error_wrong_format before
3697 calling _bfd_check_format.
3699 2020-01-06 Alan Modra <amodra@gmail.com>
3701 * vms-alpha.c (_bfd_vms_push, _bfd_vms_pop): Return pass/fail
3702 status rather than exiting on stack overflow or underflow.
3703 (_bfd_vms_slurp_etir): Adjust to suit.
3705 2020-01-06 Alan Modra <amodra@gmail.com>
3707 * som.c (som_bfd_fill_in_ar_symbols): Bounds check som_dict index.
3709 2020-01-06 Alan Modra <amodra@gmail.com>
3711 * mach-o.c (bfd_mach_o_read_dylinker): Don't read past end of
3712 command. Check name offset is within command.
3713 (bfd_mach_o_read_dylib, bfd_mach_o_read_prebound_dylib),
3714 (bfd_mach_o_read_prebind_cksum, bfd_mach_o_read_twolevel_hints),
3715 (bfd_mach_o_read_fvmlib, bfd_mach_o_read_dysymtab),
3716 (bfd_mach_o_read_symtab, bfd_mach_o_read_uuid),
3717 (bfd_mach_o_read_linkedit, bfd_mach_o_read_str),
3718 (bfd_mach_o_read_dyld_info, bfd_mach_o_read_version_min),
3719 (bfd_mach_o_read_encryption_info, bfd_mach_o_read_source_version),
3720 (bfd_mach_o_read_encryption_info_64, bfd_mach_o_read_main),
3721 (bfd_mach_o_read_note, bfd_mach_o_read_build_version),
3722 (bfd_mach_o_read_segment): Similarly.
3723 (bfd_mach_o_read_thread): Properly bound check thread struct.
3724 Don't repeat checks on second loop.
3725 (bfd_mach_o_read_command): Fail on invalid command length.
3727 2020-01-04 Alan Modra <amodra@gmail.com>
3729 * format.c (bfd_check_format_matches): Add preserve_match.
3730 Save initial bfd state in "preserve", matched bfd state in
3731 "preserve_match". Save just the first match. Release
3732 bfd_alloc memory. Restore and finish preserved state as
3733 appropriate on all function exit paths.
3735 2020-01-04 Alan Modra <amodra@gmail.com>
3737 * mmo.c (mmo_mkobject): Allocate tdata with bfd_zalloc.
3739 2020-01-04 Alan Modra <amodra@gmail.com>
3741 * coffgen.c (coff_real_object_p): Free malloc'd memory on target
3744 2020-01-03 Nick Clifton <nickc@redhat.com>
3747 (bfd_pef_parse_function_stubs): Correct the test that ensures that
3748 there is enough data remaining in the code buffer before
3749 attempting to read a function stub.
3751 2020-01-03 Nick Clifton <nickc@redhat.com>
3754 * elf-properties.c (_bfd_elf_convert_gnu_properties): Check the
3755 return value from bfd_malloc.
3756 * elf32-arm.c (bfd_elf32_arm_vfp11_fix_veneer_locations): Likewise.
3757 (bfd_elf32_arm_stm32l4xx_fix_veneer_locations): Likewise.
3758 (elf32_arm_filter_cmse_symbols): Likewise.
3759 (elf32_arm_write_section): Likewise.
3760 * mach-o.c (bfd_mach_o_core_fetch_environment): Likewise.
3761 (bfd_mach_o_follow_dsym): Likewise.
3762 * pef.c (bfd_pef_print_loader_section): Likewise.
3763 (bfd_pef_scan_start_address): Likewise.
3764 (bfd_pef_parse_function_stubs): Likewise.
3765 (bfd_pef_parse_symbols): Likewise.
3767 2020-01-03 Sergei Trofimovich <siarheit@google.com>
3769 * elfnn-ia64.c (elfNN_ia64_merge_private_bfd_data): don't fail
3770 on binary inputs ld/PR25316.
3771 (is_ia64_elf): new helper to filter on ia64 objects.
3773 2020-01-03 Jan Beulich <jbeulich@suse.com>
3775 * mach-o.c (cpusubtype, bfd_mach_o_header_p): Insert underscore
3777 (bfd_mach_o_scan): Insert underscore in two variable names.
3779 2020-01-02 Sergey Belyashov <sergey.belyashov@gmail.com>
3781 * Makefile.am: Add z80-elf target support.
3782 * configure.ac: Likewise.
3783 * targets.c: Likewise.
3784 * Makefile.in: Regenerate.
3785 * configure: Regenerate.
3786 * config.bfd: Add z80-elf target support and new arches: ez80 and
3788 * elf32-z80.c: New file.
3789 * archures.c: Add new z80 architectures: eZ80 and Z180.
3790 * coffcode.h: Likewise.
3791 * cpu-z80.c: Likewise.
3792 * coff-z80.c: Add new relocations for Z80 target and local label
3794 * reloc.c: Add new relocs.
3795 * bfd-in2.h: Regenerate.
3796 * libbfd.h: Regenerate.
3798 2020-01-02 Tamar Christina <tamar.christina@arm.com>
3802 * elfnn-aarch64.c (_bfd_aarch64_create_stub_section): Set ELF class.
3804 2020-01-01 Alan Modra <amodra@gmail.com>
3806 Update year range in copyright notice of all files.
3808 For older changes see ChangeLog-2019
3810 Copyright (C) 2020 Free Software Foundation, Inc.
3812 Copying and distribution of this file, with or without modification,
3813 are permitted in any medium without royalty provided the copyright
3814 notice and this notice are preserved.
3820 version-control: never