PR26506 UBSAN: elf32-xtensa.c:3203 null pointer memcpy
[deliverable/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
252e57fd
AM
12020-08-26 Alan Modra <amodra@gmail.com>
2
3 PR 26506
4 * elf32-xtensa.c (elf_xtensa_combine_prop_entries): Return early
5 when section is empty.
6
2d0ce677
AM
72020-08-26 Alan Modra <amodra@gmail.com>
8
9 PR 26498
10 * elf32-spu.c (find_function_stack_adjust): Use unsigned vars to
11 avoid UB left shift.
12
9e51d549
AM
132020-08-26 Alan Modra <amodra@gmail.com>
14
15 PR 26484
16 PR 26485
17 PR 26486
18 PR 26487
19 PR 26488
20 PR 26490
21 * elf64-ppc.c (is_tls_get_addr): Avoid UB &h->elf when h is NULL.
22 (ppc64_elf_tls_setup): Likewise.
23 (branch_reloc_hash_match): Likewise.
24 (build_plt_stub): Likewise.
25 (ppc64_elf_relocate_section): Likewise.
26
00bc5e68
AM
272020-08-26 Alan Modra <amodra@gmail.com>
28
29 PR 26478
30 * mmo.c (mmo_write_symbols_and_terminator): Don't memcpy empty table.
31
55e61b8a
AM
322020-08-26 Alan Modra <amodra@gmail.com>
33
34 PR 26475
35 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections): Check
36 sstubs->contents != NULL.
37
66ad6b44
AM
382020-08-26 Alan Modra <amodra@gmail.com>
39
40 PR 26453
41 * som.c (som_prep_for_fixups): Return early when no symbols.
42
9863cbb7
AM
432020-08-26 Alan Modra <amodra@gmail.com>
44
45 PR 26418
46 * ecofflink.c (WRITE): Don't write size 0 chunks.
47
c01de193
AM
482020-08-26 Alan Modra <amodra@gmail.com>
49
50 * bfdio.c (bfd_get_file_size): Don't segv on NULL adata.
51
b4e125d9
AM
522020-08-26 Alan Modra <amodra@gmail.com>
53
54 PR 26415
55 * vms-misc.c (vms_time_t_to_vms_time): Don't use unsigned short vars.
56
4449c81a
DF
572020-08-26 David Faust <david.faust@oracle.com>
58
59 * archures.c (bfd_mach_xbpf): Define.
60 * bfd-in2.h: Regenerate.
61 * cpu-bpf.c (bfd_xbpf_arch) New.
62 (bfd_bpf_arch) Update next in list field to point to xbpf arch.
63
13f8a246
AM
642020-08-26 Alan Modra <amodra@gmail.com>
65
66 * archures.c (bfd_mach_ck860): Define.
67
c3757b58
MW
682020-08-25 Mark Wielaard <mark@klomp.org>
69
70 * dwarf2.c (struct dwarf2_debug_file): Add dwarf_rnglists_buffer
71 and dwarf_rnglists_size fields.
72 (dwarf_debug_sections): Add debug_rnglists.
73 (dwarf_debug_section_enum): Likewise.
74 (read_debug_rnglists): New function.
75 (read_rangelist): New function to call either read_ranges or
76 read_rnglists. Rename original function to...
77 (read_ranges): ...this.
78 (read_rnglists): New function.
79
1ab8d928
AM
802020-08-25 Alan Modra <amodra@gmail.com>
81
82 PR 26505
83 * elf32-xstormy16.c (xstormy16_elf_relax_section): Check
84 is_elf_hash_table before accessing elf fields.
85
a93ba4c0
AM
862020-08-25 Alan Modra <amodra@gmail.com>
87
88 PR 26482
89 * coff-rs6000.c (_bfd_xcoff_sizeof_headers): Ignore sections that
90 won't be output.
91
1438dd86
AM
922020-08-25 Alan Modra <amodra@gmail.com>
93
94 PR 26463
95 * elf32-m32c.c (m32c_elf_relax_section): Check is_elf_hash_table
96 before accessing elf fields.
97
2186273a
AM
982020-08-25 Alan Modra <amodra@gmail.com>
99
100 PR 26452
101 * som.c (som_compute_checksum): XOR 32-bit words in header,
102 not unsigned long sized words.
103
0c1438eb
AM
1042020-08-25 Alan Modra <amodra@gmail.com>
105
106 PR 26430
107 * elf-nacl.c (nacl_modify_segment_map): Correct alloc size and
108 amount copied for elf_segment_map defined with one element
109 sections array.
110
d2327e47
AM
1112020-08-25 Alan Modra <amodra@gmail.com>
112
113 PR 26422
114 * elf32-arm.c (elf32_arm_final_link_relocate): Use the appropriate
115 bfd_get_x size function to read addends out of fields. Apply
116 rightshift adjustment too. Don't apply the now unnecessary
117 howto->size shift to branch REL addends. Don't refetch R_ARM_ABS8
118 and R_ARM_ABS16 addends. Don't refetch thumb branch addends.
119 Correct R_ARM_THM_JUMP6 addend.
120
b8ff233b
AM
1212020-08-25 Alan Modra <amodra@gmail.com>
122
123 PR 26419
124 * elf-m10300.c (mn10300_elf_relax_section): Don't attempt access
125 before start of section.
126
0f55320b
AM
1272020-08-25 Alan Modra <amodra@gmail.com>
128
129 * elf-m10300.c (elf32_mn10300_hash_table): Test is_elf_hash_table
130 before accessing elf_hash_table_id.
131 * elf32-arc.c (elf_arc_hash_table): Likewise.
132 * elf32-arm.c (elf32_arm_hash_table): Likewise.
133 * elf32-avr.c (avr_link_hash_table): Likewise.
134 * elf32-bfin.c (bfinfdpic_hash_table): Likewise.
135 * elf32-cris.c (elf_cris_hash_table): Likewise.
136 * elf32-csky.c (csky_elf_hash_table): Likewise.
137 * elf32-frv.c (frvfdpic_hash_table): Likewise.
138 * elf32-hppa.c (hppa_link_hash_table): Likewise.
139 * elf32-lm32.c (lm32_elf_hash_table): Likewise.
140 * elf32-m32r.c (m32r_elf_hash_table): Likewise.
141 * elf32-m68hc1x.h (m68hc11_elf_hash_table): Likewise.
142 * elf32-m68k.c (elf_m68k_hash_table): Likewise.
143 * elf32-metag.c (metag_link_hash_table): Likewise.
144 * elf32-microblaze.c (elf32_mb_hash_table): Likewise.
145 * elf32-nds32.h (nds32_elf_hash_table): Likewise.
146 * elf32-or1k.c (or1k_elf_hash_table): Likewise.
147 * elf32-s390.c (elf_s390_hash_table): Likewise.
148 * elf32-sh.c (sh_elf_hash_table): Likewise.
149 * elf32-spu.c (spu_hash_table): Likewise.
150 * elf32-tilepro.c (tilepro_elf_hash_table): Likewise.
151 * elf32-xtensa.c (elf_xtensa_hash_table): Likewise.
152 * elf64-alpha.c (alpha_elf_hash_table): Likewise.
153 * elf64-hppa.c (hppa_link_hash_table): Likewise.
154 * elf64-ia64-vms.c (elf64_ia64_hash_table): Likewise.
155 * elf64-s390.c (elf_s390_hash_table): Likewise.
156 * elfnn-ia64.c (elfNN_ia64_hash_table): Likewise.
157 * elfnn-riscv.c (riscv_elf_hash_table): Likewise.
158 * elfxx-mips.c (mips_elf_hash_table): Likewise.
159 * elfxx-sparc.h (_bfd_sparc_elf_hash_table): Likewise.
160 * elfxx-tilegx.c (tilegx_elf_hash_table): Likewise.
161
3cdad084
JT
1622020-08-21 Jon Turney <jon.turney@dronecode.org.uk>
163
164 * elf.c (elfcore_grok_win32pstatus): Change name_size to unsigned
165 int. Use '%u' format with _bfd_error_handler to render it.
166
918dc783
AM
1672020-08-25 Alan Modra <amodra@gmail.com>
168
169 PR 26489
170 * elf64-ppc.c (ppc64_elf_size_stubs): Test code_sec->has_toc_reloc
171 and code_sec->makes_toc_func_call before sec_info[code_sec->id].
172
573eb292
AM
1732020-08-25 Alan Modra <amodra@gmail.com>
174
175 PR 26492
176 * elf64-ppc.c (ppc_hash_table): Test is_elf_hash_table before
177 accessing elf_hash_table_id.
178
a8d549c0
AM
1792020-08-25 Alan Modra <amodra@gmail.com>
180
181 PR 26483
182 * elf32-ppc.c (ppc_elf_hash_table): Test is_elf_hash_table before
183 accessing elf_hash_table_id.
184
19d80e5f
MW
1852020-08-24 Mark Wielaard <mark@klomp.org>
186
187 * dwarf2.c (read_attribute_value): Handle DW_FORM_data16.
188 (read_formatted_entries): Likewise. And skip zero entry.
189
531c73a3
CQ
1902020-08-24 Cooper Qu <cooper.qu@linux.alibaba.com>
191
192 * bfd-in2.h (bfd_mach_ck860): New.
193 * cpu-csky.c (arch_info_struct): Add item for CK860.
194
252dcdf4
AM
1952020-08-24 Alan Modra <amodra@gmail.com>
196
197 * elf32-ppc.c (ppc_elf_check_relocs): Set has_tls_reloc for
198 high part tprel16 relocs.
199 (ppc_elf_tls_optimize): Sanity check high part tprel16 relocs.
200 Clear do_tls_opt on odd instructions.
201 (ppc_elf_relocate_section): Move TPREL16_HA/LO optimisation later.
202 Don't sanity check them here.
203 * elf64-ppc.c (ppc64_elf_check_relocs): Set has_tls_reloc for
204 high part tprel16 relocs.
205 (ppc64_elf_tls_optimize): Sanity check high part tprel16 relocs.
206 Clear do_tls_opt on odd instructions.
207 (ppc64_elf_relocate_section): Don't sanity check TPREL16_HA.
208
c40e6650
JDA
2092020-08-23 John David Anglin <danglin@gcc.gnu.org>
210
211 PR binutils/26357
212 * configure.ac: Disable plugins by default on 32-bit hppa*-*-hpux*.
213 * configure: Regenerate.
214
3f2e9699
L
2152020-08-22 H.J. Lu <hongjiu.lu@intel.com>
216
217 PR ld/26382
218 * elflink.c (elf_link_output_symstrtab): Keep only one '@' for
219 versioned symbols, which are defined in shared objects, in
220 symbol string table.
221
ccf61261
NC
2222020-08-21 Nick Clifton <nickc@redhat.com>
223
224 * elfnn-aarch64.c (_bfd_aarch64_erratum_835769_scan): Only sort
225 the data map if there are entries in it.
226 (_bfd_aarch64_erratum_843419_scan): Likewise.
227
610ed3e0
JB
2282020-08-21 Jan Beulich <jbeulich@suse.com>
229
230 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Check
231 last byte of debug dir, not first.
232
01147b20
NC
2332020-08-20 Nick Clifton <nickc@redhat.com>
234
235 PR 26428
236 * bfd.c (bfd_update_compression_header): Also set the sh_addralign
237 field in the ELF header of the compressed sections.
238
44466e45
NC
2392020-08-20 Nick Clifton <nickc@redhat.com>
240
241 PR 26406
242 * elf-bfd.h (struct bfd_elf_section_data): Add
243 has_secondary_relocs field.
244 * elf.c (_bfd_elf_copy_special_section_fields): Set the
245 has_secondary_relocs field for sections which have associated
246 secondary relocs.
247 * elfcode.h (elf_write_relocs): Only call write_secondary_relocs
248 on sections which have associated secondary relocs.
249
10885e24
AM
2502020-08-15 Alan Modra <amodra@gmail.com>
251
252 * elf32-frv.c (elf32_frv_add_symbol_hook): Set SEC_SMALL_DATA on
253 small common section.
254 * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
255 * elf32-microblaze.c (microblaze_elf_add_symbol_hook): Likewise.
256 * elf32-nds32.c (nds32_elf_add_symbol_hook): Likewise.
257 * elf32-nios2.c (nios2_elf_add_symbol_hook): Likewise.
258 * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise.
259 * elf32-score.c (s3_bfd_score_elf_add_symbol_hook): Likewise.
260 * elf32-score7.c (s7_bfd_score_elf_add_symbol_hook): Likewise.
261 * elf32-tic6x.c (elf32_tic6x_add_symbol_hook): Likewise.
262 * elf32-v850.c (v850_elf_check_relocs): Likewise.
263 (v850_elf_add_symbol_hook): Likewise.
264 * elf64-alpha.c (elf64_alpha_add_symbol_hook): Likewise.
265 * elf64-ia64-vms.c (elf64_ia64_add_symbol_hook): Likewise.
266 * elfnn-ia64.c (elfNN_ia64_add_symbol_hook): Likewise.
267 * elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Likewise.
268
4d182367
AM
2692020-08-15 Alan Modra <amodra@gmail.com>
270
271 PR 26389
272 * syms.c (bfd_decode_symclass): Choose 'c' for commons only when
273 SEC_SMALL_DATA.
274 * elf32-m32r.c (_bfd_m32r_elf_symbol_processing): Set SEC_SMALL_DATA
275 on small common section.
276 * elf32-score.c (s3_bfd_score_elf_symbol_processing): Likewise.
277 * elf32-score7.c (s7_bfd_score_elf_symbol_processing): Likewise.
278 * elf32-tic6x.c (elf32_tic6x_symbol_processing): Likewise.
279 * elf32-v850.c (v850_elf_symbol_processing): Likewise.
280 * elfxx-mips.c (_bfd_mips_elf_symbol_processing): Likewise.
281 * ecoff.c (ecoff_set_symbol_info, ecoff_link_add_externals): Likewise.
282
19bddbe9
AM
2832020-08-14 Alan Modra <amodra@gmail.com>
284
285 * hash.c (bfd_hash_set_default_size): Use higher_prime_number
286 rather than another copy of primes. Increase maximum default
287 size allowed.
288
2b6ba032
AM
2892020-08-13 Alan Modra <amodra@gmail.com>
290
73d0dc16 291 * config.bfd: Obsolete arm*-*-symbianelf*, and ia64*-*-*.
2b6ba032 292
6738c8a7
AM
2932020-08-13 Alan Modra <amodra@gmail.com>
294
295 * elf64-ppc.h (struct ppc64_elf_params): Add no_pcrel_opt.
296 * elf64-ppc.c (ppc64_elf_relocate_section): Disable GOT reloc
297 optimizations when --no-toc-optimize. Disable R_PPC64_PCREL_OPT
298 optimization when --no-pcrel-optimize.
299
75e100a3
AM
3002020-08-13 Alan Modra <amodra@gmail.com>
301
302 PR 26348
303 * bfd.c (struct bfd): Add read_only.
304 * elfcode.h (elf_swap_shdr_in): Test both sh_offset and sh_size.
305 Set read_only on warning.
306 (elf_object_p): Sanity check program header alignment. Set
307 read_only on warning.
308 * bfd-in2.h: Regenerate.
309
2fef9373
JT
3102020-08-12 Jon Turney <jon.turney@dronecode.org.uk>
311
312 * elf.c (elfcore_grok_win32pstatus): Use unsigned int for
313 win32pstatus note type to avoid signedness comparison warning.
314
404ec933
JT
3152020-07-21 Jon Turney <jon.turney@dronecode.org.uk>
316
317 * elf.c (elfcore_grok_win32pstatus): Warn on malformed
318 win32pstatus notes, and return TRUE so we continue rather than
319 stopping as if it was an error.
320
d61f3d03
JT
3212020-07-01 Jon Turney <jon.turney@dronecode.org.uk>
322
323 * elf.c (elfcore_grok_win32pstatus): Handle NOTE_INFO_MODULE64.
324
04ec0fa2
JT
3252020-07-11 Jon Turney <jon.turney@dronecode.org.uk>
326
327 * elf.c (elfcore_grok_win32pstatus): Don't apply size constraint
328 for NOTE_INFO_THREAD to all win32pstatus ELF notes, instead apply
329 appropriate size constraint for each win32pstatus note type.
330
03c29a6f
JT
3312020-07-01 Jon Turney <jon.turney@dronecode.org.uk>
332
333 * elf.c (elfcore_grok_win32pstatus): Don't hardcode the size of
334 the Win32 API thread CONTEXT type read from a NOTE_INFO_THREAD
335 win32pstatus note.
336
8fbac78b
JT
3372020-07-11 Jon Turney <jon.turney@dronecode.org.uk>
338
339 * elf.c (NOTE_INFO{_PROCESS,_THREAD,_MODULE}): Define.
340 (elfcore_grok_win32pstatus): Use.
341
ff2084b9
JT
3422020-07-01 Jon Turney <jon.turney@dronecode.org.uk>
343
344 * elf.c (elfcore_grok_win32pstatus): Fix the offset used to read
345 the tid from a win32pstatus NOTE_INFO_THREAD ELF note. Fix
346 offsets used to read NOTE_INFO_PROCESS.
347
79ddc884
NC
3482020-08-12 Nick Clifton <nickc@redhat.com>
349
350 * po/ru.po: Updated Russian translation.
351 * po/sr.po: Updated Serbian translation.
352
d844f10a
DF
3532020-08-07 David Faust <david.faust@oracle.com>
354
355 * elf64-bpf.c (bpf_elf_relocate_section): Ensure signed division for
356 DISP16 and DISP32 relocations.
357
3ee9565c
DF
3582020-08-05 David Faust <david.faust@oracle.com>
359
360 * elf64-bpf.c (bpf_elf_generic_reloc): New function.
361 (bpf_elf_howto_table): Use it here.
362 (bpf_elf_relocate_section): Use addends recorded in input_bfd for
363 instruction and data relocations.
364
e44a1d7b
AM
3652020-08-03 Alan Modra <amodra@gmail.com>
366
367 * vms-lib.c (vms_traverse_index): Sanity check size remaining
368 before accessing vms_idx or vms_elfidx.
369
b5f386d5
AM
3702020-08-03 Alan Modra <amodra@gmail.com>
371
372 PR 26330
373 * elf.c (_bfd_elf_get_symtab_upper_bound): Sanity check symbol table
374 size against file size. Correct LONG_MAX limit check.
375 (_bfd_elf_get_dynamic_symtab_upper_bound): Likewise.
376 (_bfd_elf_get_reloc_upper_bound): Don't check file size if writing.
377 (_bfd_elf_get_dynamic_reloc_upper_bound): Likewise.
378 * elf64-x86-64-.c (elf_x86_64_get_synthetic_symtab): Use
379 bfd_malloc_and_get_section.
380
a896df97
AM
3812020-07-31 Alan Modra <amodra@gmail.com>
382
383 PR 26314
384 * elflink.c (bfd_elf_link_record_dynamic_symbol): Don't allow
385 IR symbols to become dynamic.
386 (elf_link_add_object_symbols): Don't exclude IR symbols when
387 deciding whether an as-needed shared library is needed.
388
4d3bb356
SN
3892020-07-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
390
391 PR ld/26312
392 * elfnn-aarch64.c (elfNN_aarch64_init_small_plt0_entry): Set sh_entsize
393 to 0.
394 (elfNN_aarch64_finish_dynamic_sections): Remove sh_entsize setting.
395
c8693053
RO
3962020-07-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
397
398 * bfd.m4 (BFD_SYS_PROCFS_H): New macro.
399 (BFD_HAVE_SYS_PROCFS_TYPE): Require BFD_SYS_PROCFS_H.
400 Don't define _STRUCTURED_PROC.
401 (BFD_HAVE_SYS_PROCFS_TYPE_MEMBER): Likewise.
402 * elf.c [HAVE_SYS_PROCFS_H] (_STRUCTURED_PROC): Don't define.
403 * configure.ac: Use BFD_SYS_PROCFS_H to check for <sys/procfs.h>.
404 * configure, config.in: Regenerate.
405 * Makefile.am (AM_CPPFLAGS): Add LARGEFILE_CPPFLAGS.
406 * Makefile.in, doc/Makefile.in: Regenerate.
407
f1dfbfdb
L
4082020-07-30 H.J. Lu <hongjiu.lu@intel.com>
409
410 * elf-bfd.h (sym_cache): Moved before elf_link_hash_table.
411 (elf_link_hash_table): Add sym_cache.
412 * elf32-arm.c (elf32_arm_link_hash_table): Remove sym_cache.
413 (elf32_arm_check_relocs): Updated.
414 (elf32_arm_size_dynamic_sections): Likewise.
415 * elf32-bfin.c (bfin_link_hash_table): Removed.
416 (bfin_link_hash_newfunc): Updated.
417 (bfin_hash_table): Removed.
418 * elf32-csky.c (csky_elf_link_hash_table): Remove sym_cache.
419 (csky_elf_check_relocs): Updated.
420 * elf32-hppa.c (elf32_hppa_link_hash_table): Remove sym_cache.
421 (elf32_hppa_check_relocs): Updated.
422 * elf32-i386.c (elf_i386_tls_transition): Updated.
423 (elf_i386_convert_load_reloc): Likewise.
424 (elf_i386_check_relocs): Likewise.
425 * elf32-m32r.c (elf_m32r_link_hash_table): Removed.
426 (m32r_elf_hash_table): Updated.
427 (m32r_elf_link_hash_table_create): Likewise.
428 (m32r_elf_create_dynamic_sections): Likewise.
429 (m32r_elf_adjust_dynamic_symbol): Likewise.
430 (allocate_dynrelocs): Likewise.
431 (m32r_elf_size_dynamic_sections): Likewise.
432 (m32r_elf_relocate_section): Likewise.
433 (m32r_elf_finish_dynamic_symbol): Likewise.
434 (m32r_elf_check_relocs): Likewise.
435 * elf32-m68hc1x.h (m68hc11_elf_link_hash_table): Remove
436 sym_cache.
437 * elf32-m68k.c (elf_m68k_link_hash_table): Likewise.
438 (elf_m68k_check_relocs): Updated.
439 * elf32-metag.c (elf_metag_link_hash_table): Remove sym_cache.
440 (elf_metag_check_relocs): Updated.
441 * elf32-microblaze.c (elf32_mb_link_hash_table): Remove sym_sec.
442 (microblaze_elf_check_relocs): Updated.
443 * elf32-nds32.c (nds32_elf_link_hash_table_create): Likewise.
444 (nds32_elf_create_dynamic_sections): Likewise.
445 (nds32_elf_adjust_dynamic_symbol): Likewise.
446 (nds32_elf_check_relocs): Likewise.
447 * elf32-nds32.h (elf_nds32_link_hash_table): Remove sdynbss,
448 srelbss and aym_cache.
449 * elf32-nios2.c (elf32_nios2_link_hash_table): Remove sym_cache.
450 (nios2_elf32_check_relocs): Updated.
451 * elf32-or1k.c (elf_or1k_link_hash_table): Remove sym_sec.
452 (or1k_elf_check_relocs): Updated.
453 * elf32-ppc.c (ppc_elf_check_relocs): Remove sym_cache.
454 (ppc_elf_check_relocs): Updated.
455 * elf32-s390.c (elf_s390_link_hash_table): Remove sym_cache.
456 (elf_s390_check_relocs): Updated.
457 (elf_s390_finish_dynamic_sections): Likewise.
458 * elf32-sh.c (elf_sh_link_hash_table): Remove sdynbss, srelbss
459 and aym_cache.
460 (sh_elf_create_dynamic_sections): Updated.
461 (sh_elf_adjust_dynamic_symbol): Likewise.
462 (sh_elf_size_dynamic_sections): Likewise.
463 (sh_elf_check_relocs): Likewise.
464 * elf32-tic6x.c (elf32_tic6x_link_hash_table): Remove sym_cache.
465 (elf32_tic6x_check_relocs): Updated.
466 * elf32-tilepro.c (tilepro_elf_link_hash_table): Removed.
467 (tilepro_elf_hash_table): Updated.
468 (tilepro_elf_link_hash_table_create): Likewise.
469 (tilepro_elf_check_relocs): Likewise.
470 (tilepro_elf_adjust_dynamic_symbol): Likewise.
471 (allocate_dynrelocs): Likewise.
472 (tilepro_elf_size_dynamic_sections): Likewise.
473 (tilepro_elf_relocate_section): Likewise.
474 (tilepro_elf_finish_dynamic_symbol): Likewise.
475 (tilepro_finish_dyn): Likewise.
476 (tilepro_elf_finish_dynamic_sections): Likewise.
477 * elf64-ppc.c (ppc_link_hash_table): Remove sym_cache.
478 (ppc64_elf_before_check_relocs): Updated.
479 (ppc64_elf_check_relocs): Likewise.
480 * elf64-s390.c (elf_s390_link_hash_table): Remove sym_cache.
481 (elf_s390_check_relocs): Updated.
482 (elf_s390_relocate_section): Likewise.
483 (elf_s390_finish_dynamic_sections): Likewise.
484 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
485 (elf_x86_64_check_relocs): Likewise.
486 * elfnn-aarch64.c (elf_aarch64_link_hash_table): Remove
487 sym_cache.
488 (elfNN_aarch64_check_relocs): Updated.
489 * elfnn-riscv.c (riscv_elf_link_hash_table): Remove sym_cache.
490 (riscv_elf_check_relocs): Updated.
491 * elfxx-mips.c (mips_elf_link_hash_table): Remove sym_cache.
492 (mips_elf_resolve_got_page_ref): Updated.
493 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
494 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Remove
495 sym_cache.
496 * elfxx-tilegx.c (tilegx_elf_link_hash_table): Likewise.
497 (tilegx_elf_check_relocs): Updated.
498 * elfxx-x86.h (elf_x86_link_hash_table): Remove sym_cache.
499
c77cb2a0
MR
5002020-07-29 Maciej W. Rozycki <macro@linux-mips.org>
501
502 * elflink.c (bfd_elf_final_link): Give local symbols a name if
503 so requested.
504 * elfxx-mips.c (_bfd_mips_elf_name_local_section_symbols): Only
505 return TRUE if making ET_REL output.
506
3f1b17bb
MR
5072020-07-29 Maciej W. Rozycki <macro@linux-mips.org>
508
509 * elf-bfd.h (elf_backend_data): Add
510 `elf_backend_elfsym_local_is_section' member.
511 * elfxx-target.h (elf_backend_elfsym_local_is_section): New
512 macro.
513 (elfNN_bed): Add `elf_backend_elfsym_local_is_section' member.
514 * elflink.c (bfd_elf_final_link): Use it to determine whether
515 set the `.symtab' section's `sh_info' value to the index of the
516 first non-local or non-section symbol.
517 * elf32-mips.c (mips_elf32_elfsym_local_is_section): New
518 function.
519 (elf_backend_elfsym_local_is_section): New macro.
520 * elfn32-mips.c (mips_elf_n32_elfsym_local_is_section): New
521 function.
522 (elf_backend_elfsym_local_is_section): New macro.
523
4d68fd75
AM
5242020-07-29 Alan Modra <amodra@gmail.com>
525
526 * elflink.c (bfd_elf_final_link): Don't segfault on local dynsyms
527 defined in excluded sections.
528
67411cbf
AM
5292020-07-28 Alan Modra <amodra@gmail.com>
530
531 * elf.c (assign_section_numbers): Comment. Don't segfault on
532 discarded sections when setting linked-to section for generic
533 ELF linker.
534 * elflink.c (bfd_elf_match_symbols_in_sections): Allow NULL info.
535
93fd13c7
AM
5362020-07-27 Alan Modra <amodra@gmail.com>
537
538 * xcofflink.c (xcoff_need_ldrel_p): Accept --just-symbols symbols and
539 similar as absolute.
540 (bfd_xcoff_import_symbol): Don't fuss over absolute symbol
541 redefinitions here.
542
04f096fb
NC
5432020-07-24 Nick Clifton <nickc@redhat.com>
544
545 * config.bfd: Move xc16x target to the obsolete list.
546
5efb6779
KB
5472020-07-22 Kevin Buettner <kevinb@redhat.com>
548
549 * binary.c (binary_get_section_contents): Seek using offset
550 from section's file position.
551
ea57e509
KB
5522020-07-22 Kevin Buettner <kevinb@redhat.com>
553
554 * elf.c (_bfd_elf_make_section_from_phdr): Remove hack for GDB.
04f096fb 555
1ad2776d
MF
5562020-07-22 Max Filippov <jcmvbkbc@gmail.com>
557
558 PR 26246
559 * elf32-xtensa.c (removed_literal_compare): Use correct pointer
560 type for the first function argument. Rename pointers to reflect
561 that they have distinct types.
562
2f5541f3
AM
5632020-07-20 Alan Modra <amodra@gmail.com>
564
565 * elflink.c (_bfd_elf_gc_keep): Use bfd_is_const_section.
566
e10a07b3
AM
5672020-07-19 Alan Modra <amodra@gmail.com>
568
569 * elf64-ppc.c (struct ppc_link_hash_table): Add has_power10_relocs.
570 (select_alt_stub): New function.
571 (ppc_get_stub_entry): Use it here.
572 (ppc64_elf_check_relocs): Set had_power10_relocs rather than
573 power10_stubs.
574 (ppc64_elf_size_stubs): Clear power10_stubs here instead. Don't
575 merge notoc stubs with other varieties when power10_stubs is "auto".
576 Instead dup the stub hash table entry.
577 (plt_stub_size, ppc_build_one_stub, ppc_size_one_stub): Adjust
578 tests of power10_stubs.
579
28b80303
AM
5802020-07-15 Alan Modra <amodra@gmail.com>
581
582 PR 26239
583 * coffgen.c (_bfd_coff_close_and_cleanup): Free dwarf2 info.
584
4fd8d585
NC
5852020-07-15 Nick Clifton <nickc@redhat.com>
586
587 PR26240
588 * coffgen.c (coff_get_normalized_symtab): Fix off-by-one error in
589 check for aux entries that overflow the buufer.
590
a8a48c75
HPN
5912020-07-15 Hans-Peter Nilsson <hp@bitrange.com>
592
593 * elf64-mmix.c (mmix_elf_relax_section): Improve accounting for
594 R_MMIX_PUSHJ_STUBBABLE relocs against undefined symbols.
595
e8a83e93
MB
5962020-07-15 Markus Böck <markus.boeck02@gmail.com>
597 Alan Modra <amodra@gmail.com>
598
599 PR 26198
600 * coffgen.c (_bfd_coff_section_already_linked): Allow for plugin
601 objects both before and after normal object files.
602 * elflink.c (_bfd_elf_section_already_linked): Likewise.
603
d3b10ee7
AM
6042020-07-10 Alan Modra <amodra@gmail.com>
605
606 * elf64-ppc.h (struct ppc64_elf_params): Add power10_stubs.
607 * elf64-ppc.c (struct ppc_link_hash_table): Delete
608 power10_stubs.
609 (ppc64_elf_check_relocs): Adjust setting of power10_stubs.
610 (plt_stub_size, ppc_build_one_stub, ppc_size_one_stub): Adjust
611 uses of power10_stubs.
612
fe49679d
AM
6132020-07-09 Alan Modra <amodra@gmail.com>
614
615 * coff-ppc.c: Delete.
616 * pe-ppc.c: Delete.
617 * pei-ppc.c: Delete.
618 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Remove PE PPC.
619 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags): Remove
620 PPCMAGIC code.
621 (coff_write_object_contents): Remove PPC_PE code.
622 * config.bfd: Move powerpcle-pe to removed targets.
623 * configure.ac: Remove powerpc PE entries.
624 * libcoff-in.h (ppc_allocate_toc_section): Delete.
625 (ppc_process_before_allocation): Delete.
626 * peXXigen.c: Remove POWERPC_LE_PE code and comments.
627 * targets.c: Remove powerpc PE vectors.
628 * po/SRC-POTFILES.in: Regenerate.
629 * libcoff.h: Regenerate.
630 * Makefile.in: Regenerate.
631 * configure: Regenerate.
632
7646efdf
NC
6332020-07-09 Nick Clifton <nickc@redhat.com>
634
635 * po/fr.po: Updated French translation.
636
23f5e55e
AM
6372020-07-07 Alan Modra <amodra@gmail.com>
638
639 * xcofflink.c (xcoff_mark): Don't mark const sections.
640 (bfd_xcoff_record_link_assignment): Add FIXME.
641 (_bfd_xcoff_bfd_final_link): Don't segfault on assorted magic
642 sections being discarded by linker script.
643
c8001886
AM
6442020-07-07 Alan Modra <amodra@gmail.com>
645
646 * coff-rs6000.c (xcoff_write_archive_contents_old): Set default
647 time, uid, gid and mode for deterministic archive.
648 (xcoff_write_archive_contents_big): Likewise.
649
8af7926f
AM
6502020-07-07 Alan Modra <amodra@gmail.com>
651
652 * coffcode.h (coff_classify_symbol): Handle C_HIDEXT and
653 C_AIX_WEAKEXT.
654
17550be7
NC
6552020-07-06 Nick Clifton <nickc@redhat.com>
656
657 * po/pt.po: Updated Portuguese translation.
658 * po/uk.po: Updated Ukranian translation.
659
b4396c5e
NC
6602020-07-04 Nick Clifton <nickc@redhat.com>
661
662 * version.m4: Set version to 2.35.50.
663 * configure: Regenerate.
664 * po/bbfd.pot: Regenerate.
665
b115b9fd
NC
6662020-07-04 Nick Clifton <nickc@redhat.com>
667
668 Binutils 2.35 branch created.
669
33d1369f
AM
6702020-07-01 Alan Modra <amodra@gmail.com>
671
672 PR 26188
673 * coffgen.c (coff_find_nearest_line_with_names): Sanity check
674 raw syment index before dereferencing.
675
cc574a35
AM
6762020-07-01 Alan Modra <amodra@gmail.com>
677
678 * elf32-i386.c (elf_backend_object_p): Undef for vxworks.
679
3443489c
AM
6802020-07-01 Alan Modra <amodra@gmail.com>
681
682 * config.bfd: Obsolete xc16x.
683
bbd19b19
L
6842020-06-30 H.J. Lu <hongjiu.lu@intel.com>
685
686 * archures.c (bfd_mach_i386_nacl): Removed.
687 (bfd_mach_i386_i386_nacl): Likewise.
688 (bfd_mach_x86_64_nacl): Likewise.
689 (bfd_mach_x64_32_nacl): Likewise.
690 * config.bfd: Remove *-*-nacl* targets.
691 * configure.ac: Remove x86 NaCl target vectors.
692 * cpu-i386.c (bfd_arch_i386_onebyte_nop_fill): Removed.
693 (bfd_x64_32_nacl_arch): Likewise.
694 (bfd_x86_64_nacl_arch): Likewise.
695 (bfd_i386_nacl_arch): Likewise.
696 (bfd_x64_32_arch_intel_syntax): Updated.
697 * elf32-i386.c: Don't include "elf-nacl.h".
698 (elf_i386_nacl_plt): Removed.
699 (elf_i386_nacl_plt0_entry): Likewise.
700 (elf_i386_nacl_plt_entry): Likewise.
701 (elf_i386_nacl_pic_plt0_entry): Likewise.
702 (elf_i386_nacl_pic_plt_entry): Likewise.
703 (elf_i386_nacl_eh_frame_plt): Likewise.
704 (elf_i386_nacl_plt): Likewise.
705 (elf32_i386_nacl_elf_object_p): Likewise.
706 (elf_i386_get_synthetic_symtab): Updated.
707 (elf_i386_link_setup_gnu_properties): Likewise.
708 * elf64-x86-64.c: Don't include "elf-nacl.h".
709 (elf_x86_64_nacl_plt): Removed.
710 (elf64_x86_64_nacl_elf_object_p): Likewise.
711 (elf_x86_64_nacl_plt0_entry): Likewise.
712 (elf_x86_64_nacl_plt_entry): Likewise.
713 (elf_x86_64_nacl_eh_frame_plt): Likewise.
714 (elf_x86_64_nacl_plt): Likewise.
715 (elf32_x86_64_nacl_elf_object_p): Likewise.
716 (elf_x86_64_get_synthetic_symtab): Updated.
717 (elf_x86_64_link_setup_gnu_properties): Likewise.
718 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
719 * targets.c: Remove x86 NaCl target vectors.
720 * bfd-in2.h: Regenerated.
721 * configure: Likewise.
722
a57f74bb
L
7232020-06-29 H.J. Lu <hongjiu.lu@intel.com>
724
725 * elf32-tic6x.c (elf32_tic6x_size_dynamic_sections): Call
726 _bfd_elf_add_dynamic_tags.
727
07d22f64
AM
7282020-06-29 Alan Modra <amodra@gmail.com>
729
730 * peXXigen.c (_bfd_XXi_slurp_codeview_record): Properly check
731 return value of bfd_bread. Don't read more than requested length.
732 Sanity check length. Properly terminate file name.
733
279edac5
AM
7342020-06-29 Alan Modra <amodra@gmail.com>
735
736 * arc-got.h: Use C style comments.
737 * coff-z80.c: Likewise.
738 * elf32-csky.c: Likewise.
739 * peXXigen.c: Likewise.
740 * elf32-m32c.c (m32c_elf_relax_delete_bytes): Remove commented out
741 code.
742
85f7484a
PB
7432020-06-26 Pat Bernardi <bernardi@adacore.com>
744
745 * elf32-m68k.c (m68k_elf_merge_obj_attributes): New function.
746 (elf32_m68k_merge_private_bfd_data): Merge GNU attributes.
747
ba9b3ef5
AM
7482020-06-26 Alan Modra <amodra@gmail.com>
749
750 * elfxx-riscv.c (struct priv_spec_t, priv_specs),
751 (riscv_get_priv_spec_class, riscv_get_priv_spec_class_from_numbers),
752 (riscv_get_priv_spec_name): Move to..
753 * cpu-riscv.c: ..here.
754 (riscv_get_priv_spec_class_from_numbers): Don't xmalloc temp buffer.
755 Use %u to print unsigned numbers.
756
069057bf
AB
7572020-06-24 Andrew Burgess <andrew.burgess@embecosm.com>
758
759 * cpu-riscv.c (riscv_scan): Don't allow shorter matches using the
760 default architecture.
761
2c8e3708
L
7622020-06-24 H.J. Lu <hongjiu.lu@intel.com>
763
764 PR ld/26083
765 * elf32-csky.c (csky_elf_size_dynamic_sections): Call
766 _bfd_elf_add_dynamic_tags.
767
c679ec98
L
7682020-06-24 H.J. Lu <hongjiu.lu@intel.com>
769
770 PR ld/26083
771 * elf32-cris.c (elf_cris_size_dynamic_sections): Call
772 _bfd_elf_add_dynamic_tags.
773
f8b1e5f6
AM
7742020-06-24 Alan Modra <amodra@gmail.com>
775
776 * vms-alpha.c (_bfd_vms_slurp_etir <ETIR__C_OPR_ASH>): Implement
777 shifts without undefined behaviour.
778
3084d7a2
L
7792020-06-23 H.J. Lu <hongjiu.lu@intel.com>
780
781 * elf-bfd.h (elf_link_hash_table): Add dt_pltgot_required and
782 dt_jmprel_required.
783 (_bfd_elf_add_dynamic_tags): New.
784 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Call
785 _bfd_elf_add_dynamic_tags.
786 * elf32-arc.c (elf_arc_size_dynamic_sections): Likewise.
787 * elf32-bfin.c (elf32_bfinfdpic_size_dynamic_sections): Likewise.
788 * elf32-cr16.c (_bfd_cr16_elf_size_dynamic_sections): Likewise.
789 * elf32-frv.c (elf32_frvfdpic_size_dynamic_sections): Likewise.
790 * elf32-lm32.c (lm32_elf_size_dynamic_sections): Likewise.
791 * elf32-m32r.c (m32r_elf_size_dynamic_sections): Likewise.
792 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
793 * elf32-microblaze.c (microblaze_elf_size_dynamic_sections):
794 Likewise.
795 * elf32-nds32.c (nds32_elf_size_dynamic_sections): Likewise.
796 * elf32-nios2.c (nios2_elf32_size_dynamic_sections): Likewise.
797 * elf32-or1k.c (or1k_elf_size_dynamic_sections): Likewise.
798 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
799 * elf32-tilepro.c (tilepro_elf_size_dynamic_sections): Likewise.
800 * elf32-vax.c (elf_vax_size_dynamic_sections): Likewise.
801 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
802 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
803 * elfnn-aarch64.c (elfNN_aarch64_size_dynamic_sections):
804 Likewise.
805 * elfnn-riscv.c (riscv_elf_size_dynamic_sections): Likewise.
806 * elfxx-tilegx.c (tilegx_elf_size_dynamic_sections): Likewise.
807 * elf32-arm.c (elf32_arm_size_dynamic_sections): Call
808 _bfd_elf_maybe_vxworks_add_dynamic_tags.
809 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
810 * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections):
811 Likewise.
812 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Likewise.
813 (_bfd_x86_elf_size_dynamic_sections): Likewise.
814 * elfxx-x86.h (elf_x86_link_hash_table): Remove dt_reloc,
815 dt_reloc_sz and dt_reloc_ent.
816 * elf-vxworks.c (_bfd_elf_maybe_vxworks_add_dynamic_tags): New.
817 * elf-vxworks.h (_bfd_elf_maybe_vxworks_add_dynamic_tags):
818 Likewise.
819 * elf32-hppa.c (elf32_hppa_link_hash_table_create): Set
820 etab.dt_pltgot_required.
821 (elf32_hppa_size_dynamic_sections): Call
822 _bfd_elf_add_dynamic_tags.
823 * elf32-metag.c (elf_metag_link_hash_table_create): Set
824 etab.dt_pltgot_required.
825 (elf_metag_size_dynamic_sections): Call _bfd_elf_add_dynamic_tags.
826 * elf32-sh.c (sh_elf_link_hash_table_create): Set
827 root.dt_pltgot_required for FDPIC output.
828 (sh_elf_size_dynamic_sections): Call
829 _bfd_elf_maybe_vxworks_add_dynamic_tags.
830 * elf32-xtensa.c (elf_xtensa_link_hash_table_create): Set
831 elf.dt_pltgot_required.
832 (elf_xtensa_size_dynamic_sections): Call
833 _bfd_elf_add_dynamic_tags.
834 * elf64-hppa.c (elf64_hppa_hash_table_create): Set
835 root.dt_pltgot_required.
836 (elf64_hppa_size_dynamic_sections): Call
837 _bfd_elf_add_dynamic_tags.
838 * elfnn-ia64.c (elfNN_ia64_hash_table_create): Set
839 root.dt_pltgot_required.
840 (elfNN_ia64_size_dynamic_sections): Set root.dt_jmprel_required
841 for rel_pltoff_sec. Call _bfd_elf_add_dynamic_tags.
842 * elflink.c (_bfd_elf_add_dynamic_tags): New.
843
d768f160
SJ
8442020-06-22 Saagar Jha <saagar@saagarjha.com>
845
846 * mach-o.c: Support the new load commands by reading a linkedit
847 data command for them.
848
39ff0b81
NC
8492020-06-22 Nelson Chu <nelson.chu@sifive.com>
850
851 * elfxx-riscv.c (struct priv_spec_t priv_specs[]): Move them from
852 opcodes/riscv-opc.c to bfd/elfxx-riscv.c, since we need it in linker.
853 (riscv_get_priv_spec_class): Likewise.
854 (riscv_get_priv_spec_name): Likewise.
855 (riscv_get_priv_spec_class_from_numbers): New function, convert
856 the version numbers into string, then call riscv_get_priv_spec_class
857 to get the priv spec class.
858 * elfxx-riscv.h (riscv_get_priv_spec_class): Move forward declaration
859 from include/opcode/riscv.h to bfd/elfxx-riscv.h.
860 (riscv_get_priv_spec_name): Likewise.
861 (riscv_get_priv_spec_class_from_numbers): New forward declaration.
862 (opcode/riscv.h): Include it in the header rather than elfxx-riscv.c.
863 * elfnn-riscv.c (riscv_merge_attributes): Get the priv spec classes
864 of input and output objects form their priv spec attributes by
865 riscv_get_priv_spec_class_from_numbers. Report warning rather than
866 errors when linking objects with differnet priv spec versions. We do
867 know v1.9.1 may have conflicts to other versions, so report the
868 warning, too. After that, update the output priv spec version to the
869 newest one so far.
870
cbd7581f
NC
8712020-06-22 Nelson Chu <nelson.chu@sifive.com>
872
873 * elfnn-riscv.c (riscv_merge_attributes): Once we meet one of the
874 priv attributes, we will check the conflicts for all of them (major,
875 minor and revision), and then set the priv_attrs_merged to TRUE to
876 indicate that we have handled all of the priv attributes. Remove
877 the unused boolean priv_may_conflict, in_priv_zero and out_priv_zero.
878
1e927850
AM
8792020-06-21 Alan Modra <amodra@gmail.com>
880
881 PR 26132
882 * configure.ac: Disable plugins by default for some targets.
883 * plugin.c: Comment typo fix.
884 * configure: Regenerate.
885
13aa5ceb
NC
8862020-06-19 Nick Clifton <nickc@redhat.com>
887
888 * plugin.c (try_load_plugin): Suppress the error message about
889 being unable to open a plugin if creating a list of viable
890 plugins.
891
a435742a
AM
8922020-06-16 Alan Modra <amodra@gmail.com>
893
894 * aout-tic30.c: Delete file.
895 * Makefile.am (BFD32_BACKENDS): Remove aout-tic30.lo.
896 (BFD32_BACKENDS_CFILES): Remove aout-tic30.c.
897 * config.bfd (c30-*-*aout*, tic30-*-*aout*): Remove entry.
898 (xc16x-*-elf): Sort properly.
899 * configure.ac: Remove tic30_aout_vec.
900 * targets.c: Likewise.
901 * Makefile.in: Regenerate.
902 * configure: Regenerate.
903 * po/SRC-POTFILES.in: Regenerate.
904
7a77f1ac
MF
9052020-06-15 Max Filippov <jcmvbkbc@gmail.com>
906
907 * elf32-xtensa.c (XSHAL_ABI, XTHAL_ABI_UNDEFINED)
908 (XTHAL_ABI_WINDOWED, XTHAL_ABI_CALL0): New macros.
909 (elf32xtensa_abi): New global variable.
910 (xtensa_abi_choice): New function.
911 (elf_xtensa_create_plt_entry): Use xtensa_abi_choice instead of
912 XSHAL_ABI to select PLT code.
913
cae64165
RM
9142020-06-15 Roland McGrath <mcgrathr@google.com>
915
916 * elflink.c (bfd_elf_define_start_stop): Use start_stop_visibility
917 field of bfd_link_info.
918
40be168c
AM
9192020-06-15 Alan Modra <amodra@gmail.com>
920
921 * config.bfd: Obsolete powerpcle-*-pe targets.
922
75cfe082
AM
9232020-06-15 Alan Modra <amodra@gmail.com>
924
925 PR 26103
926 * elflink.c (elf_link_add_archive_symbols): Exclude undefined
927 symbols that were defined in discarded sections.
928 * cofflink.c (coff_link_check_archive_element): Likewise.
929 (coff_link_add_symbols): Set indx to -3 for symbols defined in
930 discarded sections.
931 (_bfd_coff_write_global_sym): Don't emit such symbols.
932 libcoff-in.h (struct coff_link_hash_entry): Update indx comment.
933 libcoff.h: Regenerate.
934
f0aa3025
AM
9352020-06-11 Alan Modra <amodra@gmail.com>
936
937 PR 26107
938 * pdp11.c (is_stab): Replace legacy "index" function with "strchr".
939
447f6d86
L
9402020-06-10 H.J. Lu <hongjiu.lu@intel.com>
941
942 * elfnn-ia64.c (elfNN_ia64_link_hash_table): Remove reltext.
943 (allocate_dynrel_entries): Set DF_TEXTREL instead of reltext.
944 (elfNN_ia64_size_dynamic_sections): Check DF_TEXTREL instead
945 of reltext.
946
e1b5d517
L
9472020-06-10 H.J. Lu <hongjiu.lu@intel.com>
948
949 PR ld/26094
950 * elflink.c (bfd_elf_define_start_stop): Handle common symbols.
951 Clear verinfo.verdef.
952
cebd6b8a
L
9532020-06-09 H.J. Lu <hongjiu.lu@intel.com>
954
955 PR ld/18801
956 * elf-bfd.h (elf_link_hash_table): Add ifunc_resolvers.
957 (_bfd_elf_allocate_ifunc_dyn_relocs): Remove the
958 bfd_boolean * argument. Set ifunc_resolvers if there are IFUNC
959 resolvers.
960 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Updated.
961 Set ifunc_resolvers if there are FUNC resolvers.
962 * elf64-ppc.c (ppc_link_hash_table): Remove local_ifunc_resolver.
963 (build_global_entry_stubs_and_plt): Replace local_ifunc_resolver
964 with elf.ifunc_resolvers.
965 (write_plt_relocs_for_local_syms): Likewise.
966 (ppc64_elf_relocate_section): Likewise.
967 (ppc64_elf_finish_dynamic_sections): Likewise.
968 * elfnn-aarch64.c (elfNN_aarch64_allocate_ifunc_dynrelocs):
969 Updated.
970 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Likewise.
971 (_bfd_x86_elf_size_dynamic_sections): Check elf.ifunc_resolvers
972 instead of readonly_dynrelocs_against_ifunc.
973 * elfxx-x86.h (elf_x86_link_hash_table): Remove
974 readonly_dynrelocs_against_ifunc.
975
efb2a7b4
AM
9762020-06-09 Alan Modra <amodra@gmail.com>
977
978 * elf64-ppc.c (struct ppc_link_hash_table): Delete
979 maybe_local_ifunc_resolver field.
980 (build_global_entry_stubs_and_plt): Set local_ifunc_resolver in
981 cases where maybe_local_ifunc_resolver was set.
982 (ppc64_elf_relocate_section): Likewise.
983 (ppc64_elf_finish_dynamic_sections): Downgrade ifunc with textrel
984 error to a warning.
985
9bcc30e4
L
9862020-06-08 H.J. Lu <hongjiu.lu@intel.com>
987
988 * elf-bfd.h (elf_link_hash_entry): Add tlsdesc_plt and
989 tlsdesc_got.
990 * elf32-arm.c (elf32_arm_link_hash_table): Remove tlsdesc_plt
991 and dt_tlsdesc_got.
992 (elf32_arm_size_dynamic_sections): Updated. Clear
993 root.tlsdesc_plt for DF_BIND_NOW.
994 (elf32_arm_finish_dynamic_sections): Updated.
995 (elf32_arm_output_arch_local_syms): Likewise.
996 * elf32-nds32.c (nds32_elf_size_dynamic_sections): Updated.
997 Clear root.tlsdesc_plt for DF_BIND_NOW.
998 (nds32_elf_finish_dynamic_sections): Updated.
999 * elf32-nds32.h (elf_nds32_link_hash_table): Remove
1000 dt_tlsdesc_plt and dt_tlsdesc_got.
1001 * elf64-x86-64.c (elf_x86_64_finish_dynamic_sections): Updated.
1002 * elfnn-aarch64.c (elf_aarch64_link_hash_table): Remove
1003 tlsdesc_plt and dt_tlsdesc_got.
1004 (elfNN_aarch64_allocate_dynrelocs): Updated.
1005 (elfNN_aarch64_finish_dynamic_sections): Likewise.
1006 (elfNN_aarch64_size_dynamic_sections): Updated. Clear
1007 root.tlsdesc_plt for DF_BIND_NOW. Don't check DF_BIND_NOW
1008 twice.
1009 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Updated.
1010 (_bfd_x86_elf_size_dynamic_sections): Likewise.
1011 (_bfd_x86_elf_finish_dynamic_sections): Likewise.
1012 * elfxx-x86.h (elf_x86_link_hash_table): Remove tlsdesc_plt and
1013 tlsdesc_got.
1014
845b83d7
L
10152020-06-07 H.J. Lu <hongjiu.lu@intel.com>
1016
1017 * elf32-tic6x.c (elf32_bed): Defined the default to
1018 elf32_tic6x_bed.
1019
9b8a8575
L
10202020-06-07 H.J. Lu <hongjiu.lu@intel.com>
1021
1022 * elf64-hppa.c (elf64_hppa_link_hash_table): Remove plt_sec and
1023 plt_rel_sec.
1024 (elf64_hppa_check_relocs): Replace plt_sec/plt_rel_sec with
1025 root.splt/root.srelplt.
1026 (elf64_hppa_create_dynamic_sections): Likewise.
1027 (elf64_hppa_size_dynamic_sections): Likewise.
1028 (elf64_hppa_finish_dynamic_symbol): Likewise.
1029 (elf_hppa_final_link): Likewise.
1030 (elf_hppa_final_link_relocate): Likewise.
1031
bcab203d
L
10322020-06-06 H.J. Lu <hongjiu.lu@intel.com>
1033
1034 * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Updated.
1035 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Remove
1036 is_vxworks.
1037
90c14f0c
L
10382020-06-06 H.J. Lu <hongjiu.lu@intel.com>
1039
1040 * elf-bfd.h (elf_target_os): New.
1041 (elf_link_hash_table): Add target_os.
1042 (elf_backend_data): Add target_os.
1043 * elf32-arm.c (elf32_arm_link_hash_table): Remove vxworks_p,
1044 symbian_p and nacl_p.
1045 (create_got_section): Updated.
1046 (elf32_arm_create_dynamic_sections): Likewise.
1047 (arm_type_of_stub): Likewise.
1048 (elf32_arm_create_or_find_stub_sec): Likewise.
1049 (elf32_arm_allocate_plt_entry): Likewise.
1050 (elf32_arm_populate_plt_entry): Likewise.
1051 (elf32_arm_final_link_relocate): Likewise.
1052 (elf32_arm_check_relocs): Likewise.
1053 (allocate_dynrelocs_for_symbol): Likewise.
1054 (elf32_arm_finish_dynamic_symbol): Likewise.
1055 (elf32_arm_finish_dynamic_sections): Likewise.
1056 (elf32_arm_output_plt_map_1): Likewise.
1057 (elf32_arm_output_arch_local_syms): Likewise.
1058 (elf32_arm_add_symbol_hook): Likewise.
1059 (elf32_arm_nacl_link_hash_table_create): Likewise.
1060 (elf32_arm_vxworks_link_hash_table_create): Likewise.
1061 (elf32_arm_symbian_link_hash_table_create): Likewise.
1062 (ELF_TARGET_OS): New.
1063 * elf32-i386.c (elf_i386_arch_bed): Removed.
1064 (elf_backend_arch_data): Likewise.
1065 (elf_i386_solaris_arch_bed): Likewise.
1066 (elf_i386_nacl_arch_bed): Likewise.
1067 (elf_i386_vxworks_arch_bed): Likewise.
1068 (elf_i386_relocate_section): Updated.
1069 (elf_i386_finish_dynamic_sections): Likewise.
1070 (elf_i386_get_synthetic_symtab): Likewise.
1071 (elf_i386_link_setup_gnu_properties): Likewise.
1072 (ELF_TARGET_OS): New.
1073 * elf32-mips.c (ELF_TARGET_OS): New.
1074 * elf32-ppc.c (ppc_elf_link_hash_table): Remove is_vxworks.
1075 (ppc_elf_create_got): Updated.
1076 (ppc_elf_create_dynamic_sections): Likewise.
1077 (ppc_elf_check_relocs): Likewise.
1078 (ppc_elf_adjust_dynamic_symbol): Likewise.
1079 (ppc_elf_size_dynamic_sections): Likewise.
1080 (ppc_elf_relocate_section): Likewise.
1081 (ppc_elf_finish_dynamic_sections): Likewise.
1082 (ppc_elf_vxworks_link_hash_table_create): Likewise.
1083 (ELF_TARGET_OS): New.
1084 * elf32-sh.c (elf_sh_link_hash_table): Remove vxworks_p.
1085 (sh_elf_link_hash_table_create): Updated.
1086 (sh_elf_create_dynamic_sections): Likewise.
1087 (allocate_dynrelocs): Likewise.
1088 (sh_elf_size_dynamic_sections): Likewise.
1089 (sh_elf_relocate_section): Likewise.
1090 (sh_elf_finish_dynamic_symbol): Likewise.
1091 (sh_elf_finish_dynamic_sections): Likewise.
1092 (ELF_TARGET_OS): New.
1093 * elf32-sparc.c (elf32_sparc_vxworks_link_hash_table_create):
1094 Removed.
1095 (bfd_elf32_bfd_link_hash_table_create): Likewise.
1096 (ELF_TARGET_OS): New.
1097 * elf64-x86-64.c (elf_x86_64_arch_bed): Removed.
1098 (elf_x86_64_solaris_arch_bed): Likewise.
1099 (elf_x86_64_nacl_arch_bed): Likewise.
1100 (elf_x86_64_finish_dynamic_sections): Updated.
1101 (elf_x86_64_get_synthetic_symtab): Likewise.
1102 (elf_x86_64_link_setup_gnu_properties): Likewise.
1103 (ELF_TARGET_OS): New.
1104 * elflink.c (_bfd_elf_link_hash_table_init): Initialize
1105 target_o.
1106 * elfxx-mips.c (mips_elf_link_hash_table): Remove is_vxworks.
1107 (MIPS_ELF_REL_DYN_NAME): Updated.
1108 (ELF_MIPS_GP_OFFSET): Likewise.
1109 (mips_elf_create_local_got_entry): Likewise.
1110 (mips_elf_allocate_dynamic_relocations): Likewise.
1111 (mips_elf_count_got_symbols): Likewise.
1112 (is_gott_symbol): Likewise.
1113 (mips_elf_calculate_relocation): Likewise.
1114 (mips_elf_create_dynamic_relocation): Likewise.
1115 (_bfd_mips_elf_check_relocs): Likewise.
1116 (allocate_dynrelocs): Likewise.
1117 (_bfd_mips_elf_adjust_dynamic_symbol): Likewise.
1118 (mips_elf_lay_out_got): Likewise.
1119 (mips_elf_set_plt_sym_value): Likewise.
1120 (_bfd_mips_elf_size_dynamic_sections): Likewise.
1121 (_bfd_mips_elf_finish_dynamic_symbol): Likewise.
1122 (_bfd_mips_elf_finish_dynamic_sections): Likewise.
1123 (_bfd_mips_elf_final_link): Likewise.
1124 (_bfd_mips_init_file_header): Likewise.
1125 * elfxx-sparc.c (_bfd_sparc_elf_create_dynamic_sections):
1126 Likewise.
1127 (allocate_dynrelocs): Likewise.
1128 (_bfd_sparc_elf_size_dynamic_sections): Likewise.
1129 (_bfd_sparc_elf_relocate_section): Likewise.
1130 (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
1131 (sparc_finish_dyn): Likewise.
1132 (_bfd_sparc_elf_finish_dynamic_sections): Likewise.
1133 * elfxx-target.h (ELF_TARGET_OS): New.
1134 (elfNN_bed): Add ELF_TARGET_OS.
1135 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Updated.
1136 (_bfd_x86_elf_link_hash_table_create): Likewise.
1137 (_bfd_x86_elf_size_dynamic_sections): Likewise.
1138 (_bfd_x86_elf_finish_dynamic_sections): Likewise.
1139 (_bfd_x86_elf_adjust_dynamic_symbol): Likewise.
1140 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
1141 * elfxx-x86.h (elf_x86_target_os): Removed.
1142 (elf_x86_backend_data): Likewise.
1143 (get_elf_x86_backend_data): Likewise.
1144 (elf_x86_link_hash_table): Remove target_os.
1145
87c69f97
AM
11462020-06-06 Alan Modra <amodra@gmail.com>
1147
1148 * reloc.c: Rename
1149 BFD_RELOC_PPC64_GOT_TLSGD34 to BFD_RELOC_PPC64_GOT_TLSGD_PCREL34,
1150 BFD_RELOC_PPC64_GOT_TLSLD34 to BFD_RELOC_PPC64_GOT_TLSLD_PCREL34,
1151 BFD_RELOC_PPC64_GOT_TPREL34 to BFD_RELOC_PPC64_GOT_TPREL_PCREL34,
1152 BFD_RELOC_PPC64_GOT_DTPREL34 to BFD_RELOC_PPC64_GOT_DTPREL_PCREL34.
1153 * elf64-ppc.c: Update throughout for reloc renaming.
1154 (ppc64_elf_reloc_name_lookup): Handle old reloc names.
1155 * libbfd.h: Regenerate.
1156 * bfd-in2.h: Regenerate.
1157
981f1518
L
11582020-06-05 H.J. Lu <hongjiu.lu@intel.com>
1159
8a4ba3a1 1160 PR ld/26080
981f1518
L
1161 * elf32-bfin.c (bfinfdpic_relocate_section): Skip non SEC_ALLOC
1162 section.
1163
9c65eeac
NC
11642020-06-05 Nick Clifton <nickc@redhat.com>
1165
1166 * pdp11.c (aout_link_add_symbols): Fix use before initialisation
1167 bug.
1168
41285764
NC
11692020-06-05 Nelson Chu <nelson.chu@sifive.com>
1170
1171 * elfnn-riscv.c (riscv_merge_attributes): Add new boolean
1172 priv_may_conflict, in_priv_zero and out_priv_zero to decide
1173 whether the object can be linked according to it's priv
1174 attributes. The object without any priv spec attributes can
1175 be linked with others. If the first input object doesn't contain
1176 any priv attributes, then we need to copy the setting from the
1177 next input one. Also report more detailed error messages to user.
1178
a975c88e
SC
11792020-06-04 Stephen Casner <casner@acm.org>
1180
1181 Extend pdp11-aout symbol table format to accommodate .stab
1182 symbols and implement correct handling of them.
1183
1184 * pdp11.c (pdp11_external_nlist): Repurposed e_unused to e_desc.
1185 (N_STAB, is_stab): Needed new function is_stab to disambiguate
1186 normal vs. .stab symbol table type values, replacing N_STAB mask.
1187 (translate_from_native_sym_flags): Determine correct section for
1188 different .stab types.
1189 (translate_to_native_sym_flags): Leave .stab types intact.
1190 (translate_symbol_table): Error if symbol indicates overlay;
1191 store desc field from .stab symbols.
1192 (write_syms): Output desc field with symbol.
1193 (aout_link_check_ar_symbols): Skip .stab symbols.
1194 (aout_link_add_symbols): Correctly distinguish .stab symbols.
1195 (aout_link_write_other_symbol): Write 0 for desk and ovly fields.
1196 (aout_link_write_symbols): Write 0 for desk and ovly fields;
1197 correctly distinguish .stab symbols and select calculate their
1198 section and value; and copy desc and ovly fields from input symbol
1199 to output symbol.
1200
3b9313c4
SC
12012020-06-04 Stephen Casner <casner@acm.org>
1202
1203 * aoutx.h (translate_symbol_table): Comment had external and
1204 internal swapped.
1205 * pdp11.c (translate_symbol_table): Likewise.
1206
add5f777
L
12072020-06-04 H.J. Lu <hongjiu.lu@intel.com>
1208
1209 * elfxx-x86.h (elf_x86_link_hash_table): Remove target_id.
1210 (is_x86_elf): Check elf.hash_table_id instead of target_id.
1211 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Updated.
1212
c4b126b8
L
12132020-06-04 H.J. Lu <hongjiu.lu@intel.com>
1214
1215 PR ld/26080
1216 * elf-m10300.c (mn10300_elf_relocate_section): Resolve relocation
1217 in debug section against symbol defined in shared library to 0.
1218 * elf32-i386.c (elf_i386_check_relocs): Remove SEC_ALLOC check.
1219 * elf32-lm32.c (lm32_elf_check_relocs): Likewise.
1220 * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
1221 * elf32-nds32.c (nds32_elf_check_relocs): Likewise.
1222 * elf32-nios2.c (nios2_elf32_check_relocs): Likewise.
1223 * elf32-or1k.c (or1k_elf_check_relocs): Likewise.
1224 * elf32-ppc.c (ppc_elf_check_relocs): Likewise.
1225 * elf32-sh.c (sh_elf_check_relocs): Likewise.
1226 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
1227 * elf64-alpha.c (elf64_alpha_check_relocs): Likewise.
1228 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
1229 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1230 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
1231 * elf32-vax.c (elf_vax_check_relocs): Set non_got_ref for non-GOT
1232 reference.
1233 (elf_vax_adjust_dynamic_symbol): Generate a copy reloc only if
1234 there is non-GOT reference.
1235 * elflink.c (_bfd_elf_link_check_relocs): Skip non-loaded,
1236 non-alloced sections.
1237
31af1e68
SC
12382020-06-03 Stephen Casner <casner@acm.org>
1239
1240 Copy several years of fixes from bfd/aoutx.h to bfd/pdp11.c.
1241
1242 * pdp11.c (some_aout_object_p): 4c1534c7a2a - Don't set EXEC_P for
1243 files with relocs.
1244 (aout_get_external_symbols): 6b8f0fd579d - Return if count is zero.
1245 0301ce1486b PR 22306 - Handle stringsize of zero, and error for any
1246 other size that doesn't qcover the header word.
1247 bf82069dce1 PR 23056 - Allocate an extra byte at the end of the
1248 string table, and zero it.
1249 (translate_symbol_table): 0d329c0a83a PR 22887 - Print an error
1250 message and set bfd_error on finding an invalid name string offset.
1251 (add_to_stringtab): INLINE -> inline
1252 (pdp11_aout_swap_reloc_in): 116acb2c268 PR 22887 - Correct r_index
1253 bound check.
1254 (squirt_out_relocs): e2996cc315d PR 20921 - Check for and report
1255 any relocs that could not be recognised.
1256 92744f05809 PR 20929 - Check for relocs without an associated symbol.
1257 (find_nearest_line): 808346fcfcf PR 23055 - Check that the symbol
1258 name exists and is long enough, before attempting to see if it is
1259 for a .o file.
1260 c3864421222 - Correct case for N_SO being the last symbol.
1261 50455f1ab29 PR 20891 - Handle the case where the main file name
1262 and the directory name are both empty.
1263 e82ab856bb4 PR 20892 - Handle the case where function name is empty.
1264 (aout_link_add_symbols): e517df3dbf7 PR 19629 - Check for out of
1265 range string table offsets.
1266 531336e3a0b PR 20909 - Fix off-by-one error in check for an
cae64165 1267 illegal string offset.
31af1e68
SC
1268 (aout_link_includes_newfunc): Add comment.
1269 (pdp11_aout_link_input_section): ad756e3f9e6 - Return with an error
1270 on unexpected relocation type rather than ASSERT.
1271
d4d8aee3
L
12722020-06-03 H.J. Lu <hongjiu.lu@intel.com>
1273
1274 PR ld/26066
1275 * elf32-nios2.c (nios2_elf32_size_dynamic_sections): Call
1276 _bfd_elf_maybe_set_textrel to set DF_TEXTREL.
1277
58ee44ef
L
12782020-06-03 H.J. Lu <hongjiu.lu@intel.com>
1279
1280 PR ld/26066
1281 * elf32-nios2.c (nios2_elf32_check_relocs): Skip non-loaded,
1282 non-alloced sections.
1283
9a689602
L
12842020-06-03 H.J. Lu <hongjiu.lu@intel.com>
1285
1286 * elf32-frv.c (elf32_frv_relocate_section): Don't generate
1287 dynamic relocations for non SEC_ALLOC sections.
1288
0bff7528
GN
12892020-06-03 Gunther Nikl <gnikl@justmail.de>
1290
1291 * aout64.c (BMAGIC, QMAGIC): Do not define.
1292 * aoutx.h (N_IS_BMAGIC, N_SET_QMAGIC): New defines.
1293 (NAME (aout, some_aout_object_p)): Use N_IS_QMAGIC and N_IS_BMAGIC
1294 to check the file format.
1295 (adjust_z_magic): Use N_SET_QMAGIC to set file format.
1296 * i386aout.c (NO_WRITE_HEADER_KLUDGE): Delete define.
1297 * libaout.h (NO_WRITE_HEADER_KLUDGE): Do not define.
1298
50d03636
L
12992020-06-03 H.J. Lu <hongjiu.lu@intel.com>
1300
1301 * elf32-arc.c (elf_arc_relocate_section): Don't generate dynamic
1302 relocations for non SEC_ALLOC sections.
1303
d49e5065
L
13042020-06-03 H.J. Lu <hongjiu.lu@intel.com>
1305
1306 * elf-bfd.h (_bfd_elf_maybe_set_textrel): New
1307 * elf32-arm.c (maybe_set_textrel): Removed.
1308 (elf32_arm_size_dynamic_sections): Replace maybe_set_textrel
1309 with _bfd_elf_maybe_set_textrel.
1310 * elf32-csky.c (maybe_set_textrel): Removed.
1311 (csky_elf_size_dynamic_sections): Replace maybe_set_textrel
1312 with _bfd_elf_maybe_set_textrel.
1313 * elf32-hppa.c (maybe_set_textrel): Removed.
1314 (elf32_hppa_size_dynamic_sections): Replace maybe_set_textrel
1315 with _bfd_elf_maybe_set_textrel.
1316 * elf32-lm32.c (maybe_set_textrel): Removed.
1317 (lm32_elf_size_dynamic_sections): Replace maybe_set_textrel
1318 with _bfd_elf_maybe_set_textrel.
1319 * elf32-m32r.c (maybe_set_textrel): Removed.
1320 (m32r_elf_size_dynamic_sections): Replace maybe_set_textrel
1321 with _bfd_elf_maybe_set_textrel.
1322 * elf32-metag.c (maybe_set_textrel): Removed.
1323 (elf_metag_size_dynamic_sections): Replace maybe_set_textrel
1324 with _bfd_elf_maybe_set_textrel.
1325 * elf32-nds32.c (maybe_set_textrel): Removed.
1326 (nds32_elf_size_dynamic_sections): Replace maybe_set_textrel
1327 with _bfd_elf_maybe_set_textrel.
1328 * elf32-or1k.c (maybe_set_textrel): Removed.
1329 (or1k_elf_size_dynamic_sections): Replace maybe_set_textrel
1330 with _bfd_elf_maybe_set_textrel.
1331 * elf32-ppc.c (maybe_set_textrel): Removed.
1332 (ppc_elf_size_dynamic_sections): Replace maybe_set_textrel
1333 with _bfd_elf_maybe_set_textrel.
1334 * elf32-s390.c (maybe_set_textrel): Removed.
1335 (elf_s390_size_dynamic_sections): Replace maybe_set_textrel
1336 with _bfd_elf_maybe_set_textrel.
1337 * elf32-sh.c (maybe_set_textrel): Removed.
1338 (sh_elf_size_dynamic_sections): Replace maybe_set_textrel
1339 with _bfd_elf_maybe_set_textrel.
1340 * elf32-tic6x.c (maybe_set_textrel): Removed.
1341 (elf32_tic6x_size_dynamic_sections): Replace maybe_set_textrel
1342 with _bfd_elf_maybe_set_textrel.
1343 * elf32-tilepro.c (maybe_set_textrel): Removed.
1344 (tilepro_elf_size_dynamic_sections): Replace maybe_set_textrel
1345 with _bfd_elf_maybe_set_textrel.
1346 * elf64-ppc.c (maybe_set_textrel): Removed.
1347 (ppc64_elf_size_dynamic_sections): Replace maybe_set_textrel
1348 with _bfd_elf_maybe_set_textrel.
1349 * elf64-s390.c (maybe_set_textrel): Removed.
1350 (elf_s390_size_dynamic_sections): Replace maybe_set_textrel
1351 with _bfd_elf_maybe_set_textrel.
1352 * elfnn-aarch64.c (maybe_set_textrel): Removed.
1353 (elfNN_aarch64_size_dynamic_sections): Replace maybe_set_textrel
1354 with _bfd_elf_maybe_set_textrel.
1355 * elfnn-riscv.c (maybe_set_textrel): Removed.
1356 (riscv_elf_size_dynamic_sections): Replace maybe_set_textrel
1357 with _bfd_elf_maybe_set_textrel.
1358 * elfxx-sparc.c (maybe_set_textrel): Removed.
1359 (_bfd_sparc_elf_size_dynamic_sections): Replace maybe_set_textrel
1360 with _bfd_elf_maybe_set_textrel.
1361 * elfxx-tilegx.c (maybe_set_textrel): Removed.
1362 (tilegx_elf_size_dynamic_sections): Replace maybe_set_textrel
1363 with _bfd_elf_maybe_set_textrel.
1364 * elfxx-x86.c (maybe_set_textrel): Removed.
1365 (_bfd_x86_elf_size_dynamic_sections): Replace maybe_set_textrel
1366 with _bfd_elf_maybe_set_textrel.
1367 * elflink.c (_bfd_elf_maybe_set_textrel): New.
1368
ad172eaa
L
13692020-06-03 H.J. Lu <hongjiu.lu@intel.com>
1370
1371 PR ld/26067
1372 * elf32-arm.c (elf32_arm_copy_indirect_symbol): Don't copy
1373 dyn_relocs.
1374 * elf32-csky.c (csky_elf_copy_indirect_symbol): Likewise.
1375 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
1376 * elf32-metag.c (elf_metag_copy_indirect_symbol): Likewise.
1377 * elf32-microblaze.c (microblaze_elf_copy_indirect_symbol):
1378 Likewise.
1379 * elf32-nds32.c (nds32_elf_copy_indirect_symbol): Likewise.
1380 * elf32-nios2.c (nios2_elf32_copy_indirect_symbol): Likewise.
1381 * elf32-or1k.c (or1k_elf_copy_indirect_symbol): Likewise.
1382 * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
1383 * elf32-sh.c (sh_elf_copy_indirect_symbol): Likewise.
1384 * elf32-tilepro.c (tilepro_elf_copy_indirect_symbol): Likewise.
1385 * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
1386 * elfnn-aarch64.c (elfNN_aarch64_copy_indirect_symbol): Likewise.
1387 * elfnn-riscv.c (riscv_elf_copy_indirect_symbol): Likewise.
1388 * elfxx-sparc.c (_bfd_sparc_elf_copy_indirect_symbol): Likewise.
1389 * elfxx-tilegx.c (tilegx_elf_copy_indirect_symbol): Likewise.
1390 * elfxx-x86.c (_bfd_x86_elf_copy_indirect_symbol): Likewise.
1391 * elf32-lm32.c (lm32_elf_copy_indirect_symbol): Removed.
1392 (elf_backend_copy_indirect_symbol): Likewise.
1393 * elf32-m32r.c (m32r_elf_copy_indirect_symbol): Removed.
1394 (elf_backend_copy_indirect_symbol): Likewise.
1395 * elflink.c (_bfd_elf_link_hash_copy_indirect): Copy dyn_relocs.
1396
5dbc8b37
L
13972020-06-03 H.J. Lu <hongjiu.lu@intel.com>
1398
1399 PR ld/26067
1400 * elf-bfd.h (_bfd_elf_readonly_dynrelocs): New.
1401 * elf32-arm.c (readonly_dynrelocs): Removed.
1402 (maybe_set_textrel): Replace readonly_dynrelocs with
1403 _bfd_elf_readonly_dynrelocs.
1404 * elf32-csky.c (readonly_dynrelocs): Removed.
1405 (maybe_set_textrel): Replace readonly_dynrelocs with
1406 _bfd_elf_readonly_dynrelocs.
1407 * elf32-hppa.c(readonly_dynrelocs): Removed.
1408 (alias_readonly_dynrelocs): Replace readonly_dynrelocs with
1409 _bfd_elf_readonly_dynrelocs.
1410 (maybe_set_textrel): Likewise.
1411 * elf32-lm32.c (readonly_dynrelocs): Removed.
1412 (lm32_elf_adjust_dynamic_symbol): Replace readonly_dynrelocs
1413 with _bfd_elf_readonly_dynrelocs.
1414 (maybe_set_textrel): Likewise.
1415 * elf32-m32r.c (readonly_dynrelocs): Removed.
1416 (m32r_elf_adjust_dynamic_symbol): Replace readonly_dynrelocs
1417 with _bfd_elf_readonly_dynrelocs.
1418 (maybe_set_textrel): Likewise.
1419 * elf32-metag.c (readonly_dynrelocs): Removed.
1420 (elf_metag_adjust_dynamic_symbol): Replace readonly_dynrelocs
1421 with _bfd_elf_readonly_dynrelocs.
1422 (maybe_set_textrel): Likewise.
1423 * elf32-microblaze.c (readonly_dynrelocs): Removed.
1424 (microblaze_elf_adjust_dynamic_symbol): Replace readonly_dynrelocs
1425 with _bfd_elf_readonly_dynrelocs.
1426 * elf32-nds32.c (readonly_dynrelocs): Removed.
1427 (nds32_elf_adjust_dynamic_symbol): Replace readonly_dynrelocs
1428 with _bfd_elf_readonly_dynrelocs.
1429 (maybe_set_textrel): Likewise.
1430 * elf32-or1k.c (readonly_dynrelocs): Removed.
1431 (or1k_elf_adjust_dynamic_symbol): Replace readonly_dynrelocs
1432 with _bfd_elf_readonly_dynrelocs.
1433 * elf32-ppc.c (readonly_dynrelocs): Removed.
1434 (alias_readonly_dynrelocs): Replace readonly_dynrelocs with
1435 _bfd_elf_readonly_dynrelocs.
1436 (ppc_elf_adjust_dynamic_symbol): Likewise.
1437 (maybe_set_textrel): Likewise.
1438 * elf32-s390.c (readonly_dynrelocs): Removed.
1439 (elf_s390_adjust_dynamic_symbol): Replace readonly_dynrelocs
1440 with _bfd_elf_readonly_dynrelocs.
1441 (maybe_set_textrel): Likewise.
1442 * elf32-sh.c (readonly_dynrelocs): Removed.
1443 (sh_elf_adjust_dynamic_symbol): Replace readonly_dynrelocs with
1444 _bfd_elf_readonly_dynrelocs.
1445 (maybe_set_textrel): Likewise.
1446 * elf32-tic6x.c (readonly_dynrelocs): Removed.
1447 (maybe_set_textrel): Replace readonly_dynrelocs with
1448 _bfd_elf_readonly_dynrelocs.
1449 * elf32-tilepro.c (readonly_dynrelocs): Removed.
1450 (tilepro_elf_adjust_dynamic_symbol): Replace readonly_dynrelocs
1451 with _bfd_elf_readonly_dynrelocs.
1452 (maybe_set_textrel): Likewise.
1453 * elf64-ppc.c (readonly_dynrelocs): Removed.
1454 (alias_readonly_dynrelocs): Replace readonly_dynrelocs with
1455 _bfd_elf_readonly_dynrelocs.
1456 (ppc64_elf_adjust_dynamic_symbol): Likewise.
1457 (maybe_set_textrel): Likewise.
1458 * elf64-s390.c (readonly_dynrelocs): Removed.
1459 (elf_s390_adjust_dynamic_symbol): Replace readonly_dynrelocs
1460 with _bfd_elf_readonly_dynrelocs.
1461 (maybe_set_textrel): Likewise.
1462 * elflink.c (_bfd_elf_readonly_dynrelocs): New.
1463 * elfnn-aarch64.c (readonly_dynrelocs): Removed.
1464 (maybe_set_textrel): Replace readonly_dynrelocs with
1465 _bfd_elf_readonly_dynrelocs.
1466 * elfnn-riscv.c (readonly_dynrelocs): Removed.
1467 (riscv_elf_adjust_dynamic_symbol): Replace readonly_dynrelocs
1468 with _bfd_elf_readonly_dynrelocs.
1469 (maybe_set_textrel): Likewise.
1470 * elfxx-sparc.c (readonly_dynrelocs): Removed.
1471 (_bfd_sparc_elf_adjust_dynamic_symbol): Replace
1472 readonly_dynrelocs with _bfd_elf_readonly_dynrelocs.
1473 (maybe_set_textrel): Likewise.
1474 * elfxx-tilegx.c (readonly_dynrelocs): Removed.
1475 (tilegx_elf_adjust_dynamic_symbol): Replace readonly_dynrelocs
1476 with _bfd_elf_readonly_dynrelocs.
1477 (maybe_set_textrel): Likewise.
1478 * elfxx-x86.c (readonly_dynrelocs): Removed.
1479 (maybe_set_textrel): Replace readonly_dynrelocs with
1480 _bfd_elf_readonly_dynrelocs.
1481 (_bfd_x86_elf_adjust_dynamic_symbol): Likewise.
1482
433953ff
L
14832020-06-03 H.J. Lu <hongjiu.lu@intel.com>
1484
1485 * elfxx-x86.h (GENERATE_DYNAMIC_RELOCATION_P): Silence
1486 -fsanitize=undefined.
1487
67580036
AM
14882020-06-03 Alan Modra <amodra@gmail.com>
1489
1490 PR 26069
1491 PR 18758
1492 * peicode.h (pe_ILF_make_a_section): Align data for compilers
1493 other than gcc.
1494 (pe_ILF_build_a_bfd): Likewise.
1495
0ed18fa1
AM
14962020-06-03 Alan Modra <amodra@gmail.com>
1497
7eea15c5 1498 PR 26069
0ed18fa1
AM
1499 * elf.c (_bfd_elf_close_and_cleanup): Free elf_shstrtab for
1500 core files as well as objects.
1501
190eb1dd
L
15022020-06-01 H.J. Lu <hongjiu.lu@intel.com>
1503
1504 PR ld/26067
1505 * elf-bfd.h (elf_link_hash_entry): Add dyn_relocs after size.
1506 * elf-s390-common.c (s390_elf_allocate_ifunc_dyn_relocs):
1507 Updated.
1508 * elf32-arc.c (elf_arc_link_hash_entry): Remove dyn_relocs.
1509 (elf_arc_link_hash_newfunc): Updated.
1510 * elf32-arm.c (elf32_arm_link_hash_entry): Remove dyn_relocs.
1511 (elf32_arm_link_hash_newfunc): Updated.
1512 (elf32_arm_copy_indirect_symbol): Likewise.
1513 (elf32_arm_check_relocs): Likewise.
1514 (readonly_dynrelocs): Likewise.
1515 (allocate_dynrelocs_for_symbol): Likewise.
1516 * elf32-csky.c (csky_elf_link_hash_entry): Remove dyn_relocs.
1517 (csky_elf_link_hash_newfunc): Updated.
1518 (csky_allocate_dynrelocs): Likewise.
1519 (readonly_dynrelocs): Likewise.
1520 (csky_elf_copy_indirect_symbol): Likewise.
1521 * elf32-hppa.c (elf32_hppa_link_hash_entry): Remove dyn_relocs.
1522 (hppa_link_hash_newfunc): Updated.
1523 (elf32_hppa_copy_indirect_symbol): Likewise.
1524 (elf32_hppa_hide_symbol): Likewise.
1525 (elf32_hppa_adjust_dynamic_symbol): Likewise.
1526 (allocate_dynrelocs): Likewise.
1527 (elf32_hppa_relocate_section): Likewise.
1528 * elf32-i386.c (elf_i386_check_relocs): Likewise.
1529 * elf32-lm32.c (elf_lm32_link_hash_entry): Removed.
1530 (lm32_elf_link_hash_newfunc): Likewise.
1531 (lm32_elf_link_hash_table_create): Updated.
1532 (readonly_dynrelocs): Likewise.
1533 (allocate_dynrelocs): Likewise.
1534 (lm32_elf_copy_indirect_symbol): Likewise.
1535 * elf32-m32r.c (elf_m32r_link_hash_entry): Removed.
1536 (m32r_elf_link_hash_newfunc): Likewise.
1537 (m32r_elf_link_hash_table_create): Updated.
1538 (m32r_elf_copy_indirect_symbol): Likewise.
1539 (allocate_dynrelocs): Likewise.
1540 * elf32-metag.c (elf_metag_link_hash_entry): Remove dyn_relocs.
1541 (metag_link_hash_newfunc): Updated.
1542 (elf_metag_copy_indirect_symbol): Likewise.
1543 (readonly_dynrelocs): Likewise.
1544 (allocate_dynrelocs): Likewise.
1545 * elf32-microblaze.c (elf32_mb_link_hash_entry): Remove
1546 dyn_relocs.
1547 (link_hash_newfunc): Updated.
1548 (microblaze_elf_check_relocs): Likewise.
1549 (microblaze_elf_copy_indirect_symbol): Likewise.
1550 (readonly_dynrelocs): Likewise.
1551 (allocate_dynrelocs): Likewise.
1552 * elf32-nds32.c (elf_nds32_link_hash_entry): Remove dyn_relocs.
1553 (nds32_elf_link_hash_newfunc): Updated.
1554 (nds32_elf_copy_indirect_symbol): Likewise.
1555 (readonly_dynrelocs): Likewise.
1556 (allocate_dynrelocs): Likewise.
1557 (nds32_elf_check_relocs): Likewise.
1558 * elf32-nios2.c (elf32_nios2_link_hash_entry): Remove dyn_relocs.
1559 (link_hash_newfunc): Updated.
1560 (nios2_elf32_copy_indirect_symbol): Likewise.
1561 (nios2_elf32_check_relocs): Likewise.
1562 (allocate_dynrelocs): Likewise.
1563 * elf32-or1k.c (elf_or1k_link_hash_entry): Remove dyn_relocs.
1564 (or1k_elf_link_hash_newfunc): Updated.
1565 (readonly_dynrelocs): Likewise.
1566 (allocate_dynrelocs): Likewise.
1567 (or1k_elf_copy_indirect_symbol): Likewise.
1568 * elf32-ppc.c (ppc_elf_link_hash_entry): Remove dyn_relocs.
1569 (ppc_elf_link_hash_newfunc): Updated.
1570 (ppc_elf_copy_indirect_symbol): Likewise.
1571 (ppc_elf_check_relocs): Likewise.
1572 (readonly_dynrelocs): Likewise.
1573 (ppc_elf_adjust_dynamic_symbol): Likewise.
1574 (allocate_dynrelocs): Likewise.
1575 (ppc_elf_relocate_section): Likewise.
1576 * elf32-s390.c (elf_s390_link_hash_entry): Remove dyn_relocs.
1577 (link_hash_newfunc): Updated.
1578 (elf_s390_copy_indirect_symbol): Likewise.
1579 (readonly_dynrelocs): Likewise.
1580 (elf_s390_adjust_dynamic_symbol): Likewise.
1581 (allocate_dynrelocs): Likewise.
1582 * elf32-sh.c (elf_sh_link_hash_entry): Remove dyn_relocs.
1583 (sh_elf_link_hash_newfunc): Updated.
1584 (readonly_dynrelocs): Likewise.
1585 (allocate_dynrelocs): Likewise.
1586 (sh_elf_copy_indirect_symbol): Likewise.
1587 (sh_elf_check_relocs): Likewise.
1588 * elf32-tic6x.c (elf32_tic6x_link_hash_entry): Removed.
1589 (elf32_tic6x_link_hash_newfunc): Likewise.
1590 (elf32_tic6x_link_hash_table_create): Updated.
1591 (readonly_dynrelocs): Likewise.
1592 (elf32_tic6x_check_relocs): Likewise.
1593 (elf32_tic6x_allocate_dynrelocs): Likewise.
1594 * elf32-tilepro.c (tilepro_elf_link_hash_entry): Remove
1595 dyn_relocs.
1596 (link_hash_newfunc): Updated.
1597 (tilepro_elf_copy_indirect_symbol): Likewise.
1598 (tilepro_elf_check_relocs): Likewise.
1599 (allocate_dynrelocs): Likewise.
1600 * elf64-ppc.c (ppc_link_hash_entry): Remove dyn_relocs.
1601 (ppc64_elf_copy_indirect_symbol): Updated.
1602 (ppc64_elf_check_relocs): Likewise.
1603 (readonly_dynrelocs): Likewise.
1604 (ppc64_elf_adjust_dynamic_symbol): Likewise.
1605 (dec_dynrel_count): Likewise.
1606 (allocate_dynrelocs): Likewise.
1607 (ppc64_elf_relocate_section): Likewise.
1608 * elf64-s390.c (elf_s390_link_hash_entry): Remove dyn_relocs.
1609 (link_hash_newfunc): Updated.
1610 (elf_s390_copy_indirect_symbol): Likewise.
1611 (readonly_dynrelocs): Likewise.
1612 (allocate_dynrelocs): Likewise.
1613 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1614 * elfnn-aarch64.c (elf_aarch64_link_hash_entry): Remove
1615 dyn_relocs.
1616 (elfNN_aarch64_link_hash_newfunc): Updated.
1617 (elfNN_aarch64_copy_indirect_symbol): Likewise.
1618 (readonly_dynrelocs): Likewise.
1619 (need_copy_relocation_p): Likewise.
1620 (elfNN_aarch64_allocate_dynrelocs): Likewise.
1621 (elfNN_aarch64_allocate_ifunc_dynrelocs): Likewise.
1622 * elfnn-riscv.c (riscv_elf_link_hash_entry): Remove dyn_relocs.
1623 (link_hash_newfunc): Updated.
1624 (riscv_elf_copy_indirect_symbol): Likewise.
1625 (riscv_elf_check_relocs): Likewise.
1626 (readonly_dynrelocs): Likewise.
1627 (allocate_dynrelocs): Likewise.
1628 * elfxx-sparc.c (_bfd_sparc_elf_link_hash_entry): Remove
1629 dyn_relocs.
1630 (link_hash_newfunc): Updated.
1631 (_bfd_sparc_elf_copy_indirect_symbol): Likewise.
1632 (_bfd_sparc_elf_check_relocs): Likewise.
1633 (readonly_dynrelocs): Likewise.
1634 (allocate_dynrelocs): Likewise.
1635 * elfxx-tilegx.c (tilegx_elf_link_hash_entry): Remove dyn_relocs.
1636 (link_hash_newfunc): Updated.
1637 (tilegx_elf_copy_indirect_symbol): Likewise.
1638 (tilegx_elf_check_relocs): Likewise.
1639 (readonly_dynrelocs): Likewise.
1640 (allocate_dynrelocs): Likewise.
1641 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Likewise.
1642 (readonly_dynrelocs): Likewise.
1643 (_bfd_x86_elf_copy_indirect_symbol): Likewise.
1644 * elfxx-x86.h (elf_x86_link_hash_entry): Remove dyn_relocs.
1645
2fdb65f2
AM
16462020-06-01 Alan Modra <amodra@gmail.com>
1647
1648 * vms-alpha.c (_bfd_vms_slurp_etir): Check bound for the current
1649 command against cmd_length, not the end of record. For
1650 ETIR__C_STO_IMMR check size against cmd_length, mask repeat count
1651 to 32-bits and break out on zero size. Add ETIR__C_STC_LP_PSB
1652 cmd_length test.
1653
12adf805
DF
16542020-05-28 David Faust <david.faust@oracle.com>
1655
1656 * elf64-bpf.c (bpf_elf_relocate_section): Fix handling of
1657 R_BPF_INSN_{32,64} relocations.
1658
66e3eb08
SC
16592020-05-28 Stephen Casner <casner@acm.org>
1660
1661 * pdp11.c: Implement BRD_RELOC_32 to relocate the low 16 bits of
1662 addreses in .long (used in testsuites) and .stab values.
1663
a6dbf402
L
16642020-05-27 H.J. Lu <hongjiu.lu@intel.com>
1665
1666 PR ld/22909
1667 * elflink.c (bfd_elf_final_link): Use bfd_link_textrel_check.
1668 Check bfd_link_dll when issue a DT_TEXTREL warning.
1669 * elfxx-x86.c (maybe_set_textrel): Likewise.
1670 (_bfd_x86_elf_size_dynamic_sections): Likewise.
1671
9e7cb4c3
NC
16722020-05-26 Nick Clifton <nickc@redhat.com>
1673
1674 * plugin.c (try_load_plugin): Extend error message when a plugin
1675 fails to open.
1676
c892b447
AM
16772020-05-23 Alan Modra <amodra@gmail.com>
1678
1679 * bfdio.c (bfd_get_file_size): Don't segfault on NULL arch_header.
1680
6f3fe02b
AM
16812020-05-22 Alan Modra <amodra@gmail.com>
1682
1683 PR 25882
1684 * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Don't init FP
1685 attributes from shared libraries, and do not return an error if
1686 they don't match.
1687
0490dd41
AM
16882020-05-21 Alan Modra <amodra@gmail.com>
1689
1690 PR 25993
1691 * opncls.c (_bfd_free_cached_info): Keep a copy of the bfd
1692 filename.
1693 (_bfd_delete_bfd): Free the copy.
1694 (_bfd_new_bfd): Free nbfd->memory on error.
1695
c9594989
AM
16962020-05-21 Alan Modra <amodra@gmail.com>
1697
1698 * aoutx.h: Replace "if (x) free (x)" with "free (x)" throughout.
1699 * archive.c, * bfd.c, * bfdio.c, * coff-alpha.c, * coff-ppc.c,
1700 * coff-sh.c, * coff-stgo32.c, * coffcode.h, * coffgen.c,
1701 * cofflink.c, * cpu-arm.c, * doc/chew.c, * dwarf2.c, * ecoff.c,
1702 * ecofflink.c, * elf-eh-frame.c, * elf-m10200.c, * elf-m10300.c,
1703 * elf-strtab.c, * elf.c, * elf32-arc.c, * elf32-arm.c,
1704 * elf32-avr.c, * elf32-bfin.c, * elf32-cr16.c, * elf32-crx.c,
1705 * elf32-epiphany.c, * elf32-ft32.c, * elf32-h8300.c,
1706 * elf32-ip2k.c, * elf32-m32c.c, * elf32-m68hc11.c,
1707 * elf32-m68k.c, * elf32-microblaze.c, * elf32-msp430.c,
1708 * elf32-nds32.c, * elf32-nios2.c, * elf32-ppc.c, * elf32-pru.c,
1709 * elf32-rl78.c, * elf32-rx.c, * elf32-sh.c, * elf32-spu.c,
1710 * elf32-v850.c, * elf32-xtensa.c, * elf64-alpha.c,
1711 * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c
1712 * elf64-mmix.c, * elf64-ppc.c, * elf64-sparc.c, * elfcode.h,
1713 * elflink.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-mips.c,
1714 * elfxx-x86.c, * format.c, * ihex.c, * libbfd.c, * linker.c,
1715 * mmo.c, * opncls.c, * pdp11.c, * peXXigen.c, * pef.c,
1716 * peicode.h, * simple.c, * som.c, * srec.c, * stabs.c, * syms.c,
1717 * targets.c, * vms-lib.c, * xcofflink.c, * xtensa-isa.c: Likewise.
1718
8f595e9b
NC
17192020-05-20 Nelson Chu <nelson.chu@sifive.com>
1720
1721 * elfxx-riscv.h (riscv_parse_subset_t): Add new callback function
1722 get_default_version. It is used to find the default version for
1723 the specific extension.
1724 * elfxx-riscv.c (riscv_parsing_subset_version): Remove the parameters
1725 default_major_version and default_minor_version. Add new bfd_boolean
1726 parameter *use_default_version. Set it to TRUE if we need to call
1727 the callback rps->get_default_version to find the default version.
1728 (riscv_parse_std_ext): Call rps->get_default_version if we fail to find
1729 the default version in riscv_parsing_subset_version, and then call
1730 riscv_add_subset to add the subset into subset list.
1731 (riscv_parse_prefixed_ext): Likewise.
1732 (riscv_std_z_ext_strtab): Support Zicsr extensions.
1733 * elfnn-riscv.c (riscv_merge_std_ext): Use strcasecmp to compare the
1734 strings rather than characters.
1735 riscv_merge_arch_attr_info): The callback function get_default_version
1736 is only needed for assembler, so set it to NULL int the linker.
1737 * elfxx-riscv.c (riscv_estimate_digit): Remove the static.
1738 * elfxx-riscv.h: Updated.
1739
7b958a48
AM
17402020-05-20 Alan Modra <amodra@gmail.com>
1741
1742 PR 25993
1743 * archive.c (_bfd_get_elt_at_filepos): Don't strdup filename,
1744 use bfd_set_filename.
1745 * elfcode.h (_bfd_elf_bfd_from_remote_memory): Likewise.
1746 * mach-o.c (bfd_mach_o_fat_member_init): Likewise.
1747 * opncls.c (bfd_fopen, bfd_openstreamr, bfd_openr_iovec, bfd_openw),
1748 (bfd_create): Likewise.
1749 (_bfd_delete_bfd): Don't free filename.
1750 (bfd_set_filename): Copy filename param to bfd_alloc'd memory,
1751 return pointer to the copy or NULL on alloc fail.
1752 * vms-lib.c (_bfd_vms_lib_get_module): Free newname and test
1753 result of bfd_set_filename.
1754 * bfd-in2.h: Regenerate.
1755
3c568b8a
AM
17562020-05-20 Alan Modra <amodra@gmail.com>
1757
1758 PR 26011
1759 * elf.c (_bfd_elf_get_reloc_upper_bound): Sanity check reloc
1760 section size against file size.
1761 (_bfd_elf_get_dynamic_reloc_upper_bound): Likewise.
1762
6fd1d259
GN
17632020-05-19 Gunther Nikl <gnikl@justmail.de>
1764
1765 PR 26005
11c0dd51
NC
1766 * elf.c (bfd_section_from_shdr): Replace bfd_zmalloc with bfd_malloc
1767 and memset when allocating memory for the sections_being_created
1768 array.
6fd1d259 1769
7e94cf6c
SH
17702020-05-19 Stafford Horne <shorne@gmail.com>
1771
1772 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Rename srela
1773 to relgot.
1774 (or1k_elf_relocate_section): Access srelgot via
1775 htab->root.srelgot. Add assertions for srelgot->contents.
1776 Introduce local variable for srelgot to not reuse global
1777 sreloc.
1778 (or1k_elf_relocate_section): Fixup dynamic symbol detection.
1779 (or1k_set_got_and_rela_sizes): New function.
1780 (or1k_initial_exec_offset): New function.
1781 (TLS_GD, TLS_IE, TLS_LD, TLS_LE): Redefine macros as masks.
1782 (or1k_elf_relocate_section): Allow for TLS to handle multiple
1783 model access.
1784 (or1k_elf_check_relocs): Use OR to set TLS access.
1785 (allocate_dynrelocs): Use or1k_set_got_and_rela_sizes to set
1786 sizes.
1787 (or1k_elf_size_dynamic_sections): Use
1788 or1k_set_got_and_rela_sizes to set sizes.
1789 (or1k_elf_relocate_section): Fixup PCREL relocation calculation.
1790 (TCB_SIZE): New macro.
1791 (tpoff): Use TCB_SIZE and alignment to calculate offset.
1792 (allocate_dynrelocs, readonly_dynrelocs, or1k_elf_check_relocs)
1793 (or1k_elf_size_dynamic_sections): Rename p to sec_relocs.
1794 (allocate_dynrelocs): Rename s to splt or sgot based on usage.
1795 (tpoff): Add dynamic boolean argument.
1796 (or1k_elf_relocate_section): Pass dynamic flag to tpoff.
1797
7e057737
SP
17982020-05-19 Siddhesh Poyarekar <siddesh.poyarekar@arm.com>
1799
1800 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Club
1801 BFD_RELOC_AARCH64_BRANCH19 and BFD_RELOC_AARCH64_TSTBR14
1802 cases with BFD_RELOC_AARCH64_JUMP26.
1803 (elfNN_aarch64_check_relocs): Likewise.
1804
765cf5f6
AM
18052020-05-19 Alan Modra <amodra@gmail.com>
1806
1807 * aix5ppc-core.c (xcoff64_core_file_matches_executable_p): Use
1808 bfd_get_filename rather than accessing bfd->filename directly.
1809 * aout-target.h (MY (object_p)): Likewise.
1810 * aoutx.h (aout_find_nearest_line, aout_link_write_symbols): Likewise.
1811 * archive.c (find_nested_archive, _bfd_generic_read_ar_hdr_mag),
1812 (_bfd_construct_extended_name_table, _bfd_bsd44_write_ar_hdr),
1813 (_bfd_archive_bsd44_construct_extended_name_table),
1814 (_bfd_write_archive_contents, _bfd_compute_and_write_armap),
1815 (_bfd_bsd_write_armap): Likewise.
1816 * bfd.c (bfd_errmsg, _bfd_doprnt): Likewise.
1817 * cache.c (bfd_open_file): Likewise.
1818 * ecoff.c (_bfd_ecoff_write_armap): Likewise.
1819 * ecofflink.c (bfd_ecoff_debug_accumulate_other): Likewise.
1820 * elf32-bfin.c (bfinfdpic_relocate_section): Likewise.
1821 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
1822 * elf32-hppa.c (elf32_hppa_final_link): Likewise.
1823 * elf32-nds32.c (nds32_elf_output_symbol_hook),
1824 (patch_tls_desc_to_ie): Likewise.
1825 * elf32-spu.c (sort_bfds, print_one_overlay_section),
1826 (spu_elf_auto_overlay): Likewise.
1827 * elf64-hppa.c (elf_hppa_final_link): Likewise.
1828 * elf64-ia64-vms.c (elf64_ia64_size_dynamic_sections): Likewise.
1829 * elfcore.h (elf_core_file_matches_executable_p): Likewise.
1830 * elflink.c (bfd_elf_size_dynamic_sections),
1831 (elf_link_input_bfd): Likewise.
1832 * linker.c (_bfd_generic_link_output_symbols): Likewise.
1833 * mach-o.c (bfd_mach_o_follow_dsym),
1834 (bfd_mach_o_close_and_cleanup): Likewise.
1835 * opncls.c (_bfd_delete_bfd, _maybe_make_executable),
1836 (find_separate_debug_file, get_build_id_name): Likewise.
1837 * pdp11.c (aout_find_nearest_line, aout_link_write_symbols): Likewise.
1838 * plugin.c (bfd_plugin_open_input): Likewise.
1839 * rs6000-core.c (rs6000coff_core_file_matches_executable_p): Likewise.
1840 * som.c (som_write_armap): Likewise.
1841 * srec.c (srec_write_record, srec_write_symbols): Likewise.
1842 * vms-lib.c (_bfd_vms_lib_get_imagelib_file),
1843 (_bfd_vms_lib_write_archive_contents): Likewise.
1844 * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
1845
39a1432c
AM
18462020-05-19 Alan Modra <amodra@gmail.com>
1847
1848 PR 25713
1849 * bfdio.c (_bfd_real_fopen): Typo fix.
1850
ed02cdb5
NC
18512020-05-18 Nick Clifton <nickc@redhat.com>
1852
1853 PR 26005
1854 * elf.c (bfd_section_from_shdr): Use bfd_malloc to allocate memory
1855 for the sections_being_created array.
1856
7a87e9c8
AM
18572020-05-18 Alan Modra <amodra@gmail.com>
1858
1859 * ecoff.c (ecoff_slurp_reloc_table): Malloc external_relocs so
1860 they can be freed without also freeing internal_relocs.
1861
ca859a89
JC
18622020-05-18 Jaydeep Chauhan <jaydeepchauhan1494@gmail.com>
1863
1864 PR 25713
1865 * bfdio.c (_bfd_real_fopen): Convert UNIX style sirectory
1866 separators into DOS style when creating a WIN32 fullpath.
1867
fc46e8bd
NC
18682020-05-14 Nelson Chu <nelson.chu@sifive.com>
1869
1870 * elfnn-riscv.c (elfNN_riscv_mkobject): New function. We need this
1871 to initialize RISC-V tdata.
1872
533f049e
GN
18732020-05-12 Gunther Nikl <gnikl@justmail.de>
1874
1875 * aoutx.h (NAME (aout, swap_std_reloc_out)): Reject an unsupported
1876 relocation size.
1877
94ba9882
AM
18782020-05-11 Alan Modra <amodra@gmail.com>
1879
1880 * elf64-ppc.c (xlate_pcrel_opt): Handle lxvp and stxvp.
1881
7c1f4227
AM
18822020-05-11 Alan Modra <amodra@gmail.com>
1883
1884 * elf64-ppc.c: Rename powerxx to power10 throughout.
1885
4d5acb1e
AM
18862020-05-11 Alan Modra <amodra@gmail.com>
1887
1888 PR 25961
1889 * coffgen.c (coff_get_normalized_symtab): Check that buffer
1890 contains required number of auxents before processing any auxent.
1891 * coffswap.h (coff_swap_aux_in <C_FILE>): Only swap in extended
1892 file name from auxents for PE.
1893
7242fa8a
GN
18942020-05-04 Gunther Nikl <gnikl@justmail.de>
1895
1896 * aout-cris.c (DEFAULT_ARCH): Delete define.
1897 (MY_set_arch_mach): Likewise.
1898 (SET_ARCH_MACH): Use bfd_set_arch_mach with an explicit architecture
1899 of bfd_arch_cris.
1900 (swap_ext_reloc_in): Add casts to r_index extraction. Mask valid bits
1901 of r_type before the shift.
1902
19032020-05-04 Wilco Dijkstra <wdijkstr@arm.com>
cff69cf4
WD
1904
1905 PR ld/25665
1906 * elfnn-aarch64.c (group_sections): Copy implementation from
1907 elf32-arm.c.
1908
a2714d6c
AM
19092020-05-01 Alan Modra <amodra@gmail.com>
1910
1911 PR 25900
1912 * elfnn-riscv.c (_bfd_riscv_relax_section): Check root.type before
1913 accessing root.u.def of symbols. Also check root.u.def.section
1914 is non-NULL. Reverse tests so as to make the logic positive.
1915
a8acd6ee
AM
19162020-05-01 Alan Modra <amodra@gmail.com>
1917
1918 PR 25882
1919 * elf32-tic6x.c (elf32_tic6x_merge_attributes): Don't transfer
1920 Tag_ABI_PIC or Tag_ABI_PID from dynamic objects to the output.
1921
6b728d32
AM
19222020-05-01 Alan Modra <amodra@gmail.com>
1923
1924 PR 25882
1925 * elf32-bfin.c (elf32_bfin_merge_private_bfd_data): Add FIXME.
1926 * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
1927 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Likewise.
1928 * elf32-nds32.c (nds32_elf_merge_private_bfd_data): Likewise.
1929 * elf32-score.c (s3_elf32_score_merge_private_bfd_data): Likewise.
1930 * elf32-score7.c (s7_elf32_score_merge_private_bfd_data): Likewise.
1931 * elf32-sh.c (sh_elf_merge_private_data): Likewise.
1932 * elf32-tic6x.c (elf32_tic6x_merge_attributes): Likewise.
1933 * elf64-ia64-vms.c (elf64_ia64_merge_private_bfd_data): Likewise.
1934 * elfnn-ia64.c (elfNN_ia64_merge_private_bfd_data): Likewise.
1935
91ed9b71
AM
19362020-05-01 Alan Modra <amodra@gmail.com>
1937
1938 PR 25882
1939 * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Ignore e_flags
1940 from shared libraries.
1941
d548f47d
MF
19422020-04-29 Max Filippov <jcmvbkbc@gmail.com>
1943
1944 * elf32-xtensa.c (relax_section): Don't negate diff_value for
1945 XTENSA_NDIFF relocations. Don't add sign bits whe diff_value
1946 equals 0. Report overflow when the result has negative sign but
1947 all significant bits are zero.
1948
dfa85db1
GN
19492020-04-29 Gunther Nikl <gnikl@justmail.de>
1950
1951 * aoutx.h (swap_std_reloc_out): Special case 64 bit relocations.
1952 (aout_link_reloc_link_order): Likewise. Make r_length an unsigned.
1953
48e5bada
AM
19542020-04-28 Alan Modra <amodra@gmail.com>
1955
1956 * vms-alpha.c (_bfd_vms_slurp_etir): Correct divide by zero check.
1957 Emit warning message.
1958
251dae91
TC
19592020-04-27 Tamar Christina <tamar.christina@arm.com>
1960
1961 * coff-i386.c (COFF_WITH_PE_BIGOBJ): New.
1962 * coff-x86_64.c (COFF_WITH_PE_BIGOBJ): New.
1963 * config.bfd (targ_selvecs): Rename x86_64_pe_be_vec
1964 to x86_64_pe_big_vec as it not a big-endian format.
1965 (vec i386_pe_big_vec): New.
1966 * configure.ac: Likewise.
1967 * targets.c: Likewise.
1968 * configure: Regenerate.
1969 * pe-i386.c (TARGET_SYM_BIG, TARGET_NAME_BIG,
1970 COFF_WITH_PE_BIGOBJ): New.
1971 * pe-x86_64.c (TARGET_SYM_BIG, TARGET_NAME_BIG):
1972 New.
1973 (x86_64_pe_be_vec): Moved.
1974
27456742
AK
19752020-04-23 Anton Kolesov <anton.kolesov@synopsys.com>
1976
1977 * elf-bfd.h (elfcore_write_arc_v2): Add prototype.
1978 * elf.c (elfcore_grok_arc_v2): New function.
1979 (elfcore_grok_note): Call the new function to handle the corresponding
1980 note.
1981 (elfcore_write_arc_v2): New function.
1982 (elfcore_write_register_note): Call the new function to handle the
1983 corresponding pseudo-sections.
1984
30ce8e47
MF
19852020-04-22 Max Filippov <jcmvbkbc@gmail.com>
1986
1987 PR ld/25861
1988 * bfd-in2.h: Regenerated.
1989 * elf32-xtensa.c (elf_howto_table): New entries for
1990 R_XTENSA_PDIFF{8,16,32} and R_XTENSA_NDIFF{8,16,32}.
1991 (elf_xtensa_reloc_type_lookup, elf_xtensa_do_reloc)
1992 (relax_section): Add cases for R_XTENSA_PDIFF{8,16,32} and
1993 R_XTENSA_NDIFF{8,16,32}.
1994 * libbfd.h (bfd_reloc_code_real_names): Add names for
1995 BFD_RELOC_XTENSA_PDIFF{8,16,32} and
1996 BFD_RELOC_XTENSA_NDIFF{8,16,32}.
1997 * reloc.c: Add documentation for BFD_RELOC_XTENSA_PDIFF{8,16,32}
1998 and BFD_RELOC_XTENSA_NDIFF{8,16,32}.
1999
c36876fe
TC
20002020-04-21 Tamar Christina <tamar.christina@arm.com>
2001
2002 PR binutils/24753
2003 * compress.c (bfd_get_full_section_contents): Exclude sections with no
2004 content.
2005
6f6fd151
L
20062020-04-21 H.J. Lu <hongjiu.lu@intel.com>
2007
2008 PR ld/25849
2009 * elf-bfd.h (elf_backend_data): Add
2010 elf_backend_strip_zero_sized_dynamic_sections.
2011 (_bfd_elf_strip_zero_sized_dynamic_sections): New prototype.
2012 * elf64-alpha.c (elf_backend_strip_zero_sized_dynamic_sections):
2013 New macro.
2014 * elflink.c (_bfd_elf_strip_zero_sized_dynamic_sections): New
2015 function.
2016 * elfxx-target.h (elf_backend_strip_zero_sized_dynamic_sections):
2017 New macro.
2018 (elfNN_bed): Add elf_backend_strip_zero_sized_dynamic_sections.
2019
1f7f2abb
L
20202020-04-21 H.J. Lu <hongjiu.lu@intel.com>
2021
2022 * elf64-alpha.c (alpha_elf_reloc_entry): Replace reltext with
2023 sec.
2024 (elf64_alpha_check_relocs): Set sec instead of reltext. Warn
2025 DT_TEXTREL with -M.
2026 (elf64_alpha_calc_dynrel_sizes): Warn DT_TEXTREL with -M.
2027
e04f33c0
NC
20282020-04-21 Nick Clifton <nickc@redhat.com>
2029
2030 * po/sr.po: Updated Serbian translation.
2031
fad3d2c1
AM
20322020-04-21 Alan Modra <amodra@gmail.com>
2033
2034 * elf32-sh.c (sh_elf_relocate_section): Remove STO_SH5_ISA32
2035 processing.
2036
23c8270e
SC
20372020-04-20 Stephen Casner <casner@acm.org>
2038
2039 * pdp11.c (N_STAB): Modify value to avoid conflict with N_EXT
2040 causing globals from linker script to be treated as debug symbols.
2041 (translate_symbol_table): Don't sign-extend symbol values from 16
2042 to 64 bits in nm output.
2043
2efec98b
AM
20442020-04-20 Alan Modra <amodra@gmail.com>
2045
2046 * elf64-ppc.c (ppc64_elf_size_stubs): Strip relbrlt too.
2047
18f97353
AM
20482020-04-18 Alan Modra <amodra@gmail.com>
2049
2050 * section.c (bfd_is_const_section): Correct test for special
2051 sections.
2052 * bfd-in2.h: Regenerate.
2053
8d55d10a
AM
20542020-04-17 Alan Modra <amodra@gmail.com>
2055
2056 PR 25842
2057 * elf.c (_bfd_elf_get_symbol_version_string): Don't segfault on
2058 NULL nodename.
2059
8e4979ac
NC
20602020-04-16 Nick Clifton <nickc@redhat.com>
2061
2062 PR 25803
2063 * elfxx-mips.c (_bfd_mips_elf_adjust_dynamic_symbol): Replace an
2064 abort with a more helpful error message.
2065
aec72fda
AM
20662020-04-16 Alan Modra <amodra@gmail.com>
2067
2068 PR 25827
2069 * dwarf2.c (scan_unit_for_symbols): Wrap overlong lines. Don't
2070 strdup(0).
2071
95a51568
FS
20722020-04-15 Fangrui Song <maskray@google.com>
2073
2074 PR binutils/24613
2075 * coff-rs6000.c (xcoff_ppc_relocate_section): Change RM_GENERATE_ERROR
2076 to RM_DIAGNOSE plus a check of warn_unresolved_syms.
2077 * coff64-rs6000.c (xcoff_ppc_relocate_section): Likewise.
2078 * elf-bfd.h (_bfd_elf_large_com_section): Likewise.
2079 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
2080 * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise.
2081 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
2082 * elf32-sh.c (sh_elf_relocate_section): Likewise.
2083 * elf32-spu.c (spu_elf_relocate_section): Likewise.
2084 * elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
2085 * elflink.c (elf_link_output_extsym): Likewise.
2086 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
2087
7ecb5154
AM
20882020-04-15 Alan Modra <amodra@gmail.com>
2089
2090 PR 25823
2091 * peXXigen.c (_bfd_XXi_swap_sym_in <C_SECTION>): Don't use a
2092 pointer into strings that may be freed for section name, always
2093 allocate a new string.
2094
f717994f
JMG
20952020-04-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2096 Jan W. Jagersma <jwjagersma@gmail.com>
2097
2098 * coff-go32.c (COFF_GO32, IMAGE_SCN_LNK_NRELOC_OVFL)
2099 (coff_SWAP_scnhdr_in, coff_SWAP_scnhdr_out): Define.
2100 (_bfd_go32_swap_scnhdr_in, _bfd_go32_swap_scnhdr_out)
2101 (_bfd_go32_mkobject): New functions.
2102 * coff-stgo32.c (IMAGE_SCN_LNK_NRELOC_OVFL)
2103 (coff_SWAP_scnhdr_in, coff_SWAP_scnhdr_out): Define.
2104 (go32exe_mkobject): Call _bfd_go32_mkobject.
2105 * coffcode.h (COFF_WITH_EXTENDED_RELOC_COUNTER): Define.
2106 (coff_set_alignment_hook): Define function for COFF_GO32_EXE
2107 and COFF_GO32.
2108 (coff_write_relocs): Enable extended reloc counter code if
2109 COFF_WITH_EXTENDED_RELOC_COUNTER is defined. Test for obj_go32.
2110 (coff_write_object_contents): Likewise. Pad section headers
2111 for COFF_GO32 and COFF_GO32EXE. Use bfd_coff_swap_scnhdr_out
2112 instead of coff_swap_scnhdr_out.
2113 * cofflink.c (_bfd_coff_final_link): Test also for obj_go32 to
2114 enable extended reloc counter.
2115 * coffswap.h: (coff_swap_scnhdr_in, coff_swap_scnhdr_out):
2116 Declare with ATTRIBUTE_UNUSED.
2117 * libcoff-in.h: (struct coff_tdata): New field go32.
2118 (obj_go32): Define.
2119 * libcoff.h: Regenerate.
2120
34ca5531
FS
21212020-04-14 Fangrui Song <maskray@google.com>
2122
2123 PR gas/25768
2124 * elf.c (assign_section_numbers): Always set .stab sh_entsize to
2125 12.
2126
fa1477dc
SC
21272020-04-14 Stephen Casner <casner@acm.org>
2128
2129 PR ld/25677
2130 * pdp11.c: Add implementation of --imagic option.
2131 (adjust_o_magic): Fix objcopy --extract-symbol test.
2132 * libaout.h (enum aout_magic): Add i_magic.
2133
a0543b0b
RO
21342020-04-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2135 Nick Clifton <nickc@redhat.com>
2136
2137 * elf32-sparc.c (sparc_final_write_processing): Fix whitespace.
2138 <0>: Ignore.
2139 <default>: Error rather than abort.
2140
3349112e
L
21412020-04-03 H.J. Lu <hongjiu.lu@intel.com>
2142
2143 PR ld/25767
2144 * elf.c (_bfd_elf_fixup_group_sections): Remove zero-sized
2145 relocation section from section group.
2146
4d095f5b
JJ
21472020-04-02 Jan W. Jagersma <jwjagersma@gmail.com>
2148
2149 * bfdio.c (bfd_bread, bfd_tell, bfd_seek, bfd_mmap): Always add
2150 bfd->origin to file offset.
2151 * bfdwin.c (bfd_get_file_window): Likewise.
2152 * bfd.c: Clarify the use of the bfd->origin field.
2153 * bfd-in2.h: Regenerate.
2154 * coff-i386.c: Don't include go32exe.h. Allow overriding
2155 coff_write_object_contents via COFF_WRITE_CONTENTS.
2156 * coff-stgo32.c (go32exe_cleanup, go32exe_mkobject)
2157 (go32exe_write_object_contents): New functions.
2158 (go32exe_temp_stub, go32exe_temp_stub_size): New static globals.
2159 (COFF_WRITE_CONTENTS, GO32EXE_DEFAULT_STUB_SIZE): Define.
2160 (create_go32_stub): Remove check for 2k size limit. Read stub
2161 from go32exe_temp_stub if present.
2162 (go32_stubbed_coff_bfd_copy_private_bfd_data): Allocate and
2163 copy variable-length stub.
2164 (go32_check_format): Read stub to go32exe_temp_stub, set
2165 origin, return go32exe_cleanup.
2166 (adjust_filehdr_in_post, adjust_filehdr_out_pre)
2167 (adjust_filehdr_out_post, adjust_scnhdr_in_post)
2168 (adjust_scnhdr_out_pre, adjust_scnhdr_out_post)
2169 (adjust_aux_in_post, adjust_aux_out_pre, adjust_aux_out_post):
2170 Remove functions and their associated #defines.
2171 * coffcode.h (coff_mkobject_hook): Remove stub copying code.
2172 * libcoff-in.h: (struct coff_tdata): New field stub_size.
2173 Rename field go32stub to stub.
2174 * libcoff.h: Regenerate.
2175 * coff-stgo32.c (go32_check_format): Rename to...
2176 (go32exe_check_format): ...this.
2177 (go32_stubbed_coff_bfd_copy_private_bfd_data): Rename to...
2178 (go32exe_copy_private_bfd_data): ...this.
2179 (stub_bytes): Rename to...
2180 (go32exe_default_stub): ...this.
2181 (create_go32_stub): Rename to...
2182 (go32exe_create_stub): ...this.
2183 * coff-stgo32.c (go32exe_copy_private_bfd_data): Avoid realloc
2184 when possible.
2185
382aae06
L
21862020-04-01 H.J. Lu <hongjiu.lu@intel.com>
2187
2188 PR ld/25749
2189 PR ld/25754
2190 * elf32-i386.c (elf_i386_convert_load_reloc): Convert load
2191 relocation to R_386_32 for relocation against non-preemptible
2192 absolute symbol.
2193 (elf_i386_check_relocs): Call _bfd_elf_x86_valid_reloc_p. Don't
2194 allocate dynamic relocation for non-preemptible absolute symbol.
2195 (elf_i386_relocate_section): Pass sec to
2196 GENERATE_DYNAMIC_RELOCATION_P.
2197 * elf64-x86-64.c (R_X86_64_converted_reloc_bit): Moved.
2198 (elf_x86_64_convert_load_reloc): Covert load relocation to
2199 R_X86_64_32S or R_X86_64_32 for relocation against non-preemptible
2200 absolute symbol. Don't convert to R_X86_64_32S nor R_X86_64_32
2201 for non-preemptible absolute symbol if they overflow.
2202 (elf_x86_64_check_relocs): Call _bfd_elf_x86_valid_reloc_p. Set
2203 tls_type for GOT slot to GOT_ABS for non-preemptible absolute
2204 symbol. Don't allocate dynamic relocation for non-preemptible
2205 absolute symbol.
2206 (elf_x86_64_relocate_section): Don't generate relative relocation
2207 for GOTPCREL relocations aganst local absolute symbol. Pass sec
2208 to GENERATE_DYNAMIC_RELOCATION_P.
2209 * elfxx-x86.c (elf_x86_allocate_dynrelocs): No dynamic relocation
2210 against non-preemptible absolute symbol.
2211 (_bfd_elf_x86_valid_reloc_p): New function.
2212 (_bfd_x86_elf_size_dynamic_sections): No dynamic relocation for
2213 GOT_ABS GOT slot.
2214 * elfxx-x86.h (GENERATE_DYNAMIC_RELOCATION_P): Add an SEC
2215 argument. Don't generate dynamic relocation against
2216 non-preemptible absolute symbol.
2217 (ABS_SYMBOL_P): New.
2218 (GENERATE_RELATIVE_RELOC_P): Don't generate relative relocation
2219 against non-preemptible absolute symbol.
2220 (GOT_ABS): New.
2221 (R_X86_64_converted_reloc_bit): New. Moved from elf64-x86-64.c.
2222 (_bfd_elf_x86_valid_reloc_p): New.
2223
a7618269
TC
22242020-04-01 Tamar Christina <tamar.christina@arm.com>
2225
2226 PR ld/16017
2227 * elf32-arm.c (elf32_arm_populate_plt_entry): Set LSB of the PLT0
2228 address in the GOT if in thumb only mode.
2229
15ccbdd7
TC
22302020-04-01 Tamar Christina <tamar.christina@arm.com>
2231
2232 * elf32-arm.c (elf32_thumb2_plt_entry): Fix PC-rel offset.
2233
7b948a25
HPN
22342020-04-01 Hans-Peter Nilsson <hp@bitrange.com>
2235
2236 * mmo.c (mmo_scan): Create .text section only when needed, not
2237 from the start.
2238
89b599df
AM
22392020-03-31 Alan Modra <amodra@gmail.com>
2240
2241 * coff-alpha.c (alpha_ecoff_get_elt_at_filepos): Correct bfd_bread
2242 return value check.
2243
81699544
AM
22442020-03-31 Alan Modra <amodra@gmail.com>
2245
2246 * vms-alpha.c (image_write): Check bounds for sections without
2247 contents too. Error on non-zero write to section without
2248 contents.
2249 (_bfd_vms_slurp_etir): Check return of image_write* functions.
2250
b3b360de
AM
22512020-03-31 Alan Modra <amodra@gmail.com>
2252
2253 * tekhex.c (pass_over): Check is_eof before reading buffer.
2254
00386881
NC
22552020-03-30 Nick Clifton <nickc@redhat.com>
2256
2257 PR binutils/pr25662
2258 * libcoff-in.h (struct pe_tdata): Rename the insert_timestamp
2259 field to timestamp and make it an integer.
2260 * libcoff.h: Regenerate.
2261 * peXXigen.c (_bfd_XXi_only_swap_filehdr_out): Test the timestamp
2262 field in the pe_data structure rather than the insert_timestamp
2263 field.
2264
988b7300
AM
22652020-03-30 Alan Modra <amodra@gmail.com>
2266
2267 PR 25745
2268 * elf64-ppc.c (ppc64_elf_build_stubs): Use asprintf to form
2269 statistics message.
2270
aa49fc22
NC
22712020-03-26 Nick Clifton <nickc@redhat.com>
2272
2273 * cofflink.c (bfd_coff_get_internal_extra_pe_aouthdr): Delete.
2274 * libbfd-in.h (bfd_coff_get_internal_extra_pe_aouthdr): Remove
2275 prototype.
2276 * libbfd.h: Regenerate.
2277
ff768510
AM
22782020-03-26 Alan Modra <amodra@gmail.com>
2279
2280 * i386msdos.c (msdos_object_p): Catch -1 return from bfd_bread.
2281
f75fbe8a
AM
22822020-03-26 Alan Modra <amodra@gmail.com>
2283
2284 * vms-alpha.c (dst_define_location): Limit size of dst_ptr_offsets
2285 array.
2286 (_bfd_vms_slurp_object_records): Rename "err" to "ok".
2287
aac88046
NC
22882020-03-25 Nick Clifton <nickc@redhat.com>
2289
2290 * cofflink.c (bfd_coff_get_internal_extra_pe_aouthdr): New
2291 function.
2292 * libbfd-in.h (bfd_coff_get_internal_extra_pe_aouthdr): Prototype.
2293 * libbfd.h: Regenerate.
2294
cf2611fe
SV
22952020-03-25 Shahab Vahedi <shahab@synopsys.com>
2296
2297 * elf32-arc.c (PRINT_DEBUG_RELOC_INFO_BEFORE): Use the
2298 correct field name in the output string.
2299
d16e3d2e
AM
23002020-03-25 Alan Modra <amodra@gmail.com>
2301
2302 PR 25662
2303 * elf.c (assign_file_positions_for_load_sections): Adjust offset
2304 for SHT_NOBITS section if first in segment.
2305
1081065c
L
23062020-03-24 H.J. Lu <hongjiu.lu@intel.com>
2307
2308 PR binutils/25708
2309 * elf-bfd.h (_bfd_elf_get_symbol_version_name): Renamed to ...
2310 (_bfd_elf_get_symbol_version_string): This.
2311 * elf.c (_bfd_elf_get_symbol_version_name): Renamed to ...
2312 (_bfd_elf_get_symbol_version_string): This.
2313 (bfd_elf_print_symbol): Pass TRUE to
2314 _bfd_elf_get_symbol_version_string.
2315 * libbfd-in.h (_bfd_nosymbols_get_symbol_version_string): Add a
2316 bfd_boolean argument.
2317 * syms.c (_bfd_nosymbols_get_symbol_version_string): Likewise.
2318 * targets.c (_bfd_get_symbol_version_string): Likewise.
2319 (bfd_get_symbol_version_string): Likewise.
2320 * bfd-in2.h: Regenerated.
2321
0b8448af 23222020-03-24 Nick Clifton <nickc@redhat.com>
e11cd7c4 2323 Jaydeep Chauhan <jaydeepchauhan1494@gmail.com>
0b8448af
NC
2324
2325 PR 25713
2326 * bfdio.c (_bfd_real_fopen): Add code to handle long filenames on
2327 Win32 systems.
2328
ec2e748a
NC
23292020-03-24 Nick Clifton <nickc@redhat.com>
2330
2331 PR 25681
2332 * elf.c (_bfd_elf_map_sections_to_segments): When looking for a
2333 segment to use for PT_GNU_RELRO, ignore empty sections in a
2334 segment's current list.
2335
cda7e560
L
23362020-03-24 H.J. Lu <hongjiu.lu@intel.com>
2337
2338 PR binutils/25717
2339 * elf-bfd.h (elf_obj_tdata): Change num_group to unsigned int.
2340
7e6e972f
L
23412020-03-24 H.J. Lu <hongjiu.lu@intel.com>
2342
2343 PR binutils/25708
2344 * elf-bfd.h (_bfd_elf_get_symbol_version_name): New.
2345 * elf.c (_bfd_elf_get_symbol_version_name): New function. Based
2346 on the previous _bfd_elf_get_symbol_version_string.
2347 (_bfd_elf_get_symbol_version_string): Use it.
2348
65109548
AM
23492020-03-24 Alan Modra <amodra@gmail.com>
2350
2351 * archive.c (_bfd_generic_read_ar_hdr_mag): Sanity check extended
2352 name size. Use bfd_malloc rather than bfd_zmalloc, clearing just
2353 struct areltdata.
2354
fdde2fb6
SH
23552020-03-23 Sebastian Huber <sebastian.huber@embedded-brains.de>
2356
2357 * elflink.c (_bfd_elf_tls_setup): Mention .tdata in comment.
2358
cf28cfef
AM
23592020-03-23 Alan Modra <amodra@gmail.com>
2360
2361 * ecoff.c (_bfd_ecoff_slurp_armap): Sanity check parsed_size and
2362 symbol count. Allocate an extra byte to ensure name strings
2363 are terminated. Sanity check name offsets. Release memory on
2364 error return.
2365
5e737279
AM
23662020-03-23 Alan Modra <amodra@gmail.com>
2367
2368 * i386msdos.c (msdos_object_p): Don't access e_lfanew when that
2369 field hasn't been read. Remove unnecessary casts.
2370
c15a8f17
AM
23712020-03-22 Alan Modra <amodra@gmail.com>
2372
2373 * coff64-rs6000.c (xcoff64_slurp_armap): Ensure size is large
2374 enough to read number of symbols.
2375
3d98c460
L
23762020-03-20 H.J. Lu <hongjiu.lu@intel.com>
2377
2378 * configure.ac (HAVE_EXECUTABLE_SUFFIX): Removed.
2379 (EXECUTABLE_SUFFIX): Likewise.
2380 * config.in: Regenerated.
2381 * configure: Likewise.
2382 * plugin.c (bfd_plugin_close_and_cleanup): Defined as
2383 _bfd_generic_close_and_cleanup.
2384 (plugin_list_entry): Remove resolution_file, resolution_option,
2385 real_bfd, real_nsyms, real_syms, lto_nsyms, lto_syms, gcc,
2386 lto_wrapper, gcc_env and initialized,
2387 (need_lto_wrapper_p): Removed.
2388 (get_lto_wrapper): Likewise.
2389 (setup_lto_wrapper_env): Likewise.
2390 (register_all_symbols_read): Likewise.
2391 (egister_cleanup): Likewise.
2392 (get_symbols): Likewise.
2393 (add_input_file): Likewise.
2394 (bfd_plugin_set_program_name): Remove need_lto_wrapper.
2395 (add_symbols): Updated.
2396 (try_claim): Likewise.
2397 (try_load_plugin): Likewise.
2398 (bfd_plugin_canonicalize_symtab): Likewise.
2399 * plugin.h (bfd_plugin_set_program_name): Remove int argument.
2400 (plugin_data_struct): Remove real_bfd, real_nsyms and real_syms.
2401
c3a1714c
L
24022020-03-19 H.J. Lu <hongjiu.lu@intel.com>
2403
2404 PR binutils/25640
2405 * plugin.c (plugin_list_entry): Add has_symbol_type.
2406 (add_symbols_v2): New function.
2407 (bfd_plugin_open_input): Don't invoke LTO wrapper if LTO plugin
2408 provides symbol type.
2409 (try_load_plugin): Add LDPT_ADD_SYMBOLS_V2.
2410 (bfd_plugin_canonicalize_symtab): Use LTO plugin symbol type if
2411 available.
2412
67338173
AM
24132020-03-20 Alan Modra <amodra@gmail.com>
2414
2415 * coff-rs6000.c (_bfd_xcoff_slurp_armap): Ensure size is large
2416 enough to read number of symbols.
2417
a859124d
AM
24182020-03-20 Alan Modra <amodra@gmail.com>
2419
2420 * elf.c (_bfd_elf_setup_sections): Don't test known non-NULL
2421 backend functions for NULL before calling.
2422 (copy_special_section_fields, _bfd_elf_copy_private_bfd_data),
2423 (bfd_section_from_shdr, assign_section_numbers): Likewise.
2424 * elfcode.h (elf_write_relocs, elf_slurp_reloc_table): Likewise.
2425 * elfnn-ia64.c (ignore_errors): New function.
2426 (elf_backend_link_order_error_handler): Redefine as ignore_errors.
2427
f3a08f77
NC
24282020-03-19 Nick Clifton <nickc@redhat.com>
2429
2430 PR 25676
2431 * dwarf2.c (struct varinfo): Add unit_offset field to record the
2432 location of the varinfo in the unit's debug info data. Change the
2433 type of the stack field to a boolean.
2434 (lookup_var_by_offset): New function. Returns the varinfo
2435 structure for the variable described at the given offset in the
2436 unit's debug info.
2437 (scan_unit_for_symbols): Add support for variables which have the
2438 DW_AT_specification attribute.
2439
6a541707
NC
24402020-03-19 Nick Clifton <nickc@redhat.com>
2441
2442 PR 25699
2443 * elf.c (bfd_elf_set_group_contents): Replace assertion with an
2444 error return.
2445
effc14f5
SH
24462020-03-19 Sebastian Huber <sebastian.huber@embedded-brains.de>
2447
2448 * elfxx-riscv.c (riscv_parse_subset): Don't use C99.
2449
ac4bf06c
NC
24502020-03-18 Nick Clifton <nickc@redhat.com>
2451
2452 PR 25673
2453 * elf.c (_bfd_elf_write_secondary_reloc_section): Fix illegal
2454 memory access when processing a corrupt secondary reloc section.
2455
53215f21
CL
24562020-03-18 Christophe Lyon <christophe.lyon@linaro.org>
2457
2458 * elf32-arm.c (arm_build_one_stub): Emit a fatal error message
2459 instead of calling abort.
2460 * elf32-csky.c (csky_build_one_stub): Likewise.
2461 * elf32-hppa.c (hppa_build_one_stub): Likewise.
2462 * elf32-m68hc11.c (m68hc11_elf_build_one_stub): Likewise.
2463 * elf32-m68hc12.c (m68hc12_elf_build_one_stub): Likewise.
2464 * elf32-metag.c (metag_build_one_stub): Likewise.
2465 * elf32-nios2.c (nios2_build_one_stub): Likewise.
2466 * elf64-ppc.c (ppc_build_one_stub): Likewise.
2467 (ppc_size_one_stub): Likewise.
2468 * elfnn-aarch64.c (aarch64_build_one_stub): Likewise.
2469
327ef784
NC
24702020-03-17 Nick Clifton <nickc@redhat.com>
2471
d3c3c542 2472 PR 25688
327ef784
NC
2473 * elf.c (_bfd_elf_copy_special_section_fields): Replace assertions
2474 with error messages.
2475
ecbbbdba
NC
24762020-03-17 Nick Clifton <nickc@redhat.com>
2477
2478 PR 25687
2479 * elf.c (_bfd_elf_slurp_secondary_reloc_section): Remove redundant
2480 free. Add free on another failure path.
2481
4b3ecb3b
AM
24822020-03-16 Alan Modra <amodra@gmail.com>
2483
2484 PR 25675
2485 * elf.c (elf_sort_segments): Don't call bfd_octets_per_byte unless
2486 we have a non-zero section count. Do lma comparison in octets.
2487
7bac4137
AM
24882020-03-16 Alan Modra <amodra@gmail.com>
2489
2490 * vms-alpha.c (dst_restore_location): Validate index into
2491 dst_ptr_offsets array before accessing. Return status.
2492 (dst_retrieve_location): Similarly, making "loc" parameter a
2493 pointer to return value.
2494 (_bfd_vms_slurp_etir): Update calls to above functions.
2495
8b5d0a4f
KR
24962020-03-14 Kamil Rytarowski <n54@gmx.com>
2497
2498 * configure.ac: Include netbsd-core.lo for all NetBSD arm and mips
2499 targets.
2500 * configure: Regenerated.
2501
48e81d7f
AM
25022020-03-14 Alan Modra <amodra@gmail.com>
2503
2504 * section.c (BFD_FAKE_SECTIONS): Formatting.
2505 * bfd-in2.h: Regenerate.
2506
06d949ec
KR
25072020-03-13 Kamil Rytarowski <n54@gmx.com>
2508
2509 * elf.c (elfcore_grok_netbsd_note): Add support for
2510 NT_NETBSDCORE_LWPSTATUS notes.
2511
abf874aa
CL
25122020-03-13 Christophe Lyon <christophe.lyon@linaro.org>
2513
2514 * bfd-in2.h: Regenerate.
2515 * section.c (asection): Add already_assigned field.
2516 (BFD_FAKE_SECTION): Add default initializer for it.
2517 * ecoff.c (bfd_debug_section): Initialize already_assigned field.
2518 * elf32-arm.c (arm_build_one_stub): Add support for
2519 non_contiguous_regions.
2520 * elf32-csky.c (csky_build_one_stub): Likewise.
2521 * elf32-hppa.c (hppa_build_one_stub): Likewise.
2522 * elf32-m68hc11.c (m68hc11_elf_build_one_stub): Likewise.
2523 * elf32-m68hc12.c (m68hc12_elf_build_one_stub): Likewise.
2524 * elf32-metag.c (metag_build_one_stub): Likewise.
2525 * elf32-nios2.c (nios2_build_one_stub): Likewise.
2526 * elf64-ppc.c (ppc_build_one_stub): Likewise.
2527 (ppc_size_one_stub): Likewise.
2528 * elfnn-aarch64.c (aarch64_build_one_stub): Likewise.
2529 * elflink.c (elf_link_input_bfd): Likewise.
2530
74e10d17
L
25312020-03-13 H.J. Lu <hongjiu.lu@intel.com>
2532
2533 PR ld/24920
2534 * elf-linker-x86.h (elf_linker_x86_params): Add
2535 static_before_all_inputs and has_dynamic_linker.
2536 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Report
2537 dynamic input objects if -static is passed at command-line
2538 before all input files without --dynamic-linker unless
2539 --no-dynamic-linker is used.
2540
015ec493
KR
25412020-03-13 Kamil Rytarowski <n54@gmx.com>
2542
2543 * elf.c (elfcore_grok_netbsd_note): Add support for aarch64.
2544
66631823
CE
25452020-03-13 Christian Eggers <ceggers@gmx.de>
2546
2547 * bfd.c (bfd_record_phdr): New local "opb". Fix assignment of
2548 "p_paddr" from "at".
2549 * elfcode.h (bfd_from_remote_memory): Add units to several
2550 parameters. New local "opb". Fix usage of p_align. Fix
2551 calculation of "localbase" from "ehdr_vma" and "p_vaddr". Fix
2552 call of target_read_memory.
2553 * elflink.c (elf_fixup_link_order): Fix scope of "s" local. Fix
2554 calculation of "offset" and "output_offset".
2555 (bfd_elf_final_link): New local "opb". Fix calculation of "size"
2556 from "offset" and fix calculation of "end" from "vma+size". Fix
2557 comparison between "sh_addr" and "vma"/"output_offset".
2558 (bfd_elf_discard_info): Fix calculation of "eh_alignment".
2559 * elf-bfd.h (struct elf_link_hash_table): Add unit to tls_size
2560 member.
2561 * elf.c (_bfd_elf_map_sections_to_segments): Add unit (bytes/
2562 octets) to "wrap_to2 and "phdr_size" locals. Fix calculation of
2563 "wrap_to" value. Add unit (bytes) to phdr_lma variable. Fix
2564 assignment of p_paddr from phdr_lma. Fix comparison between
2565 "lma+size" and "next->lma".
2566 (elf_sort_segments): Fix assignment from p_paddr to lma.
2567 (assign_file_positions_for_load_sections): Add unit (bytes) to
2568 local "align". Fix calculation of local "off_adjust". Fix
2569 calculation of local "filehdr_vaddr".
2570 (assign_file_positions_for_non_load_sections): New local "opb".
2571 Fix calculation of "end" from "p_size". Fix comparison between
2572 "vma+SECTION_SIZE" and "start". Fix calculation of "p_memsz"
2573 from "end" and "p_vaddr".
2574 (rewrite_elf_program_header): Fix comparison between p_vaddr and
2575 vma. Fix assignment to p_paddr from lma. Fix comparison between
2576 p_paddr and lma. Fix assignment to p_paddr from lma.
2577 * merge.c (sec_merge_emit): New local "opb". Convert
2578 "alignment_power" to octets.
2579 (_bfd_add_merge_section): New locals "alignment_power" and
2580 "opb". Fix comparison between "alignment_power" and
2581 "sizeof(align)".
2582 (_bfd_merge_sections): New local "opb". Divide size by opb
2583 before checking align mask.
2584
502794d4
CE
25852020-03-13 Christian Eggers <ceggers@gmx.de>
2586
2587 * elf.c (_bfd_elf_make_section_from_shdr): Introduce new temp
2588 opb. Divide Elf_Internal_Shdr::sh_addr by opb when setting
2589 section LMA/VMA.
2590 (_bfd_elf_make_section_from_phdr): Similarly.
2591 (elf_fake_sections): Fix calculation of
2592 Elf_Internal_shdr::sh_addr from section VMA.
2593 (_bfd_elf_map_sections_to_segments): Fix mixup between octets
2594 and bytes.
2595 (assign_file_positions_for_load_sections): Fix calculations of
2596 Elf_Internal_shdr::p_vaddr and p_paddr from section LMA/VMA. Fix
2597 comparison between program header address and section LMA.
2598 (assign_file_positions_for_non_load_sections): Likewise.
2599 (rewrite_elf_program_header): Likewise. Introduce new temp opb.
2600 (IS_CONTAINED_BY_VMA): Add parameter opb.
2601 (IS_CONTAINED_BY_LMA,IS_SECTION_IN_INPUT_SEGMENT,
2602 INCLUDE_SECTION_IN_SEGMENT): Likewise.
2603 (copy_elf_program_header): Update call to ELF_SECTION_IN_SEGMENT.
2604 Fix calculations of p_addr_valid and p_vaddr_offset.
2605 * elflink.c (elf_link_add_object_symbols): Multiply section VMA
2606 with octets per byte when comparing against p_vaddr.
2607
8248d21a
AM
26082020-03-11 Alan Modra <amodra@gmail.com>
2609
2610 * som.c (setup_sections): Sanity check subspace.name.
2611
435edf0b
AM
26122020-03-11 Alan Modra <amodra@gmail.com>
2613
2614 * elf64-ppc.c (ppc64_elf_inline_plt): Do increment rel in for loop.
2615
6b5e16ff
AM
26162020-03-10 Alan Modra <amodra@gmail.com>
2617
2618 PR 25648
2619 * ihex.c (ihex_write_object_contents): Don't assume ordering of
2620 addresses here.
2621
2f57795b
AM
26222020-03-09 Alan Modra <amodra@gmail.com>
2623
2624 * wasm-module.c (wasm_scan): Sanity check file name length
2625 before allocating memory. Move common section setup code. Do
2626 without bfd_tell to calculate section size.
2627
a0dcf297
NC
26282020-03-06 Nick Clifton <nickc@redhat.com>
2629
2630 * elf.c (_bfd_elf_set_section_contents): Replace call to abort
2631 with error messages and failure return values.
2632
e15a8da9
MF
26332020-03-05 Max Filippov <jcmvbkbc@gmail.com>
2634
2635 * elf32-xtensa.c (shrink_dynamic_reloc_sections): Shrink dynamic
2636 relocation sections for any removed reference to a dynamic symbol.
2637
a8e14f4c
NC
26382020-03-05 Nick Clifton <nickc@redhat.com>
2639
2640 * elf-bfd.h (struct elf_backend_data): Add new fields:
2641 init_secondary_reloc_section, slurp_secondary_reloc_section,
2642 write_secondary_reloc_section.
2643 (_bfd_elf_init_secondary_reloc_section): Prototype.
2644 (_bfd_elf_slurp_secondary_reloc_section): Prototype.
2645 (_bfd_elf_write_secondary_reloc_section): Prototype.
2646 * elf.c ( bfd_section_from_shdr): Invoke the new
2647 init_secondary_reloc_section backend function, if defined, when a
2648 second reloc section is encountered.
2649 (swap_out_syms): Invoke the new symbol_section_index function, if
2650 defined, when computing the section index of an OS/PROC specific
2651 symbol.
2652 (_bfd_elf_init_secondary_reloc_section): New function.
2653 (_bfd_elf_slurp_secondary_reloc_section): New function.
2654 (_bfd_elf_write_secondary_reloc_section): New function.
2655 (_bfd_elf_copy_special_section_fields): New function.
2656 * elfcode.h (elf_write_relocs): Invoke the new
2657 write_secondary_relocs function, if defined, in order to emit
2658 secondary relocs.
2659 (elf_slurp_reloc_table): Invoke the new slurp_secondary_relocs
2660 function, if defined, in order to read in secondary relocs.
2661 * elfxx-target.h (elf_backend_copy_special_section_fields):
2662 Provide a non-NULL default definition.
2663 (elf_backend_init_secondary_reloc_section): Likewise.
2664 (elf_backend_slurp_secondary_reloc_section): Likewise.
2665 (elf_backend_write_secondary_reloc_section): Likewise.
2666 (struct elf_backend_data elfNN_bed): Add initialisers for the new
2667 fields.
2668 * configure.ac (score_elf32_[bl]e_vec): Add elf64.lo
2669 * configure: Regenerate.
2670
6f8f95b4
AM
26712020-03-05 Alan Modra <amodra@gmail.com>
2672
2673 * archive64.c (_bfd_archive_64_bit_slurp_armap): Check parsed_size
2674 against file size before allocating memory. Use bfd_alloc rather
2675 than bfd_zalloc for carsym/strings memory.
2676
233bf4f8
AM
26772020-03-04 Alan Modra <amodra@gmail.com>
2678
2679 * elf.c (elf_fake_sections): Ensure sh_addralign is such that
2680 sh_addr mod sh_addalign is zero.
2681
1039fd9a
AM
26822020-03-04 Alan Modra <amodra@gmail.com>
2683
2684 * format.c (bfd_check_format_matches): Call cleanup on error exit.
2685
f5714099
AM
26862020-03-03 Alan Modra <amodra@gmail.com>
2687
2688 * format.c (struct bfd_preserve): Add cleanup field.
2689 (bfd_preserve_save): Add cleanup param and save.
2690 (bfd_preserve_restore): Return cleanup.
2691 (bfd_preserve_finish): Call the cleanup for the discarded match.
2692 (bfd_check_format_matches): Pass cleanup to bfd_preserve_save,
2693 and clear when preserving a match. Restore cleanup too when
2694 restoring that match.
2695
40b35c78
AM
26962020-03-02 Alan Modra <amodra@gmail.com>
2697
2698 * cisco-core.c (cisco_core_file_p): Return bfd_cleanup.
2699 * hpux-core.c (hpux_core_core_file_p): Update prototype.
2700 * sco5-core.c (sco5_core_file_p): Return bfd_cleanup.
2701 (core_sco5_vec): Correct initialisers.
2702
601b73d5
AM
27032020-03-02 Alan Modra <amodra@gmail.com>
2704
2705 * aix386-core.c (aix386_core_file_p): Return bfd_cleanup.
2706 * aix5ppc-core.c (xcoff64_core_p): Likewise.
2707 * cisco-core.c (cisco_core_file_validate): Likewise.
2708 * hppabsd-core.c (hppabsd_core_core_file_p): Likewise.
2709 * hpux-core.c (hpux_core_core_file_p): Likewise.
2710 * irix-core.c (irix_core_core_file_p): Likewise.
2711 * lynx-core.c (lynx_core_file_p): Likewise.
2712 * netbsd-core.c (netbsd_core_file_p): Likewise.
2713 * osf-core.c (osf_core_core_file_p): Likewise.
2714 * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
2715 * sco5-core.c (sco5_core_file_p): Likewise.
2716
728d32c4
L
27172020-03-02 H.J. Lu <hongjiu.lu@intel.com>
2718
2719 * trad-core.c (trad_unix_core_file_p): Return bfd_cleanup.
2720
cb001c0d
AM
27212020-03-02 Alan Modra <amodra@gmail.com>
2722
2723 * targets.c (bfd_cleanup): New typedef.
2724 (struct bfd <_bfd_check_format>): Return a bfd_cleanup.
2725 * libbfd-in.h (_bfd_no_cleanup): Define.
2726 * format.c (bfd_reinit): Add cleanup parameter, call it.
2727 (bfd_check_format_matches): Set cleanup from _bfd_check_format
2728 call and pass to bfd_reinit. Delete temp, use abfd->xvec instead.
2729 * aout-target.h (callback, object_p): Return bfd_cleanup.
2730 * aout-tic30.c (tic30_aout_callback, tic30_aout_object_p): Likewise.
2731 * archive.c (bfd_generic_archive_p): Likewise.
2732 * binary.c (binary_object_p): Likewise.
2733 * coff-alpha.c (alpha_ecoff_object_p): Likewise.
2734 * coff-ia64.c (ia64coff_object_p): Likewise.
2735 * coff-rs6000.c (_bfd_xcoff_archive_p, rs6000coff_core_p): Likewise.
2736 * coff-sh.c (coff_small_object_p): Likewise.
2737 * coff-stgo32.c (go32_check_format): Likewise.
2738 * coff64-rs6000.c (xcoff64_archive_p, rs6000coff_core_p),
2739 (xcoff64_core_p): Likewise.
2740 * coffgen.c (coff_real_object_p, coff_object_p): Likewise.
2741 * elf-bfd.h (bfd_elf32_object_p, bfd_elf32_core_file_p),
2742 (bfd_elf64_object_p, bfd_elf64_core_file_p): Likewise.
2743 * elfcode.h (elf_object_p): Likewise.
2744 * elfcore.h (elf_core_file_p): Likewise.
2745 * i386msdos.c (msdos_object_p): Likewise.
2746 * ihex.c (ihex_object_p): Likewise.
2747 * libaout.h (some_aout_object_p): Likewise.
2748 * libbfd-in.h (bfd_generic_archive_p, _bfd_dummy_target),
2749 (_bfd_vms_lib_alpha_archive_p, _bfd_vms_lib_ia64_archive_p): Likewise.
2750 * libbfd.c (_bfd_dummy_target): Likewise.
2751 * libcoff-in.h (coff_object_p): Likewise.
2752 * mach-o-aarch64.c (bfd_mach_o_arm64_object_p),
2753 (bfd_mach_o_arm64_core_p): Likewise.
2754 * mach-o-arm.c (bfd_mach_o_arm_object_p),
2755 (bfd_mach_o_arm_core_p): Likewise.
2756 * mach-o-i386.c (bfd_mach_o_i386_object_p),
2757 (bfd_mach_o_i386_core_p): Likewise.
2758 * mach-o-x86-64.c (bfd_mach_o_x86_64_object_p),
2759 (bfd_mach_o_x86_64_core_p): Likewise.
2760 * mach-o.c (bfd_mach_o_header_p, bfd_mach_o_gen_object_p),
2761 (bfd_mach_o_gen_core_p, bfd_mach_o_fat_archive_p): Likewise.
2762 * mach-o.h (bfd_mach_o_object_p, bfd_mach_o_core_p),
2763 (bfd_mach_o_fat_archive_p, bfd_mach_o_header_p): Likewise.
2764 * mmo.c (mmo_object_p): Likewise.
2765 * pef.c (bfd_pef_object_p, bfd_pef_xlib_object_p): Likewise.
2766 * peicode.h (coff_real_object_p, pe_ILF_object_p),
2767 (pe_bfd_object_p): Likewise.
2768 * plugin.c (ld_plugin_object_p, bfd_plugin_object_p): Likewise.
2769 * ppcboot.c (ppcboot_object_p): Likewise.
2770 * rs6000-core.c (rs6000coff_core_p): Likewise.
2771 * som.c (som_object_setup, som_object_p): Likewise.
2772 * srec.c (srec_object_p, symbolsrec_object_p): Likewise.
2773 * tekhex.c (tekhex_object_p): Likewise.
2774 * vms-alpha.c (alpha_vms_object_p): Likewise.
2775 * vms-lib.c (_bfd_vms_lib_archive_p, _bfd_vms_lib_alpha_archive_p),
2776 (_bfd_vms_lib_ia64_archive_p, _bfd_vms_lib_txt_archive_p): Likewise.
2777 * wasm-module.c (wasm_object_p): Likewise.
2778 * xsym.c (bfd_sym_object_p): Likewise.
2779 * xsym.h (bfd_sym_object_p): Likewise.
2780 * aoutx.h (some_aout_object_p): Likewise, and callback parameter
2781 return type.
2782 * pdp11.c (some_aout_object_p): Likewise.
2783 * plugin.c (register_ld_plugin_object_p): Update object_p
2784 parameter type.
2785 * plugin.h (register_ld_plugin_object_p): Likewise.
2786 * bfd-in2.h: Regenerate.
2787 * libbfd.h: Regenerate.
2788 * libcoff.h: Regenerate.
2789
a4dd6c97
AM
27902020-03-02 Alan Modra <amodra@gmail.com>
2791
2792 * coff-alpha.c (alpha_ecoff_le_vec): Add SEC_SMALL_DATA to
2793 applicable section flags.
2794 * coff-mips.c (mips_ecoff_le_vec, mips_ecoff_be_vec): Likewise.
2795 (mips_ecoff_bele_vec): Likewise.
2796 * coffcode.h (sec_to_styp_flags): Set SEC_SMALL_DATA for .sdata
2797 and .sbss sections.
2798 * ecoff.c (_bfd_ecoff_new_section_hook): Likewise.
2799 (_bfd_ecoff_styp_to_sec_flags): Likewise.
2800
bf577467
AM
28012020-03-02 Alan Modra <amodra@gmail.com>
2802
2803 * elf32-m32r.c (m32r_elf_section_flags): New function.
2804 (elf_backend_section_flags): Define.
2805 * elf32-nds32.c (nds32_elf_section_flags): New function.
2806 (elf_backend_section_flags): Define.
2807 * elf32-ppc.c (ppc_elf_section_from_shdr): Set SEC_SMALL_DATA for
2808 .sbss and .sdata sections.
2809 * elf32-v850.c (v850_elf_section_from_shdr): Set SEC_SMALL_DATA
2810 for SHF_V850_GPREL sections.
2811 * elf64-alpha.c (elf64_alpha_section_from_shdr): Delete outdated
2812 FIXME.
2813 * elf64-hppa.c (elf64_hppa_section_from_shdr): Set SEC_SMALL_DATA
2814 for SHF_PARISC_SHORT sections.
2815 * elf64-ppc.c (ppc64_elf_section_flags): New function.
2816 (elf_backend_section_flags): Define.
2817 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Set SEC_SMALL_DATA
2818 for SHF_MIPS_GPREL sections. Delete FIXME.
2819
8c803a2d
AM
28202020-03-02 Alan Modra <amodra@gmail.com>
2821
2822 * elf-bfd.h (elf_backend_section_flags): Remove flagword* param.
2823 * elf.c (_bfd_elf_make_section_from_shdr): Set section flags before
2824 calling elf_backend_section_flags with adjusted params. Use
2825 newsect->flags past that point.
2826 (_bfd_elf_new_section_hook): Always set sh_type and sh_flags for
2827 special sections.
2828 (_bfd_elf_init_private_section_data): Allow normal sh_type sections
2829 to have their type overridden, and all sh_flags but processor and
2830 os specific.
2831 * elf32-arm.c (elf32_arm_section_flags): Adjust for changed params.
2832 * elf32-mep.c (mep_elf_section_flags): Likewise.
2833 * elf32-nios2.c (nios2_elf32_section_flags): Likewise.
2834 * elf64-alpha.c (elf64_alpha_section_flags): Likewise.
2835 * elf64-ia64-vms.c (elf64_ia64_section_flags): Likewise.
2836 * elfnn-ia64.c (elfNN_ia64_section_flags): Likewise.
2837 * elfnn-aarch64.c (elfNN_aarch64_size_stubs): Exclude the linker
2838 stub BFD and non-aarch64 input files when scanning for stubs.
2839
7d4b2d2d
AM
28402020-03-02 Alan Modra <amodra@gmail.com>
2841
2842 * coff-alpha.c (alpha_ecoff_get_elt_at_filepos): Provide an upper
2843 limit to decompressed element size.
2844
26f60d59
AM
28452020-03-02 Alan Modra <amodra@gmail.com>
2846
2847 * vms-lib.c (vms_traverse_index): Add recur_count param and
2848 update calls. Fail on excessive recursion.
2849
9cb56943
AM
28502020-03-02 Alan Modra <amodra@gmail.com>
2851
2852 * vms-alpha.c (vms_get_remaining_object_record): Use
2853 bfd_realloc_or_free rather than bfd_realloc.
2854 (add_symbol_entry, vector_grow1, alpha_vms_slurp_relocs): Likewise.
2855 (dst_define_location, parse_module): Likewise, and check realloc
2856 return status before using memory. Return status from function
2857 adjusting all callers.
2858
182ec670
AM
28592020-02-28 Alan Modra <amodra@gmail.com>
2860
2861 * vms-lib.c (_bfd_vms_lib_archive_p): Free memory on error paths.
2862
1b088c82
AM
28632020-02-28 Alan Modra <amodra@gmail.com>
2864
2865 * vms-alpha.c (alpha_vms_object_p): Use _bfd_malloc_and_read.
2866 Remove duplicate undersize check.
2867
5f602802
AM
28682020-02-27 Alan Modra <amodra@gmail.com>
2869
2870 PR 24511
2871 * mmo.c (mmo_scan): Set SEC_DATA for .data.
2872
49d9fd42
AM
28732020-02-27 Alan Modra <amodra@gmail.com>
2874
2875 PR 24511
2876 * syms.c (stt): Trim off all but 'e', 'i' and 'p' entries.
2877 (coff_section_type): Adjust comment.
2878 (decode_section_type): Likewise. Call coff_section_type before
2879 decode_section_type.
2880 (bfd_decode_symclass): Use 'c' for common sections other than
2881 the standard one.
2882
05f52dc2
AM
28832020-02-27 Alan Modra <amodra@gmail.com>
2884
2885 * coff-rs6000.c (_bfd_xcoff_read_ar_hdr): Put all data in one
2886 malloc'd block.
2887
ff69a894
AM
28882020-02-27 Alan Modra <amodra@gmail.com>
2889
2890 * bfd.c (bfd_stat_arch_elt): Use vector of containing archive,
2891 if file is an archive element.
2892 * bfd-in2.h: Regenerate.
2893
02f7e7ee
AM
28942020-02-26 Alan Modra <amodra@gmail.com>
2895
2896 * archive.c (do_slurp_bsd_armap): Increase minimum parsed_size, and
2897 bfd_set_error on failing test. Don't bother changing bfd_error on
2898 file read error. Check symdef_count is multiple of BSD_SYMDEF_SIZE.
2899 Check sym name is within string buffer. Use size_t for some vars.
2900 (do_slurp_coff_armap): Use size_t for some variables, fix size of
2901 int_buf. Don't change bfd_error on file read error. Use
2902 _bfd_mul_overflow when calculating carsym buffer size. Reorder
2903 calculations to catch overflows before they occur. malloc and
2904 free raw armap rather than using bfd_alloc. Read raw armap before
2905 allocating carsym+strings buffer.
2906 (_bfd_slurp_extended_name_table): Localize variables. Check
2907 name size against file size.
2908
cc4c4f40
AM
29092020-02-26 Alan Modra <amodra@gmail.com>
2910
2911 * vms-lib.c (vms_lib_read_index): Release correct buffer.
2912
e0b317de
AM
29132020-02-26 Alan Modra <amodra@gmail.com>
2914
2915 * elf32-rx.c (rx_elf_relocate_section): Use bfd_malloc rather than
2916 malloc. Check for NULL return from bfd_malloc.
2917 (rx_table_find, rx_table_map): Likewise.
2918 (rx_set_section_contents): Check bfd_alloc return.
2919 (rx_dump_symtab): Don't alloc internal_syms or external_syms.
2920
dc1e8a47
AM
29212020-02-26 Alan Modra <amodra@gmail.com>
2922
2923 * aoutx.h: Indent labels correctly. Format error strings.
2924 * archive.c: Likewise.
2925 * archive64.c: Likewise.
2926 * coff-arm.c: Likewise.
2927 * coff-rs6000.c: Likewise.
2928 * coff-stgo32.c: Likewise.
2929 * cpu-arm.c: Likewise.
2930 * dwarf2.c: Likewise.
2931 * elf-ifunc.c: Likewise.
2932 * elf-properties.c: Likewise.
2933 * elf-s390-common.c: Likewise.
2934 * elf-strtab.c: Likewise.
2935 * elf.c: Likewise.
2936 * elf32-arm.c: Likewise.
2937 * elf32-bfin.c: Likewise.
2938 * elf32-cr16.c: Likewise.
2939 * elf32-csky.c: Likewise.
2940 * elf32-i386.c: Likewise.
2941 * elf32-m68k.c: Likewise.
2942 * elf32-msp430.c: Likewise.
2943 * elf32-nds32.c: Likewise.
2944 * elf32-nios2.c: Likewise.
2945 * elf32-pru.c: Likewise.
2946 * elf32-xtensa.c: Likewise.
2947 * elf64-ia64-vms.c: Likewise.
2948 * elf64-x86-64.c: Likewise.
2949 * elfcode.h: Likewise.
2950 * elfcore.h: Likewise.
2951 * elflink.c: Likewise.
2952 * elfnn-aarch64.c: Likewise.
2953 * elfnn-ia64.c: Likewise.
2954 * elfnn-riscv.c: Likewise.
2955 * elfxx-mips.c: Likewise.
2956 * elfxx-sparc.c: Likewise.
2957 * elfxx-x86.c: Likewise.
2958 * i386lynx.c: Likewise.
2959 * merge.c: Likewise.
2960 * pdp11.c: Likewise.
2961 * plugin.c: Likewise.
2962 * reloc.c: Likewise.
2963
e310298c
AM
29642020-02-26 Alan Modra <amodra@gmail.com>
2965
2966 PR 25593
2967 * elf-bfd.h (struct elf_link_hash_table): Rename "loaded" to
2968 "dyn_loaded".
2969 (bfd_elf_add_dt_needed_tag): Declare.
2970 * elf-strtab.c (_bfd_elf_strtab_restore): Handle NULL buf.
2971 * elflink.c (bfd_elf_add_dt_needed_tag): Make global and rename
2972 from elf_add_dt_needed_tag. Remove soname and doit param.
2973 (elf_link_add_object_symbols): Don't use elf_add_dt_needed_tag
2974 to see whether as-needed lib is already loaded, use dyn_loaded
2975 list instead. When saving and restoring around as-needed lib
2976 handle possibility that dynstr has not been initialised. Don't
2977 add DT_NEEDED tags here. Limit dyn_loaded list to dynamic libs.
2978 Mark libs loaded via DT_NEEDED entries of other libs with
2979 DYN_NO_NEEDED if they should not be mentioned in DT_NEEDED of
2980 the output.
2981 (elf_link_check_versioned_symbol): Remove now unneccesary
2982 DYNAMIC check when traversing dyn_loaded list.
2983
b570b954
AM
29842020-02-26 Alan Modra <amodra@gmail.com>
2985
2986 * bfdio.c (bfd_get_file_size): Ignore bogus archive element sizes.
2987
ecda9016
L
29882020-02-25 H.J. Lu <hongjiu.lu@intel.com>
2989
2990 PR binutils/25584
2991 * plugin.c (need_lto_wrapper_p): New.
2992 (bfd_plugin_set_program_name): Add an int argument to set
2993 need_lto_wrapper_p.
2994 (get_lto_wrapper): Return FALSE if need_lto_wrapper_p isn't
2995 set.
2996 * plugin.h (bfd_plugin_set_program_name): Add an int argument.
2997
a98c743f
AM
29982020-02-24 Alan Modra <amodra@gmail.com>
2999
3000 * vms-lib.c (_bfd_vms_lib_archive_p): Correct overflow checks.
3001
c893ce36
AM
30022020-02-24 Alan Modra <amodra@gmail.com>
3003
3004 * vms-lib.c (struct carsym_mem): Add limit.
3005 (vms_add_index): Heed limit.
3006 (vms_traverse_index): Catch buffer overflows. Remove outdated fixme.
3007 (vms_lib_read_index): Set up limit. Catch 32-bit overflow.
3008 Always return actual number read.
3009 (_bfd_vms_lib_archive_p): Catch buffer overflows. Replace
3010 assertion with error exit.
3011
7b3c2715
AM
30122020-02-22 Alan Modra <amodra@gmail.com>
3013
3014 PR 25585
3015 * elf.c (assign_file_positions_for_load_sections): Continue linking
3016 on "PHDR segment not covered by LOAD segment" errors.
3017
a4425a57
AM
30182020-02-21 Alan Modra <amodra@gmail.com>
3019
3020 * mach-o.c (bfd_mach_o_canonicalize_relocs): Fix ineffective
3021 overflow check.
3022 (bfd_mach_o_canonicalize_reloc): Likewise.
3023 (bfd_mach_o_canonicalize_dynamic_reloc): Likewise. Sanity check
3024 counts and offsets against file size.
3025 (bfd_mach_o_build_dysymtab): Fix ineffective overflow check.
3026 (bfd_mach_o_mangle_sections): Remove unnecessary overflow check.
3027 (bfd_mach_o_read_symtab_symbols): Sanity check count and offset
3028 against file size. Delete symbol table error message.
3029 (bfd_mach_o_read_dysymtab): Sanity check counts and offsets
3030 against file size.
3031 (bfd_mach_o_read_symtab): Likewise.
3032 (bfd_mach_o_read_command): Pass file size.
3033 (bfd_mach_o_scan): Sanity check command count against file size.
3034
dda2980f
AM
30352020-02-21 Alan Modra <amodra@gmail.com>
3036
3037 PR 25569
3038 * aoutx.h (adjust_o_magic, adjust_z_magic, adjust_n_magic): Use
3039 "text", "data" and "bss" section pointer vars. Don't update
3040 section size, just exec header sizes.
3041 (adjust_sizes_and_vmas): Don't update text section size. Set
3042 initial exec header a_text. Print exec headers sizes.
3043 * pdp11.c (adjust_o_magic, adjust_z_magic, adjust_n_magic),
3044 (adjust_sizes_and_vmas): Similarly. Formatting.
3045 (final_link): Correct final file extension.
3046
00e49dff
NC
30472020-02-20 Nick Clifton <nickc@redhat.com>
3048
3049 * elf-bfd.h (struct elf_backend_data): Add symbol_section_index
3050 callback.
3051 * elfxx-target.h (elf_backend_symbol_section_index): Provide
3052 default definition.
3053 (elfNN_bed): Initialise the symbol_section_index field.
3054 * elf.c (swap_out_syms): Call symbol_section_index, if defined, on
3055 OS and PROC specific section indicies. Warn if converting other
3056 reserved incidies to SHN_ABS.
3057
fcaaac0a
SB
30582020-02-19 Sergey Belyashov <sergey.belyashov@gmail.com>
3059
3060 PR 25537
3061 * cpu-z80.c: Add machine type compatibility checking.
3062
dcf06b89
L
30632020-02-19 H.J. Lu <hongjiu.lu@intel.com>
3064
3065 PR binutils/25355
3066 * plugin.c (plugin_list_entry): Remove handle.
3067 (try_load_plugin): Call dlclose before return.
3068
2c7c5554
AM
30692020-02-19 Alan Modra <amodra@gmail.com>
3070
3071 * libbfd-in.h (_bfd_constant_p): Define.
3072 (_bfd_alloc_and_read, _bfd_malloc_and_read): Check read size against
3073 file size before allocating memory.
3074 * coffgen.c (_bfd_coff_get_external_symbols): Remove file size check.
3075 * elf.c (bfd_elf_get_str_section): Likewise.
3076 (_bfd_elf_slurp_version_tables): Likewise.
3077 * libbfd.h: Regenerate.
3078
2bb3687b
AM
30792020-02-19 Alan Modra <amodra@gmail.com>
3080
3081 * libbfd-in.h (_bfd_alloc_and_read, _bfd_malloc_and_read): New.
3082 * aoutx.h (aout_get_external_symbols): Replace calls to
3083 bfd_[m]alloc and bfd_bread with call to _bfd_[m]alloc_and_read.
3084 (slurp_reloc_table): Likewise.
3085 * archive.c (do_slurp_bsd_armap): Likewise.
3086 (do_slurp_coff_armap): Likewise.
3087 * archive64.c (_bfd_archive_64_bit_slurp_armap): Likewise.
3088 * coff-rs6000.c (_bfd_xcoff_slurp_armap): Likewise.
3089 * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
3090 * coffcode.h (coff_set_arch_mach_hook, buy_and_read): Likewise.
3091 * coffgen.c (coff_real_object_p, coff_object_p, build_debug_section),
3092 (_bfd_coff_get_external_symbols): Likewise.
3093 * ecoff.c (ecoff_slurp_symbolic_header),
3094 (_bfd_ecoff_slurp_symbolic_info, ecoff_slurp_reloc_table),
3095 (_bfd_ecoff_slurp_armap, ecoff_link_add_object_symbols, READ),
3096 (ecoff_indirect_link_order): Likewise.
3097 * elf.c (bfd_elf_get_str_section, setup_group, elf_read_notes),
3098 (_bfd_elf_slurp_version_tables): Likewise.
3099 * elf32-m32c.c (m32c_elf_relax_section): Likewise.
3100 * elf32-rl78.c (rl78_elf_relax_section): Likewise.
3101 * elf32-rx.c (elf32_rx_relax_section): Likewise.
3102 * elf64-alpha.c (READ): Likewise.
3103 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Likewise.
3104 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Likewise.
3105 * elfcode.h (elf_slurp_symbol_table),
3106 (elf_slurp_reloc_table_from_section): Likewise.
3107 * elflink.c (elf_link_add_object_symbols),
3108 (elf_link_check_versioned_symbol): Likewise.
3109 * elfxx-mips.c (READ): Likewise.
3110 * i386lynx.c (slurp_reloc_table): Likewise.
3111 * lynx-core.c (lynx_core_file_p): Likewise.
3112 * mach-o.c (bfd_mach_o_canonicalize_relocs),
3113 (bfd_mach_o_read_symtab_strtab, bfd_mach_o_alloc_and_read),
3114 (bfd_mach_o_read_prebound_dylib, bfd_mach_o_read_dyld_content
3115 * pdp11.c (aout_get_external_symbols, slurp_reloc_table
3116 * pef.c (bfd_pef_print_loader_section, bfd_pef_scan_start_address),
3117 (bfd_pef_parse_symbols): Likewise.
3118 * peicode.h (pe_ILF_object_p, pe_bfd_object_p
3119 * som.c (setup_sections, som_slurp_string_table),
3120 (som_slurp_reloc_table, som_bfd_count_ar_symbols),
3121 (som_bfd_fill_in_ar_symbols): Likewise.
3122 * vms-alpha.c (module_find_nearest_line, evax_bfd_print_dst),
3123 (evax_bfd_print_image): Likewise.
3124 * vms-lib.c (_bfd_vms_lib_archive_p): Likewise.
3125 * wasm-module.c (wasm_scan): Likewise.
3126 * xcofflink.c (xcoff_link_add_symbols): Likewise.
3127 * xsym.c (bfd_sym_read_name_table),
3128 (bfd_sym_print_type_information_table_entry): Likewise.
3129 * libbfd.h: Regenerate.
3130
806470a2
AM
31312020-02-19 Alan Modra <amodra@gmail.com>
3132
3133 * aoutx.h (slurp_reloc_table): Allocate reloc_cache after
3134 reading external relocs.
3135 * ecoff.c (ecoff_slurp_reloc_table): Likewise.
3136 * archive.c (_bfd_write_archive_contents): Don't twiddle bfd_error
3137 after bfd_bread.
3138 * archive64.c (_bfd_archive_64_bit_slurp_armap): Remove unnecessary
3139 bfd_release.
3140 * elf32-m32c.c (m32c_offset_for_reloc): Make shndx_buf a bfd_byte*.
3141 (m32c_elf_relax_section): Likewise.
3142 * elf32-rl78.c (rl78_offset_for_reloc): Likewise.
3143 (rl78_elf_relax_section): Likewise.
3144 * elf32-rx.c (rx_offset_for_reloc): Likewise.
3145 (elf32_rx_relax_section): Likewise.
3146 * mach-o.c (bfd_mach_o_alloc_and_read): Move earlier with better
3147 parameter types and use..
3148 (bfd_mach_o_read_dylinker, bfd_mach_o_read_dylib),
3149 (bfd_mach_o_read_fvmlib, bfd_mach_o_read_str): ..in these functions.
3150 * peicode.h (pe_bfd_object_p): Don't zero the part of opthdr
3151 being read from file, just the extra.
3152 * som.c (som_slurp_symbol_table): Allocate internal symbol buffer
3153 after reading external syms. Free on failure.
3154
1f4361a7
AM
31552020-02-19 Alan Modra <amodra@gmail.com>
3156
3157 * coffcode.h (buy_and_read, coff_slurp_line_table),
3158 (coff_slurp_symbol_table, coff_slurp_reloc_table): Replace
3159 bfd_[z][m]alloc2 calls with _bfd_mul_overflow followed by the
3160 corresponding bfd_alloc call. Adjust variables to suit.
3161 * coffgen.c (_bfd_coff_get_external_symbols): Likewise.
3162 * ecoff.c (_bfd_ecoff_slurp_symbolic_info),
3163 (_bfd_ecoff_slurp_symbol_table, READ): Likewise.
3164 * elf.c (bfd_elf_get_elf_syms, setup_group, bfd_section_from_shdr),
3165 (swap_out_syms, _bfd_elf_slurp_version_tables): Likewise.
3166 * elf32-m32c.c (m32c_elf_relax_section): Likewise.
3167 * elf32-rl78.c (rl78_elf_relax_section): Likewise.
3168 * elf32-rx.c (elf32_rx_relax_section): Likewise.
3169 * elf64-alpha.c (READ): Likewise.
3170 * elfcode.h (elf_object_p, elf_write_relocs, elf_write_shdrs_and_ehdr),
3171 (elf_slurp_symbol_table, elf_slurp_reloc_table),
3172 (bfd_from_remote_memory): Likewise.
3173 * elfcore.h (core_find_build_id): Likewise.
3174 * elfxx-mips.c (READ): Likewise.
3175 * mach-o.c (bfd_mach_o_mangle_sections),
3176 (bfd_mach_o_read_symtab_symbols, bfd_mach_o_read_thread),
3177 (bfd_mach_o_read_dysymtab, bfd_mach_o_flatten_sections),
3178 (bfd_mach_o_scan, bfd_mach_o_fat_archive_p): Likewise.
3179 * som.c (setup_sections, som_prep_for_fixups)
3180 (som_build_and_write_symbol_table, som_slurp_symbol_table),
3181 (som_slurp_reloc_table, som_bfd_count_ar_symbols),
3182 (som_bfd_fill_in_ar_symbols, som_slurp_armap),
3183 (som_bfd_ar_write_symbol_stuff): Likewise.
3184 * vms-alpha.c (vector_grow1): Likewise.
3185 * vms-lib.c (vms_add_index): Likewise.
3186 * wasm-module.c (wasm_scan_name_function_section): Likewise.
3187 * libbfd.c (bfd_malloc2, bfd_realloc2, bfd_zmalloc2): Delete.
3188 * opncls.c (bfd_alloc2, bfd_zalloc2): Delete.
3189 * libbfd-in.h (bfd_malloc2, bfd_realloc2, bfd_zmalloc2),
3190 (bfd_alloc2, bfd_zalloc2): Delete.
3191 (_bfd_mul_overflow): Define.
3192 * libbfd.h: Regenerate.
3193
446f7ed5
AM
31942020-02-19 Alan Modra <amodra@gmail.com>
3195
3196 * elf.c (bfd_section_from_shdr): Use bfd_zalloc rather than
3197 bfd_zalloc2.
3198 (assign_section_numbers): Likewise.
3199 (elf_map_symbols): Likewise, and bfd_alloc rather than bfd_alloc2.
3200 (_bfd_elf_map_sections_to_segments): Use bfd_malloc rather than
3201 bfd_malloc2, size_t amt, and unsigned tls_count.
3202 (rewrite_elf_program_header): Use bfd_malloc and size_t amt.
3203 * elflink.c (elf_create_symbuf): Use bfd_malloc.
3204 (elf_output_implib): Use bfd_alloc.
3205
b03202e3
AM
32062020-02-19 Alan Modra <amodra@gmail.com>
3207
3208 * bfd.c (struct bfd): Move format and direction to other
3209 bitfields. Add "size".
3210 * bfdio.c (bfd_get_size): Cache size when not writing file.
3211 * opncls.c (bfd_get_debug_link_info_1): Allow for bfd_get_size
3212 returning zero, ie. unknown.
3213 (bfd_get_alt_debug_link_info): Likewise.
3214 * bfd-in2.h: Regenerate.
3215
7c5fa58e
AM
32162020-02-19 Alan Modra <amodra@gmail.com>
3217
3218 * coffgen.c (_bfd_coff_get_external_symbols): Don't call
3219 bfd_get_file_size twice.
3220 (_bfd_coff_read_string_table): Allow for bfd_get_file_size
3221 zero, ie. unknown, return.
3222 * elf-attrs.c (_bfd_elf_parse_attributes): Likewise.
3223 * elfcode.h (elf_swap_shdr_in): Likewise.
3224 (elf_object_p): Don't call bfd_get_file_size twice and correct
3225 file size check.
3226
96d3b80f
AM
32272020-02-19 Alan Modra <amodra@gmail.com>
3228
3229 * mach-o.c (bfd_mach_o_flatten_sections): Return a bfd_boolean,
3230 FALSE if memory alloc fails. Adjust calls.
3231 * som.c (som_prep_for_fixups): Likewise.
3232 * vms-alpha.c (alpha_vms_add_fixup_lp, alpha_vms_add_fixup_ca),
3233 (alpha_vms_add_fixup_qr, alpha_vms_add_fixup_lr),
3234 (alpha_vms_add_lw_reloc, alpha_vms_add_qw_reloc): Likewise.
3235 * som.c (som_build_and_write_symbol_table): Return via error_return
3236 on seek failure.
3237 * vms-alpha.c (VEC_APPEND): Adjust for vector_grow1 changes.
3238 (VEC_APPEND_EL): Delete.
3239 (vector_grow1): Return pointer to element. Catch overflow.
3240 Return NULL on memory allocation failure.
3241 (alpha_vms_add_fixup_lp): Replace VEC_APPEND_EL with VEC_APPEND.
3242 (alpha_vms_add_fixup_ca): Likewise.
3243 (alpha_vms_link_add_object_symbols): Check VEC_APPEND result
3244 before using.
3245 * elf.c (bfd_section_from_shdr): Check bfd_zalloc2 result.
3246
986f0783
AM
32472020-02-19 Alan Modra <amodra@gmail.com>
3248
3249 * aix386-core.c (aix386_core_file_p): Use size_t for "amt".
3250 * aout-target.h (object_p): Likewise.
3251 * aout-tic30.c (tic30_aout_object_p): Likewise.
3252 * aoutx.h (some_aout_object_p, mkobject, make_empty_symbol),
3253 (emit_stringtab, write_syms, link_hash_table_create),
3254 (aout_link_write_other_symbol): Likewise.
3255 * archive.c (_bfd_generic_mkarchive, bfd_generic_archive_p),
3256 (bfd_ar_hdr_from_filesystem, _bfd_write_archive_contents),
3257 (_bfd_compute_and_write_armap): Likewise.
3258 * archures.c (bfd_arch_list): Likewise.
3259 * bfd.c (bfd_record_phdr): Likewise.
3260 * binary.c (binary_canonicalize_symtab): Likewise.
3261 * cisco-core.c (cisco_core_file_validate): Likewise.
3262 * coff-arm.c (coff_arm_link_hash_table_create, find_thumb_glue),
3263 (find_arm_glue, record_arm_to_thumb_glue),
3264 (record_thumb_to_arm_glue): Likewise.
3265 * coff-ppc.c (ppc_coff_link_hash_table_create, record_toc),
3266 (ppc_allocate_toc_section): Likewise.
3267 * coff-rs6000.c (_bfd_xcoff_mkobject, _bfd_xcoff_archive_p): Likewise.
3268 * coff-sh.c (sh_relax_section): Likewise.
3269 * coff64-rs6000.c (xcoff64_archive_p): Likewise.
3270 * coffcode.h (handle_COMDAT, coff_new_section_hook),
3271 (coff_set_alignment_hook, coff_mkobject),
3272 (coff_compute_section_file_positions): Likewise.
3273 * coffgen.c (coff_make_empty_symbol, coff_bfd_make_debug_symbol),
3274 (coff_find_nearest_line_with_names),
3275 ( bfd_coff_set_symbol_class): Likewise.
3276 * cofflink.c (_bfd_coff_link_hash_table_create),
3277 (_bfd_coff_link_input_bfd): Likewise.
3278 * dwarf1.c (alloc_dwarf1_unit, alloc_dwarf1_func): Likewise.
3279 * dwarf2.c (read_abbrevs, read_attribute_value, add_line_info),
3280 (build_line_info_table, sort_line_sequences),
3281 (line_info_add_include_dir, line_info_add_file_name),
3282 (decode_line_info, scan_unit_for_symbols, parse_comp_unit),
3283 (place_sections, _bfd_dwarf2_slurp_debug_info): Likewise.
3284 * ecoff.c (_bfd_ecoff_mkobject, _bfd_ecoff_make_empty_symbol),
3285 (_bfd_ecoff_find_nearest_line),
3286 (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
3287 * ecofflink.c (bfd_ecoff_debug_init): Likewise.
3288 * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Likewise.
3289 * elf-m10300.c (mn10300_elf_relax_section),
3290 (elf32_mn10300_link_hash_table_create): Likewise.
3291 * elf-strtab.c (_bfd_elf_strtab_init): Likewise.
3292 * elf.c (make_mapping, copy_elf_program_header): Likewise.
3293 * elf32-arm.c (elf32_arm_link_hash_table_create),
3294 (elf32_arm_setup_section_lists, elf32_arm_check_relocs),
3295 (elf32_arm_new_section_hook): Likewise.
3296 * elf32-avr.c (elf_avr_new_section_hook),
3297 (elf32_avr_link_hash_table_create, get_local_syms),
3298 (elf32_avr_setup_section_lists): Likewise.
3299 * elf32-bfin.c (bfinfdpic_elf_link_hash_table_create),
3300 (bfin_link_hash_table_create): Likewise.
3301 * elf32-cr16.c (elf32_cr16_link_hash_table_create): Likewise.
3302 * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
3303 * elf32-csky.c (csky_elf_link_hash_table_create),
3304 (csky_elf_check_relocs, elf32_csky_setup_section_lists): Likewise.
3305 * elf32-frv.c (frvfdpic_elf_link_hash_table_create): Likewise.
3306 * elf32-hppa.c (elf32_hppa_link_hash_table_create),
3307 (elf32_hppa_setup_section_lists, get_local_syms): Likewise.
3308 * elf32-i386.c (elf_i386_check_relocs): Likewise.
3309 * elf32-lm32.c (lm32_elf_link_hash_table_create): Likewise.
3310 * elf32-m32r.c (m32r_elf_link_hash_table_create),
3311 (m32r_elf_check_relocs): Likewise.
3312 * elf32-m68hc1x.c (m68hc11_elf_hash_table_create),
3313 (elf32_m68hc11_setup_section_lists),
3314 (elf32_m68hc11_size_stubs): Likewise.
3315 * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
3316 * elf32-metag.c (elf_metag_link_hash_table_create),
3317 (elf_metag_setup_section_lists): Likewise.
3318 * elf32-microblaze.c (microblaze_elf_link_hash_table_create),
3319 (microblaze_elf_check_relocs): Likewise.
3320 * elf32-nds32.c (nds32_elf_link_hash_table_create),
3321 (nds32_elf_check_relocs): Likewise.
3322 * elf32-nios2.c (nios2_elf32_setup_section_lists),
3323 (get_local_syms, nios2_elf32_check_relocs),
3324 (nios2_elf32_link_hash_table_create): Likewise.
3325 * elf32-or1k.c (or1k_elf_link_hash_table_create),
3326 (or1k_elf_check_relocs): Likewise.
3327 * elf32-ppc.c (ppc_elf_modify_segment_map, update_plt_info): Likewise.
3328 * elf32-pru.c (pru_elf32_link_hash_table_create): Likewise.
3329 * elf32-s390.c (elf_s390_link_hash_table_create),
3330 (elf_s390_check_relocs): Likewise.
3331 * elf32-score.c (score_elf_create_got_section),
3332 (s3_elf32_score_new_section_hook),
3333 (elf32_score_link_hash_table_create): Likewise.
3334 * elf32-score7.c (score_elf_create_got_section),
3335 (s7_elf32_score_new_section_hook): Likewise.
3336 * elf32-sh.c (sh_elf_link_hash_table_create),
3337 (sh_elf_check_relocs): Likewise.
3338 * elf32-tic6x.c (elf32_tic6x_link_hash_table_create),
3339 (elf32_tic6x_new_section_hook, elf32_tic6x_check_relocs): Likewise.
3340 * elf32-tilepro.c (tilepro_elf_link_hash_table_create),
3341 (tilepro_elf_check_relocs): Likewise.
3342 * elf32-v850.c (remember_hi16s_reloc): Likewise.
3343 * elf32-vax.c (elf_vax_link_hash_table_create): Likewise.
3344 * elf32-xtensa.c (elf_xtensa_link_hash_table_create),
3345 (elf_xtensa_new_section_hook): Likewise.
3346 * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create),
3347 (get_got_entry, elf64_alpha_check_relocs): Likewise.
3348 * elf64-hppa.c (elf64_hppa_hash_table_create): Likewise.
3349 * elf64-ia64-vms.c (elf64_ia64_object_p): Likewise.
3350 * elf64-mmix.c (mmix_elf_new_section_hook): Likewise.
3351 * elf64-ppc.c (ppc64_elf_new_section_hook),
3352 (ppc64_elf_link_hash_table_create, update_local_sym_info),
3353 (update_plt_info, ppc64_elf_check_relocs): Likewise.
3354 * elf64-s390.c (elf_s390_link_hash_table_create),
3355 (elf_s390_check_relocs): Likewise.
3356 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
3357 * elflink.c (bfd_elf_link_record_local_dynamic_symbol),
3358 (_bfd_elf_link_find_version_dependencies, elf_link_add_object_symbols),
3359 (elf_link_add_archive_symbols, compute_bucket_count),
3360 (bfd_elf_size_dynsym_hash_dynstr, _bfd_elf_link_hash_table_create),
3361 (bfd_elf_get_bfd_needed_list, elf_link_swap_symbols_out),
3362 (bfd_elf_final_link): Likewise.
3363 * elfnn-aarch64.c (elfNN_aarch64_link_hash_table_create),
3364 (elfNN_aarch64_setup_section_lists, elfNN_aarch64_check_relocs),
3365 (elfNN_aarch64_new_section_hook): Likewise.
3366 * elfnn-ia64.c (elfNN_ia64_object_p): Likewise.
3367 * elfnn-riscv.c (riscv_elf_link_hash_table_create),
3368 (riscv_elf_check_relocs): Likewise.
3369 * elfxx-mips.c (_bfd_mips_elf_new_section_hook),
3370 (_bfd_mips_elf_add_symbol_hook, _bfd_mips_elf_check_relocs),
3371 (_bfd_mips_elf_modify_segment_map, _bfd_mips_elf_set_section_contents),
3372 (_bfd_mips_elf_link_hash_table_create): Likewise.
3373 * elfxx-sparc.c (_bfd_sparc_elf_link_hash_table_create),
3374 (_bfd_sparc_elf_check_relocs),
3375 (_bfd_sparc_elf_new_section_hook): Likewise.
3376 * elfxx-tilegx.c (tilegx_elf_link_hash_table_create),
3377 (tilegx_elf_check_relocs): Likewise.
3378 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Likewise.
3379 * format.c (bfd_check_format_matches): Likewise.
3380 * hash.c (_bfd_stringtab_init): Likewise.
3381 * ihex.c (ihex_scan): Likewise.
3382 * irix-core.c (irix_core_core_file_p): Likewise.
3383 * linker.c (bfd_wrapped_link_hash_lookup),
3384 (_bfd_generic_link_hash_table_create),
3385 (_bfd_generic_reloc_link_order): Likewise.
3386 * lynx-core.c (lynx_core_file_p): Likewise.
3387 * netbsd-core.c (netbsd_core_file_p): Likewise.
3388 * osf-core.c (osf_core_core_file_p): Likewise.
3389 * pdp11.c (some_aout_object_p, mkobject, make_empty_symbol),
3390 (link_hash_table_create, aout_link_write_other_symbol): Likewise.
3391 * peXXigen.c (_bfd_XX_bfd_copy_private_section_data): Likewise.
3392 * peicode.h (pe_mkobject): Likewise.
3393 * ppcboot.c (ppcboot_mkobject, ppcboot_canonicalize_symtab): Likewise.
3394 * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
3395 * sco5-core.c (read_uarea): Likewise.
3396 * som.c (hppa_som_gen_reloc_type, som_object_p, som_prep_headers),
3397 (som_write_fixups, som_write_space_strings, som_write_symbol_strings),
3398 (som_finish_writing, som_canonicalize_symtab, som_new_section_hook),
3399 (som_bfd_copy_private_section_data, bfd_som_set_section_attributes),
3400 (bfd_som_attach_aux_hdr, som_write_armap): Likewise.
3401 * srec.c (srec_scan): Likewise.
3402 * syms.c (_bfd_generic_make_empty_symbol): Likewise.
3403 * targets.c (bfd_target_list): Likewise.
3404 * tekhex.c (first_phase, tekhex_sizeof_headers): Likewise.
3405 * trad-core.c (trad_unix_core_file_p): Likewise.
3406 * vms-alpha.c (vms_initialize, alpha_vms_bfd_link_hash_table_create),
3407 (vms_new_section_hook): Likewise.
3408 * wasm-module.c (wasm_make_empty_symbol): Likewise.
3409 * xcofflink.c (xcoff_get_section_contents),
3410 (_bfd_xcoff_bfd_link_hash_table_create, xcoff_set_import_path),
3411 (xcoff_find_function, bfd_xcoff_link_record_set, xcoff_build_ldsym),
3412 (bfd_xcoff_size_dynamic_sections, xcoff_link_input_bfd): Likewise.
3413
2d0e1217
AM
34142020-02-19 Alan Modra <amodra@gmail.com>
3415
3416 * elfxx-riscv.c (riscv_multi_letter_ext_valid_p): Don't use C99.
3417
99845b3b
L
34182020-02-13 H.J. Lu <hongjiu.lu@intel.com>
3419
3420 * plugin.c (try_load_plugin): Make plugin_list_iter an argument
3421 and use it if it isn't NULL. Remove has_plugin_p argument. Add
3422 a build_list_p argument. Don't search plugin_list. Short circuit
3423 when building the plugin list.
3424 (has_plugin): Renamed to has_plugin_list.
3425 (bfd_plugin_set_plugin): Don't set has_plugin.
3426 (bfd_plugin_specified_p): Check plugin_list instead.
3427 (build_plugin_list): New function.
3428 (load_plugin): Call build_plugin_list and use plugin_list.
3429
22fe7df8
L
34302020-02-11 H.J. Lu <hongjiu.lu@intel.com>
3431
3432 PR binutils/25355
3433 * plugin.c (try_claim): Always clean up for LTO wrapper.
3434 (try_load_plugin): Treat each object as independent. Create a
3435 copy for plugin name.
3436
c675ec1e
NC
34372020-02-11 Nick Clifton <nickc@redhat.com>
3438
3439 * elf32-msp430.c (msp430_final_link_relocate): Always use longs
3440 for addresses in print statements.
3441 (msp430_elf_relax_delete_bytes): Likewise.
3442 (msp430_elf_relax_add_words): Likewise.
3443 (msp430_elf_relax_section): Likewise.
3444
1d07a805
L
34452020-02-11 H.J. Lu <hongjiu.lu@intel.com>
3446
3447 * plugin.c (add_symbols): Clear plugin_data memory.
3448
0aa99dcd
L
34492020-02-10 H.J. Lu <hongjiu.lu@intel.com>
3450
3451 PR binutils/25355
3452 * configure.ac (HAVE_EXECUTABLE_SUFFIX): New AC_DEFINE.
3453 (EXECUTABLE_SUFFIX): Likewise.
3454 * config.in: Regenerated.
3455 * configure: Likewise.
3456 * plugin.c (bfd_plugin_close_and_cleanup): Removed.
3457 (plugin_list_entry): Add all_symbols_read, cleanup_handler,
3458 gcc, lto_wrapper, resolution_file, resolution_option, gcc_env,
3459 real_bfd, real_nsyms, real_syms, lto_nsyms and lto_syms.
3460 (get_lto_wrapper): New.
3461 (setup_lto_wrapper_env): Likewise.
3462 (current_plugin): Likewise.
3463 (register_all_symbols_read): Likewise.
3464 (register_cleanup): Likewise.
3465 (get_symbols): Likewise.
3466 (add_input_file): Likewise.
3467 (bfd_plugin_close_and_cleanup): Likewise.
3468 (claim_file): Removed.
3469 (register_claim_file): Set current_plugin->claim_file.
3470 (add_symbols): Make a copy of LTO symbols. Set lto_nsyms and
3471 lto_syms in current_plugin.
3472 (try_claim): Use current_plugin->claim_file. Call LTO plugin
3473 all_symbols_read handler. Copy real symbols to plugin_data.
3474 Call LTO plugin cleanup handler. Clean up for LTO wrapper.
3475 (try_load_plugin): Don't reuse the previous plugin for LTO
3476 wrapper. Set up GCC LTO wrapper if possible. Don't set
3477 plugin_list_iter->claim_file.
3478 (bfd_plugin_canonicalize_symtab): Use real LTO symbols if
3479 possible.
3480 * plugin.h (plugin_data_struct): Add real_bfd, real_nsyms and
3481 real_syms.
3482
ac4280da
JL
34832020-02-10 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3484
3485 * elf32-msp430.c (msp430_elf_relax_section): Before relaxing a branch,
3486 check if previous instruction matches a conditional jump inserted
3487 earlier. Invert conditional jump and delete branch in this case.
3488
8d6cb116
JL
34892020-02-10 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3490
3491 * elf32-msp430.c (msp430_elf_relax_add_two_words): Rename to
3492 msp430_elf_relax_add_words. Support insertion of either one or two
3493 words.
3494 (msp430_elf_relax_section): Catch opcode of 0x3c00 when relocation
3495 needs to be grown. Handle insertion of branch instruction to replace
3496 jump.
3497
d60f5448
JL
34982020-02-10 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3499
3500 * elf32-msp430.c (msp430_final_link_relocate): Add printf statements for
3501 debugging relocations.
3502 (msp430_elf_relax_delete_bytes): Likewise.
3503 (msp430_elf_relax_add_two_words): Likewise.
3504 (msp430_elf_relax_section): Likewise.
3505
e1f85e11
AM
35062020-02-10 Alan Modra <amodra@gmail.com>
3507
3508 * archures.c: Wrap overlong z80 comments.
3509 * bfd-in2.h: Regenerate.
3510
9fc0b501
SB
35112020-02-07 Sergey Belyashov <sergey.belyashov@gmail.com>
3512
3513 PR 25469
3514 * archures.c: Add GBZ80 and Z80N machine values.
3515 * reloc.c: Add BFD_RELOC_Z80_16_BE.
3516 * coff-z80.c: Add support for new reloc.
3517 * coffcode.h: Add support for new machine values.
3518 * cpu-z80.c: Add support for new machine names.
3519 * elf32-z80.c: Add support for new reloc.
3520 * bfd-in2.h: Regenerate.
3521 * libbfd.h: Regenerate.
3522
9984857c
NC
35232020-02-07 Nick Clifton <nickc@redhat.com>
3524
3525 PR 23932
3526 * elf.c (rewrite_elf_program_header): Do not complain if no
3527 sections are mapped to a segment.
3528
5242a0a0
L
35292020-02-06 H.J. Lu <hongjiu.lu@intel.com>
3530
3531 PR ld/25490
3532 * elflink.c (_bfd_elf_gc_mark_extra_sections): Issue an error
3533 for garbage collection on __patchable_function_entries section
3534 without linked-to section.
3535
b7d07216
L
35362020-02-06 H.J. Lu <hongjiu.lu@intel.com>
3537
3538 PR gas/25381
3539 * bfd-in2.h: Regenerated.
3540 * elflink.c (_bfd_elf_gc_mark_extra_sections): Call mark_hook
3541 on section if gc_mark of any of its linked-to sections is set
3542 and don't set gc_mark again.
3543 * section.c (asection): Add linked_to_symbol_name to map_head
3544 union.
3545
b93a662b
MR
35462020-02-06 Maciej W. Rozycki <macro@wdc.com>
3547
3548 * elf32-v850.c (v850_elf_relax_section): Fix the index used for
3549 reporting an unrecognized instruction with R_V850_LONGJUMP.
3550
6df4c9c2
AM
35512020-02-05 Alan Modra <amodra@gmail.com>
3552
3553 * elf64-ppc.c (ppc_stub_plt_branch): Match comment with reality.
3554
24872cb3
AM
35552020-02-04 Alan Modra <amodra@gmail.com>
3556
3557 * elf32-ppc.c (ppc_elf_relocate_section): After applying
3558 R_PPC_VLE_ADDR20, goto copy_reloc.
3559
ef4627fa
L
35602020-02-02 H.J. Lu <hongjiu.lu@intel.com>
3561
3562 * bfd-in2.h: Regenerated.
3563 * section.c (SEC_ASSEMBLER_SECTION_ID): Fix a typo in comments.
3564
a8c4d40b
L
35652020-02-02 H.J. Lu <hongjiu.lu@intel.com>
3566
3567 PR gas/25380
3568 * bfd-in2.h: Regenerated.
3569 * ecoff.c (bfd_debug_section): Add section_id.
3570 * section.c (bfd_section): Add section_id.
3571 (SEC_ASSEMBLER_SECTION_ID): New.
3572 (BFD_FAKE_SECTION): Add section_id.
3573
5a9212a1
NC
35742020-02-01 Nick Clifton <nickc@redhat.com>
3575
3576 * config.bfd: Move the c30-aout and tic30-aout targets onto the
3577 obsolete list.
3578
e7cbe0c4
SL
35792020-01-31 Sandra Loosemore <sandra@codesourcery.com>
3580
3581 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): DW_EH_PE_datarel
3582 encodings are relative to the GOT on nios2, too.
3583
72ebe8c5
AM
35842020-01-31 Alan Modra <amodra@gmail.com>
3585
3586 * Makefile.am (elf32-target.h, elf64-target.h): Don't use a temp
3587 file. Use $< and $@ in rules.
3588 (elf32-aarch64.c, elf64-aarch64.c): Likewise.
3589 (elf32-ia64.c, elf64-ia64.c): Likewise.
3590 (elf32-riscv.c, elf64-riscv.c): Likewise.
3591 (peigen.c, pepigen.c, pex64igen.c): Likewise.
3592 (elf32-aarch64.c, elf64-aarch64.c): Don't emit $srcdir on #line.
3593 (elf32-riscv.c, elf64-riscv.c): Likewise, and use $(SED).
3594 (elf32-ia64.c, elf64-ia64.c): Do emit #line.
3595 (peigen.c, pepigen.c, pex64igen.c): Likewise.
3596 * Makefile.in: Regenerate.
3597
327301a4
AM
35982020-01-31 Alan Modra <amodra@gmail.com>
3599
3600 PR 4110
3601 * elf.c (setup_group): Don't clear entire section contents,
3602 just the padding after group flags. Release alloc'd memory
3603 after a seek or read failure.
3604
b5d36aaa
JT
36052020-01-16 Jon Turney <jon.turney@dronecode.org.uk>
3606
3607 * peXXigen.c (pe_is_repro): New function.
3608 (_bfd_XX_print_private_bfd_data_common): Note timestamp is
3609 actually a build hash if PE_IMAGE_DEBUG_TYPE_REPRO is present.
3610
1957ab10
JT
36112020-01-16 Jon Turney <jon.turney@dronecode.org.uk>
3612
3613 * peXXigen.c (debug_type_names): Add names for new debug data type
3614 values.
3615
87b2920f
JT
36162020-01-16 Jon Turney <jon.turney@dronecode.org.uk>
3617
3618 * peXXigen.c (pe_print_debugdata): Fix the iteration variable for
3619 inner loop. Fix a memory leak.
3620
72913831
AM
36212020-01-30 Alan Modra <amodra@gmail.com>
3622
3623 * coffgen.c (coff_real_object_p): Don't clear obj_coff_keep_syms
3624 or obj_coff_keep_strings here.
3625 (coff_get_normalized_symtab): Free external syms directly.
3626 * xcofflink.c (xcoff_link_input_bfd): Restore obj_coff_keep_syms
3627 on error exit path.
3628
c35d018b
JW
36292020-01-27 Jim Wilson <jimw@sifive.com>
3630
3631 * cpu-riscv.c (riscv_scan): New.
3632 (N): Change bfd_default_scan to riscv_scan.
3633
086b06f3
AS
36342020-01-27 Andreas Schwab <schwab@suse.de>
3635
3636 * Makefile.am (ALL_MACHINES): Remove cpu-plugin.lo.
3637 (ALL_MACHINES_CFILES): Remove cpu-plugin.c.
3638 * Makefile.in: Regenerate.
3639 * cpu-plugin.c: Remove.
3640 * archures.c (enum bfd_architecture): Remove bfd_arch_plugin.
3641 (bfd_plugin_arch): Remove declaration.
3642 * bfd-in2.h: Regenerate.
3643 * po/SRC-POTFILES.in: Regenerate.
3644
3024a17a
AM
36452020-01-27 H.J. Lu <hongjiu.lu@intel.com>
3646 Alan Modra <amodra@gmail.com>
3647
3648 PR ld/25458
3649 * elflink.c (_bfd_elf_gc_mark_rsec): Mark all weak aliases.
3650
b5f998b2
JW
36512020-01-24 Jim Wilson <jimw@sifive.com>
3652
3653 * elfxx-riscv.c (riscv_get_prefix_class): Format s case like others.
3654 (riscv_parse_prefixed_ext): Fix s extension comment and reword to
3655 avoid over long line.
3656
caa31cfa
NC
36572020-01-24 Nick Clifton <nickc@redhat.com>
3658
3659 PR 25447
3660 * coffgen.c (_bfd_coff_close_and_cleanup): Do not clear the keep
3661 syms and keep strings flags as these may have been set in order to
3662 prevent a bogus call to free.
3663
24e648d4
NC
36642020-01-23 Nick Clifton <nickc@redhat.com>
3665
3666 * po/fr.po: Updated French translation.
3667
67641dd3
AM
36682020-01-23 Alan Modra <amodra@gmail.com>
3669
3670 PR 25444
3671 * elf.c (assign_file_positions_for_load_sections): Avoid divide
3672 by zero when p_align is zero.
3673
403d1bd9
JW
36742020-01-22 Maxim Blinov <maxim.blinov@embecosm.com>
3675
3676 * bfd/elfnn-riscv.c (riscv_skip_prefix): New.
3677 (riscv_prefix_cmp): Likewise.
3678 (riscv_non_std_ext_p): Deleted.
3679 (riscv_std_sv_ext_p): Likewise.
3680 (riscv_non_std_sv_ext_p): Likewise.
3681 (riscv_merge_non_std_and_sv_ext): Rename to...
3682 (riscv_merge_multi_letter_ext): and modified to use riscv_prefix_cmp.
3683 (riscv_merge_arch_attr_info): Replace 3 calls to
3684 riscv_merge_non_std_and_sv_ext with single call to
3685 riscv_merge_multi_letter_ext.
3686 * bfd/elfxx-riscv.c (riscv_parse_std_ext): Break if we
3687 encounter a 'z' prefix.
3688 (riscv_get_prefix_class): New function, return prefix class based
3689 on first few characters of input string.
3690 (riscv_parse_config): New structure to factor out minor differences
3691 in extension class parsing behaviour.
3692 (riscv_parse_sv_or_non_std_ext): Rename to...
3693 (riscv_parse_prefixed_ext): and parameterise with
3694 riscv_parse_config.
3695 (riscv_std_z_ext_strtab, riscv_std_s_ext_strtab): New.
3696 (riscv_multi_letter_ext_valid_p): New.
3697 (riscv_ext_x_valid_p, riscv_ext_z_valid_p, riscv_ext_s_valid_p): New.
3698 (riscv_parse_subset): Delegate all non-single-letter parsing work
3699 to riscv_parse_prefixed_ext.
3700 * bfd/elfxx-riscv.h (riscv_isa_ext_class): New type.
3701 (riscv_get_prefix_class): Declare.
3702
a804e476
AM
37032020-01-22 Alan Modra <amodra@gmail.com>
3704
3705 * elf64-ppc.c (struct ppc_link_hash_table): Add tga_group.
3706 (ppc64_elf_archive_symbol_lookup): Extract __tls_get_addr_opt for
3707 __tls_get_addr_desc.
3708 (ppc64_elf_size_stubs): Add section for linker generated
3709 __tls_get_addr_desc wrapper function. Loop at least once if
3710 generating this function.
3711 (emit_tga_desc, emit_tga_desc_eh_frame): New functions.
3712 (ppc64_elf_build_stubs): Generate __tls_get_addr_desc.
3713
9e7028aa
AM
37142020-01-22 Alan Modra <amodra@gmail.com>
3715
3716 * elf64-ppc.h (struct ppc64_elf_params): Add no_tls_get_addr_regsave.
3717 * elf64-ppc.c (struct ppc_link_hash_table): Add tga_desc and
3718 tga_desc_fd.
3719 (is_tls_get_addr): Match tga_desc and tga_desc_df too.
3720 (STDU_R1_0R1, ADDI_R1_R1): Define.
3721 (tls_get_addr_prologue, tls_get_addr_epilogue): New functions.
3722 (ppc64_elf_tls_setup): Set up tga_desc and tga_desc_fd. Indirect
3723 tga_desc_fd to opt_fd, and tga_desc to opt. Set
3724 no_tls_get_addr_regsave.
3725 (branch_reloc_hash_match): Add hash3 and hash4.
3726 (ppc64_elf_tls_optimize): Handle tga_desc_fd and tga_desc too.
3727 (ppc64_elf_size_dynamic_sections): Likewise.
3728 (ppc64_elf_relocate_section): Likewise.
3729 (plt_stub_size, build_plt_stub): Likewise. Size regsave
3730 __tls_get_addr stub.
3731 (build_tls_get_addr_stub): Build regsave __tls_get_addr stub and
3732 eh_frame.
3733 (ppc_size_one_stub): Handle tga_desc_fd and tga_desc too. Size
3734 eh_frame for regsave __tls_get_addr.
3735
abc489c6
AM
37362020-01-22 Alan Modra <amodra@gmail.com>
3737
3738 * elf64-ppc.c (ppc64_elf_size_stubs): Correct condition under
3739 which __tls_get_addr calls will be eliminated.
3740
26916852
NC
37412020-01-20 Nick Clifton <nickc@redhat.com>
3742
3743 * po/pt.po: Updates Portuguese translation.
3744 * po/ru.po: Updated Russian translation.
3745 * po/uk.po: Updated Ukranian translation.
3746
14470f07
L
37472020-01-20 H.J. Lu <hongjiu.lu@intel.com>
3748
3749 PR ld/25416
3750 * elf64-x86-64.c (elf_x86_64_check_tls_transition): Support
3751 "rex leal x@tlsdesc(%rip), %reg" and "call *x@tlsdesc(%eax)" in
3752 X32 mode.
3753 (elf_x86_64_relocate_section): In x32 mode, for GDesc -> LE
3754 transition, relax "rex leal x@tlsdesc(%rip), %reg" to
3755 "rex movl $x@tpoff, %reg", for GDesc -> IE transition, relax
3756 "rex leal x@tlsdesc(%rip), %reg" to
3757 "rex movl x@gottpoff(%rip), %eax". For both transitions, relax
3758 "call *(%eax)" to "nopl (%rax)".
3759
b9ca1af6
AM
37602020-01-20 Alan Modra <amodra@gmail.com>
3761
3762 * elf64-ppc.c (LD_R11_0R3, CMPDI_R11_0, STD_R11_0R1, LD_R11_0R1),
3763 (MTLR_R11): Don't define.
3764 (LD_R0_0R3, CMPDI_R0_0): Define.
3765 (build_tls_get_addr_stub): Don't use r11 in stub.
3766
ed7007c1
AM
37672020-01-20 Alan Modra <amodra@gmail.com>
3768
3769 * elf64-ppc.c (ppc_elf_hash_entry): New function, use throughout file.
3770 (defined_sym_val, is_tls_get_addr): Likewise.
3771
1b1bb2c6
NC
37722020-01-18 Nick Clifton <nickc@redhat.com>
3773
3774 * version.m4 (BFD_VERSION): Set to 2.34.50.
3775 * configure: Regenerate.
3776 * po/bfd.pot: Regenerate.
3777
ae774686
NC
37782020-01-18 Nick Clifton <nickc@redhat.com>
3779
3780 Binutils 2.34 branch created.
3781
07f1f3aa
CB
37822020-01-17 Christian Biesinger <cbiesinger@google.com>
3783
3784 * coff-arm.c: Fix spelling error (seperate).
3785 * elfxx-riscv.c (riscv_parse_sv_or_non_std_ext): Fix spelling
3786 error (seperate).
3787 * sysdep.h (strnlen): Fix spelling error (seperate).
3788
0d1cc75d
LB
37892020-01-15 Lars Brinkhoff <lars@nocrew.org>
3790
3791 PR 20694
3792 * pdp11.c (TARGET_PAGE_SIZE): Set to 8192.
3793
e1c6cf61
AM
37942020-01-15 Alan Modra <amodra@gmail.com>
3795
3796 PR 25384
3797 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Update comment.
3798 (ppc64_elf_adjust_dynamic_symbol): Don't allow .dynbss copies
3799 of function symbols unless dot symbols are present. Do warn
3800 whenever one is created, regardles of whether a PLT entry is
3801 also emitted for the function symbol.
3802
ef4e5ba5
AM
38032020-01-14 Alan Modra <amodra@gmail.com>
3804
3805 * som.c (som_bfd_count_ar_symbols): Error when file position
3806 of symbols on chains is not strictly increasing.
3807
8ab484c2
AM
38082020-01-14 Alan Modra <amodra@gmail.com>
3809
3810 * vms.h (VMS_DEBUG): Define as 0.
3811 * vms-alpha.c (image_write): Move debug output after bounds check.
3812 Tidy bounds check.
3813 (_bfd_vms_slurp_eihd): Warning fix.
3814 (_bfd_vms_slurp_etir): Init variables to avoid bogus warnings.
3815
b50ef514
AM
38162020-01-13 Alan Modra <amodra@gmail.com>
3817
3818 * vms-alpha.c (_bfd_vms_slurp_egsd): Ensure minimum size even
3819 for "ignored" records.
3820
0c0adcc5
AM
38212020-01-13 Alan Modra <amodra@gmail.com>
3822
3823 * wasm-module.c (wasm_scan_name_function_section): Formatting.
3824 Delete asect name check. Move asect NULL check to wasm_object_p.
3825 Correct bounds check of sizes against end. Replace uses of
3826 bfd_zalloc with bfd_alloc, zeroing only necessary bytes. Use
3827 just one bfd_release.
3828 (wasm_scan): Don't use malloc/strdup for section names,
3829 bfd_alloc instead. Simplify code prefixing section name.
3830 Formatting. Don't attempt to free memory here..
3831 (wasm_object_p): ..do so here.
3832
7f026732
SN
38332020-01-10 Szabolcs Nagy <szabolcs.nagy@arm.com>
3834
3835 PR ld/22269
3836 * elf32-arm.c (elf32_arm_final_link_relocate): Use
3837 UNDEFWEAK_NO_DYNAMIC_RELOC.
3838 (allocate_dynrelocs_for_symbol): Likewise.
3839
8cd0e5e9
TC
38402020-01-10 Tamar Christina <tamar.christina@arm.com>
3841
3842 PR 25210
3843 * elfnn-aarch64.c (_bfd_aarch64_create_stub_section): Remove elfclass.
3844
71780f45
AM
38452020-01-10 Alan Modra <amodra@gmail.com>
3846
3847 * coff-alpha.c (alpha_ecoff_object_p): Calculate size in bfd_size_type.
3848
b899eb3b
NC
38492020-01-09 Nick Clifton <nickc@redhat.com>
3850
3851 PR 25221
3852 * bfd.c (bfd_convert_section_contents): Check for a compress
3853 header size that is larger than the actual section size.
3854
4c6ee646
AM
38552020-01-08 Alan Modra <amodra@gmail.com>
3856
3857 PR 25351
3858 * elflink.c (bfd_elf_final_link): Call _bfd_fix_excluded_sec_syms
3859 after removing sections.
3860
85f78364
JW
38612020-01-06 Jim Wilson <jimw@sifive.com>
3862
3863 PR 25205
3864 * elfnn-riscv.c (riscv_elf_relocate_section) <R_RISCV_CALL>: Add
3865 check for !bfd_link_pic (info).
3866 <R_RISCV_CALL_PLT>: Move next to R_RISCV_CALL.
3867 <R_RISCV_JAL>: Add comment.
3868 (_bfd_riscv_relax_section): For plt.offset check, add check for
3869 bfd_link_pic (info). Add comment.
3870
49078ece
AM
38712020-01-06 Alan Modra <amodra@gmail.com>
3872
3873 * format.c (bfd_check_format_matches): Ignore bfd_error on target
3874 match failures. Don't init to bfd_error_wrong_format before
3875 calling _bfd_check_format.
3876
ab356be7
AM
38772020-01-06 Alan Modra <amodra@gmail.com>
3878
3879 * vms-alpha.c (_bfd_vms_push, _bfd_vms_pop): Return pass/fail
3880 status rather than exiting on stack overflow or underflow.
3881 (_bfd_vms_slurp_etir): Adjust to suit.
3882
85d86817
AM
38832020-01-06 Alan Modra <amodra@gmail.com>
3884
3885 * som.c (som_bfd_fill_in_ar_symbols): Bounds check som_dict index.
3886
3e6aa775
AM
38872020-01-06 Alan Modra <amodra@gmail.com>
3888
3889 * mach-o.c (bfd_mach_o_read_dylinker): Don't read past end of
3890 command. Check name offset is within command.
3891 (bfd_mach_o_read_dylib, bfd_mach_o_read_prebound_dylib),
3892 (bfd_mach_o_read_prebind_cksum, bfd_mach_o_read_twolevel_hints),
3893 (bfd_mach_o_read_fvmlib, bfd_mach_o_read_dysymtab),
3894 (bfd_mach_o_read_symtab, bfd_mach_o_read_uuid),
3895 (bfd_mach_o_read_linkedit, bfd_mach_o_read_str),
3896 (bfd_mach_o_read_dyld_info, bfd_mach_o_read_version_min),
3897 (bfd_mach_o_read_encryption_info, bfd_mach_o_read_source_version),
3898 (bfd_mach_o_read_encryption_info_64, bfd_mach_o_read_main),
3899 (bfd_mach_o_read_note, bfd_mach_o_read_build_version),
3900 (bfd_mach_o_read_segment): Similarly.
3901 (bfd_mach_o_read_thread): Properly bound check thread struct.
3902 Don't repeat checks on second loop.
3903 (bfd_mach_o_read_command): Fail on invalid command length.
3904
ea933f17
AM
39052020-01-04 Alan Modra <amodra@gmail.com>
3906
3907 * format.c (bfd_check_format_matches): Add preserve_match.
3908 Save initial bfd state in "preserve", matched bfd state in
3909 "preserve_match". Save just the first match. Release
3910 bfd_alloc memory. Restore and finish preserved state as
3911 appropriate on all function exit paths.
3912
f24bdec4
AM
39132020-01-04 Alan Modra <amodra@gmail.com>
3914
3915 * mmo.c (mmo_mkobject): Allocate tdata with bfd_zalloc.
3916
991fb595
AM
39172020-01-04 Alan Modra <amodra@gmail.com>
3918
3919 * coffgen.c (coff_real_object_p): Free malloc'd memory on target
3920 match too.
3921
f2a3559d
NC
39222020-01-03 Nick Clifton <nickc@redhat.com>
3923
3924 PR 25307
3925 (bfd_pef_parse_function_stubs): Correct the test that ensures that
3926 there is enough data remaining in the code buffer before
3927 attempting to read a function stub.
3928
7a0fb7be
NC
39292020-01-03 Nick Clifton <nickc@redhat.com>
3930
3931 PR 25308
3932 * elf-properties.c (_bfd_elf_convert_gnu_properties): Check the
3933 return value from bfd_malloc.
3934 * elf32-arm.c (bfd_elf32_arm_vfp11_fix_veneer_locations): Likewise.
3935 (bfd_elf32_arm_stm32l4xx_fix_veneer_locations): Likewise.
3936 (elf32_arm_filter_cmse_symbols): Likewise.
3937 (elf32_arm_write_section): Likewise.
3938 * mach-o.c (bfd_mach_o_core_fetch_environment): Likewise.
3939 (bfd_mach_o_follow_dsym): Likewise.
3940 * pef.c (bfd_pef_print_loader_section): Likewise.
3941 (bfd_pef_scan_start_address): Likewise.
3942 (bfd_pef_parse_function_stubs): Likewise.
3943 (bfd_pef_parse_symbols): Likewise.
3944
b26a3d58
ST
39452020-01-03 Sergei Trofimovich <siarheit@google.com>
3946
3947 * elfnn-ia64.c (elfNN_ia64_merge_private_bfd_data): don't fail
3948 on binary inputs ld/PR25316.
3949 (is_ia64_elf): new helper to filter on ia64 objects.
3950
4bb7a87e
JB
39512020-01-03 Jan Beulich <jbeulich@suse.com>
3952
3953 * mach-o.c (cpusubtype, bfd_mach_o_header_p): Insert underscore
3954 in parameter names.
3955 (bfd_mach_o_scan): Insert underscore in two variable names.
3956
6655dba2
SB
39572020-01-02 Sergey Belyashov <sergey.belyashov@gmail.com>
3958
3959 * Makefile.am: Add z80-elf target support.
3960 * configure.ac: Likewise.
3961 * targets.c: Likewise.
3962 * Makefile.in: Regenerate.
3963 * configure: Regenerate.
3964 * config.bfd: Add z80-elf target support and new arches: ez80 and
3965 z180.
3966 * elf32-z80.c: New file.
3967 * archures.c: Add new z80 architectures: eZ80 and Z180.
3968 * coffcode.h: Likewise.
3969 * cpu-z80.c: Likewise.
3970 * coff-z80.c: Add new relocations for Z80 target and local label
3971 check.
3972 * reloc.c: Add new relocs.
3973 * bfd-in2.h: Regenerate.
3974 * libbfd.h: Regenerate.
3975
0db131fb
TC
39762020-01-02 Tamar Christina <tamar.christina@arm.com>
3977
3978 PR 25210
3979 PR 24753
3980 * elfnn-aarch64.c (_bfd_aarch64_create_stub_section): Set ELF class.
3981
b14ce8bf
AM
39822020-01-01 Alan Modra <amodra@gmail.com>
3983
3984 Update year range in copyright notice of all files.
3985
0b114740 3986For older changes see ChangeLog-2019
3499769a 3987\f
0b114740 3988Copyright (C) 2020 Free Software Foundation, Inc.
3499769a
AM
3989
3990Copying and distribution of this file, with or without modification,
3991are permitted in any medium without royalty provided the copyright
3992notice and this notice are preserved.
3993
3994Local Variables:
3995mode: change-log
3996left-margin: 8
3997fill-column: 74
3998version-control: never
3999End:
This page took 0.475151 seconds and 4 git commands to generate.