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