[PATCH] libdwfl: add dwfl_report_offline_memory

2022-09-20 Thread Aleksei Vetrov via Elfutils-devel
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

[PATCH 7/7] Add CMake build files

2022-09-20 Thread Yonggang Luo via Elfutils-devel
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

[PATCH 5/7] Strip __ prefix from __BYTE_ORDER __LITTLE_ENDIAN and __BIG_ENDIAN

2022-09-20 Thread Yonggang Luo via Elfutils-devel
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

[PATCH 2/7] move platform depended include into system.h

2022-09-20 Thread Yonggang Luo via Elfutils-devel
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

[PATCH 4/7] Remove duplicated #include

2022-09-20 Thread Yonggang Luo via Elfutils-devel
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

[PATCH 6/7] Fixes building with msvc/clang mingw/gcc

2022-09-20 Thread Yonggang Luo via Elfutils-devel
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

[PATCH 0/7] Enable building libelf of elfutils on win32

2022-09-20 Thread Yonggang Luo via Elfutils-devel
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

[PATCH 3/7] lib: Use NOT_HAVE_LIBINTL to guard if need #include

2022-09-20 Thread Yonggang Luo via Elfutils-devel
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

[PATCH 1/7] Rename 'hello2.spec.' -> 'hello2.spec' 'hello3.spec.' -> 'hello3.spec'

2022-09-20 Thread Yonggang Luo via Elfutils-devel
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