frv: Don't generate dynamic relocation for non SEC_ALLOC sections
[deliverable/binutils-gdb.git] / bfd / ChangeLog
1 2020-06-03 H.J. Lu <hongjiu.lu@intel.com>
2
3 * elf32-frv.c (elf32_frv_relocate_section): Don't generate
4 dynamic relocations for non SEC_ALLOC sections.
5
6 2020-06-03 Gunther Nikl <gnikl@justmail.de>
7
8 * aout64.c (BMAGIC, QMAGIC): Do not define.
9 * aoutx.h (N_IS_BMAGIC, N_SET_QMAGIC): New defines.
10 (NAME (aout, some_aout_object_p)): Use N_IS_QMAGIC and N_IS_BMAGIC
11 to check the file format.
12 (adjust_z_magic): Use N_SET_QMAGIC to set file format.
13 * i386aout.c (NO_WRITE_HEADER_KLUDGE): Delete define.
14 * libaout.h (NO_WRITE_HEADER_KLUDGE): Do not define.
15
16 2020-06-03 H.J. Lu <hongjiu.lu@intel.com>
17
18 * elf32-arc.c (elf_arc_relocate_section): Don't generate dynamic
19 relocations for non SEC_ALLOC sections.
20
21 2020-06-03 H.J. Lu <hongjiu.lu@intel.com>
22
23 * elf-bfd.h (_bfd_elf_maybe_set_textrel): New
24 * elf32-arm.c (maybe_set_textrel): Removed.
25 (elf32_arm_size_dynamic_sections): Replace maybe_set_textrel
26 with _bfd_elf_maybe_set_textrel.
27 * elf32-csky.c (maybe_set_textrel): Removed.
28 (csky_elf_size_dynamic_sections): Replace maybe_set_textrel
29 with _bfd_elf_maybe_set_textrel.
30 * elf32-hppa.c (maybe_set_textrel): Removed.
31 (elf32_hppa_size_dynamic_sections): Replace maybe_set_textrel
32 with _bfd_elf_maybe_set_textrel.
33 * elf32-lm32.c (maybe_set_textrel): Removed.
34 (lm32_elf_size_dynamic_sections): Replace maybe_set_textrel
35 with _bfd_elf_maybe_set_textrel.
36 * elf32-m32r.c (maybe_set_textrel): Removed.
37 (m32r_elf_size_dynamic_sections): Replace maybe_set_textrel
38 with _bfd_elf_maybe_set_textrel.
39 * elf32-metag.c (maybe_set_textrel): Removed.
40 (elf_metag_size_dynamic_sections): Replace maybe_set_textrel
41 with _bfd_elf_maybe_set_textrel.
42 * elf32-nds32.c (maybe_set_textrel): Removed.
43 (nds32_elf_size_dynamic_sections): Replace maybe_set_textrel
44 with _bfd_elf_maybe_set_textrel.
45 * elf32-or1k.c (maybe_set_textrel): Removed.
46 (or1k_elf_size_dynamic_sections): Replace maybe_set_textrel
47 with _bfd_elf_maybe_set_textrel.
48 * elf32-ppc.c (maybe_set_textrel): Removed.
49 (ppc_elf_size_dynamic_sections): Replace maybe_set_textrel
50 with _bfd_elf_maybe_set_textrel.
51 * elf32-s390.c (maybe_set_textrel): Removed.
52 (elf_s390_size_dynamic_sections): Replace maybe_set_textrel
53 with _bfd_elf_maybe_set_textrel.
54 * elf32-sh.c (maybe_set_textrel): Removed.
55 (sh_elf_size_dynamic_sections): Replace maybe_set_textrel
56 with _bfd_elf_maybe_set_textrel.
57 * elf32-tic6x.c (maybe_set_textrel): Removed.
58 (elf32_tic6x_size_dynamic_sections): Replace maybe_set_textrel
59 with _bfd_elf_maybe_set_textrel.
60 * elf32-tilepro.c (maybe_set_textrel): Removed.
61 (tilepro_elf_size_dynamic_sections): Replace maybe_set_textrel
62 with _bfd_elf_maybe_set_textrel.
63 * elf64-ppc.c (maybe_set_textrel): Removed.
64 (ppc64_elf_size_dynamic_sections): Replace maybe_set_textrel
65 with _bfd_elf_maybe_set_textrel.
66 * elf64-s390.c (maybe_set_textrel): Removed.
67 (elf_s390_size_dynamic_sections): Replace maybe_set_textrel
68 with _bfd_elf_maybe_set_textrel.
69 * elfnn-aarch64.c (maybe_set_textrel): Removed.
70 (elfNN_aarch64_size_dynamic_sections): Replace maybe_set_textrel
71 with _bfd_elf_maybe_set_textrel.
72 * elfnn-riscv.c (maybe_set_textrel): Removed.
73 (riscv_elf_size_dynamic_sections): Replace maybe_set_textrel
74 with _bfd_elf_maybe_set_textrel.
75 * elfxx-sparc.c (maybe_set_textrel): Removed.
76 (_bfd_sparc_elf_size_dynamic_sections): Replace maybe_set_textrel
77 with _bfd_elf_maybe_set_textrel.
78 * elfxx-tilegx.c (maybe_set_textrel): Removed.
79 (tilegx_elf_size_dynamic_sections): Replace maybe_set_textrel
80 with _bfd_elf_maybe_set_textrel.
81 * elfxx-x86.c (maybe_set_textrel): Removed.
82 (_bfd_x86_elf_size_dynamic_sections): Replace maybe_set_textrel
83 with _bfd_elf_maybe_set_textrel.
84 * elflink.c (_bfd_elf_maybe_set_textrel): New.
85
86 2020-06-03 H.J. Lu <hongjiu.lu@intel.com>
87
88 PR ld/26067
89 * elf32-arm.c (elf32_arm_copy_indirect_symbol): Don't copy
90 dyn_relocs.
91 * elf32-csky.c (csky_elf_copy_indirect_symbol): Likewise.
92 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
93 * elf32-metag.c (elf_metag_copy_indirect_symbol): Likewise.
94 * elf32-microblaze.c (microblaze_elf_copy_indirect_symbol):
95 Likewise.
96 * elf32-nds32.c (nds32_elf_copy_indirect_symbol): Likewise.
97 * elf32-nios2.c (nios2_elf32_copy_indirect_symbol): Likewise.
98 * elf32-or1k.c (or1k_elf_copy_indirect_symbol): Likewise.
99 * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
100 * elf32-sh.c (sh_elf_copy_indirect_symbol): Likewise.
101 * elf32-tilepro.c (tilepro_elf_copy_indirect_symbol): Likewise.
102 * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
103 * elfnn-aarch64.c (elfNN_aarch64_copy_indirect_symbol): Likewise.
104 * elfnn-riscv.c (riscv_elf_copy_indirect_symbol): Likewise.
105 * elfxx-sparc.c (_bfd_sparc_elf_copy_indirect_symbol): Likewise.
106 * elfxx-tilegx.c (tilegx_elf_copy_indirect_symbol): Likewise.
107 * elfxx-x86.c (_bfd_x86_elf_copy_indirect_symbol): Likewise.
108 * elf32-lm32.c (lm32_elf_copy_indirect_symbol): Removed.
109 (elf_backend_copy_indirect_symbol): Likewise.
110 * elf32-m32r.c (m32r_elf_copy_indirect_symbol): Removed.
111 (elf_backend_copy_indirect_symbol): Likewise.
112 * elflink.c (_bfd_elf_link_hash_copy_indirect): Copy dyn_relocs.
113
114 2020-06-03 H.J. Lu <hongjiu.lu@intel.com>
115
116 PR ld/26067
117 * elf-bfd.h (_bfd_elf_readonly_dynrelocs): New.
118 * elf32-arm.c (readonly_dynrelocs): Removed.
119 (maybe_set_textrel): Replace readonly_dynrelocs with
120 _bfd_elf_readonly_dynrelocs.
121 * elf32-csky.c (readonly_dynrelocs): Removed.
122 (maybe_set_textrel): Replace readonly_dynrelocs with
123 _bfd_elf_readonly_dynrelocs.
124 * elf32-hppa.c(readonly_dynrelocs): Removed.
125 (alias_readonly_dynrelocs): Replace readonly_dynrelocs with
126 _bfd_elf_readonly_dynrelocs.
127 (maybe_set_textrel): Likewise.
128 * elf32-lm32.c (readonly_dynrelocs): Removed.
129 (lm32_elf_adjust_dynamic_symbol): Replace readonly_dynrelocs
130 with _bfd_elf_readonly_dynrelocs.
131 (maybe_set_textrel): Likewise.
132 * elf32-m32r.c (readonly_dynrelocs): Removed.
133 (m32r_elf_adjust_dynamic_symbol): Replace readonly_dynrelocs
134 with _bfd_elf_readonly_dynrelocs.
135 (maybe_set_textrel): Likewise.
136 * elf32-metag.c (readonly_dynrelocs): Removed.
137 (elf_metag_adjust_dynamic_symbol): Replace readonly_dynrelocs
138 with _bfd_elf_readonly_dynrelocs.
139 (maybe_set_textrel): Likewise.
140 * elf32-microblaze.c (readonly_dynrelocs): Removed.
141 (microblaze_elf_adjust_dynamic_symbol): Replace readonly_dynrelocs
142 with _bfd_elf_readonly_dynrelocs.
143 * elf32-nds32.c (readonly_dynrelocs): Removed.
144 (nds32_elf_adjust_dynamic_symbol): Replace readonly_dynrelocs
145 with _bfd_elf_readonly_dynrelocs.
146 (maybe_set_textrel): Likewise.
147 * elf32-or1k.c (readonly_dynrelocs): Removed.
148 (or1k_elf_adjust_dynamic_symbol): Replace readonly_dynrelocs
149 with _bfd_elf_readonly_dynrelocs.
150 * elf32-ppc.c (readonly_dynrelocs): Removed.
151 (alias_readonly_dynrelocs): Replace readonly_dynrelocs with
152 _bfd_elf_readonly_dynrelocs.
153 (ppc_elf_adjust_dynamic_symbol): Likewise.
154 (maybe_set_textrel): Likewise.
155 * elf32-s390.c (readonly_dynrelocs): Removed.
156 (elf_s390_adjust_dynamic_symbol): Replace readonly_dynrelocs
157 with _bfd_elf_readonly_dynrelocs.
158 (maybe_set_textrel): Likewise.
159 * elf32-sh.c (readonly_dynrelocs): Removed.
160 (sh_elf_adjust_dynamic_symbol): Replace readonly_dynrelocs with
161 _bfd_elf_readonly_dynrelocs.
162 (maybe_set_textrel): Likewise.
163 * elf32-tic6x.c (readonly_dynrelocs): Removed.
164 (maybe_set_textrel): Replace readonly_dynrelocs with
165 _bfd_elf_readonly_dynrelocs.
166 * elf32-tilepro.c (readonly_dynrelocs): Removed.
167 (tilepro_elf_adjust_dynamic_symbol): Replace readonly_dynrelocs
168 with _bfd_elf_readonly_dynrelocs.
169 (maybe_set_textrel): Likewise.
170 * elf64-ppc.c (readonly_dynrelocs): Removed.
171 (alias_readonly_dynrelocs): Replace readonly_dynrelocs with
172 _bfd_elf_readonly_dynrelocs.
173 (ppc64_elf_adjust_dynamic_symbol): Likewise.
174 (maybe_set_textrel): Likewise.
175 * elf64-s390.c (readonly_dynrelocs): Removed.
176 (elf_s390_adjust_dynamic_symbol): Replace readonly_dynrelocs
177 with _bfd_elf_readonly_dynrelocs.
178 (maybe_set_textrel): Likewise.
179 * elflink.c (_bfd_elf_readonly_dynrelocs): New.
180 * elfnn-aarch64.c (readonly_dynrelocs): Removed.
181 (maybe_set_textrel): Replace readonly_dynrelocs with
182 _bfd_elf_readonly_dynrelocs.
183 * elfnn-riscv.c (readonly_dynrelocs): Removed.
184 (riscv_elf_adjust_dynamic_symbol): Replace readonly_dynrelocs
185 with _bfd_elf_readonly_dynrelocs.
186 (maybe_set_textrel): Likewise.
187 * elfxx-sparc.c (readonly_dynrelocs): Removed.
188 (_bfd_sparc_elf_adjust_dynamic_symbol): Replace
189 readonly_dynrelocs with _bfd_elf_readonly_dynrelocs.
190 (maybe_set_textrel): Likewise.
191 * elfxx-tilegx.c (readonly_dynrelocs): Removed.
192 (tilegx_elf_adjust_dynamic_symbol): Replace readonly_dynrelocs
193 with _bfd_elf_readonly_dynrelocs.
194 (maybe_set_textrel): Likewise.
195 * elfxx-x86.c (readonly_dynrelocs): Removed.
196 (maybe_set_textrel): Replace readonly_dynrelocs with
197 _bfd_elf_readonly_dynrelocs.
198 (_bfd_x86_elf_adjust_dynamic_symbol): Likewise.
199
200 2020-06-03 H.J. Lu <hongjiu.lu@intel.com>
201
202 * elfxx-x86.h (GENERATE_DYNAMIC_RELOCATION_P): Silence
203 -fsanitize=undefined.
204
205 2020-06-03 Alan Modra <amodra@gmail.com>
206
207 PR 26069
208 PR 18758
209 * peicode.h (pe_ILF_make_a_section): Align data for compilers
210 other than gcc.
211 (pe_ILF_build_a_bfd): Likewise.
212
213 2020-06-03 Alan Modra <amodra@gmail.com>
214
215 PR 26029
216 * elf.c (_bfd_elf_close_and_cleanup): Free elf_shstrtab for
217 core files as well as objects.
218
219 2020-06-01 H.J. Lu <hongjiu.lu@intel.com>
220
221 PR ld/26067
222 * elf-bfd.h (elf_link_hash_entry): Add dyn_relocs after size.
223 * elf-s390-common.c (s390_elf_allocate_ifunc_dyn_relocs):
224 Updated.
225 * elf32-arc.c (elf_arc_link_hash_entry): Remove dyn_relocs.
226 (elf_arc_link_hash_newfunc): Updated.
227 * elf32-arm.c (elf32_arm_link_hash_entry): Remove dyn_relocs.
228 (elf32_arm_link_hash_newfunc): Updated.
229 (elf32_arm_copy_indirect_symbol): Likewise.
230 (elf32_arm_check_relocs): Likewise.
231 (readonly_dynrelocs): Likewise.
232 (allocate_dynrelocs_for_symbol): Likewise.
233 * elf32-csky.c (csky_elf_link_hash_entry): Remove dyn_relocs.
234 (csky_elf_link_hash_newfunc): Updated.
235 (csky_allocate_dynrelocs): Likewise.
236 (readonly_dynrelocs): Likewise.
237 (csky_elf_copy_indirect_symbol): Likewise.
238 * elf32-hppa.c (elf32_hppa_link_hash_entry): Remove dyn_relocs.
239 (hppa_link_hash_newfunc): Updated.
240 (elf32_hppa_copy_indirect_symbol): Likewise.
241 (elf32_hppa_hide_symbol): Likewise.
242 (elf32_hppa_adjust_dynamic_symbol): Likewise.
243 (allocate_dynrelocs): Likewise.
244 (elf32_hppa_relocate_section): Likewise.
245 * elf32-i386.c (elf_i386_check_relocs): Likewise.
246 * elf32-lm32.c (elf_lm32_link_hash_entry): Removed.
247 (lm32_elf_link_hash_newfunc): Likewise.
248 (lm32_elf_link_hash_table_create): Updated.
249 (readonly_dynrelocs): Likewise.
250 (allocate_dynrelocs): Likewise.
251 (lm32_elf_copy_indirect_symbol): Likewise.
252 * elf32-m32r.c (elf_m32r_link_hash_entry): Removed.
253 (m32r_elf_link_hash_newfunc): Likewise.
254 (m32r_elf_link_hash_table_create): Updated.
255 (m32r_elf_copy_indirect_symbol): Likewise.
256 (allocate_dynrelocs): Likewise.
257 * elf32-metag.c (elf_metag_link_hash_entry): Remove dyn_relocs.
258 (metag_link_hash_newfunc): Updated.
259 (elf_metag_copy_indirect_symbol): Likewise.
260 (readonly_dynrelocs): Likewise.
261 (allocate_dynrelocs): Likewise.
262 * elf32-microblaze.c (elf32_mb_link_hash_entry): Remove
263 dyn_relocs.
264 (link_hash_newfunc): Updated.
265 (microblaze_elf_check_relocs): Likewise.
266 (microblaze_elf_copy_indirect_symbol): Likewise.
267 (readonly_dynrelocs): Likewise.
268 (allocate_dynrelocs): Likewise.
269 * elf32-nds32.c (elf_nds32_link_hash_entry): Remove dyn_relocs.
270 (nds32_elf_link_hash_newfunc): Updated.
271 (nds32_elf_copy_indirect_symbol): Likewise.
272 (readonly_dynrelocs): Likewise.
273 (allocate_dynrelocs): Likewise.
274 (nds32_elf_check_relocs): Likewise.
275 * elf32-nios2.c (elf32_nios2_link_hash_entry): Remove dyn_relocs.
276 (link_hash_newfunc): Updated.
277 (nios2_elf32_copy_indirect_symbol): Likewise.
278 (nios2_elf32_check_relocs): Likewise.
279 (allocate_dynrelocs): Likewise.
280 * elf32-or1k.c (elf_or1k_link_hash_entry): Remove dyn_relocs.
281 (or1k_elf_link_hash_newfunc): Updated.
282 (readonly_dynrelocs): Likewise.
283 (allocate_dynrelocs): Likewise.
284 (or1k_elf_copy_indirect_symbol): Likewise.
285 * elf32-ppc.c (ppc_elf_link_hash_entry): Remove dyn_relocs.
286 (ppc_elf_link_hash_newfunc): Updated.
287 (ppc_elf_copy_indirect_symbol): Likewise.
288 (ppc_elf_check_relocs): Likewise.
289 (readonly_dynrelocs): Likewise.
290 (ppc_elf_adjust_dynamic_symbol): Likewise.
291 (allocate_dynrelocs): Likewise.
292 (ppc_elf_relocate_section): Likewise.
293 * elf32-s390.c (elf_s390_link_hash_entry): Remove dyn_relocs.
294 (link_hash_newfunc): Updated.
295 (elf_s390_copy_indirect_symbol): Likewise.
296 (readonly_dynrelocs): Likewise.
297 (elf_s390_adjust_dynamic_symbol): Likewise.
298 (allocate_dynrelocs): Likewise.
299 * elf32-sh.c (elf_sh_link_hash_entry): Remove dyn_relocs.
300 (sh_elf_link_hash_newfunc): Updated.
301 (readonly_dynrelocs): Likewise.
302 (allocate_dynrelocs): Likewise.
303 (sh_elf_copy_indirect_symbol): Likewise.
304 (sh_elf_check_relocs): Likewise.
305 * elf32-tic6x.c (elf32_tic6x_link_hash_entry): Removed.
306 (elf32_tic6x_link_hash_newfunc): Likewise.
307 (elf32_tic6x_link_hash_table_create): Updated.
308 (readonly_dynrelocs): Likewise.
309 (elf32_tic6x_check_relocs): Likewise.
310 (elf32_tic6x_allocate_dynrelocs): Likewise.
311 * elf32-tilepro.c (tilepro_elf_link_hash_entry): Remove
312 dyn_relocs.
313 (link_hash_newfunc): Updated.
314 (tilepro_elf_copy_indirect_symbol): Likewise.
315 (tilepro_elf_check_relocs): Likewise.
316 (allocate_dynrelocs): Likewise.
317 * elf64-ppc.c (ppc_link_hash_entry): Remove dyn_relocs.
318 (ppc64_elf_copy_indirect_symbol): Updated.
319 (ppc64_elf_check_relocs): Likewise.
320 (readonly_dynrelocs): Likewise.
321 (ppc64_elf_adjust_dynamic_symbol): Likewise.
322 (dec_dynrel_count): Likewise.
323 (allocate_dynrelocs): Likewise.
324 (ppc64_elf_relocate_section): Likewise.
325 * elf64-s390.c (elf_s390_link_hash_entry): Remove dyn_relocs.
326 (link_hash_newfunc): Updated.
327 (elf_s390_copy_indirect_symbol): Likewise.
328 (readonly_dynrelocs): Likewise.
329 (allocate_dynrelocs): Likewise.
330 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
331 * elfnn-aarch64.c (elf_aarch64_link_hash_entry): Remove
332 dyn_relocs.
333 (elfNN_aarch64_link_hash_newfunc): Updated.
334 (elfNN_aarch64_copy_indirect_symbol): Likewise.
335 (readonly_dynrelocs): Likewise.
336 (need_copy_relocation_p): Likewise.
337 (elfNN_aarch64_allocate_dynrelocs): Likewise.
338 (elfNN_aarch64_allocate_ifunc_dynrelocs): Likewise.
339 * elfnn-riscv.c (riscv_elf_link_hash_entry): Remove dyn_relocs.
340 (link_hash_newfunc): Updated.
341 (riscv_elf_copy_indirect_symbol): Likewise.
342 (riscv_elf_check_relocs): Likewise.
343 (readonly_dynrelocs): Likewise.
344 (allocate_dynrelocs): Likewise.
345 * elfxx-sparc.c (_bfd_sparc_elf_link_hash_entry): Remove
346 dyn_relocs.
347 (link_hash_newfunc): Updated.
348 (_bfd_sparc_elf_copy_indirect_symbol): Likewise.
349 (_bfd_sparc_elf_check_relocs): Likewise.
350 (readonly_dynrelocs): Likewise.
351 (allocate_dynrelocs): Likewise.
352 * elfxx-tilegx.c (tilegx_elf_link_hash_entry): Remove dyn_relocs.
353 (link_hash_newfunc): Updated.
354 (tilegx_elf_copy_indirect_symbol): Likewise.
355 (tilegx_elf_check_relocs): Likewise.
356 (readonly_dynrelocs): Likewise.
357 (allocate_dynrelocs): Likewise.
358 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Likewise.
359 (readonly_dynrelocs): Likewise.
360 (_bfd_x86_elf_copy_indirect_symbol): Likewise.
361 * elfxx-x86.h (elf_x86_link_hash_entry): Remove dyn_relocs.
362
363 2020-06-01 Alan Modra <amodra@gmail.com>
364
365 * vms-alpha.c (_bfd_vms_slurp_etir): Check bound for the current
366 command against cmd_length, not the end of record. For
367 ETIR__C_STO_IMMR check size against cmd_length, mask repeat count
368 to 32-bits and break out on zero size. Add ETIR__C_STC_LP_PSB
369 cmd_length test.
370
371 2020-05-28 David Faust <david.faust@oracle.com>
372
373 * elf64-bpf.c (bpf_elf_relocate_section): Fix handling of
374 R_BPF_INSN_{32,64} relocations.
375
376 2020-05-28 Stephen Casner <casner@acm.org>
377
378 * pdp11.c: Implement BRD_RELOC_32 to relocate the low 16 bits of
379 addreses in .long (used in testsuites) and .stab values.
380
381 2020-05-27 H.J. Lu <hongjiu.lu@intel.com>
382
383 PR ld/22909
384 * elflink.c (bfd_elf_final_link): Use bfd_link_textrel_check.
385 Check bfd_link_dll when issue a DT_TEXTREL warning.
386 * elfxx-x86.c (maybe_set_textrel): Likewise.
387 (_bfd_x86_elf_size_dynamic_sections): Likewise.
388
389 2020-05-26 Nick Clifton <nickc@redhat.com>
390
391 * plugin.c (try_load_plugin): Extend error message when a plugin
392 fails to open.
393
394 2020-05-23 Alan Modra <amodra@gmail.com>
395
396 * bfdio.c (bfd_get_file_size): Don't segfault on NULL arch_header.
397
398 2020-05-22 Alan Modra <amodra@gmail.com>
399
400 PR 25882
401 * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Don't init FP
402 attributes from shared libraries, and do not return an error if
403 they don't match.
404
405 2020-05-21 Alan Modra <amodra@gmail.com>
406
407 PR 25993
408 * opncls.c (_bfd_free_cached_info): Keep a copy of the bfd
409 filename.
410 (_bfd_delete_bfd): Free the copy.
411 (_bfd_new_bfd): Free nbfd->memory on error.
412
413 2020-05-21 Alan Modra <amodra@gmail.com>
414
415 * aoutx.h: Replace "if (x) free (x)" with "free (x)" throughout.
416 * archive.c, * bfd.c, * bfdio.c, * coff-alpha.c, * coff-ppc.c,
417 * coff-sh.c, * coff-stgo32.c, * coffcode.h, * coffgen.c,
418 * cofflink.c, * cpu-arm.c, * doc/chew.c, * dwarf2.c, * ecoff.c,
419 * ecofflink.c, * elf-eh-frame.c, * elf-m10200.c, * elf-m10300.c,
420 * elf-strtab.c, * elf.c, * elf32-arc.c, * elf32-arm.c,
421 * elf32-avr.c, * elf32-bfin.c, * elf32-cr16.c, * elf32-crx.c,
422 * elf32-epiphany.c, * elf32-ft32.c, * elf32-h8300.c,
423 * elf32-ip2k.c, * elf32-m32c.c, * elf32-m68hc11.c,
424 * elf32-m68k.c, * elf32-microblaze.c, * elf32-msp430.c,
425 * elf32-nds32.c, * elf32-nios2.c, * elf32-ppc.c, * elf32-pru.c,
426 * elf32-rl78.c, * elf32-rx.c, * elf32-sh.c, * elf32-spu.c,
427 * elf32-v850.c, * elf32-xtensa.c, * elf64-alpha.c,
428 * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c
429 * elf64-mmix.c, * elf64-ppc.c, * elf64-sparc.c, * elfcode.h,
430 * elflink.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-mips.c,
431 * elfxx-x86.c, * format.c, * ihex.c, * libbfd.c, * linker.c,
432 * mmo.c, * opncls.c, * pdp11.c, * peXXigen.c, * pef.c,
433 * peicode.h, * simple.c, * som.c, * srec.c, * stabs.c, * syms.c,
434 * targets.c, * vms-lib.c, * xcofflink.c, * xtensa-isa.c: Likewise.
435
436 2020-05-20 Nelson Chu <nelson.chu@sifive.com>
437
438 * elfxx-riscv.h (riscv_parse_subset_t): Add new callback function
439 get_default_version. It is used to find the default version for
440 the specific extension.
441 * elfxx-riscv.c (riscv_parsing_subset_version): Remove the parameters
442 default_major_version and default_minor_version. Add new bfd_boolean
443 parameter *use_default_version. Set it to TRUE if we need to call
444 the callback rps->get_default_version to find the default version.
445 (riscv_parse_std_ext): Call rps->get_default_version if we fail to find
446 the default version in riscv_parsing_subset_version, and then call
447 riscv_add_subset to add the subset into subset list.
448 (riscv_parse_prefixed_ext): Likewise.
449 (riscv_std_z_ext_strtab): Support Zicsr extensions.
450 * elfnn-riscv.c (riscv_merge_std_ext): Use strcasecmp to compare the
451 strings rather than characters.
452 riscv_merge_arch_attr_info): The callback function get_default_version
453 is only needed for assembler, so set it to NULL int the linker.
454 * elfxx-riscv.c (riscv_estimate_digit): Remove the static.
455 * elfxx-riscv.h: Updated.
456
457 2020-05-20 Alan Modra <amodra@gmail.com>
458
459 PR 25993
460 * archive.c (_bfd_get_elt_at_filepos): Don't strdup filename,
461 use bfd_set_filename.
462 * elfcode.h (_bfd_elf_bfd_from_remote_memory): Likewise.
463 * mach-o.c (bfd_mach_o_fat_member_init): Likewise.
464 * opncls.c (bfd_fopen, bfd_openstreamr, bfd_openr_iovec, bfd_openw),
465 (bfd_create): Likewise.
466 (_bfd_delete_bfd): Don't free filename.
467 (bfd_set_filename): Copy filename param to bfd_alloc'd memory,
468 return pointer to the copy or NULL on alloc fail.
469 * vms-lib.c (_bfd_vms_lib_get_module): Free newname and test
470 result of bfd_set_filename.
471 * bfd-in2.h: Regenerate.
472
473 2020-05-20 Alan Modra <amodra@gmail.com>
474
475 PR 26011
476 * elf.c (_bfd_elf_get_reloc_upper_bound): Sanity check reloc
477 section size against file size.
478 (_bfd_elf_get_dynamic_reloc_upper_bound): Likewise.
479
480 2020-05-19 Gunther Nikl <gnikl@justmail.de>
481
482 PR 26005
483 * elf.c (bfd_section_from_shdr): Replace bfd_zmalloc with bfd_malloc
484 and memset when allocating memory for the sections_being_created
485 array.
486
487 2020-05-19 Stafford Horne <shorne@gmail.com>
488
489 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Rename srela
490 to relgot.
491 (or1k_elf_relocate_section): Access srelgot via
492 htab->root.srelgot. Add assertions for srelgot->contents.
493 Introduce local variable for srelgot to not reuse global
494 sreloc.
495 (or1k_elf_relocate_section): Fixup dynamic symbol detection.
496 (or1k_set_got_and_rela_sizes): New function.
497 (or1k_initial_exec_offset): New function.
498 (TLS_GD, TLS_IE, TLS_LD, TLS_LE): Redefine macros as masks.
499 (or1k_elf_relocate_section): Allow for TLS to handle multiple
500 model access.
501 (or1k_elf_check_relocs): Use OR to set TLS access.
502 (allocate_dynrelocs): Use or1k_set_got_and_rela_sizes to set
503 sizes.
504 (or1k_elf_size_dynamic_sections): Use
505 or1k_set_got_and_rela_sizes to set sizes.
506 (or1k_elf_relocate_section): Fixup PCREL relocation calculation.
507 (TCB_SIZE): New macro.
508 (tpoff): Use TCB_SIZE and alignment to calculate offset.
509 (allocate_dynrelocs, readonly_dynrelocs, or1k_elf_check_relocs)
510 (or1k_elf_size_dynamic_sections): Rename p to sec_relocs.
511 (allocate_dynrelocs): Rename s to splt or sgot based on usage.
512 (tpoff): Add dynamic boolean argument.
513 (or1k_elf_relocate_section): Pass dynamic flag to tpoff.
514
515 2020-05-19 Siddhesh Poyarekar <siddesh.poyarekar@arm.com>
516
517 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Club
518 BFD_RELOC_AARCH64_BRANCH19 and BFD_RELOC_AARCH64_TSTBR14
519 cases with BFD_RELOC_AARCH64_JUMP26.
520 (elfNN_aarch64_check_relocs): Likewise.
521
522 2020-05-19 Alan Modra <amodra@gmail.com>
523
524 * aix5ppc-core.c (xcoff64_core_file_matches_executable_p): Use
525 bfd_get_filename rather than accessing bfd->filename directly.
526 * aout-target.h (MY (object_p)): Likewise.
527 * aoutx.h (aout_find_nearest_line, aout_link_write_symbols): Likewise.
528 * archive.c (find_nested_archive, _bfd_generic_read_ar_hdr_mag),
529 (_bfd_construct_extended_name_table, _bfd_bsd44_write_ar_hdr),
530 (_bfd_archive_bsd44_construct_extended_name_table),
531 (_bfd_write_archive_contents, _bfd_compute_and_write_armap),
532 (_bfd_bsd_write_armap): Likewise.
533 * bfd.c (bfd_errmsg, _bfd_doprnt): Likewise.
534 * cache.c (bfd_open_file): Likewise.
535 * ecoff.c (_bfd_ecoff_write_armap): Likewise.
536 * ecofflink.c (bfd_ecoff_debug_accumulate_other): Likewise.
537 * elf32-bfin.c (bfinfdpic_relocate_section): Likewise.
538 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
539 * elf32-hppa.c (elf32_hppa_final_link): Likewise.
540 * elf32-nds32.c (nds32_elf_output_symbol_hook),
541 (patch_tls_desc_to_ie): Likewise.
542 * elf32-spu.c (sort_bfds, print_one_overlay_section),
543 (spu_elf_auto_overlay): Likewise.
544 * elf64-hppa.c (elf_hppa_final_link): Likewise.
545 * elf64-ia64-vms.c (elf64_ia64_size_dynamic_sections): Likewise.
546 * elfcore.h (elf_core_file_matches_executable_p): Likewise.
547 * elflink.c (bfd_elf_size_dynamic_sections),
548 (elf_link_input_bfd): Likewise.
549 * linker.c (_bfd_generic_link_output_symbols): Likewise.
550 * mach-o.c (bfd_mach_o_follow_dsym),
551 (bfd_mach_o_close_and_cleanup): Likewise.
552 * opncls.c (_bfd_delete_bfd, _maybe_make_executable),
553 (find_separate_debug_file, get_build_id_name): Likewise.
554 * pdp11.c (aout_find_nearest_line, aout_link_write_symbols): Likewise.
555 * plugin.c (bfd_plugin_open_input): Likewise.
556 * rs6000-core.c (rs6000coff_core_file_matches_executable_p): Likewise.
557 * som.c (som_write_armap): Likewise.
558 * srec.c (srec_write_record, srec_write_symbols): Likewise.
559 * vms-lib.c (_bfd_vms_lib_get_imagelib_file),
560 (_bfd_vms_lib_write_archive_contents): Likewise.
561 * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
562
563 2020-05-19 Alan Modra <amodra@gmail.com>
564
565 PR 25713
566 * bfdio.c (_bfd_real_fopen): Typo fix.
567
568 2020-05-18 Nick Clifton <nickc@redhat.com>
569
570 PR 26005
571 * elf.c (bfd_section_from_shdr): Use bfd_malloc to allocate memory
572 for the sections_being_created array.
573
574 2020-05-18 Alan Modra <amodra@gmail.com>
575
576 * ecoff.c (ecoff_slurp_reloc_table): Malloc external_relocs so
577 they can be freed without also freeing internal_relocs.
578
579 2020-05-18 Jaydeep Chauhan <jaydeepchauhan1494@gmail.com>
580
581 PR 25713
582 * bfdio.c (_bfd_real_fopen): Convert UNIX style sirectory
583 separators into DOS style when creating a WIN32 fullpath.
584
585 2020-05-14 Nelson Chu <nelson.chu@sifive.com>
586
587 * elfnn-riscv.c (elfNN_riscv_mkobject): New function. We need this
588 to initialize RISC-V tdata.
589
590 2020-05-12 Gunther Nikl <gnikl@justmail.de>
591
592 * aoutx.h (NAME (aout, swap_std_reloc_out)): Reject an unsupported
593 relocation size.
594
595 2020-05-11 Alan Modra <amodra@gmail.com>
596
597 * elf64-ppc.c (xlate_pcrel_opt): Handle lxvp and stxvp.
598
599 2020-05-11 Alan Modra <amodra@gmail.com>
600
601 * elf64-ppc.c: Rename powerxx to power10 throughout.
602
603 2020-05-11 Alan Modra <amodra@gmail.com>
604
605 PR 25961
606 * coffgen.c (coff_get_normalized_symtab): Check that buffer
607 contains required number of auxents before processing any auxent.
608 * coffswap.h (coff_swap_aux_in <C_FILE>): Only swap in extended
609 file name from auxents for PE.
610
611 2020-05-04 Gunther Nikl <gnikl@justmail.de>
612
613 * aout-cris.c (DEFAULT_ARCH): Delete define.
614 (MY_set_arch_mach): Likewise.
615 (SET_ARCH_MACH): Use bfd_set_arch_mach with an explicit architecture
616 of bfd_arch_cris.
617 (swap_ext_reloc_in): Add casts to r_index extraction. Mask valid bits
618 of r_type before the shift.
619
620 2020-05-04 Wilco Dijkstra <wdijkstr@arm.com>
621
622 PR ld/25665
623 * elfnn-aarch64.c (group_sections): Copy implementation from
624 elf32-arm.c.
625
626 2020-05-01 Alan Modra <amodra@gmail.com>
627
628 PR 25900
629 * elfnn-riscv.c (_bfd_riscv_relax_section): Check root.type before
630 accessing root.u.def of symbols. Also check root.u.def.section
631 is non-NULL. Reverse tests so as to make the logic positive.
632
633 2020-05-01 Alan Modra <amodra@gmail.com>
634
635 PR 25882
636 * elf32-tic6x.c (elf32_tic6x_merge_attributes): Don't transfer
637 Tag_ABI_PIC or Tag_ABI_PID from dynamic objects to the output.
638
639 2020-05-01 Alan Modra <amodra@gmail.com>
640
641 PR 25882
642 * elf32-bfin.c (elf32_bfin_merge_private_bfd_data): Add FIXME.
643 * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
644 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Likewise.
645 * elf32-nds32.c (nds32_elf_merge_private_bfd_data): Likewise.
646 * elf32-score.c (s3_elf32_score_merge_private_bfd_data): Likewise.
647 * elf32-score7.c (s7_elf32_score_merge_private_bfd_data): Likewise.
648 * elf32-sh.c (sh_elf_merge_private_data): Likewise.
649 * elf32-tic6x.c (elf32_tic6x_merge_attributes): Likewise.
650 * elf64-ia64-vms.c (elf64_ia64_merge_private_bfd_data): Likewise.
651 * elfnn-ia64.c (elfNN_ia64_merge_private_bfd_data): Likewise.
652
653 2020-05-01 Alan Modra <amodra@gmail.com>
654
655 PR 25882
656 * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Ignore e_flags
657 from shared libraries.
658
659 2020-04-29 Max Filippov <jcmvbkbc@gmail.com>
660
661 * elf32-xtensa.c (relax_section): Don't negate diff_value for
662 XTENSA_NDIFF relocations. Don't add sign bits whe diff_value
663 equals 0. Report overflow when the result has negative sign but
664 all significant bits are zero.
665
666 2020-04-29 Gunther Nikl <gnikl@justmail.de>
667
668 * aoutx.h (swap_std_reloc_out): Special case 64 bit relocations.
669 (aout_link_reloc_link_order): Likewise. Make r_length an unsigned.
670
671 2020-04-28 Alan Modra <amodra@gmail.com>
672
673 * vms-alpha.c (_bfd_vms_slurp_etir): Correct divide by zero check.
674 Emit warning message.
675
676 2020-04-27 Tamar Christina <tamar.christina@arm.com>
677
678 * coff-i386.c (COFF_WITH_PE_BIGOBJ): New.
679 * coff-x86_64.c (COFF_WITH_PE_BIGOBJ): New.
680 * config.bfd (targ_selvecs): Rename x86_64_pe_be_vec
681 to x86_64_pe_big_vec as it not a big-endian format.
682 (vec i386_pe_big_vec): New.
683 * configure.ac: Likewise.
684 * targets.c: Likewise.
685 * configure: Regenerate.
686 * pe-i386.c (TARGET_SYM_BIG, TARGET_NAME_BIG,
687 COFF_WITH_PE_BIGOBJ): New.
688 * pe-x86_64.c (TARGET_SYM_BIG, TARGET_NAME_BIG):
689 New.
690 (x86_64_pe_be_vec): Moved.
691
692 2020-04-23 Anton Kolesov <anton.kolesov@synopsys.com>
693
694 * elf-bfd.h (elfcore_write_arc_v2): Add prototype.
695 * elf.c (elfcore_grok_arc_v2): New function.
696 (elfcore_grok_note): Call the new function to handle the corresponding
697 note.
698 (elfcore_write_arc_v2): New function.
699 (elfcore_write_register_note): Call the new function to handle the
700 corresponding pseudo-sections.
701
702 2020-04-22 Max Filippov <jcmvbkbc@gmail.com>
703
704 PR ld/25861
705 * bfd-in2.h: Regenerated.
706 * elf32-xtensa.c (elf_howto_table): New entries for
707 R_XTENSA_PDIFF{8,16,32} and R_XTENSA_NDIFF{8,16,32}.
708 (elf_xtensa_reloc_type_lookup, elf_xtensa_do_reloc)
709 (relax_section): Add cases for R_XTENSA_PDIFF{8,16,32} and
710 R_XTENSA_NDIFF{8,16,32}.
711 * libbfd.h (bfd_reloc_code_real_names): Add names for
712 BFD_RELOC_XTENSA_PDIFF{8,16,32} and
713 BFD_RELOC_XTENSA_NDIFF{8,16,32}.
714 * reloc.c: Add documentation for BFD_RELOC_XTENSA_PDIFF{8,16,32}
715 and BFD_RELOC_XTENSA_NDIFF{8,16,32}.
716
717 2020-04-21 Tamar Christina <tamar.christina@arm.com>
718
719 PR binutils/24753
720 * compress.c (bfd_get_full_section_contents): Exclude sections with no
721 content.
722
723 2020-04-21 H.J. Lu <hongjiu.lu@intel.com>
724
725 PR ld/25849
726 * elf-bfd.h (elf_backend_data): Add
727 elf_backend_strip_zero_sized_dynamic_sections.
728 (_bfd_elf_strip_zero_sized_dynamic_sections): New prototype.
729 * elf64-alpha.c (elf_backend_strip_zero_sized_dynamic_sections):
730 New macro.
731 * elflink.c (_bfd_elf_strip_zero_sized_dynamic_sections): New
732 function.
733 * elfxx-target.h (elf_backend_strip_zero_sized_dynamic_sections):
734 New macro.
735 (elfNN_bed): Add elf_backend_strip_zero_sized_dynamic_sections.
736
737 2020-04-21 H.J. Lu <hongjiu.lu@intel.com>
738
739 * elf64-alpha.c (alpha_elf_reloc_entry): Replace reltext with
740 sec.
741 (elf64_alpha_check_relocs): Set sec instead of reltext. Warn
742 DT_TEXTREL with -M.
743 (elf64_alpha_calc_dynrel_sizes): Warn DT_TEXTREL with -M.
744
745 2020-04-21 Nick Clifton <nickc@redhat.com>
746
747 * po/sr.po: Updated Serbian translation.
748
749 2020-04-21 Alan Modra <amodra@gmail.com>
750
751 * elf32-sh.c (sh_elf_relocate_section): Remove STO_SH5_ISA32
752 processing.
753
754 2020-04-20 Stephen Casner <casner@acm.org>
755
756 * pdp11.c (N_STAB): Modify value to avoid conflict with N_EXT
757 causing globals from linker script to be treated as debug symbols.
758 (translate_symbol_table): Don't sign-extend symbol values from 16
759 to 64 bits in nm output.
760
761 2020-04-20 Alan Modra <amodra@gmail.com>
762
763 * elf64-ppc.c (ppc64_elf_size_stubs): Strip relbrlt too.
764
765 2020-04-18 Alan Modra <amodra@gmail.com>
766
767 * section.c (bfd_is_const_section): Correct test for special
768 sections.
769 * bfd-in2.h: Regenerate.
770
771 2020-04-17 Alan Modra <amodra@gmail.com>
772
773 PR 25842
774 * elf.c (_bfd_elf_get_symbol_version_string): Don't segfault on
775 NULL nodename.
776
777 2020-04-16 Nick Clifton <nickc@redhat.com>
778
779 PR 25803
780 * elfxx-mips.c (_bfd_mips_elf_adjust_dynamic_symbol): Replace an
781 abort with a more helpful error message.
782
783 2020-04-16 Alan Modra <amodra@gmail.com>
784
785 PR 25827
786 * dwarf2.c (scan_unit_for_symbols): Wrap overlong lines. Don't
787 strdup(0).
788
789 2020-04-15 Fangrui Song <maskray@google.com>
790
791 PR binutils/24613
792 * coff-rs6000.c (xcoff_ppc_relocate_section): Change RM_GENERATE_ERROR
793 to RM_DIAGNOSE plus a check of warn_unresolved_syms.
794 * coff64-rs6000.c (xcoff_ppc_relocate_section): Likewise.
795 * elf-bfd.h (_bfd_elf_large_com_section): Likewise.
796 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
797 * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise.
798 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
799 * elf32-sh.c (sh_elf_relocate_section): Likewise.
800 * elf32-spu.c (spu_elf_relocate_section): Likewise.
801 * elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
802 * elflink.c (elf_link_output_extsym): Likewise.
803 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
804
805 2020-04-15 Alan Modra <amodra@gmail.com>
806
807 PR 25823
808 * peXXigen.c (_bfd_XXi_swap_sym_in <C_SECTION>): Don't use a
809 pointer into strings that may be freed for section name, always
810 allocate a new string.
811
812 2020-04-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
813 Jan W. Jagersma <jwjagersma@gmail.com>
814
815 * coff-go32.c (COFF_GO32, IMAGE_SCN_LNK_NRELOC_OVFL)
816 (coff_SWAP_scnhdr_in, coff_SWAP_scnhdr_out): Define.
817 (_bfd_go32_swap_scnhdr_in, _bfd_go32_swap_scnhdr_out)
818 (_bfd_go32_mkobject): New functions.
819 * coff-stgo32.c (IMAGE_SCN_LNK_NRELOC_OVFL)
820 (coff_SWAP_scnhdr_in, coff_SWAP_scnhdr_out): Define.
821 (go32exe_mkobject): Call _bfd_go32_mkobject.
822 * coffcode.h (COFF_WITH_EXTENDED_RELOC_COUNTER): Define.
823 (coff_set_alignment_hook): Define function for COFF_GO32_EXE
824 and COFF_GO32.
825 (coff_write_relocs): Enable extended reloc counter code if
826 COFF_WITH_EXTENDED_RELOC_COUNTER is defined. Test for obj_go32.
827 (coff_write_object_contents): Likewise. Pad section headers
828 for COFF_GO32 and COFF_GO32EXE. Use bfd_coff_swap_scnhdr_out
829 instead of coff_swap_scnhdr_out.
830 * cofflink.c (_bfd_coff_final_link): Test also for obj_go32 to
831 enable extended reloc counter.
832 * coffswap.h: (coff_swap_scnhdr_in, coff_swap_scnhdr_out):
833 Declare with ATTRIBUTE_UNUSED.
834 * libcoff-in.h: (struct coff_tdata): New field go32.
835 (obj_go32): Define.
836 * libcoff.h: Regenerate.
837
838 2020-04-14 Fangrui Song <maskray@google.com>
839
840 PR gas/25768
841 * elf.c (assign_section_numbers): Always set .stab sh_entsize to
842 12.
843
844 2020-04-14 Stephen Casner <casner@acm.org>
845
846 PR ld/25677
847 * pdp11.c: Add implementation of --imagic option.
848 (adjust_o_magic): Fix objcopy --extract-symbol test.
849 * libaout.h (enum aout_magic): Add i_magic.
850
851 2020-04-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
852 Nick Clifton <nickc@redhat.com>
853
854 * elf32-sparc.c (sparc_final_write_processing): Fix whitespace.
855 <0>: Ignore.
856 <default>: Error rather than abort.
857
858 2020-04-03 H.J. Lu <hongjiu.lu@intel.com>
859
860 PR ld/25767
861 * elf.c (_bfd_elf_fixup_group_sections): Remove zero-sized
862 relocation section from section group.
863
864 2020-04-02 Jan W. Jagersma <jwjagersma@gmail.com>
865
866 * bfdio.c (bfd_bread, bfd_tell, bfd_seek, bfd_mmap): Always add
867 bfd->origin to file offset.
868 * bfdwin.c (bfd_get_file_window): Likewise.
869 * bfd.c: Clarify the use of the bfd->origin field.
870 * bfd-in2.h: Regenerate.
871 * coff-i386.c: Don't include go32exe.h. Allow overriding
872 coff_write_object_contents via COFF_WRITE_CONTENTS.
873 * coff-stgo32.c (go32exe_cleanup, go32exe_mkobject)
874 (go32exe_write_object_contents): New functions.
875 (go32exe_temp_stub, go32exe_temp_stub_size): New static globals.
876 (COFF_WRITE_CONTENTS, GO32EXE_DEFAULT_STUB_SIZE): Define.
877 (create_go32_stub): Remove check for 2k size limit. Read stub
878 from go32exe_temp_stub if present.
879 (go32_stubbed_coff_bfd_copy_private_bfd_data): Allocate and
880 copy variable-length stub.
881 (go32_check_format): Read stub to go32exe_temp_stub, set
882 origin, return go32exe_cleanup.
883 (adjust_filehdr_in_post, adjust_filehdr_out_pre)
884 (adjust_filehdr_out_post, adjust_scnhdr_in_post)
885 (adjust_scnhdr_out_pre, adjust_scnhdr_out_post)
886 (adjust_aux_in_post, adjust_aux_out_pre, adjust_aux_out_post):
887 Remove functions and their associated #defines.
888 * coffcode.h (coff_mkobject_hook): Remove stub copying code.
889 * libcoff-in.h: (struct coff_tdata): New field stub_size.
890 Rename field go32stub to stub.
891 * libcoff.h: Regenerate.
892 * coff-stgo32.c (go32_check_format): Rename to...
893 (go32exe_check_format): ...this.
894 (go32_stubbed_coff_bfd_copy_private_bfd_data): Rename to...
895 (go32exe_copy_private_bfd_data): ...this.
896 (stub_bytes): Rename to...
897 (go32exe_default_stub): ...this.
898 (create_go32_stub): Rename to...
899 (go32exe_create_stub): ...this.
900 * coff-stgo32.c (go32exe_copy_private_bfd_data): Avoid realloc
901 when possible.
902
903 2020-04-01 H.J. Lu <hongjiu.lu@intel.com>
904
905 PR ld/25749
906 PR ld/25754
907 * elf32-i386.c (elf_i386_convert_load_reloc): Convert load
908 relocation to R_386_32 for relocation against non-preemptible
909 absolute symbol.
910 (elf_i386_check_relocs): Call _bfd_elf_x86_valid_reloc_p. Don't
911 allocate dynamic relocation for non-preemptible absolute symbol.
912 (elf_i386_relocate_section): Pass sec to
913 GENERATE_DYNAMIC_RELOCATION_P.
914 * elf64-x86-64.c (R_X86_64_converted_reloc_bit): Moved.
915 (elf_x86_64_convert_load_reloc): Covert load relocation to
916 R_X86_64_32S or R_X86_64_32 for relocation against non-preemptible
917 absolute symbol. Don't convert to R_X86_64_32S nor R_X86_64_32
918 for non-preemptible absolute symbol if they overflow.
919 (elf_x86_64_check_relocs): Call _bfd_elf_x86_valid_reloc_p. Set
920 tls_type for GOT slot to GOT_ABS for non-preemptible absolute
921 symbol. Don't allocate dynamic relocation for non-preemptible
922 absolute symbol.
923 (elf_x86_64_relocate_section): Don't generate relative relocation
924 for GOTPCREL relocations aganst local absolute symbol. Pass sec
925 to GENERATE_DYNAMIC_RELOCATION_P.
926 * elfxx-x86.c (elf_x86_allocate_dynrelocs): No dynamic relocation
927 against non-preemptible absolute symbol.
928 (_bfd_elf_x86_valid_reloc_p): New function.
929 (_bfd_x86_elf_size_dynamic_sections): No dynamic relocation for
930 GOT_ABS GOT slot.
931 * elfxx-x86.h (GENERATE_DYNAMIC_RELOCATION_P): Add an SEC
932 argument. Don't generate dynamic relocation against
933 non-preemptible absolute symbol.
934 (ABS_SYMBOL_P): New.
935 (GENERATE_RELATIVE_RELOC_P): Don't generate relative relocation
936 against non-preemptible absolute symbol.
937 (GOT_ABS): New.
938 (R_X86_64_converted_reloc_bit): New. Moved from elf64-x86-64.c.
939 (_bfd_elf_x86_valid_reloc_p): New.
940
941 2020-04-01 Tamar Christina <tamar.christina@arm.com>
942
943 PR ld/16017
944 * elf32-arm.c (elf32_arm_populate_plt_entry): Set LSB of the PLT0
945 address in the GOT if in thumb only mode.
946
947 2020-04-01 Tamar Christina <tamar.christina@arm.com>
948
949 * elf32-arm.c (elf32_thumb2_plt_entry): Fix PC-rel offset.
950
951 2020-04-01 Hans-Peter Nilsson <hp@bitrange.com>
952
953 * mmo.c (mmo_scan): Create .text section only when needed, not
954 from the start.
955
956 2020-03-31 Alan Modra <amodra@gmail.com>
957
958 * coff-alpha.c (alpha_ecoff_get_elt_at_filepos): Correct bfd_bread
959 return value check.
960
961 2020-03-31 Alan Modra <amodra@gmail.com>
962
963 * vms-alpha.c (image_write): Check bounds for sections without
964 contents too. Error on non-zero write to section without
965 contents.
966 (_bfd_vms_slurp_etir): Check return of image_write* functions.
967
968 2020-03-31 Alan Modra <amodra@gmail.com>
969
970 * tekhex.c (pass_over): Check is_eof before reading buffer.
971
972 2020-03-30 Nick Clifton <nickc@redhat.com>
973
974 PR binutils/pr25662
975 * libcoff-in.h (struct pe_tdata): Rename the insert_timestamp
976 field to timestamp and make it an integer.
977 * libcoff.h: Regenerate.
978 * peXXigen.c (_bfd_XXi_only_swap_filehdr_out): Test the timestamp
979 field in the pe_data structure rather than the insert_timestamp
980 field.
981
982 2020-03-30 Alan Modra <amodra@gmail.com>
983
984 PR 25745
985 * elf64-ppc.c (ppc64_elf_build_stubs): Use asprintf to form
986 statistics message.
987
988 2020-03-26 Nick Clifton <nickc@redhat.com>
989
990 * cofflink.c (bfd_coff_get_internal_extra_pe_aouthdr): Delete.
991 * libbfd-in.h (bfd_coff_get_internal_extra_pe_aouthdr): Remove
992 prototype.
993 * libbfd.h: Regenerate.
994
995 2020-03-26 Alan Modra <amodra@gmail.com>
996
997 * i386msdos.c (msdos_object_p): Catch -1 return from bfd_bread.
998
999 2020-03-26 Alan Modra <amodra@gmail.com>
1000
1001 * vms-alpha.c (dst_define_location): Limit size of dst_ptr_offsets
1002 array.
1003 (_bfd_vms_slurp_object_records): Rename "err" to "ok".
1004
1005 2020-03-25 Nick Clifton <nickc@redhat.com>
1006
1007 * cofflink.c (bfd_coff_get_internal_extra_pe_aouthdr): New
1008 function.
1009 * libbfd-in.h (bfd_coff_get_internal_extra_pe_aouthdr): Prototype.
1010 * libbfd.h: Regenerate.
1011
1012 2020-03-25 Shahab Vahedi <shahab@synopsys.com>
1013
1014 * elf32-arc.c (PRINT_DEBUG_RELOC_INFO_BEFORE): Use the
1015 correct field name in the output string.
1016
1017 2020-03-25 Alan Modra <amodra@gmail.com>
1018
1019 PR 25662
1020 * elf.c (assign_file_positions_for_load_sections): Adjust offset
1021 for SHT_NOBITS section if first in segment.
1022
1023 2020-03-24 H.J. Lu <hongjiu.lu@intel.com>
1024
1025 PR binutils/25708
1026 * elf-bfd.h (_bfd_elf_get_symbol_version_name): Renamed to ...
1027 (_bfd_elf_get_symbol_version_string): This.
1028 * elf.c (_bfd_elf_get_symbol_version_name): Renamed to ...
1029 (_bfd_elf_get_symbol_version_string): This.
1030 (bfd_elf_print_symbol): Pass TRUE to
1031 _bfd_elf_get_symbol_version_string.
1032 * libbfd-in.h (_bfd_nosymbols_get_symbol_version_string): Add a
1033 bfd_boolean argument.
1034 * syms.c (_bfd_nosymbols_get_symbol_version_string): Likewise.
1035 * targets.c (_bfd_get_symbol_version_string): Likewise.
1036 (bfd_get_symbol_version_string): Likewise.
1037 * bfd-in2.h: Regenerated.
1038
1039 2020-03-24 Nick Clifton <nickc@redhat.com>
1040 Jaydeep Chauhan <jaydeepchauhan1494@gmail.com>
1041
1042 PR 25713
1043 * bfdio.c (_bfd_real_fopen): Add code to handle long filenames on
1044 Win32 systems.
1045
1046 2020-03-24 Nick Clifton <nickc@redhat.com>
1047
1048 PR 25681
1049 * elf.c (_bfd_elf_map_sections_to_segments): When looking for a
1050 segment to use for PT_GNU_RELRO, ignore empty sections in a
1051 segment's current list.
1052
1053 2020-03-24 H.J. Lu <hongjiu.lu@intel.com>
1054
1055 PR binutils/25717
1056 * elf-bfd.h (elf_obj_tdata): Change num_group to unsigned int.
1057
1058 2020-03-24 H.J. Lu <hongjiu.lu@intel.com>
1059
1060 PR binutils/25708
1061 * elf-bfd.h (_bfd_elf_get_symbol_version_name): New.
1062 * elf.c (_bfd_elf_get_symbol_version_name): New function. Based
1063 on the previous _bfd_elf_get_symbol_version_string.
1064 (_bfd_elf_get_symbol_version_string): Use it.
1065
1066 2020-03-24 Alan Modra <amodra@gmail.com>
1067
1068 * archive.c (_bfd_generic_read_ar_hdr_mag): Sanity check extended
1069 name size. Use bfd_malloc rather than bfd_zmalloc, clearing just
1070 struct areltdata.
1071
1072 2020-03-23 Sebastian Huber <sebastian.huber@embedded-brains.de>
1073
1074 * elflink.c (_bfd_elf_tls_setup): Mention .tdata in comment.
1075
1076 2020-03-23 Alan Modra <amodra@gmail.com>
1077
1078 * ecoff.c (_bfd_ecoff_slurp_armap): Sanity check parsed_size and
1079 symbol count. Allocate an extra byte to ensure name strings
1080 are terminated. Sanity check name offsets. Release memory on
1081 error return.
1082
1083 2020-03-23 Alan Modra <amodra@gmail.com>
1084
1085 * i386msdos.c (msdos_object_p): Don't access e_lfanew when that
1086 field hasn't been read. Remove unnecessary casts.
1087
1088 2020-03-22 Alan Modra <amodra@gmail.com>
1089
1090 * coff64-rs6000.c (xcoff64_slurp_armap): Ensure size is large
1091 enough to read number of symbols.
1092
1093 2020-03-20 H.J. Lu <hongjiu.lu@intel.com>
1094
1095 * configure.ac (HAVE_EXECUTABLE_SUFFIX): Removed.
1096 (EXECUTABLE_SUFFIX): Likewise.
1097 * config.in: Regenerated.
1098 * configure: Likewise.
1099 * plugin.c (bfd_plugin_close_and_cleanup): Defined as
1100 _bfd_generic_close_and_cleanup.
1101 (plugin_list_entry): Remove resolution_file, resolution_option,
1102 real_bfd, real_nsyms, real_syms, lto_nsyms, lto_syms, gcc,
1103 lto_wrapper, gcc_env and initialized,
1104 (need_lto_wrapper_p): Removed.
1105 (get_lto_wrapper): Likewise.
1106 (setup_lto_wrapper_env): Likewise.
1107 (register_all_symbols_read): Likewise.
1108 (egister_cleanup): Likewise.
1109 (get_symbols): Likewise.
1110 (add_input_file): Likewise.
1111 (bfd_plugin_set_program_name): Remove need_lto_wrapper.
1112 (add_symbols): Updated.
1113 (try_claim): Likewise.
1114 (try_load_plugin): Likewise.
1115 (bfd_plugin_canonicalize_symtab): Likewise.
1116 * plugin.h (bfd_plugin_set_program_name): Remove int argument.
1117 (plugin_data_struct): Remove real_bfd, real_nsyms and real_syms.
1118
1119 2020-03-19 H.J. Lu <hongjiu.lu@intel.com>
1120
1121 PR binutils/25640
1122 * plugin.c (plugin_list_entry): Add has_symbol_type.
1123 (add_symbols_v2): New function.
1124 (bfd_plugin_open_input): Don't invoke LTO wrapper if LTO plugin
1125 provides symbol type.
1126 (try_load_plugin): Add LDPT_ADD_SYMBOLS_V2.
1127 (bfd_plugin_canonicalize_symtab): Use LTO plugin symbol type if
1128 available.
1129
1130 2020-03-20 Alan Modra <amodra@gmail.com>
1131
1132 * coff-rs6000.c (_bfd_xcoff_slurp_armap): Ensure size is large
1133 enough to read number of symbols.
1134
1135 2020-03-20 Alan Modra <amodra@gmail.com>
1136
1137 * elf.c (_bfd_elf_setup_sections): Don't test known non-NULL
1138 backend functions for NULL before calling.
1139 (copy_special_section_fields, _bfd_elf_copy_private_bfd_data),
1140 (bfd_section_from_shdr, assign_section_numbers): Likewise.
1141 * elfcode.h (elf_write_relocs, elf_slurp_reloc_table): Likewise.
1142 * elfnn-ia64.c (ignore_errors): New function.
1143 (elf_backend_link_order_error_handler): Redefine as ignore_errors.
1144
1145 2020-03-19 Nick Clifton <nickc@redhat.com>
1146
1147 PR 25676
1148 * dwarf2.c (struct varinfo): Add unit_offset field to record the
1149 location of the varinfo in the unit's debug info data. Change the
1150 type of the stack field to a boolean.
1151 (lookup_var_by_offset): New function. Returns the varinfo
1152 structure for the variable described at the given offset in the
1153 unit's debug info.
1154 (scan_unit_for_symbols): Add support for variables which have the
1155 DW_AT_specification attribute.
1156
1157 2020-03-19 Nick Clifton <nickc@redhat.com>
1158
1159 PR 25699
1160 * elf.c (bfd_elf_set_group_contents): Replace assertion with an
1161 error return.
1162
1163 2020-03-19 Sebastian Huber <sebastian.huber@embedded-brains.de>
1164
1165 * elfxx-riscv.c (riscv_parse_subset): Don't use C99.
1166
1167 2020-03-18 Nick Clifton <nickc@redhat.com>
1168
1169 PR 25673
1170 * elf.c (_bfd_elf_write_secondary_reloc_section): Fix illegal
1171 memory access when processing a corrupt secondary reloc section.
1172
1173 2020-03-18 Christophe Lyon <christophe.lyon@linaro.org>
1174
1175 * elf32-arm.c (arm_build_one_stub): Emit a fatal error message
1176 instead of calling abort.
1177 * elf32-csky.c (csky_build_one_stub): Likewise.
1178 * elf32-hppa.c (hppa_build_one_stub): Likewise.
1179 * elf32-m68hc11.c (m68hc11_elf_build_one_stub): Likewise.
1180 * elf32-m68hc12.c (m68hc12_elf_build_one_stub): Likewise.
1181 * elf32-metag.c (metag_build_one_stub): Likewise.
1182 * elf32-nios2.c (nios2_build_one_stub): Likewise.
1183 * elf64-ppc.c (ppc_build_one_stub): Likewise.
1184 (ppc_size_one_stub): Likewise.
1185 * elfnn-aarch64.c (aarch64_build_one_stub): Likewise.
1186
1187 2020-03-17 Nick Clifton <nickc@redhat.com>
1188
1189 PR 25688
1190 * elf.c (_bfd_elf_copy_special_section_fields): Replace assertions
1191 with error messages.
1192
1193 2020-03-17 Nick Clifton <nickc@redhat.com>
1194
1195 PR 25687
1196 * elf.c (_bfd_elf_slurp_secondary_reloc_section): Remove redundant
1197 free. Add free on another failure path.
1198
1199 2020-03-16 Alan Modra <amodra@gmail.com>
1200
1201 PR 25675
1202 * elf.c (elf_sort_segments): Don't call bfd_octets_per_byte unless
1203 we have a non-zero section count. Do lma comparison in octets.
1204
1205 2020-03-16 Alan Modra <amodra@gmail.com>
1206
1207 * vms-alpha.c (dst_restore_location): Validate index into
1208 dst_ptr_offsets array before accessing. Return status.
1209 (dst_retrieve_location): Similarly, making "loc" parameter a
1210 pointer to return value.
1211 (_bfd_vms_slurp_etir): Update calls to above functions.
1212
1213 2020-03-14 Kamil Rytarowski <n54@gmx.com>
1214
1215 * configure.ac: Include netbsd-core.lo for all NetBSD arm and mips
1216 targets.
1217 * configure: Regenerated.
1218
1219 2020-03-14 Alan Modra <amodra@gmail.com>
1220
1221 * section.c (BFD_FAKE_SECTIONS): Formatting.
1222 * bfd-in2.h: Regenerate.
1223
1224 2020-03-13 Kamil Rytarowski <n54@gmx.com>
1225
1226 * elf.c (elfcore_grok_netbsd_note): Add support for
1227 NT_NETBSDCORE_LWPSTATUS notes.
1228
1229 2020-03-13 Christophe Lyon <christophe.lyon@linaro.org>
1230
1231 * bfd-in2.h: Regenerate.
1232 * section.c (asection): Add already_assigned field.
1233 (BFD_FAKE_SECTION): Add default initializer for it.
1234 * ecoff.c (bfd_debug_section): Initialize already_assigned field.
1235 * elf32-arm.c (arm_build_one_stub): Add support for
1236 non_contiguous_regions.
1237 * elf32-csky.c (csky_build_one_stub): Likewise.
1238 * elf32-hppa.c (hppa_build_one_stub): Likewise.
1239 * elf32-m68hc11.c (m68hc11_elf_build_one_stub): Likewise.
1240 * elf32-m68hc12.c (m68hc12_elf_build_one_stub): Likewise.
1241 * elf32-metag.c (metag_build_one_stub): Likewise.
1242 * elf32-nios2.c (nios2_build_one_stub): Likewise.
1243 * elf64-ppc.c (ppc_build_one_stub): Likewise.
1244 (ppc_size_one_stub): Likewise.
1245 * elfnn-aarch64.c (aarch64_build_one_stub): Likewise.
1246 * elflink.c (elf_link_input_bfd): Likewise.
1247
1248 2020-03-13 H.J. Lu <hongjiu.lu@intel.com>
1249
1250 PR ld/24920
1251 * elf-linker-x86.h (elf_linker_x86_params): Add
1252 static_before_all_inputs and has_dynamic_linker.
1253 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Report
1254 dynamic input objects if -static is passed at command-line
1255 before all input files without --dynamic-linker unless
1256 --no-dynamic-linker is used.
1257
1258 2020-03-13 Kamil Rytarowski <n54@gmx.com>
1259
1260 * elf.c (elfcore_grok_netbsd_note): Add support for aarch64.
1261
1262 2020-03-13 Christian Eggers <ceggers@gmx.de>
1263
1264 * bfd.c (bfd_record_phdr): New local "opb". Fix assignment of
1265 "p_paddr" from "at".
1266 * elfcode.h (bfd_from_remote_memory): Add units to several
1267 parameters. New local "opb". Fix usage of p_align. Fix
1268 calculation of "localbase" from "ehdr_vma" and "p_vaddr". Fix
1269 call of target_read_memory.
1270 * elflink.c (elf_fixup_link_order): Fix scope of "s" local. Fix
1271 calculation of "offset" and "output_offset".
1272 (bfd_elf_final_link): New local "opb". Fix calculation of "size"
1273 from "offset" and fix calculation of "end" from "vma+size". Fix
1274 comparison between "sh_addr" and "vma"/"output_offset".
1275 (bfd_elf_discard_info): Fix calculation of "eh_alignment".
1276 * elf-bfd.h (struct elf_link_hash_table): Add unit to tls_size
1277 member.
1278 * elf.c (_bfd_elf_map_sections_to_segments): Add unit (bytes/
1279 octets) to "wrap_to2 and "phdr_size" locals. Fix calculation of
1280 "wrap_to" value. Add unit (bytes) to phdr_lma variable. Fix
1281 assignment of p_paddr from phdr_lma. Fix comparison between
1282 "lma+size" and "next->lma".
1283 (elf_sort_segments): Fix assignment from p_paddr to lma.
1284 (assign_file_positions_for_load_sections): Add unit (bytes) to
1285 local "align". Fix calculation of local "off_adjust". Fix
1286 calculation of local "filehdr_vaddr".
1287 (assign_file_positions_for_non_load_sections): New local "opb".
1288 Fix calculation of "end" from "p_size". Fix comparison between
1289 "vma+SECTION_SIZE" and "start". Fix calculation of "p_memsz"
1290 from "end" and "p_vaddr".
1291 (rewrite_elf_program_header): Fix comparison between p_vaddr and
1292 vma. Fix assignment to p_paddr from lma. Fix comparison between
1293 p_paddr and lma. Fix assignment to p_paddr from lma.
1294 * merge.c (sec_merge_emit): New local "opb". Convert
1295 "alignment_power" to octets.
1296 (_bfd_add_merge_section): New locals "alignment_power" and
1297 "opb". Fix comparison between "alignment_power" and
1298 "sizeof(align)".
1299 (_bfd_merge_sections): New local "opb". Divide size by opb
1300 before checking align mask.
1301
1302 2020-03-13 Christian Eggers <ceggers@gmx.de>
1303
1304 * elf.c (_bfd_elf_make_section_from_shdr): Introduce new temp
1305 opb. Divide Elf_Internal_Shdr::sh_addr by opb when setting
1306 section LMA/VMA.
1307 (_bfd_elf_make_section_from_phdr): Similarly.
1308 (elf_fake_sections): Fix calculation of
1309 Elf_Internal_shdr::sh_addr from section VMA.
1310 (_bfd_elf_map_sections_to_segments): Fix mixup between octets
1311 and bytes.
1312 (assign_file_positions_for_load_sections): Fix calculations of
1313 Elf_Internal_shdr::p_vaddr and p_paddr from section LMA/VMA. Fix
1314 comparison between program header address and section LMA.
1315 (assign_file_positions_for_non_load_sections): Likewise.
1316 (rewrite_elf_program_header): Likewise. Introduce new temp opb.
1317 (IS_CONTAINED_BY_VMA): Add parameter opb.
1318 (IS_CONTAINED_BY_LMA,IS_SECTION_IN_INPUT_SEGMENT,
1319 INCLUDE_SECTION_IN_SEGMENT): Likewise.
1320 (copy_elf_program_header): Update call to ELF_SECTION_IN_SEGMENT.
1321 Fix calculations of p_addr_valid and p_vaddr_offset.
1322 * elflink.c (elf_link_add_object_symbols): Multiply section VMA
1323 with octets per byte when comparing against p_vaddr.
1324
1325 2020-03-11 Alan Modra <amodra@gmail.com>
1326
1327 * som.c (setup_sections): Sanity check subspace.name.
1328
1329 2020-03-11 Alan Modra <amodra@gmail.com>
1330
1331 * elf64-ppc.c (ppc64_elf_inline_plt): Do increment rel in for loop.
1332
1333 2020-03-10 Alan Modra <amodra@gmail.com>
1334
1335 PR 25648
1336 * ihex.c (ihex_write_object_contents): Don't assume ordering of
1337 addresses here.
1338
1339 2020-03-09 Alan Modra <amodra@gmail.com>
1340
1341 * wasm-module.c (wasm_scan): Sanity check file name length
1342 before allocating memory. Move common section setup code. Do
1343 without bfd_tell to calculate section size.
1344
1345 2020-03-06 Nick Clifton <nickc@redhat.com>
1346
1347 * elf.c (_bfd_elf_set_section_contents): Replace call to abort
1348 with error messages and failure return values.
1349
1350 2020-03-05 Max Filippov <jcmvbkbc@gmail.com>
1351
1352 * elf32-xtensa.c (shrink_dynamic_reloc_sections): Shrink dynamic
1353 relocation sections for any removed reference to a dynamic symbol.
1354
1355 2020-03-05 Nick Clifton <nickc@redhat.com>
1356
1357 * elf-bfd.h (struct elf_backend_data): Add new fields:
1358 init_secondary_reloc_section, slurp_secondary_reloc_section,
1359 write_secondary_reloc_section.
1360 (_bfd_elf_init_secondary_reloc_section): Prototype.
1361 (_bfd_elf_slurp_secondary_reloc_section): Prototype.
1362 (_bfd_elf_write_secondary_reloc_section): Prototype.
1363 * elf.c ( bfd_section_from_shdr): Invoke the new
1364 init_secondary_reloc_section backend function, if defined, when a
1365 second reloc section is encountered.
1366 (swap_out_syms): Invoke the new symbol_section_index function, if
1367 defined, when computing the section index of an OS/PROC specific
1368 symbol.
1369 (_bfd_elf_init_secondary_reloc_section): New function.
1370 (_bfd_elf_slurp_secondary_reloc_section): New function.
1371 (_bfd_elf_write_secondary_reloc_section): New function.
1372 (_bfd_elf_copy_special_section_fields): New function.
1373 * elfcode.h (elf_write_relocs): Invoke the new
1374 write_secondary_relocs function, if defined, in order to emit
1375 secondary relocs.
1376 (elf_slurp_reloc_table): Invoke the new slurp_secondary_relocs
1377 function, if defined, in order to read in secondary relocs.
1378 * elfxx-target.h (elf_backend_copy_special_section_fields):
1379 Provide a non-NULL default definition.
1380 (elf_backend_init_secondary_reloc_section): Likewise.
1381 (elf_backend_slurp_secondary_reloc_section): Likewise.
1382 (elf_backend_write_secondary_reloc_section): Likewise.
1383 (struct elf_backend_data elfNN_bed): Add initialisers for the new
1384 fields.
1385 * configure.ac (score_elf32_[bl]e_vec): Add elf64.lo
1386 * configure: Regenerate.
1387
1388 2020-03-05 Alan Modra <amodra@gmail.com>
1389
1390 * archive64.c (_bfd_archive_64_bit_slurp_armap): Check parsed_size
1391 against file size before allocating memory. Use bfd_alloc rather
1392 than bfd_zalloc for carsym/strings memory.
1393
1394 2020-03-04 Alan Modra <amodra@gmail.com>
1395
1396 * elf.c (elf_fake_sections): Ensure sh_addralign is such that
1397 sh_addr mod sh_addalign is zero.
1398
1399 2020-03-04 Alan Modra <amodra@gmail.com>
1400
1401 * format.c (bfd_check_format_matches): Call cleanup on error exit.
1402
1403 2020-03-03 Alan Modra <amodra@gmail.com>
1404
1405 * format.c (struct bfd_preserve): Add cleanup field.
1406 (bfd_preserve_save): Add cleanup param and save.
1407 (bfd_preserve_restore): Return cleanup.
1408 (bfd_preserve_finish): Call the cleanup for the discarded match.
1409 (bfd_check_format_matches): Pass cleanup to bfd_preserve_save,
1410 and clear when preserving a match. Restore cleanup too when
1411 restoring that match.
1412
1413 2020-03-02 Alan Modra <amodra@gmail.com>
1414
1415 * cisco-core.c (cisco_core_file_p): Return bfd_cleanup.
1416 * hpux-core.c (hpux_core_core_file_p): Update prototype.
1417 * sco5-core.c (sco5_core_file_p): Return bfd_cleanup.
1418 (core_sco5_vec): Correct initialisers.
1419
1420 2020-03-02 Alan Modra <amodra@gmail.com>
1421
1422 * aix386-core.c (aix386_core_file_p): Return bfd_cleanup.
1423 * aix5ppc-core.c (xcoff64_core_p): Likewise.
1424 * cisco-core.c (cisco_core_file_validate): Likewise.
1425 * hppabsd-core.c (hppabsd_core_core_file_p): Likewise.
1426 * hpux-core.c (hpux_core_core_file_p): Likewise.
1427 * irix-core.c (irix_core_core_file_p): Likewise.
1428 * lynx-core.c (lynx_core_file_p): Likewise.
1429 * netbsd-core.c (netbsd_core_file_p): Likewise.
1430 * osf-core.c (osf_core_core_file_p): Likewise.
1431 * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
1432 * sco5-core.c (sco5_core_file_p): Likewise.
1433
1434 2020-03-02 H.J. Lu <hongjiu.lu@intel.com>
1435
1436 * trad-core.c (trad_unix_core_file_p): Return bfd_cleanup.
1437
1438 2020-03-02 Alan Modra <amodra@gmail.com>
1439
1440 * targets.c (bfd_cleanup): New typedef.
1441 (struct bfd <_bfd_check_format>): Return a bfd_cleanup.
1442 * libbfd-in.h (_bfd_no_cleanup): Define.
1443 * format.c (bfd_reinit): Add cleanup parameter, call it.
1444 (bfd_check_format_matches): Set cleanup from _bfd_check_format
1445 call and pass to bfd_reinit. Delete temp, use abfd->xvec instead.
1446 * aout-target.h (callback, object_p): Return bfd_cleanup.
1447 * aout-tic30.c (tic30_aout_callback, tic30_aout_object_p): Likewise.
1448 * archive.c (bfd_generic_archive_p): Likewise.
1449 * binary.c (binary_object_p): Likewise.
1450 * coff-alpha.c (alpha_ecoff_object_p): Likewise.
1451 * coff-ia64.c (ia64coff_object_p): Likewise.
1452 * coff-rs6000.c (_bfd_xcoff_archive_p, rs6000coff_core_p): Likewise.
1453 * coff-sh.c (coff_small_object_p): Likewise.
1454 * coff-stgo32.c (go32_check_format): Likewise.
1455 * coff64-rs6000.c (xcoff64_archive_p, rs6000coff_core_p),
1456 (xcoff64_core_p): Likewise.
1457 * coffgen.c (coff_real_object_p, coff_object_p): Likewise.
1458 * elf-bfd.h (bfd_elf32_object_p, bfd_elf32_core_file_p),
1459 (bfd_elf64_object_p, bfd_elf64_core_file_p): Likewise.
1460 * elfcode.h (elf_object_p): Likewise.
1461 * elfcore.h (elf_core_file_p): Likewise.
1462 * i386msdos.c (msdos_object_p): Likewise.
1463 * ihex.c (ihex_object_p): Likewise.
1464 * libaout.h (some_aout_object_p): Likewise.
1465 * libbfd-in.h (bfd_generic_archive_p, _bfd_dummy_target),
1466 (_bfd_vms_lib_alpha_archive_p, _bfd_vms_lib_ia64_archive_p): Likewise.
1467 * libbfd.c (_bfd_dummy_target): Likewise.
1468 * libcoff-in.h (coff_object_p): Likewise.
1469 * mach-o-aarch64.c (bfd_mach_o_arm64_object_p),
1470 (bfd_mach_o_arm64_core_p): Likewise.
1471 * mach-o-arm.c (bfd_mach_o_arm_object_p),
1472 (bfd_mach_o_arm_core_p): Likewise.
1473 * mach-o-i386.c (bfd_mach_o_i386_object_p),
1474 (bfd_mach_o_i386_core_p): Likewise.
1475 * mach-o-x86-64.c (bfd_mach_o_x86_64_object_p),
1476 (bfd_mach_o_x86_64_core_p): Likewise.
1477 * mach-o.c (bfd_mach_o_header_p, bfd_mach_o_gen_object_p),
1478 (bfd_mach_o_gen_core_p, bfd_mach_o_fat_archive_p): Likewise.
1479 * mach-o.h (bfd_mach_o_object_p, bfd_mach_o_core_p),
1480 (bfd_mach_o_fat_archive_p, bfd_mach_o_header_p): Likewise.
1481 * mmo.c (mmo_object_p): Likewise.
1482 * pef.c (bfd_pef_object_p, bfd_pef_xlib_object_p): Likewise.
1483 * peicode.h (coff_real_object_p, pe_ILF_object_p),
1484 (pe_bfd_object_p): Likewise.
1485 * plugin.c (ld_plugin_object_p, bfd_plugin_object_p): Likewise.
1486 * ppcboot.c (ppcboot_object_p): Likewise.
1487 * rs6000-core.c (rs6000coff_core_p): Likewise.
1488 * som.c (som_object_setup, som_object_p): Likewise.
1489 * srec.c (srec_object_p, symbolsrec_object_p): Likewise.
1490 * tekhex.c (tekhex_object_p): Likewise.
1491 * vms-alpha.c (alpha_vms_object_p): Likewise.
1492 * vms-lib.c (_bfd_vms_lib_archive_p, _bfd_vms_lib_alpha_archive_p),
1493 (_bfd_vms_lib_ia64_archive_p, _bfd_vms_lib_txt_archive_p): Likewise.
1494 * wasm-module.c (wasm_object_p): Likewise.
1495 * xsym.c (bfd_sym_object_p): Likewise.
1496 * xsym.h (bfd_sym_object_p): Likewise.
1497 * aoutx.h (some_aout_object_p): Likewise, and callback parameter
1498 return type.
1499 * pdp11.c (some_aout_object_p): Likewise.
1500 * plugin.c (register_ld_plugin_object_p): Update object_p
1501 parameter type.
1502 * plugin.h (register_ld_plugin_object_p): Likewise.
1503 * bfd-in2.h: Regenerate.
1504 * libbfd.h: Regenerate.
1505 * libcoff.h: Regenerate.
1506
1507 2020-03-02 Alan Modra <amodra@gmail.com>
1508
1509 * coff-alpha.c (alpha_ecoff_le_vec): Add SEC_SMALL_DATA to
1510 applicable section flags.
1511 * coff-mips.c (mips_ecoff_le_vec, mips_ecoff_be_vec): Likewise.
1512 (mips_ecoff_bele_vec): Likewise.
1513 * coffcode.h (sec_to_styp_flags): Set SEC_SMALL_DATA for .sdata
1514 and .sbss sections.
1515 * ecoff.c (_bfd_ecoff_new_section_hook): Likewise.
1516 (_bfd_ecoff_styp_to_sec_flags): Likewise.
1517
1518 2020-03-02 Alan Modra <amodra@gmail.com>
1519
1520 * elf32-m32r.c (m32r_elf_section_flags): New function.
1521 (elf_backend_section_flags): Define.
1522 * elf32-nds32.c (nds32_elf_section_flags): New function.
1523 (elf_backend_section_flags): Define.
1524 * elf32-ppc.c (ppc_elf_section_from_shdr): Set SEC_SMALL_DATA for
1525 .sbss and .sdata sections.
1526 * elf32-v850.c (v850_elf_section_from_shdr): Set SEC_SMALL_DATA
1527 for SHF_V850_GPREL sections.
1528 * elf64-alpha.c (elf64_alpha_section_from_shdr): Delete outdated
1529 FIXME.
1530 * elf64-hppa.c (elf64_hppa_section_from_shdr): Set SEC_SMALL_DATA
1531 for SHF_PARISC_SHORT sections.
1532 * elf64-ppc.c (ppc64_elf_section_flags): New function.
1533 (elf_backend_section_flags): Define.
1534 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Set SEC_SMALL_DATA
1535 for SHF_MIPS_GPREL sections. Delete FIXME.
1536
1537 2020-03-02 Alan Modra <amodra@gmail.com>
1538
1539 * elf-bfd.h (elf_backend_section_flags): Remove flagword* param.
1540 * elf.c (_bfd_elf_make_section_from_shdr): Set section flags before
1541 calling elf_backend_section_flags with adjusted params. Use
1542 newsect->flags past that point.
1543 (_bfd_elf_new_section_hook): Always set sh_type and sh_flags for
1544 special sections.
1545 (_bfd_elf_init_private_section_data): Allow normal sh_type sections
1546 to have their type overridden, and all sh_flags but processor and
1547 os specific.
1548 * elf32-arm.c (elf32_arm_section_flags): Adjust for changed params.
1549 * elf32-mep.c (mep_elf_section_flags): Likewise.
1550 * elf32-nios2.c (nios2_elf32_section_flags): Likewise.
1551 * elf64-alpha.c (elf64_alpha_section_flags): Likewise.
1552 * elf64-ia64-vms.c (elf64_ia64_section_flags): Likewise.
1553 * elfnn-ia64.c (elfNN_ia64_section_flags): Likewise.
1554 * elfnn-aarch64.c (elfNN_aarch64_size_stubs): Exclude the linker
1555 stub BFD and non-aarch64 input files when scanning for stubs.
1556
1557 2020-03-02 Alan Modra <amodra@gmail.com>
1558
1559 * coff-alpha.c (alpha_ecoff_get_elt_at_filepos): Provide an upper
1560 limit to decompressed element size.
1561
1562 2020-03-02 Alan Modra <amodra@gmail.com>
1563
1564 * vms-lib.c (vms_traverse_index): Add recur_count param and
1565 update calls. Fail on excessive recursion.
1566
1567 2020-03-02 Alan Modra <amodra@gmail.com>
1568
1569 * vms-alpha.c (vms_get_remaining_object_record): Use
1570 bfd_realloc_or_free rather than bfd_realloc.
1571 (add_symbol_entry, vector_grow1, alpha_vms_slurp_relocs): Likewise.
1572 (dst_define_location, parse_module): Likewise, and check realloc
1573 return status before using memory. Return status from function
1574 adjusting all callers.
1575
1576 2020-02-28 Alan Modra <amodra@gmail.com>
1577
1578 * vms-lib.c (_bfd_vms_lib_archive_p): Free memory on error paths.
1579
1580 2020-02-28 Alan Modra <amodra@gmail.com>
1581
1582 * vms-alpha.c (alpha_vms_object_p): Use _bfd_malloc_and_read.
1583 Remove duplicate undersize check.
1584
1585 2020-02-27 Alan Modra <amodra@gmail.com>
1586
1587 PR 24511
1588 * mmo.c (mmo_scan): Set SEC_DATA for .data.
1589
1590 2020-02-27 Alan Modra <amodra@gmail.com>
1591
1592 PR 24511
1593 * syms.c (stt): Trim off all but 'e', 'i' and 'p' entries.
1594 (coff_section_type): Adjust comment.
1595 (decode_section_type): Likewise. Call coff_section_type before
1596 decode_section_type.
1597 (bfd_decode_symclass): Use 'c' for common sections other than
1598 the standard one.
1599
1600 2020-02-27 Alan Modra <amodra@gmail.com>
1601
1602 * coff-rs6000.c (_bfd_xcoff_read_ar_hdr): Put all data in one
1603 malloc'd block.
1604
1605 2020-02-27 Alan Modra <amodra@gmail.com>
1606
1607 * bfd.c (bfd_stat_arch_elt): Use vector of containing archive,
1608 if file is an archive element.
1609 * bfd-in2.h: Regenerate.
1610
1611 2020-02-26 Alan Modra <amodra@gmail.com>
1612
1613 * archive.c (do_slurp_bsd_armap): Increase minimum parsed_size, and
1614 bfd_set_error on failing test. Don't bother changing bfd_error on
1615 file read error. Check symdef_count is multiple of BSD_SYMDEF_SIZE.
1616 Check sym name is within string buffer. Use size_t for some vars.
1617 (do_slurp_coff_armap): Use size_t for some variables, fix size of
1618 int_buf. Don't change bfd_error on file read error. Use
1619 _bfd_mul_overflow when calculating carsym buffer size. Reorder
1620 calculations to catch overflows before they occur. malloc and
1621 free raw armap rather than using bfd_alloc. Read raw armap before
1622 allocating carsym+strings buffer.
1623 (_bfd_slurp_extended_name_table): Localize variables. Check
1624 name size against file size.
1625
1626 2020-02-26 Alan Modra <amodra@gmail.com>
1627
1628 * vms-lib.c (vms_lib_read_index): Release correct buffer.
1629
1630 2020-02-26 Alan Modra <amodra@gmail.com>
1631
1632 * elf32-rx.c (rx_elf_relocate_section): Use bfd_malloc rather than
1633 malloc. Check for NULL return from bfd_malloc.
1634 (rx_table_find, rx_table_map): Likewise.
1635 (rx_set_section_contents): Check bfd_alloc return.
1636 (rx_dump_symtab): Don't alloc internal_syms or external_syms.
1637
1638 2020-02-26 Alan Modra <amodra@gmail.com>
1639
1640 * aoutx.h: Indent labels correctly. Format error strings.
1641 * archive.c: Likewise.
1642 * archive64.c: Likewise.
1643 * coff-arm.c: Likewise.
1644 * coff-rs6000.c: Likewise.
1645 * coff-stgo32.c: Likewise.
1646 * cpu-arm.c: Likewise.
1647 * dwarf2.c: Likewise.
1648 * elf-ifunc.c: Likewise.
1649 * elf-properties.c: Likewise.
1650 * elf-s390-common.c: Likewise.
1651 * elf-strtab.c: Likewise.
1652 * elf.c: Likewise.
1653 * elf32-arm.c: Likewise.
1654 * elf32-bfin.c: Likewise.
1655 * elf32-cr16.c: Likewise.
1656 * elf32-csky.c: Likewise.
1657 * elf32-i386.c: Likewise.
1658 * elf32-m68k.c: Likewise.
1659 * elf32-msp430.c: Likewise.
1660 * elf32-nds32.c: Likewise.
1661 * elf32-nios2.c: Likewise.
1662 * elf32-pru.c: Likewise.
1663 * elf32-xtensa.c: Likewise.
1664 * elf64-ia64-vms.c: Likewise.
1665 * elf64-x86-64.c: Likewise.
1666 * elfcode.h: Likewise.
1667 * elfcore.h: Likewise.
1668 * elflink.c: Likewise.
1669 * elfnn-aarch64.c: Likewise.
1670 * elfnn-ia64.c: Likewise.
1671 * elfnn-riscv.c: Likewise.
1672 * elfxx-mips.c: Likewise.
1673 * elfxx-sparc.c: Likewise.
1674 * elfxx-x86.c: Likewise.
1675 * i386lynx.c: Likewise.
1676 * merge.c: Likewise.
1677 * pdp11.c: Likewise.
1678 * plugin.c: Likewise.
1679 * reloc.c: Likewise.
1680
1681 2020-02-26 Alan Modra <amodra@gmail.com>
1682
1683 PR 25593
1684 * elf-bfd.h (struct elf_link_hash_table): Rename "loaded" to
1685 "dyn_loaded".
1686 (bfd_elf_add_dt_needed_tag): Declare.
1687 * elf-strtab.c (_bfd_elf_strtab_restore): Handle NULL buf.
1688 * elflink.c (bfd_elf_add_dt_needed_tag): Make global and rename
1689 from elf_add_dt_needed_tag. Remove soname and doit param.
1690 (elf_link_add_object_symbols): Don't use elf_add_dt_needed_tag
1691 to see whether as-needed lib is already loaded, use dyn_loaded
1692 list instead. When saving and restoring around as-needed lib
1693 handle possibility that dynstr has not been initialised. Don't
1694 add DT_NEEDED tags here. Limit dyn_loaded list to dynamic libs.
1695 Mark libs loaded via DT_NEEDED entries of other libs with
1696 DYN_NO_NEEDED if they should not be mentioned in DT_NEEDED of
1697 the output.
1698 (elf_link_check_versioned_symbol): Remove now unneccesary
1699 DYNAMIC check when traversing dyn_loaded list.
1700
1701 2020-02-26 Alan Modra <amodra@gmail.com>
1702
1703 * bfdio.c (bfd_get_file_size): Ignore bogus archive element sizes.
1704
1705 2020-02-25 H.J. Lu <hongjiu.lu@intel.com>
1706
1707 PR binutils/25584
1708 * plugin.c (need_lto_wrapper_p): New.
1709 (bfd_plugin_set_program_name): Add an int argument to set
1710 need_lto_wrapper_p.
1711 (get_lto_wrapper): Return FALSE if need_lto_wrapper_p isn't
1712 set.
1713 * plugin.h (bfd_plugin_set_program_name): Add an int argument.
1714
1715 2020-02-24 Alan Modra <amodra@gmail.com>
1716
1717 * vms-lib.c (_bfd_vms_lib_archive_p): Correct overflow checks.
1718
1719 2020-02-24 Alan Modra <amodra@gmail.com>
1720
1721 * vms-lib.c (struct carsym_mem): Add limit.
1722 (vms_add_index): Heed limit.
1723 (vms_traverse_index): Catch buffer overflows. Remove outdated fixme.
1724 (vms_lib_read_index): Set up limit. Catch 32-bit overflow.
1725 Always return actual number read.
1726 (_bfd_vms_lib_archive_p): Catch buffer overflows. Replace
1727 assertion with error exit.
1728
1729 2020-02-22 Alan Modra <amodra@gmail.com>
1730
1731 PR 25585
1732 * elf.c (assign_file_positions_for_load_sections): Continue linking
1733 on "PHDR segment not covered by LOAD segment" errors.
1734
1735 2020-02-21 Alan Modra <amodra@gmail.com>
1736
1737 * mach-o.c (bfd_mach_o_canonicalize_relocs): Fix ineffective
1738 overflow check.
1739 (bfd_mach_o_canonicalize_reloc): Likewise.
1740 (bfd_mach_o_canonicalize_dynamic_reloc): Likewise. Sanity check
1741 counts and offsets against file size.
1742 (bfd_mach_o_build_dysymtab): Fix ineffective overflow check.
1743 (bfd_mach_o_mangle_sections): Remove unnecessary overflow check.
1744 (bfd_mach_o_read_symtab_symbols): Sanity check count and offset
1745 against file size. Delete symbol table error message.
1746 (bfd_mach_o_read_dysymtab): Sanity check counts and offsets
1747 against file size.
1748 (bfd_mach_o_read_symtab): Likewise.
1749 (bfd_mach_o_read_command): Pass file size.
1750 (bfd_mach_o_scan): Sanity check command count against file size.
1751
1752 2020-02-21 Alan Modra <amodra@gmail.com>
1753
1754 PR 25569
1755 * aoutx.h (adjust_o_magic, adjust_z_magic, adjust_n_magic): Use
1756 "text", "data" and "bss" section pointer vars. Don't update
1757 section size, just exec header sizes.
1758 (adjust_sizes_and_vmas): Don't update text section size. Set
1759 initial exec header a_text. Print exec headers sizes.
1760 * pdp11.c (adjust_o_magic, adjust_z_magic, adjust_n_magic),
1761 (adjust_sizes_and_vmas): Similarly. Formatting.
1762 (final_link): Correct final file extension.
1763
1764 2020-02-20 Nick Clifton <nickc@redhat.com>
1765
1766 * elf-bfd.h (struct elf_backend_data): Add symbol_section_index
1767 callback.
1768 * elfxx-target.h (elf_backend_symbol_section_index): Provide
1769 default definition.
1770 (elfNN_bed): Initialise the symbol_section_index field.
1771 * elf.c (swap_out_syms): Call symbol_section_index, if defined, on
1772 OS and PROC specific section indicies. Warn if converting other
1773 reserved incidies to SHN_ABS.
1774
1775 2020-02-19 Sergey Belyashov <sergey.belyashov@gmail.com>
1776
1777 PR 25537
1778 * cpu-z80.c: Add machine type compatibility checking.
1779
1780 2020-02-19 H.J. Lu <hongjiu.lu@intel.com>
1781
1782 PR binutils/25355
1783 * plugin.c (plugin_list_entry): Remove handle.
1784 (try_load_plugin): Call dlclose before return.
1785
1786 2020-02-19 Alan Modra <amodra@gmail.com>
1787
1788 * libbfd-in.h (_bfd_constant_p): Define.
1789 (_bfd_alloc_and_read, _bfd_malloc_and_read): Check read size against
1790 file size before allocating memory.
1791 * coffgen.c (_bfd_coff_get_external_symbols): Remove file size check.
1792 * elf.c (bfd_elf_get_str_section): Likewise.
1793 (_bfd_elf_slurp_version_tables): Likewise.
1794 * libbfd.h: Regenerate.
1795
1796 2020-02-19 Alan Modra <amodra@gmail.com>
1797
1798 * libbfd-in.h (_bfd_alloc_and_read, _bfd_malloc_and_read): New.
1799 * aoutx.h (aout_get_external_symbols): Replace calls to
1800 bfd_[m]alloc and bfd_bread with call to _bfd_[m]alloc_and_read.
1801 (slurp_reloc_table): Likewise.
1802 * archive.c (do_slurp_bsd_armap): Likewise.
1803 (do_slurp_coff_armap): Likewise.
1804 * archive64.c (_bfd_archive_64_bit_slurp_armap): Likewise.
1805 * coff-rs6000.c (_bfd_xcoff_slurp_armap): Likewise.
1806 * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
1807 * coffcode.h (coff_set_arch_mach_hook, buy_and_read): Likewise.
1808 * coffgen.c (coff_real_object_p, coff_object_p, build_debug_section),
1809 (_bfd_coff_get_external_symbols): Likewise.
1810 * ecoff.c (ecoff_slurp_symbolic_header),
1811 (_bfd_ecoff_slurp_symbolic_info, ecoff_slurp_reloc_table),
1812 (_bfd_ecoff_slurp_armap, ecoff_link_add_object_symbols, READ),
1813 (ecoff_indirect_link_order): Likewise.
1814 * elf.c (bfd_elf_get_str_section, setup_group, elf_read_notes),
1815 (_bfd_elf_slurp_version_tables): Likewise.
1816 * elf32-m32c.c (m32c_elf_relax_section): Likewise.
1817 * elf32-rl78.c (rl78_elf_relax_section): Likewise.
1818 * elf32-rx.c (elf32_rx_relax_section): Likewise.
1819 * elf64-alpha.c (READ): Likewise.
1820 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Likewise.
1821 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Likewise.
1822 * elfcode.h (elf_slurp_symbol_table),
1823 (elf_slurp_reloc_table_from_section): Likewise.
1824 * elflink.c (elf_link_add_object_symbols),
1825 (elf_link_check_versioned_symbol): Likewise.
1826 * elfxx-mips.c (READ): Likewise.
1827 * i386lynx.c (slurp_reloc_table): Likewise.
1828 * lynx-core.c (lynx_core_file_p): Likewise.
1829 * mach-o.c (bfd_mach_o_canonicalize_relocs),
1830 (bfd_mach_o_read_symtab_strtab, bfd_mach_o_alloc_and_read),
1831 (bfd_mach_o_read_prebound_dylib, bfd_mach_o_read_dyld_content
1832 * pdp11.c (aout_get_external_symbols, slurp_reloc_table
1833 * pef.c (bfd_pef_print_loader_section, bfd_pef_scan_start_address),
1834 (bfd_pef_parse_symbols): Likewise.
1835 * peicode.h (pe_ILF_object_p, pe_bfd_object_p
1836 * som.c (setup_sections, som_slurp_string_table),
1837 (som_slurp_reloc_table, som_bfd_count_ar_symbols),
1838 (som_bfd_fill_in_ar_symbols): Likewise.
1839 * vms-alpha.c (module_find_nearest_line, evax_bfd_print_dst),
1840 (evax_bfd_print_image): Likewise.
1841 * vms-lib.c (_bfd_vms_lib_archive_p): Likewise.
1842 * wasm-module.c (wasm_scan): Likewise.
1843 * xcofflink.c (xcoff_link_add_symbols): Likewise.
1844 * xsym.c (bfd_sym_read_name_table),
1845 (bfd_sym_print_type_information_table_entry): Likewise.
1846 * libbfd.h: Regenerate.
1847
1848 2020-02-19 Alan Modra <amodra@gmail.com>
1849
1850 * aoutx.h (slurp_reloc_table): Allocate reloc_cache after
1851 reading external relocs.
1852 * ecoff.c (ecoff_slurp_reloc_table): Likewise.
1853 * archive.c (_bfd_write_archive_contents): Don't twiddle bfd_error
1854 after bfd_bread.
1855 * archive64.c (_bfd_archive_64_bit_slurp_armap): Remove unnecessary
1856 bfd_release.
1857 * elf32-m32c.c (m32c_offset_for_reloc): Make shndx_buf a bfd_byte*.
1858 (m32c_elf_relax_section): Likewise.
1859 * elf32-rl78.c (rl78_offset_for_reloc): Likewise.
1860 (rl78_elf_relax_section): Likewise.
1861 * elf32-rx.c (rx_offset_for_reloc): Likewise.
1862 (elf32_rx_relax_section): Likewise.
1863 * mach-o.c (bfd_mach_o_alloc_and_read): Move earlier with better
1864 parameter types and use..
1865 (bfd_mach_o_read_dylinker, bfd_mach_o_read_dylib),
1866 (bfd_mach_o_read_fvmlib, bfd_mach_o_read_str): ..in these functions.
1867 * peicode.h (pe_bfd_object_p): Don't zero the part of opthdr
1868 being read from file, just the extra.
1869 * som.c (som_slurp_symbol_table): Allocate internal symbol buffer
1870 after reading external syms. Free on failure.
1871
1872 2020-02-19 Alan Modra <amodra@gmail.com>
1873
1874 * coffcode.h (buy_and_read, coff_slurp_line_table),
1875 (coff_slurp_symbol_table, coff_slurp_reloc_table): Replace
1876 bfd_[z][m]alloc2 calls with _bfd_mul_overflow followed by the
1877 corresponding bfd_alloc call. Adjust variables to suit.
1878 * coffgen.c (_bfd_coff_get_external_symbols): Likewise.
1879 * ecoff.c (_bfd_ecoff_slurp_symbolic_info),
1880 (_bfd_ecoff_slurp_symbol_table, READ): Likewise.
1881 * elf.c (bfd_elf_get_elf_syms, setup_group, bfd_section_from_shdr),
1882 (swap_out_syms, _bfd_elf_slurp_version_tables): Likewise.
1883 * elf32-m32c.c (m32c_elf_relax_section): Likewise.
1884 * elf32-rl78.c (rl78_elf_relax_section): Likewise.
1885 * elf32-rx.c (elf32_rx_relax_section): Likewise.
1886 * elf64-alpha.c (READ): Likewise.
1887 * elfcode.h (elf_object_p, elf_write_relocs, elf_write_shdrs_and_ehdr),
1888 (elf_slurp_symbol_table, elf_slurp_reloc_table),
1889 (bfd_from_remote_memory): Likewise.
1890 * elfcore.h (core_find_build_id): Likewise.
1891 * elfxx-mips.c (READ): Likewise.
1892 * mach-o.c (bfd_mach_o_mangle_sections),
1893 (bfd_mach_o_read_symtab_symbols, bfd_mach_o_read_thread),
1894 (bfd_mach_o_read_dysymtab, bfd_mach_o_flatten_sections),
1895 (bfd_mach_o_scan, bfd_mach_o_fat_archive_p): Likewise.
1896 * som.c (setup_sections, som_prep_for_fixups)
1897 (som_build_and_write_symbol_table, som_slurp_symbol_table),
1898 (som_slurp_reloc_table, som_bfd_count_ar_symbols),
1899 (som_bfd_fill_in_ar_symbols, som_slurp_armap),
1900 (som_bfd_ar_write_symbol_stuff): Likewise.
1901 * vms-alpha.c (vector_grow1): Likewise.
1902 * vms-lib.c (vms_add_index): Likewise.
1903 * wasm-module.c (wasm_scan_name_function_section): Likewise.
1904 * libbfd.c (bfd_malloc2, bfd_realloc2, bfd_zmalloc2): Delete.
1905 * opncls.c (bfd_alloc2, bfd_zalloc2): Delete.
1906 * libbfd-in.h (bfd_malloc2, bfd_realloc2, bfd_zmalloc2),
1907 (bfd_alloc2, bfd_zalloc2): Delete.
1908 (_bfd_mul_overflow): Define.
1909 * libbfd.h: Regenerate.
1910
1911 2020-02-19 Alan Modra <amodra@gmail.com>
1912
1913 * elf.c (bfd_section_from_shdr): Use bfd_zalloc rather than
1914 bfd_zalloc2.
1915 (assign_section_numbers): Likewise.
1916 (elf_map_symbols): Likewise, and bfd_alloc rather than bfd_alloc2.
1917 (_bfd_elf_map_sections_to_segments): Use bfd_malloc rather than
1918 bfd_malloc2, size_t amt, and unsigned tls_count.
1919 (rewrite_elf_program_header): Use bfd_malloc and size_t amt.
1920 * elflink.c (elf_create_symbuf): Use bfd_malloc.
1921 (elf_output_implib): Use bfd_alloc.
1922
1923 2020-02-19 Alan Modra <amodra@gmail.com>
1924
1925 * bfd.c (struct bfd): Move format and direction to other
1926 bitfields. Add "size".
1927 * bfdio.c (bfd_get_size): Cache size when not writing file.
1928 * opncls.c (bfd_get_debug_link_info_1): Allow for bfd_get_size
1929 returning zero, ie. unknown.
1930 (bfd_get_alt_debug_link_info): Likewise.
1931 * bfd-in2.h: Regenerate.
1932
1933 2020-02-19 Alan Modra <amodra@gmail.com>
1934
1935 * coffgen.c (_bfd_coff_get_external_symbols): Don't call
1936 bfd_get_file_size twice.
1937 (_bfd_coff_read_string_table): Allow for bfd_get_file_size
1938 zero, ie. unknown, return.
1939 * elf-attrs.c (_bfd_elf_parse_attributes): Likewise.
1940 * elfcode.h (elf_swap_shdr_in): Likewise.
1941 (elf_object_p): Don't call bfd_get_file_size twice and correct
1942 file size check.
1943
1944 2020-02-19 Alan Modra <amodra@gmail.com>
1945
1946 * mach-o.c (bfd_mach_o_flatten_sections): Return a bfd_boolean,
1947 FALSE if memory alloc fails. Adjust calls.
1948 * som.c (som_prep_for_fixups): Likewise.
1949 * vms-alpha.c (alpha_vms_add_fixup_lp, alpha_vms_add_fixup_ca),
1950 (alpha_vms_add_fixup_qr, alpha_vms_add_fixup_lr),
1951 (alpha_vms_add_lw_reloc, alpha_vms_add_qw_reloc): Likewise.
1952 * som.c (som_build_and_write_symbol_table): Return via error_return
1953 on seek failure.
1954 * vms-alpha.c (VEC_APPEND): Adjust for vector_grow1 changes.
1955 (VEC_APPEND_EL): Delete.
1956 (vector_grow1): Return pointer to element. Catch overflow.
1957 Return NULL on memory allocation failure.
1958 (alpha_vms_add_fixup_lp): Replace VEC_APPEND_EL with VEC_APPEND.
1959 (alpha_vms_add_fixup_ca): Likewise.
1960 (alpha_vms_link_add_object_symbols): Check VEC_APPEND result
1961 before using.
1962 * elf.c (bfd_section_from_shdr): Check bfd_zalloc2 result.
1963
1964 2020-02-19 Alan Modra <amodra@gmail.com>
1965
1966 * aix386-core.c (aix386_core_file_p): Use size_t for "amt".
1967 * aout-target.h (object_p): Likewise.
1968 * aout-tic30.c (tic30_aout_object_p): Likewise.
1969 * aoutx.h (some_aout_object_p, mkobject, make_empty_symbol),
1970 (emit_stringtab, write_syms, link_hash_table_create),
1971 (aout_link_write_other_symbol): Likewise.
1972 * archive.c (_bfd_generic_mkarchive, bfd_generic_archive_p),
1973 (bfd_ar_hdr_from_filesystem, _bfd_write_archive_contents),
1974 (_bfd_compute_and_write_armap): Likewise.
1975 * archures.c (bfd_arch_list): Likewise.
1976 * bfd.c (bfd_record_phdr): Likewise.
1977 * binary.c (binary_canonicalize_symtab): Likewise.
1978 * cisco-core.c (cisco_core_file_validate): Likewise.
1979 * coff-arm.c (coff_arm_link_hash_table_create, find_thumb_glue),
1980 (find_arm_glue, record_arm_to_thumb_glue),
1981 (record_thumb_to_arm_glue): Likewise.
1982 * coff-ppc.c (ppc_coff_link_hash_table_create, record_toc),
1983 (ppc_allocate_toc_section): Likewise.
1984 * coff-rs6000.c (_bfd_xcoff_mkobject, _bfd_xcoff_archive_p): Likewise.
1985 * coff-sh.c (sh_relax_section): Likewise.
1986 * coff64-rs6000.c (xcoff64_archive_p): Likewise.
1987 * coffcode.h (handle_COMDAT, coff_new_section_hook),
1988 (coff_set_alignment_hook, coff_mkobject),
1989 (coff_compute_section_file_positions): Likewise.
1990 * coffgen.c (coff_make_empty_symbol, coff_bfd_make_debug_symbol),
1991 (coff_find_nearest_line_with_names),
1992 ( bfd_coff_set_symbol_class): Likewise.
1993 * cofflink.c (_bfd_coff_link_hash_table_create),
1994 (_bfd_coff_link_input_bfd): Likewise.
1995 * dwarf1.c (alloc_dwarf1_unit, alloc_dwarf1_func): Likewise.
1996 * dwarf2.c (read_abbrevs, read_attribute_value, add_line_info),
1997 (build_line_info_table, sort_line_sequences),
1998 (line_info_add_include_dir, line_info_add_file_name),
1999 (decode_line_info, scan_unit_for_symbols, parse_comp_unit),
2000 (place_sections, _bfd_dwarf2_slurp_debug_info): Likewise.
2001 * ecoff.c (_bfd_ecoff_mkobject, _bfd_ecoff_make_empty_symbol),
2002 (_bfd_ecoff_find_nearest_line),
2003 (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
2004 * ecofflink.c (bfd_ecoff_debug_init): Likewise.
2005 * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Likewise.
2006 * elf-m10300.c (mn10300_elf_relax_section),
2007 (elf32_mn10300_link_hash_table_create): Likewise.
2008 * elf-strtab.c (_bfd_elf_strtab_init): Likewise.
2009 * elf.c (make_mapping, copy_elf_program_header): Likewise.
2010 * elf32-arm.c (elf32_arm_link_hash_table_create),
2011 (elf32_arm_setup_section_lists, elf32_arm_check_relocs),
2012 (elf32_arm_new_section_hook): Likewise.
2013 * elf32-avr.c (elf_avr_new_section_hook),
2014 (elf32_avr_link_hash_table_create, get_local_syms),
2015 (elf32_avr_setup_section_lists): Likewise.
2016 * elf32-bfin.c (bfinfdpic_elf_link_hash_table_create),
2017 (bfin_link_hash_table_create): Likewise.
2018 * elf32-cr16.c (elf32_cr16_link_hash_table_create): Likewise.
2019 * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
2020 * elf32-csky.c (csky_elf_link_hash_table_create),
2021 (csky_elf_check_relocs, elf32_csky_setup_section_lists): Likewise.
2022 * elf32-frv.c (frvfdpic_elf_link_hash_table_create): Likewise.
2023 * elf32-hppa.c (elf32_hppa_link_hash_table_create),
2024 (elf32_hppa_setup_section_lists, get_local_syms): Likewise.
2025 * elf32-i386.c (elf_i386_check_relocs): Likewise.
2026 * elf32-lm32.c (lm32_elf_link_hash_table_create): Likewise.
2027 * elf32-m32r.c (m32r_elf_link_hash_table_create),
2028 (m32r_elf_check_relocs): Likewise.
2029 * elf32-m68hc1x.c (m68hc11_elf_hash_table_create),
2030 (elf32_m68hc11_setup_section_lists),
2031 (elf32_m68hc11_size_stubs): Likewise.
2032 * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
2033 * elf32-metag.c (elf_metag_link_hash_table_create),
2034 (elf_metag_setup_section_lists): Likewise.
2035 * elf32-microblaze.c (microblaze_elf_link_hash_table_create),
2036 (microblaze_elf_check_relocs): Likewise.
2037 * elf32-nds32.c (nds32_elf_link_hash_table_create),
2038 (nds32_elf_check_relocs): Likewise.
2039 * elf32-nios2.c (nios2_elf32_setup_section_lists),
2040 (get_local_syms, nios2_elf32_check_relocs),
2041 (nios2_elf32_link_hash_table_create): Likewise.
2042 * elf32-or1k.c (or1k_elf_link_hash_table_create),
2043 (or1k_elf_check_relocs): Likewise.
2044 * elf32-ppc.c (ppc_elf_modify_segment_map, update_plt_info): Likewise.
2045 * elf32-pru.c (pru_elf32_link_hash_table_create): Likewise.
2046 * elf32-s390.c (elf_s390_link_hash_table_create),
2047 (elf_s390_check_relocs): Likewise.
2048 * elf32-score.c (score_elf_create_got_section),
2049 (s3_elf32_score_new_section_hook),
2050 (elf32_score_link_hash_table_create): Likewise.
2051 * elf32-score7.c (score_elf_create_got_section),
2052 (s7_elf32_score_new_section_hook): Likewise.
2053 * elf32-sh.c (sh_elf_link_hash_table_create),
2054 (sh_elf_check_relocs): Likewise.
2055 * elf32-tic6x.c (elf32_tic6x_link_hash_table_create),
2056 (elf32_tic6x_new_section_hook, elf32_tic6x_check_relocs): Likewise.
2057 * elf32-tilepro.c (tilepro_elf_link_hash_table_create),
2058 (tilepro_elf_check_relocs): Likewise.
2059 * elf32-v850.c (remember_hi16s_reloc): Likewise.
2060 * elf32-vax.c (elf_vax_link_hash_table_create): Likewise.
2061 * elf32-xtensa.c (elf_xtensa_link_hash_table_create),
2062 (elf_xtensa_new_section_hook): Likewise.
2063 * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create),
2064 (get_got_entry, elf64_alpha_check_relocs): Likewise.
2065 * elf64-hppa.c (elf64_hppa_hash_table_create): Likewise.
2066 * elf64-ia64-vms.c (elf64_ia64_object_p): Likewise.
2067 * elf64-mmix.c (mmix_elf_new_section_hook): Likewise.
2068 * elf64-ppc.c (ppc64_elf_new_section_hook),
2069 (ppc64_elf_link_hash_table_create, update_local_sym_info),
2070 (update_plt_info, ppc64_elf_check_relocs): Likewise.
2071 * elf64-s390.c (elf_s390_link_hash_table_create),
2072 (elf_s390_check_relocs): Likewise.
2073 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
2074 * elflink.c (bfd_elf_link_record_local_dynamic_symbol),
2075 (_bfd_elf_link_find_version_dependencies, elf_link_add_object_symbols),
2076 (elf_link_add_archive_symbols, compute_bucket_count),
2077 (bfd_elf_size_dynsym_hash_dynstr, _bfd_elf_link_hash_table_create),
2078 (bfd_elf_get_bfd_needed_list, elf_link_swap_symbols_out),
2079 (bfd_elf_final_link): Likewise.
2080 * elfnn-aarch64.c (elfNN_aarch64_link_hash_table_create),
2081 (elfNN_aarch64_setup_section_lists, elfNN_aarch64_check_relocs),
2082 (elfNN_aarch64_new_section_hook): Likewise.
2083 * elfnn-ia64.c (elfNN_ia64_object_p): Likewise.
2084 * elfnn-riscv.c (riscv_elf_link_hash_table_create),
2085 (riscv_elf_check_relocs): Likewise.
2086 * elfxx-mips.c (_bfd_mips_elf_new_section_hook),
2087 (_bfd_mips_elf_add_symbol_hook, _bfd_mips_elf_check_relocs),
2088 (_bfd_mips_elf_modify_segment_map, _bfd_mips_elf_set_section_contents),
2089 (_bfd_mips_elf_link_hash_table_create): Likewise.
2090 * elfxx-sparc.c (_bfd_sparc_elf_link_hash_table_create),
2091 (_bfd_sparc_elf_check_relocs),
2092 (_bfd_sparc_elf_new_section_hook): Likewise.
2093 * elfxx-tilegx.c (tilegx_elf_link_hash_table_create),
2094 (tilegx_elf_check_relocs): Likewise.
2095 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Likewise.
2096 * format.c (bfd_check_format_matches): Likewise.
2097 * hash.c (_bfd_stringtab_init): Likewise.
2098 * ihex.c (ihex_scan): Likewise.
2099 * irix-core.c (irix_core_core_file_p): Likewise.
2100 * linker.c (bfd_wrapped_link_hash_lookup),
2101 (_bfd_generic_link_hash_table_create),
2102 (_bfd_generic_reloc_link_order): Likewise.
2103 * lynx-core.c (lynx_core_file_p): Likewise.
2104 * netbsd-core.c (netbsd_core_file_p): Likewise.
2105 * osf-core.c (osf_core_core_file_p): Likewise.
2106 * pdp11.c (some_aout_object_p, mkobject, make_empty_symbol),
2107 (link_hash_table_create, aout_link_write_other_symbol): Likewise.
2108 * peXXigen.c (_bfd_XX_bfd_copy_private_section_data): Likewise.
2109 * peicode.h (pe_mkobject): Likewise.
2110 * ppcboot.c (ppcboot_mkobject, ppcboot_canonicalize_symtab): Likewise.
2111 * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
2112 * sco5-core.c (read_uarea): Likewise.
2113 * som.c (hppa_som_gen_reloc_type, som_object_p, som_prep_headers),
2114 (som_write_fixups, som_write_space_strings, som_write_symbol_strings),
2115 (som_finish_writing, som_canonicalize_symtab, som_new_section_hook),
2116 (som_bfd_copy_private_section_data, bfd_som_set_section_attributes),
2117 (bfd_som_attach_aux_hdr, som_write_armap): Likewise.
2118 * srec.c (srec_scan): Likewise.
2119 * syms.c (_bfd_generic_make_empty_symbol): Likewise.
2120 * targets.c (bfd_target_list): Likewise.
2121 * tekhex.c (first_phase, tekhex_sizeof_headers): Likewise.
2122 * trad-core.c (trad_unix_core_file_p): Likewise.
2123 * vms-alpha.c (vms_initialize, alpha_vms_bfd_link_hash_table_create),
2124 (vms_new_section_hook): Likewise.
2125 * wasm-module.c (wasm_make_empty_symbol): Likewise.
2126 * xcofflink.c (xcoff_get_section_contents),
2127 (_bfd_xcoff_bfd_link_hash_table_create, xcoff_set_import_path),
2128 (xcoff_find_function, bfd_xcoff_link_record_set, xcoff_build_ldsym),
2129 (bfd_xcoff_size_dynamic_sections, xcoff_link_input_bfd): Likewise.
2130
2131 2020-02-19 Alan Modra <amodra@gmail.com>
2132
2133 * elfxx-riscv.c (riscv_multi_letter_ext_valid_p): Don't use C99.
2134
2135 2020-02-13 H.J. Lu <hongjiu.lu@intel.com>
2136
2137 * plugin.c (try_load_plugin): Make plugin_list_iter an argument
2138 and use it if it isn't NULL. Remove has_plugin_p argument. Add
2139 a build_list_p argument. Don't search plugin_list. Short circuit
2140 when building the plugin list.
2141 (has_plugin): Renamed to has_plugin_list.
2142 (bfd_plugin_set_plugin): Don't set has_plugin.
2143 (bfd_plugin_specified_p): Check plugin_list instead.
2144 (build_plugin_list): New function.
2145 (load_plugin): Call build_plugin_list and use plugin_list.
2146
2147 2020-02-11 H.J. Lu <hongjiu.lu@intel.com>
2148
2149 PR binutils/25355
2150 * plugin.c (try_claim): Always clean up for LTO wrapper.
2151 (try_load_plugin): Treat each object as independent. Create a
2152 copy for plugin name.
2153
2154 2020-02-11 Nick Clifton <nickc@redhat.com>
2155
2156 * elf32-msp430.c (msp430_final_link_relocate): Always use longs
2157 for addresses in print statements.
2158 (msp430_elf_relax_delete_bytes): Likewise.
2159 (msp430_elf_relax_add_words): Likewise.
2160 (msp430_elf_relax_section): Likewise.
2161
2162 2020-02-11 H.J. Lu <hongjiu.lu@intel.com>
2163
2164 * plugin.c (add_symbols): Clear plugin_data memory.
2165
2166 2020-02-10 H.J. Lu <hongjiu.lu@intel.com>
2167
2168 PR binutils/25355
2169 * configure.ac (HAVE_EXECUTABLE_SUFFIX): New AC_DEFINE.
2170 (EXECUTABLE_SUFFIX): Likewise.
2171 * config.in: Regenerated.
2172 * configure: Likewise.
2173 * plugin.c (bfd_plugin_close_and_cleanup): Removed.
2174 (plugin_list_entry): Add all_symbols_read, cleanup_handler,
2175 gcc, lto_wrapper, resolution_file, resolution_option, gcc_env,
2176 real_bfd, real_nsyms, real_syms, lto_nsyms and lto_syms.
2177 (get_lto_wrapper): New.
2178 (setup_lto_wrapper_env): Likewise.
2179 (current_plugin): Likewise.
2180 (register_all_symbols_read): Likewise.
2181 (register_cleanup): Likewise.
2182 (get_symbols): Likewise.
2183 (add_input_file): Likewise.
2184 (bfd_plugin_close_and_cleanup): Likewise.
2185 (claim_file): Removed.
2186 (register_claim_file): Set current_plugin->claim_file.
2187 (add_symbols): Make a copy of LTO symbols. Set lto_nsyms and
2188 lto_syms in current_plugin.
2189 (try_claim): Use current_plugin->claim_file. Call LTO plugin
2190 all_symbols_read handler. Copy real symbols to plugin_data.
2191 Call LTO plugin cleanup handler. Clean up for LTO wrapper.
2192 (try_load_plugin): Don't reuse the previous plugin for LTO
2193 wrapper. Set up GCC LTO wrapper if possible. Don't set
2194 plugin_list_iter->claim_file.
2195 (bfd_plugin_canonicalize_symtab): Use real LTO symbols if
2196 possible.
2197 * plugin.h (plugin_data_struct): Add real_bfd, real_nsyms and
2198 real_syms.
2199
2200 2020-02-10 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2201
2202 * elf32-msp430.c (msp430_elf_relax_section): Before relaxing a branch,
2203 check if previous instruction matches a conditional jump inserted
2204 earlier. Invert conditional jump and delete branch in this case.
2205
2206 2020-02-10 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2207
2208 * elf32-msp430.c (msp430_elf_relax_add_two_words): Rename to
2209 msp430_elf_relax_add_words. Support insertion of either one or two
2210 words.
2211 (msp430_elf_relax_section): Catch opcode of 0x3c00 when relocation
2212 needs to be grown. Handle insertion of branch instruction to replace
2213 jump.
2214
2215 2020-02-10 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2216
2217 * elf32-msp430.c (msp430_final_link_relocate): Add printf statements for
2218 debugging relocations.
2219 (msp430_elf_relax_delete_bytes): Likewise.
2220 (msp430_elf_relax_add_two_words): Likewise.
2221 (msp430_elf_relax_section): Likewise.
2222
2223 2020-02-10 Alan Modra <amodra@gmail.com>
2224
2225 * archures.c: Wrap overlong z80 comments.
2226 * bfd-in2.h: Regenerate.
2227
2228 2020-02-07 Sergey Belyashov <sergey.belyashov@gmail.com>
2229
2230 PR 25469
2231 * archures.c: Add GBZ80 and Z80N machine values.
2232 * reloc.c: Add BFD_RELOC_Z80_16_BE.
2233 * coff-z80.c: Add support for new reloc.
2234 * coffcode.h: Add support for new machine values.
2235 * cpu-z80.c: Add support for new machine names.
2236 * elf32-z80.c: Add support for new reloc.
2237 * bfd-in2.h: Regenerate.
2238 * libbfd.h: Regenerate.
2239
2240 2020-02-07 Nick Clifton <nickc@redhat.com>
2241
2242 PR 23932
2243 * elf.c (rewrite_elf_program_header): Do not complain if no
2244 sections are mapped to a segment.
2245
2246 2020-02-06 H.J. Lu <hongjiu.lu@intel.com>
2247
2248 PR ld/25490
2249 * elflink.c (_bfd_elf_gc_mark_extra_sections): Issue an error
2250 for garbage collection on __patchable_function_entries section
2251 without linked-to section.
2252
2253 2020-02-06 H.J. Lu <hongjiu.lu@intel.com>
2254
2255 PR gas/25381
2256 * bfd-in2.h: Regenerated.
2257 * elflink.c (_bfd_elf_gc_mark_extra_sections): Call mark_hook
2258 on section if gc_mark of any of its linked-to sections is set
2259 and don't set gc_mark again.
2260 * section.c (asection): Add linked_to_symbol_name to map_head
2261 union.
2262
2263 2020-02-06 Maciej W. Rozycki <macro@wdc.com>
2264
2265 * elf32-v850.c (v850_elf_relax_section): Fix the index used for
2266 reporting an unrecognized instruction with R_V850_LONGJUMP.
2267
2268 2020-02-05 Alan Modra <amodra@gmail.com>
2269
2270 * elf64-ppc.c (ppc_stub_plt_branch): Match comment with reality.
2271
2272 2020-02-04 Alan Modra <amodra@gmail.com>
2273
2274 * elf32-ppc.c (ppc_elf_relocate_section): After applying
2275 R_PPC_VLE_ADDR20, goto copy_reloc.
2276
2277 2020-02-02 H.J. Lu <hongjiu.lu@intel.com>
2278
2279 * bfd-in2.h: Regenerated.
2280 * section.c (SEC_ASSEMBLER_SECTION_ID): Fix a typo in comments.
2281
2282 2020-02-02 H.J. Lu <hongjiu.lu@intel.com>
2283
2284 PR gas/25380
2285 * bfd-in2.h: Regenerated.
2286 * ecoff.c (bfd_debug_section): Add section_id.
2287 * section.c (bfd_section): Add section_id.
2288 (SEC_ASSEMBLER_SECTION_ID): New.
2289 (BFD_FAKE_SECTION): Add section_id.
2290
2291 2020-02-01 Nick Clifton <nickc@redhat.com>
2292
2293 * config.bfd: Move the c30-aout and tic30-aout targets onto the
2294 obsolete list.
2295
2296 2020-01-31 Sandra Loosemore <sandra@codesourcery.com>
2297
2298 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): DW_EH_PE_datarel
2299 encodings are relative to the GOT on nios2, too.
2300
2301 2020-01-31 Alan Modra <amodra@gmail.com>
2302
2303 * Makefile.am (elf32-target.h, elf64-target.h): Don't use a temp
2304 file. Use $< and $@ in rules.
2305 (elf32-aarch64.c, elf64-aarch64.c): Likewise.
2306 (elf32-ia64.c, elf64-ia64.c): Likewise.
2307 (elf32-riscv.c, elf64-riscv.c): Likewise.
2308 (peigen.c, pepigen.c, pex64igen.c): Likewise.
2309 (elf32-aarch64.c, elf64-aarch64.c): Don't emit $srcdir on #line.
2310 (elf32-riscv.c, elf64-riscv.c): Likewise, and use $(SED).
2311 (elf32-ia64.c, elf64-ia64.c): Do emit #line.
2312 (peigen.c, pepigen.c, pex64igen.c): Likewise.
2313 * Makefile.in: Regenerate.
2314
2315 2020-01-31 Alan Modra <amodra@gmail.com>
2316
2317 PR 4110
2318 * elf.c (setup_group): Don't clear entire section contents,
2319 just the padding after group flags. Release alloc'd memory
2320 after a seek or read failure.
2321
2322 2020-01-16 Jon Turney <jon.turney@dronecode.org.uk>
2323
2324 * peXXigen.c (pe_is_repro): New function.
2325 (_bfd_XX_print_private_bfd_data_common): Note timestamp is
2326 actually a build hash if PE_IMAGE_DEBUG_TYPE_REPRO is present.
2327
2328 2020-01-16 Jon Turney <jon.turney@dronecode.org.uk>
2329
2330 * peXXigen.c (debug_type_names): Add names for new debug data type
2331 values.
2332
2333 2020-01-16 Jon Turney <jon.turney@dronecode.org.uk>
2334
2335 * peXXigen.c (pe_print_debugdata): Fix the iteration variable for
2336 inner loop. Fix a memory leak.
2337
2338 2020-01-30 Alan Modra <amodra@gmail.com>
2339
2340 * coffgen.c (coff_real_object_p): Don't clear obj_coff_keep_syms
2341 or obj_coff_keep_strings here.
2342 (coff_get_normalized_symtab): Free external syms directly.
2343 * xcofflink.c (xcoff_link_input_bfd): Restore obj_coff_keep_syms
2344 on error exit path.
2345
2346 2020-01-27 Jim Wilson <jimw@sifive.com>
2347
2348 * cpu-riscv.c (riscv_scan): New.
2349 (N): Change bfd_default_scan to riscv_scan.
2350
2351 2020-01-27 Andreas Schwab <schwab@suse.de>
2352
2353 * Makefile.am (ALL_MACHINES): Remove cpu-plugin.lo.
2354 (ALL_MACHINES_CFILES): Remove cpu-plugin.c.
2355 * Makefile.in: Regenerate.
2356 * cpu-plugin.c: Remove.
2357 * archures.c (enum bfd_architecture): Remove bfd_arch_plugin.
2358 (bfd_plugin_arch): Remove declaration.
2359 * bfd-in2.h: Regenerate.
2360 * po/SRC-POTFILES.in: Regenerate.
2361
2362 2020-01-27 H.J. Lu <hongjiu.lu@intel.com>
2363 Alan Modra <amodra@gmail.com>
2364
2365 PR ld/25458
2366 * elflink.c (_bfd_elf_gc_mark_rsec): Mark all weak aliases.
2367
2368 2020-01-24 Jim Wilson <jimw@sifive.com>
2369
2370 * elfxx-riscv.c (riscv_get_prefix_class): Format s case like others.
2371 (riscv_parse_prefixed_ext): Fix s extension comment and reword to
2372 avoid over long line.
2373
2374 2020-01-24 Nick Clifton <nickc@redhat.com>
2375
2376 PR 25447
2377 * coffgen.c (_bfd_coff_close_and_cleanup): Do not clear the keep
2378 syms and keep strings flags as these may have been set in order to
2379 prevent a bogus call to free.
2380
2381 2020-01-23 Nick Clifton <nickc@redhat.com>
2382
2383 * po/fr.po: Updated French translation.
2384
2385 2020-01-23 Alan Modra <amodra@gmail.com>
2386
2387 PR 25444
2388 * elf.c (assign_file_positions_for_load_sections): Avoid divide
2389 by zero when p_align is zero.
2390
2391 2020-01-22 Maxim Blinov <maxim.blinov@embecosm.com>
2392
2393 * bfd/elfnn-riscv.c (riscv_skip_prefix): New.
2394 (riscv_prefix_cmp): Likewise.
2395 (riscv_non_std_ext_p): Deleted.
2396 (riscv_std_sv_ext_p): Likewise.
2397 (riscv_non_std_sv_ext_p): Likewise.
2398 (riscv_merge_non_std_and_sv_ext): Rename to...
2399 (riscv_merge_multi_letter_ext): and modified to use riscv_prefix_cmp.
2400 (riscv_merge_arch_attr_info): Replace 3 calls to
2401 riscv_merge_non_std_and_sv_ext with single call to
2402 riscv_merge_multi_letter_ext.
2403 * bfd/elfxx-riscv.c (riscv_parse_std_ext): Break if we
2404 encounter a 'z' prefix.
2405 (riscv_get_prefix_class): New function, return prefix class based
2406 on first few characters of input string.
2407 (riscv_parse_config): New structure to factor out minor differences
2408 in extension class parsing behaviour.
2409 (riscv_parse_sv_or_non_std_ext): Rename to...
2410 (riscv_parse_prefixed_ext): and parameterise with
2411 riscv_parse_config.
2412 (riscv_std_z_ext_strtab, riscv_std_s_ext_strtab): New.
2413 (riscv_multi_letter_ext_valid_p): New.
2414 (riscv_ext_x_valid_p, riscv_ext_z_valid_p, riscv_ext_s_valid_p): New.
2415 (riscv_parse_subset): Delegate all non-single-letter parsing work
2416 to riscv_parse_prefixed_ext.
2417 * bfd/elfxx-riscv.h (riscv_isa_ext_class): New type.
2418 (riscv_get_prefix_class): Declare.
2419
2420 2020-01-22 Alan Modra <amodra@gmail.com>
2421
2422 * elf64-ppc.c (struct ppc_link_hash_table): Add tga_group.
2423 (ppc64_elf_archive_symbol_lookup): Extract __tls_get_addr_opt for
2424 __tls_get_addr_desc.
2425 (ppc64_elf_size_stubs): Add section for linker generated
2426 __tls_get_addr_desc wrapper function. Loop at least once if
2427 generating this function.
2428 (emit_tga_desc, emit_tga_desc_eh_frame): New functions.
2429 (ppc64_elf_build_stubs): Generate __tls_get_addr_desc.
2430
2431 2020-01-22 Alan Modra <amodra@gmail.com>
2432
2433 * elf64-ppc.h (struct ppc64_elf_params): Add no_tls_get_addr_regsave.
2434 * elf64-ppc.c (struct ppc_link_hash_table): Add tga_desc and
2435 tga_desc_fd.
2436 (is_tls_get_addr): Match tga_desc and tga_desc_df too.
2437 (STDU_R1_0R1, ADDI_R1_R1): Define.
2438 (tls_get_addr_prologue, tls_get_addr_epilogue): New functions.
2439 (ppc64_elf_tls_setup): Set up tga_desc and tga_desc_fd. Indirect
2440 tga_desc_fd to opt_fd, and tga_desc to opt. Set
2441 no_tls_get_addr_regsave.
2442 (branch_reloc_hash_match): Add hash3 and hash4.
2443 (ppc64_elf_tls_optimize): Handle tga_desc_fd and tga_desc too.
2444 (ppc64_elf_size_dynamic_sections): Likewise.
2445 (ppc64_elf_relocate_section): Likewise.
2446 (plt_stub_size, build_plt_stub): Likewise. Size regsave
2447 __tls_get_addr stub.
2448 (build_tls_get_addr_stub): Build regsave __tls_get_addr stub and
2449 eh_frame.
2450 (ppc_size_one_stub): Handle tga_desc_fd and tga_desc too. Size
2451 eh_frame for regsave __tls_get_addr.
2452
2453 2020-01-22 Alan Modra <amodra@gmail.com>
2454
2455 * elf64-ppc.c (ppc64_elf_size_stubs): Correct condition under
2456 which __tls_get_addr calls will be eliminated.
2457
2458 2020-01-20 Nick Clifton <nickc@redhat.com>
2459
2460 * po/pt.po: Updates Portuguese translation.
2461 * po/ru.po: Updated Russian translation.
2462 * po/uk.po: Updated Ukranian translation.
2463
2464 2020-01-20 H.J. Lu <hongjiu.lu@intel.com>
2465
2466 PR ld/25416
2467 * elf64-x86-64.c (elf_x86_64_check_tls_transition): Support
2468 "rex leal x@tlsdesc(%rip), %reg" and "call *x@tlsdesc(%eax)" in
2469 X32 mode.
2470 (elf_x86_64_relocate_section): In x32 mode, for GDesc -> LE
2471 transition, relax "rex leal x@tlsdesc(%rip), %reg" to
2472 "rex movl $x@tpoff, %reg", for GDesc -> IE transition, relax
2473 "rex leal x@tlsdesc(%rip), %reg" to
2474 "rex movl x@gottpoff(%rip), %eax". For both transitions, relax
2475 "call *(%eax)" to "nopl (%rax)".
2476
2477 2020-01-20 Alan Modra <amodra@gmail.com>
2478
2479 * elf64-ppc.c (LD_R11_0R3, CMPDI_R11_0, STD_R11_0R1, LD_R11_0R1),
2480 (MTLR_R11): Don't define.
2481 (LD_R0_0R3, CMPDI_R0_0): Define.
2482 (build_tls_get_addr_stub): Don't use r11 in stub.
2483
2484 2020-01-20 Alan Modra <amodra@gmail.com>
2485
2486 * elf64-ppc.c (ppc_elf_hash_entry): New function, use throughout file.
2487 (defined_sym_val, is_tls_get_addr): Likewise.
2488
2489 2020-01-18 Nick Clifton <nickc@redhat.com>
2490
2491 * version.m4 (BFD_VERSION): Set to 2.34.50.
2492 * configure: Regenerate.
2493 * po/bfd.pot: Regenerate.
2494
2495 2020-01-18 Nick Clifton <nickc@redhat.com>
2496
2497 Binutils 2.34 branch created.
2498
2499 2020-01-17 Christian Biesinger <cbiesinger@google.com>
2500
2501 * coff-arm.c: Fix spelling error (seperate).
2502 * elfxx-riscv.c (riscv_parse_sv_or_non_std_ext): Fix spelling
2503 error (seperate).
2504 * sysdep.h (strnlen): Fix spelling error (seperate).
2505
2506 2020-01-15 Lars Brinkhoff <lars@nocrew.org>
2507
2508 PR 20694
2509 * pdp11.c (TARGET_PAGE_SIZE): Set to 8192.
2510
2511 2020-01-15 Alan Modra <amodra@gmail.com>
2512
2513 PR 25384
2514 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Update comment.
2515 (ppc64_elf_adjust_dynamic_symbol): Don't allow .dynbss copies
2516 of function symbols unless dot symbols are present. Do warn
2517 whenever one is created, regardles of whether a PLT entry is
2518 also emitted for the function symbol.
2519
2520 2020-01-14 Alan Modra <amodra@gmail.com>
2521
2522 * som.c (som_bfd_count_ar_symbols): Error when file position
2523 of symbols on chains is not strictly increasing.
2524
2525 2020-01-14 Alan Modra <amodra@gmail.com>
2526
2527 * vms.h (VMS_DEBUG): Define as 0.
2528 * vms-alpha.c (image_write): Move debug output after bounds check.
2529 Tidy bounds check.
2530 (_bfd_vms_slurp_eihd): Warning fix.
2531 (_bfd_vms_slurp_etir): Init variables to avoid bogus warnings.
2532
2533 2020-01-13 Alan Modra <amodra@gmail.com>
2534
2535 * vms-alpha.c (_bfd_vms_slurp_egsd): Ensure minimum size even
2536 for "ignored" records.
2537
2538 2020-01-13 Alan Modra <amodra@gmail.com>
2539
2540 * wasm-module.c (wasm_scan_name_function_section): Formatting.
2541 Delete asect name check. Move asect NULL check to wasm_object_p.
2542 Correct bounds check of sizes against end. Replace uses of
2543 bfd_zalloc with bfd_alloc, zeroing only necessary bytes. Use
2544 just one bfd_release.
2545 (wasm_scan): Don't use malloc/strdup for section names,
2546 bfd_alloc instead. Simplify code prefixing section name.
2547 Formatting. Don't attempt to free memory here..
2548 (wasm_object_p): ..do so here.
2549
2550 2020-01-10 Szabolcs Nagy <szabolcs.nagy@arm.com>
2551
2552 PR ld/22269
2553 * elf32-arm.c (elf32_arm_final_link_relocate): Use
2554 UNDEFWEAK_NO_DYNAMIC_RELOC.
2555 (allocate_dynrelocs_for_symbol): Likewise.
2556
2557 2020-01-10 Tamar Christina <tamar.christina@arm.com>
2558
2559 PR 25210
2560 * elfnn-aarch64.c (_bfd_aarch64_create_stub_section): Remove elfclass.
2561
2562 2020-01-10 Alan Modra <amodra@gmail.com>
2563
2564 * coff-alpha.c (alpha_ecoff_object_p): Calculate size in bfd_size_type.
2565
2566 2020-01-09 Nick Clifton <nickc@redhat.com>
2567
2568 PR 25221
2569 * bfd.c (bfd_convert_section_contents): Check for a compress
2570 header size that is larger than the actual section size.
2571
2572 2020-01-08 Alan Modra <amodra@gmail.com>
2573
2574 PR 25351
2575 * elflink.c (bfd_elf_final_link): Call _bfd_fix_excluded_sec_syms
2576 after removing sections.
2577
2578 2020-01-06 Jim Wilson <jimw@sifive.com>
2579
2580 PR 25205
2581 * elfnn-riscv.c (riscv_elf_relocate_section) <R_RISCV_CALL>: Add
2582 check for !bfd_link_pic (info).
2583 <R_RISCV_CALL_PLT>: Move next to R_RISCV_CALL.
2584 <R_RISCV_JAL>: Add comment.
2585 (_bfd_riscv_relax_section): For plt.offset check, add check for
2586 bfd_link_pic (info). Add comment.
2587
2588 2020-01-06 Alan Modra <amodra@gmail.com>
2589
2590 * format.c (bfd_check_format_matches): Ignore bfd_error on target
2591 match failures. Don't init to bfd_error_wrong_format before
2592 calling _bfd_check_format.
2593
2594 2020-01-06 Alan Modra <amodra@gmail.com>
2595
2596 * vms-alpha.c (_bfd_vms_push, _bfd_vms_pop): Return pass/fail
2597 status rather than exiting on stack overflow or underflow.
2598 (_bfd_vms_slurp_etir): Adjust to suit.
2599
2600 2020-01-06 Alan Modra <amodra@gmail.com>
2601
2602 * som.c (som_bfd_fill_in_ar_symbols): Bounds check som_dict index.
2603
2604 2020-01-06 Alan Modra <amodra@gmail.com>
2605
2606 * mach-o.c (bfd_mach_o_read_dylinker): Don't read past end of
2607 command. Check name offset is within command.
2608 (bfd_mach_o_read_dylib, bfd_mach_o_read_prebound_dylib),
2609 (bfd_mach_o_read_prebind_cksum, bfd_mach_o_read_twolevel_hints),
2610 (bfd_mach_o_read_fvmlib, bfd_mach_o_read_dysymtab),
2611 (bfd_mach_o_read_symtab, bfd_mach_o_read_uuid),
2612 (bfd_mach_o_read_linkedit, bfd_mach_o_read_str),
2613 (bfd_mach_o_read_dyld_info, bfd_mach_o_read_version_min),
2614 (bfd_mach_o_read_encryption_info, bfd_mach_o_read_source_version),
2615 (bfd_mach_o_read_encryption_info_64, bfd_mach_o_read_main),
2616 (bfd_mach_o_read_note, bfd_mach_o_read_build_version),
2617 (bfd_mach_o_read_segment): Similarly.
2618 (bfd_mach_o_read_thread): Properly bound check thread struct.
2619 Don't repeat checks on second loop.
2620 (bfd_mach_o_read_command): Fail on invalid command length.
2621
2622 2020-01-04 Alan Modra <amodra@gmail.com>
2623
2624 * format.c (bfd_check_format_matches): Add preserve_match.
2625 Save initial bfd state in "preserve", matched bfd state in
2626 "preserve_match". Save just the first match. Release
2627 bfd_alloc memory. Restore and finish preserved state as
2628 appropriate on all function exit paths.
2629
2630 2020-01-04 Alan Modra <amodra@gmail.com>
2631
2632 * mmo.c (mmo_mkobject): Allocate tdata with bfd_zalloc.
2633
2634 2020-01-04 Alan Modra <amodra@gmail.com>
2635
2636 * coffgen.c (coff_real_object_p): Free malloc'd memory on target
2637 match too.
2638
2639 2020-01-03 Nick Clifton <nickc@redhat.com>
2640
2641 PR 25307
2642 (bfd_pef_parse_function_stubs): Correct the test that ensures that
2643 there is enough data remaining in the code buffer before
2644 attempting to read a function stub.
2645
2646 2020-01-03 Nick Clifton <nickc@redhat.com>
2647
2648 PR 25308
2649 * elf-properties.c (_bfd_elf_convert_gnu_properties): Check the
2650 return value from bfd_malloc.
2651 * elf32-arm.c (bfd_elf32_arm_vfp11_fix_veneer_locations): Likewise.
2652 (bfd_elf32_arm_stm32l4xx_fix_veneer_locations): Likewise.
2653 (elf32_arm_filter_cmse_symbols): Likewise.
2654 (elf32_arm_write_section): Likewise.
2655 * mach-o.c (bfd_mach_o_core_fetch_environment): Likewise.
2656 (bfd_mach_o_follow_dsym): Likewise.
2657 * pef.c (bfd_pef_print_loader_section): Likewise.
2658 (bfd_pef_scan_start_address): Likewise.
2659 (bfd_pef_parse_function_stubs): Likewise.
2660 (bfd_pef_parse_symbols): Likewise.
2661
2662 2020-01-03 Sergei Trofimovich <siarheit@google.com>
2663
2664 * elfnn-ia64.c (elfNN_ia64_merge_private_bfd_data): don't fail
2665 on binary inputs ld/PR25316.
2666 (is_ia64_elf): new helper to filter on ia64 objects.
2667
2668 2020-01-03 Jan Beulich <jbeulich@suse.com>
2669
2670 * mach-o.c (cpusubtype, bfd_mach_o_header_p): Insert underscore
2671 in parameter names.
2672 (bfd_mach_o_scan): Insert underscore in two variable names.
2673
2674 2020-01-02 Sergey Belyashov <sergey.belyashov@gmail.com>
2675
2676 * Makefile.am: Add z80-elf target support.
2677 * configure.ac: Likewise.
2678 * targets.c: Likewise.
2679 * Makefile.in: Regenerate.
2680 * configure: Regenerate.
2681 * config.bfd: Add z80-elf target support and new arches: ez80 and
2682 z180.
2683 * elf32-z80.c: New file.
2684 * archures.c: Add new z80 architectures: eZ80 and Z180.
2685 * coffcode.h: Likewise.
2686 * cpu-z80.c: Likewise.
2687 * coff-z80.c: Add new relocations for Z80 target and local label
2688 check.
2689 * reloc.c: Add new relocs.
2690 * bfd-in2.h: Regenerate.
2691 * libbfd.h: Regenerate.
2692
2693 2020-01-02 Tamar Christina <tamar.christina@arm.com>
2694
2695 PR 25210
2696 PR 24753
2697 * elfnn-aarch64.c (_bfd_aarch64_create_stub_section): Set ELF class.
2698
2699 2020-01-01 Alan Modra <amodra@gmail.com>
2700
2701 Update year range in copyright notice of all files.
2702
2703 For older changes see ChangeLog-2019
2704 \f
2705 Copyright (C) 2020 Free Software Foundation, Inc.
2706
2707 Copying and distribution of this file, with or without modification,
2708 are permitted in any medium without royalty provided the copyright
2709 notice and this notice are preserved.
2710
2711 Local Variables:
2712 mode: change-log
2713 left-margin: 8
2714 fill-column: 74
2715 version-control: never
2716 End:
This page took 0.105559 seconds and 5 git commands to generate.