1 2020-04-28 Alan Modra <amodra@gmail.com>
3 * vms-alpha.c (_bfd_vms_slurp_etir): Correct divide by zero check.
6 2020-04-27 Tamar Christina <tamar.christina@arm.com>
8 * coff-i386.c (COFF_WITH_PE_BIGOBJ): New.
9 * coff-x86_64.c (COFF_WITH_PE_BIGOBJ): New.
10 * config.bfd (targ_selvecs): Rename x86_64_pe_be_vec
11 to x86_64_pe_big_vec as it not a big-endian format.
12 (vec i386_pe_big_vec): New.
13 * configure.ac: Likewise.
14 * targets.c: Likewise.
15 * configure: Regenerate.
16 * pe-i386.c (TARGET_SYM_BIG, TARGET_NAME_BIG,
17 COFF_WITH_PE_BIGOBJ): New.
18 * pe-x86_64.c (TARGET_SYM_BIG, TARGET_NAME_BIG):
20 (x86_64_pe_be_vec): Moved.
22 2020-04-23 Anton Kolesov <anton.kolesov@synopsys.com>
24 * elf-bfd.h (elfcore_write_arc_v2): Add prototype.
25 * elf.c (elfcore_grok_arc_v2): New function.
26 (elfcore_grok_note): Call the new function to handle the corresponding
28 (elfcore_write_arc_v2): New function.
29 (elfcore_write_register_note): Call the new function to handle the
30 corresponding pseudo-sections.
32 2020-04-22 Max Filippov <jcmvbkbc@gmail.com>
35 * bfd-in2.h: Regenerated.
36 * elf32-xtensa.c (elf_howto_table): New entries for
37 R_XTENSA_PDIFF{8,16,32} and R_XTENSA_NDIFF{8,16,32}.
38 (elf_xtensa_reloc_type_lookup, elf_xtensa_do_reloc)
39 (relax_section): Add cases for R_XTENSA_PDIFF{8,16,32} and
40 R_XTENSA_NDIFF{8,16,32}.
41 * libbfd.h (bfd_reloc_code_real_names): Add names for
42 BFD_RELOC_XTENSA_PDIFF{8,16,32} and
43 BFD_RELOC_XTENSA_NDIFF{8,16,32}.
44 * reloc.c: Add documentation for BFD_RELOC_XTENSA_PDIFF{8,16,32}
45 and BFD_RELOC_XTENSA_NDIFF{8,16,32}.
47 2020-04-21 Tamar Christina <tamar.christina@arm.com>
50 * compress.c (bfd_get_full_section_contents): Exclude sections with no
53 2020-04-21 H.J. Lu <hongjiu.lu@intel.com>
56 * elf-bfd.h (elf_backend_data): Add
57 elf_backend_strip_zero_sized_dynamic_sections.
58 (_bfd_elf_strip_zero_sized_dynamic_sections): New prototype.
59 * elf64-alpha.c (elf_backend_strip_zero_sized_dynamic_sections):
61 * elflink.c (_bfd_elf_strip_zero_sized_dynamic_sections): New
63 * elfxx-target.h (elf_backend_strip_zero_sized_dynamic_sections):
65 (elfNN_bed): Add elf_backend_strip_zero_sized_dynamic_sections.
67 2020-04-21 H.J. Lu <hongjiu.lu@intel.com>
69 * elf64-alpha.c (alpha_elf_reloc_entry): Replace reltext with
71 (elf64_alpha_check_relocs): Set sec instead of reltext. Warn
73 (elf64_alpha_calc_dynrel_sizes): Warn DT_TEXTREL with -M.
75 2020-04-21 Nick Clifton <nickc@redhat.com>
77 * po/sr.po: Updated Serbian translation.
79 2020-04-21 Alan Modra <amodra@gmail.com>
81 * elf32-sh.c (sh_elf_relocate_section): Remove STO_SH5_ISA32
84 2020-04-20 Stephen Casner <casner@acm.org>
86 * pdp11.c (N_STAB): Modify value to avoid conflict with N_EXT
87 causing globals from linker script to be treated as debug symbols.
88 (translate_symbol_table): Don't sign-extend symbol values from 16
89 to 64 bits in nm output.
91 2020-04-20 Alan Modra <amodra@gmail.com>
93 * elf64-ppc.c (ppc64_elf_size_stubs): Strip relbrlt too.
95 2020-04-18 Alan Modra <amodra@gmail.com>
97 * section.c (bfd_is_const_section): Correct test for special
99 * bfd-in2.h: Regenerate.
101 2020-04-17 Alan Modra <amodra@gmail.com>
104 * elf.c (_bfd_elf_get_symbol_version_string): Don't segfault on
107 2020-04-16 Nick Clifton <nickc@redhat.com>
110 * elfxx-mips.c (_bfd_mips_elf_adjust_dynamic_symbol): Replace an
111 abort with a more helpful error message.
113 2020-04-16 Alan Modra <amodra@gmail.com>
116 * dwarf2.c (scan_unit_for_symbols): Wrap overlong lines. Don't
119 2020-04-15 Fangrui Song <maskray@google.com>
122 * coff-rs6000.c (xcoff_ppc_relocate_section): Change RM_GENERATE_ERROR
123 to RM_DIAGNOSE plus a check of warn_unresolved_syms.
124 * coff64-rs6000.c (xcoff_ppc_relocate_section): Likewise.
125 * elf-bfd.h (_bfd_elf_large_com_section): Likewise.
126 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
127 * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise.
128 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
129 * elf32-sh.c (sh_elf_relocate_section): Likewise.
130 * elf32-spu.c (spu_elf_relocate_section): Likewise.
131 * elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
132 * elflink.c (elf_link_output_extsym): Likewise.
133 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
135 2020-04-15 Alan Modra <amodra@gmail.com>
138 * peXXigen.c (_bfd_XXi_swap_sym_in <C_SECTION>): Don't use a
139 pointer into strings that may be freed for section name, always
140 allocate a new string.
142 2020-04-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
143 Jan W. Jagersma <jwjagersma@gmail.com>
145 * coff-go32.c (COFF_GO32, IMAGE_SCN_LNK_NRELOC_OVFL)
146 (coff_SWAP_scnhdr_in, coff_SWAP_scnhdr_out): Define.
147 (_bfd_go32_swap_scnhdr_in, _bfd_go32_swap_scnhdr_out)
148 (_bfd_go32_mkobject): New functions.
149 * coff-stgo32.c (IMAGE_SCN_LNK_NRELOC_OVFL)
150 (coff_SWAP_scnhdr_in, coff_SWAP_scnhdr_out): Define.
151 (go32exe_mkobject): Call _bfd_go32_mkobject.
152 * coffcode.h (COFF_WITH_EXTENDED_RELOC_COUNTER): Define.
153 (coff_set_alignment_hook): Define function for COFF_GO32_EXE
155 (coff_write_relocs): Enable extended reloc counter code if
156 COFF_WITH_EXTENDED_RELOC_COUNTER is defined. Test for obj_go32.
157 (coff_write_object_contents): Likewise. Pad section headers
158 for COFF_GO32 and COFF_GO32EXE. Use bfd_coff_swap_scnhdr_out
159 instead of coff_swap_scnhdr_out.
160 * cofflink.c (_bfd_coff_final_link): Test also for obj_go32 to
161 enable extended reloc counter.
162 * coffswap.h: (coff_swap_scnhdr_in, coff_swap_scnhdr_out):
163 Declare with ATTRIBUTE_UNUSED.
164 * libcoff-in.h: (struct coff_tdata): New field go32.
166 * libcoff.h: Regenerate.
168 2020-04-14 Fangrui Song <maskray@google.com>
171 * elf.c (assign_section_numbers): Always set .stab sh_entsize to
174 2020-04-14 Stephen Casner <casner@acm.org>
177 * pdp11.c: Add implementation of --imagic option.
178 (adjust_o_magic): Fix objcopy --extract-symbol test.
179 * libaout.h (enum aout_magic): Add i_magic.
181 2020-04-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
182 Nick Clifton <nickc@redhat.com>
184 * elf32-sparc.c (sparc_final_write_processing): Fix whitespace.
186 <default>: Error rather than abort.
188 2020-04-03 H.J. Lu <hongjiu.lu@intel.com>
191 * elf.c (_bfd_elf_fixup_group_sections): Remove zero-sized
192 relocation section from section group.
194 2020-04-02 Jan W. Jagersma <jwjagersma@gmail.com>
196 * bfdio.c (bfd_bread, bfd_tell, bfd_seek, bfd_mmap): Always add
197 bfd->origin to file offset.
198 * bfdwin.c (bfd_get_file_window): Likewise.
199 * bfd.c: Clarify the use of the bfd->origin field.
200 * bfd-in2.h: Regenerate.
201 * coff-i386.c: Don't include go32exe.h. Allow overriding
202 coff_write_object_contents via COFF_WRITE_CONTENTS.
203 * coff-stgo32.c (go32exe_cleanup, go32exe_mkobject)
204 (go32exe_write_object_contents): New functions.
205 (go32exe_temp_stub, go32exe_temp_stub_size): New static globals.
206 (COFF_WRITE_CONTENTS, GO32EXE_DEFAULT_STUB_SIZE): Define.
207 (create_go32_stub): Remove check for 2k size limit. Read stub
208 from go32exe_temp_stub if present.
209 (go32_stubbed_coff_bfd_copy_private_bfd_data): Allocate and
210 copy variable-length stub.
211 (go32_check_format): Read stub to go32exe_temp_stub, set
212 origin, return go32exe_cleanup.
213 (adjust_filehdr_in_post, adjust_filehdr_out_pre)
214 (adjust_filehdr_out_post, adjust_scnhdr_in_post)
215 (adjust_scnhdr_out_pre, adjust_scnhdr_out_post)
216 (adjust_aux_in_post, adjust_aux_out_pre, adjust_aux_out_post):
217 Remove functions and their associated #defines.
218 * coffcode.h (coff_mkobject_hook): Remove stub copying code.
219 * libcoff-in.h: (struct coff_tdata): New field stub_size.
220 Rename field go32stub to stub.
221 * libcoff.h: Regenerate.
222 * coff-stgo32.c (go32_check_format): Rename to...
223 (go32exe_check_format): ...this.
224 (go32_stubbed_coff_bfd_copy_private_bfd_data): Rename to...
225 (go32exe_copy_private_bfd_data): ...this.
226 (stub_bytes): Rename to...
227 (go32exe_default_stub): ...this.
228 (create_go32_stub): Rename to...
229 (go32exe_create_stub): ...this.
230 * coff-stgo32.c (go32exe_copy_private_bfd_data): Avoid realloc
233 2020-04-01 H.J. Lu <hongjiu.lu@intel.com>
237 * elf32-i386.c (elf_i386_convert_load_reloc): Convert load
238 relocation to R_386_32 for relocation against non-preemptible
240 (elf_i386_check_relocs): Call _bfd_elf_x86_valid_reloc_p. Don't
241 allocate dynamic relocation for non-preemptible absolute symbol.
242 (elf_i386_relocate_section): Pass sec to
243 GENERATE_DYNAMIC_RELOCATION_P.
244 * elf64-x86-64.c (R_X86_64_converted_reloc_bit): Moved.
245 (elf_x86_64_convert_load_reloc): Covert load relocation to
246 R_X86_64_32S or R_X86_64_32 for relocation against non-preemptible
247 absolute symbol. Don't convert to R_X86_64_32S nor R_X86_64_32
248 for non-preemptible absolute symbol if they overflow.
249 (elf_x86_64_check_relocs): Call _bfd_elf_x86_valid_reloc_p. Set
250 tls_type for GOT slot to GOT_ABS for non-preemptible absolute
251 symbol. Don't allocate dynamic relocation for non-preemptible
253 (elf_x86_64_relocate_section): Don't generate relative relocation
254 for GOTPCREL relocations aganst local absolute symbol. Pass sec
255 to GENERATE_DYNAMIC_RELOCATION_P.
256 * elfxx-x86.c (elf_x86_allocate_dynrelocs): No dynamic relocation
257 against non-preemptible absolute symbol.
258 (_bfd_elf_x86_valid_reloc_p): New function.
259 (_bfd_x86_elf_size_dynamic_sections): No dynamic relocation for
261 * elfxx-x86.h (GENERATE_DYNAMIC_RELOCATION_P): Add an SEC
262 argument. Don't generate dynamic relocation against
263 non-preemptible absolute symbol.
265 (GENERATE_RELATIVE_RELOC_P): Don't generate relative relocation
266 against non-preemptible absolute symbol.
268 (R_X86_64_converted_reloc_bit): New. Moved from elf64-x86-64.c.
269 (_bfd_elf_x86_valid_reloc_p): New.
271 2020-04-01 Tamar Christina <tamar.christina@arm.com>
274 * elf32-arm.c (elf32_arm_populate_plt_entry): Set LSB of the PLT0
275 address in the GOT if in thumb only mode.
277 2020-04-01 Tamar Christina <tamar.christina@arm.com>
279 * elf32-arm.c (elf32_thumb2_plt_entry): Fix PC-rel offset.
281 2020-04-01 Hans-Peter Nilsson <hp@bitrange.com>
283 * mmo.c (mmo_scan): Create .text section only when needed, not
286 2020-03-31 Alan Modra <amodra@gmail.com>
288 * coff-alpha.c (alpha_ecoff_get_elt_at_filepos): Correct bfd_bread
291 2020-03-31 Alan Modra <amodra@gmail.com>
293 * vms-alpha.c (image_write): Check bounds for sections without
294 contents too. Error on non-zero write to section without
296 (_bfd_vms_slurp_etir): Check return of image_write* functions.
298 2020-03-31 Alan Modra <amodra@gmail.com>
300 * tekhex.c (pass_over): Check is_eof before reading buffer.
302 2020-03-30 Nick Clifton <nickc@redhat.com>
305 * libcoff-in.h (struct pe_tdata): Rename the insert_timestamp
306 field to timestamp and make it an integer.
307 * libcoff.h: Regenerate.
308 * peXXigen.c (_bfd_XXi_only_swap_filehdr_out): Test the timestamp
309 field in the pe_data structure rather than the insert_timestamp
312 2020-03-30 Alan Modra <amodra@gmail.com>
315 * elf64-ppc.c (ppc64_elf_build_stubs): Use asprintf to form
318 2020-03-26 Nick Clifton <nickc@redhat.com>
320 * cofflink.c (bfd_coff_get_internal_extra_pe_aouthdr): Delete.
321 * libbfd-in.h (bfd_coff_get_internal_extra_pe_aouthdr): Remove
323 * libbfd.h: Regenerate.
325 2020-03-26 Alan Modra <amodra@gmail.com>
327 * i386msdos.c (msdos_object_p): Catch -1 return from bfd_bread.
329 2020-03-26 Alan Modra <amodra@gmail.com>
331 * vms-alpha.c (dst_define_location): Limit size of dst_ptr_offsets
333 (_bfd_vms_slurp_object_records): Rename "err" to "ok".
335 2020-03-25 Nick Clifton <nickc@redhat.com>
337 * cofflink.c (bfd_coff_get_internal_extra_pe_aouthdr): New
339 * libbfd-in.h (bfd_coff_get_internal_extra_pe_aouthdr): Prototype.
340 * libbfd.h: Regenerate.
342 2020-03-25 Shahab Vahedi <shahab@synopsys.com>
344 * elf32-arc.c (PRINT_DEBUG_RELOC_INFO_BEFORE): Use the
345 correct field name in the output string.
347 2020-03-25 Alan Modra <amodra@gmail.com>
350 * elf.c (assign_file_positions_for_load_sections): Adjust offset
351 for SHT_NOBITS section if first in segment.
353 2020-03-24 H.J. Lu <hongjiu.lu@intel.com>
356 * elf-bfd.h (_bfd_elf_get_symbol_version_name): Renamed to ...
357 (_bfd_elf_get_symbol_version_string): This.
358 * elf.c (_bfd_elf_get_symbol_version_name): Renamed to ...
359 (_bfd_elf_get_symbol_version_string): This.
360 (bfd_elf_print_symbol): Pass TRUE to
361 _bfd_elf_get_symbol_version_string.
362 * libbfd-in.h (_bfd_nosymbols_get_symbol_version_string): Add a
363 bfd_boolean argument.
364 * syms.c (_bfd_nosymbols_get_symbol_version_string): Likewise.
365 * targets.c (_bfd_get_symbol_version_string): Likewise.
366 (bfd_get_symbol_version_string): Likewise.
367 * bfd-in2.h: Regenerated.
369 2020-03-24 Nick Clifton <nickc@redhat.com>
370 Jaydeep Chauhan <jaydeepchauhan1494@gmail.com>
373 * bfdio.c (_bfd_real_fopen): Add code to handle long filenames on
376 2020-03-24 Nick Clifton <nickc@redhat.com>
379 * elf.c (_bfd_elf_map_sections_to_segments): When looking for a
380 segment to use for PT_GNU_RELRO, ignore empty sections in a
381 segment's current list.
383 2020-03-24 H.J. Lu <hongjiu.lu@intel.com>
386 * elf-bfd.h (elf_obj_tdata): Change num_group to unsigned int.
388 2020-03-24 H.J. Lu <hongjiu.lu@intel.com>
391 * elf-bfd.h (_bfd_elf_get_symbol_version_name): New.
392 * elf.c (_bfd_elf_get_symbol_version_name): New function. Based
393 on the previous _bfd_elf_get_symbol_version_string.
394 (_bfd_elf_get_symbol_version_string): Use it.
396 2020-03-24 Alan Modra <amodra@gmail.com>
398 * archive.c (_bfd_generic_read_ar_hdr_mag): Sanity check extended
399 name size. Use bfd_malloc rather than bfd_zmalloc, clearing just
402 2020-03-23 Sebastian Huber <sebastian.huber@embedded-brains.de>
404 * elflink.c (_bfd_elf_tls_setup): Mention .tdata in comment.
406 2020-03-23 Alan Modra <amodra@gmail.com>
408 * ecoff.c (_bfd_ecoff_slurp_armap): Sanity check parsed_size and
409 symbol count. Allocate an extra byte to ensure name strings
410 are terminated. Sanity check name offsets. Release memory on
413 2020-03-23 Alan Modra <amodra@gmail.com>
415 * i386msdos.c (msdos_object_p): Don't access e_lfanew when that
416 field hasn't been read. Remove unnecessary casts.
418 2020-03-22 Alan Modra <amodra@gmail.com>
420 * coff64-rs6000.c (xcoff64_slurp_armap): Ensure size is large
421 enough to read number of symbols.
423 2020-03-20 H.J. Lu <hongjiu.lu@intel.com>
425 * configure.ac (HAVE_EXECUTABLE_SUFFIX): Removed.
426 (EXECUTABLE_SUFFIX): Likewise.
427 * config.in: Regenerated.
428 * configure: Likewise.
429 * plugin.c (bfd_plugin_close_and_cleanup): Defined as
430 _bfd_generic_close_and_cleanup.
431 (plugin_list_entry): Remove resolution_file, resolution_option,
432 real_bfd, real_nsyms, real_syms, lto_nsyms, lto_syms, gcc,
433 lto_wrapper, gcc_env and initialized,
434 (need_lto_wrapper_p): Removed.
435 (get_lto_wrapper): Likewise.
436 (setup_lto_wrapper_env): Likewise.
437 (register_all_symbols_read): Likewise.
438 (egister_cleanup): Likewise.
439 (get_symbols): Likewise.
440 (add_input_file): Likewise.
441 (bfd_plugin_set_program_name): Remove need_lto_wrapper.
442 (add_symbols): Updated.
443 (try_claim): Likewise.
444 (try_load_plugin): Likewise.
445 (bfd_plugin_canonicalize_symtab): Likewise.
446 * plugin.h (bfd_plugin_set_program_name): Remove int argument.
447 (plugin_data_struct): Remove real_bfd, real_nsyms and real_syms.
449 2020-03-19 H.J. Lu <hongjiu.lu@intel.com>
452 * plugin.c (plugin_list_entry): Add has_symbol_type.
453 (add_symbols_v2): New function.
454 (bfd_plugin_open_input): Don't invoke LTO wrapper if LTO plugin
455 provides symbol type.
456 (try_load_plugin): Add LDPT_ADD_SYMBOLS_V2.
457 (bfd_plugin_canonicalize_symtab): Use LTO plugin symbol type if
460 2020-03-20 Alan Modra <amodra@gmail.com>
462 * coff-rs6000.c (_bfd_xcoff_slurp_armap): Ensure size is large
463 enough to read number of symbols.
465 2020-03-20 Alan Modra <amodra@gmail.com>
467 * elf.c (_bfd_elf_setup_sections): Don't test known non-NULL
468 backend functions for NULL before calling.
469 (copy_special_section_fields, _bfd_elf_copy_private_bfd_data),
470 (bfd_section_from_shdr, assign_section_numbers): Likewise.
471 * elfcode.h (elf_write_relocs, elf_slurp_reloc_table): Likewise.
472 * elfnn-ia64.c (ignore_errors): New function.
473 (elf_backend_link_order_error_handler): Redefine as ignore_errors.
475 2020-03-19 Nick Clifton <nickc@redhat.com>
478 * dwarf2.c (struct varinfo): Add unit_offset field to record the
479 location of the varinfo in the unit's debug info data. Change the
480 type of the stack field to a boolean.
481 (lookup_var_by_offset): New function. Returns the varinfo
482 structure for the variable described at the given offset in the
484 (scan_unit_for_symbols): Add support for variables which have the
485 DW_AT_specification attribute.
487 2020-03-19 Nick Clifton <nickc@redhat.com>
490 * elf.c (bfd_elf_set_group_contents): Replace assertion with an
493 2020-03-19 Sebastian Huber <sebastian.huber@embedded-brains.de>
495 * elfxx-riscv.c (riscv_parse_subset): Don't use C99.
497 2020-03-18 Nick Clifton <nickc@redhat.com>
500 * elf.c (_bfd_elf_write_secondary_reloc_section): Fix illegal
501 memory access when processing a corrupt secondary reloc section.
503 2020-03-18 Christophe Lyon <christophe.lyon@linaro.org>
505 * elf32-arm.c (arm_build_one_stub): Emit a fatal error message
506 instead of calling abort.
507 * elf32-csky.c (csky_build_one_stub): Likewise.
508 * elf32-hppa.c (hppa_build_one_stub): Likewise.
509 * elf32-m68hc11.c (m68hc11_elf_build_one_stub): Likewise.
510 * elf32-m68hc12.c (m68hc12_elf_build_one_stub): Likewise.
511 * elf32-metag.c (metag_build_one_stub): Likewise.
512 * elf32-nios2.c (nios2_build_one_stub): Likewise.
513 * elf64-ppc.c (ppc_build_one_stub): Likewise.
514 (ppc_size_one_stub): Likewise.
515 * elfnn-aarch64.c (aarch64_build_one_stub): Likewise.
517 2020-03-17 Nick Clifton <nickc@redhat.com>
520 * elf.c (_bfd_elf_copy_special_section_fields): Replace assertions
523 2020-03-17 Nick Clifton <nickc@redhat.com>
526 * elf.c (_bfd_elf_slurp_secondary_reloc_section): Remove redundant
527 free. Add free on another failure path.
529 2020-03-16 Alan Modra <amodra@gmail.com>
532 * elf.c (elf_sort_segments): Don't call bfd_octets_per_byte unless
533 we have a non-zero section count. Do lma comparison in octets.
535 2020-03-16 Alan Modra <amodra@gmail.com>
537 * vms-alpha.c (dst_restore_location): Validate index into
538 dst_ptr_offsets array before accessing. Return status.
539 (dst_retrieve_location): Similarly, making "loc" parameter a
540 pointer to return value.
541 (_bfd_vms_slurp_etir): Update calls to above functions.
543 2020-03-14 Kamil Rytarowski <n54@gmx.com>
545 * configure.ac: Include netbsd-core.lo for all NetBSD arm and mips
547 * configure: Regenerated.
549 2020-03-14 Alan Modra <amodra@gmail.com>
551 * section.c (BFD_FAKE_SECTIONS): Formatting.
552 * bfd-in2.h: Regenerate.
554 2020-03-13 Kamil Rytarowski <n54@gmx.com>
556 * elf.c (elfcore_grok_netbsd_note): Add support for
557 NT_NETBSDCORE_LWPSTATUS notes.
559 2020-03-13 Christophe Lyon <christophe.lyon@linaro.org>
561 * bfd-in2.h: Regenerate.
562 * section.c (asection): Add already_assigned field.
563 (BFD_FAKE_SECTION): Add default initializer for it.
564 * ecoff.c (bfd_debug_section): Initialize already_assigned field.
565 * elf32-arm.c (arm_build_one_stub): Add support for
566 non_contiguous_regions.
567 * elf32-csky.c (csky_build_one_stub): Likewise.
568 * elf32-hppa.c (hppa_build_one_stub): Likewise.
569 * elf32-m68hc11.c (m68hc11_elf_build_one_stub): Likewise.
570 * elf32-m68hc12.c (m68hc12_elf_build_one_stub): Likewise.
571 * elf32-metag.c (metag_build_one_stub): Likewise.
572 * elf32-nios2.c (nios2_build_one_stub): Likewise.
573 * elf64-ppc.c (ppc_build_one_stub): Likewise.
574 (ppc_size_one_stub): Likewise.
575 * elfnn-aarch64.c (aarch64_build_one_stub): Likewise.
576 * elflink.c (elf_link_input_bfd): Likewise.
578 2020-03-13 H.J. Lu <hongjiu.lu@intel.com>
581 * elf-linker-x86.h (elf_linker_x86_params): Add
582 static_before_all_inputs and has_dynamic_linker.
583 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Report
584 dynamic input objects if -static is passed at command-line
585 before all input files without --dynamic-linker unless
586 --no-dynamic-linker is used.
588 2020-03-13 Kamil Rytarowski <n54@gmx.com>
590 * elf.c (elfcore_grok_netbsd_note): Add support for aarch64.
592 2020-03-13 Christian Eggers <ceggers@gmx.de>
594 * bfd.c (bfd_record_phdr): New local "opb". Fix assignment of
596 * elfcode.h (bfd_from_remote_memory): Add units to several
597 parameters. New local "opb". Fix usage of p_align. Fix
598 calculation of "localbase" from "ehdr_vma" and "p_vaddr". Fix
599 call of target_read_memory.
600 * elflink.c (elf_fixup_link_order): Fix scope of "s" local. Fix
601 calculation of "offset" and "output_offset".
602 (bfd_elf_final_link): New local "opb". Fix calculation of "size"
603 from "offset" and fix calculation of "end" from "vma+size". Fix
604 comparison between "sh_addr" and "vma"/"output_offset".
605 (bfd_elf_discard_info): Fix calculation of "eh_alignment".
606 * elf-bfd.h (struct elf_link_hash_table): Add unit to tls_size
608 * elf.c (_bfd_elf_map_sections_to_segments): Add unit (bytes/
609 octets) to "wrap_to2 and "phdr_size" locals. Fix calculation of
610 "wrap_to" value. Add unit (bytes) to phdr_lma variable. Fix
611 assignment of p_paddr from phdr_lma. Fix comparison between
612 "lma+size" and "next->lma".
613 (elf_sort_segments): Fix assignment from p_paddr to lma.
614 (assign_file_positions_for_load_sections): Add unit (bytes) to
615 local "align". Fix calculation of local "off_adjust". Fix
616 calculation of local "filehdr_vaddr".
617 (assign_file_positions_for_non_load_sections): New local "opb".
618 Fix calculation of "end" from "p_size". Fix comparison between
619 "vma+SECTION_SIZE" and "start". Fix calculation of "p_memsz"
620 from "end" and "p_vaddr".
621 (rewrite_elf_program_header): Fix comparison between p_vaddr and
622 vma. Fix assignment to p_paddr from lma. Fix comparison between
623 p_paddr and lma. Fix assignment to p_paddr from lma.
624 * merge.c (sec_merge_emit): New local "opb". Convert
625 "alignment_power" to octets.
626 (_bfd_add_merge_section): New locals "alignment_power" and
627 "opb". Fix comparison between "alignment_power" and
629 (_bfd_merge_sections): New local "opb". Divide size by opb
630 before checking align mask.
632 2020-03-13 Christian Eggers <ceggers@gmx.de>
634 * elf.c (_bfd_elf_make_section_from_shdr): Introduce new temp
635 opb. Divide Elf_Internal_Shdr::sh_addr by opb when setting
637 (_bfd_elf_make_section_from_phdr): Similarly.
638 (elf_fake_sections): Fix calculation of
639 Elf_Internal_shdr::sh_addr from section VMA.
640 (_bfd_elf_map_sections_to_segments): Fix mixup between octets
642 (assign_file_positions_for_load_sections): Fix calculations of
643 Elf_Internal_shdr::p_vaddr and p_paddr from section LMA/VMA. Fix
644 comparison between program header address and section LMA.
645 (assign_file_positions_for_non_load_sections): Likewise.
646 (rewrite_elf_program_header): Likewise. Introduce new temp opb.
647 (IS_CONTAINED_BY_VMA): Add parameter opb.
648 (IS_CONTAINED_BY_LMA,IS_SECTION_IN_INPUT_SEGMENT,
649 INCLUDE_SECTION_IN_SEGMENT): Likewise.
650 (copy_elf_program_header): Update call to ELF_SECTION_IN_SEGMENT.
651 Fix calculations of p_addr_valid and p_vaddr_offset.
652 * elflink.c (elf_link_add_object_symbols): Multiply section VMA
653 with octets per byte when comparing against p_vaddr.
655 2020-03-11 Alan Modra <amodra@gmail.com>
657 * som.c (setup_sections): Sanity check subspace.name.
659 2020-03-11 Alan Modra <amodra@gmail.com>
661 * elf64-ppc.c (ppc64_elf_inline_plt): Do increment rel in for loop.
663 2020-03-10 Alan Modra <amodra@gmail.com>
666 * ihex.c (ihex_write_object_contents): Don't assume ordering of
669 2020-03-09 Alan Modra <amodra@gmail.com>
671 * wasm-module.c (wasm_scan): Sanity check file name length
672 before allocating memory. Move common section setup code. Do
673 without bfd_tell to calculate section size.
675 2020-03-06 Nick Clifton <nickc@redhat.com>
677 * elf.c (_bfd_elf_set_section_contents): Replace call to abort
678 with error messages and failure return values.
680 2020-03-05 Max Filippov <jcmvbkbc@gmail.com>
682 * elf32-xtensa.c (shrink_dynamic_reloc_sections): Shrink dynamic
683 relocation sections for any removed reference to a dynamic symbol.
685 2020-03-05 Nick Clifton <nickc@redhat.com>
687 * elf-bfd.h (struct elf_backend_data): Add new fields:
688 init_secondary_reloc_section, slurp_secondary_reloc_section,
689 write_secondary_reloc_section.
690 (_bfd_elf_init_secondary_reloc_section): Prototype.
691 (_bfd_elf_slurp_secondary_reloc_section): Prototype.
692 (_bfd_elf_write_secondary_reloc_section): Prototype.
693 * elf.c ( bfd_section_from_shdr): Invoke the new
694 init_secondary_reloc_section backend function, if defined, when a
695 second reloc section is encountered.
696 (swap_out_syms): Invoke the new symbol_section_index function, if
697 defined, when computing the section index of an OS/PROC specific
699 (_bfd_elf_init_secondary_reloc_section): New function.
700 (_bfd_elf_slurp_secondary_reloc_section): New function.
701 (_bfd_elf_write_secondary_reloc_section): New function.
702 (_bfd_elf_copy_special_section_fields): New function.
703 * elfcode.h (elf_write_relocs): Invoke the new
704 write_secondary_relocs function, if defined, in order to emit
706 (elf_slurp_reloc_table): Invoke the new slurp_secondary_relocs
707 function, if defined, in order to read in secondary relocs.
708 * elfxx-target.h (elf_backend_copy_special_section_fields):
709 Provide a non-NULL default definition.
710 (elf_backend_init_secondary_reloc_section): Likewise.
711 (elf_backend_slurp_secondary_reloc_section): Likewise.
712 (elf_backend_write_secondary_reloc_section): Likewise.
713 (struct elf_backend_data elfNN_bed): Add initialisers for the new
715 * configure.ac (score_elf32_[bl]e_vec): Add elf64.lo
716 * configure: Regenerate.
718 2020-03-05 Alan Modra <amodra@gmail.com>
720 * archive64.c (_bfd_archive_64_bit_slurp_armap): Check parsed_size
721 against file size before allocating memory. Use bfd_alloc rather
722 than bfd_zalloc for carsym/strings memory.
724 2020-03-04 Alan Modra <amodra@gmail.com>
726 * elf.c (elf_fake_sections): Ensure sh_addralign is such that
727 sh_addr mod sh_addalign is zero.
729 2020-03-04 Alan Modra <amodra@gmail.com>
731 * format.c (bfd_check_format_matches): Call cleanup on error exit.
733 2020-03-03 Alan Modra <amodra@gmail.com>
735 * format.c (struct bfd_preserve): Add cleanup field.
736 (bfd_preserve_save): Add cleanup param and save.
737 (bfd_preserve_restore): Return cleanup.
738 (bfd_preserve_finish): Call the cleanup for the discarded match.
739 (bfd_check_format_matches): Pass cleanup to bfd_preserve_save,
740 and clear when preserving a match. Restore cleanup too when
741 restoring that match.
743 2020-03-02 Alan Modra <amodra@gmail.com>
745 * cisco-core.c (cisco_core_file_p): Return bfd_cleanup.
746 * hpux-core.c (hpux_core_core_file_p): Update prototype.
747 * sco5-core.c (sco5_core_file_p): Return bfd_cleanup.
748 (core_sco5_vec): Correct initialisers.
750 2020-03-02 Alan Modra <amodra@gmail.com>
752 * aix386-core.c (aix386_core_file_p): Return bfd_cleanup.
753 * aix5ppc-core.c (xcoff64_core_p): Likewise.
754 * cisco-core.c (cisco_core_file_validate): Likewise.
755 * hppabsd-core.c (hppabsd_core_core_file_p): Likewise.
756 * hpux-core.c (hpux_core_core_file_p): Likewise.
757 * irix-core.c (irix_core_core_file_p): Likewise.
758 * lynx-core.c (lynx_core_file_p): Likewise.
759 * netbsd-core.c (netbsd_core_file_p): Likewise.
760 * osf-core.c (osf_core_core_file_p): Likewise.
761 * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
762 * sco5-core.c (sco5_core_file_p): Likewise.
764 2020-03-02 H.J. Lu <hongjiu.lu@intel.com>
766 * trad-core.c (trad_unix_core_file_p): Return bfd_cleanup.
768 2020-03-02 Alan Modra <amodra@gmail.com>
770 * targets.c (bfd_cleanup): New typedef.
771 (struct bfd <_bfd_check_format>): Return a bfd_cleanup.
772 * libbfd-in.h (_bfd_no_cleanup): Define.
773 * format.c (bfd_reinit): Add cleanup parameter, call it.
774 (bfd_check_format_matches): Set cleanup from _bfd_check_format
775 call and pass to bfd_reinit. Delete temp, use abfd->xvec instead.
776 * aout-target.h (callback, object_p): Return bfd_cleanup.
777 * aout-tic30.c (tic30_aout_callback, tic30_aout_object_p): Likewise.
778 * archive.c (bfd_generic_archive_p): Likewise.
779 * binary.c (binary_object_p): Likewise.
780 * coff-alpha.c (alpha_ecoff_object_p): Likewise.
781 * coff-ia64.c (ia64coff_object_p): Likewise.
782 * coff-rs6000.c (_bfd_xcoff_archive_p, rs6000coff_core_p): Likewise.
783 * coff-sh.c (coff_small_object_p): Likewise.
784 * coff-stgo32.c (go32_check_format): Likewise.
785 * coff64-rs6000.c (xcoff64_archive_p, rs6000coff_core_p),
786 (xcoff64_core_p): Likewise.
787 * coffgen.c (coff_real_object_p, coff_object_p): Likewise.
788 * elf-bfd.h (bfd_elf32_object_p, bfd_elf32_core_file_p),
789 (bfd_elf64_object_p, bfd_elf64_core_file_p): Likewise.
790 * elfcode.h (elf_object_p): Likewise.
791 * elfcore.h (elf_core_file_p): Likewise.
792 * i386msdos.c (msdos_object_p): Likewise.
793 * ihex.c (ihex_object_p): Likewise.
794 * libaout.h (some_aout_object_p): Likewise.
795 * libbfd-in.h (bfd_generic_archive_p, _bfd_dummy_target),
796 (_bfd_vms_lib_alpha_archive_p, _bfd_vms_lib_ia64_archive_p): Likewise.
797 * libbfd.c (_bfd_dummy_target): Likewise.
798 * libcoff-in.h (coff_object_p): Likewise.
799 * mach-o-aarch64.c (bfd_mach_o_arm64_object_p),
800 (bfd_mach_o_arm64_core_p): Likewise.
801 * mach-o-arm.c (bfd_mach_o_arm_object_p),
802 (bfd_mach_o_arm_core_p): Likewise.
803 * mach-o-i386.c (bfd_mach_o_i386_object_p),
804 (bfd_mach_o_i386_core_p): Likewise.
805 * mach-o-x86-64.c (bfd_mach_o_x86_64_object_p),
806 (bfd_mach_o_x86_64_core_p): Likewise.
807 * mach-o.c (bfd_mach_o_header_p, bfd_mach_o_gen_object_p),
808 (bfd_mach_o_gen_core_p, bfd_mach_o_fat_archive_p): Likewise.
809 * mach-o.h (bfd_mach_o_object_p, bfd_mach_o_core_p),
810 (bfd_mach_o_fat_archive_p, bfd_mach_o_header_p): Likewise.
811 * mmo.c (mmo_object_p): Likewise.
812 * pef.c (bfd_pef_object_p, bfd_pef_xlib_object_p): Likewise.
813 * peicode.h (coff_real_object_p, pe_ILF_object_p),
814 (pe_bfd_object_p): Likewise.
815 * plugin.c (ld_plugin_object_p, bfd_plugin_object_p): Likewise.
816 * ppcboot.c (ppcboot_object_p): Likewise.
817 * rs6000-core.c (rs6000coff_core_p): Likewise.
818 * som.c (som_object_setup, som_object_p): Likewise.
819 * srec.c (srec_object_p, symbolsrec_object_p): Likewise.
820 * tekhex.c (tekhex_object_p): Likewise.
821 * vms-alpha.c (alpha_vms_object_p): Likewise.
822 * vms-lib.c (_bfd_vms_lib_archive_p, _bfd_vms_lib_alpha_archive_p),
823 (_bfd_vms_lib_ia64_archive_p, _bfd_vms_lib_txt_archive_p): Likewise.
824 * wasm-module.c (wasm_object_p): Likewise.
825 * xsym.c (bfd_sym_object_p): Likewise.
826 * xsym.h (bfd_sym_object_p): Likewise.
827 * aoutx.h (some_aout_object_p): Likewise, and callback parameter
829 * pdp11.c (some_aout_object_p): Likewise.
830 * plugin.c (register_ld_plugin_object_p): Update object_p
832 * plugin.h (register_ld_plugin_object_p): Likewise.
833 * bfd-in2.h: Regenerate.
834 * libbfd.h: Regenerate.
835 * libcoff.h: Regenerate.
837 2020-03-02 Alan Modra <amodra@gmail.com>
839 * coff-alpha.c (alpha_ecoff_le_vec): Add SEC_SMALL_DATA to
840 applicable section flags.
841 * coff-mips.c (mips_ecoff_le_vec, mips_ecoff_be_vec): Likewise.
842 (mips_ecoff_bele_vec): Likewise.
843 * coffcode.h (sec_to_styp_flags): Set SEC_SMALL_DATA for .sdata
845 * ecoff.c (_bfd_ecoff_new_section_hook): Likewise.
846 (_bfd_ecoff_styp_to_sec_flags): Likewise.
848 2020-03-02 Alan Modra <amodra@gmail.com>
850 * elf32-m32r.c (m32r_elf_section_flags): New function.
851 (elf_backend_section_flags): Define.
852 * elf32-nds32.c (nds32_elf_section_flags): New function.
853 (elf_backend_section_flags): Define.
854 * elf32-ppc.c (ppc_elf_section_from_shdr): Set SEC_SMALL_DATA for
855 .sbss and .sdata sections.
856 * elf32-v850.c (v850_elf_section_from_shdr): Set SEC_SMALL_DATA
857 for SHF_V850_GPREL sections.
858 * elf64-alpha.c (elf64_alpha_section_from_shdr): Delete outdated
860 * elf64-hppa.c (elf64_hppa_section_from_shdr): Set SEC_SMALL_DATA
861 for SHF_PARISC_SHORT sections.
862 * elf64-ppc.c (ppc64_elf_section_flags): New function.
863 (elf_backend_section_flags): Define.
864 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Set SEC_SMALL_DATA
865 for SHF_MIPS_GPREL sections. Delete FIXME.
867 2020-03-02 Alan Modra <amodra@gmail.com>
869 * elf-bfd.h (elf_backend_section_flags): Remove flagword* param.
870 * elf.c (_bfd_elf_make_section_from_shdr): Set section flags before
871 calling elf_backend_section_flags with adjusted params. Use
872 newsect->flags past that point.
873 (_bfd_elf_new_section_hook): Always set sh_type and sh_flags for
875 (_bfd_elf_init_private_section_data): Allow normal sh_type sections
876 to have their type overridden, and all sh_flags but processor and
878 * elf32-arm.c (elf32_arm_section_flags): Adjust for changed params.
879 * elf32-mep.c (mep_elf_section_flags): Likewise.
880 * elf32-nios2.c (nios2_elf32_section_flags): Likewise.
881 * elf64-alpha.c (elf64_alpha_section_flags): Likewise.
882 * elf64-ia64-vms.c (elf64_ia64_section_flags): Likewise.
883 * elfnn-ia64.c (elfNN_ia64_section_flags): Likewise.
884 * elfnn-aarch64.c (elfNN_aarch64_size_stubs): Exclude the linker
885 stub BFD and non-aarch64 input files when scanning for stubs.
887 2020-03-02 Alan Modra <amodra@gmail.com>
889 * coff-alpha.c (alpha_ecoff_get_elt_at_filepos): Provide an upper
890 limit to decompressed element size.
892 2020-03-02 Alan Modra <amodra@gmail.com>
894 * vms-lib.c (vms_traverse_index): Add recur_count param and
895 update calls. Fail on excessive recursion.
897 2020-03-02 Alan Modra <amodra@gmail.com>
899 * vms-alpha.c (vms_get_remaining_object_record): Use
900 bfd_realloc_or_free rather than bfd_realloc.
901 (add_symbol_entry, vector_grow1, alpha_vms_slurp_relocs): Likewise.
902 (dst_define_location, parse_module): Likewise, and check realloc
903 return status before using memory. Return status from function
904 adjusting all callers.
906 2020-02-28 Alan Modra <amodra@gmail.com>
908 * vms-lib.c (_bfd_vms_lib_archive_p): Free memory on error paths.
910 2020-02-28 Alan Modra <amodra@gmail.com>
912 * vms-alpha.c (alpha_vms_object_p): Use _bfd_malloc_and_read.
913 Remove duplicate undersize check.
915 2020-02-27 Alan Modra <amodra@gmail.com>
918 * mmo.c (mmo_scan): Set SEC_DATA for .data.
920 2020-02-27 Alan Modra <amodra@gmail.com>
923 * syms.c (stt): Trim off all but 'e', 'i' and 'p' entries.
924 (coff_section_type): Adjust comment.
925 (decode_section_type): Likewise. Call coff_section_type before
927 (bfd_decode_symclass): Use 'c' for common sections other than
930 2020-02-27 Alan Modra <amodra@gmail.com>
932 * coff-rs6000.c (_bfd_xcoff_read_ar_hdr): Put all data in one
935 2020-02-27 Alan Modra <amodra@gmail.com>
937 * bfd.c (bfd_stat_arch_elt): Use vector of containing archive,
938 if file is an archive element.
939 * bfd-in2.h: Regenerate.
941 2020-02-26 Alan Modra <amodra@gmail.com>
943 * archive.c (do_slurp_bsd_armap): Increase minimum parsed_size, and
944 bfd_set_error on failing test. Don't bother changing bfd_error on
945 file read error. Check symdef_count is multiple of BSD_SYMDEF_SIZE.
946 Check sym name is within string buffer. Use size_t for some vars.
947 (do_slurp_coff_armap): Use size_t for some variables, fix size of
948 int_buf. Don't change bfd_error on file read error. Use
949 _bfd_mul_overflow when calculating carsym buffer size. Reorder
950 calculations to catch overflows before they occur. malloc and
951 free raw armap rather than using bfd_alloc. Read raw armap before
952 allocating carsym+strings buffer.
953 (_bfd_slurp_extended_name_table): Localize variables. Check
954 name size against file size.
956 2020-02-26 Alan Modra <amodra@gmail.com>
958 * vms-lib.c (vms_lib_read_index): Release correct buffer.
960 2020-02-26 Alan Modra <amodra@gmail.com>
962 * elf32-rx.c (rx_elf_relocate_section): Use bfd_malloc rather than
963 malloc. Check for NULL return from bfd_malloc.
964 (rx_table_find, rx_table_map): Likewise.
965 (rx_set_section_contents): Check bfd_alloc return.
966 (rx_dump_symtab): Don't alloc internal_syms or external_syms.
968 2020-02-26 Alan Modra <amodra@gmail.com>
970 * aoutx.h: Indent labels correctly. Format error strings.
971 * archive.c: Likewise.
972 * archive64.c: Likewise.
973 * coff-arm.c: Likewise.
974 * coff-rs6000.c: Likewise.
975 * coff-stgo32.c: Likewise.
976 * cpu-arm.c: Likewise.
977 * dwarf2.c: Likewise.
978 * elf-ifunc.c: Likewise.
979 * elf-properties.c: Likewise.
980 * elf-s390-common.c: Likewise.
981 * elf-strtab.c: Likewise.
983 * elf32-arm.c: Likewise.
984 * elf32-bfin.c: Likewise.
985 * elf32-cr16.c: Likewise.
986 * elf32-csky.c: Likewise.
987 * elf32-i386.c: Likewise.
988 * elf32-m68k.c: Likewise.
989 * elf32-msp430.c: Likewise.
990 * elf32-nds32.c: Likewise.
991 * elf32-nios2.c: Likewise.
992 * elf32-pru.c: Likewise.
993 * elf32-xtensa.c: Likewise.
994 * elf64-ia64-vms.c: Likewise.
995 * elf64-x86-64.c: Likewise.
996 * elfcode.h: Likewise.
997 * elfcore.h: Likewise.
998 * elflink.c: Likewise.
999 * elfnn-aarch64.c: Likewise.
1000 * elfnn-ia64.c: Likewise.
1001 * elfnn-riscv.c: Likewise.
1002 * elfxx-mips.c: Likewise.
1003 * elfxx-sparc.c: Likewise.
1004 * elfxx-x86.c: Likewise.
1005 * i386lynx.c: Likewise.
1006 * merge.c: Likewise.
1007 * pdp11.c: Likewise.
1008 * plugin.c: Likewise.
1009 * reloc.c: Likewise.
1011 2020-02-26 Alan Modra <amodra@gmail.com>
1014 * elf-bfd.h (struct elf_link_hash_table): Rename "loaded" to
1016 (bfd_elf_add_dt_needed_tag): Declare.
1017 * elf-strtab.c (_bfd_elf_strtab_restore): Handle NULL buf.
1018 * elflink.c (bfd_elf_add_dt_needed_tag): Make global and rename
1019 from elf_add_dt_needed_tag. Remove soname and doit param.
1020 (elf_link_add_object_symbols): Don't use elf_add_dt_needed_tag
1021 to see whether as-needed lib is already loaded, use dyn_loaded
1022 list instead. When saving and restoring around as-needed lib
1023 handle possibility that dynstr has not been initialised. Don't
1024 add DT_NEEDED tags here. Limit dyn_loaded list to dynamic libs.
1025 Mark libs loaded via DT_NEEDED entries of other libs with
1026 DYN_NO_NEEDED if they should not be mentioned in DT_NEEDED of
1028 (elf_link_check_versioned_symbol): Remove now unneccesary
1029 DYNAMIC check when traversing dyn_loaded list.
1031 2020-02-26 Alan Modra <amodra@gmail.com>
1033 * bfdio.c (bfd_get_file_size): Ignore bogus archive element sizes.
1035 2020-02-25 H.J. Lu <hongjiu.lu@intel.com>
1038 * plugin.c (need_lto_wrapper_p): New.
1039 (bfd_plugin_set_program_name): Add an int argument to set
1041 (get_lto_wrapper): Return FALSE if need_lto_wrapper_p isn't
1043 * plugin.h (bfd_plugin_set_program_name): Add an int argument.
1045 2020-02-24 Alan Modra <amodra@gmail.com>
1047 * vms-lib.c (_bfd_vms_lib_archive_p): Correct overflow checks.
1049 2020-02-24 Alan Modra <amodra@gmail.com>
1051 * vms-lib.c (struct carsym_mem): Add limit.
1052 (vms_add_index): Heed limit.
1053 (vms_traverse_index): Catch buffer overflows. Remove outdated fixme.
1054 (vms_lib_read_index): Set up limit. Catch 32-bit overflow.
1055 Always return actual number read.
1056 (_bfd_vms_lib_archive_p): Catch buffer overflows. Replace
1057 assertion with error exit.
1059 2020-02-22 Alan Modra <amodra@gmail.com>
1062 * elf.c (assign_file_positions_for_load_sections): Continue linking
1063 on "PHDR segment not covered by LOAD segment" errors.
1065 2020-02-21 Alan Modra <amodra@gmail.com>
1067 * mach-o.c (bfd_mach_o_canonicalize_relocs): Fix ineffective
1069 (bfd_mach_o_canonicalize_reloc): Likewise.
1070 (bfd_mach_o_canonicalize_dynamic_reloc): Likewise. Sanity check
1071 counts and offsets against file size.
1072 (bfd_mach_o_build_dysymtab): Fix ineffective overflow check.
1073 (bfd_mach_o_mangle_sections): Remove unnecessary overflow check.
1074 (bfd_mach_o_read_symtab_symbols): Sanity check count and offset
1075 against file size. Delete symbol table error message.
1076 (bfd_mach_o_read_dysymtab): Sanity check counts and offsets
1078 (bfd_mach_o_read_symtab): Likewise.
1079 (bfd_mach_o_read_command): Pass file size.
1080 (bfd_mach_o_scan): Sanity check command count against file size.
1082 2020-02-21 Alan Modra <amodra@gmail.com>
1085 * aoutx.h (adjust_o_magic, adjust_z_magic, adjust_n_magic): Use
1086 "text", "data" and "bss" section pointer vars. Don't update
1087 section size, just exec header sizes.
1088 (adjust_sizes_and_vmas): Don't update text section size. Set
1089 initial exec header a_text. Print exec headers sizes.
1090 * pdp11.c (adjust_o_magic, adjust_z_magic, adjust_n_magic),
1091 (adjust_sizes_and_vmas): Similarly. Formatting.
1092 (final_link): Correct final file extension.
1094 2020-02-20 Nick Clifton <nickc@redhat.com>
1096 * elf-bfd.h (struct elf_backend_data): Add symbol_section_index
1098 * elfxx-target.h (elf_backend_symbol_section_index): Provide
1100 (elfNN_bed): Initialise the symbol_section_index field.
1101 * elf.c (swap_out_syms): Call symbol_section_index, if defined, on
1102 OS and PROC specific section indicies. Warn if converting other
1103 reserved incidies to SHN_ABS.
1105 2020-02-19 Sergey Belyashov <sergey.belyashov@gmail.com>
1108 * cpu-z80.c: Add machine type compatibility checking.
1110 2020-02-19 H.J. Lu <hongjiu.lu@intel.com>
1113 * plugin.c (plugin_list_entry): Remove handle.
1114 (try_load_plugin): Call dlclose before return.
1116 2020-02-19 Alan Modra <amodra@gmail.com>
1118 * libbfd-in.h (_bfd_constant_p): Define.
1119 (_bfd_alloc_and_read, _bfd_malloc_and_read): Check read size against
1120 file size before allocating memory.
1121 * coffgen.c (_bfd_coff_get_external_symbols): Remove file size check.
1122 * elf.c (bfd_elf_get_str_section): Likewise.
1123 (_bfd_elf_slurp_version_tables): Likewise.
1124 * libbfd.h: Regenerate.
1126 2020-02-19 Alan Modra <amodra@gmail.com>
1128 * libbfd-in.h (_bfd_alloc_and_read, _bfd_malloc_and_read): New.
1129 * aoutx.h (aout_get_external_symbols): Replace calls to
1130 bfd_[m]alloc and bfd_bread with call to _bfd_[m]alloc_and_read.
1131 (slurp_reloc_table): Likewise.
1132 * archive.c (do_slurp_bsd_armap): Likewise.
1133 (do_slurp_coff_armap): Likewise.
1134 * archive64.c (_bfd_archive_64_bit_slurp_armap): Likewise.
1135 * coff-rs6000.c (_bfd_xcoff_slurp_armap): Likewise.
1136 * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
1137 * coffcode.h (coff_set_arch_mach_hook, buy_and_read): Likewise.
1138 * coffgen.c (coff_real_object_p, coff_object_p, build_debug_section),
1139 (_bfd_coff_get_external_symbols): Likewise.
1140 * ecoff.c (ecoff_slurp_symbolic_header),
1141 (_bfd_ecoff_slurp_symbolic_info, ecoff_slurp_reloc_table),
1142 (_bfd_ecoff_slurp_armap, ecoff_link_add_object_symbols, READ),
1143 (ecoff_indirect_link_order): Likewise.
1144 * elf.c (bfd_elf_get_str_section, setup_group, elf_read_notes),
1145 (_bfd_elf_slurp_version_tables): Likewise.
1146 * elf32-m32c.c (m32c_elf_relax_section): Likewise.
1147 * elf32-rl78.c (rl78_elf_relax_section): Likewise.
1148 * elf32-rx.c (elf32_rx_relax_section): Likewise.
1149 * elf64-alpha.c (READ): Likewise.
1150 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Likewise.
1151 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Likewise.
1152 * elfcode.h (elf_slurp_symbol_table),
1153 (elf_slurp_reloc_table_from_section): Likewise.
1154 * elflink.c (elf_link_add_object_symbols),
1155 (elf_link_check_versioned_symbol): Likewise.
1156 * elfxx-mips.c (READ): Likewise.
1157 * i386lynx.c (slurp_reloc_table): Likewise.
1158 * lynx-core.c (lynx_core_file_p): Likewise.
1159 * mach-o.c (bfd_mach_o_canonicalize_relocs),
1160 (bfd_mach_o_read_symtab_strtab, bfd_mach_o_alloc_and_read),
1161 (bfd_mach_o_read_prebound_dylib, bfd_mach_o_read_dyld_content
1162 * pdp11.c (aout_get_external_symbols, slurp_reloc_table
1163 * pef.c (bfd_pef_print_loader_section, bfd_pef_scan_start_address),
1164 (bfd_pef_parse_symbols): Likewise.
1165 * peicode.h (pe_ILF_object_p, pe_bfd_object_p
1166 * som.c (setup_sections, som_slurp_string_table),
1167 (som_slurp_reloc_table, som_bfd_count_ar_symbols),
1168 (som_bfd_fill_in_ar_symbols): Likewise.
1169 * vms-alpha.c (module_find_nearest_line, evax_bfd_print_dst),
1170 (evax_bfd_print_image): Likewise.
1171 * vms-lib.c (_bfd_vms_lib_archive_p): Likewise.
1172 * wasm-module.c (wasm_scan): Likewise.
1173 * xcofflink.c (xcoff_link_add_symbols): Likewise.
1174 * xsym.c (bfd_sym_read_name_table),
1175 (bfd_sym_print_type_information_table_entry): Likewise.
1176 * libbfd.h: Regenerate.
1178 2020-02-19 Alan Modra <amodra@gmail.com>
1180 * aoutx.h (slurp_reloc_table): Allocate reloc_cache after
1181 reading external relocs.
1182 * ecoff.c (ecoff_slurp_reloc_table): Likewise.
1183 * archive.c (_bfd_write_archive_contents): Don't twiddle bfd_error
1185 * archive64.c (_bfd_archive_64_bit_slurp_armap): Remove unnecessary
1187 * elf32-m32c.c (m32c_offset_for_reloc): Make shndx_buf a bfd_byte*.
1188 (m32c_elf_relax_section): Likewise.
1189 * elf32-rl78.c (rl78_offset_for_reloc): Likewise.
1190 (rl78_elf_relax_section): Likewise.
1191 * elf32-rx.c (rx_offset_for_reloc): Likewise.
1192 (elf32_rx_relax_section): Likewise.
1193 * mach-o.c (bfd_mach_o_alloc_and_read): Move earlier with better
1194 parameter types and use..
1195 (bfd_mach_o_read_dylinker, bfd_mach_o_read_dylib),
1196 (bfd_mach_o_read_fvmlib, bfd_mach_o_read_str): ..in these functions.
1197 * peicode.h (pe_bfd_object_p): Don't zero the part of opthdr
1198 being read from file, just the extra.
1199 * som.c (som_slurp_symbol_table): Allocate internal symbol buffer
1200 after reading external syms. Free on failure.
1202 2020-02-19 Alan Modra <amodra@gmail.com>
1204 * coffcode.h (buy_and_read, coff_slurp_line_table),
1205 (coff_slurp_symbol_table, coff_slurp_reloc_table): Replace
1206 bfd_[z][m]alloc2 calls with _bfd_mul_overflow followed by the
1207 corresponding bfd_alloc call. Adjust variables to suit.
1208 * coffgen.c (_bfd_coff_get_external_symbols): Likewise.
1209 * ecoff.c (_bfd_ecoff_slurp_symbolic_info),
1210 (_bfd_ecoff_slurp_symbol_table, READ): Likewise.
1211 * elf.c (bfd_elf_get_elf_syms, setup_group, bfd_section_from_shdr),
1212 (swap_out_syms, _bfd_elf_slurp_version_tables): Likewise.
1213 * elf32-m32c.c (m32c_elf_relax_section): Likewise.
1214 * elf32-rl78.c (rl78_elf_relax_section): Likewise.
1215 * elf32-rx.c (elf32_rx_relax_section): Likewise.
1216 * elf64-alpha.c (READ): Likewise.
1217 * elfcode.h (elf_object_p, elf_write_relocs, elf_write_shdrs_and_ehdr),
1218 (elf_slurp_symbol_table, elf_slurp_reloc_table),
1219 (bfd_from_remote_memory): Likewise.
1220 * elfcore.h (core_find_build_id): Likewise.
1221 * elfxx-mips.c (READ): Likewise.
1222 * mach-o.c (bfd_mach_o_mangle_sections),
1223 (bfd_mach_o_read_symtab_symbols, bfd_mach_o_read_thread),
1224 (bfd_mach_o_read_dysymtab, bfd_mach_o_flatten_sections),
1225 (bfd_mach_o_scan, bfd_mach_o_fat_archive_p): Likewise.
1226 * som.c (setup_sections, som_prep_for_fixups)
1227 (som_build_and_write_symbol_table, som_slurp_symbol_table),
1228 (som_slurp_reloc_table, som_bfd_count_ar_symbols),
1229 (som_bfd_fill_in_ar_symbols, som_slurp_armap),
1230 (som_bfd_ar_write_symbol_stuff): Likewise.
1231 * vms-alpha.c (vector_grow1): Likewise.
1232 * vms-lib.c (vms_add_index): Likewise.
1233 * wasm-module.c (wasm_scan_name_function_section): Likewise.
1234 * libbfd.c (bfd_malloc2, bfd_realloc2, bfd_zmalloc2): Delete.
1235 * opncls.c (bfd_alloc2, bfd_zalloc2): Delete.
1236 * libbfd-in.h (bfd_malloc2, bfd_realloc2, bfd_zmalloc2),
1237 (bfd_alloc2, bfd_zalloc2): Delete.
1238 (_bfd_mul_overflow): Define.
1239 * libbfd.h: Regenerate.
1241 2020-02-19 Alan Modra <amodra@gmail.com>
1243 * elf.c (bfd_section_from_shdr): Use bfd_zalloc rather than
1245 (assign_section_numbers): Likewise.
1246 (elf_map_symbols): Likewise, and bfd_alloc rather than bfd_alloc2.
1247 (_bfd_elf_map_sections_to_segments): Use bfd_malloc rather than
1248 bfd_malloc2, size_t amt, and unsigned tls_count.
1249 (rewrite_elf_program_header): Use bfd_malloc and size_t amt.
1250 * elflink.c (elf_create_symbuf): Use bfd_malloc.
1251 (elf_output_implib): Use bfd_alloc.
1253 2020-02-19 Alan Modra <amodra@gmail.com>
1255 * bfd.c (struct bfd): Move format and direction to other
1256 bitfields. Add "size".
1257 * bfdio.c (bfd_get_size): Cache size when not writing file.
1258 * opncls.c (bfd_get_debug_link_info_1): Allow for bfd_get_size
1259 returning zero, ie. unknown.
1260 (bfd_get_alt_debug_link_info): Likewise.
1261 * bfd-in2.h: Regenerate.
1263 2020-02-19 Alan Modra <amodra@gmail.com>
1265 * coffgen.c (_bfd_coff_get_external_symbols): Don't call
1266 bfd_get_file_size twice.
1267 (_bfd_coff_read_string_table): Allow for bfd_get_file_size
1268 zero, ie. unknown, return.
1269 * elf-attrs.c (_bfd_elf_parse_attributes): Likewise.
1270 * elfcode.h (elf_swap_shdr_in): Likewise.
1271 (elf_object_p): Don't call bfd_get_file_size twice and correct
1274 2020-02-19 Alan Modra <amodra@gmail.com>
1276 * mach-o.c (bfd_mach_o_flatten_sections): Return a bfd_boolean,
1277 FALSE if memory alloc fails. Adjust calls.
1278 * som.c (som_prep_for_fixups): Likewise.
1279 * vms-alpha.c (alpha_vms_add_fixup_lp, alpha_vms_add_fixup_ca),
1280 (alpha_vms_add_fixup_qr, alpha_vms_add_fixup_lr),
1281 (alpha_vms_add_lw_reloc, alpha_vms_add_qw_reloc): Likewise.
1282 * som.c (som_build_and_write_symbol_table): Return via error_return
1284 * vms-alpha.c (VEC_APPEND): Adjust for vector_grow1 changes.
1285 (VEC_APPEND_EL): Delete.
1286 (vector_grow1): Return pointer to element. Catch overflow.
1287 Return NULL on memory allocation failure.
1288 (alpha_vms_add_fixup_lp): Replace VEC_APPEND_EL with VEC_APPEND.
1289 (alpha_vms_add_fixup_ca): Likewise.
1290 (alpha_vms_link_add_object_symbols): Check VEC_APPEND result
1292 * elf.c (bfd_section_from_shdr): Check bfd_zalloc2 result.
1294 2020-02-19 Alan Modra <amodra@gmail.com>
1296 * aix386-core.c (aix386_core_file_p): Use size_t for "amt".
1297 * aout-target.h (object_p): Likewise.
1298 * aout-tic30.c (tic30_aout_object_p): Likewise.
1299 * aoutx.h (some_aout_object_p, mkobject, make_empty_symbol),
1300 (emit_stringtab, write_syms, link_hash_table_create),
1301 (aout_link_write_other_symbol): Likewise.
1302 * archive.c (_bfd_generic_mkarchive, bfd_generic_archive_p),
1303 (bfd_ar_hdr_from_filesystem, _bfd_write_archive_contents),
1304 (_bfd_compute_and_write_armap): Likewise.
1305 * archures.c (bfd_arch_list): Likewise.
1306 * bfd.c (bfd_record_phdr): Likewise.
1307 * binary.c (binary_canonicalize_symtab): Likewise.
1308 * cisco-core.c (cisco_core_file_validate): Likewise.
1309 * coff-arm.c (coff_arm_link_hash_table_create, find_thumb_glue),
1310 (find_arm_glue, record_arm_to_thumb_glue),
1311 (record_thumb_to_arm_glue): Likewise.
1312 * coff-ppc.c (ppc_coff_link_hash_table_create, record_toc),
1313 (ppc_allocate_toc_section): Likewise.
1314 * coff-rs6000.c (_bfd_xcoff_mkobject, _bfd_xcoff_archive_p): Likewise.
1315 * coff-sh.c (sh_relax_section): Likewise.
1316 * coff64-rs6000.c (xcoff64_archive_p): Likewise.
1317 * coffcode.h (handle_COMDAT, coff_new_section_hook),
1318 (coff_set_alignment_hook, coff_mkobject),
1319 (coff_compute_section_file_positions): Likewise.
1320 * coffgen.c (coff_make_empty_symbol, coff_bfd_make_debug_symbol),
1321 (coff_find_nearest_line_with_names),
1322 ( bfd_coff_set_symbol_class): Likewise.
1323 * cofflink.c (_bfd_coff_link_hash_table_create),
1324 (_bfd_coff_link_input_bfd): Likewise.
1325 * dwarf1.c (alloc_dwarf1_unit, alloc_dwarf1_func): Likewise.
1326 * dwarf2.c (read_abbrevs, read_attribute_value, add_line_info),
1327 (build_line_info_table, sort_line_sequences),
1328 (line_info_add_include_dir, line_info_add_file_name),
1329 (decode_line_info, scan_unit_for_symbols, parse_comp_unit),
1330 (place_sections, _bfd_dwarf2_slurp_debug_info): Likewise.
1331 * ecoff.c (_bfd_ecoff_mkobject, _bfd_ecoff_make_empty_symbol),
1332 (_bfd_ecoff_find_nearest_line),
1333 (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
1334 * ecofflink.c (bfd_ecoff_debug_init): Likewise.
1335 * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Likewise.
1336 * elf-m10300.c (mn10300_elf_relax_section),
1337 (elf32_mn10300_link_hash_table_create): Likewise.
1338 * elf-strtab.c (_bfd_elf_strtab_init): Likewise.
1339 * elf.c (make_mapping, copy_elf_program_header): Likewise.
1340 * elf32-arm.c (elf32_arm_link_hash_table_create),
1341 (elf32_arm_setup_section_lists, elf32_arm_check_relocs),
1342 (elf32_arm_new_section_hook): Likewise.
1343 * elf32-avr.c (elf_avr_new_section_hook),
1344 (elf32_avr_link_hash_table_create, get_local_syms),
1345 (elf32_avr_setup_section_lists): Likewise.
1346 * elf32-bfin.c (bfinfdpic_elf_link_hash_table_create),
1347 (bfin_link_hash_table_create): Likewise.
1348 * elf32-cr16.c (elf32_cr16_link_hash_table_create): Likewise.
1349 * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
1350 * elf32-csky.c (csky_elf_link_hash_table_create),
1351 (csky_elf_check_relocs, elf32_csky_setup_section_lists): Likewise.
1352 * elf32-frv.c (frvfdpic_elf_link_hash_table_create): Likewise.
1353 * elf32-hppa.c (elf32_hppa_link_hash_table_create),
1354 (elf32_hppa_setup_section_lists, get_local_syms): Likewise.
1355 * elf32-i386.c (elf_i386_check_relocs): Likewise.
1356 * elf32-lm32.c (lm32_elf_link_hash_table_create): Likewise.
1357 * elf32-m32r.c (m32r_elf_link_hash_table_create),
1358 (m32r_elf_check_relocs): Likewise.
1359 * elf32-m68hc1x.c (m68hc11_elf_hash_table_create),
1360 (elf32_m68hc11_setup_section_lists),
1361 (elf32_m68hc11_size_stubs): Likewise.
1362 * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
1363 * elf32-metag.c (elf_metag_link_hash_table_create),
1364 (elf_metag_setup_section_lists): Likewise.
1365 * elf32-microblaze.c (microblaze_elf_link_hash_table_create),
1366 (microblaze_elf_check_relocs): Likewise.
1367 * elf32-nds32.c (nds32_elf_link_hash_table_create),
1368 (nds32_elf_check_relocs): Likewise.
1369 * elf32-nios2.c (nios2_elf32_setup_section_lists),
1370 (get_local_syms, nios2_elf32_check_relocs),
1371 (nios2_elf32_link_hash_table_create): Likewise.
1372 * elf32-or1k.c (or1k_elf_link_hash_table_create),
1373 (or1k_elf_check_relocs): Likewise.
1374 * elf32-ppc.c (ppc_elf_modify_segment_map, update_plt_info): Likewise.
1375 * elf32-pru.c (pru_elf32_link_hash_table_create): Likewise.
1376 * elf32-s390.c (elf_s390_link_hash_table_create),
1377 (elf_s390_check_relocs): Likewise.
1378 * elf32-score.c (score_elf_create_got_section),
1379 (s3_elf32_score_new_section_hook),
1380 (elf32_score_link_hash_table_create): Likewise.
1381 * elf32-score7.c (score_elf_create_got_section),
1382 (s7_elf32_score_new_section_hook): Likewise.
1383 * elf32-sh.c (sh_elf_link_hash_table_create),
1384 (sh_elf_check_relocs): Likewise.
1385 * elf32-tic6x.c (elf32_tic6x_link_hash_table_create),
1386 (elf32_tic6x_new_section_hook, elf32_tic6x_check_relocs): Likewise.
1387 * elf32-tilepro.c (tilepro_elf_link_hash_table_create),
1388 (tilepro_elf_check_relocs): Likewise.
1389 * elf32-v850.c (remember_hi16s_reloc): Likewise.
1390 * elf32-vax.c (elf_vax_link_hash_table_create): Likewise.
1391 * elf32-xtensa.c (elf_xtensa_link_hash_table_create),
1392 (elf_xtensa_new_section_hook): Likewise.
1393 * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create),
1394 (get_got_entry, elf64_alpha_check_relocs): Likewise.
1395 * elf64-hppa.c (elf64_hppa_hash_table_create): Likewise.
1396 * elf64-ia64-vms.c (elf64_ia64_object_p): Likewise.
1397 * elf64-mmix.c (mmix_elf_new_section_hook): Likewise.
1398 * elf64-ppc.c (ppc64_elf_new_section_hook),
1399 (ppc64_elf_link_hash_table_create, update_local_sym_info),
1400 (update_plt_info, ppc64_elf_check_relocs): Likewise.
1401 * elf64-s390.c (elf_s390_link_hash_table_create),
1402 (elf_s390_check_relocs): Likewise.
1403 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1404 * elflink.c (bfd_elf_link_record_local_dynamic_symbol),
1405 (_bfd_elf_link_find_version_dependencies, elf_link_add_object_symbols),
1406 (elf_link_add_archive_symbols, compute_bucket_count),
1407 (bfd_elf_size_dynsym_hash_dynstr, _bfd_elf_link_hash_table_create),
1408 (bfd_elf_get_bfd_needed_list, elf_link_swap_symbols_out),
1409 (bfd_elf_final_link): Likewise.
1410 * elfnn-aarch64.c (elfNN_aarch64_link_hash_table_create),
1411 (elfNN_aarch64_setup_section_lists, elfNN_aarch64_check_relocs),
1412 (elfNN_aarch64_new_section_hook): Likewise.
1413 * elfnn-ia64.c (elfNN_ia64_object_p): Likewise.
1414 * elfnn-riscv.c (riscv_elf_link_hash_table_create),
1415 (riscv_elf_check_relocs): Likewise.
1416 * elfxx-mips.c (_bfd_mips_elf_new_section_hook),
1417 (_bfd_mips_elf_add_symbol_hook, _bfd_mips_elf_check_relocs),
1418 (_bfd_mips_elf_modify_segment_map, _bfd_mips_elf_set_section_contents),
1419 (_bfd_mips_elf_link_hash_table_create): Likewise.
1420 * elfxx-sparc.c (_bfd_sparc_elf_link_hash_table_create),
1421 (_bfd_sparc_elf_check_relocs),
1422 (_bfd_sparc_elf_new_section_hook): Likewise.
1423 * elfxx-tilegx.c (tilegx_elf_link_hash_table_create),
1424 (tilegx_elf_check_relocs): Likewise.
1425 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Likewise.
1426 * format.c (bfd_check_format_matches): Likewise.
1427 * hash.c (_bfd_stringtab_init): Likewise.
1428 * ihex.c (ihex_scan): Likewise.
1429 * irix-core.c (irix_core_core_file_p): Likewise.
1430 * linker.c (bfd_wrapped_link_hash_lookup),
1431 (_bfd_generic_link_hash_table_create),
1432 (_bfd_generic_reloc_link_order): Likewise.
1433 * lynx-core.c (lynx_core_file_p): Likewise.
1434 * netbsd-core.c (netbsd_core_file_p): Likewise.
1435 * osf-core.c (osf_core_core_file_p): Likewise.
1436 * pdp11.c (some_aout_object_p, mkobject, make_empty_symbol),
1437 (link_hash_table_create, aout_link_write_other_symbol): Likewise.
1438 * peXXigen.c (_bfd_XX_bfd_copy_private_section_data): Likewise.
1439 * peicode.h (pe_mkobject): Likewise.
1440 * ppcboot.c (ppcboot_mkobject, ppcboot_canonicalize_symtab): Likewise.
1441 * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
1442 * sco5-core.c (read_uarea): Likewise.
1443 * som.c (hppa_som_gen_reloc_type, som_object_p, som_prep_headers),
1444 (som_write_fixups, som_write_space_strings, som_write_symbol_strings),
1445 (som_finish_writing, som_canonicalize_symtab, som_new_section_hook),
1446 (som_bfd_copy_private_section_data, bfd_som_set_section_attributes),
1447 (bfd_som_attach_aux_hdr, som_write_armap): Likewise.
1448 * srec.c (srec_scan): Likewise.
1449 * syms.c (_bfd_generic_make_empty_symbol): Likewise.
1450 * targets.c (bfd_target_list): Likewise.
1451 * tekhex.c (first_phase, tekhex_sizeof_headers): Likewise.
1452 * trad-core.c (trad_unix_core_file_p): Likewise.
1453 * vms-alpha.c (vms_initialize, alpha_vms_bfd_link_hash_table_create),
1454 (vms_new_section_hook): Likewise.
1455 * wasm-module.c (wasm_make_empty_symbol): Likewise.
1456 * xcofflink.c (xcoff_get_section_contents),
1457 (_bfd_xcoff_bfd_link_hash_table_create, xcoff_set_import_path),
1458 (xcoff_find_function, bfd_xcoff_link_record_set, xcoff_build_ldsym),
1459 (bfd_xcoff_size_dynamic_sections, xcoff_link_input_bfd): Likewise.
1461 2020-02-19 Alan Modra <amodra@gmail.com>
1463 * elfxx-riscv.c (riscv_multi_letter_ext_valid_p): Don't use C99.
1465 2020-02-13 H.J. Lu <hongjiu.lu@intel.com>
1467 * plugin.c (try_load_plugin): Make plugin_list_iter an argument
1468 and use it if it isn't NULL. Remove has_plugin_p argument. Add
1469 a build_list_p argument. Don't search plugin_list. Short circuit
1470 when building the plugin list.
1471 (has_plugin): Renamed to has_plugin_list.
1472 (bfd_plugin_set_plugin): Don't set has_plugin.
1473 (bfd_plugin_specified_p): Check plugin_list instead.
1474 (build_plugin_list): New function.
1475 (load_plugin): Call build_plugin_list and use plugin_list.
1477 2020-02-11 H.J. Lu <hongjiu.lu@intel.com>
1480 * plugin.c (try_claim): Always clean up for LTO wrapper.
1481 (try_load_plugin): Treat each object as independent. Create a
1482 copy for plugin name.
1484 2020-02-11 Nick Clifton <nickc@redhat.com>
1486 * elf32-msp430.c (msp430_final_link_relocate): Always use longs
1487 for addresses in print statements.
1488 (msp430_elf_relax_delete_bytes): Likewise.
1489 (msp430_elf_relax_add_words): Likewise.
1490 (msp430_elf_relax_section): Likewise.
1492 2020-02-11 H.J. Lu <hongjiu.lu@intel.com>
1494 * plugin.c (add_symbols): Clear plugin_data memory.
1496 2020-02-10 H.J. Lu <hongjiu.lu@intel.com>
1499 * configure.ac (HAVE_EXECUTABLE_SUFFIX): New AC_DEFINE.
1500 (EXECUTABLE_SUFFIX): Likewise.
1501 * config.in: Regenerated.
1502 * configure: Likewise.
1503 * plugin.c (bfd_plugin_close_and_cleanup): Removed.
1504 (plugin_list_entry): Add all_symbols_read, cleanup_handler,
1505 gcc, lto_wrapper, resolution_file, resolution_option, gcc_env,
1506 real_bfd, real_nsyms, real_syms, lto_nsyms and lto_syms.
1507 (get_lto_wrapper): New.
1508 (setup_lto_wrapper_env): Likewise.
1509 (current_plugin): Likewise.
1510 (register_all_symbols_read): Likewise.
1511 (register_cleanup): Likewise.
1512 (get_symbols): Likewise.
1513 (add_input_file): Likewise.
1514 (bfd_plugin_close_and_cleanup): Likewise.
1515 (claim_file): Removed.
1516 (register_claim_file): Set current_plugin->claim_file.
1517 (add_symbols): Make a copy of LTO symbols. Set lto_nsyms and
1518 lto_syms in current_plugin.
1519 (try_claim): Use current_plugin->claim_file. Call LTO plugin
1520 all_symbols_read handler. Copy real symbols to plugin_data.
1521 Call LTO plugin cleanup handler. Clean up for LTO wrapper.
1522 (try_load_plugin): Don't reuse the previous plugin for LTO
1523 wrapper. Set up GCC LTO wrapper if possible. Don't set
1524 plugin_list_iter->claim_file.
1525 (bfd_plugin_canonicalize_symtab): Use real LTO symbols if
1527 * plugin.h (plugin_data_struct): Add real_bfd, real_nsyms and
1530 2020-02-10 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1532 * elf32-msp430.c (msp430_elf_relax_section): Before relaxing a branch,
1533 check if previous instruction matches a conditional jump inserted
1534 earlier. Invert conditional jump and delete branch in this case.
1536 2020-02-10 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1538 * elf32-msp430.c (msp430_elf_relax_add_two_words): Rename to
1539 msp430_elf_relax_add_words. Support insertion of either one or two
1541 (msp430_elf_relax_section): Catch opcode of 0x3c00 when relocation
1542 needs to be grown. Handle insertion of branch instruction to replace
1545 2020-02-10 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1547 * elf32-msp430.c (msp430_final_link_relocate): Add printf statements for
1548 debugging relocations.
1549 (msp430_elf_relax_delete_bytes): Likewise.
1550 (msp430_elf_relax_add_two_words): Likewise.
1551 (msp430_elf_relax_section): Likewise.
1553 2020-02-10 Alan Modra <amodra@gmail.com>
1555 * archures.c: Wrap overlong z80 comments.
1556 * bfd-in2.h: Regenerate.
1558 2020-02-07 Sergey Belyashov <sergey.belyashov@gmail.com>
1561 * archures.c: Add GBZ80 and Z80N machine values.
1562 * reloc.c: Add BFD_RELOC_Z80_16_BE.
1563 * coff-z80.c: Add support for new reloc.
1564 * coffcode.h: Add support for new machine values.
1565 * cpu-z80.c: Add support for new machine names.
1566 * elf32-z80.c: Add support for new reloc.
1567 * bfd-in2.h: Regenerate.
1568 * libbfd.h: Regenerate.
1570 2020-02-07 Nick Clifton <nickc@redhat.com>
1573 * elf.c (rewrite_elf_program_header): Do not complain if no
1574 sections are mapped to a segment.
1576 2020-02-06 H.J. Lu <hongjiu.lu@intel.com>
1579 * elflink.c (_bfd_elf_gc_mark_extra_sections): Issue an error
1580 for garbage collection on __patchable_function_entries section
1581 without linked-to section.
1583 2020-02-06 H.J. Lu <hongjiu.lu@intel.com>
1586 * bfd-in2.h: Regenerated.
1587 * elflink.c (_bfd_elf_gc_mark_extra_sections): Call mark_hook
1588 on section if gc_mark of any of its linked-to sections is set
1589 and don't set gc_mark again.
1590 * section.c (asection): Add linked_to_symbol_name to map_head
1593 2020-02-06 Maciej W. Rozycki <macro@wdc.com>
1595 * elf32-v850.c (v850_elf_relax_section): Fix the index used for
1596 reporting an unrecognized instruction with R_V850_LONGJUMP.
1598 2020-02-05 Alan Modra <amodra@gmail.com>
1600 * elf64-ppc.c (ppc_stub_plt_branch): Match comment with reality.
1602 2020-02-04 Alan Modra <amodra@gmail.com>
1604 * elf32-ppc.c (ppc_elf_relocate_section): After applying
1605 R_PPC_VLE_ADDR20, goto copy_reloc.
1607 2020-02-02 H.J. Lu <hongjiu.lu@intel.com>
1609 * bfd-in2.h: Regenerated.
1610 * section.c (SEC_ASSEMBLER_SECTION_ID): Fix a typo in comments.
1612 2020-02-02 H.J. Lu <hongjiu.lu@intel.com>
1615 * bfd-in2.h: Regenerated.
1616 * ecoff.c (bfd_debug_section): Add section_id.
1617 * section.c (bfd_section): Add section_id.
1618 (SEC_ASSEMBLER_SECTION_ID): New.
1619 (BFD_FAKE_SECTION): Add section_id.
1621 2020-02-01 Nick Clifton <nickc@redhat.com>
1623 * config.bfd: Move the c30-aout and tic30-aout targets onto the
1626 2020-01-31 Sandra Loosemore <sandra@codesourcery.com>
1628 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): DW_EH_PE_datarel
1629 encodings are relative to the GOT on nios2, too.
1631 2020-01-31 Alan Modra <amodra@gmail.com>
1633 * Makefile.am (elf32-target.h, elf64-target.h): Don't use a temp
1634 file. Use $< and $@ in rules.
1635 (elf32-aarch64.c, elf64-aarch64.c): Likewise.
1636 (elf32-ia64.c, elf64-ia64.c): Likewise.
1637 (elf32-riscv.c, elf64-riscv.c): Likewise.
1638 (peigen.c, pepigen.c, pex64igen.c): Likewise.
1639 (elf32-aarch64.c, elf64-aarch64.c): Don't emit $srcdir on #line.
1640 (elf32-riscv.c, elf64-riscv.c): Likewise, and use $(SED).
1641 (elf32-ia64.c, elf64-ia64.c): Do emit #line.
1642 (peigen.c, pepigen.c, pex64igen.c): Likewise.
1643 * Makefile.in: Regenerate.
1645 2020-01-31 Alan Modra <amodra@gmail.com>
1648 * elf.c (setup_group): Don't clear entire section contents,
1649 just the padding after group flags. Release alloc'd memory
1650 after a seek or read failure.
1652 2020-01-16 Jon Turney <jon.turney@dronecode.org.uk>
1654 * peXXigen.c (pe_is_repro): New function.
1655 (_bfd_XX_print_private_bfd_data_common): Note timestamp is
1656 actually a build hash if PE_IMAGE_DEBUG_TYPE_REPRO is present.
1658 2020-01-16 Jon Turney <jon.turney@dronecode.org.uk>
1660 * peXXigen.c (debug_type_names): Add names for new debug data type
1663 2020-01-16 Jon Turney <jon.turney@dronecode.org.uk>
1665 * peXXigen.c (pe_print_debugdata): Fix the iteration variable for
1666 inner loop. Fix a memory leak.
1668 2020-01-30 Alan Modra <amodra@gmail.com>
1670 * coffgen.c (coff_real_object_p): Don't clear obj_coff_keep_syms
1671 or obj_coff_keep_strings here.
1672 (coff_get_normalized_symtab): Free external syms directly.
1673 * xcofflink.c (xcoff_link_input_bfd): Restore obj_coff_keep_syms
1676 2020-01-27 Jim Wilson <jimw@sifive.com>
1678 * cpu-riscv.c (riscv_scan): New.
1679 (N): Change bfd_default_scan to riscv_scan.
1681 2020-01-27 Andreas Schwab <schwab@suse.de>
1683 * Makefile.am (ALL_MACHINES): Remove cpu-plugin.lo.
1684 (ALL_MACHINES_CFILES): Remove cpu-plugin.c.
1685 * Makefile.in: Regenerate.
1686 * cpu-plugin.c: Remove.
1687 * archures.c (enum bfd_architecture): Remove bfd_arch_plugin.
1688 (bfd_plugin_arch): Remove declaration.
1689 * bfd-in2.h: Regenerate.
1690 * po/SRC-POTFILES.in: Regenerate.
1692 2020-01-27 H.J. Lu <hongjiu.lu@intel.com>
1693 Alan Modra <amodra@gmail.com>
1696 * elflink.c (_bfd_elf_gc_mark_rsec): Mark all weak aliases.
1698 2020-01-24 Jim Wilson <jimw@sifive.com>
1700 * elfxx-riscv.c (riscv_get_prefix_class): Format s case like others.
1701 (riscv_parse_prefixed_ext): Fix s extension comment and reword to
1702 avoid over long line.
1704 2020-01-24 Nick Clifton <nickc@redhat.com>
1707 * coffgen.c (_bfd_coff_close_and_cleanup): Do not clear the keep
1708 syms and keep strings flags as these may have been set in order to
1709 prevent a bogus call to free.
1711 2020-01-23 Nick Clifton <nickc@redhat.com>
1713 * po/fr.po: Updated French translation.
1715 2020-01-23 Alan Modra <amodra@gmail.com>
1718 * elf.c (assign_file_positions_for_load_sections): Avoid divide
1719 by zero when p_align is zero.
1721 2020-01-22 Maxim Blinov <maxim.blinov@embecosm.com>
1723 * bfd/elfnn-riscv.c (riscv_skip_prefix): New.
1724 (riscv_prefix_cmp): Likewise.
1725 (riscv_non_std_ext_p): Deleted.
1726 (riscv_std_sv_ext_p): Likewise.
1727 (riscv_non_std_sv_ext_p): Likewise.
1728 (riscv_merge_non_std_and_sv_ext): Rename to...
1729 (riscv_merge_multi_letter_ext): and modified to use riscv_prefix_cmp.
1730 (riscv_merge_arch_attr_info): Replace 3 calls to
1731 riscv_merge_non_std_and_sv_ext with single call to
1732 riscv_merge_multi_letter_ext.
1733 * bfd/elfxx-riscv.c (riscv_parse_std_ext): Break if we
1734 encounter a 'z' prefix.
1735 (riscv_get_prefix_class): New function, return prefix class based
1736 on first few characters of input string.
1737 (riscv_parse_config): New structure to factor out minor differences
1738 in extension class parsing behaviour.
1739 (riscv_parse_sv_or_non_std_ext): Rename to...
1740 (riscv_parse_prefixed_ext): and parameterise with
1742 (riscv_std_z_ext_strtab, riscv_std_s_ext_strtab): New.
1743 (riscv_multi_letter_ext_valid_p): New.
1744 (riscv_ext_x_valid_p, riscv_ext_z_valid_p, riscv_ext_s_valid_p): New.
1745 (riscv_parse_subset): Delegate all non-single-letter parsing work
1746 to riscv_parse_prefixed_ext.
1747 * bfd/elfxx-riscv.h (riscv_isa_ext_class): New type.
1748 (riscv_get_prefix_class): Declare.
1750 2020-01-22 Alan Modra <amodra@gmail.com>
1752 * elf64-ppc.c (struct ppc_link_hash_table): Add tga_group.
1753 (ppc64_elf_archive_symbol_lookup): Extract __tls_get_addr_opt for
1754 __tls_get_addr_desc.
1755 (ppc64_elf_size_stubs): Add section for linker generated
1756 __tls_get_addr_desc wrapper function. Loop at least once if
1757 generating this function.
1758 (emit_tga_desc, emit_tga_desc_eh_frame): New functions.
1759 (ppc64_elf_build_stubs): Generate __tls_get_addr_desc.
1761 2020-01-22 Alan Modra <amodra@gmail.com>
1763 * elf64-ppc.h (struct ppc64_elf_params): Add no_tls_get_addr_regsave.
1764 * elf64-ppc.c (struct ppc_link_hash_table): Add tga_desc and
1766 (is_tls_get_addr): Match tga_desc and tga_desc_df too.
1767 (STDU_R1_0R1, ADDI_R1_R1): Define.
1768 (tls_get_addr_prologue, tls_get_addr_epilogue): New functions.
1769 (ppc64_elf_tls_setup): Set up tga_desc and tga_desc_fd. Indirect
1770 tga_desc_fd to opt_fd, and tga_desc to opt. Set
1771 no_tls_get_addr_regsave.
1772 (branch_reloc_hash_match): Add hash3 and hash4.
1773 (ppc64_elf_tls_optimize): Handle tga_desc_fd and tga_desc too.
1774 (ppc64_elf_size_dynamic_sections): Likewise.
1775 (ppc64_elf_relocate_section): Likewise.
1776 (plt_stub_size, build_plt_stub): Likewise. Size regsave
1777 __tls_get_addr stub.
1778 (build_tls_get_addr_stub): Build regsave __tls_get_addr stub and
1780 (ppc_size_one_stub): Handle tga_desc_fd and tga_desc too. Size
1781 eh_frame for regsave __tls_get_addr.
1783 2020-01-22 Alan Modra <amodra@gmail.com>
1785 * elf64-ppc.c (ppc64_elf_size_stubs): Correct condition under
1786 which __tls_get_addr calls will be eliminated.
1788 2020-01-20 Nick Clifton <nickc@redhat.com>
1790 * po/pt.po: Updates Portuguese translation.
1791 * po/ru.po: Updated Russian translation.
1792 * po/uk.po: Updated Ukranian translation.
1794 2020-01-20 H.J. Lu <hongjiu.lu@intel.com>
1797 * elf64-x86-64.c (elf_x86_64_check_tls_transition): Support
1798 "rex leal x@tlsdesc(%rip), %reg" and "call *x@tlsdesc(%eax)" in
1800 (elf_x86_64_relocate_section): In x32 mode, for GDesc -> LE
1801 transition, relax "rex leal x@tlsdesc(%rip), %reg" to
1802 "rex movl $x@tpoff, %reg", for GDesc -> IE transition, relax
1803 "rex leal x@tlsdesc(%rip), %reg" to
1804 "rex movl x@gottpoff(%rip), %eax". For both transitions, relax
1805 "call *(%eax)" to "nopl (%rax)".
1807 2020-01-20 Alan Modra <amodra@gmail.com>
1809 * elf64-ppc.c (LD_R11_0R3, CMPDI_R11_0, STD_R11_0R1, LD_R11_0R1),
1810 (MTLR_R11): Don't define.
1811 (LD_R0_0R3, CMPDI_R0_0): Define.
1812 (build_tls_get_addr_stub): Don't use r11 in stub.
1814 2020-01-20 Alan Modra <amodra@gmail.com>
1816 * elf64-ppc.c (ppc_elf_hash_entry): New function, use throughout file.
1817 (defined_sym_val, is_tls_get_addr): Likewise.
1819 2020-01-18 Nick Clifton <nickc@redhat.com>
1821 * version.m4 (BFD_VERSION): Set to 2.34.50.
1822 * configure: Regenerate.
1823 * po/bfd.pot: Regenerate.
1825 2020-01-18 Nick Clifton <nickc@redhat.com>
1827 Binutils 2.34 branch created.
1829 2020-01-17 Christian Biesinger <cbiesinger@google.com>
1831 * coff-arm.c: Fix spelling error (seperate).
1832 * elfxx-riscv.c (riscv_parse_sv_or_non_std_ext): Fix spelling
1834 * sysdep.h (strnlen): Fix spelling error (seperate).
1836 2020-01-15 Lars Brinkhoff <lars@nocrew.org>
1839 * pdp11.c (TARGET_PAGE_SIZE): Set to 8192.
1841 2020-01-15 Alan Modra <amodra@gmail.com>
1844 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Update comment.
1845 (ppc64_elf_adjust_dynamic_symbol): Don't allow .dynbss copies
1846 of function symbols unless dot symbols are present. Do warn
1847 whenever one is created, regardles of whether a PLT entry is
1848 also emitted for the function symbol.
1850 2020-01-14 Alan Modra <amodra@gmail.com>
1852 * som.c (som_bfd_count_ar_symbols): Error when file position
1853 of symbols on chains is not strictly increasing.
1855 2020-01-14 Alan Modra <amodra@gmail.com>
1857 * vms.h (VMS_DEBUG): Define as 0.
1858 * vms-alpha.c (image_write): Move debug output after bounds check.
1860 (_bfd_vms_slurp_eihd): Warning fix.
1861 (_bfd_vms_slurp_etir): Init variables to avoid bogus warnings.
1863 2020-01-13 Alan Modra <amodra@gmail.com>
1865 * vms-alpha.c (_bfd_vms_slurp_egsd): Ensure minimum size even
1866 for "ignored" records.
1868 2020-01-13 Alan Modra <amodra@gmail.com>
1870 * wasm-module.c (wasm_scan_name_function_section): Formatting.
1871 Delete asect name check. Move asect NULL check to wasm_object_p.
1872 Correct bounds check of sizes against end. Replace uses of
1873 bfd_zalloc with bfd_alloc, zeroing only necessary bytes. Use
1874 just one bfd_release.
1875 (wasm_scan): Don't use malloc/strdup for section names,
1876 bfd_alloc instead. Simplify code prefixing section name.
1877 Formatting. Don't attempt to free memory here..
1878 (wasm_object_p): ..do so here.
1880 2020-01-10 Szabolcs Nagy <szabolcs.nagy@arm.com>
1883 * elf32-arm.c (elf32_arm_final_link_relocate): Use
1884 UNDEFWEAK_NO_DYNAMIC_RELOC.
1885 (allocate_dynrelocs_for_symbol): Likewise.
1887 2020-01-10 Tamar Christina <tamar.christina@arm.com>
1890 * elfnn-aarch64.c (_bfd_aarch64_create_stub_section): Remove elfclass.
1892 2020-01-10 Alan Modra <amodra@gmail.com>
1894 * coff-alpha.c (alpha_ecoff_object_p): Calculate size in bfd_size_type.
1896 2020-01-09 Nick Clifton <nickc@redhat.com>
1899 * bfd.c (bfd_convert_section_contents): Check for a compress
1900 header size that is larger than the actual section size.
1902 2020-01-08 Alan Modra <amodra@gmail.com>
1905 * elflink.c (bfd_elf_final_link): Call _bfd_fix_excluded_sec_syms
1906 after removing sections.
1908 2020-01-06 Jim Wilson <jimw@sifive.com>
1911 * elfnn-riscv.c (riscv_elf_relocate_section) <R_RISCV_CALL>: Add
1912 check for !bfd_link_pic (info).
1913 <R_RISCV_CALL_PLT>: Move next to R_RISCV_CALL.
1914 <R_RISCV_JAL>: Add comment.
1915 (_bfd_riscv_relax_section): For plt.offset check, add check for
1916 bfd_link_pic (info). Add comment.
1918 2020-01-06 Alan Modra <amodra@gmail.com>
1920 * format.c (bfd_check_format_matches): Ignore bfd_error on target
1921 match failures. Don't init to bfd_error_wrong_format before
1922 calling _bfd_check_format.
1924 2020-01-06 Alan Modra <amodra@gmail.com>
1926 * vms-alpha.c (_bfd_vms_push, _bfd_vms_pop): Return pass/fail
1927 status rather than exiting on stack overflow or underflow.
1928 (_bfd_vms_slurp_etir): Adjust to suit.
1930 2020-01-06 Alan Modra <amodra@gmail.com>
1932 * som.c (som_bfd_fill_in_ar_symbols): Bounds check som_dict index.
1934 2020-01-06 Alan Modra <amodra@gmail.com>
1936 * mach-o.c (bfd_mach_o_read_dylinker): Don't read past end of
1937 command. Check name offset is within command.
1938 (bfd_mach_o_read_dylib, bfd_mach_o_read_prebound_dylib),
1939 (bfd_mach_o_read_prebind_cksum, bfd_mach_o_read_twolevel_hints),
1940 (bfd_mach_o_read_fvmlib, bfd_mach_o_read_dysymtab),
1941 (bfd_mach_o_read_symtab, bfd_mach_o_read_uuid),
1942 (bfd_mach_o_read_linkedit, bfd_mach_o_read_str),
1943 (bfd_mach_o_read_dyld_info, bfd_mach_o_read_version_min),
1944 (bfd_mach_o_read_encryption_info, bfd_mach_o_read_source_version),
1945 (bfd_mach_o_read_encryption_info_64, bfd_mach_o_read_main),
1946 (bfd_mach_o_read_note, bfd_mach_o_read_build_version),
1947 (bfd_mach_o_read_segment): Similarly.
1948 (bfd_mach_o_read_thread): Properly bound check thread struct.
1949 Don't repeat checks on second loop.
1950 (bfd_mach_o_read_command): Fail on invalid command length.
1952 2020-01-04 Alan Modra <amodra@gmail.com>
1954 * format.c (bfd_check_format_matches): Add preserve_match.
1955 Save initial bfd state in "preserve", matched bfd state in
1956 "preserve_match". Save just the first match. Release
1957 bfd_alloc memory. Restore and finish preserved state as
1958 appropriate on all function exit paths.
1960 2020-01-04 Alan Modra <amodra@gmail.com>
1962 * mmo.c (mmo_mkobject): Allocate tdata with bfd_zalloc.
1964 2020-01-04 Alan Modra <amodra@gmail.com>
1966 * coffgen.c (coff_real_object_p): Free malloc'd memory on target
1969 2020-01-03 Nick Clifton <nickc@redhat.com>
1972 (bfd_pef_parse_function_stubs): Correct the test that ensures that
1973 there is enough data remaining in the code buffer before
1974 attempting to read a function stub.
1976 2020-01-03 Nick Clifton <nickc@redhat.com>
1979 * elf-properties.c (_bfd_elf_convert_gnu_properties): Check the
1980 return value from bfd_malloc.
1981 * elf32-arm.c (bfd_elf32_arm_vfp11_fix_veneer_locations): Likewise.
1982 (bfd_elf32_arm_stm32l4xx_fix_veneer_locations): Likewise.
1983 (elf32_arm_filter_cmse_symbols): Likewise.
1984 (elf32_arm_write_section): Likewise.
1985 * mach-o.c (bfd_mach_o_core_fetch_environment): Likewise.
1986 (bfd_mach_o_follow_dsym): Likewise.
1987 * pef.c (bfd_pef_print_loader_section): Likewise.
1988 (bfd_pef_scan_start_address): Likewise.
1989 (bfd_pef_parse_function_stubs): Likewise.
1990 (bfd_pef_parse_symbols): Likewise.
1992 2020-01-03 Sergei Trofimovich <siarheit@google.com>
1994 * elfnn-ia64.c (elfNN_ia64_merge_private_bfd_data): don't fail
1995 on binary inputs ld/PR25316.
1996 (is_ia64_elf): new helper to filter on ia64 objects.
1998 2020-01-03 Jan Beulich <jbeulich@suse.com>
2000 * mach-o.c (cpusubtype, bfd_mach_o_header_p): Insert underscore
2002 (bfd_mach_o_scan): Insert underscore in two variable names.
2004 2020-01-02 Sergey Belyashov <sergey.belyashov@gmail.com>
2006 * Makefile.am: Add z80-elf target support.
2007 * configure.ac: Likewise.
2008 * targets.c: Likewise.
2009 * Makefile.in: Regenerate.
2010 * configure: Regenerate.
2011 * config.bfd: Add z80-elf target support and new arches: ez80 and
2013 * elf32-z80.c: New file.
2014 * archures.c: Add new z80 architectures: eZ80 and Z180.
2015 * coffcode.h: Likewise.
2016 * cpu-z80.c: Likewise.
2017 * coff-z80.c: Add new relocations for Z80 target and local label
2019 * reloc.c: Add new relocs.
2020 * bfd-in2.h: Regenerate.
2021 * libbfd.h: Regenerate.
2023 2020-01-02 Tamar Christina <tamar.christina@arm.com>
2027 * elfnn-aarch64.c (_bfd_aarch64_create_stub_section): Set ELF class.
2029 2020-01-01 Alan Modra <amodra@gmail.com>
2031 Update year range in copyright notice of all files.
2033 For older changes see ChangeLog-2019
2035 Copyright (C) 2020 Free Software Foundation, Inc.
2037 Copying and distribution of this file, with or without modification,
2038 are permitted in any medium without royalty provided the copyright
2039 notice and this notice are preserved.
2045 version-control: never