summaryrefslogtreecommitdiff
path: root/backends
Commit message (Collapse)AuthorAgeFilesLines
* Use -Wformat=2 by default for all files.Mark Wielaard2014-01-303-9/+34
| | | | | | | | This just makes sure that all format strings are given as literals to printf like functions so the compiler can see and check them. Remove all no_Wformat, add -Wformat=2 unconditionally to AM_CFLAGS. Signed-off-by: Mark Wielaard <mjw@redhat.com>
* backends: aarch64_check_special_symbol check shdr is not NULL before usage.Mark Wielaard2014-01-172-3/+11
| | | | Signed-off-by: Mark Wielaard <mjw@redhat.com>
* backends: Add PPC64 machine_flag_check.Mark Wielaard2014-01-043-2/+18
| | | | | | | | | | To distinguish between the current PPC64 ELF ABI and the revised ELFv2 ABI that will not use function descriptors binutils started to emit the version (currently 1) in the ehdr e_flags. Recognize all valid versions (0, 1 or 2) in elflint by adding the hook ppc64_machine_flag_check. Signed-off-by: Mark Wielaard <mjw@redhat.com>
* backends: Add aarch64 abi_cfi.Mark Wielaard2014-01-035-2/+92
| | | | | | | | Setup initial CIE values for aarch64 for use with dwarf_frame functions. Register info prefix should be the empty string (not NULL) when not used. Add an EM_AARCH64 testcase to tests/run-addrcfi.sh to check both issues. Signed-off-by: Mark Wielaard <mjw@redhat.com>
* backends: aarch64 always has _GLOBAL_OFFSET_TABLE_ point to .got[0].Mark Wielaard2013-12-203-0/+34
| | | | | | | | | | | Like some other architectures aarch64 has a special rule for the _GLOBAL_OFFSET_TABLE_ symbol. Even if there is a .plt.got section the symbol value still points to the start of the .got section. This is also what the dynamic linker expects. See https://sourceware.org/ml/libc-ports/2013-06/msg00057.html Signed-off-by: Mark Wielaard <mjw@redhat.com>
* libdwfl: Introduce dwfl_module_getsym_info and dwfl_module_addrinfo.Mark Wielaard2013-12-204-1/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some arches like ppc64 use function descriptor values instead of function addresses causing matching of names and addresses to fail when using dwfl_module_getsym or dwfl_module_addrsym. Add ebl hook to resolve any function descriptor values found in non-ET_REL modules. The new function dwfl_module_getsym_info doesn't adjust the symbol value in any way, but returns the adjusted and/or resolved address associated with the symbol separately. The new function dwfl_module_addrinfo resolves against both the address associated with the symbol (which could be the function entry address) value and the adjusted st_value. So that it is easy to resolve and match either function descriptors and/or function entry addresses. Since these new functions also return more information they replace the dwfl_module_getsym_elf and dwfl_module_addrsym_elf functions that never made it into a released elfutils version. addr2line and readelf now use the new functions when looking up functions names. addr2line will now also display the section the address was found in when given -x. Extra testcases were added for both addr2line and the dwflsyms testscase. Signed-off-by: Mark Wielaard <mjw@redhat.com>
* Fix s390_initreg.c patch copy/paste error.Mark Wielaard2013-12-182-4/+1
| | | | Signed-off-by: Mark Wielaard <mjw@redhat.com>
* backends: Avoid type-punning issue in s390_set_initial_registers_tid.Mark Wielaard2013-12-182-2/+18
| | | | | | | | Use union to avoid type-punning when assigning a double to a Dwarf_Word. gcc complains otherwise. error: dereferencing type-punned pointer will break strict-aliasing rules. Signed-off-by: Mark Wielaard <mjw@redhat.com>
* unwinder: s390 and s390xJan Kratochvil2013-12-186-6/+253
| | | | Signed-off-by: Jan Kratochvil <jan.kratochvil@redhat.com>
* unwinder: ppc and ppc64Jan Kratochvil2013-12-156-3/+136
| | | | Signed-off-by: Jan Kratochvil <jan.kratochvil@redhat.com>
* Support AArch64 architecturePetr Machata2013-11-269-6/+968
| | | | Signed-off-by: Petr Machata <pmachata@redhat.com>
* Unwinder for x86*.Jan Kratochvil2013-11-076-4/+176
| | | | | Signed-off-by: Jan Kratochvil <jan.kratochvil@redhat.com> Signed-off-by: Mark Wielaard <mjw@redhat.com>
* backends: ppc_abi_cfi reg1 use DW_CFA_val_offset not DW_CFA_val_expression.Mark Wielaard2013-10-072-1/+6
| | | | | | | | | | | | | | | Register rules using expressions are stored using an offset from the start of the .eh_frame or .debug_frame ELF section data. Since abi_cfi rules aren't stored in those ELF sections they should use neither DW_CFA_expression nor DW_CFA_val_expression. The only backend that used DW_CFA_val_expression was ppc_cfi.c. It was easier to express the same rule using DW_CFA_val_offset than to change the code to handle register rules using expressions. On most architectures this did work by accident. See the definition of struct dwarf_frame_register value in libdw/cfi.h to see why. But on ia64 the abi_cfi data and actual frame data were placed too far apart and caused a crash in tests/run-addrcfi.sh for ppc32. Signed-off-by: Mark Wielaard <mjw@redhat.com>
* backends: Hook abi_cfi for arm.Mark Wielaard2013-09-034-2/+96
| | | | | | | | | | | | | | | | | | | | | | New arm_abi_cfi that defines initial CFA, rules for callee-saved regs, including VFP ones and return register. Note the DWARF abi extension for ARM says that "registers intentionally unused" should also be initialized as if by DW_CFA_same_value. The example given is "an integer-only function might be included in one executable file for targets with VFP and another for targets without". We don't currently do this yet. See the DWARF and calling convention documents: DWARF for the ARM Architecture ABI r2.09 http://infocenter.arm.com/help/topic/com.arm.doc.ihi0040b/IHI0040B_aadwarf.pdf Procedure Call Standard for the ARM Architecture ABI r2.09 http://infocenter.arm.com/help/topic/com.arm.doc.ihi0042e/IHI0042E_aapcs.pdf Also adds addrcfi arm testcase. Signed-off-by: Mark Wielaard <mjw@redhat.com>
* backends: Hook abi_cfi for ppc and s390.Jan Kratochvil2013-09-027-7/+164
| | | | | Signed-off-by: Jan Kratochvil <jan.kratochvil@redhat.com> Signed-off-by: Mark Wielaard <mjw@redhat.com>
* backends: Always set *prefix to "" when not used in register_info hook.Mark Wielaard2013-09-024-3/+9
| | | | | | | | | | | | For ia64 and tilegx *prefix was already set to the empty string, but arm, ppc and sh used NULL to indicate no prefix preceded the register name in the canonical assembler syntax. Consistently use the empty string in all backends since dwfl_module_register_names says: 'a prefix used in assembler syntax (such as "%" or "$", may be "")'. So users had to handle the empty string already, and might forget to handle the NULL case (like our own addrcfi testcase). Signed-off-by: Mark Wielaard <mjw@redhat.com>
* 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.
* backends: Check type DIE exists before calling dwarf_tag ().Mark Wielaard2013-02-0613-36/+59
| | | | | | | | | | | | | dwarf_attr () or dwarf_form () functions leave typedie NULL when they fail because of missing attribute or unexpected form. In such cases first check the DIE exists and return error instead of calling dwarf_tag () and crashing. This also happens in the testsuite with native tests when elfutils is build without DWZ support on a distro that uses DWZ DWARF compression on system libraries. Only the backends used dwarf_tag () directly without checking, all other uses in elfutils already checked whether the given DIE was NULL. Signed-off-by: Mark Wielaard <mjw@redhat.com>
* backends/Jan Kratochvil2013-01-306-2/+234
| | | | | | | | | | | | | | | | | | | | | * Makefile.am (s390_SRCS): Add s390_corenote.c and s390x_corenote.c. * linux-core-note.c (ALIGN_PR_REG): New definitions. (struct EBLHOOK(prstatus)): Change field pr_reg to anonymous struct with ALIGN_PR_REG. (EXTRA_ITEMS): New macro. * s390_corenote.c: New file. * s390_init.c (s390x_core_note): New declaration. (s390_init): Install s390x_core_note and s390_core_note. * s390x_corenote.c: New file. tests/ * run-readelf-mixed-corenote.sh: New testcase for readelf -n of s390 and s390x core notes. * testfile67.bz2: New file. * testfile68.bz2: New file. * Makefile.am (EXTRA_DIST): Add testfile67.bz2 and testfile68.bz2 . Signed-off-by: Jan Kratochvil <jan.kratochvil@redhat.com>
* backends/Jan Kratochvil2013-01-302-1/+5
| | | | | | * arm_corenote.c (vfp_items): Remove zero COUNT initializer. Signed-off-by: Jan Kratochvil <jan.kratochvil@redhat.com>
* src/Jan Kratochvil2012-10-122-2/+9
| | | | | | | | | | | | | | | | | | | | | | 2012-10-12 Jan Kratochvil <jan.kratochvil@redhat.com> * 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 <jan.kratochvil@redhat.com> * linux-core-note.c (prstatus_items): Rename groups of sigpend and sighold to signal2 and signal3. Signed-off-by: Jan Kratochvil <jan.kratochvil@redhat.com>
* Add back end code for interpreting NT_ARM_VFP core note.Petr Machata2012-09-253-1/+36
| | | | Signed-off-by: Petr Machata <pmachata@redhat.com>
* Change FPREGSET_SIZE in ARM backend to 116 to match sizeof struct user_fpPetr Machata2012-09-242-1/+5
| | | | Signed-off-by: Petr Machata <pmachata@redhat.com>
* Add support for Tilera TILE-Gx processor.Jeff Kenton2012-08-248-2/+617
| | | | Signed-off-by: Jeff Kenton <jkenton@tilera.com>
* Update name, license and contributor policy.Mark Wielaard2012-06-0573-1169/+1387
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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 <rfontana@redhat.com> Signed-off-by: Mark Wielaard <mjw@redhat.com>
* Add new ebl_check_st_other_bits function.mpolacek/autotestMark Wielaard2011-03-113-0/+16
|
* Alpha backend: accept any _GLOBAL_OFFSET_TABLE_ value.Roland McGrath2011-03-093-2/+28
|
* backends: i386 integer return value typo fix, reported by Thorsten Glaser ↵Roland McGrath2010-11-082-2/+7
| | | | <tg@mirbsd.de>.
* Adjust copyrights.Ulrich Drepper2010-04-133-3/+6
| | | | | | | | | | As I wrote when accepting the patches, there is nothing innovative in these patches. These are copies of the files from other archs with SH-specific data filled in from the ELF adn Dwarf spec. Attribution is given but ownership is with Red Hat. This is so far the only way since Red Hat doesn't have an assignment process in place yet.
* Complete SH port.Matt Fleming2010-04-107-1/+459
|
* Accept R_ARM_PC24 and R_ARM_ABS32 in EXEC|DYN too.Roland McGrath2010-04-072-3/+7
|
* Support new x86-64 relocations.Ulrich Drepper2010-03-042-0/+7
|
* Tweak backends makefile rules to avoid make -j bug.Roland McGrath2010-02-182-10/+15
|
* Clean up and consolidate automake magic to reduce duplication and to work ↵Roland McGrath2010-02-152-28/+10
| | | | with --disable-dependency-tracking.
* Use dwarf_aggregate_size in backend return_value functions. Observe ↵Roland McGrath2010-01-057-38/+100
| | | | DW_AT_GNU_vector on powerpc return_value type.
* Make readelf -n check note name strings, handle "VMCOREINFO" flavor.Roland McGrath2010-01-044-13/+64
|
* Fix backends/sparc_retval.c license header.Mark Wielaard2009-09-102-10/+26
|
* Add missing x86-64 reloc types.Roland McGrath2009-08-072-0/+11
|
* CFI support: lookup by PC and translate into DWARF location per registerRoland McGrath2009-07-086-4/+141
|
* Add support for IRELATIVE relocations.Ulrich Drepper2009-06-013-2/+9
| | | | | That's the second part of the IFUNC support. So far x86 and x86-64 only.
* Handle ARM VFP register names.Roland McGrath2009-04-162-2/+23
|
* NT_PRXFPREG -> NT_PRXFPREGRoland McGrath2009-04-162-2/+6
|
* Nominal ARM support.Roland McGrath2009-04-1510-8/+702
|
* Update elf.h and some tables; fill in sparc backend reloc table.Roland McGrath2009-04-012-76/+93
|
* Fix last commit.Roland McGrath2009-02-151-3/+3
|
* Handle attribute tag GNU_Power_ABI_Struct_Return.Roland McGrath2009-02-152-1/+16
|
* src/Roland McGrath2008-12-035-5/+60
| | | | | | | 2008-12-02 Roland McGrath <roland@redhat.com> * readelf.c (count_dwflmod, process_file): Don't presume encoding of nonzero OFFSET argument to dwfl_getmodules.
* Fix some entries in i386_reloc.def.Ulrich Drepper2008-10-042-0/+8
|
* src/Roland McGrath2008-08-0711-10/+182
| | | | | | (find_symbol): Likewise. Convert plain number, or handle strings like "(section)+offset" or "symbol+offset".
* 0.134 itemsRoland McGrath2008-04-054-2/+51
|