[Bug backends/21541] New: eu-readelf --notes fails to dump PRSTATUS data?
https://sourceware.org/bugzilla/show_bug.cgi?id=21541 Bug ID: 21541 Summary: eu-readelf --notes fails to dump PRSTATUS data? Product: elfutils Version: unspecified Status: UNCONFIRMED Severity: normal Priority: P2 Component: backends Assignee: unassigned at sourceware dot org Reporter: myocytebd at sina dot com CC: elfutils-devel at sourceware dot org Target Milestone: --- Created attachment 10081 --> https://sourceware.org/bugzilla/attachment.cgi?id=10081&action=edit The core file mentioned Version: latest master I built elfutils with --prefix with a non-default path. Native build on x64. Problem: Run eu-readelf --notes core.dump The core-dump is generated from a x64 program. A. The one I built cannot dump details PRSTATUS data. B. On another machine, distribution shipped elfutils-0.158 dumps details of PRSTATUS data for the same core-dump. I have no glue where it is wrong. (Or the core file is broken?) There seems to be no relevant configure options. At runtime eu-readelf doesn't tell why it does not dump details of PRSTATUS. config report: = elfutils: 0.169 (eu_version: 169) = Prefix : /home/xxx/ins Program prefix ("eu-" recommended) : eu- Source code location : . Maintainer mode: libebl modules subdirectory: elfutils build arch : x86_64-unknown-linux-gnu RECOMMENDED FEATURES (should all be yes) gzip support : yes bzip2 support : yes lzma/xz support: yes libstdc++ demangle support : yes File textrel check : yes Symbol versioning : yes NOT RECOMMENDED FEATURES (should all be no) Experimental thread safety : no OTHER FEATURES Deterministic archives by default : false Native language support: yes EXTRA TEST FEATURES (used with make check) have bunzip2 installed (required) : yes debug branch prediction: no gprof support : no gcov support : no run all tests under valgrind : no gcc undefined behaviour sanitizer : no use rpath in tests : no test biarch: no -- You are receiving this mail because: You are on the CC list for the bug.
[Bug backends/21541] eu-readelf --notes fails to dump PRSTATUS data?
https://sourceware.org/bugzilla/show_bug.cgi?id=21541 --- Comment #2 from myocytebd at sina dot com --- (In reply to Mark Wielaard from comment #1) > Since you are installing in a non-standard location make sure PATH and > LD_LIBRARY_PATH are setup correctly so the correct version of the binaries, > libraries and backends are picked up. > > In your case it should probably be > export PATH=/home/xxx/ins/bin:$PATH > export LD_LIBRARY_PATH=/home/xxx/ins/lib:/home/xxx/ins/lib/elfutils I checked that it is using the correct libdw/libelf. I patched rpath of eu-readelf(In reply to Mark Wielaard from comment #1) > Since you are installing in a non-standard location make sure PATH and > LD_LIBRARY_PATH are setup correctly so the correct version of the binaries, > libraries and backends are picked up. > > In your case it should probably be > export PATH=/home/xxx/ins/bin:$PATH > export LD_LIBRARY_PATH=/home/xxx/ins/lib:/home/xxx/ins/lib/elfutils Thanks. /home/xxx/ins/lib/elfutils => This is the problem. I looked at: libebl/eblopenbackend.c, and found openbackend() implementation surprising: 1. It doesn't try relative path from the executable. 2. It doesn't try the path from --prefix. 3. When it failed to load, it doesn't print any message. -- You are receiving this mail because: You are on the CC list for the bug.