]> git.ipfire.org Git - thirdparty/elfutils.git/commit
tests: Check symtabshdr instead of symtabndx in elfstrmerge.c.
authorMark Wielaard <mark@klomp.org>
Thu, 25 Jan 2018 13:37:17 +0000 (14:37 +0100)
committerMark Wielaard <mark@klomp.org>
Thu, 25 Jan 2018 13:37:17 +0000 (14:37 +0100)
commit4407903a7433327dbeda74519d036fc82ef64de3
tree1ad3284b16d1ebbc02eff82a1e5a0600a552b89b
parente98f032d293a8ea8ea2b25949d7f452603e644d9
tests: Check symtabshdr instead of symtabndx in elfstrmerge.c.

Some gcc omptimization levels (-Og in particular) didn't see that when
symtabndx != 0, then symtabshdr was certain to be initialized. Change
the symtabndx == 0 check to symtabshdr == NULL and initialize symtabshdr
to work around that.

Signed-off-by: Mark Wielaard <mark@klomp.org>
tests/ChangeLog
tests/elfstrmerge.c