aboutsummaryrefslogtreecommitdiff
path: root/binutils/ChangeLog
AgeCommit message (Collapse)AuthorFilesLines
2018-01-26Update notes on making a releaseNick Clifton1-0/+5
2018-01-22binutils/doc: Fix a "using" typo in `objcopy --rename-section' descriptionMaciej W. Rozycki1-0/+5
binutils/ * doc/binutils.texi (objcopy): Fix a typo in `--rename-section' option description.
2018-01-22MAINTAINERS: Update my company e-mail addressMaciej W. Rozycki1-0/+4
Following my recent transition from Imagination Technologies to the reincarnated MIPS company update MAINTAINERS entries accordingly. binutils/ * MAINTAINERS: Update my company e-mail address. gdb/ * MAINTAINERS: Update my company e-mail address. sim/ * MAINTAINERS: Update my company e-mail address.
2018-01-22Update Swedish translation for the binutils sub-directoryNick Clifton1-0/+4
2018-01-18Update Bulgarian translation of the binutils sub-directoryNick Clifton1-0/+4
2018-01-16binutils release procedure: Add AI to update branch name in crontabJoel Brobecker1-0/+5
binutils/ChangeLog: * README-how-to-make-a-release: Add reminder to update the branch name in gdbadmin's crontab on sourceware.
2018-01-16Update translations for various binutils components.Nick Clifton1-0/+4
ld * po/pt_BR.po: Updated Brazilian Portugese translation. opcodes * po/pt_BR.po: Updated Brazilian Portugese translation. * po/de.po: Updated German translation. gas * po/fr.po: Updated French translation. binutils* po/fr.po: Updated French translation.
2018-01-16Remove trailing spaces in binutils/README-how-to-make-a-releaseJoel Brobecker1-0/+4
binutils/ChangeLog: * README-how-to-make-a-release: Remove trailing spaces.
2018-01-15Update Ukranian translations for bfd, binutils, gas, gold, ld and opcodesNick Clifton1-0/+4
2018-01-13Update notes on how to make a releaseNick Clifton1-0/+1
2018-01-13Update pot filesNick Clifton1-0/+4
2018-01-13Bump version number to 2.30.51Nick Clifton1-0/+4
bfd/ * version.m4: Bump version to 2.30.51 * configure: Regenerate. binutils/ * configure: Regenerate. gas/ * configure: Regenerate. gprof/ * configure: Regenerate. ld/ * configure: Regenerate. opcodes/ * configure: Regenerate.
2018-01-13Add note about 2.30 branch creation to changelogsNick Clifton1-0/+1
2018-01-13Add 2.30 markers to NEWS files.Nick Clifton1-0/+4
binutils/ * NEWS: Add marker for 2.30. gas/ * NEWS: Add marker for 2.30. ld/ * NEWS: Add marker for 2.30.
2018-01-12Add notes on how to make a branch and a pre-release snapshot.Nick Clifton1-0/+6
* README-how-to-make-a-release: Add notes on how to make the branch and prelease snapshot. * BRANCHES: Add binutils-2_29-branch.
2018-01-10Update top level configure files by synchronizing them with gcc.Nick Clifton1-0/+6
. * config-ml.in: Sync with gcc sources. * config.guess: Likewise. * config.sub: Likewise. * configure.ac: Likewise. * configure: Regenerate. config * Sync with GCC sources: 2017-11-14 Boris Kolpackov <boris@codesynthesis.com> * gcc-plugin.m4: Add support for MinGW. 2017-11-17 Igor Tsimbalist <igor.v.tsimbalist@intel.com> * cet.m4: New file. 2017-11-15 Alexandre Oliva <aoliva@redhat.com> * bootstrap-debug-lean.mk (do-compare): Use the contrib/compare-debug script. 2017-10-24 H.J. Lu <hongjiu.lu@intel.com> * bootstrap-cet.mk: New file. 2017-06-19 Martin Liska <mliska@suse.cz> * bootstrap-lto-noplugin.mk: Enable -flto in all PGO stages. * bootstrap-lto.mk: Likewise. 2017-06-03 Eric Botcazou <ebotcazou@adacore.com> * mt-android: New file. 2017-02-13 Richard Biener <rguenther@suse.de> * isl.m4: Remove support for ISL 0.14. 2017-01-19 Uros Bizjak <ubizjak@gmail.com> PR target/78478 * ax_check_define.m4: New file. 2017-01-17 Jakub Jelinek <jakub@redhat.com> PR other/79046 * acx.m4 (GCC_BASE_VER): New m4 function. (ACX_TOOL_DIRS): Require GCC_BASE_VER, for --with-gcc-major-version-only use just major number from BASE-VER. 2017-01-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> PR go/78978 * hwcaps.m4 (GCC_CHECK_ASSEMBLER_HWCAP): New macro.
2018-01-03Fix compile time warning introduced by previous delta.Nick Clifton1-0/+5
* objcopy.c (merge_gnu_build_notes): Add cast to maximum address constants.
2018-01-03Add support for v3 binary annotation notes.Nick Clifton1-0/+38
I am checking in the attached patch which updates the binutils support for version 3 binary annotation notes. (Version 3 adds an end address to the ranges covered by the notes, so that it is possible to detect gaps in the coverage). This patch also stops the note merging feature of objcopy from executing if the notes have relocations against them. This makes the code simpler, and prevents the problems with architectures which have unusual relocation management issues. * objcopy.c (objcopy_internal_note): New structure. (gap_exists): New function. (is_open_note): New function. (is_func_note): New function. (is_64bit): New function. (merge_gnu_build_notes): Handle v3 notes. Do not merge if there are relocations against the notes. * readelf.c (get_note_type): Use short names for build attribute notes. (print_symbol_for_build_attribute): Rename to get_symbol_for_build_attribute. Returns the found symbol rather than printing it. (print_gnu_build_attribute_description): Maintain address ranges for function notes as well as global notes. Handle v3 notes. (print_gnu_build_attribute_name): Use more space for printing the name in wide mode. * testsuite/binutils-all/note-2-32.s: Use .dc.l instead of .word. Eliminate symbol references in order to remove the need for relocations. * testsuite/binutils-all/note-2-64.s: Likewise. * testsuite/binutils-all/note-3-32.s: Add a size to the note_1 symbol. * testsuite/binutils-all/note-3-64.s: Likewise. * testsuite/binutils-all/mips/mips-note-2r-n32.d: Update expected output. * testsuite/binutils-all/mips/mips-note-2r-n64.d: Likewise. * testsuite/binutils-all/mips/mips-note-2r.d: Likewise. * testsuite/binutils-all/note-2-32.d: Likewise. * testsuite/binutils-all/note-2-64.d: Likewise. * testsuite/binutils-all/note-3-32.d: Likewise. * testsuite/binutils-all/note-3-64.d: Likewise. * testsuite/binutils-all/note-4-64.s: New test. Checks v3 notes. * testsuite/binutils-all/note-4-32.s: New test. * testsuite/binutils-all/note-4-64.d: New test result file. * testsuite/binutils-all/note-4-32.d: New test result file.
2018-01-03Update year range in copyright notice of binutils filesAlan Modra1-0/+4
2018-01-03ChangeLog rotationAlan Modra1-1874/+2
2017-12-19Stop readelf from complaining about relocation sections with an sh_info ↵Nick Clifton1-0/+7
field of 0 in dynamic executables. PR 22587 * readelf.c (process_section_headers): Do not complain about an sh_info field of 0 in relocation sections of ET_EXEC or ET_DYN type executables.
2017-12-19Test binutils_assemble return valueAlan Modra1-0/+17
This is a followup to "binutils nm testsuite tidy". Since the perror in binutils_assemble has been removed, we need to take more care in failure paths. The patch also fixed a number of .exp files that have multiple tests, where an assembly failure returns from the .exp file. In most cases it is nicer to attempt all tests. * testsuite/binutils-all/ar.exp (unique_symbol): Don't run AR if assembly fails. * testsuite/binutils-all/arc/objdump.exp (check_assembly): If objfile is empty, fail test. * testsuite/binutils-all/arm/objdump.exp: Don't return if assembly fails for a test, continue on to other tests. * testsuite/binutils-all/bfin/objdump.exp: Likewise. * testsuite/binutils-all/hppa/objdump.exp: Likewise. * testsuite/binutils-all/m68k/objdump.exp: Likewise. * testsuite/binutils-all/vax/objdump.exp: Likewise. * testsuite/binutils-all/size.exp: Likewise. * testsuite/binutils-all/nm.exp: Likewise. Move PR12753 test. * testsuite/binutils-all/objcopy.exp: Don't perror on assembly fail. * testsuite/binutils-all/objdump.exp: Report assembly fails.
2017-12-18Decode expression lists used with DW_AT_byte_size and other DWARF attributes.Nick Clifton1-0/+7
PR 22532 * dwarf.c (read_and_display_attr_value): Add attributes that might use the DW_FORM_exprloc form, and if so, display the decoded location expression list.
2017-12-14binutils nm testsuite tidyAlan Modra1-0/+7
We can run the gnu_unique_object symbol test on all ELF targets. Those that don't support the symbol type and fail to assemble can just be resolved as "unsupported". This means binutils_assemble can't report an error on assembly failure, but it probably should never have done that anyway. * testsuite/lib/utils-lib.exp (default_binutils_assemble_flags): Don't perror on assembler diagnostic output. * testsuite/binutils-all/nm.exp: Run unique symbol test on all ELF targets. Resolve as "unsupported" on assembly failure.
2017-12-11[Binutils][Objdump]Check symbol section information while search a mapping ↵Renlin Li1-0/+5
symbol backward. When checking mapping symbols backwardly, the section which defines the symbol is not considerted. This patch fixes this by moving the section checking code into get_sym_code_type () function which is shared by forward and backword mapping symbol searching. opcodes/ 2017-12-11 Petr Pavlu <petr.pavlu@arm.com> Renlin Li <renlin.li@arm.com> * aarch64-dis.c (print_insn_aarch64): Move symbol section check ... (get_sym_code_type): Here. binutils/ 2017-12-11 Renlin Li <renlin.li@arm.com> * testsuite/binutils-all/aarch64/objdump.d: New. * testsuite/binutils-all/aarch64/objdump.s: New.
2017-12-08Fix stripping relocs in a file with mergeable notes.Nick Clifton1-0/+6
A recent Fedora bug (1520805) exposed a problem with objcopy's reloc copying code, when a binary also contains mergeable notes. The note merging code would delete some relocs, but then the reloc copying code would try to put them back again, which did not work. So I am checking in the patch below to fix the problem. The patch also tweaks one of the binutils note merging tests so that it is skipped for the Sparc64 target, since this has funky relocs. binutils * objcopy.c (copy_relocations_in_section): Use the orelocations field of the input section, if it has been initialised. * testsuite/binutils-all/note-2-64.d: Skip test on Sparc64. bfd * elfcode.h (elf_write_relocs): Check for an empty howto field.
2017-12-06Objcopy interleave fails if section address not multiple of interleave.Jim Wilson1-0/+7
PR 22465 binutils/ * objcopy.c (copy_section): New local extra. If isection->lma not exactly divisible by interleave, then bias from. Also adjust osection->lma if necessary. ld/ * testsuite/ld-elf/interleave-0.d, testsuite/ld-elf/interleave-4.d, * testsuite/ld-elf/interleave.ld, testsuite/ld-elf/interleave.s: New.
2017-12-06PR22552, readelf heap buffer overflow in load_debug_sectionAlan Modra1-0/+8
PR 22552 * readelf.c (process_file_header): Don't assume XINDEX case value for e_shstrndx is within bounds. (load_debug_section): Sanity test e_shstrndx before attempting to read .shstrtab. Wrap long lines.
2017-12-01Add --strip-unneeded to objcopy synopsisOleksandr Pikozh1-0/+4
* doc/binutils.texi: Add --strip-unneeded to objcopy synopsis.
2017-11-30Prevent an illegal memory access in readelf when attempting to parse a ↵Nick Clifton1-0/+6
corrupt ELF file. PR 22510 * readelf.c (load_debug_section): Fail if there are no section headers available.
2017-11-29Stop objdump from attempting to allocate a huge chunk of memory when parsing ↵Nick Clifton1-0/+7
relocs in a corrupt file. PR 22508 * objdump.c (dump_relocs_in_section): Also check the section's relocation count to make sure that it is reasonable before attempting to allocate space for the relocs.
2017-11-29Support --localedir, --datarootdir and --datadirStefan Stroe1-0/+6
bfd/ * po/Make-in (datadir): Define as @datadir@. (localedir): Define as @localedir@. (gnulocaledir, gettextsrcdir): Use @datarootdir@. binutils/ * po/Make-in (datadir): Define as @datadir@. (localedir): Define as @localedir@. (gnulocaledir, gettextsrcdir): Use @datarootdir@. gas/ * po/Make-in (datadir): Define as @datadir@. (localedir): Define as @localedir@. (gnulocaledir, gettextsrcdir): Use @datarootdir@. gold/ * po/Make-in (datadir): Define as @datadir@. (localedir): Define as @localedir@. (gnulocaledir, gettextsrcdir): Use @datarootdir@. gprof/ * po/Make-in (datadir): Define as @datadir@. (localedir): Define as @localedir@. (gnulocaledir, gettextsrcdir): Use @datarootdir@. ld/ * po/Make-in (datadir): Define as @datadir@. (localedir): Define as @localedir@. (gnulocaledir, gettextsrcdir): Use @datarootdir@. opcodes/ * po/Make-in (datadir): Define as @datadir@. (localedir): Define as @localedir@. (gnulocaledir, gettextsrcdir): Use @datarootdir@.
2017-11-28Properly handle note sections and segmentsH.J. Lu1-0/+14
When dumping notes, get note alignment from either note section or note segment. To support notes generated by assemblers with https://sourceware.org/bugzilla/show_bug.cgi?id=22492 we treate alignment as 4 bytes if it is less than 4. Otherwise, we skip notes if alignment isn't 4 nor 8 bytes. We should call load_separate_debug_file only if e_shstrndx != SHN_UNDEF. PR binutils/22490 * readelf.c (process_notes_at): Add an argument for note alignment. If note alignment is less than 4, use 4 byte alignment. Otherwise, skip notes if alignment isn't 4 nor 8 bytes. (process_corefile_note_segments): Pass segment alignment to process_notes_at. (process_note_sections): Pass section alignment to process_notes_at. (process_object): Call load_separate_debug_file only if e_shstrndx != SHN_UNDEF.
2017-11-27Fix a seg-fault when displaying notes from a prorgam segment. Check for a ↵Nick Clifton1-0/+8
NULL string section before attempting compute the name of a separate debug info file. PR 22490 * readelf.c (dump_section_as_bytes): Check for a NULL string section pointer. (process_notes_at): Compute the alignment to use if displaying notes from a segment.
2017-11-26Rename argument name from link to xlinkH.J. Lu1-0/+5
This fixed the build with GCC 4.2: cc1: warnings being treated as errors binutils-gdb/binutils/dwarf.c: In function ‘load_separate_debug_info’: binutils-gdb/binutils/dwarf.c:9650: warning: declaration of ‘link’ shadows a global declaration /usr/include/unistd.h:757: warning: shadowed declaration is here * dwarf.c (load_separate_debug_info): Rename argument name from link to xlink.
2017-11-24Re-apply "elf: Properly compute offsets of note descriptor and next note"H.J. Lu1-0/+7
CORE PT_NOTE segments may have p_align values of 0 or 1. gABI specifies that PT_NOTE alignment should be aligned to 4 bytes for 32-bit objects and to 8 bytes for 64-bit objects. If segment alignment is less than 4, we use 4 byte alignment.
2017-11-24Revert "elf: Properly compute offsets of note descriptor and next note"Simon Marchi1-7/+0
This reverts commit 650444eb540f9fd85e821567a3f943b4bc41b8be. With this patch, running the GDB test case gdb.base/auxv.exp is stuck in an infinite loop, consuming memory to the point that it renders the machine unusable. I am reverting it so we can take our time to investigate while not killing all the developers' machines.
2017-11-24elf: Properly compute offsets of note descriptor and next noteH.J. Lu1-0/+7
According to gABI, in a note entry, the note name field, not note name size, is padded for the note descriptor. And the note descriptor field, not note descriptor size, is padded for the next note entry. Also notes are aligned to 4 bytes in 32-bit objects and 8 bytes in 64-bit objects. Since on Linux, .note.ABI-tag and .note.gnu.build-id notes are always aligned to 4 bytes, we need to use alignment of note section or note segment, instead of assuming alignment based on ELF file class. Tested on i686 and x86-64. bfd/ PR binutils/22444 * elf.c (elf_read_notes): Add an argument for note aligment. (elf_parse_notes): Likewise. (_bfd_elf_make_section_from_shdr): Pass section aligment to elf_parse_notes. (bfd_section_from_phdr): Pass segment aligment to elf_read_notes. (elf_parse_notes): Add an argument for note aligment. Use ELF_NOTE_DESC_OFFSET to get the offset of the note descriptor. Use ELF_NOTE_NEXT_OFFSET to get the offset of the next note entry. (elf_read_notes): Add an argument for note aligment and pass it to elf_parse_notes. binutils/ PR binutils/22444 * readelf.c (process_notes_at): Use ELF_NOTE_DESC_OFFSET to get the offset of the note descriptor. Use ELF_NOTE_NEXT_OFFSET to get the offset of the next note entry. include/ PR binutils/22444 * elf/external.h (ELF_ALIGN_UP): New. (ELF_NOTE_DESC_OFFSET): Likewise. (ELF_NOTE_NEXT_OFFSET): Likewise.
2017-11-23Avoid bogus compile time warning from clang by initialising local data ↵Pavel I. Kryukov1-0/+6
structure using memset. PR 22485 * readelf.c (process_archive): Use memset to initiaise thin_filedata structure.
2017-11-21Add a test for PR binutils/22451H.J. Lu1-0/+6
Check in the object file generated from the older assembler as a compressed file. PR binutils/22451 * testsuite/binutils-all/x86-64/objects.exp: New file. * testsuite/binutils-all/x86-64/pr22451.o.bz2: Likewise.
2017-11-21[ARC] [COMMITTED] Update test pattern patching.claziss1-0/+5
2017-11-21 Claudiu Zissulescu <claziss@synopsys.com> * testsuite/binutils-all/arc/objdump.exp: Update pattern matching expression.
2017-11-21Add ability to follow dwo links to readelf/objdump.Nick Clifton1-0/+21
* dwarf.c (dwo_name, dwo_dir, dwo_id, dwo_id_len): New variables. (read_and_display_attr_value): Record dwo variables if requested. (display_augmentation_data): Rename to display_data and make generic. (load_dwo_file): New function. Loads a separate dwarf object file. (load_separate_debug_file): Add reporting and loading of separate dwarf objet files. * readelf.c (process_section_headers): Add do_debug_links to list of flags requiring a debug dump. (display_debug_section): Tidy up code. * doc/debug.options.texi: Add note that dwo links will also be followed. * testsuite/binutils-all/debuglink.s: Tidy code. * testsuite/binutils-all/dwo.s: New test file. * testsuite/binutils-all/readelf.wk2: New file - expected output from readelf. * testsuite/binutils-all/readelf.exp: Run the new test.
2017-11-19PR22443, Global buffer overflow in _bfd_elf_get_symbol_version_stringAlan Modra1-0/+12
Symbols like *ABS* defined in bfd/section.c:global_syms are not elf_symbol_type. They can appear on relocs and perhaps other places in an ELF bfd, so a number of places in nm.c and objdump.c are wrong to cast an asymbol based on the bfd being ELF. I think we lose nothing by excluding all section symbols, not just the global_syms. PR 22443 * nm.c (sort_symbols_by_size): Don't attempt to access section symbol internal_elf_sym. (print_symbol): Likewise. Don't call bfd_get_symbol_version_string for section symbols. * objdump.c (compare_symbols): Don't attempt to access section symbol internal_elf_sym. (objdump_print_symname): Don't call bfd_get_symbol_version_string for section symbols.
2017-11-17Finish fixing riscv gas lns-common-1 failure, and lns-duplicate.Jim Wilson1-0/+11
binutils/ * readelf.c (elf/riscv.h): Alphabetize include. (is_32bit_inplace_add_reloc, is_32bit_inplace_sub_reloc) (is_64bit_inplace_add_reloc, is_64bit_inplace_sub_reloc) (is_16bit_inplace_add_reloc, is_16bit_inplace_sub_reloc) (is_8bit_inplace_add_reloc, is_8bit_inplace_sub_reloc): New. (apply_relocations): New locals reloc_inplace and reloc_subtract. Call the new functions and set the new locals. Call byte_get if reloc_inplace. Subtract sym->st_value if reloc_subtract.
2017-11-17Fix a memory leak when processing archives.Nick Clifton1-0/+5
PR 22449 * ar.c (write_archive): Free the temporary file name.
2017-11-17Fix a snafu in a previous update to readelf that stopped it from printing ↵Nick Clifton1-0/+5
archive member names along with the archive file name. -- This patch causes problems for glibc linknamespace tests because of how it changes the output format of readelf on .a files. Previously, "readelf -W -s libc.a" would produce output starting e.g.: File: /scratch/jmyers/glibc/many8/build/glibcs/x86_64-linux-gnu/glibc/libc.a(init-first.o) Symbol table '.symtab' contains 30 entries: and continuing with symbol information for each object in that .a file. After this commit, instead it starts: File: /scratch/jmyers/glibc/many8/build/glibcs/x86_64-linux-gnu/glibc/libc.a Symbol table '.symtab' contains 30 entries: and every object's symbol information starts with the same File: line, missing any information about which object's symbols (within libc.a) are being listed. I think the previous File: lines that said libc.a(init-first.o) etc., identifying the particular object within libc.a, were clearly preferable, and the glibc linknamespace tests rely on having that information about the individual object within libc.a. -- binutils * readelf.c (process_archive): Include member name in the file_name of the filedata structure.
2017-11-15objcopy memory leakAlan Modra1-0/+5
PR 22426 * objcopy.c (copy_main): Free tmpname.
2017-11-15Add support to readelf and objdump for following links to separate debug ↵Nick Clifton1-0/+94
information files. Hi Guys, I am applying the rather large patch attached to this email to enhance the readelf and objdump programs so that they now have the ability to follow links to separate debug info files. (As requested by PR 15152). So for example whereas before we had this output: $ readelf -wi main.exe Contents of the .debug_info section: [...] <15> DW_AT_comp_dir : (alt indirect string, offset: 0x30c) [...] With the new option enabled we get: $ readelf -wiK main.exe main.exe: Found separate debug info file: dwz.debug Contents of the .debug_info section (loaded from main.exe): [...] <15> DW_AT_comp_dir : (alt indirect string, offset: 0x30c) /home/nickc/Downloads/dwzm [...] The link following feature also means that we can get two lots of output if the same section exists in both the main file and the separate debug info file: $ readelf -wiK main.exe main.exe: Found separate debug info file: dwz.debug Contents of the .debug_info section (loaded from main.exe): [...] Contents of the .debug_info section (loaded from dwz.debug): [...] The patch also adds the ability to display the contents of debuglink sections: $ readelf -wk main.exe Contents of the .gnu_debugaltlink section: Separate debug info file: dwz.debug Build-ID (0x14 bytes): c4 a8 89 8d 64 cf 70 8a 35 68 21 f2 ed 24 45 3e 18 7a 7a 93 Naturally there are long versions of these options (=follow-links and =links). The documentation has been updated as well, and since both readelf and objdump use the same set of debug display options, I have moved the text into a separate file. There are also a couple of new binutils tests to exercise the new behaviour. There are a couple of missing features in the current patch however, although I do intend to address them in follow up submissions: Firstly the code does not check the build-id inside separate debug info files when it is searching for a file specified by a .gnu_debugaltlink section. It just assumes that if the file is there, then it contains the information being sought. Secondly I have not checked the DWARF-5 version of these link features, so there will probably be code to add there. Thirdly I have only implemented link following for the DW_FORM_GNU_strp_alt format. Other alternate formats (eg DW_FORM_GNU_ref_alt) have yet to be implemented. Lastly, whilst implementing this feature I found it necessary to move some of the global variables used by readelf (eg section_headers) into a structure that can be passed around. I have moved all of the global variables that were necessary to get the patch working, but I need to complete the operation and move the remaining, file-specific variables (eg dynamic_strings). Cheers Nick binutils PR 15152 * dwarf.h (enum dwarf_section_display_enum): Add gnu_debuglink, gnu_debugaltlink and separate_debug_str. (struct dwarf_section): Add filename field. Add prototypes for load_separate_debug_file, close_debug_file and open_debug_file. * dwarf.c (do_debug_links): New. (do_follow_links): New. (separate_debug_file, separate_debug_filename): New. (fetch_alt_indirect_string): New function. Retrieves a string from the debug string table in the separate debug info file. (read_and_display_attr_value): Use it with DW_FORM_GNU_strp_alt. (load_debug_section_with_follow): New function. Like load_debug_section, but if the first attempt fails, then tries again in the separate debug info file. (introduce): New function. (process_debug_info): Use load_debug_section_with_follow and introduce. (load_debug_info): Likewise. (display_debug_lines_raw): Likewise. (display_debug_lines_decoded): Likewise. (display_debug_macinfo): Likewise. (display_debug_macro): Likewise. (display_debug_abbrev): Likewise. (display_debug_loc): Likewise. (display_debug_str): Likewise. (display_debug_aranges): Likewise. (display_debug_addr); Likewise. (display_debug_frames): Likewise. (display_gdb_index): Likewise. (process_cu_tu_index): Likewise. (load_cu_tu_indexes): Likewise. (display_debug_links): New function. Displays the contents of a .gnu_debuglink or .gnu_debugaltlink section. (calc_gnu_debuglink_ctc32):New function. Calculates a CRC32 value. (check_gnu_debuglink): New function. Checks the CRC of a potential separate debug info file. (parse_gnu_debuglink): New function. Reads a CRC value out of a .gnu_debuglink section. (check_gnu_debugaltlink): New function. (parse_gnu_debugaltlink): New function. Reads the build-id value out of a .gnu_debugaltlink section. (load_separate_debug_info): New function. Finds and loads a separate debug info file. (load_separate_debug_file): New function. Attempts to find and follow a link to a separate debug info file. (free_debug_memory): Free the separate debug info file information. (opts_table): Add "follow-links" and "links". (dwarf_select_sections_by_letters): Add "k" and "K". (debug_displays): Reformat. Add .gnu-debuglink and .gnu_debugaltlink. Add an extra entry for .debug_str in a separate debug info file. * doc/binutils.texi: Move description of debug dump features common to both readelf and objdump into... * objdump.c (usage): Add -Wk and -WK. (load_specific_debug_section): Initialise the filename field in the dwarf_section structure. (close_debug_file): New function. (open_debug_file): New function. (dump_dwarf): Load and dump the separate debug info sections. * readelf.c (struct filedata): New structure. Contains various variables that used to be global: (current_file_size, string_table, string_table_length, elf_header) (section_headers, program_headers, dump_sects, num_dump_sects): Move into filedata structure. (cmdline): New global variable. Contains list of sections to dump by number, as specified on the command line. Add filedata parameter to most functions. (load_debug_section): Load the string table if it has not already been retrieved. (close_file): New function. (close_debug_file): New function. (open_file): New function. (open_debug_file): New function. (process_object): Process sections in any separate debug info files. * doc/debug.options.texi: New file. Add description of =links and =follow-links options. * NEWS: Mention the new feature. * elfcomm.c: Have the byte gte functions take a const pointer. * elfcomm.h: Update prototypes. * testsuite/binutils-all/dw5.W: Update expected output. * testsuite/binutils-all/objdump.WL: Update expected output. * testsuite/binutils-all/objdump.exp: Add test of -WK and -Wk. * testsuite/binutils-all/readelf.exp: Add test of -wK and -wk. * testsuite/binutils-all/readelf.k: New file. * testsuite/binutils-all/objdump.Wk: New file. * testsuite/binutils-all/objdump.WK2: New file. * testsuite/binutils-all/linkdebug.s: New file. * testsuite/binutils-all/debuglink.s: New file. gas * testsuite/gas/avr/large-debug-line-table.d: Update expected output. * testsuite/gas/elf/dwarf2-11.d: Likewise. * testsuite/gas/elf/dwarf2-12.d: Likewise. * testsuite/gas/elf/dwarf2-13.d: Likewise. * testsuite/gas/elf/dwarf2-14.d: Likewise. * testsuite/gas/elf/dwarf2-15.d: Likewise. * testsuite/gas/elf/dwarf2-16.d: Likewise. * testsuite/gas/elf/dwarf2-17.d: Likewise. * testsuite/gas/elf/dwarf2-18.d: Likewise. * testsuite/gas/elf/dwarf2-5.d: Likewise. * testsuite/gas/elf/dwarf2-6.d: Likewise. * testsuite/gas/elf/dwarf2-7.d: Likewise. ld * testsuite/ld-avr/gc-section-debugline.d: Update expected output.
2017-11-10Fix riscv binutils xfail for debug_ranges test.Jim Wilson1-0/+5
binutils/ * testsuite/binutils-all/objdump.exp: Expect the debug_ranges test to pass.
2017-11-07Fix typo in my email address.Jim Wilson1-0/+4
binutils/ * MAINTAINERS (RISC-V): Fix typo in my email address.