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