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