objtool: Rename elf_open() to prevent conflict with libelf from elftoolchain

The elftoolchain version of libelf has a function named elf_open().

The function name isn't quite accurate anyway, since it also reads all
the ELF data.  Rename it to elf_read(), which is more accurate.

[ jpoimboe: rename to elf_read(); write commit description ]

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/7ce2d1b35665edf19fd0eb6fbc0b17b81a48e62f.1562793604.git.jpoimboe@redhat.com
This commit is contained in:
Michael Forney
2019-07-10 16:20:11 -05:00
committed by Thomas Gleixner
parent 3c3ea50317
commit 8e144797f1
3 changed files with 3 additions and 3 deletions

View File

@@ -2407,7 +2407,7 @@ int check(const char *_objname, bool orc)
objname = _objname;
file.elf = elf_open(objname, orc ? O_RDWR : O_RDONLY);
file.elf = elf_read(objname, orc ? O_RDWR : O_RDONLY);
if (!file.elf)
return 1;