objtool: Use Elf_Scn typedef instead of assuming struct name
authorMichael Forney <mforney@mforney.org>
Wed, 10 Jul 2019 21:17:35 +0000 (16:17 -0500)
committerThomas Gleixner <tglx@linutronix.de>
Wed, 17 Jul 2019 22:50:14 +0000 (00:50 +0200)
The libelf implementation might use a different struct name, and the
Elf_Scn typedef is already used throughout the rest of objtool.

Signed-off-by: Michael Forney <mforney@mforney.org>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/d270e1be2835fc2a10acf67535ff2ebd2145bf43.1562793448.git.jpoimboe@redhat.com
tools/objtool/elf.c

index e99e1be19ad9b54c86fc7c561231ea081e3c33ee..76e4f7ceab821627fc0fbe9b94d336958772320b 100644 (file)
@@ -463,7 +463,7 @@ struct section *elf_create_section(struct elf *elf, const char *name,
 {
        struct section *sec, *shstrtab;
        size_t size = entsize * nr;
-       struct Elf_Scn *s;
+       Elf_Scn *s;
        Elf_Data *data;
 
        sec = malloc(sizeof(*sec));