This is the mail archive of the
mailing list for the elfutils project.
Re: [PATCHv1 0/2] specify a sysroot to search when examining a core file
- From: Mark Wielaard <mark at klomp dot org>
- To: Luke Diamand <ldiamand at roku dot com>
- Cc: "elfutils-devel at sourceware dot org" <elfutils-devel at sourceware dot org>
- Date: Thu, 31 Jan 2019 16:22:12 +0100
- Subject: Re: [PATCHv1 0/2] specify a sysroot to search when examining a core file
- References: <email@example.com> ,<20190129134740.GF9378@wildebeest.org> <BN7PR01MB3953544F2EDA1FB7BF6E9470B0970@BN7PR01MB3953.prod.exchangelabs.com>
(BTW. Note that HTML emails will get dropped, you should get a bounce
from the mailinglist.)
On Tue, 2019-01-29 at 19:46 +0000, Luke Diamand wrote:
> Thanks for the comments on the other emails, I'll rework my patch to
> incorporate them.
> I've got a small test case I've been using which uses a prebuilt ARM
> and MIPS(!) libc.so (from buildroot) and a core file. But I think in
> theory it ought to be possible to fake something up with a purely
> source code based test. Perhaps create a shared library which dumps
> core, and play around with the rpath?
> Is there an existing test case you would suggest that I start from?
> I'll have a look.
To test cross arch things it is sometimes just necessary to include
precompiled binaries in the test files (hopefully as small as possible
For example the tests/run-backtrace-core-<arch>.sh tests include such
# executable generated by:
# gcc -D_GNU_SOURCE -I. -I.. -I../lib -m32 -pthread -static -g \
# -o backtrace.ppc.exec backtrace-child.c
# core generated by:
# ./backtrace.ppc.exec --gencore
tests/backtrace-subr.sh has some overly complicated code to generate a
core file for the run-backtrace-native-core.sh testcase.
For none-core, running native tests you could look at
All these are slightly fragile though.