aboutsummaryrefslogtreecommitdiff
path: root/binutils
AgeCommit message (Collapse)AuthorFilesLines
2021-03-01Warn for missing separate debug files only if neededH.J. Lu3-23/+54
We shouldn't warn missing separate debug files when debug info isn't needed. PR binutils/27486 * dwarf.c (load_separate_debug_info): Issue warning only if do_debug_links is set. * testsuite/binutils-all/compress.exp: Run objdump and readelf with missing debug file.
2021-03-01PR27128, nm -P portable output format regressionAlan Modra3-8/+39
Add nm --without-symbol-versions. binutils/ PR 27128 * doc/binutils.texi: Add nm --with-symbol-versions and --without-symbol-versions documentation. * nm.c (with_symbol_versions): New variable. (enum long_option_values): Delete OPTION_WITH_SYMBOL_VERSIONS. (long_options): Make --with-symbol-versions entry twiddle the flag. Add --without-symbol-versions. (print_symname): Strip version when !with_symbol_versions. Add dynamic version info under control of with_symbol_versions. (main): Remove OPTION_WITH_SYMBOL_VERSIONS case. ld/ * testsuite/ld-elf/pr25708.d: Add --with-symbol-versions to nm. * testsuite/ld-elf/pr27128a.d: Likewise. * testsuite/ld-elf/pr27128b.d: Likewise. * testsuite/ld-elf/pr27128c.d: Likewise. * testsuite/ld-elf/pr27128d.d: Likewise. * testsuite/ld-elf/pr27128e.d: Likewise.
2021-02-26nm: Add --quiet to suppress "no symbols" diagnosticFangrui Song4-4/+34
PR binutils/27408 * readelf.c (quiet): New option flag. (enum long_option_values): New enum to hold long option value. (long_options): Add --quiet. (usage): Mention --quiet. (display_rel_file): If quiet is enabled, suppress "no symbols". (main): Handle the new option. * NEWS: Mention --quiet. * docs/binutils.texi: Document --quiet.
2021-02-26Add support for decoding DWARF v5 DW_AT_addr_base tags.Tom de Vries2-3/+40
* dwarf.c (display_debug_addr): Handle dwarf-5 .debug_addr bits.
2021-02-26Add support for the split DWARF forms.Tom de Vries2-2/+68
PR 27390 * dwarf.c: (skip_attr_bytes): Add support for DW_FORM_str* and DW_FORM_addrx*. (read_and_display_attr_value): Likewise.
2021-02-25Add initial support for .debug_sup sections.Nick Clifton6-9/+176
* dwarf.c (get_type_abbrev_from_form): Accept but ignore sup forms. (read_and_display_attr_value): Handle sup forms. (display_debug_sup): New function. Displays the contents of a .debug_sup section. (load_debug_sup_file): New function. Loads the contents of a file referenced by a .debug_sup section. (check_for_and_load_links): Call load_debug_sup_file. (debug_displays): Add entry for .debug_sup. * dwarf.h (enum dwarf_section_display_enum): Add debug_sup. * readelf.c (process_section_headers): Add support for debug_sup. * doc/debug.options.texi: Note that the =links option will display the contents of .debug_sup sections. * NEWS: Mention the new support.
2021-02-25Re: Use make_tempname file descriptor in smart_renameAlan Modra2-1/+7
PR 27456 * rename.c (simple_copy): Mark target_stat ATTRIBUTE_UNUSED.
2021-02-24Fix a potential integer overflow when adding together section sizes for the ↵Nick Clifton2-9/+58
AVR port of objdump. PR 27285 * od-elf32_avr.c (elf32_avr_get_memory_usage): Check for overflows when adding together the section sizes.
2021-02-24Remove support for old v1 & v2 style GNU build notes.Nick Clifton3-28/+10
* objcopy.c (merge_gnu_build_notes): Remove support for v1/v2 GNU build notes. * readelf.c (print_gnu_build_attribute_description): Likewise.
2021-02-24Use make_tempname file descriptor in smart_renameAlan Modra6-35/+83
This patch makes use of the temp file descriptor in smart_rename rather than reopening the file. I don't believe there is a security issue in reopening the file, but this way is one less directory operation. The patch also attempts to preserve S_ISUID and S_ISGID. PR 27456 * bucomm.h (smart_rename): Update prototype. * rename.c (smart_rename): Add fromfd and preserve_dates params. Pass fromfd and target_stat to simple_copy. Call set_times when preserve_dates. (simple_copy): Accept fromfd rather than from filename. Add target_stat param. Rewind fromfd rather than opening. Open "to" file without O_CREAT. Try to preserve S_ISUID and S_ISGID. * ar.c (write_archive): Rename ofd to tmpfd. Dup tmpfd before closing output temp file, and pass tmpfd to smart_rename. * arsup.c (temp_fd): Rename from real_fd. (ar_save): Dup temp_fd and pass to smart_rename. * objcopy.c (strip_main, copy_main): Likewise, and pass preserve_dates.
2021-02-24PR27456, lstat in rename.c on MinGWAlan Modra2-76/+41
PR 27456 * rename.c: Tidy throughout. (smart_rename): Always copy. Remove windows specific code.
2021-02-20readelf: Replace procesor with processorH.J. Lu1-1/+1
binutils/ PR binutils/27445 * readelf.c (print_gnu_property_note): Replace procesor with processor. ld/ PR binutils/27445 * testsuite/ld-i386/property-x86-isa1.d: Replace procesor with processor. * testsuite/ld-x86-64/property-x86-isa1-x32.d: Likewise. * testsuite/ld-x86-64/property-x86-isa1.d: Likewise.
2021-02-20Fail run_dump_test when an error is expected but not seenAlan Modra2-343/+349
* testsuite/lib/binutils-common.exp: Whitespace fixes throughout. (run_dump_test): Fail if expecting errors from a file like we do for error strings, if no error is seen.
2021-02-19pr26548 testAlan Modra2-1/+5
I forgot that .sleb128 handles bignums, so this test should run fine for 32-bit targets on 32-bit hosts. * testsuite/binutils-all/readelf.exp (pr26548): Run for 32-bit too.
2021-02-19binutils: Avoid renaming over existing filesSiddhesh Poyarekar6-142/+33
Renaming over existing files needs additional care to restore permissions and ownership, which may not always succeed. Additionally, other properties of the file such as extended attributes may be lost, making the operation flaky. For predictable results, resort to rename() only if the file does not exist, otherwise copy the file contents into the existing file. This ensures that no additional tricks are needed to retain file properties. This also allows dropping of the redundant set_times on the tmpfile in objcopy/strip since now we no longer rename over existing files. binutils/ * ar.c (write_archive): Remove TARGET_STAT. Adjust call to SMART_RENAME. * arsup.c (ar_save): Likewise. * objcopy (strip_main): Don't copy TMPFD. Don't set times on temporary file and adjust call to SMART_RENAME. (copy_main): Likewise. * rename.c [!S_ISLNK]: Remove definitions. (try_preserve_permissions): Remove function. (smart_rename): Remove FD, PRESERVE_DATES arguments. Use rename system call only if TO does not exist. * bucomm.h (smart_rename): Adjust declaration.
2021-02-18Fix a problem merging empty annobin notes on ppc64le targets.Nick Clifton2-0/+10
* objcopy.c (merge_gnu_build_notes): Handle notes with a start address that is higher than the end address.
2021-02-17read_leb128 overflow checkingAlan Modra6-43/+129
There is a tiny error left in dwarf.c:read_leb128 after Nick fixed the signed overflow problem in code I wrote. It's to do with sleb128 values that have unnecessary excess bytes. For example, -1 is represented as 0x7f, the most efficient encoding, but also as 0xff,0x7f or 0xff,0xff,0x7f and so on. None of these sequences overflow any size signed value, but read_leb128 will report an overflow given enough excess bytes. This patch fixes that problem, and since the proper test for signed values with excess bytes can easily be adapted to also test a sleb byte with just some bits that overflow the result, I changed the code to not use signed right shifts. (The C standard ISO/IEC 9899:1999 6.5.7 says signed right shifts of negative values have an implementation defined value. A long time ago I even used a C compiler for a certain microprocessor that always did unsigned right shifts. Mind you, it is very unlikely to be compiling binutils with such a compiler.) bfd/ * wasm-module.c: Guard include of limits.h. (CHAR_BIT): Provide backup define. (wasm_read_leb128): Use CHAR_BIT to size "result" in bits. Correct signed overflow checking. opcodes/ * wasm32-dis.c: Include limits.h. (CHAR_BIT): Provide backup define. (wasm_read_leb128): Use CHAR_BIT to size "result" in bits. Correct signed overflow checking. binutils/ * dwarf.c: Include limits.h. (CHAR_BIT): Provide backup define. (read_leb128): Use CHAR_BIT to size "result" in bits. Correct signed overflow checking. * testsuite/binutils-all/pr26548.s, * testsuite/binutils-all/pr26548.d, * testsuite/binutils-all/pr26548e.d: New tests. * testsuite/binutils-all/readelf.exp: Run them. (readelf_test): Drop unused "xfails" parameter. Update all uses.
2021-02-16Dwarf: fix build with old gccJan Beulich2-1/+5
4.3-ish warns about a possibly uninitialized variable, which results in a build failure due to -Werror.
2021-02-15objdump: don't cache section contents in load_specific_debug_sectionAlan Modra5-61/+44
* objdump.c (load_specific_debug_section): Don't call bfd_cache_section_contents. Rearrange so that bfd_get_full_section_contents is not called on path where bfd_simple_get_relocated_section_contents is called. Don't set section->user_data. (free_debug_section): Always free section->start. Don't twiddle section flags. * readelf.c (load_specific_debug_section): Don't set user_data. * dwarf.h (struct dwarf_section): Remove use_data field. * dwarf.c (NO_ABBREVS, ABBREV): Adjust to suit.
2021-02-15nds32_elf_get_relocated_section_contentsAlan Modra3-5/+6
nds32_elf_get_relocated_section_contents uses nds32_get_section_contents to read sections contents, but nds32_get_section_contents has the wrong behaviour as it calls bfd_malloc_and_get_section. That function always mallocs its output buffer, whereas get_relocated_section_contents must support an already allocated buffer. bfd/ * elf32-nds32.c (nds32_get_section_contents): Replace bfd_malloc_and_get_section with bfd_get_full_section_contents. (nds32_elf_relax_delete_blanks): Init contents. (nds32_elf_relax_section, nds32_relax_fp_as_gp): Likewise. binutils/ * testsuite/binutils-all/compress.exp: Remove nds32 xfails. * testsuite/binutils-all/objdump.exp: Likewise.
2021-02-14objdump: don't add an extra entry to syms arrayAlan Modra2-28/+32
Space for a NULL is there in every backend bfd_get_symtab_upper_bound or bfd_get_dynamic_symtab_upper_bound when the symbol count is non-zero, and placed as a terminator by bfd_canonicalize_symtab. Many backends even return a single NULL entry array for zero symbol count, and while there are a few that return a NULL array for no symbols, that case is handled fine in objdump. So don't have objdump add yet another NULL entry. * objdump.c (slurp_symtab): Don't add an extra entry for NULL to the symbol array. (slurp_dynamic_symtab): Likewise. (dump_bfd): Formatting. Copy terminating NULL from extra_syms.
2021-02-14Regen for binutils/aclocal.m4 changeAlan Modra3-2/+9
* Makefile.in: Regenerate. * doc/Makefile.in: Regenerate.
2021-02-13config/debuginfod: do not include pkg.m4 directlyMike Frysinger2-0/+5
Any code using AC_DEBUGINFOD from this dir is using -I../config when running aclocal, so an explicit include on pkg.m4 is unnecessary: aclocal will find the pkg.m4 in this dir just as easily. This is seen in the only two dirs that use AC_DEBUGINFOD (binutils & gdb) as their aclocal.m4 already has m4_include on config m4 files. The include as written only works if aclocal is run on a dir that is at the same level of config/. Any other depth will fail. ./ |-- config/ |-- binutils/ # works |-- gdb/ # works `-- sim/ # works `-- <port>/ # fails It fails even if AC_DEBUGINFOD itself isn't used: sim/bfin/ $ aclocal -I../../config aclocal-1.15: error: ../../config/debuginfod.m4:8: file '../config/pkg.m4' does not exist
2021-02-12Change the readelf and objdump programs so that they will automatically ↵Nick Clifton13-43/+168
follow links to separate debug info files. * configure.ac (follow-debug-links): Add option to enable or disable the following of debug links by default. Set the default for the option to be 'follow'. * dwarf.c (do_follow_links): Initialise with DEFAULT_FOR_FOLLOW_LINKS. (dwarf_select_sections_by_names): Add no-follow-links option. (dwarf_select_sections_by_letter): Add 'N' option. * objdump.c (usage): Add conditional text describing the follow links option. (slurp_symtab): Ensure that there is a NULL entry at the end of the symbol table. (slurp_dynamic_symtab): Likewise. (dump_bfd): When extending the symbol table, ensure that there is still a NULL entry at the end. * readelf.c (usage): Add conditional text describing the follow links option. * doc/binutils.texi: Update documentation for objcopy and readelf. * doc/debug.options.texi: Update documentation of the follow-links option. * config.in: Regenerate. * configure: Regenerate. * testsuite/binutils-all/compress.exp: Add the -WN option to objdump command lines that are not expecting to follow links. * testsuite/binutils-all/readelf.exp: Add the --debug-dump=no-follow-links option to tests that are not expecting to follow debug links. gas * testsuite/gas/mach-o/sections-1.d: Stop automatic debug link following. * testsuite/gas/xgate/insns-dwarf2.d: Likewise. ld * testsuite/ld-elf/sec64k.exp: Stop readelf from automatically following debug links.
2021-02-12binutils testsuite: replace unresolved with unsupportedAlan Modra5-40/+50
You'd think "unresolved" would be correct for an objcopy test when the assembler refuses to assemble one of our source files. After all, the test of objcopy hasn't been run. However, "unresolved" results in runtest returning with an error status. If instead we report "unsupported", runtest returns success. Which is a little less confusing to a user who doesn't see any errors reported unless they look in log files. * testsuite/binutils-all/objcopy.exp: Report "unsupported" when gas or ld fails to build a testcase rather than "unresolved". Report "fail" when readelf returns an error status rather than "unresolved". * testsuite/binutils-all/ar.exp: Likewise. * testsuite/binutils-all/compress.exp: Likewise. * testsuite/binutils-all/readelf.exp: Likewise.
2021-02-12binutils test pr25662: don't use single character labelsAlan Modra2-2/+7
This fixes the test for z80, which predefine register symbols "a" and "c" among others. * testsuite/binutils-all/pr25662.s: Replace "a" with "aaa" and "c" with "ccc" labels.
2021-02-12[binutils] Fix typo in comment in dwarf.hTom de Vries2-1/+5
Fix typo DW_AT_GNU_FORM_addr_index -> DW_FORM_GNU_addr_index. binutils/ChangeLog: 2021-02-12 Tom de Vries <tdevries@suse.de> * dwarf.h (debug_info): Fix typo in comment.
2021-02-12[binutils] Fix printing of .debug_str_offsetsTom de Vries2-1/+14
With exec: ... $ clang -gdwarf-5 ./src/gdb/testsuite/gdb.dwarf2/fission-mix*.c ... we have: ... $ readelf -w a.out ... Contents of the .debug_str_offsets section: Length: 0x24 Version: 0x5 Index Offset [String] 0 1d0 clang version 10.0.1 1 1e6 src/gdb/testsuite/gdb.dwarf2/fission-mix-2.c 2 213 /home/vries/gdb_versions/devel 3 232 bar 4 236 x 5 61 int 6 238 s 7 23a func2 8 2c ild/BUILD/glibc-2.26/csu 9 5 sdeps/x86_64/start.S 10 1d0 clang version 10.0.1 11 240 src/gdb/testsuite/gdb.dwarf2/fission-mix.c 12 213 /home/vries/gdb_versions/devel 13 26b foo 14 236 x 15 61 int 16 238 s 17 26f func 18 274 main 19 279 arg ... The section consists of two parts, one for each CU, each with a header, but the printing only reads the first header as a header, and prints the second header as: ... 8 2c ild/BUILD/glibc-2.26/csu 9 5 sdeps/x86_64/start.S ... Fix this in display_debug_str_offsets such that we have: ... 6 238 s 7 23a func2 Length: 0x2c Version: 0x5 Index Offset [String] 0 1d0 clang version 10.0.1 1 240 src/gdb/testsuite/gdb.dwarf2/fission-mix.c ... binutils/ChangeLog: 2021-02-12 Tom de Vries <tdevries@suse.de> * dwarf.c (display_debug_str_offsets): Handle multiple sets of entries.
2021-02-12[binutils] Print DWO IDTom de Vries2-1/+9
With exec: ... $ gcc -gsplit-dwarf ~/hello.c -gdwarf-5 ... a dwarf-5 DW_UT_skeleton CU is generated, but the corresponding DWO ID is not printed by readelf -wi. Add this, such that we have: .... Compilation Unit @ offset 0xc7: Length: 0x31 (32-bit) Version: 5 Unit Type: DW_UT_skeleton (4) Abbrev Offset: 0x64 Pointer Size: 8 + DWO ID: 0x4756ae3ac4348f21 <0><db>: Abbrev Number: 1 (DW_TAG_skeleton_unit) ... binutils/ChangeLog: 2021-02-12 Tom de Vries <tdevries@suse.de> * dwarf.c (process_debug_info): Print DWO ID.
2021-02-11PR27290, PR27293, PR27295, various avr objdump fixesAlan Modra2-24/+56
Adds missing sanity checks for avr device info note, to avoid potential buffer overflows. Uses bfd_malloc_and_get_section for sanity checking section size. PR 27290 PR 27293 PR 27295 * od-elf32_avr.c (elf32_avr_get_note_section_contents): Formatting. Use bfd_malloc_and_get_section. (elf32_avr_get_note_desc): Formatting. Return descsz. Sanity check namesz. Return NULL if descsz is too small. Ensure string table is terminated. (elf32_avr_get_device_info): Formatting. Add note_size param. Sanity check note. (elf32_avr_dump_mem_usage): Adjust to suit.
2021-02-10[binutils] Handle absolute DW_AT_dwo_nameTom de Vries2-2/+10
With an exec: ... $ pwd /home/vries/tmp $ gcc /home/vries/tmp/src/hello.c -gsplit-dwarf -c \ -o /home/vries/tmp/obj/hello.o ... I get: ... $ readelf -w obj/hello.o > READELF readelf: Warning: Unable to load dwo file: \ /home/vries/tmp//home/vries/tmp/obj/hello.dwo ... The dwo file name is listed here: ... <20> DW_AT_GNU_dwo_name: /home/vries/tmp/obj/hello.dwo <24> DW_AT_comp_dir : /home/vries/tmp ... The standard states about the DW_AT_dwo_name attribute: ... value is a null-terminated string containing the full or relative path name (relative to the value of the DW_AT_comp_dir attribute, see below) of the object file that contains the full compilation unit. ... So, readelf shouldn't try to prefix an absolute path with DW_AT_comp_dir. Fix this in load_dwo_file by handling the absolute path case. binutils/ChangeLog: 2021-02-10 Tom de Vries <tdevries@suse.de> PR binutils/27391 * dwarf.c (load_dwo_file): Handle case that name is absolute path.
2021-02-10[binutils] Handle presence of both .debug_ranges and .debug_rnglistsTom de Vries2-1/+22
With exec: ... $ g++ src/gdb/testsuite/gdb.cp/cpexprs.cc -gdwarf-5 -fdebug-types-section ... I run into: ... $ readelf -w a.out > READELF readelf: Error: Invalid range list entry type 126 readelf: Error: Invalid range list entry type 60 ... The executable contains both a .debug_rnglists section (for CU cpexprs.cc) and a .debug_ranges section (for other CUs, like crti.S). But when executing display_debug_ranges for say, section .debug_rnglists it also tries to use the range list references related to section .debug_ranges. Fix this by filtering out the .debug_range references when handling .debug_rnglists and vice versa. binutils/ChangeLog: 2021-02-10 Tom de Vries <tdevries@suse.de> PR binutils/27371 * dwarf.c (display_debug_ranges): Filter range lists according to section.
2021-02-09[binutils] Handle DW_FORM_ref_sig8 in get_type_abbrev_from_formTom de Vries2-0/+6
When compiling an exec like this: ... $ gcc -fdebug-types-section hello.c -gdwarf-5 ... we run into: ... $ readelf -w a.out > READELF readelf: Warning: Unexpected form 20 encountered whilst finding \ abbreviation for type ... Fix this by handling DW_FORM_ref_sig8 conservatively in get_type_abbrev_from_form. binutils/ChangeLog: 2021-02-09 Tom de Vries <tdevries@suse.de> PR binutils/27370 * dwarf.c (get_type_abbrev_from_form): Handle DW_FORM_ref_sig8.
2021-02-09[binutils] Handle DW_UT_skeleton/split_compile in process_debug_infoTom de Vries2-1/+23
With this exec: ... $ gcc -gsplit-dwarf hello.c -gdwarf-5 ... we run into: ... $ readelf -w a.out > READELF readelf: Warning: CU at offset c7 contains corrupt or unsupported unit type: 4. readelf: Warning: CU at offset c7 contains corrupt or unsupported unit type: 4. ... Fix this by handling DW_UT_skeleton and DW_UT_split_compile in process_debug_info. Note that this just adds the parsing of DWO_id, but not yet any printing of it. Tested on x86_64-linux. binutils/ChangeLog: 2021-02-09 Tom de Vries <tdevries@suse.de> PR binutils/27386 * dwarf.c (process_debug_info): Handling DW_UT_skeleton and DW_UT_split_compile.
2021-02-09Remove arm-symbianelfAlan Modra2-1/+5
* configure.ac: Delete arm*-*-symbianelf* entry. * configure: Regenerate. bfd/ * config.bfd (arm*-*-symbianelf*): Move from obsolete to removed. * configure.ac: Delete symbian entries. * elf-bfd.h (enum elf_target_os): Delete is_symbian. * elf32-arm.c: Remove symbian support. Formatting. * targets.c: Delete symbian entries. * configure: Regenerate. binutils/ * testsuite/lib/binutils-common.exp (supports_gnu_osabi): Remove symbianelf. gas/ * Makefile.am (TARG_ENV_HFILES): Remove config/te-symbian.h. * config/tc-arm.c (elf32_arm_target_format): Remove TE_SYMBIAN support. * config/te-symbian.h: Delete. * configure.tgt: Remove arm-*-symbianelf*. * testsuite/gas/arm/arch4t-eabi.d: Don't mention symbianelf in target selection. * testsuite/gas/arm/arch4t.d: Likewise. * testsuite/gas/arm/got_prel.d: Likewise. * testsuite/gas/arm/mapdir.d: Likewise. * testsuite/gas/arm/mapmisc.d: Likewise. * testsuite/gas/arm/mapsecs.d: Likewise. * testsuite/gas/arm/mapshort-eabi.d: Likewise. * testsuite/gas/arm/thumb-eabi.d: Likewise. * testsuite/gas/arm/thumb.d: Likewise. * testsuite/gas/arm/thumbrel.d: Likewise. * Makefile.in: Regenerate. * po/POTFILES.in: Regenerate. ld/ * Makefile.am (ALL_EMULATION_SOURCES): Remove earmsymbian.c. Don't include symbian dep file. * configure.tgt: Remove arm*-*-symbianelf* entry. * emulparams/armsymbian.sh: Delete. * ld.texi: Don't mention symbian. * scripttempl/armbpabi.sc: Delete. * testsuite/ld-arm/symbian-seg1.d: Delete. * testsuite/ld-arm/symbian-seg1.s: Delete. * testsuite/ld-arm/arm-elf.exp: Don't run symbian-seg1. * Makefile.in: Regenerate. * po/BLD-POTFILES.in: Regenerate.
2021-02-07asan: unwind-ia64.c: stack buffer overflowAlan Modra2-0/+9
Printing "invalid" is better than printing an uninitialised buffer and occasionally running off the end of the buffer. * unwind-ia64.c (unw_print_xyreg): Don't leave output buffer uninitialised on invalid input.
2021-02-06PR27349, ar breaks symlinksAlan Modra2-7/+16
PR 27349 * rename.c (smart_rename): Test for existence and type of output file with lstat.
2021-02-05Remove Richard Henderson as the Alpha maintainerNick Clifton2-1/+4
2021-02-05Fix typos in comments added in PR 27252 fixEli Zaretskii3-4/+10
PR 27252 * elfedit.c (check_file): * bucomm.c (get_file_size): Fix typos in comments.
2021-02-05PR27345, binutils/arsup.c: lstat() not available on all targetsAlan Modra2-1/+6
We can just use stat here, the same as is done in ar.c:open_inarch. PR 27345 * arsup.c (ar_save): Use stat rather than lstat.
2021-02-03pr27270 and pr27284, ar segfaults and wrong file modeAlan Modra4-28/+50
PR 27270 PR 27284 PR 26945 * ar.c: Don't include libbfd.h. (write_archive): Replace xmalloc+strcpy with xstrdup. Use bfd_stat rather than fstat on iostream. Move stat and fd tests outside of _WIN32 ifdef. Delete skip_stat variable. * arsup.c (temp_name, real_ofd): New static variables. (ar_open): Use make_tempname and bfd_fdopenw. (ar_save): Adjust to suit ar_open changes. Move stat output of _WIN32 ifdef. * objcopy.c: Don't include libbfd.h. (copy_file): Use bfd_stat.
2021-02-02readelf: Add 'R' and 'D' to "Key to Flags:"H.J. Lu3-0/+21
Add "R (retain)" and "D (mbind)" to "Key to Flags:". PR binutils/27281 * readelf.c (process_section_headers): Add 'R' and 'D' to "Key to Flags:". * testsuite/binutils-all/retain1a.d: Updated.
2021-02-01Small updates to the 'how to make a release' document following from the ↵Nick Clifton2-22/+23
2.35.2 release
2021-01-28Improve windres's handling of pathnames containing special characters on ↵Eli Zaretskii2-3/+34
Windows platforms. PR 4356 * windres.c (quot): Use double quotes to protect strings on Windows platforms.
2021-01-28Fix binutils tools so that they can cope with the special /dev/null file ↵Eli Zaretskii3-0/+36
when run on Windows systems. PR 27252 * bucomm.c (get_file_size): Add code to handle /dev/null on Windows systems. * elfedit.c (check_file): Likewise.
2021-01-27Simplify the code at the end of objcopy's main() function.Nick Clifton2-24/+15
* objcopy.c (copy_main): Remove conditional control of the calls to free, simplifying the code and making it easier to detect typos.
2021-01-26Fix thinko in objcopy's memory freeing code.Frederic Cambus2-1/+7
* objcopy.c (copy_main): Fix a double free happening when both --localize-symbols and --globalize-symbols options are invoked together.
2021-01-24Minor updates to the 'how to make a release' documentNick Clifton2-11/+17
2021-01-22MAINTAINERS: Update my e-mail addressMaciej W. Rozycki1-1/+1
binutils/ * MAINTAINERS: Update my e-mail address. gdb/ * MAINTAINERS: Update my e-mail address. sim/ * MAINTAINERS: Update my e-mail address.
2021-01-16Tidy inflateEnd callsAlan Modra2-2/+6
So that no one need worry about the value of Z_OK. bfd/ * compress.c (decompress_contents): Tidy inflateEnd result test. binutils/ * readelf.c (uncompress_section_contents): Tidy inflateEnd result test.