diff options
author | Michael Forney <mforney@mforney.org> | 2019-07-10 17:20:11 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2019-07-17 18:50:14 -0400 |
commit | 8e144797f1a67c52e386161863da4614a23ad913 (patch) | |
tree | 612c3cd98ac5ccb5c4940edb498059d6e2c7d334 /tools/objtool | |
parent | 3c3ea5031761fdd144b461d23a077c3a0cf427fa (diff) |
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
Diffstat (limited to 'tools/objtool')
-rw-r--r-- | tools/objtool/check.c | 2 | ||||
-rw-r--r-- | tools/objtool/elf.c | 2 | ||||
-rw-r--r-- | tools/objtool/elf.h | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/tools/objtool/check.c b/tools/objtool/check.c index 172f99195726..de8f40730b37 100644 --- a/tools/objtool/check.c +++ b/tools/objtool/check.c | |||
@@ -2407,7 +2407,7 @@ int check(const char *_objname, bool orc) | |||
2407 | 2407 | ||
2408 | objname = _objname; | 2408 | objname = _objname; |
2409 | 2409 | ||
2410 | file.elf = elf_open(objname, orc ? O_RDWR : O_RDONLY); | 2410 | file.elf = elf_read(objname, orc ? O_RDWR : O_RDONLY); |
2411 | if (!file.elf) | 2411 | if (!file.elf) |
2412 | return 1; | 2412 | return 1; |
2413 | 2413 | ||
diff --git a/tools/objtool/elf.c b/tools/objtool/elf.c index 76e4f7ceab82..e18698262837 100644 --- a/tools/objtool/elf.c +++ b/tools/objtool/elf.c | |||
@@ -401,7 +401,7 @@ static int read_relas(struct elf *elf) | |||
401 | return 0; | 401 | return 0; |
402 | } | 402 | } |
403 | 403 | ||
404 | struct elf *elf_open(const char *name, int flags) | 404 | struct elf *elf_read(const char *name, int flags) |
405 | { | 405 | { |
406 | struct elf *elf; | 406 | struct elf *elf; |
407 | Elf_Cmd cmd; | 407 | Elf_Cmd cmd; |
diff --git a/tools/objtool/elf.h b/tools/objtool/elf.h index e44ca5d51871..2fe0b0aa741d 100644 --- a/tools/objtool/elf.h +++ b/tools/objtool/elf.h | |||
@@ -74,7 +74,7 @@ struct elf { | |||
74 | }; | 74 | }; |
75 | 75 | ||
76 | 76 | ||
77 | struct elf *elf_open(const char *name, int flags); | 77 | struct elf *elf_read(const char *name, int flags); |
78 | struct section *find_section_by_name(struct elf *elf, const char *name); | 78 | struct section *find_section_by_name(struct elf *elf, const char *name); |
79 | struct symbol *find_symbol_by_offset(struct section *sec, unsigned long offset); | 79 | struct symbol *find_symbol_by_offset(struct section *sec, unsigned long offset); |
80 | struct symbol *find_symbol_by_name(struct elf *elf, const char *name); | 80 | struct symbol *find_symbol_by_name(struct elf *elf, const char *name); |