summaryrefslogtreecommitdiffstats
path: root/backends/ppc64_init.c
Commit message (Collapse)AuthorAgeFilesLines
* backends: Use elf_getshdrstrndx to find .odp section in ppc64_initMark Wielaard2018-09-131-2/+4
| | | | | | | | | The .odp section is found by name. But ppc64_init used the e_shstrndx Ehdr field for that. This is wrong if the file contains more than SHN_LORESERVE sections. Use elf_getshdrstrndx instead to find the shstrtab section. Signed-off-by: Mark Wielaard <[email protected]>
* ppc64: Add minimal fallback unwinder.Mark Wielaard2017-06-121-0/+1
| | | | | | | | | | | | | This adds a minimal fallback unwinder for ppc64[le] in case we cannot find CFI for a particular address. It simply always sets the program counter to the link register, picks the previous stack pointer from the backchain, and the previous link register from the LR save area. This is enough for some simple situations when we don't have CFI and seems to work nicely in the case of perf with libdw powerpc support: https://lkml.org/lkml/2017/5/18/998 Signed-off-by: Mark Wielaard <[email protected]>
* backends: Add support for EM_PPC64 GNU_ATTRIBUTES.Mark Wielaard2017-03-241-0/+1
| | | | | | | | ppc64 and ppc64le ELF files can also contain a power specific .gnu.attributes section. Add support for those and recognize the new GNU_Power_ABI_FP Single-precision hard float value. Signed-off-by: Mark Wielaard <[email protected]>
* Replace some K&R function definitions with ansi-C definitions.Chih-Hung Hsieh2015-09-071-5/+4
| | | | | Signed-off-by: Chih-Hung Hsieh <[email protected]> Signed-off-by: Mark Wielaard <[email protected]>
* Check elf_strptr didn't fail getting section name.Mark Wielaard2014-11-171-6/+9
| | | | | | | | Since elf_strptr can fail and return NULL we should always check the result before usage. Debug sections are only handled by section name, so make sure the name actually exists. Signed-off-by: Mark Wielaard <[email protected]>
* Add ppc64le ELFv2 abi support to backends and elflint.Mark Wielaard2014-07-041-0/+1
| | | | | | | | | | The big endian vs little endian changes are already handled by detecting the EI_DATA data encoding. And the function descriptors are already not used when we see there is no .opd section. This change adds new checks for st_other bits, new relocations and recognizes DT_PPC64_OPT. Signed-off-by: Menanteau Guy <[email protected]> Signed-off-by: Mark Wielaard <[email protected]>
* backends: Add PPC64 machine_flag_check.Mark Wielaard2014-01-041-1/+2
| | | | | | | | | | 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 <[email protected]>
* libdwfl: Introduce dwfl_module_getsym_info and dwfl_module_addrinfo.Mark Wielaard2013-12-201-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <[email protected]>
* unwinder: ppc and ppc64Jan Kratochvil2013-12-151-0/+4
| | | | Signed-off-by: Jan Kratochvil <[email protected]>
* backends: Hook abi_cfi for ppc and s390.Jan Kratochvil2013-09-021-1/+2
| | | | | Signed-off-by: Jan Kratochvil <[email protected]> Signed-off-by: Mark Wielaard <[email protected]>
* Update name, license and contributor policy.Mark Wielaard2012-06-051-16/+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 <[email protected]> Signed-off-by: Mark Wielaard <[email protected]>
* src/Roland McGrath2008-08-071-1/+2
| | | | | | (find_symbol): Likewise. Convert plain number, or handle strings like "(section)+offset" or "symbol+offset".
* readelf register printing sort order tweakRoland McGrath2007-08-231-1/+3
|
* 2006-10-09 Roland McGrath <[email protected]>Roland McGrath2006-10-101-2/+2
| | | | | * ia64_symbol.c (ia64_reloc_simple_type): Treat SECREL types as simple.
* 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-9/+21
| | | | | | 4f8fc821345feef58624f0aa5b470d4827577d8c) to branch 'com.redhat.elfutils' (head 76e26cb54695fd3b21ee8fb5be3036bd68200633)
* merge of 2cc527e6d8c8ff19dab478f7d12e58f1cfa6d6f5Roland McGrath2005-12-051-0/+1
| | | | and 7b542932f3e2947183b45bdbf39d448f457da9fd
* 2005-11-18 Roland McGrath <[email protected]>Roland McGrath2005-11-191-7/+7
| | | | | | | | | | | | | | * alpha_init.c: Use HOOK macro. * arm_init.c: Likewise. * i386_init.c: Likewise. * ia64_init.c: Likewise. * ppc64_init.c: Likewise. * ppc_init.c: Likewise. * s390_init.c: Likewise. * sh_init.c: Likewise. * sparc_init.c: Likewise. * x86_64_init.c: Likewise.
* Update new test after merge.Roland McGrath2005-11-171-0/+50