On 2019年05月24日 15:00, Mark Wielaard wrote:
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.
Thanks Mark very much!
In fact, the package always build with -g, but I just split the debug
info to another package elfutils-dbg, and now the test pass if not split
the debug info to the elfutils-dbg package.
Thanks,
Cheers,
Mark