projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2a00f02
)
objtool: Add fallback from ELF_C_READ_MMAP to ELF_C_READ
author
Arnaldo Carvalho de Melo
<
[email protected]
>
Wed, 13 Jul 2016 18:28:51 +0000
(15:28 -0300)
committer
Arnaldo Carvalho de Melo
<
[email protected]
>
Wed, 13 Jul 2016 18:38:50 +0000
(15:38 -0300)
Not all libelf implementations have this "Please, ELF_C_READ, but use
mmap if possible" elf_begin() cmd, so provide a fallback to plain old
ELF_C_READ.
Case in point: Alpine Linux 3.4.
Cc: Adrian Hunter <
[email protected]
>
Cc: David Ahern <
[email protected]
>
Cc: Jiri Olsa <
[email protected]
>
Cc: Josh Poimboeuf <
[email protected]
>
Cc: Namhyung Kim <
[email protected]
>
Cc: Wang Nan <
[email protected]
>
Link:
http://lkml.kernel.org/n/
[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <
[email protected]
>
tools/objtool/elf.c
patch
|
blob
|
history
diff --git
a/tools/objtool/elf.c
b/tools/objtool/elf.c
index e11f6b69cce67e05b16c31767fbf36a8f68f0af4..0d7983ac63ef9e300110d9a6ec6771a75378784e 100644
(file)
--- a/
tools/objtool/elf.c
+++ b/
tools/objtool/elf.c
@@
-30,6
+30,13
@@
#include "elf.h"
#include "warn.h"
+/*
+ * Fallback for systems without this "read, mmaping if possible" cmd.
+ */
+#ifndef ELF_C_READ_MMAP
+#define ELF_C_READ_MMAP ELF_C_READ
+#endif
+
struct section *find_section_by_name(struct elf *elf, const char *name)
{
struct section *sec;