3 * dwarf.c (process_cu_tu_index): Avoid pointer UB. Use _mul_overflow.
8 * dwarf.c (display_gdb_index): Avoid pointer UB and overflow in
13 * dwarf.c (display_debug_names): Complain when header length is
14 too small. Avoid pointer UB. Sanity check augmentation string,
15 CU table, TU table and foreign TU table sizes.
19 * dwarf.c (display_debug_frames): Delete initial_length_size.
20 Avoid pointer UB. Constrain data reads to length given in header.
21 Sanity check cie header length. Only skip up to next FDE on
22 finding augmentation data too long.
26 * dwarf.c (read_cie): Add more sanity checks to ensure data
27 pointer is not bumped past end.
31 * dwarf.c (display_debug_ranges): Delete initial_length_size.
32 Correct fallback size calculated on finding a reloc. Constrain
33 data reads to length given in header. Avoid pointer UB.
37 * dwarf.c (display_debug_rnglists_list): Avoid pointer UB.
41 * dwarf.c (display_debug_str_offsets): Constrain reads to length
46 * dwarf.c (display_debug_aranges): Delete initial_length_size.
47 Use end_ranges to constrain data reads to header length. Avoid
52 * dwarf.c (display_loc_list): Avoid pointer UB. Correct check
53 before reading uleb length. Warn on excess length.
57 * dwarf.c (display_debug_macro): Print strings that might not
58 be zero terminated with %*s. Don't bump curr if unterminated.
62 * dwarf.c (get_line_filename_and_dirname): Delete initial_length_size.
63 Simplify length sanity check, and check for too small lengths.
64 Constrain data reads to header length. Avoid pointer UB.
68 * dwarf.c (display_debug_macinfo): Print strings that might not
69 be zero terminated with %*s. Don't bump curr if unterminated.
73 * dwarf.c (display_debug_pubnames_worker): Delete initial_length_size.
74 Simplify length check. Constrain reads to length given by header.
78 * dwarf.c (display_debug_lines_decoded): Don't use strnlen when
79 we have already checked for NUL termination.
83 * dwarf.c (read_debug_line_header): Delete initial_length_size.
84 Avoid pointer UB. Keep within length specified by header.
89 * dwarf.c (process_debug_info): Always do the first CU length
90 scan for sanity checks. Remove initial_length_size var and
91 instead calculate end_cu. Use end_cu to limit data reads.
92 Delete now dead code checking length.
96 * dwarf.c (SAFE_BYTE_GET_INTERNAL): Assert only when ENABLE_CHECKING.
100 * bucomm.h (_mul_overflow): Define.
101 * dwarf.c (get_encoded_value): Avoid pointer UB.
106 * dwarf.c (display_debug_str_offsets): Sanity check dwarf5
112 * dwarf.c (display_debug_frames): Sanity check cie_off before
113 attempting to read cie.
117 * dwarf.c (process_extended_line_op): Don't bump data pointer past
118 end when strnlen doesn't find string terminator.
119 (decode_location_expression): Remove dead code.
120 (skip_attr_bytes): Remove const from end param. Ensure data
121 pointer doesn't pass end.
122 (get_type_signedness): Remove const from end param.
123 (read_and_display_attr_value): Ensure data pointer doesn't pass end.
124 (display_debug_lines_raw, display_debug_lines_decoded): Likewise.
125 (display_debug_pubnames_worker): Likewise.
126 (display_debug_pubnames_worker): Use SAFE_BYTE_GET_AND INC rather
127 than blindly incrementing data pointer.
128 (display_debug_addr, display_debug_str_offsets): Likewise. Don't
129 compare pointers, compare lengths.
133 * dwarf.c (SAFE_BYTE_GET_INTERNAL): Define.
134 (SAFE_BYTE_GET, SAFE_BYTE_GET_AND_INC): Define using the above.
135 (SAFE_SIGNED_BYTE_GET, SAFE_SIGNED_BYTE_GET_AND_INC): Likewise.
136 (display_discr_list): Use SAFE_BYTE_GET_AND_INC rather than
137 SAFE_BYTE_GET followed by increment.
138 (process_debug_info): Likewise, and test bytes remaining before
139 incrementing section_begin rather than using pointer comparison.
140 (display_debug_names): Pass lvalue as SAFE_BYTE_GET PTR.
141 (process_cu_tu_index): Likewise for SAFE_BYTE_GET_AND_INC.
145 * dwarf.c (dwarf_vmatoa64, SAFE_BYTE_GET64, add64): Delete.
146 (skip_attr_bytes): Replace use of SAFE_BYTE_GET64 with
147 SAFE_BYTE_GET_AND_INC.
148 (read_and_display_attr_value): Likewise. Print using dwarf_vmatoa.
149 (process_debug_info, process_cu_tu_index): Likewise.
150 * elfcomm.c (byte_put, byte_put_little_endian, byte_put_big_endian),
151 (byte_get, byte_get_little_endian, byte_get_big_endian),
152 (byte_get_signed): Make size param unsigned. Remove code dealing
154 (byte_get_64): Delete.
155 * elfcomm.h (byte_put, byte_put_little_endian, byte_put_big_endian),
156 (byte_get, byte_get_little_endian, byte_get_big_endian),
157 (byte_get_signed): Update prototypes.
158 (byte_get_64): Delete.
163 * dwarf.c (display_debug_frames): Don't compare pointers derived
164 from user input. Test offset against bounds instead.
169 * dwarf.c (display_formatted_table): Test for data >= end rather
171 (process_extended_line_op): Likewise.
172 (display_debug_lines_raw): Likewise.
173 (display_debug_lines_decoded): Likewise.
178 * dwarf.c (fetch_indexed_string): Correct length sanity checks.
179 Sanity check section size for version and padding too. Correct
180 index sanity check. Handle multiple tables in .debug_str_offsets.
184 * dwarf.c (process_abbrev_set): Properly parenthesize before
185 casting to unsigned long.
190 * dwarf.c (process_abbrev_set): Replace start and end parameters
191 with section, abbrev_base, abbrev_size, abbrev_offset. Update
192 all callers. Sanity check parameters correctly and emit warnings
194 (process_debug_info): ..here.
201 * windres.c (quot): Revert previous delta. Do not use double
202 quotes when spaces are detected in options.
203 * doc/binutils.texi (windres): Remove suggestion that the
204 --preprocessor option can take arguments.
208 * dwarf.c (SAFE_BYTE_GET): Check bounds by subtracting amount from
209 END rather than adding amount to PTR.
210 (SAFE_SIGNED_BYTE_GET, SAFE_BYTE_GET64): Likewise.
214 * objcopy.c (eq_string): Delete.
215 (create_symbol_htab): Use htab_eq_string.
219 * README-how-to-make-a-release: Update html & pdf entries.
223 * doc/Makefile.am (html-local, binutils/index.html): New targets.
224 * doc/Makefile.in: Regenerate.
228 * doc/Makefile.am (AM_MAKEINFOFLAGS): Add --no-split.
229 * doc/Makefile.in: Regenerate.
233 * readelf.c (no_processor_specific_unwind): New function.
234 (process_unwind): Use no_processor_specific_unwind for X86
239 * dwarf.c: Don't omit second operand of '?' operator.
244 * dwarf.c (load_debug_sup_file): Allocate memory for filename in
250 * doc/binutils.texi (windres): Correct the description of the
251 default value of the --preprocessor argument.
256 * dwarf.c (parse_gnu_debuglink): Reject empty names.
257 (parse_gnu_debugaltlink): Likewise.
261 * od-xcoff.c (dump_xcoff32_symbols): Adapt to new
267 * readelf.c (sym_base): New variable.
268 (enum print_mode): Add more modes.
269 (print_vma): Add suport for new modes.
270 (options): Add sym-base.
271 (usage): Add sym-base.
272 (parse_args): Add support for --sym-base.
273 (print_dynamic_symbol_size): New function.
274 (print_dynamic_symbol): Use new function.
275 * doc/binutils.texi: Document the new feature.
276 * NEWS: Mention the new feature.
280 * testsuite/binutils-all/mips/global-local-symtab-sort-n64t.d:
281 Adjust expected output to allow for named section symbols.
282 * testsuite/binutils-all/mips/global-local-symtab-sort-o32t.d:
284 * testsuite/binutils-all/readelf.s-64: Likewise.
285 * testsuite/binutils-all/readelf.ss-64-unused: Likewise.
286 * testsuite/binutils-all/readelf.ss-tmips: Likewise.
287 * testsuite/binutils-all/readelf.ss-unused: Likewise.
291 * readelf.c (print_dynamic_symbol): Print the section name for
292 section symbols without a name of their own.
296 * MAINTAINERS: Remove Martin Schwidefsky as s390 maintainer and
297 add him to Past Maintainers.
298 Update my email address.
303 * arsup.c (ar_addmod): Enable plugin support, if available.
307 * rename.c: (get_stat_atime_ns): Add prototype.
308 (get_stat_mtime_ns): Add prototype.
313 * rename.c (get_stat_atime, get_stat_mtime): Make static.
314 (get_stat_atime_ns, get_stat_mtime_ns): Likewise.
319 * rename.c (get_stat_atime_ns): Add ATTRIBUTE_UNUSED.
320 (get_stat_mtime_ns): Likewise.
325 * configure.ac: Check for sys/time.h and utimensat. Use standard
326 checks for mkstemp and mkdtemp. Whitespace. Check for nanosecond
327 members of struct stat.
328 * rename.c: Prefer sys/time.h for utimes over utime.h for utime.
329 (STAT_TIMESPEC, STAT_TIMESPEC_NS): Define
330 (get_stat_atime_ns, get_stat_mtime_ns): New inline functions.
331 (get_stat_atime, get_stat_mtime): Likewise.
332 (set_times): Choose first available of utimensat, utimes, utime.
333 Use above inline functions to set timespec and timeval values.
334 * configure: Regenerate.
335 * config.in: Regenerate.
336 * testsuite/binutils-all/objcopy.exp (objcopy_test): Add test of
337 file timestamp when --preserve-dates is used.
342 * rename.c (smart_rename): When TO and FROM are equal, just set
344 * objcopy.c (strip_main, copy_main): Always call smart_rename.
349 * testsuite/binutils-all/x86-64/pr27708.dump: New file.
350 * testsuite/binutils-all/x86-64/pr27708.exe.bz2: Likewise.
351 * testsuite/binutils-all/x86-64/x86-64.exp: Run binutils/27708
357 * resbin.c (bin_to_res_version): Ignore any trailing bytes at the
358 end of the structure.
362 * readelf.c (get_netbsd_elfcore_note_type): Remove unneeded #ifdef
363 checks for NT_NETBSDCORE_AUXV and NT_NETBSDCORE_LWPSTATUS.
368 * objdump.c (show_line): Don't limit paths to PATH_MAX.
369 * readelf.c (struct filedata): Change program_interpreter from
370 a char array to a char pointer.
371 (process_program_headers): Sanity check PT_INTERP p_filesz.
372 Malloc program_interpreter using p_filesz and read directly from
374 (process_dynamic_section): Check program_interpreter is non-NULL.
375 (free_filedata): New function, split out from..
376 (process_object): ..here.
377 (close_debug_file): Call free_filedata.
378 * sysdep.h: Don't include sys/param.h.
379 (PATH_MAX): Don't define.
380 * configure.ac: Don't check for sys/param.h.
381 * configure: Regenerate.
385 * readelf.c (process_netbsd_elf_note): Remove now unneeded #ifdef
386 check for NT_NETBSD_PAX.
390 * configure.ac (--enable-checking): Add support.
391 * config.in: Regenerate.
392 * configure: Regenerate.
396 * objdump.c (struct objdump_disasm_info): Delete dynrelbuf and
398 (find_symbol_for_address): Adjust for dynrelbuf and dynrelcount move.
399 (disassemble_section, disassemble_data): Likewise.
403 * objdump.c (objdump_symbol_at_address): Return asymbol*.
407 * NEWS: Mention C99 requirement.
408 * README: Likewise. Modernise examples and "Reporting bugs".
412 * configure.ac: Assume long long is available. Don't test for
413 strings.h, stdlib.h, limits.h, locale.h, or wchar.h. Check
414 inttypes.h, stdint.h, sys/stat.h and sys/types.h. Don't check for
415 strcoll, setlocale, setmode or location of time_t. Don't check
416 for fprintf, getenv, snprintf, strnlen, strstr or vsnprintf decls.
417 (AC_ISC_POSIX, AXC_HEADER_STRING, AC_FUNC_ALLOCA): Don't invoke.
418 * sysdep.h: Don't include alloca-conf.h, include config.h instead.
419 Test HAVE_SYS_TYPES_H and reorder includes. Include limits.h,
420 locale.h, string.h and stdlib.h unconditionally. Remove various
421 fallback declarations. Assume long long is available.
422 * addr2line.c: Don't test HAVE_SETLOCALE.
424 * coffdump.c: Likewise.
425 * dlltool.c: Likewise.
426 * dllwrap.c: Likewise.
427 * elfedit.c: Likewise.
429 * objcopy.c: Likewise.
430 * objdump.c: Likewise.
431 * readelf.c: Likewise.
433 * srconv.c: Likewise.
434 * strings.c: Likewise.
435 * sysdump.c: Likewise.
436 * windmc.c: Likewise.
437 * windres.c: Likewise.
438 * bucomm.c: Don't test HAVE_TIME_T_IN_TIME_H or HAVE_TIME_T_IN_TYPES_H.
439 * dwarf.c: Include limits.h unconditionally. Assume long long
441 * nm.c: Don't test HAVE_STRCOLL.
442 * readelf.c: Don't test HAVE_WCHAR_H.
443 * strings.c: Assume long long is available.
444 * syslex.l: Include string.h unconditionally.
445 * aclocal.m4: Regenerate.
446 * config.in: Regenerate.
447 * configure: Regenerate.
448 * Makefile.in: Regenerate.
449 * doc/Makefile.in: Regenerate.
453 * elfcomm.h (strneq): Remove strneq and use startswith.
454 * readelf.c (ia64_process_unwind): Likewise.
455 (process_note): Likewise.
459 * dllwrap.c: Use startswith function.
460 * objcopy.c (is_dwo_section): Likewise.
461 (handle_remove_section_option): Likewise.
462 (copy_main): Likewise.
463 * objdump.c (is_significant_symbol_name): Likewise.
467 * dwarf.c (display_debug_lines_raw): Replace const_strneq with
469 (display_debug_lines_decoded): Likewise.
470 (display_debug_links): Likewise.
471 * elfcomm.c (setup_archive): Likewise.
472 * elfcomm.h (const_strneq): Likewise.
473 * readelf.c (process_section_headers): Likewise.
474 (slurp_ia64_unwind_table): Likewise.
475 (slurp_hppa_unwind_table): Likewise.
476 (decode_arm_unwind): Likewise.
477 (display_debug_section): Likewise.
478 (process_note): Likewise.
482 * sysdep.h (POISON_BFD_BOOLEAN): Define.
483 * addr2line.c, * ar.c, * arsup.c, * bfdtest2.c, * binemul.c,
484 * binemul.h, * bucomm.c, * bucomm.h, * budbg.h, * coffgrok.c,
485 * debug.c, * debug.h, * dlltool.c, * dwarf.c, * dwarf.h,
486 * elfedit.c, * emul_aix.c, * mclex.c, * nm.c, * objcopy.c,
487 * objdump.c, * od-macho.c, * prdbg.c, * rdcoff.c, * rddbg.c,
488 * readelf.c, * rename.c, * stabs.c, * strings.c, * windint.h,
489 * windmc.c, * windmc.h, * windres.c, * winduni.c,
490 * wrstabs.c: Replace bfd_boolean with bool, FALSE with false,
491 and TRUE with true throughout.
495 * coffdump.c: Include stdint.h in place of bfd_stdint.h.
500 * prdbg.c (pr_function_type): Replace LITSTTCPY with strcpy.
504 * dlltool.c (main): Don't use "boolean_condition ? TRUE : FALSE".
505 * dwarf.c (read_and_display_attr_value): Likewise.
506 (display_debug_str_offsets): Likewise.
507 * objdump.c (dump_bfd): Likewise.
508 * readelf.c (dump_section_as_strings): Likewise.
509 (dump_section_as_bytes): Likewise.
513 * objdump.c (process_links): Use type int.
514 * readelf.c (request_dump): Don't increment do_dump, set it.
515 * windint.h (target_is_bigendian): Use type bfd_boolean.
516 * windmc.c (target_is_bigendian): Likewise.
517 * windres.c (target_is_bigendian): Likewise.
521 * dlltool.c (scan_drectve_symbols): Replace usage of CONST_STRNEQ
523 * emul_aix.c (ar_emul_aix_parse_arg): Likewise.
524 * objcopy.c (is_mergeable_note_section): Likewise.
525 * objdump.c (dump_dwarf_section): Likewise.
526 * prdbg.c (pr_method_type): Likewise.
527 (pr_class_baseclass): Likewise.
528 (tg_class_baseclass): Likewise.
529 * readelf.c (process_lto_symbol_tables): Likewise.
530 * stabs.c (ULLHIGH): Likewise.
531 (parse_stab_argtypes): Likewise.
532 (stab_demangle_function_name): Likewise.
536 * readelf.c (get_machine_name): Add EM_INTELGT.
541 * readelf.c (dump_section_as_strings): Mention separate filename.
542 (dump_section_as_bytes): Likewise.
543 (dump_section_as_ctf): Likewise.
544 (initialise_dumkps_byname): Only issue a warning for missing
545 sections if processing the main file.
546 (process_section_contents): Only issue a warning for unsumped
547 section numbers in the main file.
548 (initialise_dump_sects): New function. Contains code extracted
550 (process_object): ... here. Also call initialise_dump_sects for
556 * readelf.c (display_debug_section): Also retain .debug_addr
562 * readelf.c (process_section_contents): Only dump debug
563 information for separate files unless process_links is enabled.
564 (process_object): Always call process_section_contents for
570 * nm.c (FORMAT_JUST_SYMBOLS): Define.
571 (struct optput_fns): Add entry for FORMAT_JUST_SYMBOLS.
572 (long_options): Add just-symbols.
573 (set_output_format): Add support for just-symbols.
574 (get_print_format): Likewise.
575 (do_not_print_object_filename): New function.
576 (do_not_print_archive_filename): New function.
577 (do_not_print_archive_member): New function.
578 (do_not_print_symbol_filename): New function.
579 (just_print_symbol_name): New function.
580 (main): Handle --just-symbols.
581 * NEWS: Mention the new feature.
582 * doc/binutils.texi: Document the new feature.
586 * od-xcoff.c: Replace RTB by TRL entry.
591 * readelf.c (get_note_type): Handle NT_RISCV_CSR.
596 * readelf.c (get_note_type): Handle NT_GDB_TDESC.
601 * dwarf.c (display_debug_macro): Handle the displaying of
602 DW_MACRO_define_strp and DW_MACRO_undef_strp in v4
603 .debug_macro.dwo sections.
608 * objdump.c (process_links): New variable.
609 (usage): Add --process-links.
610 (long_options): Likewise.
611 (dump_bfd): Stop processing once the bfd has been loaded unless
612 this is the main file or process_links has been enabled.
613 (main): Handle the process-links option.
614 * readelf.c (process_links): New variable.
615 (struct filedata): Add is_separate field.
616 (options): Add --process-links.
618 (parse_args): Likewise.
619 (process_file_header): Include the filename when dumping
620 information for separate debuginfo files.
621 (process_program_headers): Likewise.
622 (process_section_headers): Likewise.
623 (process_section_groups): Likewise.
624 (process_relocs): Likewise.
625 (process_dynamic_section): Likewise.
626 (process_version_sections): Likewise.
627 (display_lto_symtab): Likewise.
628 (process_symbol_table): Likewise.
629 (process_syminfo): Likewise.
630 (initialise_dumps_by_name): Likewise.
631 (process_section_contents): Likewise.
632 (process_notes_at): Likewise.
633 (process_notes): Likewise.
634 (open_file): Add is_separate parameter. Use to initialise the
635 is_separate field in the filedata structure.
636 (open_deug): Update call to open_file.
637 (process_object): Add processing of the contents of separate
638 debuginfo files, gated by the process_links variable.
639 (process_archive): Update call to open_file.
640 (process_file): Initialise the is_separate field in the filedata
642 * dwarf.c (load_separate_debug_info_file): Only report the
643 loading of a separate file if debug links are being dumped.
644 * objcopy.c (keep_section_symbols): New variable.
645 (enum command_line_switch): Add OPTION_KEEP_SYMBOLS.
646 (strip_options): Add keep-section-symbols.
647 (copy_options): Likewise.
648 (copy_usage): Likewise.
649 (strip_usage): Likewise.
650 (copy_object): Keep section symbols if requested by command line
652 (strip_main): Handle --keep-section-symbols.
653 (copy_main): Likewise.
654 * doc/binutils.texi: Document the new options.
655 * NEWS: Mention the new features.
656 * testsuite/binutils-all/compress.exp (test_gnu_debuglink):
657 Update options passed to objdump. Use diff rather than cmp to
658 compare the dumped data.
659 * testsuite/binutils-all/objdump.WK2: Update regexp.
660 * testsuite/binutils-all/objdump.WK3: Update regexp.
661 * testsuite/binutils-all/objdump.exp: Use --process-links
662 instead of --dwarf=follow-links.
663 * testsuite/binutils-all/readelf.exp (readelf_test): Include
664 readelf's output in the log when the test fails.
665 Add the -P option to the -wKis test.
666 * testsuite/binutils-all/readelf.wKis: Update expected output.
671 * objcopy.c (filter_symbols): Apply --weaken to undefined symbols.
672 * NEWS: Mention feature.
677 * dwarf.c (load_separate_debug_info): Issue warning only if
678 do_debug_links is set.
679 * testsuite/binutils-all/compress.exp: Run objdump and readelf
680 with missing debug file.
685 * doc/binutils.texi: Add nm --with-symbol-versions and
686 --without-symbol-versions documentation.
687 * nm.c (with_symbol_versions): New variable.
688 (enum long_option_values): Delete OPTION_WITH_SYMBOL_VERSIONS.
689 (long_options): Make --with-symbol-versions entry twiddle the flag.
690 Add --without-symbol-versions.
691 (print_symname): Strip version when !with_symbol_versions. Add
692 dynamic version info under control of with_symbol_versions.
693 (main): Remove OPTION_WITH_SYMBOL_VERSIONS case.
698 * readelf.c (quiet): New option flag.
699 (enum long_option_values): New enum to hold long option value.
700 (long_options): Add --quiet.
701 (usage): Mention --quiet.
702 (display_rel_file): If quiet is enabled, suppress "no symbols".
703 (main): Handle the new option.
704 * NEWS: Mention --quiet.
705 * docs/binutils.texi: Document --quiet.
709 * dwarf.c (display_debug_addr): Handle dwarf-5 .debug_addr bits.
714 * dwarf.c: (skip_attr_bytes): Add support for DW_FORM_str* and
716 (read_and_display_attr_value): Likewise.
720 * dwarf.c (get_type_abbrev_from_form): Accept but ignore sup
722 (read_and_display_attr_value): Handle sup forms.
723 (display_debug_sup): New function. Displays the contents of a
725 (load_debug_sup_file): New function. Loads the contents of a file
726 referenced by a .debug_sup section.
727 (check_for_and_load_links): Call load_debug_sup_file.
728 (debug_displays): Add entry for .debug_sup.
729 * dwarf.h (enum dwarf_section_display_enum): Add debug_sup.
730 * readelf.c (process_section_headers): Add support for debug_sup.
731 * doc/debug.options.texi: Note that the =links option will display
732 the contents of .debug_sup sections.
733 * NEWS: Mention the new support.
738 * rename.c (simple_copy): Mark target_stat ATTRIBUTE_UNUSED.
743 * od-elf32_avr.c (elf32_avr_get_memory_usage): Check for overflows
744 when adding together the section sizes.
748 * objcopy.c (merge_gnu_build_notes): Remove support for v1/v2 GNU
750 * readelf.c (print_gnu_build_attribute_description): Likewise.
756 * bucomm.h (smart_rename): Update prototype.
757 * rename.c (smart_rename): Add fromfd and preserve_dates params.
758 Pass fromfd and target_stat to simple_copy. Call set_times
760 (simple_copy): Accept fromfd rather than from filename. Add
761 target_stat param. Rewind fromfd rather than opening. Open
762 "to" file without O_CREAT. Try to preserve S_ISUID and S_ISGID.
763 * ar.c (write_archive): Rename ofd to tmpfd. Dup tmpfd before
764 closing output temp file, and pass tmpfd to smart_rename.
765 * arsup.c (temp_fd): Rename from real_fd.
766 (ar_save): Dup temp_fd and pass to smart_rename.
767 * objcopy.c (strip_main, copy_main): Likewise, and pass
773 * rename.c: Tidy throughout.
774 (smart_rename): Always copy. Remove windows specific code.
778 * testsuite/lib/binutils-common.exp: Whitespace fixes throughout.
779 (run_dump_test): Fail if expecting errors from a file like we do
780 for error strings, if no error is seen.
784 * testsuite/binutils-all/readelf.exp (pr26548): Run for 32-bit too.
788 * ar.c (write_archive): Remove TARGET_STAT. Adjust call to
790 * arsup.c (ar_save): Likewise.
791 * objcopy (strip_main): Don't copy TMPFD. Don't set times on
792 temporary file and adjust call to SMART_RENAME.
793 (copy_main): Likewise.
794 * rename.c [!S_ISLNK]: Remove definitions.
795 (try_preserve_permissions): Remove function.
796 (smart_rename): Remove FD, PRESERVE_DATES arguments. Use
797 rename system call only if TO does not exist.
798 * bucomm.h (smart_rename): Adjust declaration.
802 * objcopy.c (merge_gnu_build_notes): Handle notes with a start
803 address that is higher than the end address.
807 * dwarf.c: Include limits.h.
808 (CHAR_BIT): Provide backup define.
809 (read_leb128): Use CHAR_BIT to size "result" in bits. Correct
810 signed overflow checking.
811 * testsuite/binutils-all/pr26548.s,
812 * testsuite/binutils-all/pr26548.d,
813 * testsuite/binutils-all/pr26548e.d: New tests.
814 * testsuite/binutils-all/readelf.exp: Run them.
815 (readelf_test): Drop unused "xfails" parameter. Update all uses.
819 * dwarf.c (process_debug_info): Initialize "dwo_id".
823 * objdump.c (load_specific_debug_section): Don't call
824 bfd_cache_section_contents. Rearrange so that
825 bfd_get_full_section_contents is not called on path where
826 bfd_simple_get_relocated_section_contents is called.
827 Don't set section->user_data.
828 (free_debug_section): Always free section->start. Don't twiddle
830 * readelf.c (load_specific_debug_section): Don't set user_data.
831 * dwarf.h (struct dwarf_section): Remove use_data field.
832 * dwarf.c (NO_ABBREVS, ABBREV): Adjust to suit.
836 * testsuite/binutils-all/compress.exp: Remove nds32 xfails.
837 * testsuite/binutils-all/objdump.exp: Likewise.
841 * objdump.c (slurp_symtab): Don't add an extra entry for NULL
843 (slurp_dynamic_symtab): Likewise.
844 (dump_bfd): Formatting. Copy terminating NULL from extra_syms.
848 * Makefile.in: Regenerate.
849 * doc/Makefile.in: Regenerate.
853 * aclocal.m4: Regenerate.
857 * configure.ac (follow-debug-links): Add option to enable or
858 disable the following of debug links by default. Set the
859 default for the option to be 'follow'.
860 * dwarf.c (do_follow_links): Initialise with DEFAULT_FOR_FOLLOW_LINKS.
861 (dwarf_select_sections_by_names): Add no-follow-links option.
862 (dwarf_select_sections_by_letter): Add 'N' option.
863 * objdump.c (usage): Add conditional text describing the
865 (slurp_symtab): Ensure that there is a NULL entry at the end
867 (slurp_dynamic_symtab): Likewise.
868 (dump_bfd): When extending the symbol table, ensure that there
869 is still a NULL entry at the end.
870 * readelf.c (usage): Add conditional text describing the
872 * doc/binutils.texi: Update documentation for objcopy and
874 * doc/debug.options.texi: Update documentation of the
876 * config.in: Regenerate.
877 * configure: Regenerate.
878 * testsuite/binutils-all/compress.exp: Add the -WN option to
879 objdump command lines that are not expecting to follow links.
880 * testsuite/binutils-all/readelf.exp: Add the
881 --debug-dump=no-follow-links option to tests that are not
882 expecting to follow debug links.
883 * NEWS: Mention the new behaviour.
887 * testsuite/binutils-all/objcopy.exp: Report "unsupported" when
888 gas or ld fails to build a testcase rather than "unresolved".
889 Report "fail" when readelf returns an error status rather than
891 * testsuite/binutils-all/ar.exp: Likewise.
892 * testsuite/binutils-all/compress.exp: Likewise.
893 * testsuite/binutils-all/readelf.exp: Likewise.
897 * testsuite/binutils-all/pr25662.s: Replace "a" with "aaa" and
898 "c" with "ccc" labels.
902 * dwarf.h (debug_info): Fix typo in comment.
906 * dwarf.c (display_debug_str_offsets): Handle multiple sets of
911 * dwarf.c (process_debug_info): Print DWO ID.
918 * od-elf32_avr.c (elf32_avr_get_note_section_contents): Formatting.
919 Use bfd_malloc_and_get_section.
920 (elf32_avr_get_note_desc): Formatting. Return descsz. Sanity
921 check namesz. Return NULL if descsz is too small. Ensure
922 string table is terminated.
923 (elf32_avr_get_device_info): Formatting. Add note_size param.
925 (elf32_avr_dump_mem_usage): Adjust to suit.
930 * dwarf.c (load_dwo_file): Handle case that name is absolute path.
935 * dwarf.c (display_debug_ranges): Filter range lists according to
941 * dwarf.c (get_type_abbrev_from_form): Handle DW_FORM_ref_sig8.
946 * dwarf.c (process_debug_info): Handling DW_UT_skeleton and
951 * testsuite/lib/binutils-common.exp (supports_gnu_osabi): Remove
956 * unwind-ia64.c (unw_print_xyreg): Don't leave output buffer
957 uninitialised on invalid input.
962 * rename.c (smart_rename): Test for existence and type of output
967 * MAINTAINERS: Remove Richard Henderson as the ALPHA maintainer.
972 * elfedit.c (check_file):
973 * bucomm.c (get_file_size): Fix typos in comments.
978 * arsup.c (ar_save): Use stat rather than lstat.
985 * ar.c: Don't include libbfd.h.
986 (write_archive): Replace xmalloc+strcpy with xstrdup. Use
987 bfd_stat rather than fstat on iostream. Move stat and fd tests
988 outside of _WIN32 ifdef. Delete skip_stat variable.
989 * arsup.c (temp_name, real_ofd): New static variables.
990 (ar_open): Use make_tempname and bfd_fdopenw.
991 (ar_save): Adjust to suit ar_open changes. Move stat output
993 * objcopy.c: Don't include libbfd.h.
994 (copy_file): Use bfd_stat.
999 * readelf.c (process_section_headers): Add 'R' and 'D' to
1001 * testsuite/binutils-all/retain1a.d: Updated.
1005 * README-how-to-make-a-release: Small updates after the 2.35.2
1011 * windres.c (quot): Use double quotes to protect strings on
1017 * bucomm.c (get_file_size): Add code to handle /dev/null on
1019 * elfedit.c (check_file): Likewise.
1023 * objcopy.c (copy_main): Remove conditional control of the calls
1024 to free, simplifying the code and making it easier to detect
1029 * objcopy.c (copy_main): Fix a double free happening when both
1030 --localize-symbols and --globalize-symbols options are invoked
1035 * README-how-to-make-a-release: Minor updates after the 2.36 release.
1039 * readelf.c (uncompress_section_contents): Tidy inflateEnd result test.
1044 * readelf.c (uncompress_section_contents): Always call inflateEnd.
1048 * MAINTAINERS: Update my email address.
1052 * po/sv.po: Updated Swedish translation.
1056 * Makefile.in: Regenerate.
1057 * doc/Makefile.in: Regenerate.
1062 * dlltool.c (i386_trampoline): Adjust %rsp immediately on entry
1064 (i386_x64_trampoline): Add SEH annotations.
1065 (struct mac): Add how_seh field.
1066 (make_delay_head): If how_set field is true add SEh instructions.
1071 * configure.ac: Use GNU_MAKE_JOBSERVER.
1072 * aclocal.m4: Regenerated.
1073 * configure: Likewise.
1077 * po/fr.po: Updated French translation.
1082 * configure: Regenerated.
1086 * po/pt.po: Updated Portuguese translation.
1087 * po/sr.po: Updated Serbian translation.
1088 * po/uk.po: Updated Ukranian translation.
1092 * configure: Regenerated.
1096 * configure: Regenerate.
1097 * po/binutils.pot: Regenerate.
1101 * 2.36 release branch crated.
1102 * README-how-to-make-a-release: Add note about updating Makefiles
1104 * BRANCHES: Add binutils-2.36-branch.
1108 * configure: Regenerate.
1112 * configure: Regenerate.
1117 * objcopy.c (copy_object): Handle section symbols for
1118 non-relocatable inputs.
1119 * testsuite/binutils-all/readelf.exp (readelf_test): Check
1120 is_elf_unused_section_symbols.
1121 * testsuite/binutils-all/readelf.s-64: Updated.
1122 * testsuite/binutils-all/readelf.ss: Likewise.
1123 * testsuite/binutils-all/readelf.ss-64: Likewise.
1124 * testsuite/binutils-all/readelf.s-64-unused: New file.
1125 * testsuite/binutils-all/readelf.ss-64-unused: Likewise.
1126 * testsuite/binutils-all/readelf.ss-unused: Likewise.
1127 * testsuite/lib/binutils-common.exp
1128 (is_elf_unused_section_symbols): New proc.
1132 * binutils/readelf.c: Correct grammar in comment.
1136 * coffgrok.c (do_type): Correct spelling of auxiliary in errors.
1137 * doc/binutils.texi: Correct grammar.
1138 * readelf.c (process_version_sections): Correct spelling of auxiliary
1140 * testsuite/binutils-all/vax/objdump.exp: Comment grammar fix.
1144 Update year range in copyright notice of all files.
1146 For older changes see ChangeLog-2020
1148 Copyright (C) 2021 Free Software Foundation, Inc.
1150 Copying and distribution of this file, with or without modification,
1151 are permitted in any medium without royalty provided the copyright
1152 notice and this notice are preserved.
1158 version-control: never