Silence warnings due to plugin API change
[deliverable/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
67338173
AM
12020-03-20 Alan Modra <amodra@gmail.com>
2
3 * coff-rs6000.c (_bfd_xcoff_slurp_armap): Ensure size is large
4 enough to read number of symbols.
5
a859124d
AM
62020-03-20 Alan Modra <amodra@gmail.com>
7
8 * elf.c (_bfd_elf_setup_sections): Don't test known non-NULL
9 backend functions for NULL before calling.
10 (copy_special_section_fields, _bfd_elf_copy_private_bfd_data),
11 (bfd_section_from_shdr, assign_section_numbers): Likewise.
12 * elfcode.h (elf_write_relocs, elf_slurp_reloc_table): Likewise.
13 * elfnn-ia64.c (ignore_errors): New function.
14 (elf_backend_link_order_error_handler): Redefine as ignore_errors.
15
f3a08f77
NC
162020-03-19 Nick Clifton <nickc@redhat.com>
17
18 PR 25676
19 * dwarf2.c (struct varinfo): Add unit_offset field to record the
20 location of the varinfo in the unit's debug info data. Change the
21 type of the stack field to a boolean.
22 (lookup_var_by_offset): New function. Returns the varinfo
23 structure for the variable described at the given offset in the
24 unit's debug info.
25 (scan_unit_for_symbols): Add support for variables which have the
26 DW_AT_specification attribute.
27
6a541707
NC
282020-03-19 Nick Clifton <nickc@redhat.com>
29
30 PR 25699
31 * elf.c (bfd_elf_set_group_contents): Replace assertion with an
32 error return.
33
effc14f5
SH
342020-03-19 Sebastian Huber <sebastian.huber@embedded-brains.de>
35
36 * elfxx-riscv.c (riscv_parse_subset): Don't use C99.
37
ac4bf06c
NC
382020-03-18 Nick Clifton <nickc@redhat.com>
39
40 PR 25673
41 * elf.c (_bfd_elf_write_secondary_reloc_section): Fix illegal
42 memory access when processing a corrupt secondary reloc section.
43
53215f21
CL
442020-03-18 Christophe Lyon <christophe.lyon@linaro.org>
45
46 * elf32-arm.c (arm_build_one_stub): Emit a fatal error message
47 instead of calling abort.
48 * elf32-csky.c (csky_build_one_stub): Likewise.
49 * elf32-hppa.c (hppa_build_one_stub): Likewise.
50 * elf32-m68hc11.c (m68hc11_elf_build_one_stub): Likewise.
51 * elf32-m68hc12.c (m68hc12_elf_build_one_stub): Likewise.
52 * elf32-metag.c (metag_build_one_stub): Likewise.
53 * elf32-nios2.c (nios2_build_one_stub): Likewise.
54 * elf64-ppc.c (ppc_build_one_stub): Likewise.
55 (ppc_size_one_stub): Likewise.
56 * elfnn-aarch64.c (aarch64_build_one_stub): Likewise.
57
327ef784
NC
582020-03-17 Nick Clifton <nickc@redhat.com>
59
d3c3c542 60 PR 25688
327ef784
NC
61 * elf.c (_bfd_elf_copy_special_section_fields): Replace assertions
62 with error messages.
63
ecbbbdba
NC
642020-03-17 Nick Clifton <nickc@redhat.com>
65
66 PR 25687
67 * elf.c (_bfd_elf_slurp_secondary_reloc_section): Remove redundant
68 free. Add free on another failure path.
69
4b3ecb3b
AM
702020-03-16 Alan Modra <amodra@gmail.com>
71
72 PR 25675
73 * elf.c (elf_sort_segments): Don't call bfd_octets_per_byte unless
74 we have a non-zero section count. Do lma comparison in octets.
75
7bac4137
AM
762020-03-16 Alan Modra <amodra@gmail.com>
77
78 * vms-alpha.c (dst_restore_location): Validate index into
79 dst_ptr_offsets array before accessing. Return status.
80 (dst_retrieve_location): Similarly, making "loc" parameter a
81 pointer to return value.
82 (_bfd_vms_slurp_etir): Update calls to above functions.
83
8b5d0a4f
KR
842020-03-14 Kamil Rytarowski <n54@gmx.com>
85
86 * configure.ac: Include netbsd-core.lo for all NetBSD arm and mips
87 targets.
88 * configure: Regenerated.
89
48e81d7f
AM
902020-03-14 Alan Modra <amodra@gmail.com>
91
92 * section.c (BFD_FAKE_SECTIONS): Formatting.
93 * bfd-in2.h: Regenerate.
94
06d949ec
KR
952020-03-13 Kamil Rytarowski <n54@gmx.com>
96
97 * elf.c (elfcore_grok_netbsd_note): Add support for
98 NT_NETBSDCORE_LWPSTATUS notes.
99
abf874aa
CL
1002020-03-13 Christophe Lyon <christophe.lyon@linaro.org>
101
102 * bfd-in2.h: Regenerate.
103 * section.c (asection): Add already_assigned field.
104 (BFD_FAKE_SECTION): Add default initializer for it.
105 * ecoff.c (bfd_debug_section): Initialize already_assigned field.
106 * elf32-arm.c (arm_build_one_stub): Add support for
107 non_contiguous_regions.
108 * elf32-csky.c (csky_build_one_stub): Likewise.
109 * elf32-hppa.c (hppa_build_one_stub): Likewise.
110 * elf32-m68hc11.c (m68hc11_elf_build_one_stub): Likewise.
111 * elf32-m68hc12.c (m68hc12_elf_build_one_stub): Likewise.
112 * elf32-metag.c (metag_build_one_stub): Likewise.
113 * elf32-nios2.c (nios2_build_one_stub): Likewise.
114 * elf64-ppc.c (ppc_build_one_stub): Likewise.
115 (ppc_size_one_stub): Likewise.
116 * elfnn-aarch64.c (aarch64_build_one_stub): Likewise.
117 * elflink.c (elf_link_input_bfd): Likewise.
118
74e10d17
L
1192020-03-13 H.J. Lu <hongjiu.lu@intel.com>
120
121 PR ld/24920
122 * elf-linker-x86.h (elf_linker_x86_params): Add
123 static_before_all_inputs and has_dynamic_linker.
124 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Report
125 dynamic input objects if -static is passed at command-line
126 before all input files without --dynamic-linker unless
127 --no-dynamic-linker is used.
128
015ec493
KR
1292020-03-13 Kamil Rytarowski <n54@gmx.com>
130
131 * elf.c (elfcore_grok_netbsd_note): Add support for aarch64.
132
66631823
CE
1332020-03-13 Christian Eggers <ceggers@gmx.de>
134
135 * bfd.c (bfd_record_phdr): New local "opb". Fix assignment of
136 "p_paddr" from "at".
137 * elfcode.h (bfd_from_remote_memory): Add units to several
138 parameters. New local "opb". Fix usage of p_align. Fix
139 calculation of "localbase" from "ehdr_vma" and "p_vaddr". Fix
140 call of target_read_memory.
141 * elflink.c (elf_fixup_link_order): Fix scope of "s" local. Fix
142 calculation of "offset" and "output_offset".
143 (bfd_elf_final_link): New local "opb". Fix calculation of "size"
144 from "offset" and fix calculation of "end" from "vma+size". Fix
145 comparison between "sh_addr" and "vma"/"output_offset".
146 (bfd_elf_discard_info): Fix calculation of "eh_alignment".
147 * elf-bfd.h (struct elf_link_hash_table): Add unit to tls_size
148 member.
149 * elf.c (_bfd_elf_map_sections_to_segments): Add unit (bytes/
150 octets) to "wrap_to2 and "phdr_size" locals. Fix calculation of
151 "wrap_to" value. Add unit (bytes) to phdr_lma variable. Fix
152 assignment of p_paddr from phdr_lma. Fix comparison between
153 "lma+size" and "next->lma".
154 (elf_sort_segments): Fix assignment from p_paddr to lma.
155 (assign_file_positions_for_load_sections): Add unit (bytes) to
156 local "align". Fix calculation of local "off_adjust". Fix
157 calculation of local "filehdr_vaddr".
158 (assign_file_positions_for_non_load_sections): New local "opb".
159 Fix calculation of "end" from "p_size". Fix comparison between
160 "vma+SECTION_SIZE" and "start". Fix calculation of "p_memsz"
161 from "end" and "p_vaddr".
162 (rewrite_elf_program_header): Fix comparison between p_vaddr and
163 vma. Fix assignment to p_paddr from lma. Fix comparison between
164 p_paddr and lma. Fix assignment to p_paddr from lma.
165 * merge.c (sec_merge_emit): New local "opb". Convert
166 "alignment_power" to octets.
167 (_bfd_add_merge_section): New locals "alignment_power" and
168 "opb". Fix comparison between "alignment_power" and
169 "sizeof(align)".
170 (_bfd_merge_sections): New local "opb". Divide size by opb
171 before checking align mask.
172
502794d4
CE
1732020-03-13 Christian Eggers <ceggers@gmx.de>
174
175 * elf.c (_bfd_elf_make_section_from_shdr): Introduce new temp
176 opb. Divide Elf_Internal_Shdr::sh_addr by opb when setting
177 section LMA/VMA.
178 (_bfd_elf_make_section_from_phdr): Similarly.
179 (elf_fake_sections): Fix calculation of
180 Elf_Internal_shdr::sh_addr from section VMA.
181 (_bfd_elf_map_sections_to_segments): Fix mixup between octets
182 and bytes.
183 (assign_file_positions_for_load_sections): Fix calculations of
184 Elf_Internal_shdr::p_vaddr and p_paddr from section LMA/VMA. Fix
185 comparison between program header address and section LMA.
186 (assign_file_positions_for_non_load_sections): Likewise.
187 (rewrite_elf_program_header): Likewise. Introduce new temp opb.
188 (IS_CONTAINED_BY_VMA): Add parameter opb.
189 (IS_CONTAINED_BY_LMA,IS_SECTION_IN_INPUT_SEGMENT,
190 INCLUDE_SECTION_IN_SEGMENT): Likewise.
191 (copy_elf_program_header): Update call to ELF_SECTION_IN_SEGMENT.
192 Fix calculations of p_addr_valid and p_vaddr_offset.
193 * elflink.c (elf_link_add_object_symbols): Multiply section VMA
194 with octets per byte when comparing against p_vaddr.
195
8248d21a
AM
1962020-03-11 Alan Modra <amodra@gmail.com>
197
198 * som.c (setup_sections): Sanity check subspace.name.
199
435edf0b
AM
2002020-03-11 Alan Modra <amodra@gmail.com>
201
202 * elf64-ppc.c (ppc64_elf_inline_plt): Do increment rel in for loop.
203
6b5e16ff
AM
2042020-03-10 Alan Modra <amodra@gmail.com>
205
206 PR 25648
207 * ihex.c (ihex_write_object_contents): Don't assume ordering of
208 addresses here.
209
2f57795b
AM
2102020-03-09 Alan Modra <amodra@gmail.com>
211
212 * wasm-module.c (wasm_scan): Sanity check file name length
213 before allocating memory. Move common section setup code. Do
214 without bfd_tell to calculate section size.
215
a0dcf297
NC
2162020-03-06 Nick Clifton <nickc@redhat.com>
217
218 * elf.c (_bfd_elf_set_section_contents): Replace call to abort
219 with error messages and failure return values.
220
e15a8da9
MF
2212020-03-05 Max Filippov <jcmvbkbc@gmail.com>
222
223 * elf32-xtensa.c (shrink_dynamic_reloc_sections): Shrink dynamic
224 relocation sections for any removed reference to a dynamic symbol.
225
a8e14f4c
NC
2262020-03-05 Nick Clifton <nickc@redhat.com>
227
228 * elf-bfd.h (struct elf_backend_data): Add new fields:
229 init_secondary_reloc_section, slurp_secondary_reloc_section,
230 write_secondary_reloc_section.
231 (_bfd_elf_init_secondary_reloc_section): Prototype.
232 (_bfd_elf_slurp_secondary_reloc_section): Prototype.
233 (_bfd_elf_write_secondary_reloc_section): Prototype.
234 * elf.c ( bfd_section_from_shdr): Invoke the new
235 init_secondary_reloc_section backend function, if defined, when a
236 second reloc section is encountered.
237 (swap_out_syms): Invoke the new symbol_section_index function, if
238 defined, when computing the section index of an OS/PROC specific
239 symbol.
240 (_bfd_elf_init_secondary_reloc_section): New function.
241 (_bfd_elf_slurp_secondary_reloc_section): New function.
242 (_bfd_elf_write_secondary_reloc_section): New function.
243 (_bfd_elf_copy_special_section_fields): New function.
244 * elfcode.h (elf_write_relocs): Invoke the new
245 write_secondary_relocs function, if defined, in order to emit
246 secondary relocs.
247 (elf_slurp_reloc_table): Invoke the new slurp_secondary_relocs
248 function, if defined, in order to read in secondary relocs.
249 * elfxx-target.h (elf_backend_copy_special_section_fields):
250 Provide a non-NULL default definition.
251 (elf_backend_init_secondary_reloc_section): Likewise.
252 (elf_backend_slurp_secondary_reloc_section): Likewise.
253 (elf_backend_write_secondary_reloc_section): Likewise.
254 (struct elf_backend_data elfNN_bed): Add initialisers for the new
255 fields.
256 * configure.ac (score_elf32_[bl]e_vec): Add elf64.lo
257 * configure: Regenerate.
258
6f8f95b4
AM
2592020-03-05 Alan Modra <amodra@gmail.com>
260
261 * archive64.c (_bfd_archive_64_bit_slurp_armap): Check parsed_size
262 against file size before allocating memory. Use bfd_alloc rather
263 than bfd_zalloc for carsym/strings memory.
264
233bf4f8
AM
2652020-03-04 Alan Modra <amodra@gmail.com>
266
267 * elf.c (elf_fake_sections): Ensure sh_addralign is such that
268 sh_addr mod sh_addalign is zero.
269
1039fd9a
AM
2702020-03-04 Alan Modra <amodra@gmail.com>
271
272 * format.c (bfd_check_format_matches): Call cleanup on error exit.
273
f5714099
AM
2742020-03-03 Alan Modra <amodra@gmail.com>
275
276 * format.c (struct bfd_preserve): Add cleanup field.
277 (bfd_preserve_save): Add cleanup param and save.
278 (bfd_preserve_restore): Return cleanup.
279 (bfd_preserve_finish): Call the cleanup for the discarded match.
280 (bfd_check_format_matches): Pass cleanup to bfd_preserve_save,
281 and clear when preserving a match. Restore cleanup too when
282 restoring that match.
283
40b35c78
AM
2842020-03-02 Alan Modra <amodra@gmail.com>
285
286 * cisco-core.c (cisco_core_file_p): Return bfd_cleanup.
287 * hpux-core.c (hpux_core_core_file_p): Update prototype.
288 * sco5-core.c (sco5_core_file_p): Return bfd_cleanup.
289 (core_sco5_vec): Correct initialisers.
290
601b73d5
AM
2912020-03-02 Alan Modra <amodra@gmail.com>
292
293 * aix386-core.c (aix386_core_file_p): Return bfd_cleanup.
294 * aix5ppc-core.c (xcoff64_core_p): Likewise.
295 * cisco-core.c (cisco_core_file_validate): Likewise.
296 * hppabsd-core.c (hppabsd_core_core_file_p): Likewise.
297 * hpux-core.c (hpux_core_core_file_p): Likewise.
298 * irix-core.c (irix_core_core_file_p): Likewise.
299 * lynx-core.c (lynx_core_file_p): Likewise.
300 * netbsd-core.c (netbsd_core_file_p): Likewise.
301 * osf-core.c (osf_core_core_file_p): Likewise.
302 * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
303 * sco5-core.c (sco5_core_file_p): Likewise.
304
728d32c4
L
3052020-03-02 H.J. Lu <hongjiu.lu@intel.com>
306
307 * trad-core.c (trad_unix_core_file_p): Return bfd_cleanup.
308
cb001c0d
AM
3092020-03-02 Alan Modra <amodra@gmail.com>
310
311 * targets.c (bfd_cleanup): New typedef.
312 (struct bfd <_bfd_check_format>): Return a bfd_cleanup.
313 * libbfd-in.h (_bfd_no_cleanup): Define.
314 * format.c (bfd_reinit): Add cleanup parameter, call it.
315 (bfd_check_format_matches): Set cleanup from _bfd_check_format
316 call and pass to bfd_reinit. Delete temp, use abfd->xvec instead.
317 * aout-target.h (callback, object_p): Return bfd_cleanup.
318 * aout-tic30.c (tic30_aout_callback, tic30_aout_object_p): Likewise.
319 * archive.c (bfd_generic_archive_p): Likewise.
320 * binary.c (binary_object_p): Likewise.
321 * coff-alpha.c (alpha_ecoff_object_p): Likewise.
322 * coff-ia64.c (ia64coff_object_p): Likewise.
323 * coff-rs6000.c (_bfd_xcoff_archive_p, rs6000coff_core_p): Likewise.
324 * coff-sh.c (coff_small_object_p): Likewise.
325 * coff-stgo32.c (go32_check_format): Likewise.
326 * coff64-rs6000.c (xcoff64_archive_p, rs6000coff_core_p),
327 (xcoff64_core_p): Likewise.
328 * coffgen.c (coff_real_object_p, coff_object_p): Likewise.
329 * elf-bfd.h (bfd_elf32_object_p, bfd_elf32_core_file_p),
330 (bfd_elf64_object_p, bfd_elf64_core_file_p): Likewise.
331 * elfcode.h (elf_object_p): Likewise.
332 * elfcore.h (elf_core_file_p): Likewise.
333 * i386msdos.c (msdos_object_p): Likewise.
334 * ihex.c (ihex_object_p): Likewise.
335 * libaout.h (some_aout_object_p): Likewise.
336 * libbfd-in.h (bfd_generic_archive_p, _bfd_dummy_target),
337 (_bfd_vms_lib_alpha_archive_p, _bfd_vms_lib_ia64_archive_p): Likewise.
338 * libbfd.c (_bfd_dummy_target): Likewise.
339 * libcoff-in.h (coff_object_p): Likewise.
340 * mach-o-aarch64.c (bfd_mach_o_arm64_object_p),
341 (bfd_mach_o_arm64_core_p): Likewise.
342 * mach-o-arm.c (bfd_mach_o_arm_object_p),
343 (bfd_mach_o_arm_core_p): Likewise.
344 * mach-o-i386.c (bfd_mach_o_i386_object_p),
345 (bfd_mach_o_i386_core_p): Likewise.
346 * mach-o-x86-64.c (bfd_mach_o_x86_64_object_p),
347 (bfd_mach_o_x86_64_core_p): Likewise.
348 * mach-o.c (bfd_mach_o_header_p, bfd_mach_o_gen_object_p),
349 (bfd_mach_o_gen_core_p, bfd_mach_o_fat_archive_p): Likewise.
350 * mach-o.h (bfd_mach_o_object_p, bfd_mach_o_core_p),
351 (bfd_mach_o_fat_archive_p, bfd_mach_o_header_p): Likewise.
352 * mmo.c (mmo_object_p): Likewise.
353 * pef.c (bfd_pef_object_p, bfd_pef_xlib_object_p): Likewise.
354 * peicode.h (coff_real_object_p, pe_ILF_object_p),
355 (pe_bfd_object_p): Likewise.
356 * plugin.c (ld_plugin_object_p, bfd_plugin_object_p): Likewise.
357 * ppcboot.c (ppcboot_object_p): Likewise.
358 * rs6000-core.c (rs6000coff_core_p): Likewise.
359 * som.c (som_object_setup, som_object_p): Likewise.
360 * srec.c (srec_object_p, symbolsrec_object_p): Likewise.
361 * tekhex.c (tekhex_object_p): Likewise.
362 * vms-alpha.c (alpha_vms_object_p): Likewise.
363 * vms-lib.c (_bfd_vms_lib_archive_p, _bfd_vms_lib_alpha_archive_p),
364 (_bfd_vms_lib_ia64_archive_p, _bfd_vms_lib_txt_archive_p): Likewise.
365 * wasm-module.c (wasm_object_p): Likewise.
366 * xsym.c (bfd_sym_object_p): Likewise.
367 * xsym.h (bfd_sym_object_p): Likewise.
368 * aoutx.h (some_aout_object_p): Likewise, and callback parameter
369 return type.
370 * pdp11.c (some_aout_object_p): Likewise.
371 * plugin.c (register_ld_plugin_object_p): Update object_p
372 parameter type.
373 * plugin.h (register_ld_plugin_object_p): Likewise.
374 * bfd-in2.h: Regenerate.
375 * libbfd.h: Regenerate.
376 * libcoff.h: Regenerate.
377
a4dd6c97
AM
3782020-03-02 Alan Modra <amodra@gmail.com>
379
380 * coff-alpha.c (alpha_ecoff_le_vec): Add SEC_SMALL_DATA to
381 applicable section flags.
382 * coff-mips.c (mips_ecoff_le_vec, mips_ecoff_be_vec): Likewise.
383 (mips_ecoff_bele_vec): Likewise.
384 * coffcode.h (sec_to_styp_flags): Set SEC_SMALL_DATA for .sdata
385 and .sbss sections.
386 * ecoff.c (_bfd_ecoff_new_section_hook): Likewise.
387 (_bfd_ecoff_styp_to_sec_flags): Likewise.
388
bf577467
AM
3892020-03-02 Alan Modra <amodra@gmail.com>
390
391 * elf32-m32r.c (m32r_elf_section_flags): New function.
392 (elf_backend_section_flags): Define.
393 * elf32-nds32.c (nds32_elf_section_flags): New function.
394 (elf_backend_section_flags): Define.
395 * elf32-ppc.c (ppc_elf_section_from_shdr): Set SEC_SMALL_DATA for
396 .sbss and .sdata sections.
397 * elf32-v850.c (v850_elf_section_from_shdr): Set SEC_SMALL_DATA
398 for SHF_V850_GPREL sections.
399 * elf64-alpha.c (elf64_alpha_section_from_shdr): Delete outdated
400 FIXME.
401 * elf64-hppa.c (elf64_hppa_section_from_shdr): Set SEC_SMALL_DATA
402 for SHF_PARISC_SHORT sections.
403 * elf64-ppc.c (ppc64_elf_section_flags): New function.
404 (elf_backend_section_flags): Define.
405 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Set SEC_SMALL_DATA
406 for SHF_MIPS_GPREL sections. Delete FIXME.
407
8c803a2d
AM
4082020-03-02 Alan Modra <amodra@gmail.com>
409
410 * elf-bfd.h (elf_backend_section_flags): Remove flagword* param.
411 * elf.c (_bfd_elf_make_section_from_shdr): Set section flags before
412 calling elf_backend_section_flags with adjusted params. Use
413 newsect->flags past that point.
414 (_bfd_elf_new_section_hook): Always set sh_type and sh_flags for
415 special sections.
416 (_bfd_elf_init_private_section_data): Allow normal sh_type sections
417 to have their type overridden, and all sh_flags but processor and
418 os specific.
419 * elf32-arm.c (elf32_arm_section_flags): Adjust for changed params.
420 * elf32-mep.c (mep_elf_section_flags): Likewise.
421 * elf32-nios2.c (nios2_elf32_section_flags): Likewise.
422 * elf64-alpha.c (elf64_alpha_section_flags): Likewise.
423 * elf64-ia64-vms.c (elf64_ia64_section_flags): Likewise.
424 * elfnn-ia64.c (elfNN_ia64_section_flags): Likewise.
425 * elfnn-aarch64.c (elfNN_aarch64_size_stubs): Exclude the linker
426 stub BFD and non-aarch64 input files when scanning for stubs.
427
7d4b2d2d
AM
4282020-03-02 Alan Modra <amodra@gmail.com>
429
430 * coff-alpha.c (alpha_ecoff_get_elt_at_filepos): Provide an upper
431 limit to decompressed element size.
432
26f60d59
AM
4332020-03-02 Alan Modra <amodra@gmail.com>
434
435 * vms-lib.c (vms_traverse_index): Add recur_count param and
436 update calls. Fail on excessive recursion.
437
9cb56943
AM
4382020-03-02 Alan Modra <amodra@gmail.com>
439
440 * vms-alpha.c (vms_get_remaining_object_record): Use
441 bfd_realloc_or_free rather than bfd_realloc.
442 (add_symbol_entry, vector_grow1, alpha_vms_slurp_relocs): Likewise.
443 (dst_define_location, parse_module): Likewise, and check realloc
444 return status before using memory. Return status from function
445 adjusting all callers.
446
182ec670
AM
4472020-02-28 Alan Modra <amodra@gmail.com>
448
449 * vms-lib.c (_bfd_vms_lib_archive_p): Free memory on error paths.
450
1b088c82
AM
4512020-02-28 Alan Modra <amodra@gmail.com>
452
453 * vms-alpha.c (alpha_vms_object_p): Use _bfd_malloc_and_read.
454 Remove duplicate undersize check.
455
5f602802
AM
4562020-02-27 Alan Modra <amodra@gmail.com>
457
458 PR 24511
459 * mmo.c (mmo_scan): Set SEC_DATA for .data.
460
49d9fd42
AM
4612020-02-27 Alan Modra <amodra@gmail.com>
462
463 PR 24511
464 * syms.c (stt): Trim off all but 'e', 'i' and 'p' entries.
465 (coff_section_type): Adjust comment.
466 (decode_section_type): Likewise. Call coff_section_type before
467 decode_section_type.
468 (bfd_decode_symclass): Use 'c' for common sections other than
469 the standard one.
470
05f52dc2
AM
4712020-02-27 Alan Modra <amodra@gmail.com>
472
473 * coff-rs6000.c (_bfd_xcoff_read_ar_hdr): Put all data in one
474 malloc'd block.
475
ff69a894
AM
4762020-02-27 Alan Modra <amodra@gmail.com>
477
478 * bfd.c (bfd_stat_arch_elt): Use vector of containing archive,
479 if file is an archive element.
480 * bfd-in2.h: Regenerate.
481
02f7e7ee
AM
4822020-02-26 Alan Modra <amodra@gmail.com>
483
484 * archive.c (do_slurp_bsd_armap): Increase minimum parsed_size, and
485 bfd_set_error on failing test. Don't bother changing bfd_error on
486 file read error. Check symdef_count is multiple of BSD_SYMDEF_SIZE.
487 Check sym name is within string buffer. Use size_t for some vars.
488 (do_slurp_coff_armap): Use size_t for some variables, fix size of
489 int_buf. Don't change bfd_error on file read error. Use
490 _bfd_mul_overflow when calculating carsym buffer size. Reorder
491 calculations to catch overflows before they occur. malloc and
492 free raw armap rather than using bfd_alloc. Read raw armap before
493 allocating carsym+strings buffer.
494 (_bfd_slurp_extended_name_table): Localize variables. Check
495 name size against file size.
496
cc4c4f40
AM
4972020-02-26 Alan Modra <amodra@gmail.com>
498
499 * vms-lib.c (vms_lib_read_index): Release correct buffer.
500
e0b317de
AM
5012020-02-26 Alan Modra <amodra@gmail.com>
502
503 * elf32-rx.c (rx_elf_relocate_section): Use bfd_malloc rather than
504 malloc. Check for NULL return from bfd_malloc.
505 (rx_table_find, rx_table_map): Likewise.
506 (rx_set_section_contents): Check bfd_alloc return.
507 (rx_dump_symtab): Don't alloc internal_syms or external_syms.
508
dc1e8a47
AM
5092020-02-26 Alan Modra <amodra@gmail.com>
510
511 * aoutx.h: Indent labels correctly. Format error strings.
512 * archive.c: Likewise.
513 * archive64.c: Likewise.
514 * coff-arm.c: Likewise.
515 * coff-rs6000.c: Likewise.
516 * coff-stgo32.c: Likewise.
517 * cpu-arm.c: Likewise.
518 * dwarf2.c: Likewise.
519 * elf-ifunc.c: Likewise.
520 * elf-properties.c: Likewise.
521 * elf-s390-common.c: Likewise.
522 * elf-strtab.c: Likewise.
523 * elf.c: Likewise.
524 * elf32-arm.c: Likewise.
525 * elf32-bfin.c: Likewise.
526 * elf32-cr16.c: Likewise.
527 * elf32-csky.c: Likewise.
528 * elf32-i386.c: Likewise.
529 * elf32-m68k.c: Likewise.
530 * elf32-msp430.c: Likewise.
531 * elf32-nds32.c: Likewise.
532 * elf32-nios2.c: Likewise.
533 * elf32-pru.c: Likewise.
534 * elf32-xtensa.c: Likewise.
535 * elf64-ia64-vms.c: Likewise.
536 * elf64-x86-64.c: Likewise.
537 * elfcode.h: Likewise.
538 * elfcore.h: Likewise.
539 * elflink.c: Likewise.
540 * elfnn-aarch64.c: Likewise.
541 * elfnn-ia64.c: Likewise.
542 * elfnn-riscv.c: Likewise.
543 * elfxx-mips.c: Likewise.
544 * elfxx-sparc.c: Likewise.
545 * elfxx-x86.c: Likewise.
546 * i386lynx.c: Likewise.
547 * merge.c: Likewise.
548 * pdp11.c: Likewise.
549 * plugin.c: Likewise.
550 * reloc.c: Likewise.
551
e310298c
AM
5522020-02-26 Alan Modra <amodra@gmail.com>
553
554 PR 25593
555 * elf-bfd.h (struct elf_link_hash_table): Rename "loaded" to
556 "dyn_loaded".
557 (bfd_elf_add_dt_needed_tag): Declare.
558 * elf-strtab.c (_bfd_elf_strtab_restore): Handle NULL buf.
559 * elflink.c (bfd_elf_add_dt_needed_tag): Make global and rename
560 from elf_add_dt_needed_tag. Remove soname and doit param.
561 (elf_link_add_object_symbols): Don't use elf_add_dt_needed_tag
562 to see whether as-needed lib is already loaded, use dyn_loaded
563 list instead. When saving and restoring around as-needed lib
564 handle possibility that dynstr has not been initialised. Don't
565 add DT_NEEDED tags here. Limit dyn_loaded list to dynamic libs.
566 Mark libs loaded via DT_NEEDED entries of other libs with
567 DYN_NO_NEEDED if they should not be mentioned in DT_NEEDED of
568 the output.
569 (elf_link_check_versioned_symbol): Remove now unneccesary
570 DYNAMIC check when traversing dyn_loaded list.
571
b570b954
AM
5722020-02-26 Alan Modra <amodra@gmail.com>
573
574 * bfdio.c (bfd_get_file_size): Ignore bogus archive element sizes.
575
ecda9016
L
5762020-02-25 H.J. Lu <hongjiu.lu@intel.com>
577
578 PR binutils/25584
579 * plugin.c (need_lto_wrapper_p): New.
580 (bfd_plugin_set_program_name): Add an int argument to set
581 need_lto_wrapper_p.
582 (get_lto_wrapper): Return FALSE if need_lto_wrapper_p isn't
583 set.
584 * plugin.h (bfd_plugin_set_program_name): Add an int argument.
585
a98c743f
AM
5862020-02-24 Alan Modra <amodra@gmail.com>
587
588 * vms-lib.c (_bfd_vms_lib_archive_p): Correct overflow checks.
589
c893ce36
AM
5902020-02-24 Alan Modra <amodra@gmail.com>
591
592 * vms-lib.c (struct carsym_mem): Add limit.
593 (vms_add_index): Heed limit.
594 (vms_traverse_index): Catch buffer overflows. Remove outdated fixme.
595 (vms_lib_read_index): Set up limit. Catch 32-bit overflow.
596 Always return actual number read.
597 (_bfd_vms_lib_archive_p): Catch buffer overflows. Replace
598 assertion with error exit.
599
7b3c2715
AM
6002020-02-22 Alan Modra <amodra@gmail.com>
601
602 PR 25585
603 * elf.c (assign_file_positions_for_load_sections): Continue linking
604 on "PHDR segment not covered by LOAD segment" errors.
605
a4425a57
AM
6062020-02-21 Alan Modra <amodra@gmail.com>
607
608 * mach-o.c (bfd_mach_o_canonicalize_relocs): Fix ineffective
609 overflow check.
610 (bfd_mach_o_canonicalize_reloc): Likewise.
611 (bfd_mach_o_canonicalize_dynamic_reloc): Likewise. Sanity check
612 counts and offsets against file size.
613 (bfd_mach_o_build_dysymtab): Fix ineffective overflow check.
614 (bfd_mach_o_mangle_sections): Remove unnecessary overflow check.
615 (bfd_mach_o_read_symtab_symbols): Sanity check count and offset
616 against file size. Delete symbol table error message.
617 (bfd_mach_o_read_dysymtab): Sanity check counts and offsets
618 against file size.
619 (bfd_mach_o_read_symtab): Likewise.
620 (bfd_mach_o_read_command): Pass file size.
621 (bfd_mach_o_scan): Sanity check command count against file size.
622
dda2980f
AM
6232020-02-21 Alan Modra <amodra@gmail.com>
624
625 PR 25569
626 * aoutx.h (adjust_o_magic, adjust_z_magic, adjust_n_magic): Use
627 "text", "data" and "bss" section pointer vars. Don't update
628 section size, just exec header sizes.
629 (adjust_sizes_and_vmas): Don't update text section size. Set
630 initial exec header a_text. Print exec headers sizes.
631 * pdp11.c (adjust_o_magic, adjust_z_magic, adjust_n_magic),
632 (adjust_sizes_and_vmas): Similarly. Formatting.
633 (final_link): Correct final file extension.
634
00e49dff
NC
6352020-02-20 Nick Clifton <nickc@redhat.com>
636
637 * elf-bfd.h (struct elf_backend_data): Add symbol_section_index
638 callback.
639 * elfxx-target.h (elf_backend_symbol_section_index): Provide
640 default definition.
641 (elfNN_bed): Initialise the symbol_section_index field.
642 * elf.c (swap_out_syms): Call symbol_section_index, if defined, on
643 OS and PROC specific section indicies. Warn if converting other
644 reserved incidies to SHN_ABS.
645
fcaaac0a
SB
6462020-02-19 Sergey Belyashov <sergey.belyashov@gmail.com>
647
648 PR 25537
649 * cpu-z80.c: Add machine type compatibility checking.
650
dcf06b89
L
6512020-02-19 H.J. Lu <hongjiu.lu@intel.com>
652
653 PR binutils/25355
654 * plugin.c (plugin_list_entry): Remove handle.
655 (try_load_plugin): Call dlclose before return.
656
2c7c5554
AM
6572020-02-19 Alan Modra <amodra@gmail.com>
658
659 * libbfd-in.h (_bfd_constant_p): Define.
660 (_bfd_alloc_and_read, _bfd_malloc_and_read): Check read size against
661 file size before allocating memory.
662 * coffgen.c (_bfd_coff_get_external_symbols): Remove file size check.
663 * elf.c (bfd_elf_get_str_section): Likewise.
664 (_bfd_elf_slurp_version_tables): Likewise.
665 * libbfd.h: Regenerate.
666
2bb3687b
AM
6672020-02-19 Alan Modra <amodra@gmail.com>
668
669 * libbfd-in.h (_bfd_alloc_and_read, _bfd_malloc_and_read): New.
670 * aoutx.h (aout_get_external_symbols): Replace calls to
671 bfd_[m]alloc and bfd_bread with call to _bfd_[m]alloc_and_read.
672 (slurp_reloc_table): Likewise.
673 * archive.c (do_slurp_bsd_armap): Likewise.
674 (do_slurp_coff_armap): Likewise.
675 * archive64.c (_bfd_archive_64_bit_slurp_armap): Likewise.
676 * coff-rs6000.c (_bfd_xcoff_slurp_armap): Likewise.
677 * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
678 * coffcode.h (coff_set_arch_mach_hook, buy_and_read): Likewise.
679 * coffgen.c (coff_real_object_p, coff_object_p, build_debug_section),
680 (_bfd_coff_get_external_symbols): Likewise.
681 * ecoff.c (ecoff_slurp_symbolic_header),
682 (_bfd_ecoff_slurp_symbolic_info, ecoff_slurp_reloc_table),
683 (_bfd_ecoff_slurp_armap, ecoff_link_add_object_symbols, READ),
684 (ecoff_indirect_link_order): Likewise.
685 * elf.c (bfd_elf_get_str_section, setup_group, elf_read_notes),
686 (_bfd_elf_slurp_version_tables): Likewise.
687 * elf32-m32c.c (m32c_elf_relax_section): Likewise.
688 * elf32-rl78.c (rl78_elf_relax_section): Likewise.
689 * elf32-rx.c (elf32_rx_relax_section): Likewise.
690 * elf64-alpha.c (READ): Likewise.
691 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Likewise.
692 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Likewise.
693 * elfcode.h (elf_slurp_symbol_table),
694 (elf_slurp_reloc_table_from_section): Likewise.
695 * elflink.c (elf_link_add_object_symbols),
696 (elf_link_check_versioned_symbol): Likewise.
697 * elfxx-mips.c (READ): Likewise.
698 * i386lynx.c (slurp_reloc_table): Likewise.
699 * lynx-core.c (lynx_core_file_p): Likewise.
700 * mach-o.c (bfd_mach_o_canonicalize_relocs),
701 (bfd_mach_o_read_symtab_strtab, bfd_mach_o_alloc_and_read),
702 (bfd_mach_o_read_prebound_dylib, bfd_mach_o_read_dyld_content
703 * pdp11.c (aout_get_external_symbols, slurp_reloc_table
704 * pef.c (bfd_pef_print_loader_section, bfd_pef_scan_start_address),
705 (bfd_pef_parse_symbols): Likewise.
706 * peicode.h (pe_ILF_object_p, pe_bfd_object_p
707 * som.c (setup_sections, som_slurp_string_table),
708 (som_slurp_reloc_table, som_bfd_count_ar_symbols),
709 (som_bfd_fill_in_ar_symbols): Likewise.
710 * vms-alpha.c (module_find_nearest_line, evax_bfd_print_dst),
711 (evax_bfd_print_image): Likewise.
712 * vms-lib.c (_bfd_vms_lib_archive_p): Likewise.
713 * wasm-module.c (wasm_scan): Likewise.
714 * xcofflink.c (xcoff_link_add_symbols): Likewise.
715 * xsym.c (bfd_sym_read_name_table),
716 (bfd_sym_print_type_information_table_entry): Likewise.
717 * libbfd.h: Regenerate.
718
806470a2
AM
7192020-02-19 Alan Modra <amodra@gmail.com>
720
721 * aoutx.h (slurp_reloc_table): Allocate reloc_cache after
722 reading external relocs.
723 * ecoff.c (ecoff_slurp_reloc_table): Likewise.
724 * archive.c (_bfd_write_archive_contents): Don't twiddle bfd_error
725 after bfd_bread.
726 * archive64.c (_bfd_archive_64_bit_slurp_armap): Remove unnecessary
727 bfd_release.
728 * elf32-m32c.c (m32c_offset_for_reloc): Make shndx_buf a bfd_byte*.
729 (m32c_elf_relax_section): Likewise.
730 * elf32-rl78.c (rl78_offset_for_reloc): Likewise.
731 (rl78_elf_relax_section): Likewise.
732 * elf32-rx.c (rx_offset_for_reloc): Likewise.
733 (elf32_rx_relax_section): Likewise.
734 * mach-o.c (bfd_mach_o_alloc_and_read): Move earlier with better
735 parameter types and use..
736 (bfd_mach_o_read_dylinker, bfd_mach_o_read_dylib),
737 (bfd_mach_o_read_fvmlib, bfd_mach_o_read_str): ..in these functions.
738 * peicode.h (pe_bfd_object_p): Don't zero the part of opthdr
739 being read from file, just the extra.
740 * som.c (som_slurp_symbol_table): Allocate internal symbol buffer
741 after reading external syms. Free on failure.
742
1f4361a7
AM
7432020-02-19 Alan Modra <amodra@gmail.com>
744
745 * coffcode.h (buy_and_read, coff_slurp_line_table),
746 (coff_slurp_symbol_table, coff_slurp_reloc_table): Replace
747 bfd_[z][m]alloc2 calls with _bfd_mul_overflow followed by the
748 corresponding bfd_alloc call. Adjust variables to suit.
749 * coffgen.c (_bfd_coff_get_external_symbols): Likewise.
750 * ecoff.c (_bfd_ecoff_slurp_symbolic_info),
751 (_bfd_ecoff_slurp_symbol_table, READ): Likewise.
752 * elf.c (bfd_elf_get_elf_syms, setup_group, bfd_section_from_shdr),
753 (swap_out_syms, _bfd_elf_slurp_version_tables): Likewise.
754 * elf32-m32c.c (m32c_elf_relax_section): Likewise.
755 * elf32-rl78.c (rl78_elf_relax_section): Likewise.
756 * elf32-rx.c (elf32_rx_relax_section): Likewise.
757 * elf64-alpha.c (READ): Likewise.
758 * elfcode.h (elf_object_p, elf_write_relocs, elf_write_shdrs_and_ehdr),
759 (elf_slurp_symbol_table, elf_slurp_reloc_table),
760 (bfd_from_remote_memory): Likewise.
761 * elfcore.h (core_find_build_id): Likewise.
762 * elfxx-mips.c (READ): Likewise.
763 * mach-o.c (bfd_mach_o_mangle_sections),
764 (bfd_mach_o_read_symtab_symbols, bfd_mach_o_read_thread),
765 (bfd_mach_o_read_dysymtab, bfd_mach_o_flatten_sections),
766 (bfd_mach_o_scan, bfd_mach_o_fat_archive_p): Likewise.
767 * som.c (setup_sections, som_prep_for_fixups)
768 (som_build_and_write_symbol_table, som_slurp_symbol_table),
769 (som_slurp_reloc_table, som_bfd_count_ar_symbols),
770 (som_bfd_fill_in_ar_symbols, som_slurp_armap),
771 (som_bfd_ar_write_symbol_stuff): Likewise.
772 * vms-alpha.c (vector_grow1): Likewise.
773 * vms-lib.c (vms_add_index): Likewise.
774 * wasm-module.c (wasm_scan_name_function_section): Likewise.
775 * libbfd.c (bfd_malloc2, bfd_realloc2, bfd_zmalloc2): Delete.
776 * opncls.c (bfd_alloc2, bfd_zalloc2): Delete.
777 * libbfd-in.h (bfd_malloc2, bfd_realloc2, bfd_zmalloc2),
778 (bfd_alloc2, bfd_zalloc2): Delete.
779 (_bfd_mul_overflow): Define.
780 * libbfd.h: Regenerate.
781
446f7ed5
AM
7822020-02-19 Alan Modra <amodra@gmail.com>
783
784 * elf.c (bfd_section_from_shdr): Use bfd_zalloc rather than
785 bfd_zalloc2.
786 (assign_section_numbers): Likewise.
787 (elf_map_symbols): Likewise, and bfd_alloc rather than bfd_alloc2.
788 (_bfd_elf_map_sections_to_segments): Use bfd_malloc rather than
789 bfd_malloc2, size_t amt, and unsigned tls_count.
790 (rewrite_elf_program_header): Use bfd_malloc and size_t amt.
791 * elflink.c (elf_create_symbuf): Use bfd_malloc.
792 (elf_output_implib): Use bfd_alloc.
793
b03202e3
AM
7942020-02-19 Alan Modra <amodra@gmail.com>
795
796 * bfd.c (struct bfd): Move format and direction to other
797 bitfields. Add "size".
798 * bfdio.c (bfd_get_size): Cache size when not writing file.
799 * opncls.c (bfd_get_debug_link_info_1): Allow for bfd_get_size
800 returning zero, ie. unknown.
801 (bfd_get_alt_debug_link_info): Likewise.
802 * bfd-in2.h: Regenerate.
803
7c5fa58e
AM
8042020-02-19 Alan Modra <amodra@gmail.com>
805
806 * coffgen.c (_bfd_coff_get_external_symbols): Don't call
807 bfd_get_file_size twice.
808 (_bfd_coff_read_string_table): Allow for bfd_get_file_size
809 zero, ie. unknown, return.
810 * elf-attrs.c (_bfd_elf_parse_attributes): Likewise.
811 * elfcode.h (elf_swap_shdr_in): Likewise.
812 (elf_object_p): Don't call bfd_get_file_size twice and correct
813 file size check.
814
96d3b80f
AM
8152020-02-19 Alan Modra <amodra@gmail.com>
816
817 * mach-o.c (bfd_mach_o_flatten_sections): Return a bfd_boolean,
818 FALSE if memory alloc fails. Adjust calls.
819 * som.c (som_prep_for_fixups): Likewise.
820 * vms-alpha.c (alpha_vms_add_fixup_lp, alpha_vms_add_fixup_ca),
821 (alpha_vms_add_fixup_qr, alpha_vms_add_fixup_lr),
822 (alpha_vms_add_lw_reloc, alpha_vms_add_qw_reloc): Likewise.
823 * som.c (som_build_and_write_symbol_table): Return via error_return
824 on seek failure.
825 * vms-alpha.c (VEC_APPEND): Adjust for vector_grow1 changes.
826 (VEC_APPEND_EL): Delete.
827 (vector_grow1): Return pointer to element. Catch overflow.
828 Return NULL on memory allocation failure.
829 (alpha_vms_add_fixup_lp): Replace VEC_APPEND_EL with VEC_APPEND.
830 (alpha_vms_add_fixup_ca): Likewise.
831 (alpha_vms_link_add_object_symbols): Check VEC_APPEND result
832 before using.
833 * elf.c (bfd_section_from_shdr): Check bfd_zalloc2 result.
834
986f0783
AM
8352020-02-19 Alan Modra <amodra@gmail.com>
836
837 * aix386-core.c (aix386_core_file_p): Use size_t for "amt".
838 * aout-target.h (object_p): Likewise.
839 * aout-tic30.c (tic30_aout_object_p): Likewise.
840 * aoutx.h (some_aout_object_p, mkobject, make_empty_symbol),
841 (emit_stringtab, write_syms, link_hash_table_create),
842 (aout_link_write_other_symbol): Likewise.
843 * archive.c (_bfd_generic_mkarchive, bfd_generic_archive_p),
844 (bfd_ar_hdr_from_filesystem, _bfd_write_archive_contents),
845 (_bfd_compute_and_write_armap): Likewise.
846 * archures.c (bfd_arch_list): Likewise.
847 * bfd.c (bfd_record_phdr): Likewise.
848 * binary.c (binary_canonicalize_symtab): Likewise.
849 * cisco-core.c (cisco_core_file_validate): Likewise.
850 * coff-arm.c (coff_arm_link_hash_table_create, find_thumb_glue),
851 (find_arm_glue, record_arm_to_thumb_glue),
852 (record_thumb_to_arm_glue): Likewise.
853 * coff-ppc.c (ppc_coff_link_hash_table_create, record_toc),
854 (ppc_allocate_toc_section): Likewise.
855 * coff-rs6000.c (_bfd_xcoff_mkobject, _bfd_xcoff_archive_p): Likewise.
856 * coff-sh.c (sh_relax_section): Likewise.
857 * coff64-rs6000.c (xcoff64_archive_p): Likewise.
858 * coffcode.h (handle_COMDAT, coff_new_section_hook),
859 (coff_set_alignment_hook, coff_mkobject),
860 (coff_compute_section_file_positions): Likewise.
861 * coffgen.c (coff_make_empty_symbol, coff_bfd_make_debug_symbol),
862 (coff_find_nearest_line_with_names),
863 ( bfd_coff_set_symbol_class): Likewise.
864 * cofflink.c (_bfd_coff_link_hash_table_create),
865 (_bfd_coff_link_input_bfd): Likewise.
866 * dwarf1.c (alloc_dwarf1_unit, alloc_dwarf1_func): Likewise.
867 * dwarf2.c (read_abbrevs, read_attribute_value, add_line_info),
868 (build_line_info_table, sort_line_sequences),
869 (line_info_add_include_dir, line_info_add_file_name),
870 (decode_line_info, scan_unit_for_symbols, parse_comp_unit),
871 (place_sections, _bfd_dwarf2_slurp_debug_info): Likewise.
872 * ecoff.c (_bfd_ecoff_mkobject, _bfd_ecoff_make_empty_symbol),
873 (_bfd_ecoff_find_nearest_line),
874 (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
875 * ecofflink.c (bfd_ecoff_debug_init): Likewise.
876 * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Likewise.
877 * elf-m10300.c (mn10300_elf_relax_section),
878 (elf32_mn10300_link_hash_table_create): Likewise.
879 * elf-strtab.c (_bfd_elf_strtab_init): Likewise.
880 * elf.c (make_mapping, copy_elf_program_header): Likewise.
881 * elf32-arm.c (elf32_arm_link_hash_table_create),
882 (elf32_arm_setup_section_lists, elf32_arm_check_relocs),
883 (elf32_arm_new_section_hook): Likewise.
884 * elf32-avr.c (elf_avr_new_section_hook),
885 (elf32_avr_link_hash_table_create, get_local_syms),
886 (elf32_avr_setup_section_lists): Likewise.
887 * elf32-bfin.c (bfinfdpic_elf_link_hash_table_create),
888 (bfin_link_hash_table_create): Likewise.
889 * elf32-cr16.c (elf32_cr16_link_hash_table_create): Likewise.
890 * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
891 * elf32-csky.c (csky_elf_link_hash_table_create),
892 (csky_elf_check_relocs, elf32_csky_setup_section_lists): Likewise.
893 * elf32-frv.c (frvfdpic_elf_link_hash_table_create): Likewise.
894 * elf32-hppa.c (elf32_hppa_link_hash_table_create),
895 (elf32_hppa_setup_section_lists, get_local_syms): Likewise.
896 * elf32-i386.c (elf_i386_check_relocs): Likewise.
897 * elf32-lm32.c (lm32_elf_link_hash_table_create): Likewise.
898 * elf32-m32r.c (m32r_elf_link_hash_table_create),
899 (m32r_elf_check_relocs): Likewise.
900 * elf32-m68hc1x.c (m68hc11_elf_hash_table_create),
901 (elf32_m68hc11_setup_section_lists),
902 (elf32_m68hc11_size_stubs): Likewise.
903 * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
904 * elf32-metag.c (elf_metag_link_hash_table_create),
905 (elf_metag_setup_section_lists): Likewise.
906 * elf32-microblaze.c (microblaze_elf_link_hash_table_create),
907 (microblaze_elf_check_relocs): Likewise.
908 * elf32-nds32.c (nds32_elf_link_hash_table_create),
909 (nds32_elf_check_relocs): Likewise.
910 * elf32-nios2.c (nios2_elf32_setup_section_lists),
911 (get_local_syms, nios2_elf32_check_relocs),
912 (nios2_elf32_link_hash_table_create): Likewise.
913 * elf32-or1k.c (or1k_elf_link_hash_table_create),
914 (or1k_elf_check_relocs): Likewise.
915 * elf32-ppc.c (ppc_elf_modify_segment_map, update_plt_info): Likewise.
916 * elf32-pru.c (pru_elf32_link_hash_table_create): Likewise.
917 * elf32-s390.c (elf_s390_link_hash_table_create),
918 (elf_s390_check_relocs): Likewise.
919 * elf32-score.c (score_elf_create_got_section),
920 (s3_elf32_score_new_section_hook),
921 (elf32_score_link_hash_table_create): Likewise.
922 * elf32-score7.c (score_elf_create_got_section),
923 (s7_elf32_score_new_section_hook): Likewise.
924 * elf32-sh.c (sh_elf_link_hash_table_create),
925 (sh_elf_check_relocs): Likewise.
926 * elf32-tic6x.c (elf32_tic6x_link_hash_table_create),
927 (elf32_tic6x_new_section_hook, elf32_tic6x_check_relocs): Likewise.
928 * elf32-tilepro.c (tilepro_elf_link_hash_table_create),
929 (tilepro_elf_check_relocs): Likewise.
930 * elf32-v850.c (remember_hi16s_reloc): Likewise.
931 * elf32-vax.c (elf_vax_link_hash_table_create): Likewise.
932 * elf32-xtensa.c (elf_xtensa_link_hash_table_create),
933 (elf_xtensa_new_section_hook): Likewise.
934 * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create),
935 (get_got_entry, elf64_alpha_check_relocs): Likewise.
936 * elf64-hppa.c (elf64_hppa_hash_table_create): Likewise.
937 * elf64-ia64-vms.c (elf64_ia64_object_p): Likewise.
938 * elf64-mmix.c (mmix_elf_new_section_hook): Likewise.
939 * elf64-ppc.c (ppc64_elf_new_section_hook),
940 (ppc64_elf_link_hash_table_create, update_local_sym_info),
941 (update_plt_info, ppc64_elf_check_relocs): Likewise.
942 * elf64-s390.c (elf_s390_link_hash_table_create),
943 (elf_s390_check_relocs): Likewise.
944 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
945 * elflink.c (bfd_elf_link_record_local_dynamic_symbol),
946 (_bfd_elf_link_find_version_dependencies, elf_link_add_object_symbols),
947 (elf_link_add_archive_symbols, compute_bucket_count),
948 (bfd_elf_size_dynsym_hash_dynstr, _bfd_elf_link_hash_table_create),
949 (bfd_elf_get_bfd_needed_list, elf_link_swap_symbols_out),
950 (bfd_elf_final_link): Likewise.
951 * elfnn-aarch64.c (elfNN_aarch64_link_hash_table_create),
952 (elfNN_aarch64_setup_section_lists, elfNN_aarch64_check_relocs),
953 (elfNN_aarch64_new_section_hook): Likewise.
954 * elfnn-ia64.c (elfNN_ia64_object_p): Likewise.
955 * elfnn-riscv.c (riscv_elf_link_hash_table_create),
956 (riscv_elf_check_relocs): Likewise.
957 * elfxx-mips.c (_bfd_mips_elf_new_section_hook),
958 (_bfd_mips_elf_add_symbol_hook, _bfd_mips_elf_check_relocs),
959 (_bfd_mips_elf_modify_segment_map, _bfd_mips_elf_set_section_contents),
960 (_bfd_mips_elf_link_hash_table_create): Likewise.
961 * elfxx-sparc.c (_bfd_sparc_elf_link_hash_table_create),
962 (_bfd_sparc_elf_check_relocs),
963 (_bfd_sparc_elf_new_section_hook): Likewise.
964 * elfxx-tilegx.c (tilegx_elf_link_hash_table_create),
965 (tilegx_elf_check_relocs): Likewise.
966 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Likewise.
967 * format.c (bfd_check_format_matches): Likewise.
968 * hash.c (_bfd_stringtab_init): Likewise.
969 * ihex.c (ihex_scan): Likewise.
970 * irix-core.c (irix_core_core_file_p): Likewise.
971 * linker.c (bfd_wrapped_link_hash_lookup),
972 (_bfd_generic_link_hash_table_create),
973 (_bfd_generic_reloc_link_order): Likewise.
974 * lynx-core.c (lynx_core_file_p): Likewise.
975 * netbsd-core.c (netbsd_core_file_p): Likewise.
976 * osf-core.c (osf_core_core_file_p): Likewise.
977 * pdp11.c (some_aout_object_p, mkobject, make_empty_symbol),
978 (link_hash_table_create, aout_link_write_other_symbol): Likewise.
979 * peXXigen.c (_bfd_XX_bfd_copy_private_section_data): Likewise.
980 * peicode.h (pe_mkobject): Likewise.
981 * ppcboot.c (ppcboot_mkobject, ppcboot_canonicalize_symtab): Likewise.
982 * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
983 * sco5-core.c (read_uarea): Likewise.
984 * som.c (hppa_som_gen_reloc_type, som_object_p, som_prep_headers),
985 (som_write_fixups, som_write_space_strings, som_write_symbol_strings),
986 (som_finish_writing, som_canonicalize_symtab, som_new_section_hook),
987 (som_bfd_copy_private_section_data, bfd_som_set_section_attributes),
988 (bfd_som_attach_aux_hdr, som_write_armap): Likewise.
989 * srec.c (srec_scan): Likewise.
990 * syms.c (_bfd_generic_make_empty_symbol): Likewise.
991 * targets.c (bfd_target_list): Likewise.
992 * tekhex.c (first_phase, tekhex_sizeof_headers): Likewise.
993 * trad-core.c (trad_unix_core_file_p): Likewise.
994 * vms-alpha.c (vms_initialize, alpha_vms_bfd_link_hash_table_create),
995 (vms_new_section_hook): Likewise.
996 * wasm-module.c (wasm_make_empty_symbol): Likewise.
997 * xcofflink.c (xcoff_get_section_contents),
998 (_bfd_xcoff_bfd_link_hash_table_create, xcoff_set_import_path),
999 (xcoff_find_function, bfd_xcoff_link_record_set, xcoff_build_ldsym),
1000 (bfd_xcoff_size_dynamic_sections, xcoff_link_input_bfd): Likewise.
1001
2d0e1217
AM
10022020-02-19 Alan Modra <amodra@gmail.com>
1003
1004 * elfxx-riscv.c (riscv_multi_letter_ext_valid_p): Don't use C99.
1005
99845b3b
L
10062020-02-13 H.J. Lu <hongjiu.lu@intel.com>
1007
1008 * plugin.c (try_load_plugin): Make plugin_list_iter an argument
1009 and use it if it isn't NULL. Remove has_plugin_p argument. Add
1010 a build_list_p argument. Don't search plugin_list. Short circuit
1011 when building the plugin list.
1012 (has_plugin): Renamed to has_plugin_list.
1013 (bfd_plugin_set_plugin): Don't set has_plugin.
1014 (bfd_plugin_specified_p): Check plugin_list instead.
1015 (build_plugin_list): New function.
1016 (load_plugin): Call build_plugin_list and use plugin_list.
1017
22fe7df8
L
10182020-02-11 H.J. Lu <hongjiu.lu@intel.com>
1019
1020 PR binutils/25355
1021 * plugin.c (try_claim): Always clean up for LTO wrapper.
1022 (try_load_plugin): Treat each object as independent. Create a
1023 copy for plugin name.
1024
c675ec1e
NC
10252020-02-11 Nick Clifton <nickc@redhat.com>
1026
1027 * elf32-msp430.c (msp430_final_link_relocate): Always use longs
1028 for addresses in print statements.
1029 (msp430_elf_relax_delete_bytes): Likewise.
1030 (msp430_elf_relax_add_words): Likewise.
1031 (msp430_elf_relax_section): Likewise.
1032
1d07a805
L
10332020-02-11 H.J. Lu <hongjiu.lu@intel.com>
1034
1035 * plugin.c (add_symbols): Clear plugin_data memory.
1036
0aa99dcd
L
10372020-02-10 H.J. Lu <hongjiu.lu@intel.com>
1038
1039 PR binutils/25355
1040 * configure.ac (HAVE_EXECUTABLE_SUFFIX): New AC_DEFINE.
1041 (EXECUTABLE_SUFFIX): Likewise.
1042 * config.in: Regenerated.
1043 * configure: Likewise.
1044 * plugin.c (bfd_plugin_close_and_cleanup): Removed.
1045 (plugin_list_entry): Add all_symbols_read, cleanup_handler,
1046 gcc, lto_wrapper, resolution_file, resolution_option, gcc_env,
1047 real_bfd, real_nsyms, real_syms, lto_nsyms and lto_syms.
1048 (get_lto_wrapper): New.
1049 (setup_lto_wrapper_env): Likewise.
1050 (current_plugin): Likewise.
1051 (register_all_symbols_read): Likewise.
1052 (register_cleanup): Likewise.
1053 (get_symbols): Likewise.
1054 (add_input_file): Likewise.
1055 (bfd_plugin_close_and_cleanup): Likewise.
1056 (claim_file): Removed.
1057 (register_claim_file): Set current_plugin->claim_file.
1058 (add_symbols): Make a copy of LTO symbols. Set lto_nsyms and
1059 lto_syms in current_plugin.
1060 (try_claim): Use current_plugin->claim_file. Call LTO plugin
1061 all_symbols_read handler. Copy real symbols to plugin_data.
1062 Call LTO plugin cleanup handler. Clean up for LTO wrapper.
1063 (try_load_plugin): Don't reuse the previous plugin for LTO
1064 wrapper. Set up GCC LTO wrapper if possible. Don't set
1065 plugin_list_iter->claim_file.
1066 (bfd_plugin_canonicalize_symtab): Use real LTO symbols if
1067 possible.
1068 * plugin.h (plugin_data_struct): Add real_bfd, real_nsyms and
1069 real_syms.
1070
ac4280da
JL
10712020-02-10 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1072
1073 * elf32-msp430.c (msp430_elf_relax_section): Before relaxing a branch,
1074 check if previous instruction matches a conditional jump inserted
1075 earlier. Invert conditional jump and delete branch in this case.
1076
8d6cb116
JL
10772020-02-10 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1078
1079 * elf32-msp430.c (msp430_elf_relax_add_two_words): Rename to
1080 msp430_elf_relax_add_words. Support insertion of either one or two
1081 words.
1082 (msp430_elf_relax_section): Catch opcode of 0x3c00 when relocation
1083 needs to be grown. Handle insertion of branch instruction to replace
1084 jump.
1085
d60f5448
JL
10862020-02-10 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1087
1088 * elf32-msp430.c (msp430_final_link_relocate): Add printf statements for
1089 debugging relocations.
1090 (msp430_elf_relax_delete_bytes): Likewise.
1091 (msp430_elf_relax_add_two_words): Likewise.
1092 (msp430_elf_relax_section): Likewise.
1093
e1f85e11
AM
10942020-02-10 Alan Modra <amodra@gmail.com>
1095
1096 * archures.c: Wrap overlong z80 comments.
1097 * bfd-in2.h: Regenerate.
1098
9fc0b501
SB
10992020-02-07 Sergey Belyashov <sergey.belyashov@gmail.com>
1100
1101 PR 25469
1102 * archures.c: Add GBZ80 and Z80N machine values.
1103 * reloc.c: Add BFD_RELOC_Z80_16_BE.
1104 * coff-z80.c: Add support for new reloc.
1105 * coffcode.h: Add support for new machine values.
1106 * cpu-z80.c: Add support for new machine names.
1107 * elf32-z80.c: Add support for new reloc.
1108 * bfd-in2.h: Regenerate.
1109 * libbfd.h: Regenerate.
1110
9984857c
NC
11112020-02-07 Nick Clifton <nickc@redhat.com>
1112
1113 PR 23932
1114 * elf.c (rewrite_elf_program_header): Do not complain if no
1115 sections are mapped to a segment.
1116
5242a0a0
L
11172020-02-06 H.J. Lu <hongjiu.lu@intel.com>
1118
1119 PR ld/25490
1120 * elflink.c (_bfd_elf_gc_mark_extra_sections): Issue an error
1121 for garbage collection on __patchable_function_entries section
1122 without linked-to section.
1123
b7d07216
L
11242020-02-06 H.J. Lu <hongjiu.lu@intel.com>
1125
1126 PR gas/25381
1127 * bfd-in2.h: Regenerated.
1128 * elflink.c (_bfd_elf_gc_mark_extra_sections): Call mark_hook
1129 on section if gc_mark of any of its linked-to sections is set
1130 and don't set gc_mark again.
1131 * section.c (asection): Add linked_to_symbol_name to map_head
1132 union.
1133
b93a662b
MR
11342020-02-06 Maciej W. Rozycki <macro@wdc.com>
1135
1136 * elf32-v850.c (v850_elf_relax_section): Fix the index used for
1137 reporting an unrecognized instruction with R_V850_LONGJUMP.
1138
6df4c9c2
AM
11392020-02-05 Alan Modra <amodra@gmail.com>
1140
1141 * elf64-ppc.c (ppc_stub_plt_branch): Match comment with reality.
1142
24872cb3
AM
11432020-02-04 Alan Modra <amodra@gmail.com>
1144
1145 * elf32-ppc.c (ppc_elf_relocate_section): After applying
1146 R_PPC_VLE_ADDR20, goto copy_reloc.
1147
ef4627fa
L
11482020-02-02 H.J. Lu <hongjiu.lu@intel.com>
1149
1150 * bfd-in2.h: Regenerated.
1151 * section.c (SEC_ASSEMBLER_SECTION_ID): Fix a typo in comments.
1152
a8c4d40b
L
11532020-02-02 H.J. Lu <hongjiu.lu@intel.com>
1154
1155 PR gas/25380
1156 * bfd-in2.h: Regenerated.
1157 * ecoff.c (bfd_debug_section): Add section_id.
1158 * section.c (bfd_section): Add section_id.
1159 (SEC_ASSEMBLER_SECTION_ID): New.
1160 (BFD_FAKE_SECTION): Add section_id.
1161
5a9212a1
NC
11622020-02-01 Nick Clifton <nickc@redhat.com>
1163
1164 * config.bfd: Move the c30-aout and tic30-aout targets onto the
1165 obsolete list.
1166
e7cbe0c4
SL
11672020-01-31 Sandra Loosemore <sandra@codesourcery.com>
1168
1169 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): DW_EH_PE_datarel
1170 encodings are relative to the GOT on nios2, too.
1171
72ebe8c5
AM
11722020-01-31 Alan Modra <amodra@gmail.com>
1173
1174 * Makefile.am (elf32-target.h, elf64-target.h): Don't use a temp
1175 file. Use $< and $@ in rules.
1176 (elf32-aarch64.c, elf64-aarch64.c): Likewise.
1177 (elf32-ia64.c, elf64-ia64.c): Likewise.
1178 (elf32-riscv.c, elf64-riscv.c): Likewise.
1179 (peigen.c, pepigen.c, pex64igen.c): Likewise.
1180 (elf32-aarch64.c, elf64-aarch64.c): Don't emit $srcdir on #line.
1181 (elf32-riscv.c, elf64-riscv.c): Likewise, and use $(SED).
1182 (elf32-ia64.c, elf64-ia64.c): Do emit #line.
1183 (peigen.c, pepigen.c, pex64igen.c): Likewise.
1184 * Makefile.in: Regenerate.
1185
327301a4
AM
11862020-01-31 Alan Modra <amodra@gmail.com>
1187
1188 PR 4110
1189 * elf.c (setup_group): Don't clear entire section contents,
1190 just the padding after group flags. Release alloc'd memory
1191 after a seek or read failure.
1192
b5d36aaa
JT
11932020-01-16 Jon Turney <jon.turney@dronecode.org.uk>
1194
1195 * peXXigen.c (pe_is_repro): New function.
1196 (_bfd_XX_print_private_bfd_data_common): Note timestamp is
1197 actually a build hash if PE_IMAGE_DEBUG_TYPE_REPRO is present.
1198
1957ab10
JT
11992020-01-16 Jon Turney <jon.turney@dronecode.org.uk>
1200
1201 * peXXigen.c (debug_type_names): Add names for new debug data type
1202 values.
1203
87b2920f
JT
12042020-01-16 Jon Turney <jon.turney@dronecode.org.uk>
1205
1206 * peXXigen.c (pe_print_debugdata): Fix the iteration variable for
1207 inner loop. Fix a memory leak.
1208
72913831
AM
12092020-01-30 Alan Modra <amodra@gmail.com>
1210
1211 * coffgen.c (coff_real_object_p): Don't clear obj_coff_keep_syms
1212 or obj_coff_keep_strings here.
1213 (coff_get_normalized_symtab): Free external syms directly.
1214 * xcofflink.c (xcoff_link_input_bfd): Restore obj_coff_keep_syms
1215 on error exit path.
1216
c35d018b
JW
12172020-01-27 Jim Wilson <jimw@sifive.com>
1218
1219 * cpu-riscv.c (riscv_scan): New.
1220 (N): Change bfd_default_scan to riscv_scan.
1221
086b06f3
AS
12222020-01-27 Andreas Schwab <schwab@suse.de>
1223
1224 * Makefile.am (ALL_MACHINES): Remove cpu-plugin.lo.
1225 (ALL_MACHINES_CFILES): Remove cpu-plugin.c.
1226 * Makefile.in: Regenerate.
1227 * cpu-plugin.c: Remove.
1228 * archures.c (enum bfd_architecture): Remove bfd_arch_plugin.
1229 (bfd_plugin_arch): Remove declaration.
1230 * bfd-in2.h: Regenerate.
1231 * po/SRC-POTFILES.in: Regenerate.
1232
3024a17a
AM
12332020-01-27 H.J. Lu <hongjiu.lu@intel.com>
1234 Alan Modra <amodra@gmail.com>
1235
1236 PR ld/25458
1237 * elflink.c (_bfd_elf_gc_mark_rsec): Mark all weak aliases.
1238
b5f998b2
JW
12392020-01-24 Jim Wilson <jimw@sifive.com>
1240
1241 * elfxx-riscv.c (riscv_get_prefix_class): Format s case like others.
1242 (riscv_parse_prefixed_ext): Fix s extension comment and reword to
1243 avoid over long line.
1244
caa31cfa
NC
12452020-01-24 Nick Clifton <nickc@redhat.com>
1246
1247 PR 25447
1248 * coffgen.c (_bfd_coff_close_and_cleanup): Do not clear the keep
1249 syms and keep strings flags as these may have been set in order to
1250 prevent a bogus call to free.
1251
24e648d4
NC
12522020-01-23 Nick Clifton <nickc@redhat.com>
1253
1254 * po/fr.po: Updated French translation.
1255
67641dd3
AM
12562020-01-23 Alan Modra <amodra@gmail.com>
1257
1258 PR 25444
1259 * elf.c (assign_file_positions_for_load_sections): Avoid divide
1260 by zero when p_align is zero.
1261
403d1bd9
JW
12622020-01-22 Maxim Blinov <maxim.blinov@embecosm.com>
1263
1264 * bfd/elfnn-riscv.c (riscv_skip_prefix): New.
1265 (riscv_prefix_cmp): Likewise.
1266 (riscv_non_std_ext_p): Deleted.
1267 (riscv_std_sv_ext_p): Likewise.
1268 (riscv_non_std_sv_ext_p): Likewise.
1269 (riscv_merge_non_std_and_sv_ext): Rename to...
1270 (riscv_merge_multi_letter_ext): and modified to use riscv_prefix_cmp.
1271 (riscv_merge_arch_attr_info): Replace 3 calls to
1272 riscv_merge_non_std_and_sv_ext with single call to
1273 riscv_merge_multi_letter_ext.
1274 * bfd/elfxx-riscv.c (riscv_parse_std_ext): Break if we
1275 encounter a 'z' prefix.
1276 (riscv_get_prefix_class): New function, return prefix class based
1277 on first few characters of input string.
1278 (riscv_parse_config): New structure to factor out minor differences
1279 in extension class parsing behaviour.
1280 (riscv_parse_sv_or_non_std_ext): Rename to...
1281 (riscv_parse_prefixed_ext): and parameterise with
1282 riscv_parse_config.
1283 (riscv_std_z_ext_strtab, riscv_std_s_ext_strtab): New.
1284 (riscv_multi_letter_ext_valid_p): New.
1285 (riscv_ext_x_valid_p, riscv_ext_z_valid_p, riscv_ext_s_valid_p): New.
1286 (riscv_parse_subset): Delegate all non-single-letter parsing work
1287 to riscv_parse_prefixed_ext.
1288 * bfd/elfxx-riscv.h (riscv_isa_ext_class): New type.
1289 (riscv_get_prefix_class): Declare.
1290
a804e476
AM
12912020-01-22 Alan Modra <amodra@gmail.com>
1292
1293 * elf64-ppc.c (struct ppc_link_hash_table): Add tga_group.
1294 (ppc64_elf_archive_symbol_lookup): Extract __tls_get_addr_opt for
1295 __tls_get_addr_desc.
1296 (ppc64_elf_size_stubs): Add section for linker generated
1297 __tls_get_addr_desc wrapper function. Loop at least once if
1298 generating this function.
1299 (emit_tga_desc, emit_tga_desc_eh_frame): New functions.
1300 (ppc64_elf_build_stubs): Generate __tls_get_addr_desc.
1301
9e7028aa
AM
13022020-01-22 Alan Modra <amodra@gmail.com>
1303
1304 * elf64-ppc.h (struct ppc64_elf_params): Add no_tls_get_addr_regsave.
1305 * elf64-ppc.c (struct ppc_link_hash_table): Add tga_desc and
1306 tga_desc_fd.
1307 (is_tls_get_addr): Match tga_desc and tga_desc_df too.
1308 (STDU_R1_0R1, ADDI_R1_R1): Define.
1309 (tls_get_addr_prologue, tls_get_addr_epilogue): New functions.
1310 (ppc64_elf_tls_setup): Set up tga_desc and tga_desc_fd. Indirect
1311 tga_desc_fd to opt_fd, and tga_desc to opt. Set
1312 no_tls_get_addr_regsave.
1313 (branch_reloc_hash_match): Add hash3 and hash4.
1314 (ppc64_elf_tls_optimize): Handle tga_desc_fd and tga_desc too.
1315 (ppc64_elf_size_dynamic_sections): Likewise.
1316 (ppc64_elf_relocate_section): Likewise.
1317 (plt_stub_size, build_plt_stub): Likewise. Size regsave
1318 __tls_get_addr stub.
1319 (build_tls_get_addr_stub): Build regsave __tls_get_addr stub and
1320 eh_frame.
1321 (ppc_size_one_stub): Handle tga_desc_fd and tga_desc too. Size
1322 eh_frame for regsave __tls_get_addr.
1323
abc489c6
AM
13242020-01-22 Alan Modra <amodra@gmail.com>
1325
1326 * elf64-ppc.c (ppc64_elf_size_stubs): Correct condition under
1327 which __tls_get_addr calls will be eliminated.
1328
26916852
NC
13292020-01-20 Nick Clifton <nickc@redhat.com>
1330
1331 * po/pt.po: Updates Portuguese translation.
1332 * po/ru.po: Updated Russian translation.
1333 * po/uk.po: Updated Ukranian translation.
1334
14470f07
L
13352020-01-20 H.J. Lu <hongjiu.lu@intel.com>
1336
1337 PR ld/25416
1338 * elf64-x86-64.c (elf_x86_64_check_tls_transition): Support
1339 "rex leal x@tlsdesc(%rip), %reg" and "call *x@tlsdesc(%eax)" in
1340 X32 mode.
1341 (elf_x86_64_relocate_section): In x32 mode, for GDesc -> LE
1342 transition, relax "rex leal x@tlsdesc(%rip), %reg" to
1343 "rex movl $x@tpoff, %reg", for GDesc -> IE transition, relax
1344 "rex leal x@tlsdesc(%rip), %reg" to
1345 "rex movl x@gottpoff(%rip), %eax". For both transitions, relax
1346 "call *(%eax)" to "nopl (%rax)".
1347
b9ca1af6
AM
13482020-01-20 Alan Modra <amodra@gmail.com>
1349
1350 * elf64-ppc.c (LD_R11_0R3, CMPDI_R11_0, STD_R11_0R1, LD_R11_0R1),
1351 (MTLR_R11): Don't define.
1352 (LD_R0_0R3, CMPDI_R0_0): Define.
1353 (build_tls_get_addr_stub): Don't use r11 in stub.
1354
ed7007c1
AM
13552020-01-20 Alan Modra <amodra@gmail.com>
1356
1357 * elf64-ppc.c (ppc_elf_hash_entry): New function, use throughout file.
1358 (defined_sym_val, is_tls_get_addr): Likewise.
1359
1b1bb2c6
NC
13602020-01-18 Nick Clifton <nickc@redhat.com>
1361
1362 * version.m4 (BFD_VERSION): Set to 2.34.50.
1363 * configure: Regenerate.
1364 * po/bfd.pot: Regenerate.
1365
ae774686
NC
13662020-01-18 Nick Clifton <nickc@redhat.com>
1367
1368 Binutils 2.34 branch created.
1369
07f1f3aa
CB
13702020-01-17 Christian Biesinger <cbiesinger@google.com>
1371
1372 * coff-arm.c: Fix spelling error (seperate).
1373 * elfxx-riscv.c (riscv_parse_sv_or_non_std_ext): Fix spelling
1374 error (seperate).
1375 * sysdep.h (strnlen): Fix spelling error (seperate).
1376
0d1cc75d
LB
13772020-01-15 Lars Brinkhoff <lars@nocrew.org>
1378
1379 PR 20694
1380 * pdp11.c (TARGET_PAGE_SIZE): Set to 8192.
1381
e1c6cf61
AM
13822020-01-15 Alan Modra <amodra@gmail.com>
1383
1384 PR 25384
1385 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Update comment.
1386 (ppc64_elf_adjust_dynamic_symbol): Don't allow .dynbss copies
1387 of function symbols unless dot symbols are present. Do warn
1388 whenever one is created, regardles of whether a PLT entry is
1389 also emitted for the function symbol.
1390
ef4e5ba5
AM
13912020-01-14 Alan Modra <amodra@gmail.com>
1392
1393 * som.c (som_bfd_count_ar_symbols): Error when file position
1394 of symbols on chains is not strictly increasing.
1395
8ab484c2
AM
13962020-01-14 Alan Modra <amodra@gmail.com>
1397
1398 * vms.h (VMS_DEBUG): Define as 0.
1399 * vms-alpha.c (image_write): Move debug output after bounds check.
1400 Tidy bounds check.
1401 (_bfd_vms_slurp_eihd): Warning fix.
1402 (_bfd_vms_slurp_etir): Init variables to avoid bogus warnings.
1403
b50ef514
AM
14042020-01-13 Alan Modra <amodra@gmail.com>
1405
1406 * vms-alpha.c (_bfd_vms_slurp_egsd): Ensure minimum size even
1407 for "ignored" records.
1408
0c0adcc5
AM
14092020-01-13 Alan Modra <amodra@gmail.com>
1410
1411 * wasm-module.c (wasm_scan_name_function_section): Formatting.
1412 Delete asect name check. Move asect NULL check to wasm_object_p.
1413 Correct bounds check of sizes against end. Replace uses of
1414 bfd_zalloc with bfd_alloc, zeroing only necessary bytes. Use
1415 just one bfd_release.
1416 (wasm_scan): Don't use malloc/strdup for section names,
1417 bfd_alloc instead. Simplify code prefixing section name.
1418 Formatting. Don't attempt to free memory here..
1419 (wasm_object_p): ..do so here.
1420
7f026732
SN
14212020-01-10 Szabolcs Nagy <szabolcs.nagy@arm.com>
1422
1423 PR ld/22269
1424 * elf32-arm.c (elf32_arm_final_link_relocate): Use
1425 UNDEFWEAK_NO_DYNAMIC_RELOC.
1426 (allocate_dynrelocs_for_symbol): Likewise.
1427
8cd0e5e9
TC
14282020-01-10 Tamar Christina <tamar.christina@arm.com>
1429
1430 PR 25210
1431 * elfnn-aarch64.c (_bfd_aarch64_create_stub_section): Remove elfclass.
1432
71780f45
AM
14332020-01-10 Alan Modra <amodra@gmail.com>
1434
1435 * coff-alpha.c (alpha_ecoff_object_p): Calculate size in bfd_size_type.
1436
b899eb3b
NC
14372020-01-09 Nick Clifton <nickc@redhat.com>
1438
1439 PR 25221
1440 * bfd.c (bfd_convert_section_contents): Check for a compress
1441 header size that is larger than the actual section size.
1442
4c6ee646
AM
14432020-01-08 Alan Modra <amodra@gmail.com>
1444
1445 PR 25351
1446 * elflink.c (bfd_elf_final_link): Call _bfd_fix_excluded_sec_syms
1447 after removing sections.
1448
85f78364
JW
14492020-01-06 Jim Wilson <jimw@sifive.com>
1450
1451 PR 25205
1452 * elfnn-riscv.c (riscv_elf_relocate_section) <R_RISCV_CALL>: Add
1453 check for !bfd_link_pic (info).
1454 <R_RISCV_CALL_PLT>: Move next to R_RISCV_CALL.
1455 <R_RISCV_JAL>: Add comment.
1456 (_bfd_riscv_relax_section): For plt.offset check, add check for
1457 bfd_link_pic (info). Add comment.
1458
49078ece
AM
14592020-01-06 Alan Modra <amodra@gmail.com>
1460
1461 * format.c (bfd_check_format_matches): Ignore bfd_error on target
1462 match failures. Don't init to bfd_error_wrong_format before
1463 calling _bfd_check_format.
1464
ab356be7
AM
14652020-01-06 Alan Modra <amodra@gmail.com>
1466
1467 * vms-alpha.c (_bfd_vms_push, _bfd_vms_pop): Return pass/fail
1468 status rather than exiting on stack overflow or underflow.
1469 (_bfd_vms_slurp_etir): Adjust to suit.
1470
85d86817
AM
14712020-01-06 Alan Modra <amodra@gmail.com>
1472
1473 * som.c (som_bfd_fill_in_ar_symbols): Bounds check som_dict index.
1474
3e6aa775
AM
14752020-01-06 Alan Modra <amodra@gmail.com>
1476
1477 * mach-o.c (bfd_mach_o_read_dylinker): Don't read past end of
1478 command. Check name offset is within command.
1479 (bfd_mach_o_read_dylib, bfd_mach_o_read_prebound_dylib),
1480 (bfd_mach_o_read_prebind_cksum, bfd_mach_o_read_twolevel_hints),
1481 (bfd_mach_o_read_fvmlib, bfd_mach_o_read_dysymtab),
1482 (bfd_mach_o_read_symtab, bfd_mach_o_read_uuid),
1483 (bfd_mach_o_read_linkedit, bfd_mach_o_read_str),
1484 (bfd_mach_o_read_dyld_info, bfd_mach_o_read_version_min),
1485 (bfd_mach_o_read_encryption_info, bfd_mach_o_read_source_version),
1486 (bfd_mach_o_read_encryption_info_64, bfd_mach_o_read_main),
1487 (bfd_mach_o_read_note, bfd_mach_o_read_build_version),
1488 (bfd_mach_o_read_segment): Similarly.
1489 (bfd_mach_o_read_thread): Properly bound check thread struct.
1490 Don't repeat checks on second loop.
1491 (bfd_mach_o_read_command): Fail on invalid command length.
1492
ea933f17
AM
14932020-01-04 Alan Modra <amodra@gmail.com>
1494
1495 * format.c (bfd_check_format_matches): Add preserve_match.
1496 Save initial bfd state in "preserve", matched bfd state in
1497 "preserve_match". Save just the first match. Release
1498 bfd_alloc memory. Restore and finish preserved state as
1499 appropriate on all function exit paths.
1500
f24bdec4
AM
15012020-01-04 Alan Modra <amodra@gmail.com>
1502
1503 * mmo.c (mmo_mkobject): Allocate tdata with bfd_zalloc.
1504
991fb595
AM
15052020-01-04 Alan Modra <amodra@gmail.com>
1506
1507 * coffgen.c (coff_real_object_p): Free malloc'd memory on target
1508 match too.
1509
f2a3559d
NC
15102020-01-03 Nick Clifton <nickc@redhat.com>
1511
1512 PR 25307
1513 (bfd_pef_parse_function_stubs): Correct the test that ensures that
1514 there is enough data remaining in the code buffer before
1515 attempting to read a function stub.
1516
7a0fb7be
NC
15172020-01-03 Nick Clifton <nickc@redhat.com>
1518
1519 PR 25308
1520 * elf-properties.c (_bfd_elf_convert_gnu_properties): Check the
1521 return value from bfd_malloc.
1522 * elf32-arm.c (bfd_elf32_arm_vfp11_fix_veneer_locations): Likewise.
1523 (bfd_elf32_arm_stm32l4xx_fix_veneer_locations): Likewise.
1524 (elf32_arm_filter_cmse_symbols): Likewise.
1525 (elf32_arm_write_section): Likewise.
1526 * mach-o.c (bfd_mach_o_core_fetch_environment): Likewise.
1527 (bfd_mach_o_follow_dsym): Likewise.
1528 * pef.c (bfd_pef_print_loader_section): Likewise.
1529 (bfd_pef_scan_start_address): Likewise.
1530 (bfd_pef_parse_function_stubs): Likewise.
1531 (bfd_pef_parse_symbols): Likewise.
1532
b26a3d58
ST
15332020-01-03 Sergei Trofimovich <siarheit@google.com>
1534
1535 * elfnn-ia64.c (elfNN_ia64_merge_private_bfd_data): don't fail
1536 on binary inputs ld/PR25316.
1537 (is_ia64_elf): new helper to filter on ia64 objects.
1538
4bb7a87e
JB
15392020-01-03 Jan Beulich <jbeulich@suse.com>
1540
1541 * mach-o.c (cpusubtype, bfd_mach_o_header_p): Insert underscore
1542 in parameter names.
1543 (bfd_mach_o_scan): Insert underscore in two variable names.
1544
6655dba2
SB
15452020-01-02 Sergey Belyashov <sergey.belyashov@gmail.com>
1546
1547 * Makefile.am: Add z80-elf target support.
1548 * configure.ac: Likewise.
1549 * targets.c: Likewise.
1550 * Makefile.in: Regenerate.
1551 * configure: Regenerate.
1552 * config.bfd: Add z80-elf target support and new arches: ez80 and
1553 z180.
1554 * elf32-z80.c: New file.
1555 * archures.c: Add new z80 architectures: eZ80 and Z180.
1556 * coffcode.h: Likewise.
1557 * cpu-z80.c: Likewise.
1558 * coff-z80.c: Add new relocations for Z80 target and local label
1559 check.
1560 * reloc.c: Add new relocs.
1561 * bfd-in2.h: Regenerate.
1562 * libbfd.h: Regenerate.
1563
0db131fb
TC
15642020-01-02 Tamar Christina <tamar.christina@arm.com>
1565
1566 PR 25210
1567 PR 24753
1568 * elfnn-aarch64.c (_bfd_aarch64_create_stub_section): Set ELF class.
1569
b14ce8bf
AM
15702020-01-01 Alan Modra <amodra@gmail.com>
1571
1572 Update year range in copyright notice of all files.
1573
0b114740 1574For older changes see ChangeLog-2019
3499769a 1575\f
0b114740 1576Copyright (C) 2020 Free Software Foundation, Inc.
3499769a
AM
1577
1578Copying and distribution of this file, with or without modification,
1579are permitted in any medium without royalty provided the copyright
1580notice and this notice are preserved.
1581
1582Local Variables:
1583mode: change-log
1584left-margin: 8
1585fill-column: 74
1586version-control: never
1587End:
This page took 0.549366 seconds and 4 git commands to generate.