]> git.ipfire.org Git - thirdparty/elfutils.git/commit
nm: Simplify naming of invalid sections, check shdr isn't NULL.
authorMark Wielaard <mark@klomp.org>
Sun, 28 Apr 2019 15:51:06 +0000 (17:51 +0200)
committerMark Wielaard <mark@klomp.org>
Sun, 28 Apr 2019 15:51:06 +0000 (17:51 +0200)
commit207d8ec3778a3101ee1b8ece9c63c0ff97450789
tree42b7287ea890fb9c9a1ee7fa29345f58a0183117
parentb3383bb128c6984d49542951bffa15d3decc7ec0
nm: Simplify naming of invalid sections, check shdr isn't NULL.

When shdr is NULL or the sh_name index is invalid, don't try to use
it.  Just call the section "[invalid section name]". Don't try to be
too smart by creating a dynamic invalid name using alloca to simplify
memory usage in this exceptional case.

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