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
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
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
---
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
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
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
---
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
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
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 +++
libelf/common.h | 3 ---
libelf/
After these changes, now libelf can be build with mingw/gcc and msvc/clang
v1 -> v2
Do no modify libebl in commit move platform depended include into system.h of
libelf
Add commit Move the #include into eu-config.h to
Yonggang Luo (7):
Rename 'hello2.spec.' -> 'hello2.spec' 'hello3.spec.' ->
So we do not need include in each file.
And indeed the macro
#define _(Str) dgettext ("elfutils", Str)
access libintl function dgettext, so it's make more sense
#include in file eu-config.h
Signed-off-by: Yonggang Luo
---
debuginfod/debuginfod.cxx | 1 -
lib/color.c | 1 -
lib/eu-
Add NOT_HAVE_LIBINTL macro to disable internationalization,
sometimes we have don't want access internationalization such as MSVC,
so the macro NOT_HAVE_LIBINTL can help that.
Signed-off-by: Yonggang Luo
---
lib/eu-config.h | 7 +++
1 file changed, 7 insertions(+)
diff --git a/lib/eu-config
Signed-off-by: Yonggang Luo
---
.gitignore | 1 +
1 file changed, 1 insertion(+)
diff --git a/.gitignore b/.gitignore
index 8bcd88d7..ca06 100644
--- a/.gitignore
+++ b/.gitignore
@@ -21,6 +21,7 @@ Makefile.in
/INSTALL
/aclocal.m4
/autom4te.*
+/build
/config.cache
/config.h
/config.h.i
I split it into small patches for easier to review
Yonggang Luo (25):
Rename 'hello2.spec.' -> 'hello2.spec' 'hello3.spec.' -> 'hello3.spec'
ignore build directory
libebl: There is no need #include in eblclosebackend.c and
eblopenbackend.c
libelf/libdwfl: Remove "#define LIB_SYSTEM_H
Because all source in libebl #include , so #include in
libeblP.h is enough, there is multiple memory-access.h file, so use relative
path to
include it properly,
Signed-off-by: Yonggang Luo
-#include
-#include
#include
#include
#include
+
#include
#define AUXV_TYPES
rationale: https://sourceware.org/bugzilla/show_bug.cgi?id=21001
If we don't remove this macro, when try #include in
libdw/memory-access.h
wont' take effect because "#define LIB_SYSTEM_H 1"
The compile error:
./../libdw/memory-access.h:390:12: error: implicit declaration of function
‘bswap_32’
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
Signed-off-by: Yonggang Luo
---
lib/color.c| 1 -
libasm/asm_abort.c | 1 -
libasm/asm_addint8.c | 2 --
libasm/asm_begin.c | 2 --
libasm/asm_end.c | 2 --
libasm/libasmP.h
It's not accessed symbols in dlfcn.h in eblclosebackend.c and eblopenbackend.c
Signed-off-by: Yonggang Luo
---
libebl/eblclosebackend.c | 1 -
libebl/eblopenbackend.c | 1 -
2 files changed, 2 deletions(-)
diff --git a/libebl/eblclosebackend.c b/libebl/eblclosebackend.c
index 501e5c7b..7fa068e
Signed-off-by: Yonggang Luo
---
libcpu/i386_data.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libcpu/i386_data.h b/libcpu/i386_data.h
index 06356b8a..fe3c4ae1 100644
--- a/libcpu/i386_data.h
+++ b/libcpu/i386_data.h
@@ -1153,7 +1153,7 @@ FCT_mod$64r_m (struct output_data
Signed-off-by: Yonggang Luo
---
configure.ac | 1 +
lib/crc32_file.c | 4 ++--
lib/system.h | 2 ++
libelf/elf32_updatefile.c | 3 ++-
libelf/elf_begin.c| 5 -
libelf/elf_end.c | 2 ++
libelf/elf_update.c | 5 -
7 files changed, 17
basename function are accessed multiple place, but used without include libgen.h
Signed-off-by: Yonggang Luo
---
lib/system.h | 1 +
libdw/dwarf_getsrc_file.c| 2 +-
libdwfl/dwfl_module_getsrc_file.c| 2 +-
libdwfl/dwfl_segment_report_module.c | 2 +-
libd
Signed-off-by: Yonggang Luo
---
libdw/memory-access.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/libdw/memory-access.h b/libdw/memory-access.h
index 800b517c..16c8c851 100644
--- a/libdw/memory-access.h
+++ b/libdw/memory-access.h
@@ -29,11 +29,10 @@
#ifndef _MEMORY_AC
Signed-off-by: Yonggang Luo
---
libdw/memory-access.h | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/libdw/memory-access.h b/libdw/memory-access.h
index 16c8c851..fca4129a 100644
--- a/libdw/memory-access.h
+++ b/libdw/memory-access.h
@@ -64,7 +64,7 @@ __libdw_max_
Signed-off-by: Yonggang Luo
---
libcpu/Makefile.am | 2 +-
libcpu/i386_parse.y | 13 +
2 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/libcpu/Makefile.am b/libcpu/Makefile.am
index 57d0a164..259ed838 100644
--- a/libcpu/Makefile.am
+++ b/libcpu/Makefile.am
@@ -92,7 +
Signed-off-by: Yonggang Luo
---
libcpu/i386_disasm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libcpu/i386_disasm.c b/libcpu/i386_disasm.c
index 599d1654..cc75a7b1 100644
--- a/libcpu/i386_disasm.c
+++ b/libcpu/i386_disasm.c
@@ -480,7 +480,7 @@ i386_disasm (Ebl *ebl __at
Signed-off-by: Yonggang Luo
---
libdw/dwarf_whatattr.c | 3 ++-
libdw/dwarf_whatform.c | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/libdw/dwarf_whatattr.c b/libdw/dwarf_whatattr.c
index d664b021..59769865 100644
--- a/libdw/dwarf_whatattr.c
+++ b/libdw/dwarf_whatattr.c
Add NOT_HAVE_LIBINTL macro to disable internationalization,
sometimes we have don't want access internationalization such as MSVC,
so the macro NOT_HAVE_LIBINTL can help that.
Signed-off-by: Yonggang Luo
---
lib/eu-config.h | 7 +++
1 file changed, 7 insertions(+)
diff --git a/lib/eu-config
Signed-off-by: Yonggang Luo
---
lib/Makefile.am | 2 +-
lib/system.c| 87 +
lib/system.h| 59 -
3 files changed, 94 insertions(+), 54 deletions(-)
create mode 100644 lib/system.c
diff --git a/lib/Makefile.a
Signed-off-by: Yonggang Luo
---
libdwelf/libdwelf.h | 5 +
libebl/libebl.h | 5 +
2 files changed, 10 insertions(+)
diff --git a/libdwelf/libdwelf.h b/libdwelf/libdwelf.h
index 263ca60e..167ac0dc 100644
--- a/libdwelf/libdwelf.h
+++ b/libdwelf/libdwelf.h
@@ -31,6 +31,11 @@
#includ
on win32, there is no err.h
Signed-off-by: Yonggang Luo
---
lib/error.c | 9 -
lib/system.h | 4 +---
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/lib/error.c b/lib/error.c
index 5186fc15..7924735e 100644
--- a/lib/error.c
+++ b/lib/error.c
@@ -28,12 +28,14 @@
#incl
Signed-off-by: Yonggang Luo
---
lib/crc32_file.c | 2 +-
lib/system.c | 17 +
lib/system.h | 3 +++
libdw/dwarf_begin_elf.c| 2 +-
libdwelf/dwelf_strtab.c| 2 +-
libdwfl/linux-kernel-modules.c | 2 +-
libdwfl/l
Signed-off-by: Yonggang Luo
---
libelf/elf_begin.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libelf/elf_begin.c b/libelf/elf_begin.c
index 6d31882e..d867cd6f 100644
--- a/libelf/elf_begin.c
+++ b/libelf/elf_begin.c
@@ -1163,12 +1163,14 @@ elf_begin (int fildes, Elf_Cmd cmd, Elf *ref)
Signed-off-by: Yonggang Luo
---
debuginfod/debuginfod-client.c | 4 +++-
libasm/asm_end.c | 2 ++
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/debuginfod/debuginfod-client.c b/debuginfod/debuginfod-client.c
index 2a14d9d9..4b7f837b 100644
--- a/debuginfod/debuginfod
Signed-off-by: Yonggang Luo
---
libelf/libelf.h | 6 ++
1 file changed, 6 insertions(+)
diff --git a/libelf/libelf.h b/libelf/libelf.h
index a139e733..2fa3838b 100644
--- a/libelf/libelf.h
+++ b/libelf/libelf.h
@@ -195,9 +195,15 @@ typedef struct
{
char *ar_name; /* Name of
Signed-off-by: Yonggang Luo
---
libasm/asm_begin.c | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/libasm/asm_begin.c b/libasm/asm_begin.c
index 9e4dfe43..9b6d974e 100644
--- a/libasm/asm_begin.c
+++ b/libasm/asm_begin.c
@@ -34,10 +34,13 @@
#include
#include
#includ
Signed-off-by: Yonggang Luo
---
lib/color.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/lib/color.c b/lib/color.c
index 8063dc26..963a2ec2 100644
--- a/lib/color.c
+++ b/lib/color.c
@@ -117,9 +117,14 @@ parse_opt (int key, char *arg,
if (strcmp (arg, values[i].str) == 0)
This is for in in three building and won't affect IDE
for example
mkdir build && cd build && ../configure && make install
Signed-off-by: Yonggang Luo
---
.gitignore | 1 +
ChangeLog | 4
2 files changed, 5 insertions(+)
diff --git a/.gitignore b/.gitignore
index 8bcd88d7..ca06 100644
Because all source in libebl #include , so #include in
libeblP.h is enough, there is multiple memory-access.h file, so use relative
path to
include it properly,
Signed-off-by: Yonggang Luo
-#include
-#include
#include
#include
#include
diff --git a/libebl/eblcorenote.c b/libebl/eblcoren
I split it into small patches for easier to review
Changes v1->v2:
The reviews are applied
Yonggang Luo (16):
ignore build directory
move platform depended include into system.h of libebl
Use configure to detect HAVE_DECL_MMAP and use it for system doesn't
provide sys/mman.h
Fixes us
Signed-off-by: Yonggang Luo
---
configure.ac | 1 +
lib/crc32_file.c | 4 ++--
lib/system.h | 2 ++
libelf/elf32_updatefile.c | 3 ++-
libelf/elf_begin.c| 5 -
libelf/elf_end.c | 2 ++
libelf/elf_update.c | 5 -
7 files changed, 17
Signed-off-by: Yonggang Luo
---
libdw/dwarf_getsrc_file.c| 2 +-
libdwfl/dwfl_module_getsrc_file.c| 2 +-
libdwfl/dwfl_segment_report_module.c | 2 +-
libdwfl/find-debuginfo.c | 6 +++---
libdwfl/link_map.c | 2 +-
src/addr2line.c
Signed-off-by: Yonggang Luo
---
libcpu/Makefile.am | 2 +-
libcpu/i386_disasm.c | 14 +-
libcpu/i386_mne.h| 36
libcpu/i386_parse.y | 9 +++--
4 files changed, 41 insertions(+), 20 deletions(-)
create mode 100644 libcpu/i386_mne.h
di
This block of code can not be removed. As it's contains a goto label
enomem that been used elsewhere
Signed-off-by: Yonggang Luo
---
libcpu/i386_disasm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libcpu/i386_disasm.c b/libcpu/i386_disasm.c
index c34f03d6..44bf7d37 10064
If __OPTIMIZE__ is defined, then compile dwarf_whatattr.c and dwarf_whatform.c
will cause symbol conflict between
dwarf_whatattr.c and libdw.h,
dwarf_whatform.c and libdw.h,
So always undefined __OPTIMIZE__ when compiling these two files
The error message is:
dwarf_whatform.c
[build] C:\work\xe
Signed-off-by: Yonggang Luo
---
libasm/asm_begin.c | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/libasm/asm_begin.c b/libasm/asm_begin.c
index 9e4dfe43..9b6d974e 100644
--- a/libasm/asm_begin.c
+++ b/libasm/asm_begin.c
@@ -34,10 +34,13 @@
#include
#include
#includ
Signed-off-by: Yonggang Luo
---
libdwelf/libdwelf.h | 5 +
libebl/libebl.h | 5 +
2 files changed, 10 insertions(+)
diff --git a/libdwelf/libdwelf.h b/libdwelf/libdwelf.h
index 263ca60e..167ac0dc 100644
--- a/libdwelf/libdwelf.h
+++ b/libdwelf/libdwelf.h
@@ -31,6 +31,11 @@
#includ
Signed-off-by: Yonggang Luo
---
lib/color.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/lib/color.c b/lib/color.c
index 8063dc26..963a2ec2 100644
--- a/lib/color.c
+++ b/lib/color.c
@@ -117,9 +117,14 @@ parse_opt (int key, char *arg,
if (strcmp (arg, values[i].str) == 0)
on win32, there is no err.h
Signed-off-by: Yonggang Luo
---
lib/error.c | 16 +++-
lib/system.h | 4 +---
2 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/lib/error.c b/lib/error.c
index 5186fc15..d4cbf0ff 100644
--- a/lib/error.c
+++ b/lib/error.c
@@ -28,12 +28,14 @
Signed-off-by: Yonggang Luo
---
debuginfod/debuginfod-client.c | 4 +++-
libasm/asm_end.c | 2 ++
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/debuginfod/debuginfod-client.c b/debuginfod/debuginfod-client.c
index 8873fcc8..7a67a440 100644
--- a/debuginfod/debuginfod
Signed-off-by: Yonggang Luo
---
libelf/libelf.h | 6 ++
1 file changed, 6 insertions(+)
diff --git a/libelf/libelf.h b/libelf/libelf.h
index a139e733..2fa3838b 100644
--- a/libelf/libelf.h
+++ b/libelf/libelf.h
@@ -195,9 +195,15 @@ typedef struct
{
char *ar_name; /* Name of
MSVC doesn't have libintl.h, so use macro to guard it.
Signed-off-by: Yonggang Luo
---
configure.ac| 2 ++
lib/eu-config.h | 7 +++
2 files changed, 9 insertions(+)
diff --git a/configure.ac b/configure.ac
index b84623fe..aea12be3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -441,6 +
Signed-off-by: Yonggang Luo
---
lib/Makefile.am| 2 +-
lib/crc32_file.c | 2 +-
lib/system.c | 48 ++
lib/system.h | 3 +++
libdw/dwarf_begin_elf.c| 2 +-
libdwelf/dwelf_strtab.c|
Signed-off-by: Yonggang Luo
---
libelf/elf_begin.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/libelf/elf_begin.c b/libelf/elf_begin.c
index 6d31882e..3d324694 100644
--- a/libelf/elf_begin.c
+++ b/libelf/elf_begin.c
@@ -1163,12 +1163,19 @@ elf_begin (int fildes, Elf_Cmd cmd, Elf *
54 matches
Mail list logo