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