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