* [PATCH] objtool: Rename elf_open() to prevent conflict with libelf from elftoolchain
@ 2019-07-10 21:20 Josh Poimboeuf
2019-07-17 23:10 ` [tip:core/urgent] " tip-bot for Michael Forney
0 siblings, 1 reply; 2+ messages in thread
From: Josh Poimboeuf @ 2019-07-10 21:20 UTC (permalink / raw)
To: x86; +Cc: linux-kernel, Peter Zijlstra, Michael Forney
From: Michael Forney <mforney@mforney.org>
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>
---
tools/objtool/check.c | 2 +-
tools/objtool/elf.c | 2 +-
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)
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;
diff --git a/tools/objtool/elf.c b/tools/objtool/elf.c
index e99e1be19ad9..1121926bdc1b 100644
--- a/tools/objtool/elf.c
+++ b/tools/objtool/elf.c
@@ -401,7 +401,7 @@ static int read_relas(struct elf *elf)
return 0;
}
-struct elf *elf_open(const char *name, int flags)
+struct elf *elf_read(const char *name, int flags)
{
struct elf *elf;
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 {
};
-struct elf *elf_open(const char *name, int flags);
+struct elf *elf_read(const char *name, int flags);
struct section *find_section_by_name(struct elf *elf, const char *name);
struct symbol *find_symbol_by_offset(struct section *sec, unsigned long offset);
struct symbol *find_symbol_by_name(struct elf *elf, const char *name);
--
2.20.1
^ permalink raw reply [flat|nested] 2+ messages in thread* [tip:core/urgent] objtool: Rename elf_open() to prevent conflict with libelf from elftoolchain
2019-07-10 21:20 [PATCH] objtool: Rename elf_open() to prevent conflict with libelf from elftoolchain Josh Poimboeuf
@ 2019-07-17 23:10 ` tip-bot for Michael Forney
0 siblings, 0 replies; 2+ messages in thread
From: tip-bot for Michael Forney @ 2019-07-17 23:10 UTC (permalink / raw)
To: linux-tip-commits; +Cc: hpa, jpoimboe, linux-kernel, mforney, mingo, tglx
Commit-ID: 8e144797f1a67c52e386161863da4614a23ad913
Gitweb: https://git.kernel.org/tip/8e144797f1a67c52e386161863da4614a23ad913
Author: Michael Forney <mforney@mforney.org>
AuthorDate: Wed, 10 Jul 2019 16:20:11 -0500
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Thu, 18 Jul 2019 00:50:14 +0200
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
---
tools/objtool/check.c | 2 +-
tools/objtool/elf.c | 2 +-
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)
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;
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)
return 0;
}
-struct elf *elf_open(const char *name, int flags)
+struct elf *elf_read(const char *name, int flags)
{
struct elf *elf;
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 {
};
-struct elf *elf_open(const char *name, int flags);
+struct elf *elf_read(const char *name, int flags);
struct section *find_section_by_name(struct elf *elf, const char *name);
struct symbol *find_symbol_by_offset(struct section *sec, unsigned long offset);
struct symbol *find_symbol_by_name(struct elf *elf, const char *name);
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-07-17 23:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-10 21:20 [PATCH] objtool: Rename elf_open() to prevent conflict with libelf from elftoolchain Josh Poimboeuf
2019-07-17 23:10 ` [tip:core/urgent] " tip-bot for Michael Forney
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome