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