This is the mail archive of the
elfutils-devel@sourceware.org
mailing list for the elfutils project.
Re: How to use test-nlist
On Fri, May 24, 2019 at 02:45:21PM +0800, Yu, Mingli wrote:
> And I noticed the source code and already run as "./test-nlist", but Seems
> it doesn't work as expected.
> # ./test-nlist
> # echo $?
> 1
> # ./test-nlist -d
> nl[0].n_name = "var"
> nl[0].n_value = 0
> nl[0].n_scnum = 0
> nl[0].n_type = 0
> nl[0].n_sclass = 0
> nl[0].n_numaux = 0
> [...]
Right. And that is because...
> > > For some reason your test-nlist doesn't have an .symtab.
> > > Make sure that when you build the tests CLFAGS contains -g.
> > > And the that test binary isn't accidentially stripped afterwards.
Make sure you fix that and the test will pass.
Cheers,
Mark