objtool: Fix seg fault with clang-compiled objects
commitce90aaf5cde4ce057b297bb6c955caf16ef00ee6
authorSimon Ser <contact@emersion.fr>
Sat, 30 Dec 2017 20:43:32 +0000 (30 14:43 -0600)
committerIngo Molnar <mingo@kernel.org>
Sat, 30 Dec 2017 21:04:17 +0000 (30 22:04 +0100)
tree70b8105963826293a1a65d1271d3162ef91c4dba
parentd89e426499cf36b96161bd32970d6783f1fbcb0e
objtool: Fix seg fault with clang-compiled objects

Fix a seg fault which happens when an input file provided to 'objtool
orc generate' doesn't have a '.shstrtab' section (for instance, object
files produced by clang don't have this section).

Signed-off-by: Simon Ser <contact@emersion.fr>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/c0f2231683e9bed40fac1f13ce2c33b8389854bc.1514666459.git.jpoimboe@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
tools/objtool/orc_gen.c