summaryrefslogtreecommitdiffstats
path: root/libebl/libebl.h
Commit message (Collapse)AuthorAgeFilesLines
* libebl: new backend attribute ra_offset.Jose E. Marchesi2016-01-031-0/+6
| | | | | | | | Some backends need to fine-tune the return address as fetched from the corresponding CFI register. This patch adds a new backend attribute ra_offset and the corresponding ebl_ra_offset getter function. Signed-off-by: Jose E. Marchesi <jose.marchesi@oracle.com>
* s/Really, not guarantee/Really, no guarantee/gMark Wielaard2015-01-271-1/+1
| | | | Signed-off-by: Mark Wielaard <mjw@redhat.com>
* libebl.h: Add comment from README that this is completely UNSUPPORTED.Mark Wielaard2015-01-271-1/+14
| | | | | | | Make it really, really clear that the libebl interface is NOT source and NOT abi compatible and we will break any users. Signed-off-by: Mark Wielaard <mjw@redhat.com>
* Use elf_getphdrnum instead of accessing ehdr->e_phnum directly.Mark Wielaard2014-11-261-1/+1
| | | | | | | Using elf_getphdrnum lets us handle ELF files that use more than PN_XNUM phdrs. And guards against some corrupt files. Signed-off-by: Mark Wielaard <mjw@redhat.com>
* libebl: Add ebl_func_addr_mask plus ARM backend implementation.Mark Wielaard2014-06-221-1/+12
| | | | | | | | | | | | | | The ARM EABI says that the zero bit of function symbol st_value indicates whether the symbol points to a THUMB or ARM function. Also the return value address in an unwind will contain the same extra bit to indicate whether to return to a regular ARM or THUMB function. Add a new ebl function to mask off such bits and turn a function value into a function address so that we get the actual value that a function symbol or return address points to. It isn't easily possible to reuse the existing ebl_resolve_sym_value for this purpose, so we end up with another hook that can be used from dwfl_module_getsym, handle_cfi and elflint. Signed-off-by: Mark Wielaard <mjw@redhat.com>
* backends: Add ebl_check_reloc_target_type.Mark Wielaard2014-05-191-0/+3
| | | | | | | | | And implement for arm and ia64. Both have special section types that are valid targets for a reloc. Both refer to unwind data. elflint now just calls ebl_check_reloc_target_type instead of hard coding the expected section types. Signed-off-by: Mark Wielaard <mjw@redhat.com>
* libdwfl: Introduce dwfl_module_getsym_info and dwfl_module_addrinfo.Mark Wielaard2013-12-201-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* unwinder: s390 and s390xJan Kratochvil2013-12-181-0/+29
| | | | Signed-off-by: Jan Kratochvil <jan.kratochvil@redhat.com>
* unwinder: ppc and ppc64Jan Kratochvil2013-12-151-1/+9
| | | | Signed-off-by: Jan Kratochvil <jan.kratochvil@redhat.com>
* Code cleanup: Remove const in prototypeJan Kratochvil2013-11-141-4/+2
| | | | Signed-off-by: Jan Kratochvil <jan.kratochvil@redhat.com>
* Unwinder for x86*.Jan Kratochvil2013-11-071-1/+21
| | | | | 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-071-0/+5
| | | | | | | | | | | | | | | 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>
* libebl/Jan Kratochvil2012-10-121-1/+4
| | | | | | | | | | 2012-10-12 Jan Kratochvil <jan.kratochvil@redhat.com> * ebl-hooks.h (abi_cfi): Extend its comment for return value. * eblopenbackend.c (default_abi_cfi): Return -1. * libebl.h (ebl_abi_cfi): Extend its comment for return value. Signed-off-by: Jan Kratochvil <jan.kratochvil@redhat.com>
* Update name, license and contributor policy.Mark Wielaard2012-06-051-40/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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 support for printing SDT elf notes.Mark Wielaard2011-04-261-2/+3
| | | | | | | | | | | | | libebl/ * libebl.h (ebl_object_note_type_name): Add const char *name arg. * eblhooks.h (object_note_type_name): Likewise. * eblopenbackend.c (default_object_note_type_name): Likewise. * eblobjnotetypename.c (ebl_object_note_type_name): Likewise. And print version if name is "stapsdt". * eblobjnote.c (ebl_object_note): Add output for "stapsdt" notes. src/ * readelf.c (handle_notes_data): Call ebl_object_note_type_name with note name.
* Add new ebl_check_st_other_bits function.Mark Wielaard2011-03-111-0/+3
|
* Make readelf -n check note name strings, handle "VMCOREINFO" flavor.Roland McGrath2010-01-041-5/+5
|
* CFI support: lookup by PC and translate into DWARF location per registerRoland McGrath2009-07-081-1/+33
|
* src/Roland McGrath2008-08-071-0/+7
| | | | | | (find_symbol): Likewise. Convert plain number, or handle strings like "(section)+offset" or "symbol+offset".
* backends/Roland McGrath2008-04-011-0/+6
| | | | | | | | | | | * sparc_symbol.c (sparc_symbol_type_name): New function. (sparc_dynamic_tag_name): New function. (sparc_dynamic_tag_check): New function. * sparc_init.c (sparc_init): Initialize those hooks. libebl/ * ebldynamictagname.c (ebl_dynamic_tag_name): Use hex for unknown tag.
* Finish elflint .gnu.attributes checkingRoland McGrath2008-02-211-1/+10
|
* readelf register printing sort order tweakRoland McGrath2007-08-231-4/+37
|
* propagate from branch 'com.redhat.elfutils.roland.pending' (head ↵Ulrich Drepper2007-02-051-1/+4
| | | | | | c44dcfac5b545aecb173fede31f34cb003be0173) to branch 'com.redhat.elfutils' (head 4196d4e01486bdeb0c0632291881d1c6d7163fab)
* 2006-10-09 Roland McGrath <roland@redhat.com>Roland McGrath2006-10-101-3/+4
| | | | | * ia64_symbol.c (ia64_reloc_simple_type): Treat SECREL types as simple.
* merge of 2d5572f10b65f0ac7fdf54361b4dae41ebbd51d0Ulrich Drepper2006-07-071-0/+6
| | | | and fda3a25581b7bfac581504e9e887e9b97f234f86
* New spec file.Ulrich Drepper2006-06-151-6/+0
|
* Linker work.Ulrich Drepper2006-07-051-0/+6
| | | | | GNU hash support. 64-bit SysV hash support.
* Don't create INTERP and PHDR program header entry if a DSO is created withoutUlrich Drepper2006-06-121-0/+3
| | | | | | | | | | a specific interpreter. Ignore duplicate COMDAT group sections. elflint should not complain about anything about *_NONE relocations. Add support to libebl to determine whether given relocation is *_NONE relocation.
* Add extern "C" for libdwfl.h and libebl.h.Ulrich Drepper2006-05-271-1/+9
|
* Fix FSF address. No exception for libdwarf.Ulrich Drepper2006-04-041-1/+1
|
* propagate from branch 'com.redhat.elfutils.roland.pending' (head ↵Ulrich Drepper2006-04-041-10/+46
| | | | | | 4f8fc821345feef58624f0aa5b470d4827577d8c) to branch 'com.redhat.elfutils' (head 76e26cb54695fd3b21ee8fb5be3036bd68200633)
* merge of 2cc527e6d8c8ff19dab478f7d12e58f1cfa6d6f5Roland McGrath2005-12-051-0/+14
| | | | and 7b542932f3e2947183b45bdbf39d448f457da9fd
* Update new test after merge.Roland McGrath2005-11-171-0/+14
|
* 2005-11-16 Roland McGrath <roland@redhat.com>Roland McGrath2005-11-161-1/+1
| | | | | * libebl.h: Use "" for elf-knowledge.h, not <>.
* Minor cleanups of last changes to elflint and libebl to supportUlrich Drepper2005-08-131-2/+2
| | | | clean ppc/ppc64 handling.
* libebl/Roland McGrath2005-08-131-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2005-08-12 Roland McGrath <roland@redhat.com> * libeblP.h (struct ebl): Add bss_plt_p hook. * eblopenbackend.c (default_bss_plt_p): New function. (fill_defaults): Use it. * eblbsspltp.c: New file. * Makefile.am (gen_SOURCES): Add it. * libebl.h: Declare ebl_bss_plt_p. * ppc_symbol.c (ppc_bss_plt_p): New function. * libebl_ppc.h: Declare it. * ppc_init.c (ppc_init): Use it. * ppc64_symbol.c (ppc64_bss_plt_p): New function. * libebl_ppc64.h: Declare it. * ppc64_init.c (ppc64_init): Use it. * ebl_check_special_symbol.c: New file. * Makefile.am (gen_SOURCES): Add it. * libebl.h: Declare ebl_check_special_symbol. * libeblP.h (struct ebl): Add check_special_symbol hook. * eblopenbackend.c (default_check_special_symbol): New function. (fill_defaults): Use it. * ppc_symbol.c (ppc_check_special_symbol): New function. * libebl_ppc.h: Add prototype. * ppc_init.c (ppc_init): Use it. * ppc64_symbol.c (ppc64_check_special_symbol): New function. * libebl_ppc64.h: Add prototype. * ppc64_init.c (ppc64_init): Use it. src/ 2005-08-12 Roland McGrath <roland@redhat.com> * elflint.c (check_symtab): Check that _GLOBAL_OFFSET_TABLE_ st_shndx refers to the right section if it's not SHN_ABS. Let ebl_check_special_symbol override _G_O_T_ value and size checks. * elflint.c (check_sections): Don't complain about a non-NOBITS section taking no segment space, if it's sh_size is 0. * elflint.c (check_sections): Use ebl_bss_plt_p to see if .plt should be PROGBITS or NOBITS. * elflint.c (check_symtab): Use ebl_check_special_symbol to override standard st_value and st_size checks.
* Add some patches from the disasm-branch branch.Ulrich Drepper2005-08-031-0/+12
| | | | | The asm_begin interface changed. In text mode output is really written to the file.
* Adjust for monotone.Ulrich Drepper2005-07-261-0/+208