]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - bfd/ChangeLog
alpha-vms: error paths not freeing memory and malloc result checks
[thirdparty/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
9cb56943
AM
12020-03-02 Alan Modra <amodra@gmail.com>
2
3 * vms-alpha.c (vms_get_remaining_object_record): Use
4 bfd_realloc_or_free rather than bfd_realloc.
5 (add_symbol_entry, vector_grow1, alpha_vms_slurp_relocs): Likewise.
6 (dst_define_location, parse_module): Likewise, and check realloc
7 return status before using memory. Return status from function
8 adjusting all callers.
9
182ec670
AM
102020-02-28 Alan Modra <amodra@gmail.com>
11
12 * vms-lib.c (_bfd_vms_lib_archive_p): Free memory on error paths.
13
1b088c82
AM
142020-02-28 Alan Modra <amodra@gmail.com>
15
16 * vms-alpha.c (alpha_vms_object_p): Use _bfd_malloc_and_read.
17 Remove duplicate undersize check.
18
5f602802
AM
192020-02-27 Alan Modra <amodra@gmail.com>
20
21 PR 24511
22 * mmo.c (mmo_scan): Set SEC_DATA for .data.
23
49d9fd42
AM
242020-02-27 Alan Modra <amodra@gmail.com>
25
26 PR 24511
27 * syms.c (stt): Trim off all but 'e', 'i' and 'p' entries.
28 (coff_section_type): Adjust comment.
29 (decode_section_type): Likewise. Call coff_section_type before
30 decode_section_type.
31 (bfd_decode_symclass): Use 'c' for common sections other than
32 the standard one.
33
05f52dc2
AM
342020-02-27 Alan Modra <amodra@gmail.com>
35
36 * coff-rs6000.c (_bfd_xcoff_read_ar_hdr): Put all data in one
37 malloc'd block.
38
ff69a894
AM
392020-02-27 Alan Modra <amodra@gmail.com>
40
41 * bfd.c (bfd_stat_arch_elt): Use vector of containing archive,
42 if file is an archive element.
43 * bfd-in2.h: Regenerate.
44
02f7e7ee
AM
452020-02-26 Alan Modra <amodra@gmail.com>
46
47 * archive.c (do_slurp_bsd_armap): Increase minimum parsed_size, and
48 bfd_set_error on failing test. Don't bother changing bfd_error on
49 file read error. Check symdef_count is multiple of BSD_SYMDEF_SIZE.
50 Check sym name is within string buffer. Use size_t for some vars.
51 (do_slurp_coff_armap): Use size_t for some variables, fix size of
52 int_buf. Don't change bfd_error on file read error. Use
53 _bfd_mul_overflow when calculating carsym buffer size. Reorder
54 calculations to catch overflows before they occur. malloc and
55 free raw armap rather than using bfd_alloc. Read raw armap before
56 allocating carsym+strings buffer.
57 (_bfd_slurp_extended_name_table): Localize variables. Check
58 name size against file size.
59
cc4c4f40
AM
602020-02-26 Alan Modra <amodra@gmail.com>
61
62 * vms-lib.c (vms_lib_read_index): Release correct buffer.
63
e0b317de
AM
642020-02-26 Alan Modra <amodra@gmail.com>
65
66 * elf32-rx.c (rx_elf_relocate_section): Use bfd_malloc rather than
67 malloc. Check for NULL return from bfd_malloc.
68 (rx_table_find, rx_table_map): Likewise.
69 (rx_set_section_contents): Check bfd_alloc return.
70 (rx_dump_symtab): Don't alloc internal_syms or external_syms.
71
dc1e8a47
AM
722020-02-26 Alan Modra <amodra@gmail.com>
73
74 * aoutx.h: Indent labels correctly. Format error strings.
75 * archive.c: Likewise.
76 * archive64.c: Likewise.
77 * coff-arm.c: Likewise.
78 * coff-rs6000.c: Likewise.
79 * coff-stgo32.c: Likewise.
80 * cpu-arm.c: Likewise.
81 * dwarf2.c: Likewise.
82 * elf-ifunc.c: Likewise.
83 * elf-properties.c: Likewise.
84 * elf-s390-common.c: Likewise.
85 * elf-strtab.c: Likewise.
86 * elf.c: Likewise.
87 * elf32-arm.c: Likewise.
88 * elf32-bfin.c: Likewise.
89 * elf32-cr16.c: Likewise.
90 * elf32-csky.c: Likewise.
91 * elf32-i386.c: Likewise.
92 * elf32-m68k.c: Likewise.
93 * elf32-msp430.c: Likewise.
94 * elf32-nds32.c: Likewise.
95 * elf32-nios2.c: Likewise.
96 * elf32-pru.c: Likewise.
97 * elf32-xtensa.c: Likewise.
98 * elf64-ia64-vms.c: Likewise.
99 * elf64-x86-64.c: Likewise.
100 * elfcode.h: Likewise.
101 * elfcore.h: Likewise.
102 * elflink.c: Likewise.
103 * elfnn-aarch64.c: Likewise.
104 * elfnn-ia64.c: Likewise.
105 * elfnn-riscv.c: Likewise.
106 * elfxx-mips.c: Likewise.
107 * elfxx-sparc.c: Likewise.
108 * elfxx-x86.c: Likewise.
109 * i386lynx.c: Likewise.
110 * merge.c: Likewise.
111 * pdp11.c: Likewise.
112 * plugin.c: Likewise.
113 * reloc.c: Likewise.
114
e310298c
AM
1152020-02-26 Alan Modra <amodra@gmail.com>
116
117 PR 25593
118 * elf-bfd.h (struct elf_link_hash_table): Rename "loaded" to
119 "dyn_loaded".
120 (bfd_elf_add_dt_needed_tag): Declare.
121 * elf-strtab.c (_bfd_elf_strtab_restore): Handle NULL buf.
122 * elflink.c (bfd_elf_add_dt_needed_tag): Make global and rename
123 from elf_add_dt_needed_tag. Remove soname and doit param.
124 (elf_link_add_object_symbols): Don't use elf_add_dt_needed_tag
125 to see whether as-needed lib is already loaded, use dyn_loaded
126 list instead. When saving and restoring around as-needed lib
127 handle possibility that dynstr has not been initialised. Don't
128 add DT_NEEDED tags here. Limit dyn_loaded list to dynamic libs.
129 Mark libs loaded via DT_NEEDED entries of other libs with
130 DYN_NO_NEEDED if they should not be mentioned in DT_NEEDED of
131 the output.
132 (elf_link_check_versioned_symbol): Remove now unneccesary
133 DYNAMIC check when traversing dyn_loaded list.
134
b570b954
AM
1352020-02-26 Alan Modra <amodra@gmail.com>
136
137 * bfdio.c (bfd_get_file_size): Ignore bogus archive element sizes.
138
ecda9016
L
1392020-02-25 H.J. Lu <hongjiu.lu@intel.com>
140
141 PR binutils/25584
142 * plugin.c (need_lto_wrapper_p): New.
143 (bfd_plugin_set_program_name): Add an int argument to set
144 need_lto_wrapper_p.
145 (get_lto_wrapper): Return FALSE if need_lto_wrapper_p isn't
146 set.
147 * plugin.h (bfd_plugin_set_program_name): Add an int argument.
148
a98c743f
AM
1492020-02-24 Alan Modra <amodra@gmail.com>
150
151 * vms-lib.c (_bfd_vms_lib_archive_p): Correct overflow checks.
152
c893ce36
AM
1532020-02-24 Alan Modra <amodra@gmail.com>
154
155 * vms-lib.c (struct carsym_mem): Add limit.
156 (vms_add_index): Heed limit.
157 (vms_traverse_index): Catch buffer overflows. Remove outdated fixme.
158 (vms_lib_read_index): Set up limit. Catch 32-bit overflow.
159 Always return actual number read.
160 (_bfd_vms_lib_archive_p): Catch buffer overflows. Replace
161 assertion with error exit.
162
7b3c2715
AM
1632020-02-22 Alan Modra <amodra@gmail.com>
164
165 PR 25585
166 * elf.c (assign_file_positions_for_load_sections): Continue linking
167 on "PHDR segment not covered by LOAD segment" errors.
168
a4425a57
AM
1692020-02-21 Alan Modra <amodra@gmail.com>
170
171 * mach-o.c (bfd_mach_o_canonicalize_relocs): Fix ineffective
172 overflow check.
173 (bfd_mach_o_canonicalize_reloc): Likewise.
174 (bfd_mach_o_canonicalize_dynamic_reloc): Likewise. Sanity check
175 counts and offsets against file size.
176 (bfd_mach_o_build_dysymtab): Fix ineffective overflow check.
177 (bfd_mach_o_mangle_sections): Remove unnecessary overflow check.
178 (bfd_mach_o_read_symtab_symbols): Sanity check count and offset
179 against file size. Delete symbol table error message.
180 (bfd_mach_o_read_dysymtab): Sanity check counts and offsets
181 against file size.
182 (bfd_mach_o_read_symtab): Likewise.
183 (bfd_mach_o_read_command): Pass file size.
184 (bfd_mach_o_scan): Sanity check command count against file size.
185
dda2980f
AM
1862020-02-21 Alan Modra <amodra@gmail.com>
187
188 PR 25569
189 * aoutx.h (adjust_o_magic, adjust_z_magic, adjust_n_magic): Use
190 "text", "data" and "bss" section pointer vars. Don't update
191 section size, just exec header sizes.
192 (adjust_sizes_and_vmas): Don't update text section size. Set
193 initial exec header a_text. Print exec headers sizes.
194 * pdp11.c (adjust_o_magic, adjust_z_magic, adjust_n_magic),
195 (adjust_sizes_and_vmas): Similarly. Formatting.
196 (final_link): Correct final file extension.
197
00e49dff
NC
1982020-02-20 Nick Clifton <nickc@redhat.com>
199
200 * elf-bfd.h (struct elf_backend_data): Add symbol_section_index
201 callback.
202 * elfxx-target.h (elf_backend_symbol_section_index): Provide
203 default definition.
204 (elfNN_bed): Initialise the symbol_section_index field.
205 * elf.c (swap_out_syms): Call symbol_section_index, if defined, on
206 OS and PROC specific section indicies. Warn if converting other
207 reserved incidies to SHN_ABS.
208
fcaaac0a
SB
2092020-02-19 Sergey Belyashov <sergey.belyashov@gmail.com>
210
211 PR 25537
212 * cpu-z80.c: Add machine type compatibility checking.
213
dcf06b89
L
2142020-02-19 H.J. Lu <hongjiu.lu@intel.com>
215
216 PR binutils/25355
217 * plugin.c (plugin_list_entry): Remove handle.
218 (try_load_plugin): Call dlclose before return.
219
2c7c5554
AM
2202020-02-19 Alan Modra <amodra@gmail.com>
221
222 * libbfd-in.h (_bfd_constant_p): Define.
223 (_bfd_alloc_and_read, _bfd_malloc_and_read): Check read size against
224 file size before allocating memory.
225 * coffgen.c (_bfd_coff_get_external_symbols): Remove file size check.
226 * elf.c (bfd_elf_get_str_section): Likewise.
227 (_bfd_elf_slurp_version_tables): Likewise.
228 * libbfd.h: Regenerate.
229
2bb3687b
AM
2302020-02-19 Alan Modra <amodra@gmail.com>
231
232 * libbfd-in.h (_bfd_alloc_and_read, _bfd_malloc_and_read): New.
233 * aoutx.h (aout_get_external_symbols): Replace calls to
234 bfd_[m]alloc and bfd_bread with call to _bfd_[m]alloc_and_read.
235 (slurp_reloc_table): Likewise.
236 * archive.c (do_slurp_bsd_armap): Likewise.
237 (do_slurp_coff_armap): Likewise.
238 * archive64.c (_bfd_archive_64_bit_slurp_armap): Likewise.
239 * coff-rs6000.c (_bfd_xcoff_slurp_armap): Likewise.
240 * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
241 * coffcode.h (coff_set_arch_mach_hook, buy_and_read): Likewise.
242 * coffgen.c (coff_real_object_p, coff_object_p, build_debug_section),
243 (_bfd_coff_get_external_symbols): Likewise.
244 * ecoff.c (ecoff_slurp_symbolic_header),
245 (_bfd_ecoff_slurp_symbolic_info, ecoff_slurp_reloc_table),
246 (_bfd_ecoff_slurp_armap, ecoff_link_add_object_symbols, READ),
247 (ecoff_indirect_link_order): Likewise.
248 * elf.c (bfd_elf_get_str_section, setup_group, elf_read_notes),
249 (_bfd_elf_slurp_version_tables): Likewise.
250 * elf32-m32c.c (m32c_elf_relax_section): Likewise.
251 * elf32-rl78.c (rl78_elf_relax_section): Likewise.
252 * elf32-rx.c (elf32_rx_relax_section): Likewise.
253 * elf64-alpha.c (READ): Likewise.
254 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Likewise.
255 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Likewise.
256 * elfcode.h (elf_slurp_symbol_table),
257 (elf_slurp_reloc_table_from_section): Likewise.
258 * elflink.c (elf_link_add_object_symbols),
259 (elf_link_check_versioned_symbol): Likewise.
260 * elfxx-mips.c (READ): Likewise.
261 * i386lynx.c (slurp_reloc_table): Likewise.
262 * lynx-core.c (lynx_core_file_p): Likewise.
263 * mach-o.c (bfd_mach_o_canonicalize_relocs),
264 (bfd_mach_o_read_symtab_strtab, bfd_mach_o_alloc_and_read),
265 (bfd_mach_o_read_prebound_dylib, bfd_mach_o_read_dyld_content
266 * pdp11.c (aout_get_external_symbols, slurp_reloc_table
267 * pef.c (bfd_pef_print_loader_section, bfd_pef_scan_start_address),
268 (bfd_pef_parse_symbols): Likewise.
269 * peicode.h (pe_ILF_object_p, pe_bfd_object_p
270 * som.c (setup_sections, som_slurp_string_table),
271 (som_slurp_reloc_table, som_bfd_count_ar_symbols),
272 (som_bfd_fill_in_ar_symbols): Likewise.
273 * vms-alpha.c (module_find_nearest_line, evax_bfd_print_dst),
274 (evax_bfd_print_image): Likewise.
275 * vms-lib.c (_bfd_vms_lib_archive_p): Likewise.
276 * wasm-module.c (wasm_scan): Likewise.
277 * xcofflink.c (xcoff_link_add_symbols): Likewise.
278 * xsym.c (bfd_sym_read_name_table),
279 (bfd_sym_print_type_information_table_entry): Likewise.
280 * libbfd.h: Regenerate.
281
806470a2
AM
2822020-02-19 Alan Modra <amodra@gmail.com>
283
284 * aoutx.h (slurp_reloc_table): Allocate reloc_cache after
285 reading external relocs.
286 * ecoff.c (ecoff_slurp_reloc_table): Likewise.
287 * archive.c (_bfd_write_archive_contents): Don't twiddle bfd_error
288 after bfd_bread.
289 * archive64.c (_bfd_archive_64_bit_slurp_armap): Remove unnecessary
290 bfd_release.
291 * elf32-m32c.c (m32c_offset_for_reloc): Make shndx_buf a bfd_byte*.
292 (m32c_elf_relax_section): Likewise.
293 * elf32-rl78.c (rl78_offset_for_reloc): Likewise.
294 (rl78_elf_relax_section): Likewise.
295 * elf32-rx.c (rx_offset_for_reloc): Likewise.
296 (elf32_rx_relax_section): Likewise.
297 * mach-o.c (bfd_mach_o_alloc_and_read): Move earlier with better
298 parameter types and use..
299 (bfd_mach_o_read_dylinker, bfd_mach_o_read_dylib),
300 (bfd_mach_o_read_fvmlib, bfd_mach_o_read_str): ..in these functions.
301 * peicode.h (pe_bfd_object_p): Don't zero the part of opthdr
302 being read from file, just the extra.
303 * som.c (som_slurp_symbol_table): Allocate internal symbol buffer
304 after reading external syms. Free on failure.
305
1f4361a7
AM
3062020-02-19 Alan Modra <amodra@gmail.com>
307
308 * coffcode.h (buy_and_read, coff_slurp_line_table),
309 (coff_slurp_symbol_table, coff_slurp_reloc_table): Replace
310 bfd_[z][m]alloc2 calls with _bfd_mul_overflow followed by the
311 corresponding bfd_alloc call. Adjust variables to suit.
312 * coffgen.c (_bfd_coff_get_external_symbols): Likewise.
313 * ecoff.c (_bfd_ecoff_slurp_symbolic_info),
314 (_bfd_ecoff_slurp_symbol_table, READ): Likewise.
315 * elf.c (bfd_elf_get_elf_syms, setup_group, bfd_section_from_shdr),
316 (swap_out_syms, _bfd_elf_slurp_version_tables): Likewise.
317 * elf32-m32c.c (m32c_elf_relax_section): Likewise.
318 * elf32-rl78.c (rl78_elf_relax_section): Likewise.
319 * elf32-rx.c (elf32_rx_relax_section): Likewise.
320 * elf64-alpha.c (READ): Likewise.
321 * elfcode.h (elf_object_p, elf_write_relocs, elf_write_shdrs_and_ehdr),
322 (elf_slurp_symbol_table, elf_slurp_reloc_table),
323 (bfd_from_remote_memory): Likewise.
324 * elfcore.h (core_find_build_id): Likewise.
325 * elfxx-mips.c (READ): Likewise.
326 * mach-o.c (bfd_mach_o_mangle_sections),
327 (bfd_mach_o_read_symtab_symbols, bfd_mach_o_read_thread),
328 (bfd_mach_o_read_dysymtab, bfd_mach_o_flatten_sections),
329 (bfd_mach_o_scan, bfd_mach_o_fat_archive_p): Likewise.
330 * som.c (setup_sections, som_prep_for_fixups)
331 (som_build_and_write_symbol_table, som_slurp_symbol_table),
332 (som_slurp_reloc_table, som_bfd_count_ar_symbols),
333 (som_bfd_fill_in_ar_symbols, som_slurp_armap),
334 (som_bfd_ar_write_symbol_stuff): Likewise.
335 * vms-alpha.c (vector_grow1): Likewise.
336 * vms-lib.c (vms_add_index): Likewise.
337 * wasm-module.c (wasm_scan_name_function_section): Likewise.
338 * libbfd.c (bfd_malloc2, bfd_realloc2, bfd_zmalloc2): Delete.
339 * opncls.c (bfd_alloc2, bfd_zalloc2): Delete.
340 * libbfd-in.h (bfd_malloc2, bfd_realloc2, bfd_zmalloc2),
341 (bfd_alloc2, bfd_zalloc2): Delete.
342 (_bfd_mul_overflow): Define.
343 * libbfd.h: Regenerate.
344
446f7ed5
AM
3452020-02-19 Alan Modra <amodra@gmail.com>
346
347 * elf.c (bfd_section_from_shdr): Use bfd_zalloc rather than
348 bfd_zalloc2.
349 (assign_section_numbers): Likewise.
350 (elf_map_symbols): Likewise, and bfd_alloc rather than bfd_alloc2.
351 (_bfd_elf_map_sections_to_segments): Use bfd_malloc rather than
352 bfd_malloc2, size_t amt, and unsigned tls_count.
353 (rewrite_elf_program_header): Use bfd_malloc and size_t amt.
354 * elflink.c (elf_create_symbuf): Use bfd_malloc.
355 (elf_output_implib): Use bfd_alloc.
356
b03202e3
AM
3572020-02-19 Alan Modra <amodra@gmail.com>
358
359 * bfd.c (struct bfd): Move format and direction to other
360 bitfields. Add "size".
361 * bfdio.c (bfd_get_size): Cache size when not writing file.
362 * opncls.c (bfd_get_debug_link_info_1): Allow for bfd_get_size
363 returning zero, ie. unknown.
364 (bfd_get_alt_debug_link_info): Likewise.
365 * bfd-in2.h: Regenerate.
366
7c5fa58e
AM
3672020-02-19 Alan Modra <amodra@gmail.com>
368
369 * coffgen.c (_bfd_coff_get_external_symbols): Don't call
370 bfd_get_file_size twice.
371 (_bfd_coff_read_string_table): Allow for bfd_get_file_size
372 zero, ie. unknown, return.
373 * elf-attrs.c (_bfd_elf_parse_attributes): Likewise.
374 * elfcode.h (elf_swap_shdr_in): Likewise.
375 (elf_object_p): Don't call bfd_get_file_size twice and correct
376 file size check.
377
96d3b80f
AM
3782020-02-19 Alan Modra <amodra@gmail.com>
379
380 * mach-o.c (bfd_mach_o_flatten_sections): Return a bfd_boolean,
381 FALSE if memory alloc fails. Adjust calls.
382 * som.c (som_prep_for_fixups): Likewise.
383 * vms-alpha.c (alpha_vms_add_fixup_lp, alpha_vms_add_fixup_ca),
384 (alpha_vms_add_fixup_qr, alpha_vms_add_fixup_lr),
385 (alpha_vms_add_lw_reloc, alpha_vms_add_qw_reloc): Likewise.
386 * som.c (som_build_and_write_symbol_table): Return via error_return
387 on seek failure.
388 * vms-alpha.c (VEC_APPEND): Adjust for vector_grow1 changes.
389 (VEC_APPEND_EL): Delete.
390 (vector_grow1): Return pointer to element. Catch overflow.
391 Return NULL on memory allocation failure.
392 (alpha_vms_add_fixup_lp): Replace VEC_APPEND_EL with VEC_APPEND.
393 (alpha_vms_add_fixup_ca): Likewise.
394 (alpha_vms_link_add_object_symbols): Check VEC_APPEND result
395 before using.
396 * elf.c (bfd_section_from_shdr): Check bfd_zalloc2 result.
397
986f0783
AM
3982020-02-19 Alan Modra <amodra@gmail.com>
399
400 * aix386-core.c (aix386_core_file_p): Use size_t for "amt".
401 * aout-target.h (object_p): Likewise.
402 * aout-tic30.c (tic30_aout_object_p): Likewise.
403 * aoutx.h (some_aout_object_p, mkobject, make_empty_symbol),
404 (emit_stringtab, write_syms, link_hash_table_create),
405 (aout_link_write_other_symbol): Likewise.
406 * archive.c (_bfd_generic_mkarchive, bfd_generic_archive_p),
407 (bfd_ar_hdr_from_filesystem, _bfd_write_archive_contents),
408 (_bfd_compute_and_write_armap): Likewise.
409 * archures.c (bfd_arch_list): Likewise.
410 * bfd.c (bfd_record_phdr): Likewise.
411 * binary.c (binary_canonicalize_symtab): Likewise.
412 * cisco-core.c (cisco_core_file_validate): Likewise.
413 * coff-arm.c (coff_arm_link_hash_table_create, find_thumb_glue),
414 (find_arm_glue, record_arm_to_thumb_glue),
415 (record_thumb_to_arm_glue): Likewise.
416 * coff-ppc.c (ppc_coff_link_hash_table_create, record_toc),
417 (ppc_allocate_toc_section): Likewise.
418 * coff-rs6000.c (_bfd_xcoff_mkobject, _bfd_xcoff_archive_p): Likewise.
419 * coff-sh.c (sh_relax_section): Likewise.
420 * coff64-rs6000.c (xcoff64_archive_p): Likewise.
421 * coffcode.h (handle_COMDAT, coff_new_section_hook),
422 (coff_set_alignment_hook, coff_mkobject),
423 (coff_compute_section_file_positions): Likewise.
424 * coffgen.c (coff_make_empty_symbol, coff_bfd_make_debug_symbol),
425 (coff_find_nearest_line_with_names),
426 ( bfd_coff_set_symbol_class): Likewise.
427 * cofflink.c (_bfd_coff_link_hash_table_create),
428 (_bfd_coff_link_input_bfd): Likewise.
429 * dwarf1.c (alloc_dwarf1_unit, alloc_dwarf1_func): Likewise.
430 * dwarf2.c (read_abbrevs, read_attribute_value, add_line_info),
431 (build_line_info_table, sort_line_sequences),
432 (line_info_add_include_dir, line_info_add_file_name),
433 (decode_line_info, scan_unit_for_symbols, parse_comp_unit),
434 (place_sections, _bfd_dwarf2_slurp_debug_info): Likewise.
435 * ecoff.c (_bfd_ecoff_mkobject, _bfd_ecoff_make_empty_symbol),
436 (_bfd_ecoff_find_nearest_line),
437 (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
438 * ecofflink.c (bfd_ecoff_debug_init): Likewise.
439 * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Likewise.
440 * elf-m10300.c (mn10300_elf_relax_section),
441 (elf32_mn10300_link_hash_table_create): Likewise.
442 * elf-strtab.c (_bfd_elf_strtab_init): Likewise.
443 * elf.c (make_mapping, copy_elf_program_header): Likewise.
444 * elf32-arm.c (elf32_arm_link_hash_table_create),
445 (elf32_arm_setup_section_lists, elf32_arm_check_relocs),
446 (elf32_arm_new_section_hook): Likewise.
447 * elf32-avr.c (elf_avr_new_section_hook),
448 (elf32_avr_link_hash_table_create, get_local_syms),
449 (elf32_avr_setup_section_lists): Likewise.
450 * elf32-bfin.c (bfinfdpic_elf_link_hash_table_create),
451 (bfin_link_hash_table_create): Likewise.
452 * elf32-cr16.c (elf32_cr16_link_hash_table_create): Likewise.
453 * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
454 * elf32-csky.c (csky_elf_link_hash_table_create),
455 (csky_elf_check_relocs, elf32_csky_setup_section_lists): Likewise.
456 * elf32-frv.c (frvfdpic_elf_link_hash_table_create): Likewise.
457 * elf32-hppa.c (elf32_hppa_link_hash_table_create),
458 (elf32_hppa_setup_section_lists, get_local_syms): Likewise.
459 * elf32-i386.c (elf_i386_check_relocs): Likewise.
460 * elf32-lm32.c (lm32_elf_link_hash_table_create): Likewise.
461 * elf32-m32r.c (m32r_elf_link_hash_table_create),
462 (m32r_elf_check_relocs): Likewise.
463 * elf32-m68hc1x.c (m68hc11_elf_hash_table_create),
464 (elf32_m68hc11_setup_section_lists),
465 (elf32_m68hc11_size_stubs): Likewise.
466 * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
467 * elf32-metag.c (elf_metag_link_hash_table_create),
468 (elf_metag_setup_section_lists): Likewise.
469 * elf32-microblaze.c (microblaze_elf_link_hash_table_create),
470 (microblaze_elf_check_relocs): Likewise.
471 * elf32-nds32.c (nds32_elf_link_hash_table_create),
472 (nds32_elf_check_relocs): Likewise.
473 * elf32-nios2.c (nios2_elf32_setup_section_lists),
474 (get_local_syms, nios2_elf32_check_relocs),
475 (nios2_elf32_link_hash_table_create): Likewise.
476 * elf32-or1k.c (or1k_elf_link_hash_table_create),
477 (or1k_elf_check_relocs): Likewise.
478 * elf32-ppc.c (ppc_elf_modify_segment_map, update_plt_info): Likewise.
479 * elf32-pru.c (pru_elf32_link_hash_table_create): Likewise.
480 * elf32-s390.c (elf_s390_link_hash_table_create),
481 (elf_s390_check_relocs): Likewise.
482 * elf32-score.c (score_elf_create_got_section),
483 (s3_elf32_score_new_section_hook),
484 (elf32_score_link_hash_table_create): Likewise.
485 * elf32-score7.c (score_elf_create_got_section),
486 (s7_elf32_score_new_section_hook): Likewise.
487 * elf32-sh.c (sh_elf_link_hash_table_create),
488 (sh_elf_check_relocs): Likewise.
489 * elf32-tic6x.c (elf32_tic6x_link_hash_table_create),
490 (elf32_tic6x_new_section_hook, elf32_tic6x_check_relocs): Likewise.
491 * elf32-tilepro.c (tilepro_elf_link_hash_table_create),
492 (tilepro_elf_check_relocs): Likewise.
493 * elf32-v850.c (remember_hi16s_reloc): Likewise.
494 * elf32-vax.c (elf_vax_link_hash_table_create): Likewise.
495 * elf32-xtensa.c (elf_xtensa_link_hash_table_create),
496 (elf_xtensa_new_section_hook): Likewise.
497 * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create),
498 (get_got_entry, elf64_alpha_check_relocs): Likewise.
499 * elf64-hppa.c (elf64_hppa_hash_table_create): Likewise.
500 * elf64-ia64-vms.c (elf64_ia64_object_p): Likewise.
501 * elf64-mmix.c (mmix_elf_new_section_hook): Likewise.
502 * elf64-ppc.c (ppc64_elf_new_section_hook),
503 (ppc64_elf_link_hash_table_create, update_local_sym_info),
504 (update_plt_info, ppc64_elf_check_relocs): Likewise.
505 * elf64-s390.c (elf_s390_link_hash_table_create),
506 (elf_s390_check_relocs): Likewise.
507 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
508 * elflink.c (bfd_elf_link_record_local_dynamic_symbol),
509 (_bfd_elf_link_find_version_dependencies, elf_link_add_object_symbols),
510 (elf_link_add_archive_symbols, compute_bucket_count),
511 (bfd_elf_size_dynsym_hash_dynstr, _bfd_elf_link_hash_table_create),
512 (bfd_elf_get_bfd_needed_list, elf_link_swap_symbols_out),
513 (bfd_elf_final_link): Likewise.
514 * elfnn-aarch64.c (elfNN_aarch64_link_hash_table_create),
515 (elfNN_aarch64_setup_section_lists, elfNN_aarch64_check_relocs),
516 (elfNN_aarch64_new_section_hook): Likewise.
517 * elfnn-ia64.c (elfNN_ia64_object_p): Likewise.
518 * elfnn-riscv.c (riscv_elf_link_hash_table_create),
519 (riscv_elf_check_relocs): Likewise.
520 * elfxx-mips.c (_bfd_mips_elf_new_section_hook),
521 (_bfd_mips_elf_add_symbol_hook, _bfd_mips_elf_check_relocs),
522 (_bfd_mips_elf_modify_segment_map, _bfd_mips_elf_set_section_contents),
523 (_bfd_mips_elf_link_hash_table_create): Likewise.
524 * elfxx-sparc.c (_bfd_sparc_elf_link_hash_table_create),
525 (_bfd_sparc_elf_check_relocs),
526 (_bfd_sparc_elf_new_section_hook): Likewise.
527 * elfxx-tilegx.c (tilegx_elf_link_hash_table_create),
528 (tilegx_elf_check_relocs): Likewise.
529 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Likewise.
530 * format.c (bfd_check_format_matches): Likewise.
531 * hash.c (_bfd_stringtab_init): Likewise.
532 * ihex.c (ihex_scan): Likewise.
533 * irix-core.c (irix_core_core_file_p): Likewise.
534 * linker.c (bfd_wrapped_link_hash_lookup),
535 (_bfd_generic_link_hash_table_create),
536 (_bfd_generic_reloc_link_order): Likewise.
537 * lynx-core.c (lynx_core_file_p): Likewise.
538 * netbsd-core.c (netbsd_core_file_p): Likewise.
539 * osf-core.c (osf_core_core_file_p): Likewise.
540 * pdp11.c (some_aout_object_p, mkobject, make_empty_symbol),
541 (link_hash_table_create, aout_link_write_other_symbol): Likewise.
542 * peXXigen.c (_bfd_XX_bfd_copy_private_section_data): Likewise.
543 * peicode.h (pe_mkobject): Likewise.
544 * ppcboot.c (ppcboot_mkobject, ppcboot_canonicalize_symtab): Likewise.
545 * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
546 * sco5-core.c (read_uarea): Likewise.
547 * som.c (hppa_som_gen_reloc_type, som_object_p, som_prep_headers),
548 (som_write_fixups, som_write_space_strings, som_write_symbol_strings),
549 (som_finish_writing, som_canonicalize_symtab, som_new_section_hook),
550 (som_bfd_copy_private_section_data, bfd_som_set_section_attributes),
551 (bfd_som_attach_aux_hdr, som_write_armap): Likewise.
552 * srec.c (srec_scan): Likewise.
553 * syms.c (_bfd_generic_make_empty_symbol): Likewise.
554 * targets.c (bfd_target_list): Likewise.
555 * tekhex.c (first_phase, tekhex_sizeof_headers): Likewise.
556 * trad-core.c (trad_unix_core_file_p): Likewise.
557 * vms-alpha.c (vms_initialize, alpha_vms_bfd_link_hash_table_create),
558 (vms_new_section_hook): Likewise.
559 * wasm-module.c (wasm_make_empty_symbol): Likewise.
560 * xcofflink.c (xcoff_get_section_contents),
561 (_bfd_xcoff_bfd_link_hash_table_create, xcoff_set_import_path),
562 (xcoff_find_function, bfd_xcoff_link_record_set, xcoff_build_ldsym),
563 (bfd_xcoff_size_dynamic_sections, xcoff_link_input_bfd): Likewise.
564
2d0e1217
AM
5652020-02-19 Alan Modra <amodra@gmail.com>
566
567 * elfxx-riscv.c (riscv_multi_letter_ext_valid_p): Don't use C99.
568
99845b3b
L
5692020-02-13 H.J. Lu <hongjiu.lu@intel.com>
570
571 * plugin.c (try_load_plugin): Make plugin_list_iter an argument
572 and use it if it isn't NULL. Remove has_plugin_p argument. Add
573 a build_list_p argument. Don't search plugin_list. Short circuit
574 when building the plugin list.
575 (has_plugin): Renamed to has_plugin_list.
576 (bfd_plugin_set_plugin): Don't set has_plugin.
577 (bfd_plugin_specified_p): Check plugin_list instead.
578 (build_plugin_list): New function.
579 (load_plugin): Call build_plugin_list and use plugin_list.
580
22fe7df8
L
5812020-02-11 H.J. Lu <hongjiu.lu@intel.com>
582
583 PR binutils/25355
584 * plugin.c (try_claim): Always clean up for LTO wrapper.
585 (try_load_plugin): Treat each object as independent. Create a
586 copy for plugin name.
587
c675ec1e
NC
5882020-02-11 Nick Clifton <nickc@redhat.com>
589
590 * elf32-msp430.c (msp430_final_link_relocate): Always use longs
591 for addresses in print statements.
592 (msp430_elf_relax_delete_bytes): Likewise.
593 (msp430_elf_relax_add_words): Likewise.
594 (msp430_elf_relax_section): Likewise.
595
1d07a805
L
5962020-02-11 H.J. Lu <hongjiu.lu@intel.com>
597
598 * plugin.c (add_symbols): Clear plugin_data memory.
599
0aa99dcd
L
6002020-02-10 H.J. Lu <hongjiu.lu@intel.com>
601
602 PR binutils/25355
603 * configure.ac (HAVE_EXECUTABLE_SUFFIX): New AC_DEFINE.
604 (EXECUTABLE_SUFFIX): Likewise.
605 * config.in: Regenerated.
606 * configure: Likewise.
607 * plugin.c (bfd_plugin_close_and_cleanup): Removed.
608 (plugin_list_entry): Add all_symbols_read, cleanup_handler,
609 gcc, lto_wrapper, resolution_file, resolution_option, gcc_env,
610 real_bfd, real_nsyms, real_syms, lto_nsyms and lto_syms.
611 (get_lto_wrapper): New.
612 (setup_lto_wrapper_env): Likewise.
613 (current_plugin): Likewise.
614 (register_all_symbols_read): Likewise.
615 (register_cleanup): Likewise.
616 (get_symbols): Likewise.
617 (add_input_file): Likewise.
618 (bfd_plugin_close_and_cleanup): Likewise.
619 (claim_file): Removed.
620 (register_claim_file): Set current_plugin->claim_file.
621 (add_symbols): Make a copy of LTO symbols. Set lto_nsyms and
622 lto_syms in current_plugin.
623 (try_claim): Use current_plugin->claim_file. Call LTO plugin
624 all_symbols_read handler. Copy real symbols to plugin_data.
625 Call LTO plugin cleanup handler. Clean up for LTO wrapper.
626 (try_load_plugin): Don't reuse the previous plugin for LTO
627 wrapper. Set up GCC LTO wrapper if possible. Don't set
628 plugin_list_iter->claim_file.
629 (bfd_plugin_canonicalize_symtab): Use real LTO symbols if
630 possible.
631 * plugin.h (plugin_data_struct): Add real_bfd, real_nsyms and
632 real_syms.
633
ac4280da
JL
6342020-02-10 Jozef Lawrynowicz <jozef.l@mittosystems.com>
635
636 * elf32-msp430.c (msp430_elf_relax_section): Before relaxing a branch,
637 check if previous instruction matches a conditional jump inserted
638 earlier. Invert conditional jump and delete branch in this case.
639
8d6cb116
JL
6402020-02-10 Jozef Lawrynowicz <jozef.l@mittosystems.com>
641
642 * elf32-msp430.c (msp430_elf_relax_add_two_words): Rename to
643 msp430_elf_relax_add_words. Support insertion of either one or two
644 words.
645 (msp430_elf_relax_section): Catch opcode of 0x3c00 when relocation
646 needs to be grown. Handle insertion of branch instruction to replace
647 jump.
648
d60f5448
JL
6492020-02-10 Jozef Lawrynowicz <jozef.l@mittosystems.com>
650
651 * elf32-msp430.c (msp430_final_link_relocate): Add printf statements for
652 debugging relocations.
653 (msp430_elf_relax_delete_bytes): Likewise.
654 (msp430_elf_relax_add_two_words): Likewise.
655 (msp430_elf_relax_section): Likewise.
656
e1f85e11
AM
6572020-02-10 Alan Modra <amodra@gmail.com>
658
659 * archures.c: Wrap overlong z80 comments.
660 * bfd-in2.h: Regenerate.
661
9fc0b501
SB
6622020-02-07 Sergey Belyashov <sergey.belyashov@gmail.com>
663
664 PR 25469
665 * archures.c: Add GBZ80 and Z80N machine values.
666 * reloc.c: Add BFD_RELOC_Z80_16_BE.
667 * coff-z80.c: Add support for new reloc.
668 * coffcode.h: Add support for new machine values.
669 * cpu-z80.c: Add support for new machine names.
670 * elf32-z80.c: Add support for new reloc.
671 * bfd-in2.h: Regenerate.
672 * libbfd.h: Regenerate.
673
9984857c
NC
6742020-02-07 Nick Clifton <nickc@redhat.com>
675
676 PR 23932
677 * elf.c (rewrite_elf_program_header): Do not complain if no
678 sections are mapped to a segment.
679
5242a0a0
L
6802020-02-06 H.J. Lu <hongjiu.lu@intel.com>
681
682 PR ld/25490
683 * elflink.c (_bfd_elf_gc_mark_extra_sections): Issue an error
684 for garbage collection on __patchable_function_entries section
685 without linked-to section.
686
b7d07216
L
6872020-02-06 H.J. Lu <hongjiu.lu@intel.com>
688
689 PR gas/25381
690 * bfd-in2.h: Regenerated.
691 * elflink.c (_bfd_elf_gc_mark_extra_sections): Call mark_hook
692 on section if gc_mark of any of its linked-to sections is set
693 and don't set gc_mark again.
694 * section.c (asection): Add linked_to_symbol_name to map_head
695 union.
696
b93a662b
MR
6972020-02-06 Maciej W. Rozycki <macro@wdc.com>
698
699 * elf32-v850.c (v850_elf_relax_section): Fix the index used for
700 reporting an unrecognized instruction with R_V850_LONGJUMP.
701
6df4c9c2
AM
7022020-02-05 Alan Modra <amodra@gmail.com>
703
704 * elf64-ppc.c (ppc_stub_plt_branch): Match comment with reality.
705
24872cb3
AM
7062020-02-04 Alan Modra <amodra@gmail.com>
707
708 * elf32-ppc.c (ppc_elf_relocate_section): After applying
709 R_PPC_VLE_ADDR20, goto copy_reloc.
710
ef4627fa
L
7112020-02-02 H.J. Lu <hongjiu.lu@intel.com>
712
713 * bfd-in2.h: Regenerated.
714 * section.c (SEC_ASSEMBLER_SECTION_ID): Fix a typo in comments.
715
a8c4d40b
L
7162020-02-02 H.J. Lu <hongjiu.lu@intel.com>
717
718 PR gas/25380
719 * bfd-in2.h: Regenerated.
720 * ecoff.c (bfd_debug_section): Add section_id.
721 * section.c (bfd_section): Add section_id.
722 (SEC_ASSEMBLER_SECTION_ID): New.
723 (BFD_FAKE_SECTION): Add section_id.
724
5a9212a1
NC
7252020-02-01 Nick Clifton <nickc@redhat.com>
726
727 * config.bfd: Move the c30-aout and tic30-aout targets onto the
728 obsolete list.
729
e7cbe0c4
SL
7302020-01-31 Sandra Loosemore <sandra@codesourcery.com>
731
732 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): DW_EH_PE_datarel
733 encodings are relative to the GOT on nios2, too.
734
72ebe8c5
AM
7352020-01-31 Alan Modra <amodra@gmail.com>
736
737 * Makefile.am (elf32-target.h, elf64-target.h): Don't use a temp
738 file. Use $< and $@ in rules.
739 (elf32-aarch64.c, elf64-aarch64.c): Likewise.
740 (elf32-ia64.c, elf64-ia64.c): Likewise.
741 (elf32-riscv.c, elf64-riscv.c): Likewise.
742 (peigen.c, pepigen.c, pex64igen.c): Likewise.
743 (elf32-aarch64.c, elf64-aarch64.c): Don't emit $srcdir on #line.
744 (elf32-riscv.c, elf64-riscv.c): Likewise, and use $(SED).
745 (elf32-ia64.c, elf64-ia64.c): Do emit #line.
746 (peigen.c, pepigen.c, pex64igen.c): Likewise.
747 * Makefile.in: Regenerate.
748
327301a4
AM
7492020-01-31 Alan Modra <amodra@gmail.com>
750
751 PR 4110
752 * elf.c (setup_group): Don't clear entire section contents,
753 just the padding after group flags. Release alloc'd memory
754 after a seek or read failure.
755
b5d36aaa
JT
7562020-01-16 Jon Turney <jon.turney@dronecode.org.uk>
757
758 * peXXigen.c (pe_is_repro): New function.
759 (_bfd_XX_print_private_bfd_data_common): Note timestamp is
760 actually a build hash if PE_IMAGE_DEBUG_TYPE_REPRO is present.
761
1957ab10
JT
7622020-01-16 Jon Turney <jon.turney@dronecode.org.uk>
763
764 * peXXigen.c (debug_type_names): Add names for new debug data type
765 values.
766
87b2920f
JT
7672020-01-16 Jon Turney <jon.turney@dronecode.org.uk>
768
769 * peXXigen.c (pe_print_debugdata): Fix the iteration variable for
770 inner loop. Fix a memory leak.
771
72913831
AM
7722020-01-30 Alan Modra <amodra@gmail.com>
773
774 * coffgen.c (coff_real_object_p): Don't clear obj_coff_keep_syms
775 or obj_coff_keep_strings here.
776 (coff_get_normalized_symtab): Free external syms directly.
777 * xcofflink.c (xcoff_link_input_bfd): Restore obj_coff_keep_syms
778 on error exit path.
779
c35d018b
JW
7802020-01-27 Jim Wilson <jimw@sifive.com>
781
782 * cpu-riscv.c (riscv_scan): New.
783 (N): Change bfd_default_scan to riscv_scan.
784
086b06f3
AS
7852020-01-27 Andreas Schwab <schwab@suse.de>
786
787 * Makefile.am (ALL_MACHINES): Remove cpu-plugin.lo.
788 (ALL_MACHINES_CFILES): Remove cpu-plugin.c.
789 * Makefile.in: Regenerate.
790 * cpu-plugin.c: Remove.
791 * archures.c (enum bfd_architecture): Remove bfd_arch_plugin.
792 (bfd_plugin_arch): Remove declaration.
793 * bfd-in2.h: Regenerate.
794 * po/SRC-POTFILES.in: Regenerate.
795
3024a17a
AM
7962020-01-27 H.J. Lu <hongjiu.lu@intel.com>
797 Alan Modra <amodra@gmail.com>
798
799 PR ld/25458
800 * elflink.c (_bfd_elf_gc_mark_rsec): Mark all weak aliases.
801
b5f998b2
JW
8022020-01-24 Jim Wilson <jimw@sifive.com>
803
804 * elfxx-riscv.c (riscv_get_prefix_class): Format s case like others.
805 (riscv_parse_prefixed_ext): Fix s extension comment and reword to
806 avoid over long line.
807
caa31cfa
NC
8082020-01-24 Nick Clifton <nickc@redhat.com>
809
810 PR 25447
811 * coffgen.c (_bfd_coff_close_and_cleanup): Do not clear the keep
812 syms and keep strings flags as these may have been set in order to
813 prevent a bogus call to free.
814
24e648d4
NC
8152020-01-23 Nick Clifton <nickc@redhat.com>
816
817 * po/fr.po: Updated French translation.
818
67641dd3
AM
8192020-01-23 Alan Modra <amodra@gmail.com>
820
821 PR 25444
822 * elf.c (assign_file_positions_for_load_sections): Avoid divide
823 by zero when p_align is zero.
824
403d1bd9
JW
8252020-01-22 Maxim Blinov <maxim.blinov@embecosm.com>
826
827 * bfd/elfnn-riscv.c (riscv_skip_prefix): New.
828 (riscv_prefix_cmp): Likewise.
829 (riscv_non_std_ext_p): Deleted.
830 (riscv_std_sv_ext_p): Likewise.
831 (riscv_non_std_sv_ext_p): Likewise.
832 (riscv_merge_non_std_and_sv_ext): Rename to...
833 (riscv_merge_multi_letter_ext): and modified to use riscv_prefix_cmp.
834 (riscv_merge_arch_attr_info): Replace 3 calls to
835 riscv_merge_non_std_and_sv_ext with single call to
836 riscv_merge_multi_letter_ext.
837 * bfd/elfxx-riscv.c (riscv_parse_std_ext): Break if we
838 encounter a 'z' prefix.
839 (riscv_get_prefix_class): New function, return prefix class based
840 on first few characters of input string.
841 (riscv_parse_config): New structure to factor out minor differences
842 in extension class parsing behaviour.
843 (riscv_parse_sv_or_non_std_ext): Rename to...
844 (riscv_parse_prefixed_ext): and parameterise with
845 riscv_parse_config.
846 (riscv_std_z_ext_strtab, riscv_std_s_ext_strtab): New.
847 (riscv_multi_letter_ext_valid_p): New.
848 (riscv_ext_x_valid_p, riscv_ext_z_valid_p, riscv_ext_s_valid_p): New.
849 (riscv_parse_subset): Delegate all non-single-letter parsing work
850 to riscv_parse_prefixed_ext.
851 * bfd/elfxx-riscv.h (riscv_isa_ext_class): New type.
852 (riscv_get_prefix_class): Declare.
853
a804e476
AM
8542020-01-22 Alan Modra <amodra@gmail.com>
855
856 * elf64-ppc.c (struct ppc_link_hash_table): Add tga_group.
857 (ppc64_elf_archive_symbol_lookup): Extract __tls_get_addr_opt for
858 __tls_get_addr_desc.
859 (ppc64_elf_size_stubs): Add section for linker generated
860 __tls_get_addr_desc wrapper function. Loop at least once if
861 generating this function.
862 (emit_tga_desc, emit_tga_desc_eh_frame): New functions.
863 (ppc64_elf_build_stubs): Generate __tls_get_addr_desc.
864
9e7028aa
AM
8652020-01-22 Alan Modra <amodra@gmail.com>
866
867 * elf64-ppc.h (struct ppc64_elf_params): Add no_tls_get_addr_regsave.
868 * elf64-ppc.c (struct ppc_link_hash_table): Add tga_desc and
869 tga_desc_fd.
870 (is_tls_get_addr): Match tga_desc and tga_desc_df too.
871 (STDU_R1_0R1, ADDI_R1_R1): Define.
872 (tls_get_addr_prologue, tls_get_addr_epilogue): New functions.
873 (ppc64_elf_tls_setup): Set up tga_desc and tga_desc_fd. Indirect
874 tga_desc_fd to opt_fd, and tga_desc to opt. Set
875 no_tls_get_addr_regsave.
876 (branch_reloc_hash_match): Add hash3 and hash4.
877 (ppc64_elf_tls_optimize): Handle tga_desc_fd and tga_desc too.
878 (ppc64_elf_size_dynamic_sections): Likewise.
879 (ppc64_elf_relocate_section): Likewise.
880 (plt_stub_size, build_plt_stub): Likewise. Size regsave
881 __tls_get_addr stub.
882 (build_tls_get_addr_stub): Build regsave __tls_get_addr stub and
883 eh_frame.
884 (ppc_size_one_stub): Handle tga_desc_fd and tga_desc too. Size
885 eh_frame for regsave __tls_get_addr.
886
abc489c6
AM
8872020-01-22 Alan Modra <amodra@gmail.com>
888
889 * elf64-ppc.c (ppc64_elf_size_stubs): Correct condition under
890 which __tls_get_addr calls will be eliminated.
891
26916852
NC
8922020-01-20 Nick Clifton <nickc@redhat.com>
893
894 * po/pt.po: Updates Portuguese translation.
895 * po/ru.po: Updated Russian translation.
896 * po/uk.po: Updated Ukranian translation.
897
14470f07
L
8982020-01-20 H.J. Lu <hongjiu.lu@intel.com>
899
900 PR ld/25416
901 * elf64-x86-64.c (elf_x86_64_check_tls_transition): Support
902 "rex leal x@tlsdesc(%rip), %reg" and "call *x@tlsdesc(%eax)" in
903 X32 mode.
904 (elf_x86_64_relocate_section): In x32 mode, for GDesc -> LE
905 transition, relax "rex leal x@tlsdesc(%rip), %reg" to
906 "rex movl $x@tpoff, %reg", for GDesc -> IE transition, relax
907 "rex leal x@tlsdesc(%rip), %reg" to
908 "rex movl x@gottpoff(%rip), %eax". For both transitions, relax
909 "call *(%eax)" to "nopl (%rax)".
910
b9ca1af6
AM
9112020-01-20 Alan Modra <amodra@gmail.com>
912
913 * elf64-ppc.c (LD_R11_0R3, CMPDI_R11_0, STD_R11_0R1, LD_R11_0R1),
914 (MTLR_R11): Don't define.
915 (LD_R0_0R3, CMPDI_R0_0): Define.
916 (build_tls_get_addr_stub): Don't use r11 in stub.
917
ed7007c1
AM
9182020-01-20 Alan Modra <amodra@gmail.com>
919
920 * elf64-ppc.c (ppc_elf_hash_entry): New function, use throughout file.
921 (defined_sym_val, is_tls_get_addr): Likewise.
922
1b1bb2c6
NC
9232020-01-18 Nick Clifton <nickc@redhat.com>
924
925 * version.m4 (BFD_VERSION): Set to 2.34.50.
926 * configure: Regenerate.
927 * po/bfd.pot: Regenerate.
928
ae774686
NC
9292020-01-18 Nick Clifton <nickc@redhat.com>
930
931 Binutils 2.34 branch created.
932
07f1f3aa
CB
9332020-01-17 Christian Biesinger <cbiesinger@google.com>
934
935 * coff-arm.c: Fix spelling error (seperate).
936 * elfxx-riscv.c (riscv_parse_sv_or_non_std_ext): Fix spelling
937 error (seperate).
938 * sysdep.h (strnlen): Fix spelling error (seperate).
939
0d1cc75d
LB
9402020-01-15 Lars Brinkhoff <lars@nocrew.org>
941
942 PR 20694
943 * pdp11.c (TARGET_PAGE_SIZE): Set to 8192.
944
e1c6cf61
AM
9452020-01-15 Alan Modra <amodra@gmail.com>
946
947 PR 25384
948 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Update comment.
949 (ppc64_elf_adjust_dynamic_symbol): Don't allow .dynbss copies
950 of function symbols unless dot symbols are present. Do warn
951 whenever one is created, regardles of whether a PLT entry is
952 also emitted for the function symbol.
953
ef4e5ba5
AM
9542020-01-14 Alan Modra <amodra@gmail.com>
955
956 * som.c (som_bfd_count_ar_symbols): Error when file position
957 of symbols on chains is not strictly increasing.
958
8ab484c2
AM
9592020-01-14 Alan Modra <amodra@gmail.com>
960
961 * vms.h (VMS_DEBUG): Define as 0.
962 * vms-alpha.c (image_write): Move debug output after bounds check.
963 Tidy bounds check.
964 (_bfd_vms_slurp_eihd): Warning fix.
965 (_bfd_vms_slurp_etir): Init variables to avoid bogus warnings.
966
b50ef514
AM
9672020-01-13 Alan Modra <amodra@gmail.com>
968
969 * vms-alpha.c (_bfd_vms_slurp_egsd): Ensure minimum size even
970 for "ignored" records.
971
0c0adcc5
AM
9722020-01-13 Alan Modra <amodra@gmail.com>
973
974 * wasm-module.c (wasm_scan_name_function_section): Formatting.
975 Delete asect name check. Move asect NULL check to wasm_object_p.
976 Correct bounds check of sizes against end. Replace uses of
977 bfd_zalloc with bfd_alloc, zeroing only necessary bytes. Use
978 just one bfd_release.
979 (wasm_scan): Don't use malloc/strdup for section names,
980 bfd_alloc instead. Simplify code prefixing section name.
981 Formatting. Don't attempt to free memory here..
982 (wasm_object_p): ..do so here.
983
7f026732
SN
9842020-01-10 Szabolcs Nagy <szabolcs.nagy@arm.com>
985
986 PR ld/22269
987 * elf32-arm.c (elf32_arm_final_link_relocate): Use
988 UNDEFWEAK_NO_DYNAMIC_RELOC.
989 (allocate_dynrelocs_for_symbol): Likewise.
990
8cd0e5e9
TC
9912020-01-10 Tamar Christina <tamar.christina@arm.com>
992
993 PR 25210
994 * elfnn-aarch64.c (_bfd_aarch64_create_stub_section): Remove elfclass.
995
71780f45
AM
9962020-01-10 Alan Modra <amodra@gmail.com>
997
998 * coff-alpha.c (alpha_ecoff_object_p): Calculate size in bfd_size_type.
999
b899eb3b
NC
10002020-01-09 Nick Clifton <nickc@redhat.com>
1001
1002 PR 25221
1003 * bfd.c (bfd_convert_section_contents): Check for a compress
1004 header size that is larger than the actual section size.
1005
4c6ee646
AM
10062020-01-08 Alan Modra <amodra@gmail.com>
1007
1008 PR 25351
1009 * elflink.c (bfd_elf_final_link): Call _bfd_fix_excluded_sec_syms
1010 after removing sections.
1011
85f78364
JW
10122020-01-06 Jim Wilson <jimw@sifive.com>
1013
1014 PR 25205
1015 * elfnn-riscv.c (riscv_elf_relocate_section) <R_RISCV_CALL>: Add
1016 check for !bfd_link_pic (info).
1017 <R_RISCV_CALL_PLT>: Move next to R_RISCV_CALL.
1018 <R_RISCV_JAL>: Add comment.
1019 (_bfd_riscv_relax_section): For plt.offset check, add check for
1020 bfd_link_pic (info). Add comment.
1021
49078ece
AM
10222020-01-06 Alan Modra <amodra@gmail.com>
1023
1024 * format.c (bfd_check_format_matches): Ignore bfd_error on target
1025 match failures. Don't init to bfd_error_wrong_format before
1026 calling _bfd_check_format.
1027
ab356be7
AM
10282020-01-06 Alan Modra <amodra@gmail.com>
1029
1030 * vms-alpha.c (_bfd_vms_push, _bfd_vms_pop): Return pass/fail
1031 status rather than exiting on stack overflow or underflow.
1032 (_bfd_vms_slurp_etir): Adjust to suit.
1033
85d86817
AM
10342020-01-06 Alan Modra <amodra@gmail.com>
1035
1036 * som.c (som_bfd_fill_in_ar_symbols): Bounds check som_dict index.
1037
3e6aa775
AM
10382020-01-06 Alan Modra <amodra@gmail.com>
1039
1040 * mach-o.c (bfd_mach_o_read_dylinker): Don't read past end of
1041 command. Check name offset is within command.
1042 (bfd_mach_o_read_dylib, bfd_mach_o_read_prebound_dylib),
1043 (bfd_mach_o_read_prebind_cksum, bfd_mach_o_read_twolevel_hints),
1044 (bfd_mach_o_read_fvmlib, bfd_mach_o_read_dysymtab),
1045 (bfd_mach_o_read_symtab, bfd_mach_o_read_uuid),
1046 (bfd_mach_o_read_linkedit, bfd_mach_o_read_str),
1047 (bfd_mach_o_read_dyld_info, bfd_mach_o_read_version_min),
1048 (bfd_mach_o_read_encryption_info, bfd_mach_o_read_source_version),
1049 (bfd_mach_o_read_encryption_info_64, bfd_mach_o_read_main),
1050 (bfd_mach_o_read_note, bfd_mach_o_read_build_version),
1051 (bfd_mach_o_read_segment): Similarly.
1052 (bfd_mach_o_read_thread): Properly bound check thread struct.
1053 Don't repeat checks on second loop.
1054 (bfd_mach_o_read_command): Fail on invalid command length.
1055
ea933f17
AM
10562020-01-04 Alan Modra <amodra@gmail.com>
1057
1058 * format.c (bfd_check_format_matches): Add preserve_match.
1059 Save initial bfd state in "preserve", matched bfd state in
1060 "preserve_match". Save just the first match. Release
1061 bfd_alloc memory. Restore and finish preserved state as
1062 appropriate on all function exit paths.
1063
f24bdec4
AM
10642020-01-04 Alan Modra <amodra@gmail.com>
1065
1066 * mmo.c (mmo_mkobject): Allocate tdata with bfd_zalloc.
1067
991fb595
AM
10682020-01-04 Alan Modra <amodra@gmail.com>
1069
1070 * coffgen.c (coff_real_object_p): Free malloc'd memory on target
1071 match too.
1072
f2a3559d
NC
10732020-01-03 Nick Clifton <nickc@redhat.com>
1074
1075 PR 25307
1076 (bfd_pef_parse_function_stubs): Correct the test that ensures that
1077 there is enough data remaining in the code buffer before
1078 attempting to read a function stub.
1079
7a0fb7be
NC
10802020-01-03 Nick Clifton <nickc@redhat.com>
1081
1082 PR 25308
1083 * elf-properties.c (_bfd_elf_convert_gnu_properties): Check the
1084 return value from bfd_malloc.
1085 * elf32-arm.c (bfd_elf32_arm_vfp11_fix_veneer_locations): Likewise.
1086 (bfd_elf32_arm_stm32l4xx_fix_veneer_locations): Likewise.
1087 (elf32_arm_filter_cmse_symbols): Likewise.
1088 (elf32_arm_write_section): Likewise.
1089 * mach-o.c (bfd_mach_o_core_fetch_environment): Likewise.
1090 (bfd_mach_o_follow_dsym): Likewise.
1091 * pef.c (bfd_pef_print_loader_section): Likewise.
1092 (bfd_pef_scan_start_address): Likewise.
1093 (bfd_pef_parse_function_stubs): Likewise.
1094 (bfd_pef_parse_symbols): Likewise.
1095
b26a3d58
ST
10962020-01-03 Sergei Trofimovich <siarheit@google.com>
1097
1098 * elfnn-ia64.c (elfNN_ia64_merge_private_bfd_data): don't fail
1099 on binary inputs ld/PR25316.
1100 (is_ia64_elf): new helper to filter on ia64 objects.
1101
4bb7a87e
JB
11022020-01-03 Jan Beulich <jbeulich@suse.com>
1103
1104 * mach-o.c (cpusubtype, bfd_mach_o_header_p): Insert underscore
1105 in parameter names.
1106 (bfd_mach_o_scan): Insert underscore in two variable names.
1107
6655dba2
SB
11082020-01-02 Sergey Belyashov <sergey.belyashov@gmail.com>
1109
1110 * Makefile.am: Add z80-elf target support.
1111 * configure.ac: Likewise.
1112 * targets.c: Likewise.
1113 * Makefile.in: Regenerate.
1114 * configure: Regenerate.
1115 * config.bfd: Add z80-elf target support and new arches: ez80 and
1116 z180.
1117 * elf32-z80.c: New file.
1118 * archures.c: Add new z80 architectures: eZ80 and Z180.
1119 * coffcode.h: Likewise.
1120 * cpu-z80.c: Likewise.
1121 * coff-z80.c: Add new relocations for Z80 target and local label
1122 check.
1123 * reloc.c: Add new relocs.
1124 * bfd-in2.h: Regenerate.
1125 * libbfd.h: Regenerate.
1126
0db131fb
TC
11272020-01-02 Tamar Christina <tamar.christina@arm.com>
1128
1129 PR 25210
1130 PR 24753
1131 * elfnn-aarch64.c (_bfd_aarch64_create_stub_section): Set ELF class.
1132
b14ce8bf
AM
11332020-01-01 Alan Modra <amodra@gmail.com>
1134
1135 Update year range in copyright notice of all files.
1136
0b114740 1137For older changes see ChangeLog-2019
3499769a 1138\f
0b114740 1139Copyright (C) 2020 Free Software Foundation, Inc.
3499769a
AM
1140
1141Copying and distribution of this file, with or without modification,
1142are permitted in any medium without royalty provided the copyright
1143notice and this notice are preserved.
1144
1145Local Variables:
1146mode: change-log
1147left-margin: 8
1148fill-column: 74
1149version-control: never
1150End: