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