]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - bfd/ChangeLog
xtensa: allow runtime ABI selection
[thirdparty/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
7a77f1ac
MF
12020-06-15 Max Filippov <jcmvbkbc@gmail.com>
2
3 * elf32-xtensa.c (XSHAL_ABI, XTHAL_ABI_UNDEFINED)
4 (XTHAL_ABI_WINDOWED, XTHAL_ABI_CALL0): New macros.
5 (elf32xtensa_abi): New global variable.
6 (xtensa_abi_choice): New function.
7 (elf_xtensa_create_plt_entry): Use xtensa_abi_choice instead of
8 XSHAL_ABI to select PLT code.
9
cae64165
RM
102020-06-15 Roland McGrath <mcgrathr@google.com>
11
12 * elflink.c (bfd_elf_define_start_stop): Use start_stop_visibility
13 field of bfd_link_info.
14
40be168c
AM
152020-06-15 Alan Modra <amodra@gmail.com>
16
17 * config.bfd: Obsolete powerpcle-*-pe targets.
18
75cfe082
AM
192020-06-15 Alan Modra <amodra@gmail.com>
20
21 PR 26103
22 * elflink.c (elf_link_add_archive_symbols): Exclude undefined
23 symbols that were defined in discarded sections.
24 * cofflink.c (coff_link_check_archive_element): Likewise.
25 (coff_link_add_symbols): Set indx to -3 for symbols defined in
26 discarded sections.
27 (_bfd_coff_write_global_sym): Don't emit such symbols.
28 libcoff-in.h (struct coff_link_hash_entry): Update indx comment.
29 libcoff.h: Regenerate.
30
f0aa3025
AM
312020-06-11 Alan Modra <amodra@gmail.com>
32
33 PR 26107
34 * pdp11.c (is_stab): Replace legacy "index" function with "strchr".
35
447f6d86
L
362020-06-10 H.J. Lu <hongjiu.lu@intel.com>
37
38 * elfnn-ia64.c (elfNN_ia64_link_hash_table): Remove reltext.
39 (allocate_dynrel_entries): Set DF_TEXTREL instead of reltext.
40 (elfNN_ia64_size_dynamic_sections): Check DF_TEXTREL instead
41 of reltext.
42
e1b5d517
L
432020-06-10 H.J. Lu <hongjiu.lu@intel.com>
44
45 PR ld/26094
46 * elflink.c (bfd_elf_define_start_stop): Handle common symbols.
47 Clear verinfo.verdef.
48
cebd6b8a
L
492020-06-09 H.J. Lu <hongjiu.lu@intel.com>
50
51 PR ld/18801
52 * elf-bfd.h (elf_link_hash_table): Add ifunc_resolvers.
53 (_bfd_elf_allocate_ifunc_dyn_relocs): Remove the
54 bfd_boolean * argument. Set ifunc_resolvers if there are IFUNC
55 resolvers.
56 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Updated.
57 Set ifunc_resolvers if there are FUNC resolvers.
58 * elf64-ppc.c (ppc_link_hash_table): Remove local_ifunc_resolver.
59 (build_global_entry_stubs_and_plt): Replace local_ifunc_resolver
60 with elf.ifunc_resolvers.
61 (write_plt_relocs_for_local_syms): Likewise.
62 (ppc64_elf_relocate_section): Likewise.
63 (ppc64_elf_finish_dynamic_sections): Likewise.
64 * elfnn-aarch64.c (elfNN_aarch64_allocate_ifunc_dynrelocs):
65 Updated.
66 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Likewise.
67 (_bfd_x86_elf_size_dynamic_sections): Check elf.ifunc_resolvers
68 instead of readonly_dynrelocs_against_ifunc.
69 * elfxx-x86.h (elf_x86_link_hash_table): Remove
70 readonly_dynrelocs_against_ifunc.
71
efb2a7b4
AM
722020-06-09 Alan Modra <amodra@gmail.com>
73
74 * elf64-ppc.c (struct ppc_link_hash_table): Delete
75 maybe_local_ifunc_resolver field.
76 (build_global_entry_stubs_and_plt): Set local_ifunc_resolver in
77 cases where maybe_local_ifunc_resolver was set.
78 (ppc64_elf_relocate_section): Likewise.
79 (ppc64_elf_finish_dynamic_sections): Downgrade ifunc with textrel
80 error to a warning.
81
9bcc30e4
L
822020-06-08 H.J. Lu <hongjiu.lu@intel.com>
83
84 * elf-bfd.h (elf_link_hash_entry): Add tlsdesc_plt and
85 tlsdesc_got.
86 * elf32-arm.c (elf32_arm_link_hash_table): Remove tlsdesc_plt
87 and dt_tlsdesc_got.
88 (elf32_arm_size_dynamic_sections): Updated. Clear
89 root.tlsdesc_plt for DF_BIND_NOW.
90 (elf32_arm_finish_dynamic_sections): Updated.
91 (elf32_arm_output_arch_local_syms): Likewise.
92 * elf32-nds32.c (nds32_elf_size_dynamic_sections): Updated.
93 Clear root.tlsdesc_plt for DF_BIND_NOW.
94 (nds32_elf_finish_dynamic_sections): Updated.
95 * elf32-nds32.h (elf_nds32_link_hash_table): Remove
96 dt_tlsdesc_plt and dt_tlsdesc_got.
97 * elf64-x86-64.c (elf_x86_64_finish_dynamic_sections): Updated.
98 * elfnn-aarch64.c (elf_aarch64_link_hash_table): Remove
99 tlsdesc_plt and dt_tlsdesc_got.
100 (elfNN_aarch64_allocate_dynrelocs): Updated.
101 (elfNN_aarch64_finish_dynamic_sections): Likewise.
102 (elfNN_aarch64_size_dynamic_sections): Updated. Clear
103 root.tlsdesc_plt for DF_BIND_NOW. Don't check DF_BIND_NOW
104 twice.
105 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Updated.
106 (_bfd_x86_elf_size_dynamic_sections): Likewise.
107 (_bfd_x86_elf_finish_dynamic_sections): Likewise.
108 * elfxx-x86.h (elf_x86_link_hash_table): Remove tlsdesc_plt and
109 tlsdesc_got.
110
845b83d7
L
1112020-06-07 H.J. Lu <hongjiu.lu@intel.com>
112
113 * elf32-tic6x.c (elf32_bed): Defined the default to
114 elf32_tic6x_bed.
115
9b8a8575
L
1162020-06-07 H.J. Lu <hongjiu.lu@intel.com>
117
118 * elf64-hppa.c (elf64_hppa_link_hash_table): Remove plt_sec and
119 plt_rel_sec.
120 (elf64_hppa_check_relocs): Replace plt_sec/plt_rel_sec with
121 root.splt/root.srelplt.
122 (elf64_hppa_create_dynamic_sections): Likewise.
123 (elf64_hppa_size_dynamic_sections): Likewise.
124 (elf64_hppa_finish_dynamic_symbol): Likewise.
125 (elf_hppa_final_link): Likewise.
126 (elf_hppa_final_link_relocate): Likewise.
127
bcab203d
L
1282020-06-06 H.J. Lu <hongjiu.lu@intel.com>
129
130 * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Updated.
131 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Remove
132 is_vxworks.
133
90c14f0c
L
1342020-06-06 H.J. Lu <hongjiu.lu@intel.com>
135
136 * elf-bfd.h (elf_target_os): New.
137 (elf_link_hash_table): Add target_os.
138 (elf_backend_data): Add target_os.
139 * elf32-arm.c (elf32_arm_link_hash_table): Remove vxworks_p,
140 symbian_p and nacl_p.
141 (create_got_section): Updated.
142 (elf32_arm_create_dynamic_sections): Likewise.
143 (arm_type_of_stub): Likewise.
144 (elf32_arm_create_or_find_stub_sec): Likewise.
145 (elf32_arm_allocate_plt_entry): Likewise.
146 (elf32_arm_populate_plt_entry): Likewise.
147 (elf32_arm_final_link_relocate): Likewise.
148 (elf32_arm_check_relocs): Likewise.
149 (allocate_dynrelocs_for_symbol): Likewise.
150 (elf32_arm_finish_dynamic_symbol): Likewise.
151 (elf32_arm_finish_dynamic_sections): Likewise.
152 (elf32_arm_output_plt_map_1): Likewise.
153 (elf32_arm_output_arch_local_syms): Likewise.
154 (elf32_arm_add_symbol_hook): Likewise.
155 (elf32_arm_nacl_link_hash_table_create): Likewise.
156 (elf32_arm_vxworks_link_hash_table_create): Likewise.
157 (elf32_arm_symbian_link_hash_table_create): Likewise.
158 (ELF_TARGET_OS): New.
159 * elf32-i386.c (elf_i386_arch_bed): Removed.
160 (elf_backend_arch_data): Likewise.
161 (elf_i386_solaris_arch_bed): Likewise.
162 (elf_i386_nacl_arch_bed): Likewise.
163 (elf_i386_vxworks_arch_bed): Likewise.
164 (elf_i386_relocate_section): Updated.
165 (elf_i386_finish_dynamic_sections): Likewise.
166 (elf_i386_get_synthetic_symtab): Likewise.
167 (elf_i386_link_setup_gnu_properties): Likewise.
168 (ELF_TARGET_OS): New.
169 * elf32-mips.c (ELF_TARGET_OS): New.
170 * elf32-ppc.c (ppc_elf_link_hash_table): Remove is_vxworks.
171 (ppc_elf_create_got): Updated.
172 (ppc_elf_create_dynamic_sections): Likewise.
173 (ppc_elf_check_relocs): Likewise.
174 (ppc_elf_adjust_dynamic_symbol): Likewise.
175 (ppc_elf_size_dynamic_sections): Likewise.
176 (ppc_elf_relocate_section): Likewise.
177 (ppc_elf_finish_dynamic_sections): Likewise.
178 (ppc_elf_vxworks_link_hash_table_create): Likewise.
179 (ELF_TARGET_OS): New.
180 * elf32-sh.c (elf_sh_link_hash_table): Remove vxworks_p.
181 (sh_elf_link_hash_table_create): Updated.
182 (sh_elf_create_dynamic_sections): Likewise.
183 (allocate_dynrelocs): Likewise.
184 (sh_elf_size_dynamic_sections): Likewise.
185 (sh_elf_relocate_section): Likewise.
186 (sh_elf_finish_dynamic_symbol): Likewise.
187 (sh_elf_finish_dynamic_sections): Likewise.
188 (ELF_TARGET_OS): New.
189 * elf32-sparc.c (elf32_sparc_vxworks_link_hash_table_create):
190 Removed.
191 (bfd_elf32_bfd_link_hash_table_create): Likewise.
192 (ELF_TARGET_OS): New.
193 * elf64-x86-64.c (elf_x86_64_arch_bed): Removed.
194 (elf_x86_64_solaris_arch_bed): Likewise.
195 (elf_x86_64_nacl_arch_bed): Likewise.
196 (elf_x86_64_finish_dynamic_sections): Updated.
197 (elf_x86_64_get_synthetic_symtab): Likewise.
198 (elf_x86_64_link_setup_gnu_properties): Likewise.
199 (ELF_TARGET_OS): New.
200 * elflink.c (_bfd_elf_link_hash_table_init): Initialize
201 target_o.
202 * elfxx-mips.c (mips_elf_link_hash_table): Remove is_vxworks.
203 (MIPS_ELF_REL_DYN_NAME): Updated.
204 (ELF_MIPS_GP_OFFSET): Likewise.
205 (mips_elf_create_local_got_entry): Likewise.
206 (mips_elf_allocate_dynamic_relocations): Likewise.
207 (mips_elf_count_got_symbols): Likewise.
208 (is_gott_symbol): Likewise.
209 (mips_elf_calculate_relocation): Likewise.
210 (mips_elf_create_dynamic_relocation): Likewise.
211 (_bfd_mips_elf_check_relocs): Likewise.
212 (allocate_dynrelocs): Likewise.
213 (_bfd_mips_elf_adjust_dynamic_symbol): Likewise.
214 (mips_elf_lay_out_got): Likewise.
215 (mips_elf_set_plt_sym_value): Likewise.
216 (_bfd_mips_elf_size_dynamic_sections): Likewise.
217 (_bfd_mips_elf_finish_dynamic_symbol): Likewise.
218 (_bfd_mips_elf_finish_dynamic_sections): Likewise.
219 (_bfd_mips_elf_final_link): Likewise.
220 (_bfd_mips_init_file_header): Likewise.
221 * elfxx-sparc.c (_bfd_sparc_elf_create_dynamic_sections):
222 Likewise.
223 (allocate_dynrelocs): Likewise.
224 (_bfd_sparc_elf_size_dynamic_sections): Likewise.
225 (_bfd_sparc_elf_relocate_section): Likewise.
226 (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
227 (sparc_finish_dyn): Likewise.
228 (_bfd_sparc_elf_finish_dynamic_sections): Likewise.
229 * elfxx-target.h (ELF_TARGET_OS): New.
230 (elfNN_bed): Add ELF_TARGET_OS.
231 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Updated.
232 (_bfd_x86_elf_link_hash_table_create): Likewise.
233 (_bfd_x86_elf_size_dynamic_sections): Likewise.
234 (_bfd_x86_elf_finish_dynamic_sections): Likewise.
235 (_bfd_x86_elf_adjust_dynamic_symbol): Likewise.
236 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
237 * elfxx-x86.h (elf_x86_target_os): Removed.
238 (elf_x86_backend_data): Likewise.
239 (get_elf_x86_backend_data): Likewise.
240 (elf_x86_link_hash_table): Remove target_os.
241
87c69f97
AM
2422020-06-06 Alan Modra <amodra@gmail.com>
243
244 * reloc.c: Rename
245 BFD_RELOC_PPC64_GOT_TLSGD34 to BFD_RELOC_PPC64_GOT_TLSGD_PCREL34,
246 BFD_RELOC_PPC64_GOT_TLSLD34 to BFD_RELOC_PPC64_GOT_TLSLD_PCREL34,
247 BFD_RELOC_PPC64_GOT_TPREL34 to BFD_RELOC_PPC64_GOT_TPREL_PCREL34,
248 BFD_RELOC_PPC64_GOT_DTPREL34 to BFD_RELOC_PPC64_GOT_DTPREL_PCREL34.
249 * elf64-ppc.c: Update throughout for reloc renaming.
250 (ppc64_elf_reloc_name_lookup): Handle old reloc names.
251 * libbfd.h: Regenerate.
252 * bfd-in2.h: Regenerate.
253
981f1518
L
2542020-06-05 H.J. Lu <hongjiu.lu@intel.com>
255
8a4ba3a1 256 PR ld/26080
981f1518
L
257 * elf32-bfin.c (bfinfdpic_relocate_section): Skip non SEC_ALLOC
258 section.
259
9c65eeac
NC
2602020-06-05 Nick Clifton <nickc@redhat.com>
261
262 * pdp11.c (aout_link_add_symbols): Fix use before initialisation
263 bug.
264
41285764
NC
2652020-06-05 Nelson Chu <nelson.chu@sifive.com>
266
267 * elfnn-riscv.c (riscv_merge_attributes): Add new boolean
268 priv_may_conflict, in_priv_zero and out_priv_zero to decide
269 whether the object can be linked according to it's priv
270 attributes. The object without any priv spec attributes can
271 be linked with others. If the first input object doesn't contain
272 any priv attributes, then we need to copy the setting from the
273 next input one. Also report more detailed error messages to user.
274
a975c88e
SC
2752020-06-04 Stephen Casner <casner@acm.org>
276
277 Extend pdp11-aout symbol table format to accommodate .stab
278 symbols and implement correct handling of them.
279
280 * pdp11.c (pdp11_external_nlist): Repurposed e_unused to e_desc.
281 (N_STAB, is_stab): Needed new function is_stab to disambiguate
282 normal vs. .stab symbol table type values, replacing N_STAB mask.
283 (translate_from_native_sym_flags): Determine correct section for
284 different .stab types.
285 (translate_to_native_sym_flags): Leave .stab types intact.
286 (translate_symbol_table): Error if symbol indicates overlay;
287 store desc field from .stab symbols.
288 (write_syms): Output desc field with symbol.
289 (aout_link_check_ar_symbols): Skip .stab symbols.
290 (aout_link_add_symbols): Correctly distinguish .stab symbols.
291 (aout_link_write_other_symbol): Write 0 for desk and ovly fields.
292 (aout_link_write_symbols): Write 0 for desk and ovly fields;
293 correctly distinguish .stab symbols and select calculate their
294 section and value; and copy desc and ovly fields from input symbol
295 to output symbol.
296
3b9313c4
SC
2972020-06-04 Stephen Casner <casner@acm.org>
298
299 * aoutx.h (translate_symbol_table): Comment had external and
300 internal swapped.
301 * pdp11.c (translate_symbol_table): Likewise.
302
add5f777
L
3032020-06-04 H.J. Lu <hongjiu.lu@intel.com>
304
305 * elfxx-x86.h (elf_x86_link_hash_table): Remove target_id.
306 (is_x86_elf): Check elf.hash_table_id instead of target_id.
307 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Updated.
308
c4b126b8
L
3092020-06-04 H.J. Lu <hongjiu.lu@intel.com>
310
311 PR ld/26080
312 * elf-m10300.c (mn10300_elf_relocate_section): Resolve relocation
313 in debug section against symbol defined in shared library to 0.
314 * elf32-i386.c (elf_i386_check_relocs): Remove SEC_ALLOC check.
315 * elf32-lm32.c (lm32_elf_check_relocs): Likewise.
316 * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
317 * elf32-nds32.c (nds32_elf_check_relocs): Likewise.
318 * elf32-nios2.c (nios2_elf32_check_relocs): Likewise.
319 * elf32-or1k.c (or1k_elf_check_relocs): Likewise.
320 * elf32-ppc.c (ppc_elf_check_relocs): Likewise.
321 * elf32-sh.c (sh_elf_check_relocs): Likewise.
322 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
323 * elf64-alpha.c (elf64_alpha_check_relocs): Likewise.
324 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
325 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
326 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
327 * elf32-vax.c (elf_vax_check_relocs): Set non_got_ref for non-GOT
328 reference.
329 (elf_vax_adjust_dynamic_symbol): Generate a copy reloc only if
330 there is non-GOT reference.
331 * elflink.c (_bfd_elf_link_check_relocs): Skip non-loaded,
332 non-alloced sections.
333
31af1e68
SC
3342020-06-03 Stephen Casner <casner@acm.org>
335
336 Copy several years of fixes from bfd/aoutx.h to bfd/pdp11.c.
337
338 * pdp11.c (some_aout_object_p): 4c1534c7a2a - Don't set EXEC_P for
339 files with relocs.
340 (aout_get_external_symbols): 6b8f0fd579d - Return if count is zero.
341 0301ce1486b PR 22306 - Handle stringsize of zero, and error for any
342 other size that doesn't qcover the header word.
343 bf82069dce1 PR 23056 - Allocate an extra byte at the end of the
344 string table, and zero it.
345 (translate_symbol_table): 0d329c0a83a PR 22887 - Print an error
346 message and set bfd_error on finding an invalid name string offset.
347 (add_to_stringtab): INLINE -> inline
348 (pdp11_aout_swap_reloc_in): 116acb2c268 PR 22887 - Correct r_index
349 bound check.
350 (squirt_out_relocs): e2996cc315d PR 20921 - Check for and report
351 any relocs that could not be recognised.
352 92744f05809 PR 20929 - Check for relocs without an associated symbol.
353 (find_nearest_line): 808346fcfcf PR 23055 - Check that the symbol
354 name exists and is long enough, before attempting to see if it is
355 for a .o file.
356 c3864421222 - Correct case for N_SO being the last symbol.
357 50455f1ab29 PR 20891 - Handle the case where the main file name
358 and the directory name are both empty.
359 e82ab856bb4 PR 20892 - Handle the case where function name is empty.
360 (aout_link_add_symbols): e517df3dbf7 PR 19629 - Check for out of
361 range string table offsets.
362 531336e3a0b PR 20909 - Fix off-by-one error in check for an
cae64165 363 illegal string offset.
31af1e68
SC
364 (aout_link_includes_newfunc): Add comment.
365 (pdp11_aout_link_input_section): ad756e3f9e6 - Return with an error
366 on unexpected relocation type rather than ASSERT.
367
d4d8aee3
L
3682020-06-03 H.J. Lu <hongjiu.lu@intel.com>
369
370 PR ld/26066
371 * elf32-nios2.c (nios2_elf32_size_dynamic_sections): Call
372 _bfd_elf_maybe_set_textrel to set DF_TEXTREL.
373
58ee44ef
L
3742020-06-03 H.J. Lu <hongjiu.lu@intel.com>
375
376 PR ld/26066
377 * elf32-nios2.c (nios2_elf32_check_relocs): Skip non-loaded,
378 non-alloced sections.
379
9a689602
L
3802020-06-03 H.J. Lu <hongjiu.lu@intel.com>
381
382 * elf32-frv.c (elf32_frv_relocate_section): Don't generate
383 dynamic relocations for non SEC_ALLOC sections.
384
0bff7528
GN
3852020-06-03 Gunther Nikl <gnikl@justmail.de>
386
387 * aout64.c (BMAGIC, QMAGIC): Do not define.
388 * aoutx.h (N_IS_BMAGIC, N_SET_QMAGIC): New defines.
389 (NAME (aout, some_aout_object_p)): Use N_IS_QMAGIC and N_IS_BMAGIC
390 to check the file format.
391 (adjust_z_magic): Use N_SET_QMAGIC to set file format.
392 * i386aout.c (NO_WRITE_HEADER_KLUDGE): Delete define.
393 * libaout.h (NO_WRITE_HEADER_KLUDGE): Do not define.
394
50d03636
L
3952020-06-03 H.J. Lu <hongjiu.lu@intel.com>
396
397 * elf32-arc.c (elf_arc_relocate_section): Don't generate dynamic
398 relocations for non SEC_ALLOC sections.
399
d49e5065
L
4002020-06-03 H.J. Lu <hongjiu.lu@intel.com>
401
402 * elf-bfd.h (_bfd_elf_maybe_set_textrel): New
403 * elf32-arm.c (maybe_set_textrel): Removed.
404 (elf32_arm_size_dynamic_sections): Replace maybe_set_textrel
405 with _bfd_elf_maybe_set_textrel.
406 * elf32-csky.c (maybe_set_textrel): Removed.
407 (csky_elf_size_dynamic_sections): Replace maybe_set_textrel
408 with _bfd_elf_maybe_set_textrel.
409 * elf32-hppa.c (maybe_set_textrel): Removed.
410 (elf32_hppa_size_dynamic_sections): Replace maybe_set_textrel
411 with _bfd_elf_maybe_set_textrel.
412 * elf32-lm32.c (maybe_set_textrel): Removed.
413 (lm32_elf_size_dynamic_sections): Replace maybe_set_textrel
414 with _bfd_elf_maybe_set_textrel.
415 * elf32-m32r.c (maybe_set_textrel): Removed.
416 (m32r_elf_size_dynamic_sections): Replace maybe_set_textrel
417 with _bfd_elf_maybe_set_textrel.
418 * elf32-metag.c (maybe_set_textrel): Removed.
419 (elf_metag_size_dynamic_sections): Replace maybe_set_textrel
420 with _bfd_elf_maybe_set_textrel.
421 * elf32-nds32.c (maybe_set_textrel): Removed.
422 (nds32_elf_size_dynamic_sections): Replace maybe_set_textrel
423 with _bfd_elf_maybe_set_textrel.
424 * elf32-or1k.c (maybe_set_textrel): Removed.
425 (or1k_elf_size_dynamic_sections): Replace maybe_set_textrel
426 with _bfd_elf_maybe_set_textrel.
427 * elf32-ppc.c (maybe_set_textrel): Removed.
428 (ppc_elf_size_dynamic_sections): Replace maybe_set_textrel
429 with _bfd_elf_maybe_set_textrel.
430 * elf32-s390.c (maybe_set_textrel): Removed.
431 (elf_s390_size_dynamic_sections): Replace maybe_set_textrel
432 with _bfd_elf_maybe_set_textrel.
433 * elf32-sh.c (maybe_set_textrel): Removed.
434 (sh_elf_size_dynamic_sections): Replace maybe_set_textrel
435 with _bfd_elf_maybe_set_textrel.
436 * elf32-tic6x.c (maybe_set_textrel): Removed.
437 (elf32_tic6x_size_dynamic_sections): Replace maybe_set_textrel
438 with _bfd_elf_maybe_set_textrel.
439 * elf32-tilepro.c (maybe_set_textrel): Removed.
440 (tilepro_elf_size_dynamic_sections): Replace maybe_set_textrel
441 with _bfd_elf_maybe_set_textrel.
442 * elf64-ppc.c (maybe_set_textrel): Removed.
443 (ppc64_elf_size_dynamic_sections): Replace maybe_set_textrel
444 with _bfd_elf_maybe_set_textrel.
445 * elf64-s390.c (maybe_set_textrel): Removed.
446 (elf_s390_size_dynamic_sections): Replace maybe_set_textrel
447 with _bfd_elf_maybe_set_textrel.
448 * elfnn-aarch64.c (maybe_set_textrel): Removed.
449 (elfNN_aarch64_size_dynamic_sections): Replace maybe_set_textrel
450 with _bfd_elf_maybe_set_textrel.
451 * elfnn-riscv.c (maybe_set_textrel): Removed.
452 (riscv_elf_size_dynamic_sections): Replace maybe_set_textrel
453 with _bfd_elf_maybe_set_textrel.
454 * elfxx-sparc.c (maybe_set_textrel): Removed.
455 (_bfd_sparc_elf_size_dynamic_sections): Replace maybe_set_textrel
456 with _bfd_elf_maybe_set_textrel.
457 * elfxx-tilegx.c (maybe_set_textrel): Removed.
458 (tilegx_elf_size_dynamic_sections): Replace maybe_set_textrel
459 with _bfd_elf_maybe_set_textrel.
460 * elfxx-x86.c (maybe_set_textrel): Removed.
461 (_bfd_x86_elf_size_dynamic_sections): Replace maybe_set_textrel
462 with _bfd_elf_maybe_set_textrel.
463 * elflink.c (_bfd_elf_maybe_set_textrel): New.
464
ad172eaa
L
4652020-06-03 H.J. Lu <hongjiu.lu@intel.com>
466
467 PR ld/26067
468 * elf32-arm.c (elf32_arm_copy_indirect_symbol): Don't copy
469 dyn_relocs.
470 * elf32-csky.c (csky_elf_copy_indirect_symbol): Likewise.
471 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
472 * elf32-metag.c (elf_metag_copy_indirect_symbol): Likewise.
473 * elf32-microblaze.c (microblaze_elf_copy_indirect_symbol):
474 Likewise.
475 * elf32-nds32.c (nds32_elf_copy_indirect_symbol): Likewise.
476 * elf32-nios2.c (nios2_elf32_copy_indirect_symbol): Likewise.
477 * elf32-or1k.c (or1k_elf_copy_indirect_symbol): Likewise.
478 * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
479 * elf32-sh.c (sh_elf_copy_indirect_symbol): Likewise.
480 * elf32-tilepro.c (tilepro_elf_copy_indirect_symbol): Likewise.
481 * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
482 * elfnn-aarch64.c (elfNN_aarch64_copy_indirect_symbol): Likewise.
483 * elfnn-riscv.c (riscv_elf_copy_indirect_symbol): Likewise.
484 * elfxx-sparc.c (_bfd_sparc_elf_copy_indirect_symbol): Likewise.
485 * elfxx-tilegx.c (tilegx_elf_copy_indirect_symbol): Likewise.
486 * elfxx-x86.c (_bfd_x86_elf_copy_indirect_symbol): Likewise.
487 * elf32-lm32.c (lm32_elf_copy_indirect_symbol): Removed.
488 (elf_backend_copy_indirect_symbol): Likewise.
489 * elf32-m32r.c (m32r_elf_copy_indirect_symbol): Removed.
490 (elf_backend_copy_indirect_symbol): Likewise.
491 * elflink.c (_bfd_elf_link_hash_copy_indirect): Copy dyn_relocs.
492
5dbc8b37
L
4932020-06-03 H.J. Lu <hongjiu.lu@intel.com>
494
495 PR ld/26067
496 * elf-bfd.h (_bfd_elf_readonly_dynrelocs): New.
497 * elf32-arm.c (readonly_dynrelocs): Removed.
498 (maybe_set_textrel): Replace readonly_dynrelocs with
499 _bfd_elf_readonly_dynrelocs.
500 * elf32-csky.c (readonly_dynrelocs): Removed.
501 (maybe_set_textrel): Replace readonly_dynrelocs with
502 _bfd_elf_readonly_dynrelocs.
503 * elf32-hppa.c(readonly_dynrelocs): Removed.
504 (alias_readonly_dynrelocs): Replace readonly_dynrelocs with
505 _bfd_elf_readonly_dynrelocs.
506 (maybe_set_textrel): Likewise.
507 * elf32-lm32.c (readonly_dynrelocs): Removed.
508 (lm32_elf_adjust_dynamic_symbol): Replace readonly_dynrelocs
509 with _bfd_elf_readonly_dynrelocs.
510 (maybe_set_textrel): Likewise.
511 * elf32-m32r.c (readonly_dynrelocs): Removed.
512 (m32r_elf_adjust_dynamic_symbol): Replace readonly_dynrelocs
513 with _bfd_elf_readonly_dynrelocs.
514 (maybe_set_textrel): Likewise.
515 * elf32-metag.c (readonly_dynrelocs): Removed.
516 (elf_metag_adjust_dynamic_symbol): Replace readonly_dynrelocs
517 with _bfd_elf_readonly_dynrelocs.
518 (maybe_set_textrel): Likewise.
519 * elf32-microblaze.c (readonly_dynrelocs): Removed.
520 (microblaze_elf_adjust_dynamic_symbol): Replace readonly_dynrelocs
521 with _bfd_elf_readonly_dynrelocs.
522 * elf32-nds32.c (readonly_dynrelocs): Removed.
523 (nds32_elf_adjust_dynamic_symbol): Replace readonly_dynrelocs
524 with _bfd_elf_readonly_dynrelocs.
525 (maybe_set_textrel): Likewise.
526 * elf32-or1k.c (readonly_dynrelocs): Removed.
527 (or1k_elf_adjust_dynamic_symbol): Replace readonly_dynrelocs
528 with _bfd_elf_readonly_dynrelocs.
529 * elf32-ppc.c (readonly_dynrelocs): Removed.
530 (alias_readonly_dynrelocs): Replace readonly_dynrelocs with
531 _bfd_elf_readonly_dynrelocs.
532 (ppc_elf_adjust_dynamic_symbol): Likewise.
533 (maybe_set_textrel): Likewise.
534 * elf32-s390.c (readonly_dynrelocs): Removed.
535 (elf_s390_adjust_dynamic_symbol): Replace readonly_dynrelocs
536 with _bfd_elf_readonly_dynrelocs.
537 (maybe_set_textrel): Likewise.
538 * elf32-sh.c (readonly_dynrelocs): Removed.
539 (sh_elf_adjust_dynamic_symbol): Replace readonly_dynrelocs with
540 _bfd_elf_readonly_dynrelocs.
541 (maybe_set_textrel): Likewise.
542 * elf32-tic6x.c (readonly_dynrelocs): Removed.
543 (maybe_set_textrel): Replace readonly_dynrelocs with
544 _bfd_elf_readonly_dynrelocs.
545 * elf32-tilepro.c (readonly_dynrelocs): Removed.
546 (tilepro_elf_adjust_dynamic_symbol): Replace readonly_dynrelocs
547 with _bfd_elf_readonly_dynrelocs.
548 (maybe_set_textrel): Likewise.
549 * elf64-ppc.c (readonly_dynrelocs): Removed.
550 (alias_readonly_dynrelocs): Replace readonly_dynrelocs with
551 _bfd_elf_readonly_dynrelocs.
552 (ppc64_elf_adjust_dynamic_symbol): Likewise.
553 (maybe_set_textrel): Likewise.
554 * elf64-s390.c (readonly_dynrelocs): Removed.
555 (elf_s390_adjust_dynamic_symbol): Replace readonly_dynrelocs
556 with _bfd_elf_readonly_dynrelocs.
557 (maybe_set_textrel): Likewise.
558 * elflink.c (_bfd_elf_readonly_dynrelocs): New.
559 * elfnn-aarch64.c (readonly_dynrelocs): Removed.
560 (maybe_set_textrel): Replace readonly_dynrelocs with
561 _bfd_elf_readonly_dynrelocs.
562 * elfnn-riscv.c (readonly_dynrelocs): Removed.
563 (riscv_elf_adjust_dynamic_symbol): Replace readonly_dynrelocs
564 with _bfd_elf_readonly_dynrelocs.
565 (maybe_set_textrel): Likewise.
566 * elfxx-sparc.c (readonly_dynrelocs): Removed.
567 (_bfd_sparc_elf_adjust_dynamic_symbol): Replace
568 readonly_dynrelocs with _bfd_elf_readonly_dynrelocs.
569 (maybe_set_textrel): Likewise.
570 * elfxx-tilegx.c (readonly_dynrelocs): Removed.
571 (tilegx_elf_adjust_dynamic_symbol): Replace readonly_dynrelocs
572 with _bfd_elf_readonly_dynrelocs.
573 (maybe_set_textrel): Likewise.
574 * elfxx-x86.c (readonly_dynrelocs): Removed.
575 (maybe_set_textrel): Replace readonly_dynrelocs with
576 _bfd_elf_readonly_dynrelocs.
577 (_bfd_x86_elf_adjust_dynamic_symbol): Likewise.
578
433953ff
L
5792020-06-03 H.J. Lu <hongjiu.lu@intel.com>
580
581 * elfxx-x86.h (GENERATE_DYNAMIC_RELOCATION_P): Silence
582 -fsanitize=undefined.
583
67580036
AM
5842020-06-03 Alan Modra <amodra@gmail.com>
585
586 PR 26069
587 PR 18758
588 * peicode.h (pe_ILF_make_a_section): Align data for compilers
589 other than gcc.
590 (pe_ILF_build_a_bfd): Likewise.
591
0ed18fa1
AM
5922020-06-03 Alan Modra <amodra@gmail.com>
593
7eea15c5 594 PR 26069
0ed18fa1
AM
595 * elf.c (_bfd_elf_close_and_cleanup): Free elf_shstrtab for
596 core files as well as objects.
597
190eb1dd
L
5982020-06-01 H.J. Lu <hongjiu.lu@intel.com>
599
600 PR ld/26067
601 * elf-bfd.h (elf_link_hash_entry): Add dyn_relocs after size.
602 * elf-s390-common.c (s390_elf_allocate_ifunc_dyn_relocs):
603 Updated.
604 * elf32-arc.c (elf_arc_link_hash_entry): Remove dyn_relocs.
605 (elf_arc_link_hash_newfunc): Updated.
606 * elf32-arm.c (elf32_arm_link_hash_entry): Remove dyn_relocs.
607 (elf32_arm_link_hash_newfunc): Updated.
608 (elf32_arm_copy_indirect_symbol): Likewise.
609 (elf32_arm_check_relocs): Likewise.
610 (readonly_dynrelocs): Likewise.
611 (allocate_dynrelocs_for_symbol): Likewise.
612 * elf32-csky.c (csky_elf_link_hash_entry): Remove dyn_relocs.
613 (csky_elf_link_hash_newfunc): Updated.
614 (csky_allocate_dynrelocs): Likewise.
615 (readonly_dynrelocs): Likewise.
616 (csky_elf_copy_indirect_symbol): Likewise.
617 * elf32-hppa.c (elf32_hppa_link_hash_entry): Remove dyn_relocs.
618 (hppa_link_hash_newfunc): Updated.
619 (elf32_hppa_copy_indirect_symbol): Likewise.
620 (elf32_hppa_hide_symbol): Likewise.
621 (elf32_hppa_adjust_dynamic_symbol): Likewise.
622 (allocate_dynrelocs): Likewise.
623 (elf32_hppa_relocate_section): Likewise.
624 * elf32-i386.c (elf_i386_check_relocs): Likewise.
625 * elf32-lm32.c (elf_lm32_link_hash_entry): Removed.
626 (lm32_elf_link_hash_newfunc): Likewise.
627 (lm32_elf_link_hash_table_create): Updated.
628 (readonly_dynrelocs): Likewise.
629 (allocate_dynrelocs): Likewise.
630 (lm32_elf_copy_indirect_symbol): Likewise.
631 * elf32-m32r.c (elf_m32r_link_hash_entry): Removed.
632 (m32r_elf_link_hash_newfunc): Likewise.
633 (m32r_elf_link_hash_table_create): Updated.
634 (m32r_elf_copy_indirect_symbol): Likewise.
635 (allocate_dynrelocs): Likewise.
636 * elf32-metag.c (elf_metag_link_hash_entry): Remove dyn_relocs.
637 (metag_link_hash_newfunc): Updated.
638 (elf_metag_copy_indirect_symbol): Likewise.
639 (readonly_dynrelocs): Likewise.
640 (allocate_dynrelocs): Likewise.
641 * elf32-microblaze.c (elf32_mb_link_hash_entry): Remove
642 dyn_relocs.
643 (link_hash_newfunc): Updated.
644 (microblaze_elf_check_relocs): Likewise.
645 (microblaze_elf_copy_indirect_symbol): Likewise.
646 (readonly_dynrelocs): Likewise.
647 (allocate_dynrelocs): Likewise.
648 * elf32-nds32.c (elf_nds32_link_hash_entry): Remove dyn_relocs.
649 (nds32_elf_link_hash_newfunc): Updated.
650 (nds32_elf_copy_indirect_symbol): Likewise.
651 (readonly_dynrelocs): Likewise.
652 (allocate_dynrelocs): Likewise.
653 (nds32_elf_check_relocs): Likewise.
654 * elf32-nios2.c (elf32_nios2_link_hash_entry): Remove dyn_relocs.
655 (link_hash_newfunc): Updated.
656 (nios2_elf32_copy_indirect_symbol): Likewise.
657 (nios2_elf32_check_relocs): Likewise.
658 (allocate_dynrelocs): Likewise.
659 * elf32-or1k.c (elf_or1k_link_hash_entry): Remove dyn_relocs.
660 (or1k_elf_link_hash_newfunc): Updated.
661 (readonly_dynrelocs): Likewise.
662 (allocate_dynrelocs): Likewise.
663 (or1k_elf_copy_indirect_symbol): Likewise.
664 * elf32-ppc.c (ppc_elf_link_hash_entry): Remove dyn_relocs.
665 (ppc_elf_link_hash_newfunc): Updated.
666 (ppc_elf_copy_indirect_symbol): Likewise.
667 (ppc_elf_check_relocs): Likewise.
668 (readonly_dynrelocs): Likewise.
669 (ppc_elf_adjust_dynamic_symbol): Likewise.
670 (allocate_dynrelocs): Likewise.
671 (ppc_elf_relocate_section): Likewise.
672 * elf32-s390.c (elf_s390_link_hash_entry): Remove dyn_relocs.
673 (link_hash_newfunc): Updated.
674 (elf_s390_copy_indirect_symbol): Likewise.
675 (readonly_dynrelocs): Likewise.
676 (elf_s390_adjust_dynamic_symbol): Likewise.
677 (allocate_dynrelocs): Likewise.
678 * elf32-sh.c (elf_sh_link_hash_entry): Remove dyn_relocs.
679 (sh_elf_link_hash_newfunc): Updated.
680 (readonly_dynrelocs): Likewise.
681 (allocate_dynrelocs): Likewise.
682 (sh_elf_copy_indirect_symbol): Likewise.
683 (sh_elf_check_relocs): Likewise.
684 * elf32-tic6x.c (elf32_tic6x_link_hash_entry): Removed.
685 (elf32_tic6x_link_hash_newfunc): Likewise.
686 (elf32_tic6x_link_hash_table_create): Updated.
687 (readonly_dynrelocs): Likewise.
688 (elf32_tic6x_check_relocs): Likewise.
689 (elf32_tic6x_allocate_dynrelocs): Likewise.
690 * elf32-tilepro.c (tilepro_elf_link_hash_entry): Remove
691 dyn_relocs.
692 (link_hash_newfunc): Updated.
693 (tilepro_elf_copy_indirect_symbol): Likewise.
694 (tilepro_elf_check_relocs): Likewise.
695 (allocate_dynrelocs): Likewise.
696 * elf64-ppc.c (ppc_link_hash_entry): Remove dyn_relocs.
697 (ppc64_elf_copy_indirect_symbol): Updated.
698 (ppc64_elf_check_relocs): Likewise.
699 (readonly_dynrelocs): Likewise.
700 (ppc64_elf_adjust_dynamic_symbol): Likewise.
701 (dec_dynrel_count): Likewise.
702 (allocate_dynrelocs): Likewise.
703 (ppc64_elf_relocate_section): Likewise.
704 * elf64-s390.c (elf_s390_link_hash_entry): Remove dyn_relocs.
705 (link_hash_newfunc): Updated.
706 (elf_s390_copy_indirect_symbol): Likewise.
707 (readonly_dynrelocs): Likewise.
708 (allocate_dynrelocs): Likewise.
709 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
710 * elfnn-aarch64.c (elf_aarch64_link_hash_entry): Remove
711 dyn_relocs.
712 (elfNN_aarch64_link_hash_newfunc): Updated.
713 (elfNN_aarch64_copy_indirect_symbol): Likewise.
714 (readonly_dynrelocs): Likewise.
715 (need_copy_relocation_p): Likewise.
716 (elfNN_aarch64_allocate_dynrelocs): Likewise.
717 (elfNN_aarch64_allocate_ifunc_dynrelocs): Likewise.
718 * elfnn-riscv.c (riscv_elf_link_hash_entry): Remove dyn_relocs.
719 (link_hash_newfunc): Updated.
720 (riscv_elf_copy_indirect_symbol): Likewise.
721 (riscv_elf_check_relocs): Likewise.
722 (readonly_dynrelocs): Likewise.
723 (allocate_dynrelocs): Likewise.
724 * elfxx-sparc.c (_bfd_sparc_elf_link_hash_entry): Remove
725 dyn_relocs.
726 (link_hash_newfunc): Updated.
727 (_bfd_sparc_elf_copy_indirect_symbol): Likewise.
728 (_bfd_sparc_elf_check_relocs): Likewise.
729 (readonly_dynrelocs): Likewise.
730 (allocate_dynrelocs): Likewise.
731 * elfxx-tilegx.c (tilegx_elf_link_hash_entry): Remove dyn_relocs.
732 (link_hash_newfunc): Updated.
733 (tilegx_elf_copy_indirect_symbol): Likewise.
734 (tilegx_elf_check_relocs): Likewise.
735 (readonly_dynrelocs): Likewise.
736 (allocate_dynrelocs): Likewise.
737 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Likewise.
738 (readonly_dynrelocs): Likewise.
739 (_bfd_x86_elf_copy_indirect_symbol): Likewise.
740 * elfxx-x86.h (elf_x86_link_hash_entry): Remove dyn_relocs.
741
2fdb65f2
AM
7422020-06-01 Alan Modra <amodra@gmail.com>
743
744 * vms-alpha.c (_bfd_vms_slurp_etir): Check bound for the current
745 command against cmd_length, not the end of record. For
746 ETIR__C_STO_IMMR check size against cmd_length, mask repeat count
747 to 32-bits and break out on zero size. Add ETIR__C_STC_LP_PSB
748 cmd_length test.
749
12adf805
DF
7502020-05-28 David Faust <david.faust@oracle.com>
751
752 * elf64-bpf.c (bpf_elf_relocate_section): Fix handling of
753 R_BPF_INSN_{32,64} relocations.
754
66e3eb08
SC
7552020-05-28 Stephen Casner <casner@acm.org>
756
757 * pdp11.c: Implement BRD_RELOC_32 to relocate the low 16 bits of
758 addreses in .long (used in testsuites) and .stab values.
759
a6dbf402
L
7602020-05-27 H.J. Lu <hongjiu.lu@intel.com>
761
762 PR ld/22909
763 * elflink.c (bfd_elf_final_link): Use bfd_link_textrel_check.
764 Check bfd_link_dll when issue a DT_TEXTREL warning.
765 * elfxx-x86.c (maybe_set_textrel): Likewise.
766 (_bfd_x86_elf_size_dynamic_sections): Likewise.
767
9e7cb4c3
NC
7682020-05-26 Nick Clifton <nickc@redhat.com>
769
770 * plugin.c (try_load_plugin): Extend error message when a plugin
771 fails to open.
772
c892b447
AM
7732020-05-23 Alan Modra <amodra@gmail.com>
774
775 * bfdio.c (bfd_get_file_size): Don't segfault on NULL arch_header.
776
6f3fe02b
AM
7772020-05-22 Alan Modra <amodra@gmail.com>
778
779 PR 25882
780 * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Don't init FP
781 attributes from shared libraries, and do not return an error if
782 they don't match.
783
0490dd41
AM
7842020-05-21 Alan Modra <amodra@gmail.com>
785
786 PR 25993
787 * opncls.c (_bfd_free_cached_info): Keep a copy of the bfd
788 filename.
789 (_bfd_delete_bfd): Free the copy.
790 (_bfd_new_bfd): Free nbfd->memory on error.
791
c9594989
AM
7922020-05-21 Alan Modra <amodra@gmail.com>
793
794 * aoutx.h: Replace "if (x) free (x)" with "free (x)" throughout.
795 * archive.c, * bfd.c, * bfdio.c, * coff-alpha.c, * coff-ppc.c,
796 * coff-sh.c, * coff-stgo32.c, * coffcode.h, * coffgen.c,
797 * cofflink.c, * cpu-arm.c, * doc/chew.c, * dwarf2.c, * ecoff.c,
798 * ecofflink.c, * elf-eh-frame.c, * elf-m10200.c, * elf-m10300.c,
799 * elf-strtab.c, * elf.c, * elf32-arc.c, * elf32-arm.c,
800 * elf32-avr.c, * elf32-bfin.c, * elf32-cr16.c, * elf32-crx.c,
801 * elf32-epiphany.c, * elf32-ft32.c, * elf32-h8300.c,
802 * elf32-ip2k.c, * elf32-m32c.c, * elf32-m68hc11.c,
803 * elf32-m68k.c, * elf32-microblaze.c, * elf32-msp430.c,
804 * elf32-nds32.c, * elf32-nios2.c, * elf32-ppc.c, * elf32-pru.c,
805 * elf32-rl78.c, * elf32-rx.c, * elf32-sh.c, * elf32-spu.c,
806 * elf32-v850.c, * elf32-xtensa.c, * elf64-alpha.c,
807 * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c
808 * elf64-mmix.c, * elf64-ppc.c, * elf64-sparc.c, * elfcode.h,
809 * elflink.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-mips.c,
810 * elfxx-x86.c, * format.c, * ihex.c, * libbfd.c, * linker.c,
811 * mmo.c, * opncls.c, * pdp11.c, * peXXigen.c, * pef.c,
812 * peicode.h, * simple.c, * som.c, * srec.c, * stabs.c, * syms.c,
813 * targets.c, * vms-lib.c, * xcofflink.c, * xtensa-isa.c: Likewise.
814
8f595e9b
NC
8152020-05-20 Nelson Chu <nelson.chu@sifive.com>
816
817 * elfxx-riscv.h (riscv_parse_subset_t): Add new callback function
818 get_default_version. It is used to find the default version for
819 the specific extension.
820 * elfxx-riscv.c (riscv_parsing_subset_version): Remove the parameters
821 default_major_version and default_minor_version. Add new bfd_boolean
822 parameter *use_default_version. Set it to TRUE if we need to call
823 the callback rps->get_default_version to find the default version.
824 (riscv_parse_std_ext): Call rps->get_default_version if we fail to find
825 the default version in riscv_parsing_subset_version, and then call
826 riscv_add_subset to add the subset into subset list.
827 (riscv_parse_prefixed_ext): Likewise.
828 (riscv_std_z_ext_strtab): Support Zicsr extensions.
829 * elfnn-riscv.c (riscv_merge_std_ext): Use strcasecmp to compare the
830 strings rather than characters.
831 riscv_merge_arch_attr_info): The callback function get_default_version
832 is only needed for assembler, so set it to NULL int the linker.
833 * elfxx-riscv.c (riscv_estimate_digit): Remove the static.
834 * elfxx-riscv.h: Updated.
835
7b958a48
AM
8362020-05-20 Alan Modra <amodra@gmail.com>
837
838 PR 25993
839 * archive.c (_bfd_get_elt_at_filepos): Don't strdup filename,
840 use bfd_set_filename.
841 * elfcode.h (_bfd_elf_bfd_from_remote_memory): Likewise.
842 * mach-o.c (bfd_mach_o_fat_member_init): Likewise.
843 * opncls.c (bfd_fopen, bfd_openstreamr, bfd_openr_iovec, bfd_openw),
844 (bfd_create): Likewise.
845 (_bfd_delete_bfd): Don't free filename.
846 (bfd_set_filename): Copy filename param to bfd_alloc'd memory,
847 return pointer to the copy or NULL on alloc fail.
848 * vms-lib.c (_bfd_vms_lib_get_module): Free newname and test
849 result of bfd_set_filename.
850 * bfd-in2.h: Regenerate.
851
3c568b8a
AM
8522020-05-20 Alan Modra <amodra@gmail.com>
853
854 PR 26011
855 * elf.c (_bfd_elf_get_reloc_upper_bound): Sanity check reloc
856 section size against file size.
857 (_bfd_elf_get_dynamic_reloc_upper_bound): Likewise.
858
6fd1d259
GN
8592020-05-19 Gunther Nikl <gnikl@justmail.de>
860
861 PR 26005
11c0dd51
NC
862 * elf.c (bfd_section_from_shdr): Replace bfd_zmalloc with bfd_malloc
863 and memset when allocating memory for the sections_being_created
864 array.
6fd1d259 865
7e94cf6c
SH
8662020-05-19 Stafford Horne <shorne@gmail.com>
867
868 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Rename srela
869 to relgot.
870 (or1k_elf_relocate_section): Access srelgot via
871 htab->root.srelgot. Add assertions for srelgot->contents.
872 Introduce local variable for srelgot to not reuse global
873 sreloc.
874 (or1k_elf_relocate_section): Fixup dynamic symbol detection.
875 (or1k_set_got_and_rela_sizes): New function.
876 (or1k_initial_exec_offset): New function.
877 (TLS_GD, TLS_IE, TLS_LD, TLS_LE): Redefine macros as masks.
878 (or1k_elf_relocate_section): Allow for TLS to handle multiple
879 model access.
880 (or1k_elf_check_relocs): Use OR to set TLS access.
881 (allocate_dynrelocs): Use or1k_set_got_and_rela_sizes to set
882 sizes.
883 (or1k_elf_size_dynamic_sections): Use
884 or1k_set_got_and_rela_sizes to set sizes.
885 (or1k_elf_relocate_section): Fixup PCREL relocation calculation.
886 (TCB_SIZE): New macro.
887 (tpoff): Use TCB_SIZE and alignment to calculate offset.
888 (allocate_dynrelocs, readonly_dynrelocs, or1k_elf_check_relocs)
889 (or1k_elf_size_dynamic_sections): Rename p to sec_relocs.
890 (allocate_dynrelocs): Rename s to splt or sgot based on usage.
891 (tpoff): Add dynamic boolean argument.
892 (or1k_elf_relocate_section): Pass dynamic flag to tpoff.
893
7e057737
SP
8942020-05-19 Siddhesh Poyarekar <siddesh.poyarekar@arm.com>
895
896 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Club
897 BFD_RELOC_AARCH64_BRANCH19 and BFD_RELOC_AARCH64_TSTBR14
898 cases with BFD_RELOC_AARCH64_JUMP26.
899 (elfNN_aarch64_check_relocs): Likewise.
900
765cf5f6
AM
9012020-05-19 Alan Modra <amodra@gmail.com>
902
903 * aix5ppc-core.c (xcoff64_core_file_matches_executable_p): Use
904 bfd_get_filename rather than accessing bfd->filename directly.
905 * aout-target.h (MY (object_p)): Likewise.
906 * aoutx.h (aout_find_nearest_line, aout_link_write_symbols): Likewise.
907 * archive.c (find_nested_archive, _bfd_generic_read_ar_hdr_mag),
908 (_bfd_construct_extended_name_table, _bfd_bsd44_write_ar_hdr),
909 (_bfd_archive_bsd44_construct_extended_name_table),
910 (_bfd_write_archive_contents, _bfd_compute_and_write_armap),
911 (_bfd_bsd_write_armap): Likewise.
912 * bfd.c (bfd_errmsg, _bfd_doprnt): Likewise.
913 * cache.c (bfd_open_file): Likewise.
914 * ecoff.c (_bfd_ecoff_write_armap): Likewise.
915 * ecofflink.c (bfd_ecoff_debug_accumulate_other): Likewise.
916 * elf32-bfin.c (bfinfdpic_relocate_section): Likewise.
917 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
918 * elf32-hppa.c (elf32_hppa_final_link): Likewise.
919 * elf32-nds32.c (nds32_elf_output_symbol_hook),
920 (patch_tls_desc_to_ie): Likewise.
921 * elf32-spu.c (sort_bfds, print_one_overlay_section),
922 (spu_elf_auto_overlay): Likewise.
923 * elf64-hppa.c (elf_hppa_final_link): Likewise.
924 * elf64-ia64-vms.c (elf64_ia64_size_dynamic_sections): Likewise.
925 * elfcore.h (elf_core_file_matches_executable_p): Likewise.
926 * elflink.c (bfd_elf_size_dynamic_sections),
927 (elf_link_input_bfd): Likewise.
928 * linker.c (_bfd_generic_link_output_symbols): Likewise.
929 * mach-o.c (bfd_mach_o_follow_dsym),
930 (bfd_mach_o_close_and_cleanup): Likewise.
931 * opncls.c (_bfd_delete_bfd, _maybe_make_executable),
932 (find_separate_debug_file, get_build_id_name): Likewise.
933 * pdp11.c (aout_find_nearest_line, aout_link_write_symbols): Likewise.
934 * plugin.c (bfd_plugin_open_input): Likewise.
935 * rs6000-core.c (rs6000coff_core_file_matches_executable_p): Likewise.
936 * som.c (som_write_armap): Likewise.
937 * srec.c (srec_write_record, srec_write_symbols): Likewise.
938 * vms-lib.c (_bfd_vms_lib_get_imagelib_file),
939 (_bfd_vms_lib_write_archive_contents): Likewise.
940 * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
941
39a1432c
AM
9422020-05-19 Alan Modra <amodra@gmail.com>
943
944 PR 25713
945 * bfdio.c (_bfd_real_fopen): Typo fix.
946
ed02cdb5
NC
9472020-05-18 Nick Clifton <nickc@redhat.com>
948
949 PR 26005
950 * elf.c (bfd_section_from_shdr): Use bfd_malloc to allocate memory
951 for the sections_being_created array.
952
7a87e9c8
AM
9532020-05-18 Alan Modra <amodra@gmail.com>
954
955 * ecoff.c (ecoff_slurp_reloc_table): Malloc external_relocs so
956 they can be freed without also freeing internal_relocs.
957
ca859a89
JC
9582020-05-18 Jaydeep Chauhan <jaydeepchauhan1494@gmail.com>
959
960 PR 25713
961 * bfdio.c (_bfd_real_fopen): Convert UNIX style sirectory
962 separators into DOS style when creating a WIN32 fullpath.
963
fc46e8bd
NC
9642020-05-14 Nelson Chu <nelson.chu@sifive.com>
965
966 * elfnn-riscv.c (elfNN_riscv_mkobject): New function. We need this
967 to initialize RISC-V tdata.
968
533f049e
GN
9692020-05-12 Gunther Nikl <gnikl@justmail.de>
970
971 * aoutx.h (NAME (aout, swap_std_reloc_out)): Reject an unsupported
972 relocation size.
973
94ba9882
AM
9742020-05-11 Alan Modra <amodra@gmail.com>
975
976 * elf64-ppc.c (xlate_pcrel_opt): Handle lxvp and stxvp.
977
7c1f4227
AM
9782020-05-11 Alan Modra <amodra@gmail.com>
979
980 * elf64-ppc.c: Rename powerxx to power10 throughout.
981
4d5acb1e
AM
9822020-05-11 Alan Modra <amodra@gmail.com>
983
984 PR 25961
985 * coffgen.c (coff_get_normalized_symtab): Check that buffer
986 contains required number of auxents before processing any auxent.
987 * coffswap.h (coff_swap_aux_in <C_FILE>): Only swap in extended
988 file name from auxents for PE.
989
7242fa8a
GN
9902020-05-04 Gunther Nikl <gnikl@justmail.de>
991
992 * aout-cris.c (DEFAULT_ARCH): Delete define.
993 (MY_set_arch_mach): Likewise.
994 (SET_ARCH_MACH): Use bfd_set_arch_mach with an explicit architecture
995 of bfd_arch_cris.
996 (swap_ext_reloc_in): Add casts to r_index extraction. Mask valid bits
997 of r_type before the shift.
998
9992020-05-04 Wilco Dijkstra <wdijkstr@arm.com>
cff69cf4
WD
1000
1001 PR ld/25665
1002 * elfnn-aarch64.c (group_sections): Copy implementation from
1003 elf32-arm.c.
1004
a2714d6c
AM
10052020-05-01 Alan Modra <amodra@gmail.com>
1006
1007 PR 25900
1008 * elfnn-riscv.c (_bfd_riscv_relax_section): Check root.type before
1009 accessing root.u.def of symbols. Also check root.u.def.section
1010 is non-NULL. Reverse tests so as to make the logic positive.
1011
a8acd6ee
AM
10122020-05-01 Alan Modra <amodra@gmail.com>
1013
1014 PR 25882
1015 * elf32-tic6x.c (elf32_tic6x_merge_attributes): Don't transfer
1016 Tag_ABI_PIC or Tag_ABI_PID from dynamic objects to the output.
1017
6b728d32
AM
10182020-05-01 Alan Modra <amodra@gmail.com>
1019
1020 PR 25882
1021 * elf32-bfin.c (elf32_bfin_merge_private_bfd_data): Add FIXME.
1022 * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
1023 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Likewise.
1024 * elf32-nds32.c (nds32_elf_merge_private_bfd_data): Likewise.
1025 * elf32-score.c (s3_elf32_score_merge_private_bfd_data): Likewise.
1026 * elf32-score7.c (s7_elf32_score_merge_private_bfd_data): Likewise.
1027 * elf32-sh.c (sh_elf_merge_private_data): Likewise.
1028 * elf32-tic6x.c (elf32_tic6x_merge_attributes): Likewise.
1029 * elf64-ia64-vms.c (elf64_ia64_merge_private_bfd_data): Likewise.
1030 * elfnn-ia64.c (elfNN_ia64_merge_private_bfd_data): Likewise.
1031
91ed9b71
AM
10322020-05-01 Alan Modra <amodra@gmail.com>
1033
1034 PR 25882
1035 * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Ignore e_flags
1036 from shared libraries.
1037
d548f47d
MF
10382020-04-29 Max Filippov <jcmvbkbc@gmail.com>
1039
1040 * elf32-xtensa.c (relax_section): Don't negate diff_value for
1041 XTENSA_NDIFF relocations. Don't add sign bits whe diff_value
1042 equals 0. Report overflow when the result has negative sign but
1043 all significant bits are zero.
1044
dfa85db1
GN
10452020-04-29 Gunther Nikl <gnikl@justmail.de>
1046
1047 * aoutx.h (swap_std_reloc_out): Special case 64 bit relocations.
1048 (aout_link_reloc_link_order): Likewise. Make r_length an unsigned.
1049
48e5bada
AM
10502020-04-28 Alan Modra <amodra@gmail.com>
1051
1052 * vms-alpha.c (_bfd_vms_slurp_etir): Correct divide by zero check.
1053 Emit warning message.
1054
251dae91
TC
10552020-04-27 Tamar Christina <tamar.christina@arm.com>
1056
1057 * coff-i386.c (COFF_WITH_PE_BIGOBJ): New.
1058 * coff-x86_64.c (COFF_WITH_PE_BIGOBJ): New.
1059 * config.bfd (targ_selvecs): Rename x86_64_pe_be_vec
1060 to x86_64_pe_big_vec as it not a big-endian format.
1061 (vec i386_pe_big_vec): New.
1062 * configure.ac: Likewise.
1063 * targets.c: Likewise.
1064 * configure: Regenerate.
1065 * pe-i386.c (TARGET_SYM_BIG, TARGET_NAME_BIG,
1066 COFF_WITH_PE_BIGOBJ): New.
1067 * pe-x86_64.c (TARGET_SYM_BIG, TARGET_NAME_BIG):
1068 New.
1069 (x86_64_pe_be_vec): Moved.
1070
27456742
AK
10712020-04-23 Anton Kolesov <anton.kolesov@synopsys.com>
1072
1073 * elf-bfd.h (elfcore_write_arc_v2): Add prototype.
1074 * elf.c (elfcore_grok_arc_v2): New function.
1075 (elfcore_grok_note): Call the new function to handle the corresponding
1076 note.
1077 (elfcore_write_arc_v2): New function.
1078 (elfcore_write_register_note): Call the new function to handle the
1079 corresponding pseudo-sections.
1080
30ce8e47
MF
10812020-04-22 Max Filippov <jcmvbkbc@gmail.com>
1082
1083 PR ld/25861
1084 * bfd-in2.h: Regenerated.
1085 * elf32-xtensa.c (elf_howto_table): New entries for
1086 R_XTENSA_PDIFF{8,16,32} and R_XTENSA_NDIFF{8,16,32}.
1087 (elf_xtensa_reloc_type_lookup, elf_xtensa_do_reloc)
1088 (relax_section): Add cases for R_XTENSA_PDIFF{8,16,32} and
1089 R_XTENSA_NDIFF{8,16,32}.
1090 * libbfd.h (bfd_reloc_code_real_names): Add names for
1091 BFD_RELOC_XTENSA_PDIFF{8,16,32} and
1092 BFD_RELOC_XTENSA_NDIFF{8,16,32}.
1093 * reloc.c: Add documentation for BFD_RELOC_XTENSA_PDIFF{8,16,32}
1094 and BFD_RELOC_XTENSA_NDIFF{8,16,32}.
1095
c36876fe
TC
10962020-04-21 Tamar Christina <tamar.christina@arm.com>
1097
1098 PR binutils/24753
1099 * compress.c (bfd_get_full_section_contents): Exclude sections with no
1100 content.
1101
6f6fd151
L
11022020-04-21 H.J. Lu <hongjiu.lu@intel.com>
1103
1104 PR ld/25849
1105 * elf-bfd.h (elf_backend_data): Add
1106 elf_backend_strip_zero_sized_dynamic_sections.
1107 (_bfd_elf_strip_zero_sized_dynamic_sections): New prototype.
1108 * elf64-alpha.c (elf_backend_strip_zero_sized_dynamic_sections):
1109 New macro.
1110 * elflink.c (_bfd_elf_strip_zero_sized_dynamic_sections): New
1111 function.
1112 * elfxx-target.h (elf_backend_strip_zero_sized_dynamic_sections):
1113 New macro.
1114 (elfNN_bed): Add elf_backend_strip_zero_sized_dynamic_sections.
1115
1f7f2abb
L
11162020-04-21 H.J. Lu <hongjiu.lu@intel.com>
1117
1118 * elf64-alpha.c (alpha_elf_reloc_entry): Replace reltext with
1119 sec.
1120 (elf64_alpha_check_relocs): Set sec instead of reltext. Warn
1121 DT_TEXTREL with -M.
1122 (elf64_alpha_calc_dynrel_sizes): Warn DT_TEXTREL with -M.
1123
e04f33c0
NC
11242020-04-21 Nick Clifton <nickc@redhat.com>
1125
1126 * po/sr.po: Updated Serbian translation.
1127
fad3d2c1
AM
11282020-04-21 Alan Modra <amodra@gmail.com>
1129
1130 * elf32-sh.c (sh_elf_relocate_section): Remove STO_SH5_ISA32
1131 processing.
1132
23c8270e
SC
11332020-04-20 Stephen Casner <casner@acm.org>
1134
1135 * pdp11.c (N_STAB): Modify value to avoid conflict with N_EXT
1136 causing globals from linker script to be treated as debug symbols.
1137 (translate_symbol_table): Don't sign-extend symbol values from 16
1138 to 64 bits in nm output.
1139
2efec98b
AM
11402020-04-20 Alan Modra <amodra@gmail.com>
1141
1142 * elf64-ppc.c (ppc64_elf_size_stubs): Strip relbrlt too.
1143
18f97353
AM
11442020-04-18 Alan Modra <amodra@gmail.com>
1145
1146 * section.c (bfd_is_const_section): Correct test for special
1147 sections.
1148 * bfd-in2.h: Regenerate.
1149
8d55d10a
AM
11502020-04-17 Alan Modra <amodra@gmail.com>
1151
1152 PR 25842
1153 * elf.c (_bfd_elf_get_symbol_version_string): Don't segfault on
1154 NULL nodename.
1155
8e4979ac
NC
11562020-04-16 Nick Clifton <nickc@redhat.com>
1157
1158 PR 25803
1159 * elfxx-mips.c (_bfd_mips_elf_adjust_dynamic_symbol): Replace an
1160 abort with a more helpful error message.
1161
aec72fda
AM
11622020-04-16 Alan Modra <amodra@gmail.com>
1163
1164 PR 25827
1165 * dwarf2.c (scan_unit_for_symbols): Wrap overlong lines. Don't
1166 strdup(0).
1167
95a51568
FS
11682020-04-15 Fangrui Song <maskray@google.com>
1169
1170 PR binutils/24613
1171 * coff-rs6000.c (xcoff_ppc_relocate_section): Change RM_GENERATE_ERROR
1172 to RM_DIAGNOSE plus a check of warn_unresolved_syms.
1173 * coff64-rs6000.c (xcoff_ppc_relocate_section): Likewise.
1174 * elf-bfd.h (_bfd_elf_large_com_section): Likewise.
1175 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
1176 * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise.
1177 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
1178 * elf32-sh.c (sh_elf_relocate_section): Likewise.
1179 * elf32-spu.c (spu_elf_relocate_section): Likewise.
1180 * elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
1181 * elflink.c (elf_link_output_extsym): Likewise.
1182 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
1183
7ecb5154
AM
11842020-04-15 Alan Modra <amodra@gmail.com>
1185
1186 PR 25823
1187 * peXXigen.c (_bfd_XXi_swap_sym_in <C_SECTION>): Don't use a
1188 pointer into strings that may be freed for section name, always
1189 allocate a new string.
1190
f717994f
JMG
11912020-04-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1192 Jan W. Jagersma <jwjagersma@gmail.com>
1193
1194 * coff-go32.c (COFF_GO32, IMAGE_SCN_LNK_NRELOC_OVFL)
1195 (coff_SWAP_scnhdr_in, coff_SWAP_scnhdr_out): Define.
1196 (_bfd_go32_swap_scnhdr_in, _bfd_go32_swap_scnhdr_out)
1197 (_bfd_go32_mkobject): New functions.
1198 * coff-stgo32.c (IMAGE_SCN_LNK_NRELOC_OVFL)
1199 (coff_SWAP_scnhdr_in, coff_SWAP_scnhdr_out): Define.
1200 (go32exe_mkobject): Call _bfd_go32_mkobject.
1201 * coffcode.h (COFF_WITH_EXTENDED_RELOC_COUNTER): Define.
1202 (coff_set_alignment_hook): Define function for COFF_GO32_EXE
1203 and COFF_GO32.
1204 (coff_write_relocs): Enable extended reloc counter code if
1205 COFF_WITH_EXTENDED_RELOC_COUNTER is defined. Test for obj_go32.
1206 (coff_write_object_contents): Likewise. Pad section headers
1207 for COFF_GO32 and COFF_GO32EXE. Use bfd_coff_swap_scnhdr_out
1208 instead of coff_swap_scnhdr_out.
1209 * cofflink.c (_bfd_coff_final_link): Test also for obj_go32 to
1210 enable extended reloc counter.
1211 * coffswap.h: (coff_swap_scnhdr_in, coff_swap_scnhdr_out):
1212 Declare with ATTRIBUTE_UNUSED.
1213 * libcoff-in.h: (struct coff_tdata): New field go32.
1214 (obj_go32): Define.
1215 * libcoff.h: Regenerate.
1216
34ca5531
FS
12172020-04-14 Fangrui Song <maskray@google.com>
1218
1219 PR gas/25768
1220 * elf.c (assign_section_numbers): Always set .stab sh_entsize to
1221 12.
1222
fa1477dc
SC
12232020-04-14 Stephen Casner <casner@acm.org>
1224
1225 PR ld/25677
1226 * pdp11.c: Add implementation of --imagic option.
1227 (adjust_o_magic): Fix objcopy --extract-symbol test.
1228 * libaout.h (enum aout_magic): Add i_magic.
1229
a0543b0b
RO
12302020-04-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1231 Nick Clifton <nickc@redhat.com>
1232
1233 * elf32-sparc.c (sparc_final_write_processing): Fix whitespace.
1234 <0>: Ignore.
1235 <default>: Error rather than abort.
1236
3349112e
L
12372020-04-03 H.J. Lu <hongjiu.lu@intel.com>
1238
1239 PR ld/25767
1240 * elf.c (_bfd_elf_fixup_group_sections): Remove zero-sized
1241 relocation section from section group.
1242
4d095f5b
JJ
12432020-04-02 Jan W. Jagersma <jwjagersma@gmail.com>
1244
1245 * bfdio.c (bfd_bread, bfd_tell, bfd_seek, bfd_mmap): Always add
1246 bfd->origin to file offset.
1247 * bfdwin.c (bfd_get_file_window): Likewise.
1248 * bfd.c: Clarify the use of the bfd->origin field.
1249 * bfd-in2.h: Regenerate.
1250 * coff-i386.c: Don't include go32exe.h. Allow overriding
1251 coff_write_object_contents via COFF_WRITE_CONTENTS.
1252 * coff-stgo32.c (go32exe_cleanup, go32exe_mkobject)
1253 (go32exe_write_object_contents): New functions.
1254 (go32exe_temp_stub, go32exe_temp_stub_size): New static globals.
1255 (COFF_WRITE_CONTENTS, GO32EXE_DEFAULT_STUB_SIZE): Define.
1256 (create_go32_stub): Remove check for 2k size limit. Read stub
1257 from go32exe_temp_stub if present.
1258 (go32_stubbed_coff_bfd_copy_private_bfd_data): Allocate and
1259 copy variable-length stub.
1260 (go32_check_format): Read stub to go32exe_temp_stub, set
1261 origin, return go32exe_cleanup.
1262 (adjust_filehdr_in_post, adjust_filehdr_out_pre)
1263 (adjust_filehdr_out_post, adjust_scnhdr_in_post)
1264 (adjust_scnhdr_out_pre, adjust_scnhdr_out_post)
1265 (adjust_aux_in_post, adjust_aux_out_pre, adjust_aux_out_post):
1266 Remove functions and their associated #defines.
1267 * coffcode.h (coff_mkobject_hook): Remove stub copying code.
1268 * libcoff-in.h: (struct coff_tdata): New field stub_size.
1269 Rename field go32stub to stub.
1270 * libcoff.h: Regenerate.
1271 * coff-stgo32.c (go32_check_format): Rename to...
1272 (go32exe_check_format): ...this.
1273 (go32_stubbed_coff_bfd_copy_private_bfd_data): Rename to...
1274 (go32exe_copy_private_bfd_data): ...this.
1275 (stub_bytes): Rename to...
1276 (go32exe_default_stub): ...this.
1277 (create_go32_stub): Rename to...
1278 (go32exe_create_stub): ...this.
1279 * coff-stgo32.c (go32exe_copy_private_bfd_data): Avoid realloc
1280 when possible.
1281
382aae06
L
12822020-04-01 H.J. Lu <hongjiu.lu@intel.com>
1283
1284 PR ld/25749
1285 PR ld/25754
1286 * elf32-i386.c (elf_i386_convert_load_reloc): Convert load
1287 relocation to R_386_32 for relocation against non-preemptible
1288 absolute symbol.
1289 (elf_i386_check_relocs): Call _bfd_elf_x86_valid_reloc_p. Don't
1290 allocate dynamic relocation for non-preemptible absolute symbol.
1291 (elf_i386_relocate_section): Pass sec to
1292 GENERATE_DYNAMIC_RELOCATION_P.
1293 * elf64-x86-64.c (R_X86_64_converted_reloc_bit): Moved.
1294 (elf_x86_64_convert_load_reloc): Covert load relocation to
1295 R_X86_64_32S or R_X86_64_32 for relocation against non-preemptible
1296 absolute symbol. Don't convert to R_X86_64_32S nor R_X86_64_32
1297 for non-preemptible absolute symbol if they overflow.
1298 (elf_x86_64_check_relocs): Call _bfd_elf_x86_valid_reloc_p. Set
1299 tls_type for GOT slot to GOT_ABS for non-preemptible absolute
1300 symbol. Don't allocate dynamic relocation for non-preemptible
1301 absolute symbol.
1302 (elf_x86_64_relocate_section): Don't generate relative relocation
1303 for GOTPCREL relocations aganst local absolute symbol. Pass sec
1304 to GENERATE_DYNAMIC_RELOCATION_P.
1305 * elfxx-x86.c (elf_x86_allocate_dynrelocs): No dynamic relocation
1306 against non-preemptible absolute symbol.
1307 (_bfd_elf_x86_valid_reloc_p): New function.
1308 (_bfd_x86_elf_size_dynamic_sections): No dynamic relocation for
1309 GOT_ABS GOT slot.
1310 * elfxx-x86.h (GENERATE_DYNAMIC_RELOCATION_P): Add an SEC
1311 argument. Don't generate dynamic relocation against
1312 non-preemptible absolute symbol.
1313 (ABS_SYMBOL_P): New.
1314 (GENERATE_RELATIVE_RELOC_P): Don't generate relative relocation
1315 against non-preemptible absolute symbol.
1316 (GOT_ABS): New.
1317 (R_X86_64_converted_reloc_bit): New. Moved from elf64-x86-64.c.
1318 (_bfd_elf_x86_valid_reloc_p): New.
1319
a7618269
TC
13202020-04-01 Tamar Christina <tamar.christina@arm.com>
1321
1322 PR ld/16017
1323 * elf32-arm.c (elf32_arm_populate_plt_entry): Set LSB of the PLT0
1324 address in the GOT if in thumb only mode.
1325
15ccbdd7
TC
13262020-04-01 Tamar Christina <tamar.christina@arm.com>
1327
1328 * elf32-arm.c (elf32_thumb2_plt_entry): Fix PC-rel offset.
1329
7b948a25
HPN
13302020-04-01 Hans-Peter Nilsson <hp@bitrange.com>
1331
1332 * mmo.c (mmo_scan): Create .text section only when needed, not
1333 from the start.
1334
89b599df
AM
13352020-03-31 Alan Modra <amodra@gmail.com>
1336
1337 * coff-alpha.c (alpha_ecoff_get_elt_at_filepos): Correct bfd_bread
1338 return value check.
1339
81699544
AM
13402020-03-31 Alan Modra <amodra@gmail.com>
1341
1342 * vms-alpha.c (image_write): Check bounds for sections without
1343 contents too. Error on non-zero write to section without
1344 contents.
1345 (_bfd_vms_slurp_etir): Check return of image_write* functions.
1346
b3b360de
AM
13472020-03-31 Alan Modra <amodra@gmail.com>
1348
1349 * tekhex.c (pass_over): Check is_eof before reading buffer.
1350
00386881
NC
13512020-03-30 Nick Clifton <nickc@redhat.com>
1352
1353 PR binutils/pr25662
1354 * libcoff-in.h (struct pe_tdata): Rename the insert_timestamp
1355 field to timestamp and make it an integer.
1356 * libcoff.h: Regenerate.
1357 * peXXigen.c (_bfd_XXi_only_swap_filehdr_out): Test the timestamp
1358 field in the pe_data structure rather than the insert_timestamp
1359 field.
1360
988b7300
AM
13612020-03-30 Alan Modra <amodra@gmail.com>
1362
1363 PR 25745
1364 * elf64-ppc.c (ppc64_elf_build_stubs): Use asprintf to form
1365 statistics message.
1366
aa49fc22
NC
13672020-03-26 Nick Clifton <nickc@redhat.com>
1368
1369 * cofflink.c (bfd_coff_get_internal_extra_pe_aouthdr): Delete.
1370 * libbfd-in.h (bfd_coff_get_internal_extra_pe_aouthdr): Remove
1371 prototype.
1372 * libbfd.h: Regenerate.
1373
ff768510
AM
13742020-03-26 Alan Modra <amodra@gmail.com>
1375
1376 * i386msdos.c (msdos_object_p): Catch -1 return from bfd_bread.
1377
f75fbe8a
AM
13782020-03-26 Alan Modra <amodra@gmail.com>
1379
1380 * vms-alpha.c (dst_define_location): Limit size of dst_ptr_offsets
1381 array.
1382 (_bfd_vms_slurp_object_records): Rename "err" to "ok".
1383
aac88046
NC
13842020-03-25 Nick Clifton <nickc@redhat.com>
1385
1386 * cofflink.c (bfd_coff_get_internal_extra_pe_aouthdr): New
1387 function.
1388 * libbfd-in.h (bfd_coff_get_internal_extra_pe_aouthdr): Prototype.
1389 * libbfd.h: Regenerate.
1390
cf2611fe
SV
13912020-03-25 Shahab Vahedi <shahab@synopsys.com>
1392
1393 * elf32-arc.c (PRINT_DEBUG_RELOC_INFO_BEFORE): Use the
1394 correct field name in the output string.
1395
d16e3d2e
AM
13962020-03-25 Alan Modra <amodra@gmail.com>
1397
1398 PR 25662
1399 * elf.c (assign_file_positions_for_load_sections): Adjust offset
1400 for SHT_NOBITS section if first in segment.
1401
1081065c
L
14022020-03-24 H.J. Lu <hongjiu.lu@intel.com>
1403
1404 PR binutils/25708
1405 * elf-bfd.h (_bfd_elf_get_symbol_version_name): Renamed to ...
1406 (_bfd_elf_get_symbol_version_string): This.
1407 * elf.c (_bfd_elf_get_symbol_version_name): Renamed to ...
1408 (_bfd_elf_get_symbol_version_string): This.
1409 (bfd_elf_print_symbol): Pass TRUE to
1410 _bfd_elf_get_symbol_version_string.
1411 * libbfd-in.h (_bfd_nosymbols_get_symbol_version_string): Add a
1412 bfd_boolean argument.
1413 * syms.c (_bfd_nosymbols_get_symbol_version_string): Likewise.
1414 * targets.c (_bfd_get_symbol_version_string): Likewise.
1415 (bfd_get_symbol_version_string): Likewise.
1416 * bfd-in2.h: Regenerated.
1417
0b8448af 14182020-03-24 Nick Clifton <nickc@redhat.com>
e11cd7c4 1419 Jaydeep Chauhan <jaydeepchauhan1494@gmail.com>
0b8448af
NC
1420
1421 PR 25713
1422 * bfdio.c (_bfd_real_fopen): Add code to handle long filenames on
1423 Win32 systems.
1424
ec2e748a
NC
14252020-03-24 Nick Clifton <nickc@redhat.com>
1426
1427 PR 25681
1428 * elf.c (_bfd_elf_map_sections_to_segments): When looking for a
1429 segment to use for PT_GNU_RELRO, ignore empty sections in a
1430 segment's current list.
1431
cda7e560
L
14322020-03-24 H.J. Lu <hongjiu.lu@intel.com>
1433
1434 PR binutils/25717
1435 * elf-bfd.h (elf_obj_tdata): Change num_group to unsigned int.
1436
7e6e972f
L
14372020-03-24 H.J. Lu <hongjiu.lu@intel.com>
1438
1439 PR binutils/25708
1440 * elf-bfd.h (_bfd_elf_get_symbol_version_name): New.
1441 * elf.c (_bfd_elf_get_symbol_version_name): New function. Based
1442 on the previous _bfd_elf_get_symbol_version_string.
1443 (_bfd_elf_get_symbol_version_string): Use it.
1444
65109548
AM
14452020-03-24 Alan Modra <amodra@gmail.com>
1446
1447 * archive.c (_bfd_generic_read_ar_hdr_mag): Sanity check extended
1448 name size. Use bfd_malloc rather than bfd_zmalloc, clearing just
1449 struct areltdata.
1450
fdde2fb6
SH
14512020-03-23 Sebastian Huber <sebastian.huber@embedded-brains.de>
1452
1453 * elflink.c (_bfd_elf_tls_setup): Mention .tdata in comment.
1454
cf28cfef
AM
14552020-03-23 Alan Modra <amodra@gmail.com>
1456
1457 * ecoff.c (_bfd_ecoff_slurp_armap): Sanity check parsed_size and
1458 symbol count. Allocate an extra byte to ensure name strings
1459 are terminated. Sanity check name offsets. Release memory on
1460 error return.
1461
5e737279
AM
14622020-03-23 Alan Modra <amodra@gmail.com>
1463
1464 * i386msdos.c (msdos_object_p): Don't access e_lfanew when that
1465 field hasn't been read. Remove unnecessary casts.
1466
c15a8f17
AM
14672020-03-22 Alan Modra <amodra@gmail.com>
1468
1469 * coff64-rs6000.c (xcoff64_slurp_armap): Ensure size is large
1470 enough to read number of symbols.
1471
3d98c460
L
14722020-03-20 H.J. Lu <hongjiu.lu@intel.com>
1473
1474 * configure.ac (HAVE_EXECUTABLE_SUFFIX): Removed.
1475 (EXECUTABLE_SUFFIX): Likewise.
1476 * config.in: Regenerated.
1477 * configure: Likewise.
1478 * plugin.c (bfd_plugin_close_and_cleanup): Defined as
1479 _bfd_generic_close_and_cleanup.
1480 (plugin_list_entry): Remove resolution_file, resolution_option,
1481 real_bfd, real_nsyms, real_syms, lto_nsyms, lto_syms, gcc,
1482 lto_wrapper, gcc_env and initialized,
1483 (need_lto_wrapper_p): Removed.
1484 (get_lto_wrapper): Likewise.
1485 (setup_lto_wrapper_env): Likewise.
1486 (register_all_symbols_read): Likewise.
1487 (egister_cleanup): Likewise.
1488 (get_symbols): Likewise.
1489 (add_input_file): Likewise.
1490 (bfd_plugin_set_program_name): Remove need_lto_wrapper.
1491 (add_symbols): Updated.
1492 (try_claim): Likewise.
1493 (try_load_plugin): Likewise.
1494 (bfd_plugin_canonicalize_symtab): Likewise.
1495 * plugin.h (bfd_plugin_set_program_name): Remove int argument.
1496 (plugin_data_struct): Remove real_bfd, real_nsyms and real_syms.
1497
c3a1714c
L
14982020-03-19 H.J. Lu <hongjiu.lu@intel.com>
1499
1500 PR binutils/25640
1501 * plugin.c (plugin_list_entry): Add has_symbol_type.
1502 (add_symbols_v2): New function.
1503 (bfd_plugin_open_input): Don't invoke LTO wrapper if LTO plugin
1504 provides symbol type.
1505 (try_load_plugin): Add LDPT_ADD_SYMBOLS_V2.
1506 (bfd_plugin_canonicalize_symtab): Use LTO plugin symbol type if
1507 available.
1508
67338173
AM
15092020-03-20 Alan Modra <amodra@gmail.com>
1510
1511 * coff-rs6000.c (_bfd_xcoff_slurp_armap): Ensure size is large
1512 enough to read number of symbols.
1513
a859124d
AM
15142020-03-20 Alan Modra <amodra@gmail.com>
1515
1516 * elf.c (_bfd_elf_setup_sections): Don't test known non-NULL
1517 backend functions for NULL before calling.
1518 (copy_special_section_fields, _bfd_elf_copy_private_bfd_data),
1519 (bfd_section_from_shdr, assign_section_numbers): Likewise.
1520 * elfcode.h (elf_write_relocs, elf_slurp_reloc_table): Likewise.
1521 * elfnn-ia64.c (ignore_errors): New function.
1522 (elf_backend_link_order_error_handler): Redefine as ignore_errors.
1523
f3a08f77
NC
15242020-03-19 Nick Clifton <nickc@redhat.com>
1525
1526 PR 25676
1527 * dwarf2.c (struct varinfo): Add unit_offset field to record the
1528 location of the varinfo in the unit's debug info data. Change the
1529 type of the stack field to a boolean.
1530 (lookup_var_by_offset): New function. Returns the varinfo
1531 structure for the variable described at the given offset in the
1532 unit's debug info.
1533 (scan_unit_for_symbols): Add support for variables which have the
1534 DW_AT_specification attribute.
1535
6a541707
NC
15362020-03-19 Nick Clifton <nickc@redhat.com>
1537
1538 PR 25699
1539 * elf.c (bfd_elf_set_group_contents): Replace assertion with an
1540 error return.
1541
effc14f5
SH
15422020-03-19 Sebastian Huber <sebastian.huber@embedded-brains.de>
1543
1544 * elfxx-riscv.c (riscv_parse_subset): Don't use C99.
1545
ac4bf06c
NC
15462020-03-18 Nick Clifton <nickc@redhat.com>
1547
1548 PR 25673
1549 * elf.c (_bfd_elf_write_secondary_reloc_section): Fix illegal
1550 memory access when processing a corrupt secondary reloc section.
1551
53215f21
CL
15522020-03-18 Christophe Lyon <christophe.lyon@linaro.org>
1553
1554 * elf32-arm.c (arm_build_one_stub): Emit a fatal error message
1555 instead of calling abort.
1556 * elf32-csky.c (csky_build_one_stub): Likewise.
1557 * elf32-hppa.c (hppa_build_one_stub): Likewise.
1558 * elf32-m68hc11.c (m68hc11_elf_build_one_stub): Likewise.
1559 * elf32-m68hc12.c (m68hc12_elf_build_one_stub): Likewise.
1560 * elf32-metag.c (metag_build_one_stub): Likewise.
1561 * elf32-nios2.c (nios2_build_one_stub): Likewise.
1562 * elf64-ppc.c (ppc_build_one_stub): Likewise.
1563 (ppc_size_one_stub): Likewise.
1564 * elfnn-aarch64.c (aarch64_build_one_stub): Likewise.
1565
327ef784
NC
15662020-03-17 Nick Clifton <nickc@redhat.com>
1567
d3c3c542 1568 PR 25688
327ef784
NC
1569 * elf.c (_bfd_elf_copy_special_section_fields): Replace assertions
1570 with error messages.
1571
ecbbbdba
NC
15722020-03-17 Nick Clifton <nickc@redhat.com>
1573
1574 PR 25687
1575 * elf.c (_bfd_elf_slurp_secondary_reloc_section): Remove redundant
1576 free. Add free on another failure path.
1577
4b3ecb3b
AM
15782020-03-16 Alan Modra <amodra@gmail.com>
1579
1580 PR 25675
1581 * elf.c (elf_sort_segments): Don't call bfd_octets_per_byte unless
1582 we have a non-zero section count. Do lma comparison in octets.
1583
7bac4137
AM
15842020-03-16 Alan Modra <amodra@gmail.com>
1585
1586 * vms-alpha.c (dst_restore_location): Validate index into
1587 dst_ptr_offsets array before accessing. Return status.
1588 (dst_retrieve_location): Similarly, making "loc" parameter a
1589 pointer to return value.
1590 (_bfd_vms_slurp_etir): Update calls to above functions.
1591
8b5d0a4f
KR
15922020-03-14 Kamil Rytarowski <n54@gmx.com>
1593
1594 * configure.ac: Include netbsd-core.lo for all NetBSD arm and mips
1595 targets.
1596 * configure: Regenerated.
1597
48e81d7f
AM
15982020-03-14 Alan Modra <amodra@gmail.com>
1599
1600 * section.c (BFD_FAKE_SECTIONS): Formatting.
1601 * bfd-in2.h: Regenerate.
1602
06d949ec
KR
16032020-03-13 Kamil Rytarowski <n54@gmx.com>
1604
1605 * elf.c (elfcore_grok_netbsd_note): Add support for
1606 NT_NETBSDCORE_LWPSTATUS notes.
1607
abf874aa
CL
16082020-03-13 Christophe Lyon <christophe.lyon@linaro.org>
1609
1610 * bfd-in2.h: Regenerate.
1611 * section.c (asection): Add already_assigned field.
1612 (BFD_FAKE_SECTION): Add default initializer for it.
1613 * ecoff.c (bfd_debug_section): Initialize already_assigned field.
1614 * elf32-arm.c (arm_build_one_stub): Add support for
1615 non_contiguous_regions.
1616 * elf32-csky.c (csky_build_one_stub): Likewise.
1617 * elf32-hppa.c (hppa_build_one_stub): Likewise.
1618 * elf32-m68hc11.c (m68hc11_elf_build_one_stub): Likewise.
1619 * elf32-m68hc12.c (m68hc12_elf_build_one_stub): Likewise.
1620 * elf32-metag.c (metag_build_one_stub): Likewise.
1621 * elf32-nios2.c (nios2_build_one_stub): Likewise.
1622 * elf64-ppc.c (ppc_build_one_stub): Likewise.
1623 (ppc_size_one_stub): Likewise.
1624 * elfnn-aarch64.c (aarch64_build_one_stub): Likewise.
1625 * elflink.c (elf_link_input_bfd): Likewise.
1626
74e10d17
L
16272020-03-13 H.J. Lu <hongjiu.lu@intel.com>
1628
1629 PR ld/24920
1630 * elf-linker-x86.h (elf_linker_x86_params): Add
1631 static_before_all_inputs and has_dynamic_linker.
1632 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Report
1633 dynamic input objects if -static is passed at command-line
1634 before all input files without --dynamic-linker unless
1635 --no-dynamic-linker is used.
1636
015ec493
KR
16372020-03-13 Kamil Rytarowski <n54@gmx.com>
1638
1639 * elf.c (elfcore_grok_netbsd_note): Add support for aarch64.
1640
66631823
CE
16412020-03-13 Christian Eggers <ceggers@gmx.de>
1642
1643 * bfd.c (bfd_record_phdr): New local "opb". Fix assignment of
1644 "p_paddr" from "at".
1645 * elfcode.h (bfd_from_remote_memory): Add units to several
1646 parameters. New local "opb". Fix usage of p_align. Fix
1647 calculation of "localbase" from "ehdr_vma" and "p_vaddr". Fix
1648 call of target_read_memory.
1649 * elflink.c (elf_fixup_link_order): Fix scope of "s" local. Fix
1650 calculation of "offset" and "output_offset".
1651 (bfd_elf_final_link): New local "opb". Fix calculation of "size"
1652 from "offset" and fix calculation of "end" from "vma+size". Fix
1653 comparison between "sh_addr" and "vma"/"output_offset".
1654 (bfd_elf_discard_info): Fix calculation of "eh_alignment".
1655 * elf-bfd.h (struct elf_link_hash_table): Add unit to tls_size
1656 member.
1657 * elf.c (_bfd_elf_map_sections_to_segments): Add unit (bytes/
1658 octets) to "wrap_to2 and "phdr_size" locals. Fix calculation of
1659 "wrap_to" value. Add unit (bytes) to phdr_lma variable. Fix
1660 assignment of p_paddr from phdr_lma. Fix comparison between
1661 "lma+size" and "next->lma".
1662 (elf_sort_segments): Fix assignment from p_paddr to lma.
1663 (assign_file_positions_for_load_sections): Add unit (bytes) to
1664 local "align". Fix calculation of local "off_adjust". Fix
1665 calculation of local "filehdr_vaddr".
1666 (assign_file_positions_for_non_load_sections): New local "opb".
1667 Fix calculation of "end" from "p_size". Fix comparison between
1668 "vma+SECTION_SIZE" and "start". Fix calculation of "p_memsz"
1669 from "end" and "p_vaddr".
1670 (rewrite_elf_program_header): Fix comparison between p_vaddr and
1671 vma. Fix assignment to p_paddr from lma. Fix comparison between
1672 p_paddr and lma. Fix assignment to p_paddr from lma.
1673 * merge.c (sec_merge_emit): New local "opb". Convert
1674 "alignment_power" to octets.
1675 (_bfd_add_merge_section): New locals "alignment_power" and
1676 "opb". Fix comparison between "alignment_power" and
1677 "sizeof(align)".
1678 (_bfd_merge_sections): New local "opb". Divide size by opb
1679 before checking align mask.
1680
502794d4
CE
16812020-03-13 Christian Eggers <ceggers@gmx.de>
1682
1683 * elf.c (_bfd_elf_make_section_from_shdr): Introduce new temp
1684 opb. Divide Elf_Internal_Shdr::sh_addr by opb when setting
1685 section LMA/VMA.
1686 (_bfd_elf_make_section_from_phdr): Similarly.
1687 (elf_fake_sections): Fix calculation of
1688 Elf_Internal_shdr::sh_addr from section VMA.
1689 (_bfd_elf_map_sections_to_segments): Fix mixup between octets
1690 and bytes.
1691 (assign_file_positions_for_load_sections): Fix calculations of
1692 Elf_Internal_shdr::p_vaddr and p_paddr from section LMA/VMA. Fix
1693 comparison between program header address and section LMA.
1694 (assign_file_positions_for_non_load_sections): Likewise.
1695 (rewrite_elf_program_header): Likewise. Introduce new temp opb.
1696 (IS_CONTAINED_BY_VMA): Add parameter opb.
1697 (IS_CONTAINED_BY_LMA,IS_SECTION_IN_INPUT_SEGMENT,
1698 INCLUDE_SECTION_IN_SEGMENT): Likewise.
1699 (copy_elf_program_header): Update call to ELF_SECTION_IN_SEGMENT.
1700 Fix calculations of p_addr_valid and p_vaddr_offset.
1701 * elflink.c (elf_link_add_object_symbols): Multiply section VMA
1702 with octets per byte when comparing against p_vaddr.
1703
8248d21a
AM
17042020-03-11 Alan Modra <amodra@gmail.com>
1705
1706 * som.c (setup_sections): Sanity check subspace.name.
1707
435edf0b
AM
17082020-03-11 Alan Modra <amodra@gmail.com>
1709
1710 * elf64-ppc.c (ppc64_elf_inline_plt): Do increment rel in for loop.
1711
6b5e16ff
AM
17122020-03-10 Alan Modra <amodra@gmail.com>
1713
1714 PR 25648
1715 * ihex.c (ihex_write_object_contents): Don't assume ordering of
1716 addresses here.
1717
2f57795b
AM
17182020-03-09 Alan Modra <amodra@gmail.com>
1719
1720 * wasm-module.c (wasm_scan): Sanity check file name length
1721 before allocating memory. Move common section setup code. Do
1722 without bfd_tell to calculate section size.
1723
a0dcf297
NC
17242020-03-06 Nick Clifton <nickc@redhat.com>
1725
1726 * elf.c (_bfd_elf_set_section_contents): Replace call to abort
1727 with error messages and failure return values.
1728
e15a8da9
MF
17292020-03-05 Max Filippov <jcmvbkbc@gmail.com>
1730
1731 * elf32-xtensa.c (shrink_dynamic_reloc_sections): Shrink dynamic
1732 relocation sections for any removed reference to a dynamic symbol.
1733
a8e14f4c
NC
17342020-03-05 Nick Clifton <nickc@redhat.com>
1735
1736 * elf-bfd.h (struct elf_backend_data): Add new fields:
1737 init_secondary_reloc_section, slurp_secondary_reloc_section,
1738 write_secondary_reloc_section.
1739 (_bfd_elf_init_secondary_reloc_section): Prototype.
1740 (_bfd_elf_slurp_secondary_reloc_section): Prototype.
1741 (_bfd_elf_write_secondary_reloc_section): Prototype.
1742 * elf.c ( bfd_section_from_shdr): Invoke the new
1743 init_secondary_reloc_section backend function, if defined, when a
1744 second reloc section is encountered.
1745 (swap_out_syms): Invoke the new symbol_section_index function, if
1746 defined, when computing the section index of an OS/PROC specific
1747 symbol.
1748 (_bfd_elf_init_secondary_reloc_section): New function.
1749 (_bfd_elf_slurp_secondary_reloc_section): New function.
1750 (_bfd_elf_write_secondary_reloc_section): New function.
1751 (_bfd_elf_copy_special_section_fields): New function.
1752 * elfcode.h (elf_write_relocs): Invoke the new
1753 write_secondary_relocs function, if defined, in order to emit
1754 secondary relocs.
1755 (elf_slurp_reloc_table): Invoke the new slurp_secondary_relocs
1756 function, if defined, in order to read in secondary relocs.
1757 * elfxx-target.h (elf_backend_copy_special_section_fields):
1758 Provide a non-NULL default definition.
1759 (elf_backend_init_secondary_reloc_section): Likewise.
1760 (elf_backend_slurp_secondary_reloc_section): Likewise.
1761 (elf_backend_write_secondary_reloc_section): Likewise.
1762 (struct elf_backend_data elfNN_bed): Add initialisers for the new
1763 fields.
1764 * configure.ac (score_elf32_[bl]e_vec): Add elf64.lo
1765 * configure: Regenerate.
1766
6f8f95b4
AM
17672020-03-05 Alan Modra <amodra@gmail.com>
1768
1769 * archive64.c (_bfd_archive_64_bit_slurp_armap): Check parsed_size
1770 against file size before allocating memory. Use bfd_alloc rather
1771 than bfd_zalloc for carsym/strings memory.
1772
233bf4f8
AM
17732020-03-04 Alan Modra <amodra@gmail.com>
1774
1775 * elf.c (elf_fake_sections): Ensure sh_addralign is such that
1776 sh_addr mod sh_addalign is zero.
1777
1039fd9a
AM
17782020-03-04 Alan Modra <amodra@gmail.com>
1779
1780 * format.c (bfd_check_format_matches): Call cleanup on error exit.
1781
f5714099
AM
17822020-03-03 Alan Modra <amodra@gmail.com>
1783
1784 * format.c (struct bfd_preserve): Add cleanup field.
1785 (bfd_preserve_save): Add cleanup param and save.
1786 (bfd_preserve_restore): Return cleanup.
1787 (bfd_preserve_finish): Call the cleanup for the discarded match.
1788 (bfd_check_format_matches): Pass cleanup to bfd_preserve_save,
1789 and clear when preserving a match. Restore cleanup too when
1790 restoring that match.
1791
40b35c78
AM
17922020-03-02 Alan Modra <amodra@gmail.com>
1793
1794 * cisco-core.c (cisco_core_file_p): Return bfd_cleanup.
1795 * hpux-core.c (hpux_core_core_file_p): Update prototype.
1796 * sco5-core.c (sco5_core_file_p): Return bfd_cleanup.
1797 (core_sco5_vec): Correct initialisers.
1798
601b73d5
AM
17992020-03-02 Alan Modra <amodra@gmail.com>
1800
1801 * aix386-core.c (aix386_core_file_p): Return bfd_cleanup.
1802 * aix5ppc-core.c (xcoff64_core_p): Likewise.
1803 * cisco-core.c (cisco_core_file_validate): Likewise.
1804 * hppabsd-core.c (hppabsd_core_core_file_p): Likewise.
1805 * hpux-core.c (hpux_core_core_file_p): Likewise.
1806 * irix-core.c (irix_core_core_file_p): Likewise.
1807 * lynx-core.c (lynx_core_file_p): Likewise.
1808 * netbsd-core.c (netbsd_core_file_p): Likewise.
1809 * osf-core.c (osf_core_core_file_p): Likewise.
1810 * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
1811 * sco5-core.c (sco5_core_file_p): Likewise.
1812
728d32c4
L
18132020-03-02 H.J. Lu <hongjiu.lu@intel.com>
1814
1815 * trad-core.c (trad_unix_core_file_p): Return bfd_cleanup.
1816
cb001c0d
AM
18172020-03-02 Alan Modra <amodra@gmail.com>
1818
1819 * targets.c (bfd_cleanup): New typedef.
1820 (struct bfd <_bfd_check_format>): Return a bfd_cleanup.
1821 * libbfd-in.h (_bfd_no_cleanup): Define.
1822 * format.c (bfd_reinit): Add cleanup parameter, call it.
1823 (bfd_check_format_matches): Set cleanup from _bfd_check_format
1824 call and pass to bfd_reinit. Delete temp, use abfd->xvec instead.
1825 * aout-target.h (callback, object_p): Return bfd_cleanup.
1826 * aout-tic30.c (tic30_aout_callback, tic30_aout_object_p): Likewise.
1827 * archive.c (bfd_generic_archive_p): Likewise.
1828 * binary.c (binary_object_p): Likewise.
1829 * coff-alpha.c (alpha_ecoff_object_p): Likewise.
1830 * coff-ia64.c (ia64coff_object_p): Likewise.
1831 * coff-rs6000.c (_bfd_xcoff_archive_p, rs6000coff_core_p): Likewise.
1832 * coff-sh.c (coff_small_object_p): Likewise.
1833 * coff-stgo32.c (go32_check_format): Likewise.
1834 * coff64-rs6000.c (xcoff64_archive_p, rs6000coff_core_p),
1835 (xcoff64_core_p): Likewise.
1836 * coffgen.c (coff_real_object_p, coff_object_p): Likewise.
1837 * elf-bfd.h (bfd_elf32_object_p, bfd_elf32_core_file_p),
1838 (bfd_elf64_object_p, bfd_elf64_core_file_p): Likewise.
1839 * elfcode.h (elf_object_p): Likewise.
1840 * elfcore.h (elf_core_file_p): Likewise.
1841 * i386msdos.c (msdos_object_p): Likewise.
1842 * ihex.c (ihex_object_p): Likewise.
1843 * libaout.h (some_aout_object_p): Likewise.
1844 * libbfd-in.h (bfd_generic_archive_p, _bfd_dummy_target),
1845 (_bfd_vms_lib_alpha_archive_p, _bfd_vms_lib_ia64_archive_p): Likewise.
1846 * libbfd.c (_bfd_dummy_target): Likewise.
1847 * libcoff-in.h (coff_object_p): Likewise.
1848 * mach-o-aarch64.c (bfd_mach_o_arm64_object_p),
1849 (bfd_mach_o_arm64_core_p): Likewise.
1850 * mach-o-arm.c (bfd_mach_o_arm_object_p),
1851 (bfd_mach_o_arm_core_p): Likewise.
1852 * mach-o-i386.c (bfd_mach_o_i386_object_p),
1853 (bfd_mach_o_i386_core_p): Likewise.
1854 * mach-o-x86-64.c (bfd_mach_o_x86_64_object_p),
1855 (bfd_mach_o_x86_64_core_p): Likewise.
1856 * mach-o.c (bfd_mach_o_header_p, bfd_mach_o_gen_object_p),
1857 (bfd_mach_o_gen_core_p, bfd_mach_o_fat_archive_p): Likewise.
1858 * mach-o.h (bfd_mach_o_object_p, bfd_mach_o_core_p),
1859 (bfd_mach_o_fat_archive_p, bfd_mach_o_header_p): Likewise.
1860 * mmo.c (mmo_object_p): Likewise.
1861 * pef.c (bfd_pef_object_p, bfd_pef_xlib_object_p): Likewise.
1862 * peicode.h (coff_real_object_p, pe_ILF_object_p),
1863 (pe_bfd_object_p): Likewise.
1864 * plugin.c (ld_plugin_object_p, bfd_plugin_object_p): Likewise.
1865 * ppcboot.c (ppcboot_object_p): Likewise.
1866 * rs6000-core.c (rs6000coff_core_p): Likewise.
1867 * som.c (som_object_setup, som_object_p): Likewise.
1868 * srec.c (srec_object_p, symbolsrec_object_p): Likewise.
1869 * tekhex.c (tekhex_object_p): Likewise.
1870 * vms-alpha.c (alpha_vms_object_p): Likewise.
1871 * vms-lib.c (_bfd_vms_lib_archive_p, _bfd_vms_lib_alpha_archive_p),
1872 (_bfd_vms_lib_ia64_archive_p, _bfd_vms_lib_txt_archive_p): Likewise.
1873 * wasm-module.c (wasm_object_p): Likewise.
1874 * xsym.c (bfd_sym_object_p): Likewise.
1875 * xsym.h (bfd_sym_object_p): Likewise.
1876 * aoutx.h (some_aout_object_p): Likewise, and callback parameter
1877 return type.
1878 * pdp11.c (some_aout_object_p): Likewise.
1879 * plugin.c (register_ld_plugin_object_p): Update object_p
1880 parameter type.
1881 * plugin.h (register_ld_plugin_object_p): Likewise.
1882 * bfd-in2.h: Regenerate.
1883 * libbfd.h: Regenerate.
1884 * libcoff.h: Regenerate.
1885
a4dd6c97
AM
18862020-03-02 Alan Modra <amodra@gmail.com>
1887
1888 * coff-alpha.c (alpha_ecoff_le_vec): Add SEC_SMALL_DATA to
1889 applicable section flags.
1890 * coff-mips.c (mips_ecoff_le_vec, mips_ecoff_be_vec): Likewise.
1891 (mips_ecoff_bele_vec): Likewise.
1892 * coffcode.h (sec_to_styp_flags): Set SEC_SMALL_DATA for .sdata
1893 and .sbss sections.
1894 * ecoff.c (_bfd_ecoff_new_section_hook): Likewise.
1895 (_bfd_ecoff_styp_to_sec_flags): Likewise.
1896
bf577467
AM
18972020-03-02 Alan Modra <amodra@gmail.com>
1898
1899 * elf32-m32r.c (m32r_elf_section_flags): New function.
1900 (elf_backend_section_flags): Define.
1901 * elf32-nds32.c (nds32_elf_section_flags): New function.
1902 (elf_backend_section_flags): Define.
1903 * elf32-ppc.c (ppc_elf_section_from_shdr): Set SEC_SMALL_DATA for
1904 .sbss and .sdata sections.
1905 * elf32-v850.c (v850_elf_section_from_shdr): Set SEC_SMALL_DATA
1906 for SHF_V850_GPREL sections.
1907 * elf64-alpha.c (elf64_alpha_section_from_shdr): Delete outdated
1908 FIXME.
1909 * elf64-hppa.c (elf64_hppa_section_from_shdr): Set SEC_SMALL_DATA
1910 for SHF_PARISC_SHORT sections.
1911 * elf64-ppc.c (ppc64_elf_section_flags): New function.
1912 (elf_backend_section_flags): Define.
1913 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Set SEC_SMALL_DATA
1914 for SHF_MIPS_GPREL sections. Delete FIXME.
1915
8c803a2d
AM
19162020-03-02 Alan Modra <amodra@gmail.com>
1917
1918 * elf-bfd.h (elf_backend_section_flags): Remove flagword* param.
1919 * elf.c (_bfd_elf_make_section_from_shdr): Set section flags before
1920 calling elf_backend_section_flags with adjusted params. Use
1921 newsect->flags past that point.
1922 (_bfd_elf_new_section_hook): Always set sh_type and sh_flags for
1923 special sections.
1924 (_bfd_elf_init_private_section_data): Allow normal sh_type sections
1925 to have their type overridden, and all sh_flags but processor and
1926 os specific.
1927 * elf32-arm.c (elf32_arm_section_flags): Adjust for changed params.
1928 * elf32-mep.c (mep_elf_section_flags): Likewise.
1929 * elf32-nios2.c (nios2_elf32_section_flags): Likewise.
1930 * elf64-alpha.c (elf64_alpha_section_flags): Likewise.
1931 * elf64-ia64-vms.c (elf64_ia64_section_flags): Likewise.
1932 * elfnn-ia64.c (elfNN_ia64_section_flags): Likewise.
1933 * elfnn-aarch64.c (elfNN_aarch64_size_stubs): Exclude the linker
1934 stub BFD and non-aarch64 input files when scanning for stubs.
1935
7d4b2d2d
AM
19362020-03-02 Alan Modra <amodra@gmail.com>
1937
1938 * coff-alpha.c (alpha_ecoff_get_elt_at_filepos): Provide an upper
1939 limit to decompressed element size.
1940
26f60d59
AM
19412020-03-02 Alan Modra <amodra@gmail.com>
1942
1943 * vms-lib.c (vms_traverse_index): Add recur_count param and
1944 update calls. Fail on excessive recursion.
1945
9cb56943
AM
19462020-03-02 Alan Modra <amodra@gmail.com>
1947
1948 * vms-alpha.c (vms_get_remaining_object_record): Use
1949 bfd_realloc_or_free rather than bfd_realloc.
1950 (add_symbol_entry, vector_grow1, alpha_vms_slurp_relocs): Likewise.
1951 (dst_define_location, parse_module): Likewise, and check realloc
1952 return status before using memory. Return status from function
1953 adjusting all callers.
1954
182ec670
AM
19552020-02-28 Alan Modra <amodra@gmail.com>
1956
1957 * vms-lib.c (_bfd_vms_lib_archive_p): Free memory on error paths.
1958
1b088c82
AM
19592020-02-28 Alan Modra <amodra@gmail.com>
1960
1961 * vms-alpha.c (alpha_vms_object_p): Use _bfd_malloc_and_read.
1962 Remove duplicate undersize check.
1963
5f602802
AM
19642020-02-27 Alan Modra <amodra@gmail.com>
1965
1966 PR 24511
1967 * mmo.c (mmo_scan): Set SEC_DATA for .data.
1968
49d9fd42
AM
19692020-02-27 Alan Modra <amodra@gmail.com>
1970
1971 PR 24511
1972 * syms.c (stt): Trim off all but 'e', 'i' and 'p' entries.
1973 (coff_section_type): Adjust comment.
1974 (decode_section_type): Likewise. Call coff_section_type before
1975 decode_section_type.
1976 (bfd_decode_symclass): Use 'c' for common sections other than
1977 the standard one.
1978
05f52dc2
AM
19792020-02-27 Alan Modra <amodra@gmail.com>
1980
1981 * coff-rs6000.c (_bfd_xcoff_read_ar_hdr): Put all data in one
1982 malloc'd block.
1983
ff69a894
AM
19842020-02-27 Alan Modra <amodra@gmail.com>
1985
1986 * bfd.c (bfd_stat_arch_elt): Use vector of containing archive,
1987 if file is an archive element.
1988 * bfd-in2.h: Regenerate.
1989
02f7e7ee
AM
19902020-02-26 Alan Modra <amodra@gmail.com>
1991
1992 * archive.c (do_slurp_bsd_armap): Increase minimum parsed_size, and
1993 bfd_set_error on failing test. Don't bother changing bfd_error on
1994 file read error. Check symdef_count is multiple of BSD_SYMDEF_SIZE.
1995 Check sym name is within string buffer. Use size_t for some vars.
1996 (do_slurp_coff_armap): Use size_t for some variables, fix size of
1997 int_buf. Don't change bfd_error on file read error. Use
1998 _bfd_mul_overflow when calculating carsym buffer size. Reorder
1999 calculations to catch overflows before they occur. malloc and
2000 free raw armap rather than using bfd_alloc. Read raw armap before
2001 allocating carsym+strings buffer.
2002 (_bfd_slurp_extended_name_table): Localize variables. Check
2003 name size against file size.
2004
cc4c4f40
AM
20052020-02-26 Alan Modra <amodra@gmail.com>
2006
2007 * vms-lib.c (vms_lib_read_index): Release correct buffer.
2008
e0b317de
AM
20092020-02-26 Alan Modra <amodra@gmail.com>
2010
2011 * elf32-rx.c (rx_elf_relocate_section): Use bfd_malloc rather than
2012 malloc. Check for NULL return from bfd_malloc.
2013 (rx_table_find, rx_table_map): Likewise.
2014 (rx_set_section_contents): Check bfd_alloc return.
2015 (rx_dump_symtab): Don't alloc internal_syms or external_syms.
2016
dc1e8a47
AM
20172020-02-26 Alan Modra <amodra@gmail.com>
2018
2019 * aoutx.h: Indent labels correctly. Format error strings.
2020 * archive.c: Likewise.
2021 * archive64.c: Likewise.
2022 * coff-arm.c: Likewise.
2023 * coff-rs6000.c: Likewise.
2024 * coff-stgo32.c: Likewise.
2025 * cpu-arm.c: Likewise.
2026 * dwarf2.c: Likewise.
2027 * elf-ifunc.c: Likewise.
2028 * elf-properties.c: Likewise.
2029 * elf-s390-common.c: Likewise.
2030 * elf-strtab.c: Likewise.
2031 * elf.c: Likewise.
2032 * elf32-arm.c: Likewise.
2033 * elf32-bfin.c: Likewise.
2034 * elf32-cr16.c: Likewise.
2035 * elf32-csky.c: Likewise.
2036 * elf32-i386.c: Likewise.
2037 * elf32-m68k.c: Likewise.
2038 * elf32-msp430.c: Likewise.
2039 * elf32-nds32.c: Likewise.
2040 * elf32-nios2.c: Likewise.
2041 * elf32-pru.c: Likewise.
2042 * elf32-xtensa.c: Likewise.
2043 * elf64-ia64-vms.c: Likewise.
2044 * elf64-x86-64.c: Likewise.
2045 * elfcode.h: Likewise.
2046 * elfcore.h: Likewise.
2047 * elflink.c: Likewise.
2048 * elfnn-aarch64.c: Likewise.
2049 * elfnn-ia64.c: Likewise.
2050 * elfnn-riscv.c: Likewise.
2051 * elfxx-mips.c: Likewise.
2052 * elfxx-sparc.c: Likewise.
2053 * elfxx-x86.c: Likewise.
2054 * i386lynx.c: Likewise.
2055 * merge.c: Likewise.
2056 * pdp11.c: Likewise.
2057 * plugin.c: Likewise.
2058 * reloc.c: Likewise.
2059
e310298c
AM
20602020-02-26 Alan Modra <amodra@gmail.com>
2061
2062 PR 25593
2063 * elf-bfd.h (struct elf_link_hash_table): Rename "loaded" to
2064 "dyn_loaded".
2065 (bfd_elf_add_dt_needed_tag): Declare.
2066 * elf-strtab.c (_bfd_elf_strtab_restore): Handle NULL buf.
2067 * elflink.c (bfd_elf_add_dt_needed_tag): Make global and rename
2068 from elf_add_dt_needed_tag. Remove soname and doit param.
2069 (elf_link_add_object_symbols): Don't use elf_add_dt_needed_tag
2070 to see whether as-needed lib is already loaded, use dyn_loaded
2071 list instead. When saving and restoring around as-needed lib
2072 handle possibility that dynstr has not been initialised. Don't
2073 add DT_NEEDED tags here. Limit dyn_loaded list to dynamic libs.
2074 Mark libs loaded via DT_NEEDED entries of other libs with
2075 DYN_NO_NEEDED if they should not be mentioned in DT_NEEDED of
2076 the output.
2077 (elf_link_check_versioned_symbol): Remove now unneccesary
2078 DYNAMIC check when traversing dyn_loaded list.
2079
b570b954
AM
20802020-02-26 Alan Modra <amodra@gmail.com>
2081
2082 * bfdio.c (bfd_get_file_size): Ignore bogus archive element sizes.
2083
ecda9016
L
20842020-02-25 H.J. Lu <hongjiu.lu@intel.com>
2085
2086 PR binutils/25584
2087 * plugin.c (need_lto_wrapper_p): New.
2088 (bfd_plugin_set_program_name): Add an int argument to set
2089 need_lto_wrapper_p.
2090 (get_lto_wrapper): Return FALSE if need_lto_wrapper_p isn't
2091 set.
2092 * plugin.h (bfd_plugin_set_program_name): Add an int argument.
2093
a98c743f
AM
20942020-02-24 Alan Modra <amodra@gmail.com>
2095
2096 * vms-lib.c (_bfd_vms_lib_archive_p): Correct overflow checks.
2097
c893ce36
AM
20982020-02-24 Alan Modra <amodra@gmail.com>
2099
2100 * vms-lib.c (struct carsym_mem): Add limit.
2101 (vms_add_index): Heed limit.
2102 (vms_traverse_index): Catch buffer overflows. Remove outdated fixme.
2103 (vms_lib_read_index): Set up limit. Catch 32-bit overflow.
2104 Always return actual number read.
2105 (_bfd_vms_lib_archive_p): Catch buffer overflows. Replace
2106 assertion with error exit.
2107
7b3c2715
AM
21082020-02-22 Alan Modra <amodra@gmail.com>
2109
2110 PR 25585
2111 * elf.c (assign_file_positions_for_load_sections): Continue linking
2112 on "PHDR segment not covered by LOAD segment" errors.
2113
a4425a57
AM
21142020-02-21 Alan Modra <amodra@gmail.com>
2115
2116 * mach-o.c (bfd_mach_o_canonicalize_relocs): Fix ineffective
2117 overflow check.
2118 (bfd_mach_o_canonicalize_reloc): Likewise.
2119 (bfd_mach_o_canonicalize_dynamic_reloc): Likewise. Sanity check
2120 counts and offsets against file size.
2121 (bfd_mach_o_build_dysymtab): Fix ineffective overflow check.
2122 (bfd_mach_o_mangle_sections): Remove unnecessary overflow check.
2123 (bfd_mach_o_read_symtab_symbols): Sanity check count and offset
2124 against file size. Delete symbol table error message.
2125 (bfd_mach_o_read_dysymtab): Sanity check counts and offsets
2126 against file size.
2127 (bfd_mach_o_read_symtab): Likewise.
2128 (bfd_mach_o_read_command): Pass file size.
2129 (bfd_mach_o_scan): Sanity check command count against file size.
2130
dda2980f
AM
21312020-02-21 Alan Modra <amodra@gmail.com>
2132
2133 PR 25569
2134 * aoutx.h (adjust_o_magic, adjust_z_magic, adjust_n_magic): Use
2135 "text", "data" and "bss" section pointer vars. Don't update
2136 section size, just exec header sizes.
2137 (adjust_sizes_and_vmas): Don't update text section size. Set
2138 initial exec header a_text. Print exec headers sizes.
2139 * pdp11.c (adjust_o_magic, adjust_z_magic, adjust_n_magic),
2140 (adjust_sizes_and_vmas): Similarly. Formatting.
2141 (final_link): Correct final file extension.
2142
00e49dff
NC
21432020-02-20 Nick Clifton <nickc@redhat.com>
2144
2145 * elf-bfd.h (struct elf_backend_data): Add symbol_section_index
2146 callback.
2147 * elfxx-target.h (elf_backend_symbol_section_index): Provide
2148 default definition.
2149 (elfNN_bed): Initialise the symbol_section_index field.
2150 * elf.c (swap_out_syms): Call symbol_section_index, if defined, on
2151 OS and PROC specific section indicies. Warn if converting other
2152 reserved incidies to SHN_ABS.
2153
fcaaac0a
SB
21542020-02-19 Sergey Belyashov <sergey.belyashov@gmail.com>
2155
2156 PR 25537
2157 * cpu-z80.c: Add machine type compatibility checking.
2158
dcf06b89
L
21592020-02-19 H.J. Lu <hongjiu.lu@intel.com>
2160
2161 PR binutils/25355
2162 * plugin.c (plugin_list_entry): Remove handle.
2163 (try_load_plugin): Call dlclose before return.
2164
2c7c5554
AM
21652020-02-19 Alan Modra <amodra@gmail.com>
2166
2167 * libbfd-in.h (_bfd_constant_p): Define.
2168 (_bfd_alloc_and_read, _bfd_malloc_and_read): Check read size against
2169 file size before allocating memory.
2170 * coffgen.c (_bfd_coff_get_external_symbols): Remove file size check.
2171 * elf.c (bfd_elf_get_str_section): Likewise.
2172 (_bfd_elf_slurp_version_tables): Likewise.
2173 * libbfd.h: Regenerate.
2174
2bb3687b
AM
21752020-02-19 Alan Modra <amodra@gmail.com>
2176
2177 * libbfd-in.h (_bfd_alloc_and_read, _bfd_malloc_and_read): New.
2178 * aoutx.h (aout_get_external_symbols): Replace calls to
2179 bfd_[m]alloc and bfd_bread with call to _bfd_[m]alloc_and_read.
2180 (slurp_reloc_table): Likewise.
2181 * archive.c (do_slurp_bsd_armap): Likewise.
2182 (do_slurp_coff_armap): Likewise.
2183 * archive64.c (_bfd_archive_64_bit_slurp_armap): Likewise.
2184 * coff-rs6000.c (_bfd_xcoff_slurp_armap): Likewise.
2185 * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
2186 * coffcode.h (coff_set_arch_mach_hook, buy_and_read): Likewise.
2187 * coffgen.c (coff_real_object_p, coff_object_p, build_debug_section),
2188 (_bfd_coff_get_external_symbols): Likewise.
2189 * ecoff.c (ecoff_slurp_symbolic_header),
2190 (_bfd_ecoff_slurp_symbolic_info, ecoff_slurp_reloc_table),
2191 (_bfd_ecoff_slurp_armap, ecoff_link_add_object_symbols, READ),
2192 (ecoff_indirect_link_order): Likewise.
2193 * elf.c (bfd_elf_get_str_section, setup_group, elf_read_notes),
2194 (_bfd_elf_slurp_version_tables): Likewise.
2195 * elf32-m32c.c (m32c_elf_relax_section): Likewise.
2196 * elf32-rl78.c (rl78_elf_relax_section): Likewise.
2197 * elf32-rx.c (elf32_rx_relax_section): Likewise.
2198 * elf64-alpha.c (READ): Likewise.
2199 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Likewise.
2200 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Likewise.
2201 * elfcode.h (elf_slurp_symbol_table),
2202 (elf_slurp_reloc_table_from_section): Likewise.
2203 * elflink.c (elf_link_add_object_symbols),
2204 (elf_link_check_versioned_symbol): Likewise.
2205 * elfxx-mips.c (READ): Likewise.
2206 * i386lynx.c (slurp_reloc_table): Likewise.
2207 * lynx-core.c (lynx_core_file_p): Likewise.
2208 * mach-o.c (bfd_mach_o_canonicalize_relocs),
2209 (bfd_mach_o_read_symtab_strtab, bfd_mach_o_alloc_and_read),
2210 (bfd_mach_o_read_prebound_dylib, bfd_mach_o_read_dyld_content
2211 * pdp11.c (aout_get_external_symbols, slurp_reloc_table
2212 * pef.c (bfd_pef_print_loader_section, bfd_pef_scan_start_address),
2213 (bfd_pef_parse_symbols): Likewise.
2214 * peicode.h (pe_ILF_object_p, pe_bfd_object_p
2215 * som.c (setup_sections, som_slurp_string_table),
2216 (som_slurp_reloc_table, som_bfd_count_ar_symbols),
2217 (som_bfd_fill_in_ar_symbols): Likewise.
2218 * vms-alpha.c (module_find_nearest_line, evax_bfd_print_dst),
2219 (evax_bfd_print_image): Likewise.
2220 * vms-lib.c (_bfd_vms_lib_archive_p): Likewise.
2221 * wasm-module.c (wasm_scan): Likewise.
2222 * xcofflink.c (xcoff_link_add_symbols): Likewise.
2223 * xsym.c (bfd_sym_read_name_table),
2224 (bfd_sym_print_type_information_table_entry): Likewise.
2225 * libbfd.h: Regenerate.
2226
806470a2
AM
22272020-02-19 Alan Modra <amodra@gmail.com>
2228
2229 * aoutx.h (slurp_reloc_table): Allocate reloc_cache after
2230 reading external relocs.
2231 * ecoff.c (ecoff_slurp_reloc_table): Likewise.
2232 * archive.c (_bfd_write_archive_contents): Don't twiddle bfd_error
2233 after bfd_bread.
2234 * archive64.c (_bfd_archive_64_bit_slurp_armap): Remove unnecessary
2235 bfd_release.
2236 * elf32-m32c.c (m32c_offset_for_reloc): Make shndx_buf a bfd_byte*.
2237 (m32c_elf_relax_section): Likewise.
2238 * elf32-rl78.c (rl78_offset_for_reloc): Likewise.
2239 (rl78_elf_relax_section): Likewise.
2240 * elf32-rx.c (rx_offset_for_reloc): Likewise.
2241 (elf32_rx_relax_section): Likewise.
2242 * mach-o.c (bfd_mach_o_alloc_and_read): Move earlier with better
2243 parameter types and use..
2244 (bfd_mach_o_read_dylinker, bfd_mach_o_read_dylib),
2245 (bfd_mach_o_read_fvmlib, bfd_mach_o_read_str): ..in these functions.
2246 * peicode.h (pe_bfd_object_p): Don't zero the part of opthdr
2247 being read from file, just the extra.
2248 * som.c (som_slurp_symbol_table): Allocate internal symbol buffer
2249 after reading external syms. Free on failure.
2250
1f4361a7
AM
22512020-02-19 Alan Modra <amodra@gmail.com>
2252
2253 * coffcode.h (buy_and_read, coff_slurp_line_table),
2254 (coff_slurp_symbol_table, coff_slurp_reloc_table): Replace
2255 bfd_[z][m]alloc2 calls with _bfd_mul_overflow followed by the
2256 corresponding bfd_alloc call. Adjust variables to suit.
2257 * coffgen.c (_bfd_coff_get_external_symbols): Likewise.
2258 * ecoff.c (_bfd_ecoff_slurp_symbolic_info),
2259 (_bfd_ecoff_slurp_symbol_table, READ): Likewise.
2260 * elf.c (bfd_elf_get_elf_syms, setup_group, bfd_section_from_shdr),
2261 (swap_out_syms, _bfd_elf_slurp_version_tables): Likewise.
2262 * elf32-m32c.c (m32c_elf_relax_section): Likewise.
2263 * elf32-rl78.c (rl78_elf_relax_section): Likewise.
2264 * elf32-rx.c (elf32_rx_relax_section): Likewise.
2265 * elf64-alpha.c (READ): Likewise.
2266 * elfcode.h (elf_object_p, elf_write_relocs, elf_write_shdrs_and_ehdr),
2267 (elf_slurp_symbol_table, elf_slurp_reloc_table),
2268 (bfd_from_remote_memory): Likewise.
2269 * elfcore.h (core_find_build_id): Likewise.
2270 * elfxx-mips.c (READ): Likewise.
2271 * mach-o.c (bfd_mach_o_mangle_sections),
2272 (bfd_mach_o_read_symtab_symbols, bfd_mach_o_read_thread),
2273 (bfd_mach_o_read_dysymtab, bfd_mach_o_flatten_sections),
2274 (bfd_mach_o_scan, bfd_mach_o_fat_archive_p): Likewise.
2275 * som.c (setup_sections, som_prep_for_fixups)
2276 (som_build_and_write_symbol_table, som_slurp_symbol_table),
2277 (som_slurp_reloc_table, som_bfd_count_ar_symbols),
2278 (som_bfd_fill_in_ar_symbols, som_slurp_armap),
2279 (som_bfd_ar_write_symbol_stuff): Likewise.
2280 * vms-alpha.c (vector_grow1): Likewise.
2281 * vms-lib.c (vms_add_index): Likewise.
2282 * wasm-module.c (wasm_scan_name_function_section): Likewise.
2283 * libbfd.c (bfd_malloc2, bfd_realloc2, bfd_zmalloc2): Delete.
2284 * opncls.c (bfd_alloc2, bfd_zalloc2): Delete.
2285 * libbfd-in.h (bfd_malloc2, bfd_realloc2, bfd_zmalloc2),
2286 (bfd_alloc2, bfd_zalloc2): Delete.
2287 (_bfd_mul_overflow): Define.
2288 * libbfd.h: Regenerate.
2289
446f7ed5
AM
22902020-02-19 Alan Modra <amodra@gmail.com>
2291
2292 * elf.c (bfd_section_from_shdr): Use bfd_zalloc rather than
2293 bfd_zalloc2.
2294 (assign_section_numbers): Likewise.
2295 (elf_map_symbols): Likewise, and bfd_alloc rather than bfd_alloc2.
2296 (_bfd_elf_map_sections_to_segments): Use bfd_malloc rather than
2297 bfd_malloc2, size_t amt, and unsigned tls_count.
2298 (rewrite_elf_program_header): Use bfd_malloc and size_t amt.
2299 * elflink.c (elf_create_symbuf): Use bfd_malloc.
2300 (elf_output_implib): Use bfd_alloc.
2301
b03202e3
AM
23022020-02-19 Alan Modra <amodra@gmail.com>
2303
2304 * bfd.c (struct bfd): Move format and direction to other
2305 bitfields. Add "size".
2306 * bfdio.c (bfd_get_size): Cache size when not writing file.
2307 * opncls.c (bfd_get_debug_link_info_1): Allow for bfd_get_size
2308 returning zero, ie. unknown.
2309 (bfd_get_alt_debug_link_info): Likewise.
2310 * bfd-in2.h: Regenerate.
2311
7c5fa58e
AM
23122020-02-19 Alan Modra <amodra@gmail.com>
2313
2314 * coffgen.c (_bfd_coff_get_external_symbols): Don't call
2315 bfd_get_file_size twice.
2316 (_bfd_coff_read_string_table): Allow for bfd_get_file_size
2317 zero, ie. unknown, return.
2318 * elf-attrs.c (_bfd_elf_parse_attributes): Likewise.
2319 * elfcode.h (elf_swap_shdr_in): Likewise.
2320 (elf_object_p): Don't call bfd_get_file_size twice and correct
2321 file size check.
2322
96d3b80f
AM
23232020-02-19 Alan Modra <amodra@gmail.com>
2324
2325 * mach-o.c (bfd_mach_o_flatten_sections): Return a bfd_boolean,
2326 FALSE if memory alloc fails. Adjust calls.
2327 * som.c (som_prep_for_fixups): Likewise.
2328 * vms-alpha.c (alpha_vms_add_fixup_lp, alpha_vms_add_fixup_ca),
2329 (alpha_vms_add_fixup_qr, alpha_vms_add_fixup_lr),
2330 (alpha_vms_add_lw_reloc, alpha_vms_add_qw_reloc): Likewise.
2331 * som.c (som_build_and_write_symbol_table): Return via error_return
2332 on seek failure.
2333 * vms-alpha.c (VEC_APPEND): Adjust for vector_grow1 changes.
2334 (VEC_APPEND_EL): Delete.
2335 (vector_grow1): Return pointer to element. Catch overflow.
2336 Return NULL on memory allocation failure.
2337 (alpha_vms_add_fixup_lp): Replace VEC_APPEND_EL with VEC_APPEND.
2338 (alpha_vms_add_fixup_ca): Likewise.
2339 (alpha_vms_link_add_object_symbols): Check VEC_APPEND result
2340 before using.
2341 * elf.c (bfd_section_from_shdr): Check bfd_zalloc2 result.
2342
986f0783
AM
23432020-02-19 Alan Modra <amodra@gmail.com>
2344
2345 * aix386-core.c (aix386_core_file_p): Use size_t for "amt".
2346 * aout-target.h (object_p): Likewise.
2347 * aout-tic30.c (tic30_aout_object_p): Likewise.
2348 * aoutx.h (some_aout_object_p, mkobject, make_empty_symbol),
2349 (emit_stringtab, write_syms, link_hash_table_create),
2350 (aout_link_write_other_symbol): Likewise.
2351 * archive.c (_bfd_generic_mkarchive, bfd_generic_archive_p),
2352 (bfd_ar_hdr_from_filesystem, _bfd_write_archive_contents),
2353 (_bfd_compute_and_write_armap): Likewise.
2354 * archures.c (bfd_arch_list): Likewise.
2355 * bfd.c (bfd_record_phdr): Likewise.
2356 * binary.c (binary_canonicalize_symtab): Likewise.
2357 * cisco-core.c (cisco_core_file_validate): Likewise.
2358 * coff-arm.c (coff_arm_link_hash_table_create, find_thumb_glue),
2359 (find_arm_glue, record_arm_to_thumb_glue),
2360 (record_thumb_to_arm_glue): Likewise.
2361 * coff-ppc.c (ppc_coff_link_hash_table_create, record_toc),
2362 (ppc_allocate_toc_section): Likewise.
2363 * coff-rs6000.c (_bfd_xcoff_mkobject, _bfd_xcoff_archive_p): Likewise.
2364 * coff-sh.c (sh_relax_section): Likewise.
2365 * coff64-rs6000.c (xcoff64_archive_p): Likewise.
2366 * coffcode.h (handle_COMDAT, coff_new_section_hook),
2367 (coff_set_alignment_hook, coff_mkobject),
2368 (coff_compute_section_file_positions): Likewise.
2369 * coffgen.c (coff_make_empty_symbol, coff_bfd_make_debug_symbol),
2370 (coff_find_nearest_line_with_names),
2371 ( bfd_coff_set_symbol_class): Likewise.
2372 * cofflink.c (_bfd_coff_link_hash_table_create),
2373 (_bfd_coff_link_input_bfd): Likewise.
2374 * dwarf1.c (alloc_dwarf1_unit, alloc_dwarf1_func): Likewise.
2375 * dwarf2.c (read_abbrevs, read_attribute_value, add_line_info),
2376 (build_line_info_table, sort_line_sequences),
2377 (line_info_add_include_dir, line_info_add_file_name),
2378 (decode_line_info, scan_unit_for_symbols, parse_comp_unit),
2379 (place_sections, _bfd_dwarf2_slurp_debug_info): Likewise.
2380 * ecoff.c (_bfd_ecoff_mkobject, _bfd_ecoff_make_empty_symbol),
2381 (_bfd_ecoff_find_nearest_line),
2382 (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
2383 * ecofflink.c (bfd_ecoff_debug_init): Likewise.
2384 * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Likewise.
2385 * elf-m10300.c (mn10300_elf_relax_section),
2386 (elf32_mn10300_link_hash_table_create): Likewise.
2387 * elf-strtab.c (_bfd_elf_strtab_init): Likewise.
2388 * elf.c (make_mapping, copy_elf_program_header): Likewise.
2389 * elf32-arm.c (elf32_arm_link_hash_table_create),
2390 (elf32_arm_setup_section_lists, elf32_arm_check_relocs),
2391 (elf32_arm_new_section_hook): Likewise.
2392 * elf32-avr.c (elf_avr_new_section_hook),
2393 (elf32_avr_link_hash_table_create, get_local_syms),
2394 (elf32_avr_setup_section_lists): Likewise.
2395 * elf32-bfin.c (bfinfdpic_elf_link_hash_table_create),
2396 (bfin_link_hash_table_create): Likewise.
2397 * elf32-cr16.c (elf32_cr16_link_hash_table_create): Likewise.
2398 * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
2399 * elf32-csky.c (csky_elf_link_hash_table_create),
2400 (csky_elf_check_relocs, elf32_csky_setup_section_lists): Likewise.
2401 * elf32-frv.c (frvfdpic_elf_link_hash_table_create): Likewise.
2402 * elf32-hppa.c (elf32_hppa_link_hash_table_create),
2403 (elf32_hppa_setup_section_lists, get_local_syms): Likewise.
2404 * elf32-i386.c (elf_i386_check_relocs): Likewise.
2405 * elf32-lm32.c (lm32_elf_link_hash_table_create): Likewise.
2406 * elf32-m32r.c (m32r_elf_link_hash_table_create),
2407 (m32r_elf_check_relocs): Likewise.
2408 * elf32-m68hc1x.c (m68hc11_elf_hash_table_create),
2409 (elf32_m68hc11_setup_section_lists),
2410 (elf32_m68hc11_size_stubs): Likewise.
2411 * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
2412 * elf32-metag.c (elf_metag_link_hash_table_create),
2413 (elf_metag_setup_section_lists): Likewise.
2414 * elf32-microblaze.c (microblaze_elf_link_hash_table_create),
2415 (microblaze_elf_check_relocs): Likewise.
2416 * elf32-nds32.c (nds32_elf_link_hash_table_create),
2417 (nds32_elf_check_relocs): Likewise.
2418 * elf32-nios2.c (nios2_elf32_setup_section_lists),
2419 (get_local_syms, nios2_elf32_check_relocs),
2420 (nios2_elf32_link_hash_table_create): Likewise.
2421 * elf32-or1k.c (or1k_elf_link_hash_table_create),
2422 (or1k_elf_check_relocs): Likewise.
2423 * elf32-ppc.c (ppc_elf_modify_segment_map, update_plt_info): Likewise.
2424 * elf32-pru.c (pru_elf32_link_hash_table_create): Likewise.
2425 * elf32-s390.c (elf_s390_link_hash_table_create),
2426 (elf_s390_check_relocs): Likewise.
2427 * elf32-score.c (score_elf_create_got_section),
2428 (s3_elf32_score_new_section_hook),
2429 (elf32_score_link_hash_table_create): Likewise.
2430 * elf32-score7.c (score_elf_create_got_section),
2431 (s7_elf32_score_new_section_hook): Likewise.
2432 * elf32-sh.c (sh_elf_link_hash_table_create),
2433 (sh_elf_check_relocs): Likewise.
2434 * elf32-tic6x.c (elf32_tic6x_link_hash_table_create),
2435 (elf32_tic6x_new_section_hook, elf32_tic6x_check_relocs): Likewise.
2436 * elf32-tilepro.c (tilepro_elf_link_hash_table_create),
2437 (tilepro_elf_check_relocs): Likewise.
2438 * elf32-v850.c (remember_hi16s_reloc): Likewise.
2439 * elf32-vax.c (elf_vax_link_hash_table_create): Likewise.
2440 * elf32-xtensa.c (elf_xtensa_link_hash_table_create),
2441 (elf_xtensa_new_section_hook): Likewise.
2442 * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create),
2443 (get_got_entry, elf64_alpha_check_relocs): Likewise.
2444 * elf64-hppa.c (elf64_hppa_hash_table_create): Likewise.
2445 * elf64-ia64-vms.c (elf64_ia64_object_p): Likewise.
2446 * elf64-mmix.c (mmix_elf_new_section_hook): Likewise.
2447 * elf64-ppc.c (ppc64_elf_new_section_hook),
2448 (ppc64_elf_link_hash_table_create, update_local_sym_info),
2449 (update_plt_info, ppc64_elf_check_relocs): Likewise.
2450 * elf64-s390.c (elf_s390_link_hash_table_create),
2451 (elf_s390_check_relocs): Likewise.
2452 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
2453 * elflink.c (bfd_elf_link_record_local_dynamic_symbol),
2454 (_bfd_elf_link_find_version_dependencies, elf_link_add_object_symbols),
2455 (elf_link_add_archive_symbols, compute_bucket_count),
2456 (bfd_elf_size_dynsym_hash_dynstr, _bfd_elf_link_hash_table_create),
2457 (bfd_elf_get_bfd_needed_list, elf_link_swap_symbols_out),
2458 (bfd_elf_final_link): Likewise.
2459 * elfnn-aarch64.c (elfNN_aarch64_link_hash_table_create),
2460 (elfNN_aarch64_setup_section_lists, elfNN_aarch64_check_relocs),
2461 (elfNN_aarch64_new_section_hook): Likewise.
2462 * elfnn-ia64.c (elfNN_ia64_object_p): Likewise.
2463 * elfnn-riscv.c (riscv_elf_link_hash_table_create),
2464 (riscv_elf_check_relocs): Likewise.
2465 * elfxx-mips.c (_bfd_mips_elf_new_section_hook),
2466 (_bfd_mips_elf_add_symbol_hook, _bfd_mips_elf_check_relocs),
2467 (_bfd_mips_elf_modify_segment_map, _bfd_mips_elf_set_section_contents),
2468 (_bfd_mips_elf_link_hash_table_create): Likewise.
2469 * elfxx-sparc.c (_bfd_sparc_elf_link_hash_table_create),
2470 (_bfd_sparc_elf_check_relocs),
2471 (_bfd_sparc_elf_new_section_hook): Likewise.
2472 * elfxx-tilegx.c (tilegx_elf_link_hash_table_create),
2473 (tilegx_elf_check_relocs): Likewise.
2474 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Likewise.
2475 * format.c (bfd_check_format_matches): Likewise.
2476 * hash.c (_bfd_stringtab_init): Likewise.
2477 * ihex.c (ihex_scan): Likewise.
2478 * irix-core.c (irix_core_core_file_p): Likewise.
2479 * linker.c (bfd_wrapped_link_hash_lookup),
2480 (_bfd_generic_link_hash_table_create),
2481 (_bfd_generic_reloc_link_order): Likewise.
2482 * lynx-core.c (lynx_core_file_p): Likewise.
2483 * netbsd-core.c (netbsd_core_file_p): Likewise.
2484 * osf-core.c (osf_core_core_file_p): Likewise.
2485 * pdp11.c (some_aout_object_p, mkobject, make_empty_symbol),
2486 (link_hash_table_create, aout_link_write_other_symbol): Likewise.
2487 * peXXigen.c (_bfd_XX_bfd_copy_private_section_data): Likewise.
2488 * peicode.h (pe_mkobject): Likewise.
2489 * ppcboot.c (ppcboot_mkobject, ppcboot_canonicalize_symtab): Likewise.
2490 * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
2491 * sco5-core.c (read_uarea): Likewise.
2492 * som.c (hppa_som_gen_reloc_type, som_object_p, som_prep_headers),
2493 (som_write_fixups, som_write_space_strings, som_write_symbol_strings),
2494 (som_finish_writing, som_canonicalize_symtab, som_new_section_hook),
2495 (som_bfd_copy_private_section_data, bfd_som_set_section_attributes),
2496 (bfd_som_attach_aux_hdr, som_write_armap): Likewise.
2497 * srec.c (srec_scan): Likewise.
2498 * syms.c (_bfd_generic_make_empty_symbol): Likewise.
2499 * targets.c (bfd_target_list): Likewise.
2500 * tekhex.c (first_phase, tekhex_sizeof_headers): Likewise.
2501 * trad-core.c (trad_unix_core_file_p): Likewise.
2502 * vms-alpha.c (vms_initialize, alpha_vms_bfd_link_hash_table_create),
2503 (vms_new_section_hook): Likewise.
2504 * wasm-module.c (wasm_make_empty_symbol): Likewise.
2505 * xcofflink.c (xcoff_get_section_contents),
2506 (_bfd_xcoff_bfd_link_hash_table_create, xcoff_set_import_path),
2507 (xcoff_find_function, bfd_xcoff_link_record_set, xcoff_build_ldsym),
2508 (bfd_xcoff_size_dynamic_sections, xcoff_link_input_bfd): Likewise.
2509
2d0e1217
AM
25102020-02-19 Alan Modra <amodra@gmail.com>
2511
2512 * elfxx-riscv.c (riscv_multi_letter_ext_valid_p): Don't use C99.
2513
99845b3b
L
25142020-02-13 H.J. Lu <hongjiu.lu@intel.com>
2515
2516 * plugin.c (try_load_plugin): Make plugin_list_iter an argument
2517 and use it if it isn't NULL. Remove has_plugin_p argument. Add
2518 a build_list_p argument. Don't search plugin_list. Short circuit
2519 when building the plugin list.
2520 (has_plugin): Renamed to has_plugin_list.
2521 (bfd_plugin_set_plugin): Don't set has_plugin.
2522 (bfd_plugin_specified_p): Check plugin_list instead.
2523 (build_plugin_list): New function.
2524 (load_plugin): Call build_plugin_list and use plugin_list.
2525
22fe7df8
L
25262020-02-11 H.J. Lu <hongjiu.lu@intel.com>
2527
2528 PR binutils/25355
2529 * plugin.c (try_claim): Always clean up for LTO wrapper.
2530 (try_load_plugin): Treat each object as independent. Create a
2531 copy for plugin name.
2532
c675ec1e
NC
25332020-02-11 Nick Clifton <nickc@redhat.com>
2534
2535 * elf32-msp430.c (msp430_final_link_relocate): Always use longs
2536 for addresses in print statements.
2537 (msp430_elf_relax_delete_bytes): Likewise.
2538 (msp430_elf_relax_add_words): Likewise.
2539 (msp430_elf_relax_section): Likewise.
2540
1d07a805
L
25412020-02-11 H.J. Lu <hongjiu.lu@intel.com>
2542
2543 * plugin.c (add_symbols): Clear plugin_data memory.
2544
0aa99dcd
L
25452020-02-10 H.J. Lu <hongjiu.lu@intel.com>
2546
2547 PR binutils/25355
2548 * configure.ac (HAVE_EXECUTABLE_SUFFIX): New AC_DEFINE.
2549 (EXECUTABLE_SUFFIX): Likewise.
2550 * config.in: Regenerated.
2551 * configure: Likewise.
2552 * plugin.c (bfd_plugin_close_and_cleanup): Removed.
2553 (plugin_list_entry): Add all_symbols_read, cleanup_handler,
2554 gcc, lto_wrapper, resolution_file, resolution_option, gcc_env,
2555 real_bfd, real_nsyms, real_syms, lto_nsyms and lto_syms.
2556 (get_lto_wrapper): New.
2557 (setup_lto_wrapper_env): Likewise.
2558 (current_plugin): Likewise.
2559 (register_all_symbols_read): Likewise.
2560 (register_cleanup): Likewise.
2561 (get_symbols): Likewise.
2562 (add_input_file): Likewise.
2563 (bfd_plugin_close_and_cleanup): Likewise.
2564 (claim_file): Removed.
2565 (register_claim_file): Set current_plugin->claim_file.
2566 (add_symbols): Make a copy of LTO symbols. Set lto_nsyms and
2567 lto_syms in current_plugin.
2568 (try_claim): Use current_plugin->claim_file. Call LTO plugin
2569 all_symbols_read handler. Copy real symbols to plugin_data.
2570 Call LTO plugin cleanup handler. Clean up for LTO wrapper.
2571 (try_load_plugin): Don't reuse the previous plugin for LTO
2572 wrapper. Set up GCC LTO wrapper if possible. Don't set
2573 plugin_list_iter->claim_file.
2574 (bfd_plugin_canonicalize_symtab): Use real LTO symbols if
2575 possible.
2576 * plugin.h (plugin_data_struct): Add real_bfd, real_nsyms and
2577 real_syms.
2578
ac4280da
JL
25792020-02-10 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2580
2581 * elf32-msp430.c (msp430_elf_relax_section): Before relaxing a branch,
2582 check if previous instruction matches a conditional jump inserted
2583 earlier. Invert conditional jump and delete branch in this case.
2584
8d6cb116
JL
25852020-02-10 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2586
2587 * elf32-msp430.c (msp430_elf_relax_add_two_words): Rename to
2588 msp430_elf_relax_add_words. Support insertion of either one or two
2589 words.
2590 (msp430_elf_relax_section): Catch opcode of 0x3c00 when relocation
2591 needs to be grown. Handle insertion of branch instruction to replace
2592 jump.
2593
d60f5448
JL
25942020-02-10 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2595
2596 * elf32-msp430.c (msp430_final_link_relocate): Add printf statements for
2597 debugging relocations.
2598 (msp430_elf_relax_delete_bytes): Likewise.
2599 (msp430_elf_relax_add_two_words): Likewise.
2600 (msp430_elf_relax_section): Likewise.
2601
e1f85e11
AM
26022020-02-10 Alan Modra <amodra@gmail.com>
2603
2604 * archures.c: Wrap overlong z80 comments.
2605 * bfd-in2.h: Regenerate.
2606
9fc0b501
SB
26072020-02-07 Sergey Belyashov <sergey.belyashov@gmail.com>
2608
2609 PR 25469
2610 * archures.c: Add GBZ80 and Z80N machine values.
2611 * reloc.c: Add BFD_RELOC_Z80_16_BE.
2612 * coff-z80.c: Add support for new reloc.
2613 * coffcode.h: Add support for new machine values.
2614 * cpu-z80.c: Add support for new machine names.
2615 * elf32-z80.c: Add support for new reloc.
2616 * bfd-in2.h: Regenerate.
2617 * libbfd.h: Regenerate.
2618
9984857c
NC
26192020-02-07 Nick Clifton <nickc@redhat.com>
2620
2621 PR 23932
2622 * elf.c (rewrite_elf_program_header): Do not complain if no
2623 sections are mapped to a segment.
2624
5242a0a0
L
26252020-02-06 H.J. Lu <hongjiu.lu@intel.com>
2626
2627 PR ld/25490
2628 * elflink.c (_bfd_elf_gc_mark_extra_sections): Issue an error
2629 for garbage collection on __patchable_function_entries section
2630 without linked-to section.
2631
b7d07216
L
26322020-02-06 H.J. Lu <hongjiu.lu@intel.com>
2633
2634 PR gas/25381
2635 * bfd-in2.h: Regenerated.
2636 * elflink.c (_bfd_elf_gc_mark_extra_sections): Call mark_hook
2637 on section if gc_mark of any of its linked-to sections is set
2638 and don't set gc_mark again.
2639 * section.c (asection): Add linked_to_symbol_name to map_head
2640 union.
2641
b93a662b
MR
26422020-02-06 Maciej W. Rozycki <macro@wdc.com>
2643
2644 * elf32-v850.c (v850_elf_relax_section): Fix the index used for
2645 reporting an unrecognized instruction with R_V850_LONGJUMP.
2646
6df4c9c2
AM
26472020-02-05 Alan Modra <amodra@gmail.com>
2648
2649 * elf64-ppc.c (ppc_stub_plt_branch): Match comment with reality.
2650
24872cb3
AM
26512020-02-04 Alan Modra <amodra@gmail.com>
2652
2653 * elf32-ppc.c (ppc_elf_relocate_section): After applying
2654 R_PPC_VLE_ADDR20, goto copy_reloc.
2655
ef4627fa
L
26562020-02-02 H.J. Lu <hongjiu.lu@intel.com>
2657
2658 * bfd-in2.h: Regenerated.
2659 * section.c (SEC_ASSEMBLER_SECTION_ID): Fix a typo in comments.
2660
a8c4d40b
L
26612020-02-02 H.J. Lu <hongjiu.lu@intel.com>
2662
2663 PR gas/25380
2664 * bfd-in2.h: Regenerated.
2665 * ecoff.c (bfd_debug_section): Add section_id.
2666 * section.c (bfd_section): Add section_id.
2667 (SEC_ASSEMBLER_SECTION_ID): New.
2668 (BFD_FAKE_SECTION): Add section_id.
2669
5a9212a1
NC
26702020-02-01 Nick Clifton <nickc@redhat.com>
2671
2672 * config.bfd: Move the c30-aout and tic30-aout targets onto the
2673 obsolete list.
2674
e7cbe0c4
SL
26752020-01-31 Sandra Loosemore <sandra@codesourcery.com>
2676
2677 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): DW_EH_PE_datarel
2678 encodings are relative to the GOT on nios2, too.
2679
72ebe8c5
AM
26802020-01-31 Alan Modra <amodra@gmail.com>
2681
2682 * Makefile.am (elf32-target.h, elf64-target.h): Don't use a temp
2683 file. Use $< and $@ in rules.
2684 (elf32-aarch64.c, elf64-aarch64.c): Likewise.
2685 (elf32-ia64.c, elf64-ia64.c): Likewise.
2686 (elf32-riscv.c, elf64-riscv.c): Likewise.
2687 (peigen.c, pepigen.c, pex64igen.c): Likewise.
2688 (elf32-aarch64.c, elf64-aarch64.c): Don't emit $srcdir on #line.
2689 (elf32-riscv.c, elf64-riscv.c): Likewise, and use $(SED).
2690 (elf32-ia64.c, elf64-ia64.c): Do emit #line.
2691 (peigen.c, pepigen.c, pex64igen.c): Likewise.
2692 * Makefile.in: Regenerate.
2693
327301a4
AM
26942020-01-31 Alan Modra <amodra@gmail.com>
2695
2696 PR 4110
2697 * elf.c (setup_group): Don't clear entire section contents,
2698 just the padding after group flags. Release alloc'd memory
2699 after a seek or read failure.
2700
b5d36aaa
JT
27012020-01-16 Jon Turney <jon.turney@dronecode.org.uk>
2702
2703 * peXXigen.c (pe_is_repro): New function.
2704 (_bfd_XX_print_private_bfd_data_common): Note timestamp is
2705 actually a build hash if PE_IMAGE_DEBUG_TYPE_REPRO is present.
2706
1957ab10
JT
27072020-01-16 Jon Turney <jon.turney@dronecode.org.uk>
2708
2709 * peXXigen.c (debug_type_names): Add names for new debug data type
2710 values.
2711
87b2920f
JT
27122020-01-16 Jon Turney <jon.turney@dronecode.org.uk>
2713
2714 * peXXigen.c (pe_print_debugdata): Fix the iteration variable for
2715 inner loop. Fix a memory leak.
2716
72913831
AM
27172020-01-30 Alan Modra <amodra@gmail.com>
2718
2719 * coffgen.c (coff_real_object_p): Don't clear obj_coff_keep_syms
2720 or obj_coff_keep_strings here.
2721 (coff_get_normalized_symtab): Free external syms directly.
2722 * xcofflink.c (xcoff_link_input_bfd): Restore obj_coff_keep_syms
2723 on error exit path.
2724
c35d018b
JW
27252020-01-27 Jim Wilson <jimw@sifive.com>
2726
2727 * cpu-riscv.c (riscv_scan): New.
2728 (N): Change bfd_default_scan to riscv_scan.
2729
086b06f3
AS
27302020-01-27 Andreas Schwab <schwab@suse.de>
2731
2732 * Makefile.am (ALL_MACHINES): Remove cpu-plugin.lo.
2733 (ALL_MACHINES_CFILES): Remove cpu-plugin.c.
2734 * Makefile.in: Regenerate.
2735 * cpu-plugin.c: Remove.
2736 * archures.c (enum bfd_architecture): Remove bfd_arch_plugin.
2737 (bfd_plugin_arch): Remove declaration.
2738 * bfd-in2.h: Regenerate.
2739 * po/SRC-POTFILES.in: Regenerate.
2740
3024a17a
AM
27412020-01-27 H.J. Lu <hongjiu.lu@intel.com>
2742 Alan Modra <amodra@gmail.com>
2743
2744 PR ld/25458
2745 * elflink.c (_bfd_elf_gc_mark_rsec): Mark all weak aliases.
2746
b5f998b2
JW
27472020-01-24 Jim Wilson <jimw@sifive.com>
2748
2749 * elfxx-riscv.c (riscv_get_prefix_class): Format s case like others.
2750 (riscv_parse_prefixed_ext): Fix s extension comment and reword to
2751 avoid over long line.
2752
caa31cfa
NC
27532020-01-24 Nick Clifton <nickc@redhat.com>
2754
2755 PR 25447
2756 * coffgen.c (_bfd_coff_close_and_cleanup): Do not clear the keep
2757 syms and keep strings flags as these may have been set in order to
2758 prevent a bogus call to free.
2759
24e648d4
NC
27602020-01-23 Nick Clifton <nickc@redhat.com>
2761
2762 * po/fr.po: Updated French translation.
2763
67641dd3
AM
27642020-01-23 Alan Modra <amodra@gmail.com>
2765
2766 PR 25444
2767 * elf.c (assign_file_positions_for_load_sections): Avoid divide
2768 by zero when p_align is zero.
2769
403d1bd9
JW
27702020-01-22 Maxim Blinov <maxim.blinov@embecosm.com>
2771
2772 * bfd/elfnn-riscv.c (riscv_skip_prefix): New.
2773 (riscv_prefix_cmp): Likewise.
2774 (riscv_non_std_ext_p): Deleted.
2775 (riscv_std_sv_ext_p): Likewise.
2776 (riscv_non_std_sv_ext_p): Likewise.
2777 (riscv_merge_non_std_and_sv_ext): Rename to...
2778 (riscv_merge_multi_letter_ext): and modified to use riscv_prefix_cmp.
2779 (riscv_merge_arch_attr_info): Replace 3 calls to
2780 riscv_merge_non_std_and_sv_ext with single call to
2781 riscv_merge_multi_letter_ext.
2782 * bfd/elfxx-riscv.c (riscv_parse_std_ext): Break if we
2783 encounter a 'z' prefix.
2784 (riscv_get_prefix_class): New function, return prefix class based
2785 on first few characters of input string.
2786 (riscv_parse_config): New structure to factor out minor differences
2787 in extension class parsing behaviour.
2788 (riscv_parse_sv_or_non_std_ext): Rename to...
2789 (riscv_parse_prefixed_ext): and parameterise with
2790 riscv_parse_config.
2791 (riscv_std_z_ext_strtab, riscv_std_s_ext_strtab): New.
2792 (riscv_multi_letter_ext_valid_p): New.
2793 (riscv_ext_x_valid_p, riscv_ext_z_valid_p, riscv_ext_s_valid_p): New.
2794 (riscv_parse_subset): Delegate all non-single-letter parsing work
2795 to riscv_parse_prefixed_ext.
2796 * bfd/elfxx-riscv.h (riscv_isa_ext_class): New type.
2797 (riscv_get_prefix_class): Declare.
2798
a804e476
AM
27992020-01-22 Alan Modra <amodra@gmail.com>
2800
2801 * elf64-ppc.c (struct ppc_link_hash_table): Add tga_group.
2802 (ppc64_elf_archive_symbol_lookup): Extract __tls_get_addr_opt for
2803 __tls_get_addr_desc.
2804 (ppc64_elf_size_stubs): Add section for linker generated
2805 __tls_get_addr_desc wrapper function. Loop at least once if
2806 generating this function.
2807 (emit_tga_desc, emit_tga_desc_eh_frame): New functions.
2808 (ppc64_elf_build_stubs): Generate __tls_get_addr_desc.
2809
9e7028aa
AM
28102020-01-22 Alan Modra <amodra@gmail.com>
2811
2812 * elf64-ppc.h (struct ppc64_elf_params): Add no_tls_get_addr_regsave.
2813 * elf64-ppc.c (struct ppc_link_hash_table): Add tga_desc and
2814 tga_desc_fd.
2815 (is_tls_get_addr): Match tga_desc and tga_desc_df too.
2816 (STDU_R1_0R1, ADDI_R1_R1): Define.
2817 (tls_get_addr_prologue, tls_get_addr_epilogue): New functions.
2818 (ppc64_elf_tls_setup): Set up tga_desc and tga_desc_fd. Indirect
2819 tga_desc_fd to opt_fd, and tga_desc to opt. Set
2820 no_tls_get_addr_regsave.
2821 (branch_reloc_hash_match): Add hash3 and hash4.
2822 (ppc64_elf_tls_optimize): Handle tga_desc_fd and tga_desc too.
2823 (ppc64_elf_size_dynamic_sections): Likewise.
2824 (ppc64_elf_relocate_section): Likewise.
2825 (plt_stub_size, build_plt_stub): Likewise. Size regsave
2826 __tls_get_addr stub.
2827 (build_tls_get_addr_stub): Build regsave __tls_get_addr stub and
2828 eh_frame.
2829 (ppc_size_one_stub): Handle tga_desc_fd and tga_desc too. Size
2830 eh_frame for regsave __tls_get_addr.
2831
abc489c6
AM
28322020-01-22 Alan Modra <amodra@gmail.com>
2833
2834 * elf64-ppc.c (ppc64_elf_size_stubs): Correct condition under
2835 which __tls_get_addr calls will be eliminated.
2836
26916852
NC
28372020-01-20 Nick Clifton <nickc@redhat.com>
2838
2839 * po/pt.po: Updates Portuguese translation.
2840 * po/ru.po: Updated Russian translation.
2841 * po/uk.po: Updated Ukranian translation.
2842
14470f07
L
28432020-01-20 H.J. Lu <hongjiu.lu@intel.com>
2844
2845 PR ld/25416
2846 * elf64-x86-64.c (elf_x86_64_check_tls_transition): Support
2847 "rex leal x@tlsdesc(%rip), %reg" and "call *x@tlsdesc(%eax)" in
2848 X32 mode.
2849 (elf_x86_64_relocate_section): In x32 mode, for GDesc -> LE
2850 transition, relax "rex leal x@tlsdesc(%rip), %reg" to
2851 "rex movl $x@tpoff, %reg", for GDesc -> IE transition, relax
2852 "rex leal x@tlsdesc(%rip), %reg" to
2853 "rex movl x@gottpoff(%rip), %eax". For both transitions, relax
2854 "call *(%eax)" to "nopl (%rax)".
2855
b9ca1af6
AM
28562020-01-20 Alan Modra <amodra@gmail.com>
2857
2858 * elf64-ppc.c (LD_R11_0R3, CMPDI_R11_0, STD_R11_0R1, LD_R11_0R1),
2859 (MTLR_R11): Don't define.
2860 (LD_R0_0R3, CMPDI_R0_0): Define.
2861 (build_tls_get_addr_stub): Don't use r11 in stub.
2862
ed7007c1
AM
28632020-01-20 Alan Modra <amodra@gmail.com>
2864
2865 * elf64-ppc.c (ppc_elf_hash_entry): New function, use throughout file.
2866 (defined_sym_val, is_tls_get_addr): Likewise.
2867
1b1bb2c6
NC
28682020-01-18 Nick Clifton <nickc@redhat.com>
2869
2870 * version.m4 (BFD_VERSION): Set to 2.34.50.
2871 * configure: Regenerate.
2872 * po/bfd.pot: Regenerate.
2873
ae774686
NC
28742020-01-18 Nick Clifton <nickc@redhat.com>
2875
2876 Binutils 2.34 branch created.
2877
07f1f3aa
CB
28782020-01-17 Christian Biesinger <cbiesinger@google.com>
2879
2880 * coff-arm.c: Fix spelling error (seperate).
2881 * elfxx-riscv.c (riscv_parse_sv_or_non_std_ext): Fix spelling
2882 error (seperate).
2883 * sysdep.h (strnlen): Fix spelling error (seperate).
2884
0d1cc75d
LB
28852020-01-15 Lars Brinkhoff <lars@nocrew.org>
2886
2887 PR 20694
2888 * pdp11.c (TARGET_PAGE_SIZE): Set to 8192.
2889
e1c6cf61
AM
28902020-01-15 Alan Modra <amodra@gmail.com>
2891
2892 PR 25384
2893 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Update comment.
2894 (ppc64_elf_adjust_dynamic_symbol): Don't allow .dynbss copies
2895 of function symbols unless dot symbols are present. Do warn
2896 whenever one is created, regardles of whether a PLT entry is
2897 also emitted for the function symbol.
2898
ef4e5ba5
AM
28992020-01-14 Alan Modra <amodra@gmail.com>
2900
2901 * som.c (som_bfd_count_ar_symbols): Error when file position
2902 of symbols on chains is not strictly increasing.
2903
8ab484c2
AM
29042020-01-14 Alan Modra <amodra@gmail.com>
2905
2906 * vms.h (VMS_DEBUG): Define as 0.
2907 * vms-alpha.c (image_write): Move debug output after bounds check.
2908 Tidy bounds check.
2909 (_bfd_vms_slurp_eihd): Warning fix.
2910 (_bfd_vms_slurp_etir): Init variables to avoid bogus warnings.
2911
b50ef514
AM
29122020-01-13 Alan Modra <amodra@gmail.com>
2913
2914 * vms-alpha.c (_bfd_vms_slurp_egsd): Ensure minimum size even
2915 for "ignored" records.
2916
0c0adcc5
AM
29172020-01-13 Alan Modra <amodra@gmail.com>
2918
2919 * wasm-module.c (wasm_scan_name_function_section): Formatting.
2920 Delete asect name check. Move asect NULL check to wasm_object_p.
2921 Correct bounds check of sizes against end. Replace uses of
2922 bfd_zalloc with bfd_alloc, zeroing only necessary bytes. Use
2923 just one bfd_release.
2924 (wasm_scan): Don't use malloc/strdup for section names,
2925 bfd_alloc instead. Simplify code prefixing section name.
2926 Formatting. Don't attempt to free memory here..
2927 (wasm_object_p): ..do so here.
2928
7f026732
SN
29292020-01-10 Szabolcs Nagy <szabolcs.nagy@arm.com>
2930
2931 PR ld/22269
2932 * elf32-arm.c (elf32_arm_final_link_relocate): Use
2933 UNDEFWEAK_NO_DYNAMIC_RELOC.
2934 (allocate_dynrelocs_for_symbol): Likewise.
2935
8cd0e5e9
TC
29362020-01-10 Tamar Christina <tamar.christina@arm.com>
2937
2938 PR 25210
2939 * elfnn-aarch64.c (_bfd_aarch64_create_stub_section): Remove elfclass.
2940
71780f45
AM
29412020-01-10 Alan Modra <amodra@gmail.com>
2942
2943 * coff-alpha.c (alpha_ecoff_object_p): Calculate size in bfd_size_type.
2944
b899eb3b
NC
29452020-01-09 Nick Clifton <nickc@redhat.com>
2946
2947 PR 25221
2948 * bfd.c (bfd_convert_section_contents): Check for a compress
2949 header size that is larger than the actual section size.
2950
4c6ee646
AM
29512020-01-08 Alan Modra <amodra@gmail.com>
2952
2953 PR 25351
2954 * elflink.c (bfd_elf_final_link): Call _bfd_fix_excluded_sec_syms
2955 after removing sections.
2956
85f78364
JW
29572020-01-06 Jim Wilson <jimw@sifive.com>
2958
2959 PR 25205
2960 * elfnn-riscv.c (riscv_elf_relocate_section) <R_RISCV_CALL>: Add
2961 check for !bfd_link_pic (info).
2962 <R_RISCV_CALL_PLT>: Move next to R_RISCV_CALL.
2963 <R_RISCV_JAL>: Add comment.
2964 (_bfd_riscv_relax_section): For plt.offset check, add check for
2965 bfd_link_pic (info). Add comment.
2966
49078ece
AM
29672020-01-06 Alan Modra <amodra@gmail.com>
2968
2969 * format.c (bfd_check_format_matches): Ignore bfd_error on target
2970 match failures. Don't init to bfd_error_wrong_format before
2971 calling _bfd_check_format.
2972
ab356be7
AM
29732020-01-06 Alan Modra <amodra@gmail.com>
2974
2975 * vms-alpha.c (_bfd_vms_push, _bfd_vms_pop): Return pass/fail
2976 status rather than exiting on stack overflow or underflow.
2977 (_bfd_vms_slurp_etir): Adjust to suit.
2978
85d86817
AM
29792020-01-06 Alan Modra <amodra@gmail.com>
2980
2981 * som.c (som_bfd_fill_in_ar_symbols): Bounds check som_dict index.
2982
3e6aa775
AM
29832020-01-06 Alan Modra <amodra@gmail.com>
2984
2985 * mach-o.c (bfd_mach_o_read_dylinker): Don't read past end of
2986 command. Check name offset is within command.
2987 (bfd_mach_o_read_dylib, bfd_mach_o_read_prebound_dylib),
2988 (bfd_mach_o_read_prebind_cksum, bfd_mach_o_read_twolevel_hints),
2989 (bfd_mach_o_read_fvmlib, bfd_mach_o_read_dysymtab),
2990 (bfd_mach_o_read_symtab, bfd_mach_o_read_uuid),
2991 (bfd_mach_o_read_linkedit, bfd_mach_o_read_str),
2992 (bfd_mach_o_read_dyld_info, bfd_mach_o_read_version_min),
2993 (bfd_mach_o_read_encryption_info, bfd_mach_o_read_source_version),
2994 (bfd_mach_o_read_encryption_info_64, bfd_mach_o_read_main),
2995 (bfd_mach_o_read_note, bfd_mach_o_read_build_version),
2996 (bfd_mach_o_read_segment): Similarly.
2997 (bfd_mach_o_read_thread): Properly bound check thread struct.
2998 Don't repeat checks on second loop.
2999 (bfd_mach_o_read_command): Fail on invalid command length.
3000
ea933f17
AM
30012020-01-04 Alan Modra <amodra@gmail.com>
3002
3003 * format.c (bfd_check_format_matches): Add preserve_match.
3004 Save initial bfd state in "preserve", matched bfd state in
3005 "preserve_match". Save just the first match. Release
3006 bfd_alloc memory. Restore and finish preserved state as
3007 appropriate on all function exit paths.
3008
f24bdec4
AM
30092020-01-04 Alan Modra <amodra@gmail.com>
3010
3011 * mmo.c (mmo_mkobject): Allocate tdata with bfd_zalloc.
3012
991fb595
AM
30132020-01-04 Alan Modra <amodra@gmail.com>
3014
3015 * coffgen.c (coff_real_object_p): Free malloc'd memory on target
3016 match too.
3017
f2a3559d
NC
30182020-01-03 Nick Clifton <nickc@redhat.com>
3019
3020 PR 25307
3021 (bfd_pef_parse_function_stubs): Correct the test that ensures that
3022 there is enough data remaining in the code buffer before
3023 attempting to read a function stub.
3024
7a0fb7be
NC
30252020-01-03 Nick Clifton <nickc@redhat.com>
3026
3027 PR 25308
3028 * elf-properties.c (_bfd_elf_convert_gnu_properties): Check the
3029 return value from bfd_malloc.
3030 * elf32-arm.c (bfd_elf32_arm_vfp11_fix_veneer_locations): Likewise.
3031 (bfd_elf32_arm_stm32l4xx_fix_veneer_locations): Likewise.
3032 (elf32_arm_filter_cmse_symbols): Likewise.
3033 (elf32_arm_write_section): Likewise.
3034 * mach-o.c (bfd_mach_o_core_fetch_environment): Likewise.
3035 (bfd_mach_o_follow_dsym): Likewise.
3036 * pef.c (bfd_pef_print_loader_section): Likewise.
3037 (bfd_pef_scan_start_address): Likewise.
3038 (bfd_pef_parse_function_stubs): Likewise.
3039 (bfd_pef_parse_symbols): Likewise.
3040
b26a3d58
ST
30412020-01-03 Sergei Trofimovich <siarheit@google.com>
3042
3043 * elfnn-ia64.c (elfNN_ia64_merge_private_bfd_data): don't fail
3044 on binary inputs ld/PR25316.
3045 (is_ia64_elf): new helper to filter on ia64 objects.
3046
4bb7a87e
JB
30472020-01-03 Jan Beulich <jbeulich@suse.com>
3048
3049 * mach-o.c (cpusubtype, bfd_mach_o_header_p): Insert underscore
3050 in parameter names.
3051 (bfd_mach_o_scan): Insert underscore in two variable names.
3052
6655dba2
SB
30532020-01-02 Sergey Belyashov <sergey.belyashov@gmail.com>
3054
3055 * Makefile.am: Add z80-elf target support.
3056 * configure.ac: Likewise.
3057 * targets.c: Likewise.
3058 * Makefile.in: Regenerate.
3059 * configure: Regenerate.
3060 * config.bfd: Add z80-elf target support and new arches: ez80 and
3061 z180.
3062 * elf32-z80.c: New file.
3063 * archures.c: Add new z80 architectures: eZ80 and Z180.
3064 * coffcode.h: Likewise.
3065 * cpu-z80.c: Likewise.
3066 * coff-z80.c: Add new relocations for Z80 target and local label
3067 check.
3068 * reloc.c: Add new relocs.
3069 * bfd-in2.h: Regenerate.
3070 * libbfd.h: Regenerate.
3071
0db131fb
TC
30722020-01-02 Tamar Christina <tamar.christina@arm.com>
3073
3074 PR 25210
3075 PR 24753
3076 * elfnn-aarch64.c (_bfd_aarch64_create_stub_section): Set ELF class.
3077
b14ce8bf
AM
30782020-01-01 Alan Modra <amodra@gmail.com>
3079
3080 Update year range in copyright notice of all files.
3081
0b114740 3082For older changes see ChangeLog-2019
3499769a 3083\f
0b114740 3084Copyright (C) 2020 Free Software Foundation, Inc.
3499769a
AM
3085
3086Copying and distribution of this file, with or without modification,
3087are permitted in any medium without royalty provided the copyright
3088notice and this notice are preserved.
3089
3090Local Variables:
3091mode: change-log
3092left-margin: 8
3093fill-column: 74
3094version-control: never
3095End: