From: Aleksei Vetrov
This method allows to read and report ELF from memory instead of opening
a file. That way arbitrary memory can be worked with, e.g. when coming
from a stream without the need to persist.
Another useful application is for fuzzing, because fuzzers might be able
to track access
Signed-off-by: Yonggang Luo
---
.gitignore | 1 +
CMakeLists.txt | 47 +
libelf/CMakeLists.txt| 192 +++
libelf/config-cmake/config.h | 27 +
4 files changed, 267 insertions(+)
create mode 100644 CMakeLists.t
Signed-off-by: Yonggang Luo
---
lib/system.h | 4 ++--
libcpu/i386_disasm.c | 2 +-
libcpu/memory-access.h | 26 +-
libcpu/riscv_disasm.c| 2 +-
libdw/memory-access.h| 8
lib
All of these files either #include directly or #include "libelfP.h"
And now "libelfP.h also #include , so the platform depended include
can be moved to system.h safely
Signed-off-by: Yonggang Luo
---
lib/system.h | 11 +++
libebl/eblmachineflagname.c | 1 -
libebl/eb
Signed-off-by: Yonggang Luo
---
debuginfod/debuginfod.cxx | 1 -
lib/color.c | 1 -
lib/printversion.c| 1 -
lib/xasprintf.c | 1 -
lib/xmalloc.c | 1 -
libasm/asm_end.c | 1 -
libasm/asm_error.c| 1 -
libasm/asm_newscn.c | 1 -
l
Signed-off-by: Yonggang Luo
---
configure.ac | 1 +
lib/system.h | 61 +-
lib/system_win32.c| 162 ++
libelf/elf32_updatefile.c | 3 +-
libelf/elf_begin.c| 7 +-
libelf/elf_end.c | 2 +
lib
After these changes, now libelf can be build with mingw/gcc and msvc/clang
Yonggang Luo (7):
Rename 'hello2.spec.' -> 'hello2.spec' 'hello3.spec.' -> 'hello3.spec'
move platform depended include into system.h
lib: Use NOT_HAVE_LIBINTL to guard if need #include
Remove duplicated #include
Signed-off-by: Yonggang Luo
---
lib/eu-config.h | 8
1 file changed, 8 insertions(+)
diff --git a/lib/eu-config.h b/lib/eu-config.h
index c7d7cbb2..5e6c3c72 100644
--- a/lib/eu-config.h
+++ b/lib/eu-config.h
@@ -52,9 +52,17 @@
# define rwlock_unlock(lock) ((void) (lock))
#endif /* USE
These filenames are invalid on win32
Signed-off-by: Yonggang Luo
---
tests/Makefile.am | 2 +-
tests/debuginfod-rpms/{hello2.spec. => hello2.spec} | 0
tests/debuginfod-rpms/{hello3.spec. => hello3.spec} | 0
3 files changed, 1 insertion(+), 1 deletion(-)
renam