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