summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* readelf: print actual DW_OP_GNU_parameter_ref DIE offset.Mark Wielaard2013-07-132-32/+66
| | | | | | | | | | | DW_OP_GNU_parameter_ref takes as argument a CU relative offset to a DW_TAG_formal_parameter DIE. Printing just that relative offset makes it hard to find the actual DIE in the output. Now print the actual DIE offset instead (unless -U is given). We already passed around the base address of the CU. Now we pass around the actual CU so we can use it to find both the base address and the CU offset. Signed-off-by: Mark Wielaard <[email protected]>
* readelf: Format first DW_OP_GNU_implicit_pointer argument as DIE offset.Mark Wielaard2013-05-062-1/+6
| | | | | | | | | | | | | | | | | | | Make the printing of DW_OP_GNU_implicit_pointer consistent with other operations that have a DIE offset as argument. Before: [ 6e4a] formal_parameter abstract_origin (ref4) [ 616a] location (exprloc) [ 0] GNU_implicit_pointer 0x6dbe, +0 After: [ 6e4a] formal_parameter abstract_origin (ref4) [ 616a] location (exprloc) [ 0] GNU_implicit_pointer [ 6dbe] +0 Signed-off-by: Mark Wielaard <[email protected]>
* Updates for Automake 1.13.Mark Wielaard2013-04-262-1/+5
| | | | | | | autoreconf will install config/test-driver, ignore it. Update gettext m4 and po files to version 0.18.2. Use AM_CPPFLAGS instead of INCLUDES. All changes are backward compatible with Automake 1.11.
* readelf: Add --debug-dump=decodedline support.Mark Wielaard2013-04-042-2/+105
| | | | | | | Use libdw to decode the .debug_line section and print address table view when --debug-dump=decodedline is given. Signed-off-by: Mark Wielaard <[email protected]>
* readelf: Display raw .debug_aranges. Use libdw only for decodedaranges.Mark Wielaard2013-04-042-5/+181
| | | | | | | Display "raw" .debug_aranges by default. Only use libdw parsing when --debug-dump=decodedaranges is given. Signed-off-by: Mark Wielaard <[email protected]>
* readelf: When highpc is in constant form also print as address.Mark Wielaard2013-03-262-1/+22
| | | | | | | | When highpc is in constant form it is relative to lowpc. In that case also show as address. Suggested-by: Jan Kratochvil <[email protected]> Signed-off-by: Mark Wielaard <[email protected]>
* readelf: print_gdb_index_section fix memory leak.Mark Wielaard2013-03-192-0/+6
| | | | Signed-off-by: Mark Wielaard <[email protected]>
* readelf: Accept version 8 .gdb_index section format.Mark Wielaard2013-03-192-3/+9
| | | | | | | Version 8 just indicates that if the .gdb_index was generated by the gold linker it correctly includes TUs for symbols. http://sourceware.org/PR15021 Signed-off-by: Mark Wielaard <[email protected]>
* Fix two memory leaks in findtextrel and strip.Mark Wielaard2013-03-013-2/+14
| | | | | | | | | | | The findtextrel leak is real, when processing lots of files without text relocations the files and memory wouldn't be released. The strip leak is minor since it can only happen when using -f which only allows one file as argument. But it is nice to see valgrind say: "All heap blocks were freed -- no leaks are possible". Signed-off-by: Mark Wielaard <[email protected]>
* elflint.c (check_symtab): Add __bss_start__ to the list of allowed symbols.Mark Wielaard2013-02-242-0/+6
| | | | | | Some architectures (ARM) use __bss_start__ instead of __bss_start. Signed-off-by: Mark Wielaard <[email protected]>
* elflint: Add two more symbols to gnuld list of allowed bad values.Mark Wielaard2013-02-062-3/+17
| | | | | | | | | | | | | Add __bss_start and __TMC_END__ to the list of symbols allowed to have out of section values because of the following GNU ld bug: http://sourceware.org/bugzilla/show_bug.cgi?id=13621. Allow them to appear in either .symtab or .dynsym, but only when they are zero sized. It is impossible to define a general rule for this bug, but this should catch most common issues that are mostly harmless because the symbols signify the removed section was empty to being with. This catches at least all symbols often flagged in the tests. Signed-off-by: Mark Wielaard <[email protected]>
* readelf: Add -U, --unresolved-address-offsets output control.Mark Wielaard2013-02-062-24/+60
| | | | | | | format_dwarf_addr () takes an extra argument 'raw' that is displayed when the user requests printing raw offsets values output for DWARF data. Signed-off-by: Mark Wielaard <[email protected]>
* readelf: Add base to offsets in format_dwarf_addr for debug_loc/ranges.Mark Wielaard2013-02-062-14/+57
| | | | | | | | Collect the base address of the CU while creating the listptr_tables and use them when printing debug ranges and location entries with format_dwarf_addr (). Signed-off-by: Mark Wielaard <[email protected]>
* src/Jan Kratochvil2013-01-302-16/+23
| | | | | | | * readelf.c (handle_core_items): Limit special repeated items handling to single-item formats '\n', 'b' and 'B', assert OFFSET 0 there. Signed-off-by: Jan Kratochvil <[email protected]>
* readelf: Add --elf-section input option to inspect an embedded ELF file.Mark Wielaard2013-01-162-0/+159
| | | | | | | | | | | | | | | | | | Some binaries might have (compressed) embedded ELF files inside a section. The default section name for this is .gnu_debugdata. This normally consists of just those sections needed to provide an auxiluary symbol table. But can theoretically contain other (debug) sections. The new --elf-section arguments makes it possible to easily inspect it as if it is a normal ELF file. libdwfl takes care of automatically decompressing any data in the section if necessary. https://fedoraproject.org/wiki/Features/MiniDebugInfo ELF input selection: --elf-section[=SECTION] Use the named SECTION (default .gnu_debugdata) as (compressed) ELF input data Signed-off-by: Mark Wielaard <[email protected]>
* ar.c (do_oper_delete): Fix num passed to memset.David Abdurachmanov2013-01-132-1/+5
| | | | Signed-off-by: David Abdurachmanov <[email protected]>
* readelf: Adjust initial FDE address if pcrel before printing.Mark Wielaard2012-12-222-2/+28
| | | | | | | | | The FDE initial_location is printed as start address with format_dwarf_addr. Which does the right thing for .debug_frame addresses, but in .eh_frame this is encoded as DW_EH_PE_pcrel and so needs to be adjusted before formatting. Signed-off-by: Mark Wielaard <[email protected]>
* addr2line: Cleanup Dwfl when done.Mark Wielaard2012-12-212-0/+5
| | | | | | Make sure addr2line and libdwfl don't leak memory. Signed-off-by: Mark Wielaard <[email protected]>
* Add missing semicolon in show_symbols_sysvMark Wielaard2012-12-111-1/+1
| | | | Signed-off-by: Mark Wielaard <[email protected]>
* nm: Fix size passed to snprintf for invalid sh_name case.Roland McGrath2012-12-112-2/+9
| | | | Signed-off-by: Roland McGrath <[email protected]>
* readelf.c (print_ops): Ajust DW_OP_skip and DW_OP_bra targets calculation.Mark Wielaard2012-11-162-1/+6
| | | | | | | | The 2-byte constant is the number of bytes of the DWARF expression to skip forward or backward from the current operation, beginning after the 2-byte constant. Signed-off-by: Mark Wielaard <[email protected]>
* src/Jan Kratochvil2012-10-122-58/+74
| | | | | | | | | | | | | | | | | | | | | | 2012-10-12 Jan Kratochvil <[email protected]> * readelf.c (ITEM_WRAP_COLUMN, REGISTER_WRAP_COLUMN): Merge to ... (WRAP_COLUMN): ... here. (print_core_item): Remove parameter format_max. Update function comment. Replace FORMAT_MAX by the real output width. (handle_core_item): Remove the FORMAT_MAX values in TYPES, DO_TYPE, calls of print_core_item, remove variable maxfmt, change ITEM_WRAP_COLUMN to WRAP_COLUMN. (handle_core_register): Remove the FORMAT_MAX values in TYPES, BITS, calls of print_core_item, change REGISTER_WRAP_COLUMN to WRAP_COLUMN. backends/ 2012-10-12 Jan Kratochvil <[email protected]> * linux-core-note.c (prstatus_items): Rename groups of sigpend and sighold to signal2 and signal3. Signed-off-by: Jan Kratochvil <[email protected]>
* Missing ChangeLog entry from last commit.Roland McGrath2012-10-111-0/+5
| | | | Signed-off-by: Roland McGrath <[email protected]>
* src/Jan Kratochvil2012-10-111-4/+4
| | | | | | | | | 2012-10-11 Jan Kratochvil <[email protected]> * readelf.c (handle_core_item) <b>: Make run an outer block variable. Increase run only if LASTBIT != 0. Print last element only if RUN > 0. Signed-off-by: Jan Kratochvil <[email protected]>
* In mixed core notes, don't let handle_core_item repeat.Petr Machata2012-09-251-1/+5
| | | | | | | | | | | | If a core note contains both registers and items, descsz is 0 to express that we don't wish to repeat the items. If there is only one item in such note, a special block of code hits that passes &size to handle_core_item, which will decrease that size by the amount consumed by the item. But because size is 0, it underflows and wraps, and the loop following this block, which handles the common case, overruns the core note buffer. Signed-off-by: Petr Machata <[email protected]>
* readelf.c (print_debug_macro_section): Print offset as PRIx64.Mark Wielaard2012-08-272-2/+6
| | | | Signed-off-by: Mark Wielaard <[email protected]>
* readelf.c (register_info): Handle loc == NULL.Mark Wielaard2012-08-272-3/+10
| | | | | | register_info is called by print_cfa_program with loc being NULL. Signed-off-by: Mark Wielaard <[email protected]>
* Add support for Tilera TILE-Gx processor.Jeff Kenton2012-08-242-1/+6
| | | | Signed-off-by: Jeff Kenton <[email protected]>
* Rewrite DWARF string functions using known-dwarf macros.Mark Wielaard2012-08-172-811/+332
| | | | | | | | readelf and tests were using hard coded string tables to produce DWARF string constants. Use the known-dwarf macros to redefine these and reduce code. Technique comes from dwarf branch dwarfstrings.c. Signed-off-by: Mark Wielaard <[email protected]>
* libdw: Add support for DWZ multifile forms DW_FORM_GNU_ref_alt/strp_alt.Mark Wielaard2012-08-092-1/+23
| | | | | | | | | | | | | | | DWZ multifile forms http://www.dwarfstd.org/ShowIssue.php?issue=120604.1 DW_FORM_GNU_ref_alt and DW_FORM_GNU_strp_alt reference an alternative debuginfo file. dwarf_begin and dwarf_begin_elf will try to use this automatically. There are no user visible changes to the libdw interface. dwarf_formref_die, dwarf_formstring and dwarf_formudata can now return a Dwarf_Die which comes from a CU in the alternative Dwarf descriptor. __libdw_read_offset was adjusted to take an alternative Dwarf descriptor into account. Signed-off-by: Mark Wielaard <[email protected]>
* Fix formatting string in readelfPetr Machata2012-08-071-1/+1
| | | | | | This caused failures of 32-bit builds. Signed-off-by: Petr Machata <[email protected]>
* Reorder formatting string arguments so that there are no gaps in referencesPetr Machata2012-07-302-8/+14
| | | | | | | It is required that formatting string that uses $-style references lists all arguments. Signed-off-by: Petr Machata <[email protected]>
* readelf: Use DW_LANG_ObjC and known[op].Mark Wielaard2012-07-292-2/+7
| | | | | Not all patches from the dwarfstrings branch were applied, causing compile failures.
* Add DW_OP_GNU_parameter_ref to dwarf.h and handle it in readelf.Mark Wielaard2012-07-262-0/+16
| | | | | | | DW_OP_GNU_parameter_ref takes as operand a 4 byte CU relative reference to the abstract optimized away DW_TAG_formal_parameter. Signed-off-by: Mark Wielaard <[email protected]>
* Merge branch 'debug_macro'Mark Wielaard2012-07-192-2/+422
|\
| * readelf: Add .debug_macro parsing support.Mark Wielaard2012-07-112-2/+422
| | | | | | | | Signed-off-by: Mark Wielaard <[email protected]>
* | readelf: Add .gdb_index version 7 support.Mark Wielaard2012-07-102-16/+54
|/ | | | | | | | Add version 7 support. Keep track of cu_nr. Print kind and static/global flag for each symbol. When a symbol is in the TU list add 'T'. Add testfilegdbindex test files. Signed-off-by: Mark Wielaard <[email protected]>
* Add low-level support for .debug_macro.Mark Wielaard2012-06-272-0/+8
| | | | Signed-off-by: Mark Wielaard <[email protected]>
* readelf.c: Cast printf PRIu/x64 arguments to uint64_t for gcc 4.7 -Wformat.Mark Wielaard2012-06-222-2/+7
| | | | Signed-off-by: Mark Wielaard <[email protected]>
* Update name, license and contributor policy.Mark Wielaard2012-06-0533-617/+358
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Change name from "Red Hat elfutils" to "elfutils". * Update license of standalone tools and test from GPLv2 to GPLv3+. * Change license of libraries from GPLv2+exception to GPLv2/LGPLv3+. * Add Developer Certificate of Origin based contributor policy. top-level: - COPYING: Upgraded from GPLv2 to GPLv3. - CONTRIBUTING, COPYING-GPLv2, COPYING-LGPLv3: New files. - NEWS: Added note about new contribution and license policy. - Makefile.am: Updated to GPLv3, added new files to EXTRA_DIST. - configure.ac: Update to GPLv3, changed AC_INIT name to 'elfutils'. backends, lib, libasm, libcpu, libdw, libdwfl, libebl, libelf: - All files updated to GPLv2/LGPLv3+. Except some very small files (<5 lines) which didn't have any headers at all before, the linker .maps files and the libcpu/defs files which only contain data and libelf/elf.h which comes from glibc and is under LGPLv2+. config: - elfutils.spec.in: Add new License: headers and new %doc files. - Update all license headers to GPLv2/LGPLv3+ for files used by libs. src, tests: - All files updated to GPLv3+. Except for the test bz2 data files, the linker maps and script files and some very small files (<5 lines) that don't have any headers. Signed-off-by: Richard Fontana <[email protected]> Signed-off-by: Mark Wielaard <[email protected]>
* Remove .mtn-ignore and .cvsignore files.Mark Wielaard2012-06-051-1/+0
| | | | We use .gitignore these days.
* Remove unused (generated) src/ylwrap file.Mark Wielaard2012-06-051-154/+0
| | | | | ylwrap is now placed in config through AC_CONFIG_AUX_DIR. The checked in src copy of the file wasn't used.
* elflint: Allow zero sized sections at (filesz) end of segment.Mark Wielaard2012-05-092-2/+9
|
* readelf.c (print_ops): Add missing DW_OP_GNU operands.Mark Wielaard2012-04-242-0/+8
| | | | DW_OP_GNU_push_tls_address, DW_OP_GNU_uinit and DW_OP_GNU_encoded_addr.
* elflint: Accept SHF_INFO_LINK for reloc sections.Roland McGrath2012-03-282-2/+6
|
* readelf.c: Check debug section data before trying to print abbrev or str.Mark Wielaard2012-03-282-2/+12
| | | | | | * readelf.c (print_debug_abbrev_section): Check there is Dwarf section data. (print_debug_str_section): Likewise.
* readelf.c (print_gdb_index_section): Accept version 6.Mark Wielaard2012-03-212-2/+7
| | | | | No changes in the format. Version 6 contains symbols for inlined functions, older versions didn't.
* Handle DW_FORM_sec_offset in dwarf_formudata.Mark Wielaard2012-01-312-3/+4
|
* Update copyright yearUlrich Drepper2012-01-2115-35/+50
|
* Color code output of nm and objdumpUlrich Drepper2012-01-213-41/+142
|