1 2020-06-30 H.J. Lu <hongjiu.lu@intel.com>
3 * archures.c (bfd_mach_i386_nacl): Removed.
4 (bfd_mach_i386_i386_nacl): Likewise.
5 (bfd_mach_x86_64_nacl): Likewise.
6 (bfd_mach_x64_32_nacl): Likewise.
7 * config.bfd: Remove *-*-nacl* targets.
8 * configure.ac: Remove x86 NaCl target vectors.
9 * cpu-i386.c (bfd_arch_i386_onebyte_nop_fill): Removed.
10 (bfd_x64_32_nacl_arch): Likewise.
11 (bfd_x86_64_nacl_arch): Likewise.
12 (bfd_i386_nacl_arch): Likewise.
13 (bfd_x64_32_arch_intel_syntax): Updated.
14 * elf32-i386.c: Don't include "elf-nacl.h".
15 (elf_i386_nacl_plt): Removed.
16 (elf_i386_nacl_plt0_entry): Likewise.
17 (elf_i386_nacl_plt_entry): Likewise.
18 (elf_i386_nacl_pic_plt0_entry): Likewise.
19 (elf_i386_nacl_pic_plt_entry): Likewise.
20 (elf_i386_nacl_eh_frame_plt): Likewise.
21 (elf_i386_nacl_plt): Likewise.
22 (elf32_i386_nacl_elf_object_p): Likewise.
23 (elf_i386_get_synthetic_symtab): Updated.
24 (elf_i386_link_setup_gnu_properties): Likewise.
25 * elf64-x86-64.c: Don't include "elf-nacl.h".
26 (elf_x86_64_nacl_plt): Removed.
27 (elf64_x86_64_nacl_elf_object_p): Likewise.
28 (elf_x86_64_nacl_plt0_entry): Likewise.
29 (elf_x86_64_nacl_plt_entry): Likewise.
30 (elf_x86_64_nacl_eh_frame_plt): Likewise.
31 (elf_x86_64_nacl_plt): Likewise.
32 (elf32_x86_64_nacl_elf_object_p): Likewise.
33 (elf_x86_64_get_synthetic_symtab): Updated.
34 (elf_x86_64_link_setup_gnu_properties): Likewise.
35 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
36 * targets.c: Remove x86 NaCl target vectors.
37 * bfd-in2.h: Regenerated.
38 * configure: Likewise.
40 2020-06-29 H.J. Lu <hongjiu.lu@intel.com>
42 * elf32-tic6x.c (elf32_tic6x_size_dynamic_sections): Call
43 _bfd_elf_add_dynamic_tags.
45 2020-06-29 Alan Modra <amodra@gmail.com>
47 * peXXigen.c (_bfd_XXi_slurp_codeview_record): Properly check
48 return value of bfd_bread. Don't read more than requested length.
49 Sanity check length. Properly terminate file name.
51 2020-06-29 Alan Modra <amodra@gmail.com>
53 * arc-got.h: Use C style comments.
54 * coff-z80.c: Likewise.
55 * elf32-csky.c: Likewise.
56 * peXXigen.c: Likewise.
57 * elf32-m32c.c (m32c_elf_relax_delete_bytes): Remove commented out
60 2020-06-26 Pat Bernardi <bernardi@adacore.com>
62 * elf32-m68k.c (m68k_elf_merge_obj_attributes): New function.
63 (elf32_m68k_merge_private_bfd_data): Merge GNU attributes.
65 2020-06-26 Alan Modra <amodra@gmail.com>
67 * elfxx-riscv.c (struct priv_spec_t, priv_specs),
68 (riscv_get_priv_spec_class, riscv_get_priv_spec_class_from_numbers),
69 (riscv_get_priv_spec_name): Move to..
70 * cpu-riscv.c: ..here.
71 (riscv_get_priv_spec_class_from_numbers): Don't xmalloc temp buffer.
72 Use %u to print unsigned numbers.
74 2020-06-24 Andrew Burgess <andrew.burgess@embecosm.com>
76 * cpu-riscv.c (riscv_scan): Don't allow shorter matches using the
79 2020-06-24 H.J. Lu <hongjiu.lu@intel.com>
82 * elf32-csky.c (csky_elf_size_dynamic_sections): Call
83 _bfd_elf_add_dynamic_tags.
85 2020-06-24 H.J. Lu <hongjiu.lu@intel.com>
88 * elf32-cris.c (elf_cris_size_dynamic_sections): Call
89 _bfd_elf_add_dynamic_tags.
91 2020-06-24 Alan Modra <amodra@gmail.com>
93 * vms-alpha.c (_bfd_vms_slurp_etir <ETIR__C_OPR_ASH>): Implement
94 shifts without undefined behaviour.
96 2020-06-23 H.J. Lu <hongjiu.lu@intel.com>
98 * elf-bfd.h (elf_link_hash_table): Add dt_pltgot_required and
100 (_bfd_elf_add_dynamic_tags): New.
101 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Call
102 _bfd_elf_add_dynamic_tags.
103 * elf32-arc.c (elf_arc_size_dynamic_sections): Likewise.
104 * elf32-bfin.c (elf32_bfinfdpic_size_dynamic_sections): Likewise.
105 * elf32-cr16.c (_bfd_cr16_elf_size_dynamic_sections): Likewise.
106 * elf32-frv.c (elf32_frvfdpic_size_dynamic_sections): Likewise.
107 * elf32-lm32.c (lm32_elf_size_dynamic_sections): Likewise.
108 * elf32-m32r.c (m32r_elf_size_dynamic_sections): Likewise.
109 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
110 * elf32-microblaze.c (microblaze_elf_size_dynamic_sections):
112 * elf32-nds32.c (nds32_elf_size_dynamic_sections): Likewise.
113 * elf32-nios2.c (nios2_elf32_size_dynamic_sections): Likewise.
114 * elf32-or1k.c (or1k_elf_size_dynamic_sections): Likewise.
115 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
116 * elf32-tilepro.c (tilepro_elf_size_dynamic_sections): Likewise.
117 * elf32-vax.c (elf_vax_size_dynamic_sections): Likewise.
118 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
119 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
120 * elfnn-aarch64.c (elfNN_aarch64_size_dynamic_sections):
122 * elfnn-riscv.c (riscv_elf_size_dynamic_sections): Likewise.
123 * elfxx-tilegx.c (tilegx_elf_size_dynamic_sections): Likewise.
124 * elf32-arm.c (elf32_arm_size_dynamic_sections): Call
125 _bfd_elf_maybe_vxworks_add_dynamic_tags.
126 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
127 * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections):
129 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Likewise.
130 (_bfd_x86_elf_size_dynamic_sections): Likewise.
131 * elfxx-x86.h (elf_x86_link_hash_table): Remove dt_reloc,
132 dt_reloc_sz and dt_reloc_ent.
133 * elf-vxworks.c (_bfd_elf_maybe_vxworks_add_dynamic_tags): New.
134 * elf-vxworks.h (_bfd_elf_maybe_vxworks_add_dynamic_tags):
136 * elf32-hppa.c (elf32_hppa_link_hash_table_create): Set
137 etab.dt_pltgot_required.
138 (elf32_hppa_size_dynamic_sections): Call
139 _bfd_elf_add_dynamic_tags.
140 * elf32-metag.c (elf_metag_link_hash_table_create): Set
141 etab.dt_pltgot_required.
142 (elf_metag_size_dynamic_sections): Call _bfd_elf_add_dynamic_tags.
143 * elf32-sh.c (sh_elf_link_hash_table_create): Set
144 root.dt_pltgot_required for FDPIC output.
145 (sh_elf_size_dynamic_sections): Call
146 _bfd_elf_maybe_vxworks_add_dynamic_tags.
147 * elf32-xtensa.c (elf_xtensa_link_hash_table_create): Set
148 elf.dt_pltgot_required.
149 (elf_xtensa_size_dynamic_sections): Call
150 _bfd_elf_add_dynamic_tags.
151 * elf64-hppa.c (elf64_hppa_hash_table_create): Set
152 root.dt_pltgot_required.
153 (elf64_hppa_size_dynamic_sections): Call
154 _bfd_elf_add_dynamic_tags.
155 * elfnn-ia64.c (elfNN_ia64_hash_table_create): Set
156 root.dt_pltgot_required.
157 (elfNN_ia64_size_dynamic_sections): Set root.dt_jmprel_required
158 for rel_pltoff_sec. Call _bfd_elf_add_dynamic_tags.
159 * elflink.c (_bfd_elf_add_dynamic_tags): New.
161 2020-06-22 Saagar Jha <saagar@saagarjha.com>
163 * mach-o.c: Support the new load commands by reading a linkedit
164 data command for them.
166 2020-06-22 Nelson Chu <nelson.chu@sifive.com>
168 * elfxx-riscv.c (struct priv_spec_t priv_specs[]): Move them from
169 opcodes/riscv-opc.c to bfd/elfxx-riscv.c, since we need it in linker.
170 (riscv_get_priv_spec_class): Likewise.
171 (riscv_get_priv_spec_name): Likewise.
172 (riscv_get_priv_spec_class_from_numbers): New function, convert
173 the version numbers into string, then call riscv_get_priv_spec_class
174 to get the priv spec class.
175 * elfxx-riscv.h (riscv_get_priv_spec_class): Move forward declaration
176 from include/opcode/riscv.h to bfd/elfxx-riscv.h.
177 (riscv_get_priv_spec_name): Likewise.
178 (riscv_get_priv_spec_class_from_numbers): New forward declaration.
179 (opcode/riscv.h): Include it in the header rather than elfxx-riscv.c.
180 * elfnn-riscv.c (riscv_merge_attributes): Get the priv spec classes
181 of input and output objects form their priv spec attributes by
182 riscv_get_priv_spec_class_from_numbers. Report warning rather than
183 errors when linking objects with differnet priv spec versions. We do
184 know v1.9.1 may have conflicts to other versions, so report the
185 warning, too. After that, update the output priv spec version to the
188 2020-06-22 Nelson Chu <nelson.chu@sifive.com>
190 * elfnn-riscv.c (riscv_merge_attributes): Once we meet one of the
191 priv attributes, we will check the conflicts for all of them (major,
192 minor and revision), and then set the priv_attrs_merged to TRUE to
193 indicate that we have handled all of the priv attributes. Remove
194 the unused boolean priv_may_conflict, in_priv_zero and out_priv_zero.
196 2020-06-21 Alan Modra <amodra@gmail.com>
199 * configure.ac: Disable plugins by default for some targets.
200 * plugin.c: Comment typo fix.
201 * configure: Regenerate.
203 2020-06-19 Nick Clifton <nickc@redhat.com>
205 * plugin.c (try_load_plugin): Suppress the error message about
206 being unable to open a plugin if creating a list of viable
209 2020-06-16 Alan Modra <amodra@gmail.com>
211 * aout-tic30.c: Delete file.
212 * Makefile.am (BFD32_BACKENDS): Remove aout-tic30.lo.
213 (BFD32_BACKENDS_CFILES): Remove aout-tic30.c.
214 * config.bfd (c30-*-*aout*, tic30-*-*aout*): Remove entry.
215 (xc16x-*-elf): Sort properly.
216 * configure.ac: Remove tic30_aout_vec.
217 * targets.c: Likewise.
218 * Makefile.in: Regenerate.
219 * configure: Regenerate.
220 * po/SRC-POTFILES.in: Regenerate.
222 2020-06-15 Max Filippov <jcmvbkbc@gmail.com>
224 * elf32-xtensa.c (XSHAL_ABI, XTHAL_ABI_UNDEFINED)
225 (XTHAL_ABI_WINDOWED, XTHAL_ABI_CALL0): New macros.
226 (elf32xtensa_abi): New global variable.
227 (xtensa_abi_choice): New function.
228 (elf_xtensa_create_plt_entry): Use xtensa_abi_choice instead of
229 XSHAL_ABI to select PLT code.
231 2020-06-15 Roland McGrath <mcgrathr@google.com>
233 * elflink.c (bfd_elf_define_start_stop): Use start_stop_visibility
234 field of bfd_link_info.
236 2020-06-15 Alan Modra <amodra@gmail.com>
238 * config.bfd: Obsolete powerpcle-*-pe targets.
240 2020-06-15 Alan Modra <amodra@gmail.com>
243 * elflink.c (elf_link_add_archive_symbols): Exclude undefined
244 symbols that were defined in discarded sections.
245 * cofflink.c (coff_link_check_archive_element): Likewise.
246 (coff_link_add_symbols): Set indx to -3 for symbols defined in
248 (_bfd_coff_write_global_sym): Don't emit such symbols.
249 libcoff-in.h (struct coff_link_hash_entry): Update indx comment.
250 libcoff.h: Regenerate.
252 2020-06-11 Alan Modra <amodra@gmail.com>
255 * pdp11.c (is_stab): Replace legacy "index" function with "strchr".
257 2020-06-10 H.J. Lu <hongjiu.lu@intel.com>
259 * elfnn-ia64.c (elfNN_ia64_link_hash_table): Remove reltext.
260 (allocate_dynrel_entries): Set DF_TEXTREL instead of reltext.
261 (elfNN_ia64_size_dynamic_sections): Check DF_TEXTREL instead
264 2020-06-10 H.J. Lu <hongjiu.lu@intel.com>
267 * elflink.c (bfd_elf_define_start_stop): Handle common symbols.
268 Clear verinfo.verdef.
270 2020-06-09 H.J. Lu <hongjiu.lu@intel.com>
273 * elf-bfd.h (elf_link_hash_table): Add ifunc_resolvers.
274 (_bfd_elf_allocate_ifunc_dyn_relocs): Remove the
275 bfd_boolean * argument. Set ifunc_resolvers if there are IFUNC
277 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Updated.
278 Set ifunc_resolvers if there are FUNC resolvers.
279 * elf64-ppc.c (ppc_link_hash_table): Remove local_ifunc_resolver.
280 (build_global_entry_stubs_and_plt): Replace local_ifunc_resolver
281 with elf.ifunc_resolvers.
282 (write_plt_relocs_for_local_syms): Likewise.
283 (ppc64_elf_relocate_section): Likewise.
284 (ppc64_elf_finish_dynamic_sections): Likewise.
285 * elfnn-aarch64.c (elfNN_aarch64_allocate_ifunc_dynrelocs):
287 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Likewise.
288 (_bfd_x86_elf_size_dynamic_sections): Check elf.ifunc_resolvers
289 instead of readonly_dynrelocs_against_ifunc.
290 * elfxx-x86.h (elf_x86_link_hash_table): Remove
291 readonly_dynrelocs_against_ifunc.
293 2020-06-09 Alan Modra <amodra@gmail.com>
295 * elf64-ppc.c (struct ppc_link_hash_table): Delete
296 maybe_local_ifunc_resolver field.
297 (build_global_entry_stubs_and_plt): Set local_ifunc_resolver in
298 cases where maybe_local_ifunc_resolver was set.
299 (ppc64_elf_relocate_section): Likewise.
300 (ppc64_elf_finish_dynamic_sections): Downgrade ifunc with textrel
303 2020-06-08 H.J. Lu <hongjiu.lu@intel.com>
305 * elf-bfd.h (elf_link_hash_entry): Add tlsdesc_plt and
307 * elf32-arm.c (elf32_arm_link_hash_table): Remove tlsdesc_plt
309 (elf32_arm_size_dynamic_sections): Updated. Clear
310 root.tlsdesc_plt for DF_BIND_NOW.
311 (elf32_arm_finish_dynamic_sections): Updated.
312 (elf32_arm_output_arch_local_syms): Likewise.
313 * elf32-nds32.c (nds32_elf_size_dynamic_sections): Updated.
314 Clear root.tlsdesc_plt for DF_BIND_NOW.
315 (nds32_elf_finish_dynamic_sections): Updated.
316 * elf32-nds32.h (elf_nds32_link_hash_table): Remove
317 dt_tlsdesc_plt and dt_tlsdesc_got.
318 * elf64-x86-64.c (elf_x86_64_finish_dynamic_sections): Updated.
319 * elfnn-aarch64.c (elf_aarch64_link_hash_table): Remove
320 tlsdesc_plt and dt_tlsdesc_got.
321 (elfNN_aarch64_allocate_dynrelocs): Updated.
322 (elfNN_aarch64_finish_dynamic_sections): Likewise.
323 (elfNN_aarch64_size_dynamic_sections): Updated. Clear
324 root.tlsdesc_plt for DF_BIND_NOW. Don't check DF_BIND_NOW
326 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Updated.
327 (_bfd_x86_elf_size_dynamic_sections): Likewise.
328 (_bfd_x86_elf_finish_dynamic_sections): Likewise.
329 * elfxx-x86.h (elf_x86_link_hash_table): Remove tlsdesc_plt and
332 2020-06-07 H.J. Lu <hongjiu.lu@intel.com>
334 * elf32-tic6x.c (elf32_bed): Defined the default to
337 2020-06-07 H.J. Lu <hongjiu.lu@intel.com>
339 * elf64-hppa.c (elf64_hppa_link_hash_table): Remove plt_sec and
341 (elf64_hppa_check_relocs): Replace plt_sec/plt_rel_sec with
342 root.splt/root.srelplt.
343 (elf64_hppa_create_dynamic_sections): Likewise.
344 (elf64_hppa_size_dynamic_sections): Likewise.
345 (elf64_hppa_finish_dynamic_symbol): Likewise.
346 (elf_hppa_final_link): Likewise.
347 (elf_hppa_final_link_relocate): Likewise.
349 2020-06-06 H.J. Lu <hongjiu.lu@intel.com>
351 * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Updated.
352 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Remove
355 2020-06-06 H.J. Lu <hongjiu.lu@intel.com>
357 * elf-bfd.h (elf_target_os): New.
358 (elf_link_hash_table): Add target_os.
359 (elf_backend_data): Add target_os.
360 * elf32-arm.c (elf32_arm_link_hash_table): Remove vxworks_p,
361 symbian_p and nacl_p.
362 (create_got_section): Updated.
363 (elf32_arm_create_dynamic_sections): Likewise.
364 (arm_type_of_stub): Likewise.
365 (elf32_arm_create_or_find_stub_sec): Likewise.
366 (elf32_arm_allocate_plt_entry): Likewise.
367 (elf32_arm_populate_plt_entry): Likewise.
368 (elf32_arm_final_link_relocate): Likewise.
369 (elf32_arm_check_relocs): Likewise.
370 (allocate_dynrelocs_for_symbol): Likewise.
371 (elf32_arm_finish_dynamic_symbol): Likewise.
372 (elf32_arm_finish_dynamic_sections): Likewise.
373 (elf32_arm_output_plt_map_1): Likewise.
374 (elf32_arm_output_arch_local_syms): Likewise.
375 (elf32_arm_add_symbol_hook): Likewise.
376 (elf32_arm_nacl_link_hash_table_create): Likewise.
377 (elf32_arm_vxworks_link_hash_table_create): Likewise.
378 (elf32_arm_symbian_link_hash_table_create): Likewise.
379 (ELF_TARGET_OS): New.
380 * elf32-i386.c (elf_i386_arch_bed): Removed.
381 (elf_backend_arch_data): Likewise.
382 (elf_i386_solaris_arch_bed): Likewise.
383 (elf_i386_nacl_arch_bed): Likewise.
384 (elf_i386_vxworks_arch_bed): Likewise.
385 (elf_i386_relocate_section): Updated.
386 (elf_i386_finish_dynamic_sections): Likewise.
387 (elf_i386_get_synthetic_symtab): Likewise.
388 (elf_i386_link_setup_gnu_properties): Likewise.
389 (ELF_TARGET_OS): New.
390 * elf32-mips.c (ELF_TARGET_OS): New.
391 * elf32-ppc.c (ppc_elf_link_hash_table): Remove is_vxworks.
392 (ppc_elf_create_got): Updated.
393 (ppc_elf_create_dynamic_sections): Likewise.
394 (ppc_elf_check_relocs): Likewise.
395 (ppc_elf_adjust_dynamic_symbol): Likewise.
396 (ppc_elf_size_dynamic_sections): Likewise.
397 (ppc_elf_relocate_section): Likewise.
398 (ppc_elf_finish_dynamic_sections): Likewise.
399 (ppc_elf_vxworks_link_hash_table_create): Likewise.
400 (ELF_TARGET_OS): New.
401 * elf32-sh.c (elf_sh_link_hash_table): Remove vxworks_p.
402 (sh_elf_link_hash_table_create): Updated.
403 (sh_elf_create_dynamic_sections): Likewise.
404 (allocate_dynrelocs): Likewise.
405 (sh_elf_size_dynamic_sections): Likewise.
406 (sh_elf_relocate_section): Likewise.
407 (sh_elf_finish_dynamic_symbol): Likewise.
408 (sh_elf_finish_dynamic_sections): Likewise.
409 (ELF_TARGET_OS): New.
410 * elf32-sparc.c (elf32_sparc_vxworks_link_hash_table_create):
412 (bfd_elf32_bfd_link_hash_table_create): Likewise.
413 (ELF_TARGET_OS): New.
414 * elf64-x86-64.c (elf_x86_64_arch_bed): Removed.
415 (elf_x86_64_solaris_arch_bed): Likewise.
416 (elf_x86_64_nacl_arch_bed): Likewise.
417 (elf_x86_64_finish_dynamic_sections): Updated.
418 (elf_x86_64_get_synthetic_symtab): Likewise.
419 (elf_x86_64_link_setup_gnu_properties): Likewise.
420 (ELF_TARGET_OS): New.
421 * elflink.c (_bfd_elf_link_hash_table_init): Initialize
423 * elfxx-mips.c (mips_elf_link_hash_table): Remove is_vxworks.
424 (MIPS_ELF_REL_DYN_NAME): Updated.
425 (ELF_MIPS_GP_OFFSET): Likewise.
426 (mips_elf_create_local_got_entry): Likewise.
427 (mips_elf_allocate_dynamic_relocations): Likewise.
428 (mips_elf_count_got_symbols): Likewise.
429 (is_gott_symbol): Likewise.
430 (mips_elf_calculate_relocation): Likewise.
431 (mips_elf_create_dynamic_relocation): Likewise.
432 (_bfd_mips_elf_check_relocs): Likewise.
433 (allocate_dynrelocs): Likewise.
434 (_bfd_mips_elf_adjust_dynamic_symbol): Likewise.
435 (mips_elf_lay_out_got): Likewise.
436 (mips_elf_set_plt_sym_value): Likewise.
437 (_bfd_mips_elf_size_dynamic_sections): Likewise.
438 (_bfd_mips_elf_finish_dynamic_symbol): Likewise.
439 (_bfd_mips_elf_finish_dynamic_sections): Likewise.
440 (_bfd_mips_elf_final_link): Likewise.
441 (_bfd_mips_init_file_header): Likewise.
442 * elfxx-sparc.c (_bfd_sparc_elf_create_dynamic_sections):
444 (allocate_dynrelocs): Likewise.
445 (_bfd_sparc_elf_size_dynamic_sections): Likewise.
446 (_bfd_sparc_elf_relocate_section): Likewise.
447 (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
448 (sparc_finish_dyn): Likewise.
449 (_bfd_sparc_elf_finish_dynamic_sections): Likewise.
450 * elfxx-target.h (ELF_TARGET_OS): New.
451 (elfNN_bed): Add ELF_TARGET_OS.
452 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Updated.
453 (_bfd_x86_elf_link_hash_table_create): Likewise.
454 (_bfd_x86_elf_size_dynamic_sections): Likewise.
455 (_bfd_x86_elf_finish_dynamic_sections): Likewise.
456 (_bfd_x86_elf_adjust_dynamic_symbol): Likewise.
457 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
458 * elfxx-x86.h (elf_x86_target_os): Removed.
459 (elf_x86_backend_data): Likewise.
460 (get_elf_x86_backend_data): Likewise.
461 (elf_x86_link_hash_table): Remove target_os.
463 2020-06-06 Alan Modra <amodra@gmail.com>
466 BFD_RELOC_PPC64_GOT_TLSGD34 to BFD_RELOC_PPC64_GOT_TLSGD_PCREL34,
467 BFD_RELOC_PPC64_GOT_TLSLD34 to BFD_RELOC_PPC64_GOT_TLSLD_PCREL34,
468 BFD_RELOC_PPC64_GOT_TPREL34 to BFD_RELOC_PPC64_GOT_TPREL_PCREL34,
469 BFD_RELOC_PPC64_GOT_DTPREL34 to BFD_RELOC_PPC64_GOT_DTPREL_PCREL34.
470 * elf64-ppc.c: Update throughout for reloc renaming.
471 (ppc64_elf_reloc_name_lookup): Handle old reloc names.
472 * libbfd.h: Regenerate.
473 * bfd-in2.h: Regenerate.
475 2020-06-05 H.J. Lu <hongjiu.lu@intel.com>
478 * elf32-bfin.c (bfinfdpic_relocate_section): Skip non SEC_ALLOC
481 2020-06-05 Nick Clifton <nickc@redhat.com>
483 * pdp11.c (aout_link_add_symbols): Fix use before initialisation
486 2020-06-05 Nelson Chu <nelson.chu@sifive.com>
488 * elfnn-riscv.c (riscv_merge_attributes): Add new boolean
489 priv_may_conflict, in_priv_zero and out_priv_zero to decide
490 whether the object can be linked according to it's priv
491 attributes. The object without any priv spec attributes can
492 be linked with others. If the first input object doesn't contain
493 any priv attributes, then we need to copy the setting from the
494 next input one. Also report more detailed error messages to user.
496 2020-06-04 Stephen Casner <casner@acm.org>
498 Extend pdp11-aout symbol table format to accommodate .stab
499 symbols and implement correct handling of them.
501 * pdp11.c (pdp11_external_nlist): Repurposed e_unused to e_desc.
502 (N_STAB, is_stab): Needed new function is_stab to disambiguate
503 normal vs. .stab symbol table type values, replacing N_STAB mask.
504 (translate_from_native_sym_flags): Determine correct section for
505 different .stab types.
506 (translate_to_native_sym_flags): Leave .stab types intact.
507 (translate_symbol_table): Error if symbol indicates overlay;
508 store desc field from .stab symbols.
509 (write_syms): Output desc field with symbol.
510 (aout_link_check_ar_symbols): Skip .stab symbols.
511 (aout_link_add_symbols): Correctly distinguish .stab symbols.
512 (aout_link_write_other_symbol): Write 0 for desk and ovly fields.
513 (aout_link_write_symbols): Write 0 for desk and ovly fields;
514 correctly distinguish .stab symbols and select calculate their
515 section and value; and copy desc and ovly fields from input symbol
518 2020-06-04 Stephen Casner <casner@acm.org>
520 * aoutx.h (translate_symbol_table): Comment had external and
522 * pdp11.c (translate_symbol_table): Likewise.
524 2020-06-04 H.J. Lu <hongjiu.lu@intel.com>
526 * elfxx-x86.h (elf_x86_link_hash_table): Remove target_id.
527 (is_x86_elf): Check elf.hash_table_id instead of target_id.
528 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Updated.
530 2020-06-04 H.J. Lu <hongjiu.lu@intel.com>
533 * elf-m10300.c (mn10300_elf_relocate_section): Resolve relocation
534 in debug section against symbol defined in shared library to 0.
535 * elf32-i386.c (elf_i386_check_relocs): Remove SEC_ALLOC check.
536 * elf32-lm32.c (lm32_elf_check_relocs): Likewise.
537 * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
538 * elf32-nds32.c (nds32_elf_check_relocs): Likewise.
539 * elf32-nios2.c (nios2_elf32_check_relocs): Likewise.
540 * elf32-or1k.c (or1k_elf_check_relocs): Likewise.
541 * elf32-ppc.c (ppc_elf_check_relocs): Likewise.
542 * elf32-sh.c (sh_elf_check_relocs): Likewise.
543 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
544 * elf64-alpha.c (elf64_alpha_check_relocs): Likewise.
545 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
546 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
547 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
548 * elf32-vax.c (elf_vax_check_relocs): Set non_got_ref for non-GOT
550 (elf_vax_adjust_dynamic_symbol): Generate a copy reloc only if
551 there is non-GOT reference.
552 * elflink.c (_bfd_elf_link_check_relocs): Skip non-loaded,
553 non-alloced sections.
555 2020-06-03 Stephen Casner <casner@acm.org>
557 Copy several years of fixes from bfd/aoutx.h to bfd/pdp11.c.
559 * pdp11.c (some_aout_object_p): 4c1534c7a2a - Don't set EXEC_P for
561 (aout_get_external_symbols): 6b8f0fd579d - Return if count is zero.
562 0301ce1486b PR 22306 - Handle stringsize of zero, and error for any
563 other size that doesn't qcover the header word.
564 bf82069dce1 PR 23056 - Allocate an extra byte at the end of the
565 string table, and zero it.
566 (translate_symbol_table): 0d329c0a83a PR 22887 - Print an error
567 message and set bfd_error on finding an invalid name string offset.
568 (add_to_stringtab): INLINE -> inline
569 (pdp11_aout_swap_reloc_in): 116acb2c268 PR 22887 - Correct r_index
571 (squirt_out_relocs): e2996cc315d PR 20921 - Check for and report
572 any relocs that could not be recognised.
573 92744f05809 PR 20929 - Check for relocs without an associated symbol.
574 (find_nearest_line): 808346fcfcf PR 23055 - Check that the symbol
575 name exists and is long enough, before attempting to see if it is
577 c3864421222 - Correct case for N_SO being the last symbol.
578 50455f1ab29 PR 20891 - Handle the case where the main file name
579 and the directory name are both empty.
580 e82ab856bb4 PR 20892 - Handle the case where function name is empty.
581 (aout_link_add_symbols): e517df3dbf7 PR 19629 - Check for out of
582 range string table offsets.
583 531336e3a0b PR 20909 - Fix off-by-one error in check for an
584 illegal string offset.
585 (aout_link_includes_newfunc): Add comment.
586 (pdp11_aout_link_input_section): ad756e3f9e6 - Return with an error
587 on unexpected relocation type rather than ASSERT.
589 2020-06-03 H.J. Lu <hongjiu.lu@intel.com>
592 * elf32-nios2.c (nios2_elf32_size_dynamic_sections): Call
593 _bfd_elf_maybe_set_textrel to set DF_TEXTREL.
595 2020-06-03 H.J. Lu <hongjiu.lu@intel.com>
598 * elf32-nios2.c (nios2_elf32_check_relocs): Skip non-loaded,
599 non-alloced sections.
601 2020-06-03 H.J. Lu <hongjiu.lu@intel.com>
603 * elf32-frv.c (elf32_frv_relocate_section): Don't generate
604 dynamic relocations for non SEC_ALLOC sections.
606 2020-06-03 Gunther Nikl <gnikl@justmail.de>
608 * aout64.c (BMAGIC, QMAGIC): Do not define.
609 * aoutx.h (N_IS_BMAGIC, N_SET_QMAGIC): New defines.
610 (NAME (aout, some_aout_object_p)): Use N_IS_QMAGIC and N_IS_BMAGIC
611 to check the file format.
612 (adjust_z_magic): Use N_SET_QMAGIC to set file format.
613 * i386aout.c (NO_WRITE_HEADER_KLUDGE): Delete define.
614 * libaout.h (NO_WRITE_HEADER_KLUDGE): Do not define.
616 2020-06-03 H.J. Lu <hongjiu.lu@intel.com>
618 * elf32-arc.c (elf_arc_relocate_section): Don't generate dynamic
619 relocations for non SEC_ALLOC sections.
621 2020-06-03 H.J. Lu <hongjiu.lu@intel.com>
623 * elf-bfd.h (_bfd_elf_maybe_set_textrel): New
624 * elf32-arm.c (maybe_set_textrel): Removed.
625 (elf32_arm_size_dynamic_sections): Replace maybe_set_textrel
626 with _bfd_elf_maybe_set_textrel.
627 * elf32-csky.c (maybe_set_textrel): Removed.
628 (csky_elf_size_dynamic_sections): Replace maybe_set_textrel
629 with _bfd_elf_maybe_set_textrel.
630 * elf32-hppa.c (maybe_set_textrel): Removed.
631 (elf32_hppa_size_dynamic_sections): Replace maybe_set_textrel
632 with _bfd_elf_maybe_set_textrel.
633 * elf32-lm32.c (maybe_set_textrel): Removed.
634 (lm32_elf_size_dynamic_sections): Replace maybe_set_textrel
635 with _bfd_elf_maybe_set_textrel.
636 * elf32-m32r.c (maybe_set_textrel): Removed.
637 (m32r_elf_size_dynamic_sections): Replace maybe_set_textrel
638 with _bfd_elf_maybe_set_textrel.
639 * elf32-metag.c (maybe_set_textrel): Removed.
640 (elf_metag_size_dynamic_sections): Replace maybe_set_textrel
641 with _bfd_elf_maybe_set_textrel.
642 * elf32-nds32.c (maybe_set_textrel): Removed.
643 (nds32_elf_size_dynamic_sections): Replace maybe_set_textrel
644 with _bfd_elf_maybe_set_textrel.
645 * elf32-or1k.c (maybe_set_textrel): Removed.
646 (or1k_elf_size_dynamic_sections): Replace maybe_set_textrel
647 with _bfd_elf_maybe_set_textrel.
648 * elf32-ppc.c (maybe_set_textrel): Removed.
649 (ppc_elf_size_dynamic_sections): Replace maybe_set_textrel
650 with _bfd_elf_maybe_set_textrel.
651 * elf32-s390.c (maybe_set_textrel): Removed.
652 (elf_s390_size_dynamic_sections): Replace maybe_set_textrel
653 with _bfd_elf_maybe_set_textrel.
654 * elf32-sh.c (maybe_set_textrel): Removed.
655 (sh_elf_size_dynamic_sections): Replace maybe_set_textrel
656 with _bfd_elf_maybe_set_textrel.
657 * elf32-tic6x.c (maybe_set_textrel): Removed.
658 (elf32_tic6x_size_dynamic_sections): Replace maybe_set_textrel
659 with _bfd_elf_maybe_set_textrel.
660 * elf32-tilepro.c (maybe_set_textrel): Removed.
661 (tilepro_elf_size_dynamic_sections): Replace maybe_set_textrel
662 with _bfd_elf_maybe_set_textrel.
663 * elf64-ppc.c (maybe_set_textrel): Removed.
664 (ppc64_elf_size_dynamic_sections): Replace maybe_set_textrel
665 with _bfd_elf_maybe_set_textrel.
666 * elf64-s390.c (maybe_set_textrel): Removed.
667 (elf_s390_size_dynamic_sections): Replace maybe_set_textrel
668 with _bfd_elf_maybe_set_textrel.
669 * elfnn-aarch64.c (maybe_set_textrel): Removed.
670 (elfNN_aarch64_size_dynamic_sections): Replace maybe_set_textrel
671 with _bfd_elf_maybe_set_textrel.
672 * elfnn-riscv.c (maybe_set_textrel): Removed.
673 (riscv_elf_size_dynamic_sections): Replace maybe_set_textrel
674 with _bfd_elf_maybe_set_textrel.
675 * elfxx-sparc.c (maybe_set_textrel): Removed.
676 (_bfd_sparc_elf_size_dynamic_sections): Replace maybe_set_textrel
677 with _bfd_elf_maybe_set_textrel.
678 * elfxx-tilegx.c (maybe_set_textrel): Removed.
679 (tilegx_elf_size_dynamic_sections): Replace maybe_set_textrel
680 with _bfd_elf_maybe_set_textrel.
681 * elfxx-x86.c (maybe_set_textrel): Removed.
682 (_bfd_x86_elf_size_dynamic_sections): Replace maybe_set_textrel
683 with _bfd_elf_maybe_set_textrel.
684 * elflink.c (_bfd_elf_maybe_set_textrel): New.
686 2020-06-03 H.J. Lu <hongjiu.lu@intel.com>
689 * elf32-arm.c (elf32_arm_copy_indirect_symbol): Don't copy
691 * elf32-csky.c (csky_elf_copy_indirect_symbol): Likewise.
692 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
693 * elf32-metag.c (elf_metag_copy_indirect_symbol): Likewise.
694 * elf32-microblaze.c (microblaze_elf_copy_indirect_symbol):
696 * elf32-nds32.c (nds32_elf_copy_indirect_symbol): Likewise.
697 * elf32-nios2.c (nios2_elf32_copy_indirect_symbol): Likewise.
698 * elf32-or1k.c (or1k_elf_copy_indirect_symbol): Likewise.
699 * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
700 * elf32-sh.c (sh_elf_copy_indirect_symbol): Likewise.
701 * elf32-tilepro.c (tilepro_elf_copy_indirect_symbol): Likewise.
702 * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
703 * elfnn-aarch64.c (elfNN_aarch64_copy_indirect_symbol): Likewise.
704 * elfnn-riscv.c (riscv_elf_copy_indirect_symbol): Likewise.
705 * elfxx-sparc.c (_bfd_sparc_elf_copy_indirect_symbol): Likewise.
706 * elfxx-tilegx.c (tilegx_elf_copy_indirect_symbol): Likewise.
707 * elfxx-x86.c (_bfd_x86_elf_copy_indirect_symbol): Likewise.
708 * elf32-lm32.c (lm32_elf_copy_indirect_symbol): Removed.
709 (elf_backend_copy_indirect_symbol): Likewise.
710 * elf32-m32r.c (m32r_elf_copy_indirect_symbol): Removed.
711 (elf_backend_copy_indirect_symbol): Likewise.
712 * elflink.c (_bfd_elf_link_hash_copy_indirect): Copy dyn_relocs.
714 2020-06-03 H.J. Lu <hongjiu.lu@intel.com>
717 * elf-bfd.h (_bfd_elf_readonly_dynrelocs): New.
718 * elf32-arm.c (readonly_dynrelocs): Removed.
719 (maybe_set_textrel): Replace readonly_dynrelocs with
720 _bfd_elf_readonly_dynrelocs.
721 * elf32-csky.c (readonly_dynrelocs): Removed.
722 (maybe_set_textrel): Replace readonly_dynrelocs with
723 _bfd_elf_readonly_dynrelocs.
724 * elf32-hppa.c(readonly_dynrelocs): Removed.
725 (alias_readonly_dynrelocs): Replace readonly_dynrelocs with
726 _bfd_elf_readonly_dynrelocs.
727 (maybe_set_textrel): Likewise.
728 * elf32-lm32.c (readonly_dynrelocs): Removed.
729 (lm32_elf_adjust_dynamic_symbol): Replace readonly_dynrelocs
730 with _bfd_elf_readonly_dynrelocs.
731 (maybe_set_textrel): Likewise.
732 * elf32-m32r.c (readonly_dynrelocs): Removed.
733 (m32r_elf_adjust_dynamic_symbol): Replace readonly_dynrelocs
734 with _bfd_elf_readonly_dynrelocs.
735 (maybe_set_textrel): Likewise.
736 * elf32-metag.c (readonly_dynrelocs): Removed.
737 (elf_metag_adjust_dynamic_symbol): Replace readonly_dynrelocs
738 with _bfd_elf_readonly_dynrelocs.
739 (maybe_set_textrel): Likewise.
740 * elf32-microblaze.c (readonly_dynrelocs): Removed.
741 (microblaze_elf_adjust_dynamic_symbol): Replace readonly_dynrelocs
742 with _bfd_elf_readonly_dynrelocs.
743 * elf32-nds32.c (readonly_dynrelocs): Removed.
744 (nds32_elf_adjust_dynamic_symbol): Replace readonly_dynrelocs
745 with _bfd_elf_readonly_dynrelocs.
746 (maybe_set_textrel): Likewise.
747 * elf32-or1k.c (readonly_dynrelocs): Removed.
748 (or1k_elf_adjust_dynamic_symbol): Replace readonly_dynrelocs
749 with _bfd_elf_readonly_dynrelocs.
750 * elf32-ppc.c (readonly_dynrelocs): Removed.
751 (alias_readonly_dynrelocs): Replace readonly_dynrelocs with
752 _bfd_elf_readonly_dynrelocs.
753 (ppc_elf_adjust_dynamic_symbol): Likewise.
754 (maybe_set_textrel): Likewise.
755 * elf32-s390.c (readonly_dynrelocs): Removed.
756 (elf_s390_adjust_dynamic_symbol): Replace readonly_dynrelocs
757 with _bfd_elf_readonly_dynrelocs.
758 (maybe_set_textrel): Likewise.
759 * elf32-sh.c (readonly_dynrelocs): Removed.
760 (sh_elf_adjust_dynamic_symbol): Replace readonly_dynrelocs with
761 _bfd_elf_readonly_dynrelocs.
762 (maybe_set_textrel): Likewise.
763 * elf32-tic6x.c (readonly_dynrelocs): Removed.
764 (maybe_set_textrel): Replace readonly_dynrelocs with
765 _bfd_elf_readonly_dynrelocs.
766 * elf32-tilepro.c (readonly_dynrelocs): Removed.
767 (tilepro_elf_adjust_dynamic_symbol): Replace readonly_dynrelocs
768 with _bfd_elf_readonly_dynrelocs.
769 (maybe_set_textrel): Likewise.
770 * elf64-ppc.c (readonly_dynrelocs): Removed.
771 (alias_readonly_dynrelocs): Replace readonly_dynrelocs with
772 _bfd_elf_readonly_dynrelocs.
773 (ppc64_elf_adjust_dynamic_symbol): Likewise.
774 (maybe_set_textrel): Likewise.
775 * elf64-s390.c (readonly_dynrelocs): Removed.
776 (elf_s390_adjust_dynamic_symbol): Replace readonly_dynrelocs
777 with _bfd_elf_readonly_dynrelocs.
778 (maybe_set_textrel): Likewise.
779 * elflink.c (_bfd_elf_readonly_dynrelocs): New.
780 * elfnn-aarch64.c (readonly_dynrelocs): Removed.
781 (maybe_set_textrel): Replace readonly_dynrelocs with
782 _bfd_elf_readonly_dynrelocs.
783 * elfnn-riscv.c (readonly_dynrelocs): Removed.
784 (riscv_elf_adjust_dynamic_symbol): Replace readonly_dynrelocs
785 with _bfd_elf_readonly_dynrelocs.
786 (maybe_set_textrel): Likewise.
787 * elfxx-sparc.c (readonly_dynrelocs): Removed.
788 (_bfd_sparc_elf_adjust_dynamic_symbol): Replace
789 readonly_dynrelocs with _bfd_elf_readonly_dynrelocs.
790 (maybe_set_textrel): Likewise.
791 * elfxx-tilegx.c (readonly_dynrelocs): Removed.
792 (tilegx_elf_adjust_dynamic_symbol): Replace readonly_dynrelocs
793 with _bfd_elf_readonly_dynrelocs.
794 (maybe_set_textrel): Likewise.
795 * elfxx-x86.c (readonly_dynrelocs): Removed.
796 (maybe_set_textrel): Replace readonly_dynrelocs with
797 _bfd_elf_readonly_dynrelocs.
798 (_bfd_x86_elf_adjust_dynamic_symbol): Likewise.
800 2020-06-03 H.J. Lu <hongjiu.lu@intel.com>
802 * elfxx-x86.h (GENERATE_DYNAMIC_RELOCATION_P): Silence
803 -fsanitize=undefined.
805 2020-06-03 Alan Modra <amodra@gmail.com>
809 * peicode.h (pe_ILF_make_a_section): Align data for compilers
811 (pe_ILF_build_a_bfd): Likewise.
813 2020-06-03 Alan Modra <amodra@gmail.com>
816 * elf.c (_bfd_elf_close_and_cleanup): Free elf_shstrtab for
817 core files as well as objects.
819 2020-06-01 H.J. Lu <hongjiu.lu@intel.com>
822 * elf-bfd.h (elf_link_hash_entry): Add dyn_relocs after size.
823 * elf-s390-common.c (s390_elf_allocate_ifunc_dyn_relocs):
825 * elf32-arc.c (elf_arc_link_hash_entry): Remove dyn_relocs.
826 (elf_arc_link_hash_newfunc): Updated.
827 * elf32-arm.c (elf32_arm_link_hash_entry): Remove dyn_relocs.
828 (elf32_arm_link_hash_newfunc): Updated.
829 (elf32_arm_copy_indirect_symbol): Likewise.
830 (elf32_arm_check_relocs): Likewise.
831 (readonly_dynrelocs): Likewise.
832 (allocate_dynrelocs_for_symbol): Likewise.
833 * elf32-csky.c (csky_elf_link_hash_entry): Remove dyn_relocs.
834 (csky_elf_link_hash_newfunc): Updated.
835 (csky_allocate_dynrelocs): Likewise.
836 (readonly_dynrelocs): Likewise.
837 (csky_elf_copy_indirect_symbol): Likewise.
838 * elf32-hppa.c (elf32_hppa_link_hash_entry): Remove dyn_relocs.
839 (hppa_link_hash_newfunc): Updated.
840 (elf32_hppa_copy_indirect_symbol): Likewise.
841 (elf32_hppa_hide_symbol): Likewise.
842 (elf32_hppa_adjust_dynamic_symbol): Likewise.
843 (allocate_dynrelocs): Likewise.
844 (elf32_hppa_relocate_section): Likewise.
845 * elf32-i386.c (elf_i386_check_relocs): Likewise.
846 * elf32-lm32.c (elf_lm32_link_hash_entry): Removed.
847 (lm32_elf_link_hash_newfunc): Likewise.
848 (lm32_elf_link_hash_table_create): Updated.
849 (readonly_dynrelocs): Likewise.
850 (allocate_dynrelocs): Likewise.
851 (lm32_elf_copy_indirect_symbol): Likewise.
852 * elf32-m32r.c (elf_m32r_link_hash_entry): Removed.
853 (m32r_elf_link_hash_newfunc): Likewise.
854 (m32r_elf_link_hash_table_create): Updated.
855 (m32r_elf_copy_indirect_symbol): Likewise.
856 (allocate_dynrelocs): Likewise.
857 * elf32-metag.c (elf_metag_link_hash_entry): Remove dyn_relocs.
858 (metag_link_hash_newfunc): Updated.
859 (elf_metag_copy_indirect_symbol): Likewise.
860 (readonly_dynrelocs): Likewise.
861 (allocate_dynrelocs): Likewise.
862 * elf32-microblaze.c (elf32_mb_link_hash_entry): Remove
864 (link_hash_newfunc): Updated.
865 (microblaze_elf_check_relocs): Likewise.
866 (microblaze_elf_copy_indirect_symbol): Likewise.
867 (readonly_dynrelocs): Likewise.
868 (allocate_dynrelocs): Likewise.
869 * elf32-nds32.c (elf_nds32_link_hash_entry): Remove dyn_relocs.
870 (nds32_elf_link_hash_newfunc): Updated.
871 (nds32_elf_copy_indirect_symbol): Likewise.
872 (readonly_dynrelocs): Likewise.
873 (allocate_dynrelocs): Likewise.
874 (nds32_elf_check_relocs): Likewise.
875 * elf32-nios2.c (elf32_nios2_link_hash_entry): Remove dyn_relocs.
876 (link_hash_newfunc): Updated.
877 (nios2_elf32_copy_indirect_symbol): Likewise.
878 (nios2_elf32_check_relocs): Likewise.
879 (allocate_dynrelocs): Likewise.
880 * elf32-or1k.c (elf_or1k_link_hash_entry): Remove dyn_relocs.
881 (or1k_elf_link_hash_newfunc): Updated.
882 (readonly_dynrelocs): Likewise.
883 (allocate_dynrelocs): Likewise.
884 (or1k_elf_copy_indirect_symbol): Likewise.
885 * elf32-ppc.c (ppc_elf_link_hash_entry): Remove dyn_relocs.
886 (ppc_elf_link_hash_newfunc): Updated.
887 (ppc_elf_copy_indirect_symbol): Likewise.
888 (ppc_elf_check_relocs): Likewise.
889 (readonly_dynrelocs): Likewise.
890 (ppc_elf_adjust_dynamic_symbol): Likewise.
891 (allocate_dynrelocs): Likewise.
892 (ppc_elf_relocate_section): Likewise.
893 * elf32-s390.c (elf_s390_link_hash_entry): Remove dyn_relocs.
894 (link_hash_newfunc): Updated.
895 (elf_s390_copy_indirect_symbol): Likewise.
896 (readonly_dynrelocs): Likewise.
897 (elf_s390_adjust_dynamic_symbol): Likewise.
898 (allocate_dynrelocs): Likewise.
899 * elf32-sh.c (elf_sh_link_hash_entry): Remove dyn_relocs.
900 (sh_elf_link_hash_newfunc): Updated.
901 (readonly_dynrelocs): Likewise.
902 (allocate_dynrelocs): Likewise.
903 (sh_elf_copy_indirect_symbol): Likewise.
904 (sh_elf_check_relocs): Likewise.
905 * elf32-tic6x.c (elf32_tic6x_link_hash_entry): Removed.
906 (elf32_tic6x_link_hash_newfunc): Likewise.
907 (elf32_tic6x_link_hash_table_create): Updated.
908 (readonly_dynrelocs): Likewise.
909 (elf32_tic6x_check_relocs): Likewise.
910 (elf32_tic6x_allocate_dynrelocs): Likewise.
911 * elf32-tilepro.c (tilepro_elf_link_hash_entry): Remove
913 (link_hash_newfunc): Updated.
914 (tilepro_elf_copy_indirect_symbol): Likewise.
915 (tilepro_elf_check_relocs): Likewise.
916 (allocate_dynrelocs): Likewise.
917 * elf64-ppc.c (ppc_link_hash_entry): Remove dyn_relocs.
918 (ppc64_elf_copy_indirect_symbol): Updated.
919 (ppc64_elf_check_relocs): Likewise.
920 (readonly_dynrelocs): Likewise.
921 (ppc64_elf_adjust_dynamic_symbol): Likewise.
922 (dec_dynrel_count): Likewise.
923 (allocate_dynrelocs): Likewise.
924 (ppc64_elf_relocate_section): Likewise.
925 * elf64-s390.c (elf_s390_link_hash_entry): Remove dyn_relocs.
926 (link_hash_newfunc): Updated.
927 (elf_s390_copy_indirect_symbol): Likewise.
928 (readonly_dynrelocs): Likewise.
929 (allocate_dynrelocs): Likewise.
930 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
931 * elfnn-aarch64.c (elf_aarch64_link_hash_entry): Remove
933 (elfNN_aarch64_link_hash_newfunc): Updated.
934 (elfNN_aarch64_copy_indirect_symbol): Likewise.
935 (readonly_dynrelocs): Likewise.
936 (need_copy_relocation_p): Likewise.
937 (elfNN_aarch64_allocate_dynrelocs): Likewise.
938 (elfNN_aarch64_allocate_ifunc_dynrelocs): Likewise.
939 * elfnn-riscv.c (riscv_elf_link_hash_entry): Remove dyn_relocs.
940 (link_hash_newfunc): Updated.
941 (riscv_elf_copy_indirect_symbol): Likewise.
942 (riscv_elf_check_relocs): Likewise.
943 (readonly_dynrelocs): Likewise.
944 (allocate_dynrelocs): Likewise.
945 * elfxx-sparc.c (_bfd_sparc_elf_link_hash_entry): Remove
947 (link_hash_newfunc): Updated.
948 (_bfd_sparc_elf_copy_indirect_symbol): Likewise.
949 (_bfd_sparc_elf_check_relocs): Likewise.
950 (readonly_dynrelocs): Likewise.
951 (allocate_dynrelocs): Likewise.
952 * elfxx-tilegx.c (tilegx_elf_link_hash_entry): Remove dyn_relocs.
953 (link_hash_newfunc): Updated.
954 (tilegx_elf_copy_indirect_symbol): Likewise.
955 (tilegx_elf_check_relocs): Likewise.
956 (readonly_dynrelocs): Likewise.
957 (allocate_dynrelocs): Likewise.
958 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Likewise.
959 (readonly_dynrelocs): Likewise.
960 (_bfd_x86_elf_copy_indirect_symbol): Likewise.
961 * elfxx-x86.h (elf_x86_link_hash_entry): Remove dyn_relocs.
963 2020-06-01 Alan Modra <amodra@gmail.com>
965 * vms-alpha.c (_bfd_vms_slurp_etir): Check bound for the current
966 command against cmd_length, not the end of record. For
967 ETIR__C_STO_IMMR check size against cmd_length, mask repeat count
968 to 32-bits and break out on zero size. Add ETIR__C_STC_LP_PSB
971 2020-05-28 David Faust <david.faust@oracle.com>
973 * elf64-bpf.c (bpf_elf_relocate_section): Fix handling of
974 R_BPF_INSN_{32,64} relocations.
976 2020-05-28 Stephen Casner <casner@acm.org>
978 * pdp11.c: Implement BRD_RELOC_32 to relocate the low 16 bits of
979 addreses in .long (used in testsuites) and .stab values.
981 2020-05-27 H.J. Lu <hongjiu.lu@intel.com>
984 * elflink.c (bfd_elf_final_link): Use bfd_link_textrel_check.
985 Check bfd_link_dll when issue a DT_TEXTREL warning.
986 * elfxx-x86.c (maybe_set_textrel): Likewise.
987 (_bfd_x86_elf_size_dynamic_sections): Likewise.
989 2020-05-26 Nick Clifton <nickc@redhat.com>
991 * plugin.c (try_load_plugin): Extend error message when a plugin
994 2020-05-23 Alan Modra <amodra@gmail.com>
996 * bfdio.c (bfd_get_file_size): Don't segfault on NULL arch_header.
998 2020-05-22 Alan Modra <amodra@gmail.com>
1001 * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Don't init FP
1002 attributes from shared libraries, and do not return an error if
1005 2020-05-21 Alan Modra <amodra@gmail.com>
1008 * opncls.c (_bfd_free_cached_info): Keep a copy of the bfd
1010 (_bfd_delete_bfd): Free the copy.
1011 (_bfd_new_bfd): Free nbfd->memory on error.
1013 2020-05-21 Alan Modra <amodra@gmail.com>
1015 * aoutx.h: Replace "if (x) free (x)" with "free (x)" throughout.
1016 * archive.c, * bfd.c, * bfdio.c, * coff-alpha.c, * coff-ppc.c,
1017 * coff-sh.c, * coff-stgo32.c, * coffcode.h, * coffgen.c,
1018 * cofflink.c, * cpu-arm.c, * doc/chew.c, * dwarf2.c, * ecoff.c,
1019 * ecofflink.c, * elf-eh-frame.c, * elf-m10200.c, * elf-m10300.c,
1020 * elf-strtab.c, * elf.c, * elf32-arc.c, * elf32-arm.c,
1021 * elf32-avr.c, * elf32-bfin.c, * elf32-cr16.c, * elf32-crx.c,
1022 * elf32-epiphany.c, * elf32-ft32.c, * elf32-h8300.c,
1023 * elf32-ip2k.c, * elf32-m32c.c, * elf32-m68hc11.c,
1024 * elf32-m68k.c, * elf32-microblaze.c, * elf32-msp430.c,
1025 * elf32-nds32.c, * elf32-nios2.c, * elf32-ppc.c, * elf32-pru.c,
1026 * elf32-rl78.c, * elf32-rx.c, * elf32-sh.c, * elf32-spu.c,
1027 * elf32-v850.c, * elf32-xtensa.c, * elf64-alpha.c,
1028 * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c
1029 * elf64-mmix.c, * elf64-ppc.c, * elf64-sparc.c, * elfcode.h,
1030 * elflink.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-mips.c,
1031 * elfxx-x86.c, * format.c, * ihex.c, * libbfd.c, * linker.c,
1032 * mmo.c, * opncls.c, * pdp11.c, * peXXigen.c, * pef.c,
1033 * peicode.h, * simple.c, * som.c, * srec.c, * stabs.c, * syms.c,
1034 * targets.c, * vms-lib.c, * xcofflink.c, * xtensa-isa.c: Likewise.
1036 2020-05-20 Nelson Chu <nelson.chu@sifive.com>
1038 * elfxx-riscv.h (riscv_parse_subset_t): Add new callback function
1039 get_default_version. It is used to find the default version for
1040 the specific extension.
1041 * elfxx-riscv.c (riscv_parsing_subset_version): Remove the parameters
1042 default_major_version and default_minor_version. Add new bfd_boolean
1043 parameter *use_default_version. Set it to TRUE if we need to call
1044 the callback rps->get_default_version to find the default version.
1045 (riscv_parse_std_ext): Call rps->get_default_version if we fail to find
1046 the default version in riscv_parsing_subset_version, and then call
1047 riscv_add_subset to add the subset into subset list.
1048 (riscv_parse_prefixed_ext): Likewise.
1049 (riscv_std_z_ext_strtab): Support Zicsr extensions.
1050 * elfnn-riscv.c (riscv_merge_std_ext): Use strcasecmp to compare the
1051 strings rather than characters.
1052 riscv_merge_arch_attr_info): The callback function get_default_version
1053 is only needed for assembler, so set it to NULL int the linker.
1054 * elfxx-riscv.c (riscv_estimate_digit): Remove the static.
1055 * elfxx-riscv.h: Updated.
1057 2020-05-20 Alan Modra <amodra@gmail.com>
1060 * archive.c (_bfd_get_elt_at_filepos): Don't strdup filename,
1061 use bfd_set_filename.
1062 * elfcode.h (_bfd_elf_bfd_from_remote_memory): Likewise.
1063 * mach-o.c (bfd_mach_o_fat_member_init): Likewise.
1064 * opncls.c (bfd_fopen, bfd_openstreamr, bfd_openr_iovec, bfd_openw),
1065 (bfd_create): Likewise.
1066 (_bfd_delete_bfd): Don't free filename.
1067 (bfd_set_filename): Copy filename param to bfd_alloc'd memory,
1068 return pointer to the copy or NULL on alloc fail.
1069 * vms-lib.c (_bfd_vms_lib_get_module): Free newname and test
1070 result of bfd_set_filename.
1071 * bfd-in2.h: Regenerate.
1073 2020-05-20 Alan Modra <amodra@gmail.com>
1076 * elf.c (_bfd_elf_get_reloc_upper_bound): Sanity check reloc
1077 section size against file size.
1078 (_bfd_elf_get_dynamic_reloc_upper_bound): Likewise.
1080 2020-05-19 Gunther Nikl <gnikl@justmail.de>
1083 * elf.c (bfd_section_from_shdr): Replace bfd_zmalloc with bfd_malloc
1084 and memset when allocating memory for the sections_being_created
1087 2020-05-19 Stafford Horne <shorne@gmail.com>
1089 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Rename srela
1091 (or1k_elf_relocate_section): Access srelgot via
1092 htab->root.srelgot. Add assertions for srelgot->contents.
1093 Introduce local variable for srelgot to not reuse global
1095 (or1k_elf_relocate_section): Fixup dynamic symbol detection.
1096 (or1k_set_got_and_rela_sizes): New function.
1097 (or1k_initial_exec_offset): New function.
1098 (TLS_GD, TLS_IE, TLS_LD, TLS_LE): Redefine macros as masks.
1099 (or1k_elf_relocate_section): Allow for TLS to handle multiple
1101 (or1k_elf_check_relocs): Use OR to set TLS access.
1102 (allocate_dynrelocs): Use or1k_set_got_and_rela_sizes to set
1104 (or1k_elf_size_dynamic_sections): Use
1105 or1k_set_got_and_rela_sizes to set sizes.
1106 (or1k_elf_relocate_section): Fixup PCREL relocation calculation.
1107 (TCB_SIZE): New macro.
1108 (tpoff): Use TCB_SIZE and alignment to calculate offset.
1109 (allocate_dynrelocs, readonly_dynrelocs, or1k_elf_check_relocs)
1110 (or1k_elf_size_dynamic_sections): Rename p to sec_relocs.
1111 (allocate_dynrelocs): Rename s to splt or sgot based on usage.
1112 (tpoff): Add dynamic boolean argument.
1113 (or1k_elf_relocate_section): Pass dynamic flag to tpoff.
1115 2020-05-19 Siddhesh Poyarekar <siddesh.poyarekar@arm.com>
1117 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Club
1118 BFD_RELOC_AARCH64_BRANCH19 and BFD_RELOC_AARCH64_TSTBR14
1119 cases with BFD_RELOC_AARCH64_JUMP26.
1120 (elfNN_aarch64_check_relocs): Likewise.
1122 2020-05-19 Alan Modra <amodra@gmail.com>
1124 * aix5ppc-core.c (xcoff64_core_file_matches_executable_p): Use
1125 bfd_get_filename rather than accessing bfd->filename directly.
1126 * aout-target.h (MY (object_p)): Likewise.
1127 * aoutx.h (aout_find_nearest_line, aout_link_write_symbols): Likewise.
1128 * archive.c (find_nested_archive, _bfd_generic_read_ar_hdr_mag),
1129 (_bfd_construct_extended_name_table, _bfd_bsd44_write_ar_hdr),
1130 (_bfd_archive_bsd44_construct_extended_name_table),
1131 (_bfd_write_archive_contents, _bfd_compute_and_write_armap),
1132 (_bfd_bsd_write_armap): Likewise.
1133 * bfd.c (bfd_errmsg, _bfd_doprnt): Likewise.
1134 * cache.c (bfd_open_file): Likewise.
1135 * ecoff.c (_bfd_ecoff_write_armap): Likewise.
1136 * ecofflink.c (bfd_ecoff_debug_accumulate_other): Likewise.
1137 * elf32-bfin.c (bfinfdpic_relocate_section): Likewise.
1138 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
1139 * elf32-hppa.c (elf32_hppa_final_link): Likewise.
1140 * elf32-nds32.c (nds32_elf_output_symbol_hook),
1141 (patch_tls_desc_to_ie): Likewise.
1142 * elf32-spu.c (sort_bfds, print_one_overlay_section),
1143 (spu_elf_auto_overlay): Likewise.
1144 * elf64-hppa.c (elf_hppa_final_link): Likewise.
1145 * elf64-ia64-vms.c (elf64_ia64_size_dynamic_sections): Likewise.
1146 * elfcore.h (elf_core_file_matches_executable_p): Likewise.
1147 * elflink.c (bfd_elf_size_dynamic_sections),
1148 (elf_link_input_bfd): Likewise.
1149 * linker.c (_bfd_generic_link_output_symbols): Likewise.
1150 * mach-o.c (bfd_mach_o_follow_dsym),
1151 (bfd_mach_o_close_and_cleanup): Likewise.
1152 * opncls.c (_bfd_delete_bfd, _maybe_make_executable),
1153 (find_separate_debug_file, get_build_id_name): Likewise.
1154 * pdp11.c (aout_find_nearest_line, aout_link_write_symbols): Likewise.
1155 * plugin.c (bfd_plugin_open_input): Likewise.
1156 * rs6000-core.c (rs6000coff_core_file_matches_executable_p): Likewise.
1157 * som.c (som_write_armap): Likewise.
1158 * srec.c (srec_write_record, srec_write_symbols): Likewise.
1159 * vms-lib.c (_bfd_vms_lib_get_imagelib_file),
1160 (_bfd_vms_lib_write_archive_contents): Likewise.
1161 * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
1163 2020-05-19 Alan Modra <amodra@gmail.com>
1166 * bfdio.c (_bfd_real_fopen): Typo fix.
1168 2020-05-18 Nick Clifton <nickc@redhat.com>
1171 * elf.c (bfd_section_from_shdr): Use bfd_malloc to allocate memory
1172 for the sections_being_created array.
1174 2020-05-18 Alan Modra <amodra@gmail.com>
1176 * ecoff.c (ecoff_slurp_reloc_table): Malloc external_relocs so
1177 they can be freed without also freeing internal_relocs.
1179 2020-05-18 Jaydeep Chauhan <jaydeepchauhan1494@gmail.com>
1182 * bfdio.c (_bfd_real_fopen): Convert UNIX style sirectory
1183 separators into DOS style when creating a WIN32 fullpath.
1185 2020-05-14 Nelson Chu <nelson.chu@sifive.com>
1187 * elfnn-riscv.c (elfNN_riscv_mkobject): New function. We need this
1188 to initialize RISC-V tdata.
1190 2020-05-12 Gunther Nikl <gnikl@justmail.de>
1192 * aoutx.h (NAME (aout, swap_std_reloc_out)): Reject an unsupported
1195 2020-05-11 Alan Modra <amodra@gmail.com>
1197 * elf64-ppc.c (xlate_pcrel_opt): Handle lxvp and stxvp.
1199 2020-05-11 Alan Modra <amodra@gmail.com>
1201 * elf64-ppc.c: Rename powerxx to power10 throughout.
1203 2020-05-11 Alan Modra <amodra@gmail.com>
1206 * coffgen.c (coff_get_normalized_symtab): Check that buffer
1207 contains required number of auxents before processing any auxent.
1208 * coffswap.h (coff_swap_aux_in <C_FILE>): Only swap in extended
1209 file name from auxents for PE.
1211 2020-05-04 Gunther Nikl <gnikl@justmail.de>
1213 * aout-cris.c (DEFAULT_ARCH): Delete define.
1214 (MY_set_arch_mach): Likewise.
1215 (SET_ARCH_MACH): Use bfd_set_arch_mach with an explicit architecture
1217 (swap_ext_reloc_in): Add casts to r_index extraction. Mask valid bits
1218 of r_type before the shift.
1220 2020-05-04 Wilco Dijkstra <wdijkstr@arm.com>
1223 * elfnn-aarch64.c (group_sections): Copy implementation from
1226 2020-05-01 Alan Modra <amodra@gmail.com>
1229 * elfnn-riscv.c (_bfd_riscv_relax_section): Check root.type before
1230 accessing root.u.def of symbols. Also check root.u.def.section
1231 is non-NULL. Reverse tests so as to make the logic positive.
1233 2020-05-01 Alan Modra <amodra@gmail.com>
1236 * elf32-tic6x.c (elf32_tic6x_merge_attributes): Don't transfer
1237 Tag_ABI_PIC or Tag_ABI_PID from dynamic objects to the output.
1239 2020-05-01 Alan Modra <amodra@gmail.com>
1242 * elf32-bfin.c (elf32_bfin_merge_private_bfd_data): Add FIXME.
1243 * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
1244 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Likewise.
1245 * elf32-nds32.c (nds32_elf_merge_private_bfd_data): Likewise.
1246 * elf32-score.c (s3_elf32_score_merge_private_bfd_data): Likewise.
1247 * elf32-score7.c (s7_elf32_score_merge_private_bfd_data): Likewise.
1248 * elf32-sh.c (sh_elf_merge_private_data): Likewise.
1249 * elf32-tic6x.c (elf32_tic6x_merge_attributes): Likewise.
1250 * elf64-ia64-vms.c (elf64_ia64_merge_private_bfd_data): Likewise.
1251 * elfnn-ia64.c (elfNN_ia64_merge_private_bfd_data): Likewise.
1253 2020-05-01 Alan Modra <amodra@gmail.com>
1256 * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Ignore e_flags
1257 from shared libraries.
1259 2020-04-29 Max Filippov <jcmvbkbc@gmail.com>
1261 * elf32-xtensa.c (relax_section): Don't negate diff_value for
1262 XTENSA_NDIFF relocations. Don't add sign bits whe diff_value
1263 equals 0. Report overflow when the result has negative sign but
1264 all significant bits are zero.
1266 2020-04-29 Gunther Nikl <gnikl@justmail.de>
1268 * aoutx.h (swap_std_reloc_out): Special case 64 bit relocations.
1269 (aout_link_reloc_link_order): Likewise. Make r_length an unsigned.
1271 2020-04-28 Alan Modra <amodra@gmail.com>
1273 * vms-alpha.c (_bfd_vms_slurp_etir): Correct divide by zero check.
1274 Emit warning message.
1276 2020-04-27 Tamar Christina <tamar.christina@arm.com>
1278 * coff-i386.c (COFF_WITH_PE_BIGOBJ): New.
1279 * coff-x86_64.c (COFF_WITH_PE_BIGOBJ): New.
1280 * config.bfd (targ_selvecs): Rename x86_64_pe_be_vec
1281 to x86_64_pe_big_vec as it not a big-endian format.
1282 (vec i386_pe_big_vec): New.
1283 * configure.ac: Likewise.
1284 * targets.c: Likewise.
1285 * configure: Regenerate.
1286 * pe-i386.c (TARGET_SYM_BIG, TARGET_NAME_BIG,
1287 COFF_WITH_PE_BIGOBJ): New.
1288 * pe-x86_64.c (TARGET_SYM_BIG, TARGET_NAME_BIG):
1290 (x86_64_pe_be_vec): Moved.
1292 2020-04-23 Anton Kolesov <anton.kolesov@synopsys.com>
1294 * elf-bfd.h (elfcore_write_arc_v2): Add prototype.
1295 * elf.c (elfcore_grok_arc_v2): New function.
1296 (elfcore_grok_note): Call the new function to handle the corresponding
1298 (elfcore_write_arc_v2): New function.
1299 (elfcore_write_register_note): Call the new function to handle the
1300 corresponding pseudo-sections.
1302 2020-04-22 Max Filippov <jcmvbkbc@gmail.com>
1305 * bfd-in2.h: Regenerated.
1306 * elf32-xtensa.c (elf_howto_table): New entries for
1307 R_XTENSA_PDIFF{8,16,32} and R_XTENSA_NDIFF{8,16,32}.
1308 (elf_xtensa_reloc_type_lookup, elf_xtensa_do_reloc)
1309 (relax_section): Add cases for R_XTENSA_PDIFF{8,16,32} and
1310 R_XTENSA_NDIFF{8,16,32}.
1311 * libbfd.h (bfd_reloc_code_real_names): Add names for
1312 BFD_RELOC_XTENSA_PDIFF{8,16,32} and
1313 BFD_RELOC_XTENSA_NDIFF{8,16,32}.
1314 * reloc.c: Add documentation for BFD_RELOC_XTENSA_PDIFF{8,16,32}
1315 and BFD_RELOC_XTENSA_NDIFF{8,16,32}.
1317 2020-04-21 Tamar Christina <tamar.christina@arm.com>
1320 * compress.c (bfd_get_full_section_contents): Exclude sections with no
1323 2020-04-21 H.J. Lu <hongjiu.lu@intel.com>
1326 * elf-bfd.h (elf_backend_data): Add
1327 elf_backend_strip_zero_sized_dynamic_sections.
1328 (_bfd_elf_strip_zero_sized_dynamic_sections): New prototype.
1329 * elf64-alpha.c (elf_backend_strip_zero_sized_dynamic_sections):
1331 * elflink.c (_bfd_elf_strip_zero_sized_dynamic_sections): New
1333 * elfxx-target.h (elf_backend_strip_zero_sized_dynamic_sections):
1335 (elfNN_bed): Add elf_backend_strip_zero_sized_dynamic_sections.
1337 2020-04-21 H.J. Lu <hongjiu.lu@intel.com>
1339 * elf64-alpha.c (alpha_elf_reloc_entry): Replace reltext with
1341 (elf64_alpha_check_relocs): Set sec instead of reltext. Warn
1343 (elf64_alpha_calc_dynrel_sizes): Warn DT_TEXTREL with -M.
1345 2020-04-21 Nick Clifton <nickc@redhat.com>
1347 * po/sr.po: Updated Serbian translation.
1349 2020-04-21 Alan Modra <amodra@gmail.com>
1351 * elf32-sh.c (sh_elf_relocate_section): Remove STO_SH5_ISA32
1354 2020-04-20 Stephen Casner <casner@acm.org>
1356 * pdp11.c (N_STAB): Modify value to avoid conflict with N_EXT
1357 causing globals from linker script to be treated as debug symbols.
1358 (translate_symbol_table): Don't sign-extend symbol values from 16
1359 to 64 bits in nm output.
1361 2020-04-20 Alan Modra <amodra@gmail.com>
1363 * elf64-ppc.c (ppc64_elf_size_stubs): Strip relbrlt too.
1365 2020-04-18 Alan Modra <amodra@gmail.com>
1367 * section.c (bfd_is_const_section): Correct test for special
1369 * bfd-in2.h: Regenerate.
1371 2020-04-17 Alan Modra <amodra@gmail.com>
1374 * elf.c (_bfd_elf_get_symbol_version_string): Don't segfault on
1377 2020-04-16 Nick Clifton <nickc@redhat.com>
1380 * elfxx-mips.c (_bfd_mips_elf_adjust_dynamic_symbol): Replace an
1381 abort with a more helpful error message.
1383 2020-04-16 Alan Modra <amodra@gmail.com>
1386 * dwarf2.c (scan_unit_for_symbols): Wrap overlong lines. Don't
1389 2020-04-15 Fangrui Song <maskray@google.com>
1392 * coff-rs6000.c (xcoff_ppc_relocate_section): Change RM_GENERATE_ERROR
1393 to RM_DIAGNOSE plus a check of warn_unresolved_syms.
1394 * coff64-rs6000.c (xcoff_ppc_relocate_section): Likewise.
1395 * elf-bfd.h (_bfd_elf_large_com_section): Likewise.
1396 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
1397 * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise.
1398 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
1399 * elf32-sh.c (sh_elf_relocate_section): Likewise.
1400 * elf32-spu.c (spu_elf_relocate_section): Likewise.
1401 * elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
1402 * elflink.c (elf_link_output_extsym): Likewise.
1403 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
1405 2020-04-15 Alan Modra <amodra@gmail.com>
1408 * peXXigen.c (_bfd_XXi_swap_sym_in <C_SECTION>): Don't use a
1409 pointer into strings that may be freed for section name, always
1410 allocate a new string.
1412 2020-04-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1413 Jan W. Jagersma <jwjagersma@gmail.com>
1415 * coff-go32.c (COFF_GO32, IMAGE_SCN_LNK_NRELOC_OVFL)
1416 (coff_SWAP_scnhdr_in, coff_SWAP_scnhdr_out): Define.
1417 (_bfd_go32_swap_scnhdr_in, _bfd_go32_swap_scnhdr_out)
1418 (_bfd_go32_mkobject): New functions.
1419 * coff-stgo32.c (IMAGE_SCN_LNK_NRELOC_OVFL)
1420 (coff_SWAP_scnhdr_in, coff_SWAP_scnhdr_out): Define.
1421 (go32exe_mkobject): Call _bfd_go32_mkobject.
1422 * coffcode.h (COFF_WITH_EXTENDED_RELOC_COUNTER): Define.
1423 (coff_set_alignment_hook): Define function for COFF_GO32_EXE
1425 (coff_write_relocs): Enable extended reloc counter code if
1426 COFF_WITH_EXTENDED_RELOC_COUNTER is defined. Test for obj_go32.
1427 (coff_write_object_contents): Likewise. Pad section headers
1428 for COFF_GO32 and COFF_GO32EXE. Use bfd_coff_swap_scnhdr_out
1429 instead of coff_swap_scnhdr_out.
1430 * cofflink.c (_bfd_coff_final_link): Test also for obj_go32 to
1431 enable extended reloc counter.
1432 * coffswap.h: (coff_swap_scnhdr_in, coff_swap_scnhdr_out):
1433 Declare with ATTRIBUTE_UNUSED.
1434 * libcoff-in.h: (struct coff_tdata): New field go32.
1436 * libcoff.h: Regenerate.
1438 2020-04-14 Fangrui Song <maskray@google.com>
1441 * elf.c (assign_section_numbers): Always set .stab sh_entsize to
1444 2020-04-14 Stephen Casner <casner@acm.org>
1447 * pdp11.c: Add implementation of --imagic option.
1448 (adjust_o_magic): Fix objcopy --extract-symbol test.
1449 * libaout.h (enum aout_magic): Add i_magic.
1451 2020-04-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1452 Nick Clifton <nickc@redhat.com>
1454 * elf32-sparc.c (sparc_final_write_processing): Fix whitespace.
1456 <default>: Error rather than abort.
1458 2020-04-03 H.J. Lu <hongjiu.lu@intel.com>
1461 * elf.c (_bfd_elf_fixup_group_sections): Remove zero-sized
1462 relocation section from section group.
1464 2020-04-02 Jan W. Jagersma <jwjagersma@gmail.com>
1466 * bfdio.c (bfd_bread, bfd_tell, bfd_seek, bfd_mmap): Always add
1467 bfd->origin to file offset.
1468 * bfdwin.c (bfd_get_file_window): Likewise.
1469 * bfd.c: Clarify the use of the bfd->origin field.
1470 * bfd-in2.h: Regenerate.
1471 * coff-i386.c: Don't include go32exe.h. Allow overriding
1472 coff_write_object_contents via COFF_WRITE_CONTENTS.
1473 * coff-stgo32.c (go32exe_cleanup, go32exe_mkobject)
1474 (go32exe_write_object_contents): New functions.
1475 (go32exe_temp_stub, go32exe_temp_stub_size): New static globals.
1476 (COFF_WRITE_CONTENTS, GO32EXE_DEFAULT_STUB_SIZE): Define.
1477 (create_go32_stub): Remove check for 2k size limit. Read stub
1478 from go32exe_temp_stub if present.
1479 (go32_stubbed_coff_bfd_copy_private_bfd_data): Allocate and
1480 copy variable-length stub.
1481 (go32_check_format): Read stub to go32exe_temp_stub, set
1482 origin, return go32exe_cleanup.
1483 (adjust_filehdr_in_post, adjust_filehdr_out_pre)
1484 (adjust_filehdr_out_post, adjust_scnhdr_in_post)
1485 (adjust_scnhdr_out_pre, adjust_scnhdr_out_post)
1486 (adjust_aux_in_post, adjust_aux_out_pre, adjust_aux_out_post):
1487 Remove functions and their associated #defines.
1488 * coffcode.h (coff_mkobject_hook): Remove stub copying code.
1489 * libcoff-in.h: (struct coff_tdata): New field stub_size.
1490 Rename field go32stub to stub.
1491 * libcoff.h: Regenerate.
1492 * coff-stgo32.c (go32_check_format): Rename to...
1493 (go32exe_check_format): ...this.
1494 (go32_stubbed_coff_bfd_copy_private_bfd_data): Rename to...
1495 (go32exe_copy_private_bfd_data): ...this.
1496 (stub_bytes): Rename to...
1497 (go32exe_default_stub): ...this.
1498 (create_go32_stub): Rename to...
1499 (go32exe_create_stub): ...this.
1500 * coff-stgo32.c (go32exe_copy_private_bfd_data): Avoid realloc
1503 2020-04-01 H.J. Lu <hongjiu.lu@intel.com>
1507 * elf32-i386.c (elf_i386_convert_load_reloc): Convert load
1508 relocation to R_386_32 for relocation against non-preemptible
1510 (elf_i386_check_relocs): Call _bfd_elf_x86_valid_reloc_p. Don't
1511 allocate dynamic relocation for non-preemptible absolute symbol.
1512 (elf_i386_relocate_section): Pass sec to
1513 GENERATE_DYNAMIC_RELOCATION_P.
1514 * elf64-x86-64.c (R_X86_64_converted_reloc_bit): Moved.
1515 (elf_x86_64_convert_load_reloc): Covert load relocation to
1516 R_X86_64_32S or R_X86_64_32 for relocation against non-preemptible
1517 absolute symbol. Don't convert to R_X86_64_32S nor R_X86_64_32
1518 for non-preemptible absolute symbol if they overflow.
1519 (elf_x86_64_check_relocs): Call _bfd_elf_x86_valid_reloc_p. Set
1520 tls_type for GOT slot to GOT_ABS for non-preemptible absolute
1521 symbol. Don't allocate dynamic relocation for non-preemptible
1523 (elf_x86_64_relocate_section): Don't generate relative relocation
1524 for GOTPCREL relocations aganst local absolute symbol. Pass sec
1525 to GENERATE_DYNAMIC_RELOCATION_P.
1526 * elfxx-x86.c (elf_x86_allocate_dynrelocs): No dynamic relocation
1527 against non-preemptible absolute symbol.
1528 (_bfd_elf_x86_valid_reloc_p): New function.
1529 (_bfd_x86_elf_size_dynamic_sections): No dynamic relocation for
1531 * elfxx-x86.h (GENERATE_DYNAMIC_RELOCATION_P): Add an SEC
1532 argument. Don't generate dynamic relocation against
1533 non-preemptible absolute symbol.
1534 (ABS_SYMBOL_P): New.
1535 (GENERATE_RELATIVE_RELOC_P): Don't generate relative relocation
1536 against non-preemptible absolute symbol.
1538 (R_X86_64_converted_reloc_bit): New. Moved from elf64-x86-64.c.
1539 (_bfd_elf_x86_valid_reloc_p): New.
1541 2020-04-01 Tamar Christina <tamar.christina@arm.com>
1544 * elf32-arm.c (elf32_arm_populate_plt_entry): Set LSB of the PLT0
1545 address in the GOT if in thumb only mode.
1547 2020-04-01 Tamar Christina <tamar.christina@arm.com>
1549 * elf32-arm.c (elf32_thumb2_plt_entry): Fix PC-rel offset.
1551 2020-04-01 Hans-Peter Nilsson <hp@bitrange.com>
1553 * mmo.c (mmo_scan): Create .text section only when needed, not
1556 2020-03-31 Alan Modra <amodra@gmail.com>
1558 * coff-alpha.c (alpha_ecoff_get_elt_at_filepos): Correct bfd_bread
1561 2020-03-31 Alan Modra <amodra@gmail.com>
1563 * vms-alpha.c (image_write): Check bounds for sections without
1564 contents too. Error on non-zero write to section without
1566 (_bfd_vms_slurp_etir): Check return of image_write* functions.
1568 2020-03-31 Alan Modra <amodra@gmail.com>
1570 * tekhex.c (pass_over): Check is_eof before reading buffer.
1572 2020-03-30 Nick Clifton <nickc@redhat.com>
1575 * libcoff-in.h (struct pe_tdata): Rename the insert_timestamp
1576 field to timestamp and make it an integer.
1577 * libcoff.h: Regenerate.
1578 * peXXigen.c (_bfd_XXi_only_swap_filehdr_out): Test the timestamp
1579 field in the pe_data structure rather than the insert_timestamp
1582 2020-03-30 Alan Modra <amodra@gmail.com>
1585 * elf64-ppc.c (ppc64_elf_build_stubs): Use asprintf to form
1588 2020-03-26 Nick Clifton <nickc@redhat.com>
1590 * cofflink.c (bfd_coff_get_internal_extra_pe_aouthdr): Delete.
1591 * libbfd-in.h (bfd_coff_get_internal_extra_pe_aouthdr): Remove
1593 * libbfd.h: Regenerate.
1595 2020-03-26 Alan Modra <amodra@gmail.com>
1597 * i386msdos.c (msdos_object_p): Catch -1 return from bfd_bread.
1599 2020-03-26 Alan Modra <amodra@gmail.com>
1601 * vms-alpha.c (dst_define_location): Limit size of dst_ptr_offsets
1603 (_bfd_vms_slurp_object_records): Rename "err" to "ok".
1605 2020-03-25 Nick Clifton <nickc@redhat.com>
1607 * cofflink.c (bfd_coff_get_internal_extra_pe_aouthdr): New
1609 * libbfd-in.h (bfd_coff_get_internal_extra_pe_aouthdr): Prototype.
1610 * libbfd.h: Regenerate.
1612 2020-03-25 Shahab Vahedi <shahab@synopsys.com>
1614 * elf32-arc.c (PRINT_DEBUG_RELOC_INFO_BEFORE): Use the
1615 correct field name in the output string.
1617 2020-03-25 Alan Modra <amodra@gmail.com>
1620 * elf.c (assign_file_positions_for_load_sections): Adjust offset
1621 for SHT_NOBITS section if first in segment.
1623 2020-03-24 H.J. Lu <hongjiu.lu@intel.com>
1626 * elf-bfd.h (_bfd_elf_get_symbol_version_name): Renamed to ...
1627 (_bfd_elf_get_symbol_version_string): This.
1628 * elf.c (_bfd_elf_get_symbol_version_name): Renamed to ...
1629 (_bfd_elf_get_symbol_version_string): This.
1630 (bfd_elf_print_symbol): Pass TRUE to
1631 _bfd_elf_get_symbol_version_string.
1632 * libbfd-in.h (_bfd_nosymbols_get_symbol_version_string): Add a
1633 bfd_boolean argument.
1634 * syms.c (_bfd_nosymbols_get_symbol_version_string): Likewise.
1635 * targets.c (_bfd_get_symbol_version_string): Likewise.
1636 (bfd_get_symbol_version_string): Likewise.
1637 * bfd-in2.h: Regenerated.
1639 2020-03-24 Nick Clifton <nickc@redhat.com>
1640 Jaydeep Chauhan <jaydeepchauhan1494@gmail.com>
1643 * bfdio.c (_bfd_real_fopen): Add code to handle long filenames on
1646 2020-03-24 Nick Clifton <nickc@redhat.com>
1649 * elf.c (_bfd_elf_map_sections_to_segments): When looking for a
1650 segment to use for PT_GNU_RELRO, ignore empty sections in a
1651 segment's current list.
1653 2020-03-24 H.J. Lu <hongjiu.lu@intel.com>
1656 * elf-bfd.h (elf_obj_tdata): Change num_group to unsigned int.
1658 2020-03-24 H.J. Lu <hongjiu.lu@intel.com>
1661 * elf-bfd.h (_bfd_elf_get_symbol_version_name): New.
1662 * elf.c (_bfd_elf_get_symbol_version_name): New function. Based
1663 on the previous _bfd_elf_get_symbol_version_string.
1664 (_bfd_elf_get_symbol_version_string): Use it.
1666 2020-03-24 Alan Modra <amodra@gmail.com>
1668 * archive.c (_bfd_generic_read_ar_hdr_mag): Sanity check extended
1669 name size. Use bfd_malloc rather than bfd_zmalloc, clearing just
1672 2020-03-23 Sebastian Huber <sebastian.huber@embedded-brains.de>
1674 * elflink.c (_bfd_elf_tls_setup): Mention .tdata in comment.
1676 2020-03-23 Alan Modra <amodra@gmail.com>
1678 * ecoff.c (_bfd_ecoff_slurp_armap): Sanity check parsed_size and
1679 symbol count. Allocate an extra byte to ensure name strings
1680 are terminated. Sanity check name offsets. Release memory on
1683 2020-03-23 Alan Modra <amodra@gmail.com>
1685 * i386msdos.c (msdos_object_p): Don't access e_lfanew when that
1686 field hasn't been read. Remove unnecessary casts.
1688 2020-03-22 Alan Modra <amodra@gmail.com>
1690 * coff64-rs6000.c (xcoff64_slurp_armap): Ensure size is large
1691 enough to read number of symbols.
1693 2020-03-20 H.J. Lu <hongjiu.lu@intel.com>
1695 * configure.ac (HAVE_EXECUTABLE_SUFFIX): Removed.
1696 (EXECUTABLE_SUFFIX): Likewise.
1697 * config.in: Regenerated.
1698 * configure: Likewise.
1699 * plugin.c (bfd_plugin_close_and_cleanup): Defined as
1700 _bfd_generic_close_and_cleanup.
1701 (plugin_list_entry): Remove resolution_file, resolution_option,
1702 real_bfd, real_nsyms, real_syms, lto_nsyms, lto_syms, gcc,
1703 lto_wrapper, gcc_env and initialized,
1704 (need_lto_wrapper_p): Removed.
1705 (get_lto_wrapper): Likewise.
1706 (setup_lto_wrapper_env): Likewise.
1707 (register_all_symbols_read): Likewise.
1708 (egister_cleanup): Likewise.
1709 (get_symbols): Likewise.
1710 (add_input_file): Likewise.
1711 (bfd_plugin_set_program_name): Remove need_lto_wrapper.
1712 (add_symbols): Updated.
1713 (try_claim): Likewise.
1714 (try_load_plugin): Likewise.
1715 (bfd_plugin_canonicalize_symtab): Likewise.
1716 * plugin.h (bfd_plugin_set_program_name): Remove int argument.
1717 (plugin_data_struct): Remove real_bfd, real_nsyms and real_syms.
1719 2020-03-19 H.J. Lu <hongjiu.lu@intel.com>
1722 * plugin.c (plugin_list_entry): Add has_symbol_type.
1723 (add_symbols_v2): New function.
1724 (bfd_plugin_open_input): Don't invoke LTO wrapper if LTO plugin
1725 provides symbol type.
1726 (try_load_plugin): Add LDPT_ADD_SYMBOLS_V2.
1727 (bfd_plugin_canonicalize_symtab): Use LTO plugin symbol type if
1730 2020-03-20 Alan Modra <amodra@gmail.com>
1732 * coff-rs6000.c (_bfd_xcoff_slurp_armap): Ensure size is large
1733 enough to read number of symbols.
1735 2020-03-20 Alan Modra <amodra@gmail.com>
1737 * elf.c (_bfd_elf_setup_sections): Don't test known non-NULL
1738 backend functions for NULL before calling.
1739 (copy_special_section_fields, _bfd_elf_copy_private_bfd_data),
1740 (bfd_section_from_shdr, assign_section_numbers): Likewise.
1741 * elfcode.h (elf_write_relocs, elf_slurp_reloc_table): Likewise.
1742 * elfnn-ia64.c (ignore_errors): New function.
1743 (elf_backend_link_order_error_handler): Redefine as ignore_errors.
1745 2020-03-19 Nick Clifton <nickc@redhat.com>
1748 * dwarf2.c (struct varinfo): Add unit_offset field to record the
1749 location of the varinfo in the unit's debug info data. Change the
1750 type of the stack field to a boolean.
1751 (lookup_var_by_offset): New function. Returns the varinfo
1752 structure for the variable described at the given offset in the
1754 (scan_unit_for_symbols): Add support for variables which have the
1755 DW_AT_specification attribute.
1757 2020-03-19 Nick Clifton <nickc@redhat.com>
1760 * elf.c (bfd_elf_set_group_contents): Replace assertion with an
1763 2020-03-19 Sebastian Huber <sebastian.huber@embedded-brains.de>
1765 * elfxx-riscv.c (riscv_parse_subset): Don't use C99.
1767 2020-03-18 Nick Clifton <nickc@redhat.com>
1770 * elf.c (_bfd_elf_write_secondary_reloc_section): Fix illegal
1771 memory access when processing a corrupt secondary reloc section.
1773 2020-03-18 Christophe Lyon <christophe.lyon@linaro.org>
1775 * elf32-arm.c (arm_build_one_stub): Emit a fatal error message
1776 instead of calling abort.
1777 * elf32-csky.c (csky_build_one_stub): Likewise.
1778 * elf32-hppa.c (hppa_build_one_stub): Likewise.
1779 * elf32-m68hc11.c (m68hc11_elf_build_one_stub): Likewise.
1780 * elf32-m68hc12.c (m68hc12_elf_build_one_stub): Likewise.
1781 * elf32-metag.c (metag_build_one_stub): Likewise.
1782 * elf32-nios2.c (nios2_build_one_stub): Likewise.
1783 * elf64-ppc.c (ppc_build_one_stub): Likewise.
1784 (ppc_size_one_stub): Likewise.
1785 * elfnn-aarch64.c (aarch64_build_one_stub): Likewise.
1787 2020-03-17 Nick Clifton <nickc@redhat.com>
1790 * elf.c (_bfd_elf_copy_special_section_fields): Replace assertions
1791 with error messages.
1793 2020-03-17 Nick Clifton <nickc@redhat.com>
1796 * elf.c (_bfd_elf_slurp_secondary_reloc_section): Remove redundant
1797 free. Add free on another failure path.
1799 2020-03-16 Alan Modra <amodra@gmail.com>
1802 * elf.c (elf_sort_segments): Don't call bfd_octets_per_byte unless
1803 we have a non-zero section count. Do lma comparison in octets.
1805 2020-03-16 Alan Modra <amodra@gmail.com>
1807 * vms-alpha.c (dst_restore_location): Validate index into
1808 dst_ptr_offsets array before accessing. Return status.
1809 (dst_retrieve_location): Similarly, making "loc" parameter a
1810 pointer to return value.
1811 (_bfd_vms_slurp_etir): Update calls to above functions.
1813 2020-03-14 Kamil Rytarowski <n54@gmx.com>
1815 * configure.ac: Include netbsd-core.lo for all NetBSD arm and mips
1817 * configure: Regenerated.
1819 2020-03-14 Alan Modra <amodra@gmail.com>
1821 * section.c (BFD_FAKE_SECTIONS): Formatting.
1822 * bfd-in2.h: Regenerate.
1824 2020-03-13 Kamil Rytarowski <n54@gmx.com>
1826 * elf.c (elfcore_grok_netbsd_note): Add support for
1827 NT_NETBSDCORE_LWPSTATUS notes.
1829 2020-03-13 Christophe Lyon <christophe.lyon@linaro.org>
1831 * bfd-in2.h: Regenerate.
1832 * section.c (asection): Add already_assigned field.
1833 (BFD_FAKE_SECTION): Add default initializer for it.
1834 * ecoff.c (bfd_debug_section): Initialize already_assigned field.
1835 * elf32-arm.c (arm_build_one_stub): Add support for
1836 non_contiguous_regions.
1837 * elf32-csky.c (csky_build_one_stub): Likewise.
1838 * elf32-hppa.c (hppa_build_one_stub): Likewise.
1839 * elf32-m68hc11.c (m68hc11_elf_build_one_stub): Likewise.
1840 * elf32-m68hc12.c (m68hc12_elf_build_one_stub): Likewise.
1841 * elf32-metag.c (metag_build_one_stub): Likewise.
1842 * elf32-nios2.c (nios2_build_one_stub): Likewise.
1843 * elf64-ppc.c (ppc_build_one_stub): Likewise.
1844 (ppc_size_one_stub): Likewise.
1845 * elfnn-aarch64.c (aarch64_build_one_stub): Likewise.
1846 * elflink.c (elf_link_input_bfd): Likewise.
1848 2020-03-13 H.J. Lu <hongjiu.lu@intel.com>
1851 * elf-linker-x86.h (elf_linker_x86_params): Add
1852 static_before_all_inputs and has_dynamic_linker.
1853 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Report
1854 dynamic input objects if -static is passed at command-line
1855 before all input files without --dynamic-linker unless
1856 --no-dynamic-linker is used.
1858 2020-03-13 Kamil Rytarowski <n54@gmx.com>
1860 * elf.c (elfcore_grok_netbsd_note): Add support for aarch64.
1862 2020-03-13 Christian Eggers <ceggers@gmx.de>
1864 * bfd.c (bfd_record_phdr): New local "opb". Fix assignment of
1865 "p_paddr" from "at".
1866 * elfcode.h (bfd_from_remote_memory): Add units to several
1867 parameters. New local "opb". Fix usage of p_align. Fix
1868 calculation of "localbase" from "ehdr_vma" and "p_vaddr". Fix
1869 call of target_read_memory.
1870 * elflink.c (elf_fixup_link_order): Fix scope of "s" local. Fix
1871 calculation of "offset" and "output_offset".
1872 (bfd_elf_final_link): New local "opb". Fix calculation of "size"
1873 from "offset" and fix calculation of "end" from "vma+size". Fix
1874 comparison between "sh_addr" and "vma"/"output_offset".
1875 (bfd_elf_discard_info): Fix calculation of "eh_alignment".
1876 * elf-bfd.h (struct elf_link_hash_table): Add unit to tls_size
1878 * elf.c (_bfd_elf_map_sections_to_segments): Add unit (bytes/
1879 octets) to "wrap_to2 and "phdr_size" locals. Fix calculation of
1880 "wrap_to" value. Add unit (bytes) to phdr_lma variable. Fix
1881 assignment of p_paddr from phdr_lma. Fix comparison between
1882 "lma+size" and "next->lma".
1883 (elf_sort_segments): Fix assignment from p_paddr to lma.
1884 (assign_file_positions_for_load_sections): Add unit (bytes) to
1885 local "align". Fix calculation of local "off_adjust". Fix
1886 calculation of local "filehdr_vaddr".
1887 (assign_file_positions_for_non_load_sections): New local "opb".
1888 Fix calculation of "end" from "p_size". Fix comparison between
1889 "vma+SECTION_SIZE" and "start". Fix calculation of "p_memsz"
1890 from "end" and "p_vaddr".
1891 (rewrite_elf_program_header): Fix comparison between p_vaddr and
1892 vma. Fix assignment to p_paddr from lma. Fix comparison between
1893 p_paddr and lma. Fix assignment to p_paddr from lma.
1894 * merge.c (sec_merge_emit): New local "opb". Convert
1895 "alignment_power" to octets.
1896 (_bfd_add_merge_section): New locals "alignment_power" and
1897 "opb". Fix comparison between "alignment_power" and
1899 (_bfd_merge_sections): New local "opb". Divide size by opb
1900 before checking align mask.
1902 2020-03-13 Christian Eggers <ceggers@gmx.de>
1904 * elf.c (_bfd_elf_make_section_from_shdr): Introduce new temp
1905 opb. Divide Elf_Internal_Shdr::sh_addr by opb when setting
1907 (_bfd_elf_make_section_from_phdr): Similarly.
1908 (elf_fake_sections): Fix calculation of
1909 Elf_Internal_shdr::sh_addr from section VMA.
1910 (_bfd_elf_map_sections_to_segments): Fix mixup between octets
1912 (assign_file_positions_for_load_sections): Fix calculations of
1913 Elf_Internal_shdr::p_vaddr and p_paddr from section LMA/VMA. Fix
1914 comparison between program header address and section LMA.
1915 (assign_file_positions_for_non_load_sections): Likewise.
1916 (rewrite_elf_program_header): Likewise. Introduce new temp opb.
1917 (IS_CONTAINED_BY_VMA): Add parameter opb.
1918 (IS_CONTAINED_BY_LMA,IS_SECTION_IN_INPUT_SEGMENT,
1919 INCLUDE_SECTION_IN_SEGMENT): Likewise.
1920 (copy_elf_program_header): Update call to ELF_SECTION_IN_SEGMENT.
1921 Fix calculations of p_addr_valid and p_vaddr_offset.
1922 * elflink.c (elf_link_add_object_symbols): Multiply section VMA
1923 with octets per byte when comparing against p_vaddr.
1925 2020-03-11 Alan Modra <amodra@gmail.com>
1927 * som.c (setup_sections): Sanity check subspace.name.
1929 2020-03-11 Alan Modra <amodra@gmail.com>
1931 * elf64-ppc.c (ppc64_elf_inline_plt): Do increment rel in for loop.
1933 2020-03-10 Alan Modra <amodra@gmail.com>
1936 * ihex.c (ihex_write_object_contents): Don't assume ordering of
1939 2020-03-09 Alan Modra <amodra@gmail.com>
1941 * wasm-module.c (wasm_scan): Sanity check file name length
1942 before allocating memory. Move common section setup code. Do
1943 without bfd_tell to calculate section size.
1945 2020-03-06 Nick Clifton <nickc@redhat.com>
1947 * elf.c (_bfd_elf_set_section_contents): Replace call to abort
1948 with error messages and failure return values.
1950 2020-03-05 Max Filippov <jcmvbkbc@gmail.com>
1952 * elf32-xtensa.c (shrink_dynamic_reloc_sections): Shrink dynamic
1953 relocation sections for any removed reference to a dynamic symbol.
1955 2020-03-05 Nick Clifton <nickc@redhat.com>
1957 * elf-bfd.h (struct elf_backend_data): Add new fields:
1958 init_secondary_reloc_section, slurp_secondary_reloc_section,
1959 write_secondary_reloc_section.
1960 (_bfd_elf_init_secondary_reloc_section): Prototype.
1961 (_bfd_elf_slurp_secondary_reloc_section): Prototype.
1962 (_bfd_elf_write_secondary_reloc_section): Prototype.
1963 * elf.c ( bfd_section_from_shdr): Invoke the new
1964 init_secondary_reloc_section backend function, if defined, when a
1965 second reloc section is encountered.
1966 (swap_out_syms): Invoke the new symbol_section_index function, if
1967 defined, when computing the section index of an OS/PROC specific
1969 (_bfd_elf_init_secondary_reloc_section): New function.
1970 (_bfd_elf_slurp_secondary_reloc_section): New function.
1971 (_bfd_elf_write_secondary_reloc_section): New function.
1972 (_bfd_elf_copy_special_section_fields): New function.
1973 * elfcode.h (elf_write_relocs): Invoke the new
1974 write_secondary_relocs function, if defined, in order to emit
1976 (elf_slurp_reloc_table): Invoke the new slurp_secondary_relocs
1977 function, if defined, in order to read in secondary relocs.
1978 * elfxx-target.h (elf_backend_copy_special_section_fields):
1979 Provide a non-NULL default definition.
1980 (elf_backend_init_secondary_reloc_section): Likewise.
1981 (elf_backend_slurp_secondary_reloc_section): Likewise.
1982 (elf_backend_write_secondary_reloc_section): Likewise.
1983 (struct elf_backend_data elfNN_bed): Add initialisers for the new
1985 * configure.ac (score_elf32_[bl]e_vec): Add elf64.lo
1986 * configure: Regenerate.
1988 2020-03-05 Alan Modra <amodra@gmail.com>
1990 * archive64.c (_bfd_archive_64_bit_slurp_armap): Check parsed_size
1991 against file size before allocating memory. Use bfd_alloc rather
1992 than bfd_zalloc for carsym/strings memory.
1994 2020-03-04 Alan Modra <amodra@gmail.com>
1996 * elf.c (elf_fake_sections): Ensure sh_addralign is such that
1997 sh_addr mod sh_addalign is zero.
1999 2020-03-04 Alan Modra <amodra@gmail.com>
2001 * format.c (bfd_check_format_matches): Call cleanup on error exit.
2003 2020-03-03 Alan Modra <amodra@gmail.com>
2005 * format.c (struct bfd_preserve): Add cleanup field.
2006 (bfd_preserve_save): Add cleanup param and save.
2007 (bfd_preserve_restore): Return cleanup.
2008 (bfd_preserve_finish): Call the cleanup for the discarded match.
2009 (bfd_check_format_matches): Pass cleanup to bfd_preserve_save,
2010 and clear when preserving a match. Restore cleanup too when
2011 restoring that match.
2013 2020-03-02 Alan Modra <amodra@gmail.com>
2015 * cisco-core.c (cisco_core_file_p): Return bfd_cleanup.
2016 * hpux-core.c (hpux_core_core_file_p): Update prototype.
2017 * sco5-core.c (sco5_core_file_p): Return bfd_cleanup.
2018 (core_sco5_vec): Correct initialisers.
2020 2020-03-02 Alan Modra <amodra@gmail.com>
2022 * aix386-core.c (aix386_core_file_p): Return bfd_cleanup.
2023 * aix5ppc-core.c (xcoff64_core_p): Likewise.
2024 * cisco-core.c (cisco_core_file_validate): Likewise.
2025 * hppabsd-core.c (hppabsd_core_core_file_p): Likewise.
2026 * hpux-core.c (hpux_core_core_file_p): Likewise.
2027 * irix-core.c (irix_core_core_file_p): Likewise.
2028 * lynx-core.c (lynx_core_file_p): Likewise.
2029 * netbsd-core.c (netbsd_core_file_p): Likewise.
2030 * osf-core.c (osf_core_core_file_p): Likewise.
2031 * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
2032 * sco5-core.c (sco5_core_file_p): Likewise.
2034 2020-03-02 H.J. Lu <hongjiu.lu@intel.com>
2036 * trad-core.c (trad_unix_core_file_p): Return bfd_cleanup.
2038 2020-03-02 Alan Modra <amodra@gmail.com>
2040 * targets.c (bfd_cleanup): New typedef.
2041 (struct bfd <_bfd_check_format>): Return a bfd_cleanup.
2042 * libbfd-in.h (_bfd_no_cleanup): Define.
2043 * format.c (bfd_reinit): Add cleanup parameter, call it.
2044 (bfd_check_format_matches): Set cleanup from _bfd_check_format
2045 call and pass to bfd_reinit. Delete temp, use abfd->xvec instead.
2046 * aout-target.h (callback, object_p): Return bfd_cleanup.
2047 * aout-tic30.c (tic30_aout_callback, tic30_aout_object_p): Likewise.
2048 * archive.c (bfd_generic_archive_p): Likewise.
2049 * binary.c (binary_object_p): Likewise.
2050 * coff-alpha.c (alpha_ecoff_object_p): Likewise.
2051 * coff-ia64.c (ia64coff_object_p): Likewise.
2052 * coff-rs6000.c (_bfd_xcoff_archive_p, rs6000coff_core_p): Likewise.
2053 * coff-sh.c (coff_small_object_p): Likewise.
2054 * coff-stgo32.c (go32_check_format): Likewise.
2055 * coff64-rs6000.c (xcoff64_archive_p, rs6000coff_core_p),
2056 (xcoff64_core_p): Likewise.
2057 * coffgen.c (coff_real_object_p, coff_object_p): Likewise.
2058 * elf-bfd.h (bfd_elf32_object_p, bfd_elf32_core_file_p),
2059 (bfd_elf64_object_p, bfd_elf64_core_file_p): Likewise.
2060 * elfcode.h (elf_object_p): Likewise.
2061 * elfcore.h (elf_core_file_p): Likewise.
2062 * i386msdos.c (msdos_object_p): Likewise.
2063 * ihex.c (ihex_object_p): Likewise.
2064 * libaout.h (some_aout_object_p): Likewise.
2065 * libbfd-in.h (bfd_generic_archive_p, _bfd_dummy_target),
2066 (_bfd_vms_lib_alpha_archive_p, _bfd_vms_lib_ia64_archive_p): Likewise.
2067 * libbfd.c (_bfd_dummy_target): Likewise.
2068 * libcoff-in.h (coff_object_p): Likewise.
2069 * mach-o-aarch64.c (bfd_mach_o_arm64_object_p),
2070 (bfd_mach_o_arm64_core_p): Likewise.
2071 * mach-o-arm.c (bfd_mach_o_arm_object_p),
2072 (bfd_mach_o_arm_core_p): Likewise.
2073 * mach-o-i386.c (bfd_mach_o_i386_object_p),
2074 (bfd_mach_o_i386_core_p): Likewise.
2075 * mach-o-x86-64.c (bfd_mach_o_x86_64_object_p),
2076 (bfd_mach_o_x86_64_core_p): Likewise.
2077 * mach-o.c (bfd_mach_o_header_p, bfd_mach_o_gen_object_p),
2078 (bfd_mach_o_gen_core_p, bfd_mach_o_fat_archive_p): Likewise.
2079 * mach-o.h (bfd_mach_o_object_p, bfd_mach_o_core_p),
2080 (bfd_mach_o_fat_archive_p, bfd_mach_o_header_p): Likewise.
2081 * mmo.c (mmo_object_p): Likewise.
2082 * pef.c (bfd_pef_object_p, bfd_pef_xlib_object_p): Likewise.
2083 * peicode.h (coff_real_object_p, pe_ILF_object_p),
2084 (pe_bfd_object_p): Likewise.
2085 * plugin.c (ld_plugin_object_p, bfd_plugin_object_p): Likewise.
2086 * ppcboot.c (ppcboot_object_p): Likewise.
2087 * rs6000-core.c (rs6000coff_core_p): Likewise.
2088 * som.c (som_object_setup, som_object_p): Likewise.
2089 * srec.c (srec_object_p, symbolsrec_object_p): Likewise.
2090 * tekhex.c (tekhex_object_p): Likewise.
2091 * vms-alpha.c (alpha_vms_object_p): Likewise.
2092 * vms-lib.c (_bfd_vms_lib_archive_p, _bfd_vms_lib_alpha_archive_p),
2093 (_bfd_vms_lib_ia64_archive_p, _bfd_vms_lib_txt_archive_p): Likewise.
2094 * wasm-module.c (wasm_object_p): Likewise.
2095 * xsym.c (bfd_sym_object_p): Likewise.
2096 * xsym.h (bfd_sym_object_p): Likewise.
2097 * aoutx.h (some_aout_object_p): Likewise, and callback parameter
2099 * pdp11.c (some_aout_object_p): Likewise.
2100 * plugin.c (register_ld_plugin_object_p): Update object_p
2102 * plugin.h (register_ld_plugin_object_p): Likewise.
2103 * bfd-in2.h: Regenerate.
2104 * libbfd.h: Regenerate.
2105 * libcoff.h: Regenerate.
2107 2020-03-02 Alan Modra <amodra@gmail.com>
2109 * coff-alpha.c (alpha_ecoff_le_vec): Add SEC_SMALL_DATA to
2110 applicable section flags.
2111 * coff-mips.c (mips_ecoff_le_vec, mips_ecoff_be_vec): Likewise.
2112 (mips_ecoff_bele_vec): Likewise.
2113 * coffcode.h (sec_to_styp_flags): Set SEC_SMALL_DATA for .sdata
2115 * ecoff.c (_bfd_ecoff_new_section_hook): Likewise.
2116 (_bfd_ecoff_styp_to_sec_flags): Likewise.
2118 2020-03-02 Alan Modra <amodra@gmail.com>
2120 * elf32-m32r.c (m32r_elf_section_flags): New function.
2121 (elf_backend_section_flags): Define.
2122 * elf32-nds32.c (nds32_elf_section_flags): New function.
2123 (elf_backend_section_flags): Define.
2124 * elf32-ppc.c (ppc_elf_section_from_shdr): Set SEC_SMALL_DATA for
2125 .sbss and .sdata sections.
2126 * elf32-v850.c (v850_elf_section_from_shdr): Set SEC_SMALL_DATA
2127 for SHF_V850_GPREL sections.
2128 * elf64-alpha.c (elf64_alpha_section_from_shdr): Delete outdated
2130 * elf64-hppa.c (elf64_hppa_section_from_shdr): Set SEC_SMALL_DATA
2131 for SHF_PARISC_SHORT sections.
2132 * elf64-ppc.c (ppc64_elf_section_flags): New function.
2133 (elf_backend_section_flags): Define.
2134 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Set SEC_SMALL_DATA
2135 for SHF_MIPS_GPREL sections. Delete FIXME.
2137 2020-03-02 Alan Modra <amodra@gmail.com>
2139 * elf-bfd.h (elf_backend_section_flags): Remove flagword* param.
2140 * elf.c (_bfd_elf_make_section_from_shdr): Set section flags before
2141 calling elf_backend_section_flags with adjusted params. Use
2142 newsect->flags past that point.
2143 (_bfd_elf_new_section_hook): Always set sh_type and sh_flags for
2145 (_bfd_elf_init_private_section_data): Allow normal sh_type sections
2146 to have their type overridden, and all sh_flags but processor and
2148 * elf32-arm.c (elf32_arm_section_flags): Adjust for changed params.
2149 * elf32-mep.c (mep_elf_section_flags): Likewise.
2150 * elf32-nios2.c (nios2_elf32_section_flags): Likewise.
2151 * elf64-alpha.c (elf64_alpha_section_flags): Likewise.
2152 * elf64-ia64-vms.c (elf64_ia64_section_flags): Likewise.
2153 * elfnn-ia64.c (elfNN_ia64_section_flags): Likewise.
2154 * elfnn-aarch64.c (elfNN_aarch64_size_stubs): Exclude the linker
2155 stub BFD and non-aarch64 input files when scanning for stubs.
2157 2020-03-02 Alan Modra <amodra@gmail.com>
2159 * coff-alpha.c (alpha_ecoff_get_elt_at_filepos): Provide an upper
2160 limit to decompressed element size.
2162 2020-03-02 Alan Modra <amodra@gmail.com>
2164 * vms-lib.c (vms_traverse_index): Add recur_count param and
2165 update calls. Fail on excessive recursion.
2167 2020-03-02 Alan Modra <amodra@gmail.com>
2169 * vms-alpha.c (vms_get_remaining_object_record): Use
2170 bfd_realloc_or_free rather than bfd_realloc.
2171 (add_symbol_entry, vector_grow1, alpha_vms_slurp_relocs): Likewise.
2172 (dst_define_location, parse_module): Likewise, and check realloc
2173 return status before using memory. Return status from function
2174 adjusting all callers.
2176 2020-02-28 Alan Modra <amodra@gmail.com>
2178 * vms-lib.c (_bfd_vms_lib_archive_p): Free memory on error paths.
2180 2020-02-28 Alan Modra <amodra@gmail.com>
2182 * vms-alpha.c (alpha_vms_object_p): Use _bfd_malloc_and_read.
2183 Remove duplicate undersize check.
2185 2020-02-27 Alan Modra <amodra@gmail.com>
2188 * mmo.c (mmo_scan): Set SEC_DATA for .data.
2190 2020-02-27 Alan Modra <amodra@gmail.com>
2193 * syms.c (stt): Trim off all but 'e', 'i' and 'p' entries.
2194 (coff_section_type): Adjust comment.
2195 (decode_section_type): Likewise. Call coff_section_type before
2196 decode_section_type.
2197 (bfd_decode_symclass): Use 'c' for common sections other than
2200 2020-02-27 Alan Modra <amodra@gmail.com>
2202 * coff-rs6000.c (_bfd_xcoff_read_ar_hdr): Put all data in one
2205 2020-02-27 Alan Modra <amodra@gmail.com>
2207 * bfd.c (bfd_stat_arch_elt): Use vector of containing archive,
2208 if file is an archive element.
2209 * bfd-in2.h: Regenerate.
2211 2020-02-26 Alan Modra <amodra@gmail.com>
2213 * archive.c (do_slurp_bsd_armap): Increase minimum parsed_size, and
2214 bfd_set_error on failing test. Don't bother changing bfd_error on
2215 file read error. Check symdef_count is multiple of BSD_SYMDEF_SIZE.
2216 Check sym name is within string buffer. Use size_t for some vars.
2217 (do_slurp_coff_armap): Use size_t for some variables, fix size of
2218 int_buf. Don't change bfd_error on file read error. Use
2219 _bfd_mul_overflow when calculating carsym buffer size. Reorder
2220 calculations to catch overflows before they occur. malloc and
2221 free raw armap rather than using bfd_alloc. Read raw armap before
2222 allocating carsym+strings buffer.
2223 (_bfd_slurp_extended_name_table): Localize variables. Check
2224 name size against file size.
2226 2020-02-26 Alan Modra <amodra@gmail.com>
2228 * vms-lib.c (vms_lib_read_index): Release correct buffer.
2230 2020-02-26 Alan Modra <amodra@gmail.com>
2232 * elf32-rx.c (rx_elf_relocate_section): Use bfd_malloc rather than
2233 malloc. Check for NULL return from bfd_malloc.
2234 (rx_table_find, rx_table_map): Likewise.
2235 (rx_set_section_contents): Check bfd_alloc return.
2236 (rx_dump_symtab): Don't alloc internal_syms or external_syms.
2238 2020-02-26 Alan Modra <amodra@gmail.com>
2240 * aoutx.h: Indent labels correctly. Format error strings.
2241 * archive.c: Likewise.
2242 * archive64.c: Likewise.
2243 * coff-arm.c: Likewise.
2244 * coff-rs6000.c: Likewise.
2245 * coff-stgo32.c: Likewise.
2246 * cpu-arm.c: Likewise.
2247 * dwarf2.c: Likewise.
2248 * elf-ifunc.c: Likewise.
2249 * elf-properties.c: Likewise.
2250 * elf-s390-common.c: Likewise.
2251 * elf-strtab.c: Likewise.
2253 * elf32-arm.c: Likewise.
2254 * elf32-bfin.c: Likewise.
2255 * elf32-cr16.c: Likewise.
2256 * elf32-csky.c: Likewise.
2257 * elf32-i386.c: Likewise.
2258 * elf32-m68k.c: Likewise.
2259 * elf32-msp430.c: Likewise.
2260 * elf32-nds32.c: Likewise.
2261 * elf32-nios2.c: Likewise.
2262 * elf32-pru.c: Likewise.
2263 * elf32-xtensa.c: Likewise.
2264 * elf64-ia64-vms.c: Likewise.
2265 * elf64-x86-64.c: Likewise.
2266 * elfcode.h: Likewise.
2267 * elfcore.h: Likewise.
2268 * elflink.c: Likewise.
2269 * elfnn-aarch64.c: Likewise.
2270 * elfnn-ia64.c: Likewise.
2271 * elfnn-riscv.c: Likewise.
2272 * elfxx-mips.c: Likewise.
2273 * elfxx-sparc.c: Likewise.
2274 * elfxx-x86.c: Likewise.
2275 * i386lynx.c: Likewise.
2276 * merge.c: Likewise.
2277 * pdp11.c: Likewise.
2278 * plugin.c: Likewise.
2279 * reloc.c: Likewise.
2281 2020-02-26 Alan Modra <amodra@gmail.com>
2284 * elf-bfd.h (struct elf_link_hash_table): Rename "loaded" to
2286 (bfd_elf_add_dt_needed_tag): Declare.
2287 * elf-strtab.c (_bfd_elf_strtab_restore): Handle NULL buf.
2288 * elflink.c (bfd_elf_add_dt_needed_tag): Make global and rename
2289 from elf_add_dt_needed_tag. Remove soname and doit param.
2290 (elf_link_add_object_symbols): Don't use elf_add_dt_needed_tag
2291 to see whether as-needed lib is already loaded, use dyn_loaded
2292 list instead. When saving and restoring around as-needed lib
2293 handle possibility that dynstr has not been initialised. Don't
2294 add DT_NEEDED tags here. Limit dyn_loaded list to dynamic libs.
2295 Mark libs loaded via DT_NEEDED entries of other libs with
2296 DYN_NO_NEEDED if they should not be mentioned in DT_NEEDED of
2298 (elf_link_check_versioned_symbol): Remove now unneccesary
2299 DYNAMIC check when traversing dyn_loaded list.
2301 2020-02-26 Alan Modra <amodra@gmail.com>
2303 * bfdio.c (bfd_get_file_size): Ignore bogus archive element sizes.
2305 2020-02-25 H.J. Lu <hongjiu.lu@intel.com>
2308 * plugin.c (need_lto_wrapper_p): New.
2309 (bfd_plugin_set_program_name): Add an int argument to set
2311 (get_lto_wrapper): Return FALSE if need_lto_wrapper_p isn't
2313 * plugin.h (bfd_plugin_set_program_name): Add an int argument.
2315 2020-02-24 Alan Modra <amodra@gmail.com>
2317 * vms-lib.c (_bfd_vms_lib_archive_p): Correct overflow checks.
2319 2020-02-24 Alan Modra <amodra@gmail.com>
2321 * vms-lib.c (struct carsym_mem): Add limit.
2322 (vms_add_index): Heed limit.
2323 (vms_traverse_index): Catch buffer overflows. Remove outdated fixme.
2324 (vms_lib_read_index): Set up limit. Catch 32-bit overflow.
2325 Always return actual number read.
2326 (_bfd_vms_lib_archive_p): Catch buffer overflows. Replace
2327 assertion with error exit.
2329 2020-02-22 Alan Modra <amodra@gmail.com>
2332 * elf.c (assign_file_positions_for_load_sections): Continue linking
2333 on "PHDR segment not covered by LOAD segment" errors.
2335 2020-02-21 Alan Modra <amodra@gmail.com>
2337 * mach-o.c (bfd_mach_o_canonicalize_relocs): Fix ineffective
2339 (bfd_mach_o_canonicalize_reloc): Likewise.
2340 (bfd_mach_o_canonicalize_dynamic_reloc): Likewise. Sanity check
2341 counts and offsets against file size.
2342 (bfd_mach_o_build_dysymtab): Fix ineffective overflow check.
2343 (bfd_mach_o_mangle_sections): Remove unnecessary overflow check.
2344 (bfd_mach_o_read_symtab_symbols): Sanity check count and offset
2345 against file size. Delete symbol table error message.
2346 (bfd_mach_o_read_dysymtab): Sanity check counts and offsets
2348 (bfd_mach_o_read_symtab): Likewise.
2349 (bfd_mach_o_read_command): Pass file size.
2350 (bfd_mach_o_scan): Sanity check command count against file size.
2352 2020-02-21 Alan Modra <amodra@gmail.com>
2355 * aoutx.h (adjust_o_magic, adjust_z_magic, adjust_n_magic): Use
2356 "text", "data" and "bss" section pointer vars. Don't update
2357 section size, just exec header sizes.
2358 (adjust_sizes_and_vmas): Don't update text section size. Set
2359 initial exec header a_text. Print exec headers sizes.
2360 * pdp11.c (adjust_o_magic, adjust_z_magic, adjust_n_magic),
2361 (adjust_sizes_and_vmas): Similarly. Formatting.
2362 (final_link): Correct final file extension.
2364 2020-02-20 Nick Clifton <nickc@redhat.com>
2366 * elf-bfd.h (struct elf_backend_data): Add symbol_section_index
2368 * elfxx-target.h (elf_backend_symbol_section_index): Provide
2370 (elfNN_bed): Initialise the symbol_section_index field.
2371 * elf.c (swap_out_syms): Call symbol_section_index, if defined, on
2372 OS and PROC specific section indicies. Warn if converting other
2373 reserved incidies to SHN_ABS.
2375 2020-02-19 Sergey Belyashov <sergey.belyashov@gmail.com>
2378 * cpu-z80.c: Add machine type compatibility checking.
2380 2020-02-19 H.J. Lu <hongjiu.lu@intel.com>
2383 * plugin.c (plugin_list_entry): Remove handle.
2384 (try_load_plugin): Call dlclose before return.
2386 2020-02-19 Alan Modra <amodra@gmail.com>
2388 * libbfd-in.h (_bfd_constant_p): Define.
2389 (_bfd_alloc_and_read, _bfd_malloc_and_read): Check read size against
2390 file size before allocating memory.
2391 * coffgen.c (_bfd_coff_get_external_symbols): Remove file size check.
2392 * elf.c (bfd_elf_get_str_section): Likewise.
2393 (_bfd_elf_slurp_version_tables): Likewise.
2394 * libbfd.h: Regenerate.
2396 2020-02-19 Alan Modra <amodra@gmail.com>
2398 * libbfd-in.h (_bfd_alloc_and_read, _bfd_malloc_and_read): New.
2399 * aoutx.h (aout_get_external_symbols): Replace calls to
2400 bfd_[m]alloc and bfd_bread with call to _bfd_[m]alloc_and_read.
2401 (slurp_reloc_table): Likewise.
2402 * archive.c (do_slurp_bsd_armap): Likewise.
2403 (do_slurp_coff_armap): Likewise.
2404 * archive64.c (_bfd_archive_64_bit_slurp_armap): Likewise.
2405 * coff-rs6000.c (_bfd_xcoff_slurp_armap): Likewise.
2406 * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
2407 * coffcode.h (coff_set_arch_mach_hook, buy_and_read): Likewise.
2408 * coffgen.c (coff_real_object_p, coff_object_p, build_debug_section),
2409 (_bfd_coff_get_external_symbols): Likewise.
2410 * ecoff.c (ecoff_slurp_symbolic_header),
2411 (_bfd_ecoff_slurp_symbolic_info, ecoff_slurp_reloc_table),
2412 (_bfd_ecoff_slurp_armap, ecoff_link_add_object_symbols, READ),
2413 (ecoff_indirect_link_order): Likewise.
2414 * elf.c (bfd_elf_get_str_section, setup_group, elf_read_notes),
2415 (_bfd_elf_slurp_version_tables): Likewise.
2416 * elf32-m32c.c (m32c_elf_relax_section): Likewise.
2417 * elf32-rl78.c (rl78_elf_relax_section): Likewise.
2418 * elf32-rx.c (elf32_rx_relax_section): Likewise.
2419 * elf64-alpha.c (READ): Likewise.
2420 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Likewise.
2421 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Likewise.
2422 * elfcode.h (elf_slurp_symbol_table),
2423 (elf_slurp_reloc_table_from_section): Likewise.
2424 * elflink.c (elf_link_add_object_symbols),
2425 (elf_link_check_versioned_symbol): Likewise.
2426 * elfxx-mips.c (READ): Likewise.
2427 * i386lynx.c (slurp_reloc_table): Likewise.
2428 * lynx-core.c (lynx_core_file_p): Likewise.
2429 * mach-o.c (bfd_mach_o_canonicalize_relocs),
2430 (bfd_mach_o_read_symtab_strtab, bfd_mach_o_alloc_and_read),
2431 (bfd_mach_o_read_prebound_dylib, bfd_mach_o_read_dyld_content
2432 * pdp11.c (aout_get_external_symbols, slurp_reloc_table
2433 * pef.c (bfd_pef_print_loader_section, bfd_pef_scan_start_address),
2434 (bfd_pef_parse_symbols): Likewise.
2435 * peicode.h (pe_ILF_object_p, pe_bfd_object_p
2436 * som.c (setup_sections, som_slurp_string_table),
2437 (som_slurp_reloc_table, som_bfd_count_ar_symbols),
2438 (som_bfd_fill_in_ar_symbols): Likewise.
2439 * vms-alpha.c (module_find_nearest_line, evax_bfd_print_dst),
2440 (evax_bfd_print_image): Likewise.
2441 * vms-lib.c (_bfd_vms_lib_archive_p): Likewise.
2442 * wasm-module.c (wasm_scan): Likewise.
2443 * xcofflink.c (xcoff_link_add_symbols): Likewise.
2444 * xsym.c (bfd_sym_read_name_table),
2445 (bfd_sym_print_type_information_table_entry): Likewise.
2446 * libbfd.h: Regenerate.
2448 2020-02-19 Alan Modra <amodra@gmail.com>
2450 * aoutx.h (slurp_reloc_table): Allocate reloc_cache after
2451 reading external relocs.
2452 * ecoff.c (ecoff_slurp_reloc_table): Likewise.
2453 * archive.c (_bfd_write_archive_contents): Don't twiddle bfd_error
2455 * archive64.c (_bfd_archive_64_bit_slurp_armap): Remove unnecessary
2457 * elf32-m32c.c (m32c_offset_for_reloc): Make shndx_buf a bfd_byte*.
2458 (m32c_elf_relax_section): Likewise.
2459 * elf32-rl78.c (rl78_offset_for_reloc): Likewise.
2460 (rl78_elf_relax_section): Likewise.
2461 * elf32-rx.c (rx_offset_for_reloc): Likewise.
2462 (elf32_rx_relax_section): Likewise.
2463 * mach-o.c (bfd_mach_o_alloc_and_read): Move earlier with better
2464 parameter types and use..
2465 (bfd_mach_o_read_dylinker, bfd_mach_o_read_dylib),
2466 (bfd_mach_o_read_fvmlib, bfd_mach_o_read_str): ..in these functions.
2467 * peicode.h (pe_bfd_object_p): Don't zero the part of opthdr
2468 being read from file, just the extra.
2469 * som.c (som_slurp_symbol_table): Allocate internal symbol buffer
2470 after reading external syms. Free on failure.
2472 2020-02-19 Alan Modra <amodra@gmail.com>
2474 * coffcode.h (buy_and_read, coff_slurp_line_table),
2475 (coff_slurp_symbol_table, coff_slurp_reloc_table): Replace
2476 bfd_[z][m]alloc2 calls with _bfd_mul_overflow followed by the
2477 corresponding bfd_alloc call. Adjust variables to suit.
2478 * coffgen.c (_bfd_coff_get_external_symbols): Likewise.
2479 * ecoff.c (_bfd_ecoff_slurp_symbolic_info),
2480 (_bfd_ecoff_slurp_symbol_table, READ): Likewise.
2481 * elf.c (bfd_elf_get_elf_syms, setup_group, bfd_section_from_shdr),
2482 (swap_out_syms, _bfd_elf_slurp_version_tables): Likewise.
2483 * elf32-m32c.c (m32c_elf_relax_section): Likewise.
2484 * elf32-rl78.c (rl78_elf_relax_section): Likewise.
2485 * elf32-rx.c (elf32_rx_relax_section): Likewise.
2486 * elf64-alpha.c (READ): Likewise.
2487 * elfcode.h (elf_object_p, elf_write_relocs, elf_write_shdrs_and_ehdr),
2488 (elf_slurp_symbol_table, elf_slurp_reloc_table),
2489 (bfd_from_remote_memory): Likewise.
2490 * elfcore.h (core_find_build_id): Likewise.
2491 * elfxx-mips.c (READ): Likewise.
2492 * mach-o.c (bfd_mach_o_mangle_sections),
2493 (bfd_mach_o_read_symtab_symbols, bfd_mach_o_read_thread),
2494 (bfd_mach_o_read_dysymtab, bfd_mach_o_flatten_sections),
2495 (bfd_mach_o_scan, bfd_mach_o_fat_archive_p): Likewise.
2496 * som.c (setup_sections, som_prep_for_fixups)
2497 (som_build_and_write_symbol_table, som_slurp_symbol_table),
2498 (som_slurp_reloc_table, som_bfd_count_ar_symbols),
2499 (som_bfd_fill_in_ar_symbols, som_slurp_armap),
2500 (som_bfd_ar_write_symbol_stuff): Likewise.
2501 * vms-alpha.c (vector_grow1): Likewise.
2502 * vms-lib.c (vms_add_index): Likewise.
2503 * wasm-module.c (wasm_scan_name_function_section): Likewise.
2504 * libbfd.c (bfd_malloc2, bfd_realloc2, bfd_zmalloc2): Delete.
2505 * opncls.c (bfd_alloc2, bfd_zalloc2): Delete.
2506 * libbfd-in.h (bfd_malloc2, bfd_realloc2, bfd_zmalloc2),
2507 (bfd_alloc2, bfd_zalloc2): Delete.
2508 (_bfd_mul_overflow): Define.
2509 * libbfd.h: Regenerate.
2511 2020-02-19 Alan Modra <amodra@gmail.com>
2513 * elf.c (bfd_section_from_shdr): Use bfd_zalloc rather than
2515 (assign_section_numbers): Likewise.
2516 (elf_map_symbols): Likewise, and bfd_alloc rather than bfd_alloc2.
2517 (_bfd_elf_map_sections_to_segments): Use bfd_malloc rather than
2518 bfd_malloc2, size_t amt, and unsigned tls_count.
2519 (rewrite_elf_program_header): Use bfd_malloc and size_t amt.
2520 * elflink.c (elf_create_symbuf): Use bfd_malloc.
2521 (elf_output_implib): Use bfd_alloc.
2523 2020-02-19 Alan Modra <amodra@gmail.com>
2525 * bfd.c (struct bfd): Move format and direction to other
2526 bitfields. Add "size".
2527 * bfdio.c (bfd_get_size): Cache size when not writing file.
2528 * opncls.c (bfd_get_debug_link_info_1): Allow for bfd_get_size
2529 returning zero, ie. unknown.
2530 (bfd_get_alt_debug_link_info): Likewise.
2531 * bfd-in2.h: Regenerate.
2533 2020-02-19 Alan Modra <amodra@gmail.com>
2535 * coffgen.c (_bfd_coff_get_external_symbols): Don't call
2536 bfd_get_file_size twice.
2537 (_bfd_coff_read_string_table): Allow for bfd_get_file_size
2538 zero, ie. unknown, return.
2539 * elf-attrs.c (_bfd_elf_parse_attributes): Likewise.
2540 * elfcode.h (elf_swap_shdr_in): Likewise.
2541 (elf_object_p): Don't call bfd_get_file_size twice and correct
2544 2020-02-19 Alan Modra <amodra@gmail.com>
2546 * mach-o.c (bfd_mach_o_flatten_sections): Return a bfd_boolean,
2547 FALSE if memory alloc fails. Adjust calls.
2548 * som.c (som_prep_for_fixups): Likewise.
2549 * vms-alpha.c (alpha_vms_add_fixup_lp, alpha_vms_add_fixup_ca),
2550 (alpha_vms_add_fixup_qr, alpha_vms_add_fixup_lr),
2551 (alpha_vms_add_lw_reloc, alpha_vms_add_qw_reloc): Likewise.
2552 * som.c (som_build_and_write_symbol_table): Return via error_return
2554 * vms-alpha.c (VEC_APPEND): Adjust for vector_grow1 changes.
2555 (VEC_APPEND_EL): Delete.
2556 (vector_grow1): Return pointer to element. Catch overflow.
2557 Return NULL on memory allocation failure.
2558 (alpha_vms_add_fixup_lp): Replace VEC_APPEND_EL with VEC_APPEND.
2559 (alpha_vms_add_fixup_ca): Likewise.
2560 (alpha_vms_link_add_object_symbols): Check VEC_APPEND result
2562 * elf.c (bfd_section_from_shdr): Check bfd_zalloc2 result.
2564 2020-02-19 Alan Modra <amodra@gmail.com>
2566 * aix386-core.c (aix386_core_file_p): Use size_t for "amt".
2567 * aout-target.h (object_p): Likewise.
2568 * aout-tic30.c (tic30_aout_object_p): Likewise.
2569 * aoutx.h (some_aout_object_p, mkobject, make_empty_symbol),
2570 (emit_stringtab, write_syms, link_hash_table_create),
2571 (aout_link_write_other_symbol): Likewise.
2572 * archive.c (_bfd_generic_mkarchive, bfd_generic_archive_p),
2573 (bfd_ar_hdr_from_filesystem, _bfd_write_archive_contents),
2574 (_bfd_compute_and_write_armap): Likewise.
2575 * archures.c (bfd_arch_list): Likewise.
2576 * bfd.c (bfd_record_phdr): Likewise.
2577 * binary.c (binary_canonicalize_symtab): Likewise.
2578 * cisco-core.c (cisco_core_file_validate): Likewise.
2579 * coff-arm.c (coff_arm_link_hash_table_create, find_thumb_glue),
2580 (find_arm_glue, record_arm_to_thumb_glue),
2581 (record_thumb_to_arm_glue): Likewise.
2582 * coff-ppc.c (ppc_coff_link_hash_table_create, record_toc),
2583 (ppc_allocate_toc_section): Likewise.
2584 * coff-rs6000.c (_bfd_xcoff_mkobject, _bfd_xcoff_archive_p): Likewise.
2585 * coff-sh.c (sh_relax_section): Likewise.
2586 * coff64-rs6000.c (xcoff64_archive_p): Likewise.
2587 * coffcode.h (handle_COMDAT, coff_new_section_hook),
2588 (coff_set_alignment_hook, coff_mkobject),
2589 (coff_compute_section_file_positions): Likewise.
2590 * coffgen.c (coff_make_empty_symbol, coff_bfd_make_debug_symbol),
2591 (coff_find_nearest_line_with_names),
2592 ( bfd_coff_set_symbol_class): Likewise.
2593 * cofflink.c (_bfd_coff_link_hash_table_create),
2594 (_bfd_coff_link_input_bfd): Likewise.
2595 * dwarf1.c (alloc_dwarf1_unit, alloc_dwarf1_func): Likewise.
2596 * dwarf2.c (read_abbrevs, read_attribute_value, add_line_info),
2597 (build_line_info_table, sort_line_sequences),
2598 (line_info_add_include_dir, line_info_add_file_name),
2599 (decode_line_info, scan_unit_for_symbols, parse_comp_unit),
2600 (place_sections, _bfd_dwarf2_slurp_debug_info): Likewise.
2601 * ecoff.c (_bfd_ecoff_mkobject, _bfd_ecoff_make_empty_symbol),
2602 (_bfd_ecoff_find_nearest_line),
2603 (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
2604 * ecofflink.c (bfd_ecoff_debug_init): Likewise.
2605 * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Likewise.
2606 * elf-m10300.c (mn10300_elf_relax_section),
2607 (elf32_mn10300_link_hash_table_create): Likewise.
2608 * elf-strtab.c (_bfd_elf_strtab_init): Likewise.
2609 * elf.c (make_mapping, copy_elf_program_header): Likewise.
2610 * elf32-arm.c (elf32_arm_link_hash_table_create),
2611 (elf32_arm_setup_section_lists, elf32_arm_check_relocs),
2612 (elf32_arm_new_section_hook): Likewise.
2613 * elf32-avr.c (elf_avr_new_section_hook),
2614 (elf32_avr_link_hash_table_create, get_local_syms),
2615 (elf32_avr_setup_section_lists): Likewise.
2616 * elf32-bfin.c (bfinfdpic_elf_link_hash_table_create),
2617 (bfin_link_hash_table_create): Likewise.
2618 * elf32-cr16.c (elf32_cr16_link_hash_table_create): Likewise.
2619 * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
2620 * elf32-csky.c (csky_elf_link_hash_table_create),
2621 (csky_elf_check_relocs, elf32_csky_setup_section_lists): Likewise.
2622 * elf32-frv.c (frvfdpic_elf_link_hash_table_create): Likewise.
2623 * elf32-hppa.c (elf32_hppa_link_hash_table_create),
2624 (elf32_hppa_setup_section_lists, get_local_syms): Likewise.
2625 * elf32-i386.c (elf_i386_check_relocs): Likewise.
2626 * elf32-lm32.c (lm32_elf_link_hash_table_create): Likewise.
2627 * elf32-m32r.c (m32r_elf_link_hash_table_create),
2628 (m32r_elf_check_relocs): Likewise.
2629 * elf32-m68hc1x.c (m68hc11_elf_hash_table_create),
2630 (elf32_m68hc11_setup_section_lists),
2631 (elf32_m68hc11_size_stubs): Likewise.
2632 * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
2633 * elf32-metag.c (elf_metag_link_hash_table_create),
2634 (elf_metag_setup_section_lists): Likewise.
2635 * elf32-microblaze.c (microblaze_elf_link_hash_table_create),
2636 (microblaze_elf_check_relocs): Likewise.
2637 * elf32-nds32.c (nds32_elf_link_hash_table_create),
2638 (nds32_elf_check_relocs): Likewise.
2639 * elf32-nios2.c (nios2_elf32_setup_section_lists),
2640 (get_local_syms, nios2_elf32_check_relocs),
2641 (nios2_elf32_link_hash_table_create): Likewise.
2642 * elf32-or1k.c (or1k_elf_link_hash_table_create),
2643 (or1k_elf_check_relocs): Likewise.
2644 * elf32-ppc.c (ppc_elf_modify_segment_map, update_plt_info): Likewise.
2645 * elf32-pru.c (pru_elf32_link_hash_table_create): Likewise.
2646 * elf32-s390.c (elf_s390_link_hash_table_create),
2647 (elf_s390_check_relocs): Likewise.
2648 * elf32-score.c (score_elf_create_got_section),
2649 (s3_elf32_score_new_section_hook),
2650 (elf32_score_link_hash_table_create): Likewise.
2651 * elf32-score7.c (score_elf_create_got_section),
2652 (s7_elf32_score_new_section_hook): Likewise.
2653 * elf32-sh.c (sh_elf_link_hash_table_create),
2654 (sh_elf_check_relocs): Likewise.
2655 * elf32-tic6x.c (elf32_tic6x_link_hash_table_create),
2656 (elf32_tic6x_new_section_hook, elf32_tic6x_check_relocs): Likewise.
2657 * elf32-tilepro.c (tilepro_elf_link_hash_table_create),
2658 (tilepro_elf_check_relocs): Likewise.
2659 * elf32-v850.c (remember_hi16s_reloc): Likewise.
2660 * elf32-vax.c (elf_vax_link_hash_table_create): Likewise.
2661 * elf32-xtensa.c (elf_xtensa_link_hash_table_create),
2662 (elf_xtensa_new_section_hook): Likewise.
2663 * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create),
2664 (get_got_entry, elf64_alpha_check_relocs): Likewise.
2665 * elf64-hppa.c (elf64_hppa_hash_table_create): Likewise.
2666 * elf64-ia64-vms.c (elf64_ia64_object_p): Likewise.
2667 * elf64-mmix.c (mmix_elf_new_section_hook): Likewise.
2668 * elf64-ppc.c (ppc64_elf_new_section_hook),
2669 (ppc64_elf_link_hash_table_create, update_local_sym_info),
2670 (update_plt_info, ppc64_elf_check_relocs): Likewise.
2671 * elf64-s390.c (elf_s390_link_hash_table_create),
2672 (elf_s390_check_relocs): Likewise.
2673 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
2674 * elflink.c (bfd_elf_link_record_local_dynamic_symbol),
2675 (_bfd_elf_link_find_version_dependencies, elf_link_add_object_symbols),
2676 (elf_link_add_archive_symbols, compute_bucket_count),
2677 (bfd_elf_size_dynsym_hash_dynstr, _bfd_elf_link_hash_table_create),
2678 (bfd_elf_get_bfd_needed_list, elf_link_swap_symbols_out),
2679 (bfd_elf_final_link): Likewise.
2680 * elfnn-aarch64.c (elfNN_aarch64_link_hash_table_create),
2681 (elfNN_aarch64_setup_section_lists, elfNN_aarch64_check_relocs),
2682 (elfNN_aarch64_new_section_hook): Likewise.
2683 * elfnn-ia64.c (elfNN_ia64_object_p): Likewise.
2684 * elfnn-riscv.c (riscv_elf_link_hash_table_create),
2685 (riscv_elf_check_relocs): Likewise.
2686 * elfxx-mips.c (_bfd_mips_elf_new_section_hook),
2687 (_bfd_mips_elf_add_symbol_hook, _bfd_mips_elf_check_relocs),
2688 (_bfd_mips_elf_modify_segment_map, _bfd_mips_elf_set_section_contents),
2689 (_bfd_mips_elf_link_hash_table_create): Likewise.
2690 * elfxx-sparc.c (_bfd_sparc_elf_link_hash_table_create),
2691 (_bfd_sparc_elf_check_relocs),
2692 (_bfd_sparc_elf_new_section_hook): Likewise.
2693 * elfxx-tilegx.c (tilegx_elf_link_hash_table_create),
2694 (tilegx_elf_check_relocs): Likewise.
2695 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Likewise.
2696 * format.c (bfd_check_format_matches): Likewise.
2697 * hash.c (_bfd_stringtab_init): Likewise.
2698 * ihex.c (ihex_scan): Likewise.
2699 * irix-core.c (irix_core_core_file_p): Likewise.
2700 * linker.c (bfd_wrapped_link_hash_lookup),
2701 (_bfd_generic_link_hash_table_create),
2702 (_bfd_generic_reloc_link_order): Likewise.
2703 * lynx-core.c (lynx_core_file_p): Likewise.
2704 * netbsd-core.c (netbsd_core_file_p): Likewise.
2705 * osf-core.c (osf_core_core_file_p): Likewise.
2706 * pdp11.c (some_aout_object_p, mkobject, make_empty_symbol),
2707 (link_hash_table_create, aout_link_write_other_symbol): Likewise.
2708 * peXXigen.c (_bfd_XX_bfd_copy_private_section_data): Likewise.
2709 * peicode.h (pe_mkobject): Likewise.
2710 * ppcboot.c (ppcboot_mkobject, ppcboot_canonicalize_symtab): Likewise.
2711 * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
2712 * sco5-core.c (read_uarea): Likewise.
2713 * som.c (hppa_som_gen_reloc_type, som_object_p, som_prep_headers),
2714 (som_write_fixups, som_write_space_strings, som_write_symbol_strings),
2715 (som_finish_writing, som_canonicalize_symtab, som_new_section_hook),
2716 (som_bfd_copy_private_section_data, bfd_som_set_section_attributes),
2717 (bfd_som_attach_aux_hdr, som_write_armap): Likewise.
2718 * srec.c (srec_scan): Likewise.
2719 * syms.c (_bfd_generic_make_empty_symbol): Likewise.
2720 * targets.c (bfd_target_list): Likewise.
2721 * tekhex.c (first_phase, tekhex_sizeof_headers): Likewise.
2722 * trad-core.c (trad_unix_core_file_p): Likewise.
2723 * vms-alpha.c (vms_initialize, alpha_vms_bfd_link_hash_table_create),
2724 (vms_new_section_hook): Likewise.
2725 * wasm-module.c (wasm_make_empty_symbol): Likewise.
2726 * xcofflink.c (xcoff_get_section_contents),
2727 (_bfd_xcoff_bfd_link_hash_table_create, xcoff_set_import_path),
2728 (xcoff_find_function, bfd_xcoff_link_record_set, xcoff_build_ldsym),
2729 (bfd_xcoff_size_dynamic_sections, xcoff_link_input_bfd): Likewise.
2731 2020-02-19 Alan Modra <amodra@gmail.com>
2733 * elfxx-riscv.c (riscv_multi_letter_ext_valid_p): Don't use C99.
2735 2020-02-13 H.J. Lu <hongjiu.lu@intel.com>
2737 * plugin.c (try_load_plugin): Make plugin_list_iter an argument
2738 and use it if it isn't NULL. Remove has_plugin_p argument. Add
2739 a build_list_p argument. Don't search plugin_list. Short circuit
2740 when building the plugin list.
2741 (has_plugin): Renamed to has_plugin_list.
2742 (bfd_plugin_set_plugin): Don't set has_plugin.
2743 (bfd_plugin_specified_p): Check plugin_list instead.
2744 (build_plugin_list): New function.
2745 (load_plugin): Call build_plugin_list and use plugin_list.
2747 2020-02-11 H.J. Lu <hongjiu.lu@intel.com>
2750 * plugin.c (try_claim): Always clean up for LTO wrapper.
2751 (try_load_plugin): Treat each object as independent. Create a
2752 copy for plugin name.
2754 2020-02-11 Nick Clifton <nickc@redhat.com>
2756 * elf32-msp430.c (msp430_final_link_relocate): Always use longs
2757 for addresses in print statements.
2758 (msp430_elf_relax_delete_bytes): Likewise.
2759 (msp430_elf_relax_add_words): Likewise.
2760 (msp430_elf_relax_section): Likewise.
2762 2020-02-11 H.J. Lu <hongjiu.lu@intel.com>
2764 * plugin.c (add_symbols): Clear plugin_data memory.
2766 2020-02-10 H.J. Lu <hongjiu.lu@intel.com>
2769 * configure.ac (HAVE_EXECUTABLE_SUFFIX): New AC_DEFINE.
2770 (EXECUTABLE_SUFFIX): Likewise.
2771 * config.in: Regenerated.
2772 * configure: Likewise.
2773 * plugin.c (bfd_plugin_close_and_cleanup): Removed.
2774 (plugin_list_entry): Add all_symbols_read, cleanup_handler,
2775 gcc, lto_wrapper, resolution_file, resolution_option, gcc_env,
2776 real_bfd, real_nsyms, real_syms, lto_nsyms and lto_syms.
2777 (get_lto_wrapper): New.
2778 (setup_lto_wrapper_env): Likewise.
2779 (current_plugin): Likewise.
2780 (register_all_symbols_read): Likewise.
2781 (register_cleanup): Likewise.
2782 (get_symbols): Likewise.
2783 (add_input_file): Likewise.
2784 (bfd_plugin_close_and_cleanup): Likewise.
2785 (claim_file): Removed.
2786 (register_claim_file): Set current_plugin->claim_file.
2787 (add_symbols): Make a copy of LTO symbols. Set lto_nsyms and
2788 lto_syms in current_plugin.
2789 (try_claim): Use current_plugin->claim_file. Call LTO plugin
2790 all_symbols_read handler. Copy real symbols to plugin_data.
2791 Call LTO plugin cleanup handler. Clean up for LTO wrapper.
2792 (try_load_plugin): Don't reuse the previous plugin for LTO
2793 wrapper. Set up GCC LTO wrapper if possible. Don't set
2794 plugin_list_iter->claim_file.
2795 (bfd_plugin_canonicalize_symtab): Use real LTO symbols if
2797 * plugin.h (plugin_data_struct): Add real_bfd, real_nsyms and
2800 2020-02-10 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2802 * elf32-msp430.c (msp430_elf_relax_section): Before relaxing a branch,
2803 check if previous instruction matches a conditional jump inserted
2804 earlier. Invert conditional jump and delete branch in this case.
2806 2020-02-10 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2808 * elf32-msp430.c (msp430_elf_relax_add_two_words): Rename to
2809 msp430_elf_relax_add_words. Support insertion of either one or two
2811 (msp430_elf_relax_section): Catch opcode of 0x3c00 when relocation
2812 needs to be grown. Handle insertion of branch instruction to replace
2815 2020-02-10 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2817 * elf32-msp430.c (msp430_final_link_relocate): Add printf statements for
2818 debugging relocations.
2819 (msp430_elf_relax_delete_bytes): Likewise.
2820 (msp430_elf_relax_add_two_words): Likewise.
2821 (msp430_elf_relax_section): Likewise.
2823 2020-02-10 Alan Modra <amodra@gmail.com>
2825 * archures.c: Wrap overlong z80 comments.
2826 * bfd-in2.h: Regenerate.
2828 2020-02-07 Sergey Belyashov <sergey.belyashov@gmail.com>
2831 * archures.c: Add GBZ80 and Z80N machine values.
2832 * reloc.c: Add BFD_RELOC_Z80_16_BE.
2833 * coff-z80.c: Add support for new reloc.
2834 * coffcode.h: Add support for new machine values.
2835 * cpu-z80.c: Add support for new machine names.
2836 * elf32-z80.c: Add support for new reloc.
2837 * bfd-in2.h: Regenerate.
2838 * libbfd.h: Regenerate.
2840 2020-02-07 Nick Clifton <nickc@redhat.com>
2843 * elf.c (rewrite_elf_program_header): Do not complain if no
2844 sections are mapped to a segment.
2846 2020-02-06 H.J. Lu <hongjiu.lu@intel.com>
2849 * elflink.c (_bfd_elf_gc_mark_extra_sections): Issue an error
2850 for garbage collection on __patchable_function_entries section
2851 without linked-to section.
2853 2020-02-06 H.J. Lu <hongjiu.lu@intel.com>
2856 * bfd-in2.h: Regenerated.
2857 * elflink.c (_bfd_elf_gc_mark_extra_sections): Call mark_hook
2858 on section if gc_mark of any of its linked-to sections is set
2859 and don't set gc_mark again.
2860 * section.c (asection): Add linked_to_symbol_name to map_head
2863 2020-02-06 Maciej W. Rozycki <macro@wdc.com>
2865 * elf32-v850.c (v850_elf_relax_section): Fix the index used for
2866 reporting an unrecognized instruction with R_V850_LONGJUMP.
2868 2020-02-05 Alan Modra <amodra@gmail.com>
2870 * elf64-ppc.c (ppc_stub_plt_branch): Match comment with reality.
2872 2020-02-04 Alan Modra <amodra@gmail.com>
2874 * elf32-ppc.c (ppc_elf_relocate_section): After applying
2875 R_PPC_VLE_ADDR20, goto copy_reloc.
2877 2020-02-02 H.J. Lu <hongjiu.lu@intel.com>
2879 * bfd-in2.h: Regenerated.
2880 * section.c (SEC_ASSEMBLER_SECTION_ID): Fix a typo in comments.
2882 2020-02-02 H.J. Lu <hongjiu.lu@intel.com>
2885 * bfd-in2.h: Regenerated.
2886 * ecoff.c (bfd_debug_section): Add section_id.
2887 * section.c (bfd_section): Add section_id.
2888 (SEC_ASSEMBLER_SECTION_ID): New.
2889 (BFD_FAKE_SECTION): Add section_id.
2891 2020-02-01 Nick Clifton <nickc@redhat.com>
2893 * config.bfd: Move the c30-aout and tic30-aout targets onto the
2896 2020-01-31 Sandra Loosemore <sandra@codesourcery.com>
2898 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): DW_EH_PE_datarel
2899 encodings are relative to the GOT on nios2, too.
2901 2020-01-31 Alan Modra <amodra@gmail.com>
2903 * Makefile.am (elf32-target.h, elf64-target.h): Don't use a temp
2904 file. Use $< and $@ in rules.
2905 (elf32-aarch64.c, elf64-aarch64.c): Likewise.
2906 (elf32-ia64.c, elf64-ia64.c): Likewise.
2907 (elf32-riscv.c, elf64-riscv.c): Likewise.
2908 (peigen.c, pepigen.c, pex64igen.c): Likewise.
2909 (elf32-aarch64.c, elf64-aarch64.c): Don't emit $srcdir on #line.
2910 (elf32-riscv.c, elf64-riscv.c): Likewise, and use $(SED).
2911 (elf32-ia64.c, elf64-ia64.c): Do emit #line.
2912 (peigen.c, pepigen.c, pex64igen.c): Likewise.
2913 * Makefile.in: Regenerate.
2915 2020-01-31 Alan Modra <amodra@gmail.com>
2918 * elf.c (setup_group): Don't clear entire section contents,
2919 just the padding after group flags. Release alloc'd memory
2920 after a seek or read failure.
2922 2020-01-16 Jon Turney <jon.turney@dronecode.org.uk>
2924 * peXXigen.c (pe_is_repro): New function.
2925 (_bfd_XX_print_private_bfd_data_common): Note timestamp is
2926 actually a build hash if PE_IMAGE_DEBUG_TYPE_REPRO is present.
2928 2020-01-16 Jon Turney <jon.turney@dronecode.org.uk>
2930 * peXXigen.c (debug_type_names): Add names for new debug data type
2933 2020-01-16 Jon Turney <jon.turney@dronecode.org.uk>
2935 * peXXigen.c (pe_print_debugdata): Fix the iteration variable for
2936 inner loop. Fix a memory leak.
2938 2020-01-30 Alan Modra <amodra@gmail.com>
2940 * coffgen.c (coff_real_object_p): Don't clear obj_coff_keep_syms
2941 or obj_coff_keep_strings here.
2942 (coff_get_normalized_symtab): Free external syms directly.
2943 * xcofflink.c (xcoff_link_input_bfd): Restore obj_coff_keep_syms
2946 2020-01-27 Jim Wilson <jimw@sifive.com>
2948 * cpu-riscv.c (riscv_scan): New.
2949 (N): Change bfd_default_scan to riscv_scan.
2951 2020-01-27 Andreas Schwab <schwab@suse.de>
2953 * Makefile.am (ALL_MACHINES): Remove cpu-plugin.lo.
2954 (ALL_MACHINES_CFILES): Remove cpu-plugin.c.
2955 * Makefile.in: Regenerate.
2956 * cpu-plugin.c: Remove.
2957 * archures.c (enum bfd_architecture): Remove bfd_arch_plugin.
2958 (bfd_plugin_arch): Remove declaration.
2959 * bfd-in2.h: Regenerate.
2960 * po/SRC-POTFILES.in: Regenerate.
2962 2020-01-27 H.J. Lu <hongjiu.lu@intel.com>
2963 Alan Modra <amodra@gmail.com>
2966 * elflink.c (_bfd_elf_gc_mark_rsec): Mark all weak aliases.
2968 2020-01-24 Jim Wilson <jimw@sifive.com>
2970 * elfxx-riscv.c (riscv_get_prefix_class): Format s case like others.
2971 (riscv_parse_prefixed_ext): Fix s extension comment and reword to
2972 avoid over long line.
2974 2020-01-24 Nick Clifton <nickc@redhat.com>
2977 * coffgen.c (_bfd_coff_close_and_cleanup): Do not clear the keep
2978 syms and keep strings flags as these may have been set in order to
2979 prevent a bogus call to free.
2981 2020-01-23 Nick Clifton <nickc@redhat.com>
2983 * po/fr.po: Updated French translation.
2985 2020-01-23 Alan Modra <amodra@gmail.com>
2988 * elf.c (assign_file_positions_for_load_sections): Avoid divide
2989 by zero when p_align is zero.
2991 2020-01-22 Maxim Blinov <maxim.blinov@embecosm.com>
2993 * bfd/elfnn-riscv.c (riscv_skip_prefix): New.
2994 (riscv_prefix_cmp): Likewise.
2995 (riscv_non_std_ext_p): Deleted.
2996 (riscv_std_sv_ext_p): Likewise.
2997 (riscv_non_std_sv_ext_p): Likewise.
2998 (riscv_merge_non_std_and_sv_ext): Rename to...
2999 (riscv_merge_multi_letter_ext): and modified to use riscv_prefix_cmp.
3000 (riscv_merge_arch_attr_info): Replace 3 calls to
3001 riscv_merge_non_std_and_sv_ext with single call to
3002 riscv_merge_multi_letter_ext.
3003 * bfd/elfxx-riscv.c (riscv_parse_std_ext): Break if we
3004 encounter a 'z' prefix.
3005 (riscv_get_prefix_class): New function, return prefix class based
3006 on first few characters of input string.
3007 (riscv_parse_config): New structure to factor out minor differences
3008 in extension class parsing behaviour.
3009 (riscv_parse_sv_or_non_std_ext): Rename to...
3010 (riscv_parse_prefixed_ext): and parameterise with
3012 (riscv_std_z_ext_strtab, riscv_std_s_ext_strtab): New.
3013 (riscv_multi_letter_ext_valid_p): New.
3014 (riscv_ext_x_valid_p, riscv_ext_z_valid_p, riscv_ext_s_valid_p): New.
3015 (riscv_parse_subset): Delegate all non-single-letter parsing work
3016 to riscv_parse_prefixed_ext.
3017 * bfd/elfxx-riscv.h (riscv_isa_ext_class): New type.
3018 (riscv_get_prefix_class): Declare.
3020 2020-01-22 Alan Modra <amodra@gmail.com>
3022 * elf64-ppc.c (struct ppc_link_hash_table): Add tga_group.
3023 (ppc64_elf_archive_symbol_lookup): Extract __tls_get_addr_opt for
3024 __tls_get_addr_desc.
3025 (ppc64_elf_size_stubs): Add section for linker generated
3026 __tls_get_addr_desc wrapper function. Loop at least once if
3027 generating this function.
3028 (emit_tga_desc, emit_tga_desc_eh_frame): New functions.
3029 (ppc64_elf_build_stubs): Generate __tls_get_addr_desc.
3031 2020-01-22 Alan Modra <amodra@gmail.com>
3033 * elf64-ppc.h (struct ppc64_elf_params): Add no_tls_get_addr_regsave.
3034 * elf64-ppc.c (struct ppc_link_hash_table): Add tga_desc and
3036 (is_tls_get_addr): Match tga_desc and tga_desc_df too.
3037 (STDU_R1_0R1, ADDI_R1_R1): Define.
3038 (tls_get_addr_prologue, tls_get_addr_epilogue): New functions.
3039 (ppc64_elf_tls_setup): Set up tga_desc and tga_desc_fd. Indirect
3040 tga_desc_fd to opt_fd, and tga_desc to opt. Set
3041 no_tls_get_addr_regsave.
3042 (branch_reloc_hash_match): Add hash3 and hash4.
3043 (ppc64_elf_tls_optimize): Handle tga_desc_fd and tga_desc too.
3044 (ppc64_elf_size_dynamic_sections): Likewise.
3045 (ppc64_elf_relocate_section): Likewise.
3046 (plt_stub_size, build_plt_stub): Likewise. Size regsave
3047 __tls_get_addr stub.
3048 (build_tls_get_addr_stub): Build regsave __tls_get_addr stub and
3050 (ppc_size_one_stub): Handle tga_desc_fd and tga_desc too. Size
3051 eh_frame for regsave __tls_get_addr.
3053 2020-01-22 Alan Modra <amodra@gmail.com>
3055 * elf64-ppc.c (ppc64_elf_size_stubs): Correct condition under
3056 which __tls_get_addr calls will be eliminated.
3058 2020-01-20 Nick Clifton <nickc@redhat.com>
3060 * po/pt.po: Updates Portuguese translation.
3061 * po/ru.po: Updated Russian translation.
3062 * po/uk.po: Updated Ukranian translation.
3064 2020-01-20 H.J. Lu <hongjiu.lu@intel.com>
3067 * elf64-x86-64.c (elf_x86_64_check_tls_transition): Support
3068 "rex leal x@tlsdesc(%rip), %reg" and "call *x@tlsdesc(%eax)" in
3070 (elf_x86_64_relocate_section): In x32 mode, for GDesc -> LE
3071 transition, relax "rex leal x@tlsdesc(%rip), %reg" to
3072 "rex movl $x@tpoff, %reg", for GDesc -> IE transition, relax
3073 "rex leal x@tlsdesc(%rip), %reg" to
3074 "rex movl x@gottpoff(%rip), %eax". For both transitions, relax
3075 "call *(%eax)" to "nopl (%rax)".
3077 2020-01-20 Alan Modra <amodra@gmail.com>
3079 * elf64-ppc.c (LD_R11_0R3, CMPDI_R11_0, STD_R11_0R1, LD_R11_0R1),
3080 (MTLR_R11): Don't define.
3081 (LD_R0_0R3, CMPDI_R0_0): Define.
3082 (build_tls_get_addr_stub): Don't use r11 in stub.
3084 2020-01-20 Alan Modra <amodra@gmail.com>
3086 * elf64-ppc.c (ppc_elf_hash_entry): New function, use throughout file.
3087 (defined_sym_val, is_tls_get_addr): Likewise.
3089 2020-01-18 Nick Clifton <nickc@redhat.com>
3091 * version.m4 (BFD_VERSION): Set to 2.34.50.
3092 * configure: Regenerate.
3093 * po/bfd.pot: Regenerate.
3095 2020-01-18 Nick Clifton <nickc@redhat.com>
3097 Binutils 2.34 branch created.
3099 2020-01-17 Christian Biesinger <cbiesinger@google.com>
3101 * coff-arm.c: Fix spelling error (seperate).
3102 * elfxx-riscv.c (riscv_parse_sv_or_non_std_ext): Fix spelling
3104 * sysdep.h (strnlen): Fix spelling error (seperate).
3106 2020-01-15 Lars Brinkhoff <lars@nocrew.org>
3109 * pdp11.c (TARGET_PAGE_SIZE): Set to 8192.
3111 2020-01-15 Alan Modra <amodra@gmail.com>
3114 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Update comment.
3115 (ppc64_elf_adjust_dynamic_symbol): Don't allow .dynbss copies
3116 of function symbols unless dot symbols are present. Do warn
3117 whenever one is created, regardles of whether a PLT entry is
3118 also emitted for the function symbol.
3120 2020-01-14 Alan Modra <amodra@gmail.com>
3122 * som.c (som_bfd_count_ar_symbols): Error when file position
3123 of symbols on chains is not strictly increasing.
3125 2020-01-14 Alan Modra <amodra@gmail.com>
3127 * vms.h (VMS_DEBUG): Define as 0.
3128 * vms-alpha.c (image_write): Move debug output after bounds check.
3130 (_bfd_vms_slurp_eihd): Warning fix.
3131 (_bfd_vms_slurp_etir): Init variables to avoid bogus warnings.
3133 2020-01-13 Alan Modra <amodra@gmail.com>
3135 * vms-alpha.c (_bfd_vms_slurp_egsd): Ensure minimum size even
3136 for "ignored" records.
3138 2020-01-13 Alan Modra <amodra@gmail.com>
3140 * wasm-module.c (wasm_scan_name_function_section): Formatting.
3141 Delete asect name check. Move asect NULL check to wasm_object_p.
3142 Correct bounds check of sizes against end. Replace uses of
3143 bfd_zalloc with bfd_alloc, zeroing only necessary bytes. Use
3144 just one bfd_release.
3145 (wasm_scan): Don't use malloc/strdup for section names,
3146 bfd_alloc instead. Simplify code prefixing section name.
3147 Formatting. Don't attempt to free memory here..
3148 (wasm_object_p): ..do so here.
3150 2020-01-10 Szabolcs Nagy <szabolcs.nagy@arm.com>
3153 * elf32-arm.c (elf32_arm_final_link_relocate): Use
3154 UNDEFWEAK_NO_DYNAMIC_RELOC.
3155 (allocate_dynrelocs_for_symbol): Likewise.
3157 2020-01-10 Tamar Christina <tamar.christina@arm.com>
3160 * elfnn-aarch64.c (_bfd_aarch64_create_stub_section): Remove elfclass.
3162 2020-01-10 Alan Modra <amodra@gmail.com>
3164 * coff-alpha.c (alpha_ecoff_object_p): Calculate size in bfd_size_type.
3166 2020-01-09 Nick Clifton <nickc@redhat.com>
3169 * bfd.c (bfd_convert_section_contents): Check for a compress
3170 header size that is larger than the actual section size.
3172 2020-01-08 Alan Modra <amodra@gmail.com>
3175 * elflink.c (bfd_elf_final_link): Call _bfd_fix_excluded_sec_syms
3176 after removing sections.
3178 2020-01-06 Jim Wilson <jimw@sifive.com>
3181 * elfnn-riscv.c (riscv_elf_relocate_section) <R_RISCV_CALL>: Add
3182 check for !bfd_link_pic (info).
3183 <R_RISCV_CALL_PLT>: Move next to R_RISCV_CALL.
3184 <R_RISCV_JAL>: Add comment.
3185 (_bfd_riscv_relax_section): For plt.offset check, add check for
3186 bfd_link_pic (info). Add comment.
3188 2020-01-06 Alan Modra <amodra@gmail.com>
3190 * format.c (bfd_check_format_matches): Ignore bfd_error on target
3191 match failures. Don't init to bfd_error_wrong_format before
3192 calling _bfd_check_format.
3194 2020-01-06 Alan Modra <amodra@gmail.com>
3196 * vms-alpha.c (_bfd_vms_push, _bfd_vms_pop): Return pass/fail
3197 status rather than exiting on stack overflow or underflow.
3198 (_bfd_vms_slurp_etir): Adjust to suit.
3200 2020-01-06 Alan Modra <amodra@gmail.com>
3202 * som.c (som_bfd_fill_in_ar_symbols): Bounds check som_dict index.
3204 2020-01-06 Alan Modra <amodra@gmail.com>
3206 * mach-o.c (bfd_mach_o_read_dylinker): Don't read past end of
3207 command. Check name offset is within command.
3208 (bfd_mach_o_read_dylib, bfd_mach_o_read_prebound_dylib),
3209 (bfd_mach_o_read_prebind_cksum, bfd_mach_o_read_twolevel_hints),
3210 (bfd_mach_o_read_fvmlib, bfd_mach_o_read_dysymtab),
3211 (bfd_mach_o_read_symtab, bfd_mach_o_read_uuid),
3212 (bfd_mach_o_read_linkedit, bfd_mach_o_read_str),
3213 (bfd_mach_o_read_dyld_info, bfd_mach_o_read_version_min),
3214 (bfd_mach_o_read_encryption_info, bfd_mach_o_read_source_version),
3215 (bfd_mach_o_read_encryption_info_64, bfd_mach_o_read_main),
3216 (bfd_mach_o_read_note, bfd_mach_o_read_build_version),
3217 (bfd_mach_o_read_segment): Similarly.
3218 (bfd_mach_o_read_thread): Properly bound check thread struct.
3219 Don't repeat checks on second loop.
3220 (bfd_mach_o_read_command): Fail on invalid command length.
3222 2020-01-04 Alan Modra <amodra@gmail.com>
3224 * format.c (bfd_check_format_matches): Add preserve_match.
3225 Save initial bfd state in "preserve", matched bfd state in
3226 "preserve_match". Save just the first match. Release
3227 bfd_alloc memory. Restore and finish preserved state as
3228 appropriate on all function exit paths.
3230 2020-01-04 Alan Modra <amodra@gmail.com>
3232 * mmo.c (mmo_mkobject): Allocate tdata with bfd_zalloc.
3234 2020-01-04 Alan Modra <amodra@gmail.com>
3236 * coffgen.c (coff_real_object_p): Free malloc'd memory on target
3239 2020-01-03 Nick Clifton <nickc@redhat.com>
3242 (bfd_pef_parse_function_stubs): Correct the test that ensures that
3243 there is enough data remaining in the code buffer before
3244 attempting to read a function stub.
3246 2020-01-03 Nick Clifton <nickc@redhat.com>
3249 * elf-properties.c (_bfd_elf_convert_gnu_properties): Check the
3250 return value from bfd_malloc.
3251 * elf32-arm.c (bfd_elf32_arm_vfp11_fix_veneer_locations): Likewise.
3252 (bfd_elf32_arm_stm32l4xx_fix_veneer_locations): Likewise.
3253 (elf32_arm_filter_cmse_symbols): Likewise.
3254 (elf32_arm_write_section): Likewise.
3255 * mach-o.c (bfd_mach_o_core_fetch_environment): Likewise.
3256 (bfd_mach_o_follow_dsym): Likewise.
3257 * pef.c (bfd_pef_print_loader_section): Likewise.
3258 (bfd_pef_scan_start_address): Likewise.
3259 (bfd_pef_parse_function_stubs): Likewise.
3260 (bfd_pef_parse_symbols): Likewise.
3262 2020-01-03 Sergei Trofimovich <siarheit@google.com>
3264 * elfnn-ia64.c (elfNN_ia64_merge_private_bfd_data): don't fail
3265 on binary inputs ld/PR25316.
3266 (is_ia64_elf): new helper to filter on ia64 objects.
3268 2020-01-03 Jan Beulich <jbeulich@suse.com>
3270 * mach-o.c (cpusubtype, bfd_mach_o_header_p): Insert underscore
3272 (bfd_mach_o_scan): Insert underscore in two variable names.
3274 2020-01-02 Sergey Belyashov <sergey.belyashov@gmail.com>
3276 * Makefile.am: Add z80-elf target support.
3277 * configure.ac: Likewise.
3278 * targets.c: Likewise.
3279 * Makefile.in: Regenerate.
3280 * configure: Regenerate.
3281 * config.bfd: Add z80-elf target support and new arches: ez80 and
3283 * elf32-z80.c: New file.
3284 * archures.c: Add new z80 architectures: eZ80 and Z180.
3285 * coffcode.h: Likewise.
3286 * cpu-z80.c: Likewise.
3287 * coff-z80.c: Add new relocations for Z80 target and local label
3289 * reloc.c: Add new relocs.
3290 * bfd-in2.h: Regenerate.
3291 * libbfd.h: Regenerate.
3293 2020-01-02 Tamar Christina <tamar.christina@arm.com>
3297 * elfnn-aarch64.c (_bfd_aarch64_create_stub_section): Set ELF class.
3299 2020-01-01 Alan Modra <amodra@gmail.com>
3301 Update year range in copyright notice of all files.
3303 For older changes see ChangeLog-2019
3305 Copyright (C) 2020 Free Software Foundation, Inc.
3307 Copying and distribution of this file, with or without modification,
3308 are permitted in any medium without royalty provided the copyright
3309 notice and this notice are preserved.
3315 version-control: never