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