On Thu, Dec 22, 2022 at 12:54 AM Mark Wielaard wrote:
>
> Hi,
>
> On Wed, 2022-12-21 at 00:30 +0800, 罗勇刚(Yonggang Luo) via Elfutils-devel
> wrote:
> > On Tue, Dec 20, 2022 at 10:04 PM Mark Wielaard
> > wrot
> > > I have to think what it means for a syste
On Tue, Dec 20, 2022 at 11:08 PM Mark Wielaard wrote:
>
> On Sat, 2022-12-17 at 05:47 +0800, 罗勇刚(Yonggang Luo) wrote:
> > From bdf8a3b45f063d010e7c93b3d3bfc42b801ee9b2 Mon Sep 17 00:00:00
> > 2001
> > From: Yonggang Luo
> > Date: Thu, 20 Oct 2022 02:50:03 +0800
>
On Tue, Dec 20, 2022 at 10:04 PM Mark Wielaard wrote:
>
> Hi,
>
> On Sat, 2022-12-17 at 05:21 +0800, 罗勇刚(Yonggang Luo) wrote:
> > On Fri, Oct 28, 2022 at 7:41 PM Mark Wielaard wrote:
> > > On Fri, 2022-10-21 at 02:25 +0800, Yonggang Luo via Elfutils-devel
> &g
It's because lack STDOUT_FILENO, so this patch can be dropped
On Sun, Dec 18, 2022 at 12:52 AM Yonggang Luo wrote:
>
> Signed-off-by: Yonggang Luo
> ---
> lib/color.c | 5 +
> 1 file changed, 5 insertions(+)
>
> diff --git a/lib/color.c b/lib/color.c
> in
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
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
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
@@ -
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
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
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
---
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
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
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
[build] 1 error generated.
Signed-off-by: Yonggang Luo
---
libdw/dwarf_whatattr.c | 9 -
libdw/dwarf_whatform.c | 9 -
2 files changed, 8 insertions(+), 10 deletions(-)
diff --git a/libdw/dwarf_whatattr.c b/libdw/dwarf_whatattr.c
index d664b021..01d92307 100644
--- a/libdw/dwarf_
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..44b
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
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
---
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
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
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
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
in
On Mon, Dec 12, 2022 at 11:37 PM Mark Wielaard wrote:
>
> Hi,
>
> On Fri, 2022-10-21 at 02:25 +0800, Yonggang Luo via Elfutils-devel
> wrote:
> > on win32, there is no err.h
> > [...]
> > +#else
> > + (void)status;
> > + vfprintf(stderr, format, arg
>From bdf8a3b45f063d010e7c93b3d3bfc42b801ee9b2 Mon Sep 17 00:00:00 2001
From: Yonggang Luo
Date: Thu, 20 Oct 2022 02:50:03 +0800
Subject: [PATCH] libdw: Fixes compile of dwarf_whatattr.c and
dwarf_whatform.c
If __OPTIMIZE__ is defined, then compile dwarf_whatattr.c and
dwarf_whatform.c
w
On Mon, Dec 12, 2022 at 8:42 PM Mark Wielaard wrote:
>
> Hi,
>
> On Fri, 2022-10-21 at 02:25 +0800, Yonggang Luo via Elfutils-devel
> wrote:
> > Signed-off-by: Yonggang Luo
> > ---
> > libcpu/i386_disasm.c | 2 +-
> > 1 file changed, 1 insertion(+), 1
But still I think the force cast to (char *) is needed
On Sat, Dec 17, 2022 at 5:22 AM 罗勇刚(Yonggang Luo)
wrote:
>
>
>
> On Fri, Oct 28, 2022 at 7:45 PM Mark Wielaard wrote:
> >
> > On Fri, 2022-10-21 at 02:25 +0800, Yonggang Luo via Elfutils-devel
> > wrote:
> &
On Fri, Oct 28, 2022 at 7:45 PM Mark Wielaard wrote:
>
> On Fri, 2022-10-21 at 02:25 +0800, Yonggang Luo via Elfutils-devel
> wrote:
> > basename function are accessed multiple place, but used without
> > include libgen.h
>
> This is wrong. We use the GNU b
On Fri, Oct 28, 2022 at 7:41 PM Mark Wielaard wrote:
>
> Hi,
>
> On Fri, 2022-10-21 at 02:25 +0800, Yonggang Luo via Elfutils-devel
> wrote:
> > Signed-off-by: Yonggang Luo
> > ---
> > configure.ac | 1 +
> > lib/crc32_file.c | 4
On Fri, Oct 28, 2022 at 7:35 PM Mark Wielaard wrote:
>
> On Fri, 2022-10-21 at 02:25 +0800, Yonggang Luo via Elfutils-devel
> wrote:
> > Because all source in libebl #include , so #include
> > in
> > libeblP.h is enough, there is multiple memory-access.h file,
It's a common step to configure and make under build directory, so that the
IDE won't affect by it
On Thu, Oct 27, 2022 at 9:03 PM Mark Wielaard wrote:
> On Fri, 2022-10-21 at 02:25 +0800, Yonggang Luo via Elfutils-devel
> wrote:
> > Signed-off-by: Yonggang Luo
>
gt; Mark
--
此致
礼
罗勇刚
Yours
sincerely,
Yonggang Luo
this will be hard to keep working.
>
> Cheers,
>
> Mark
--
此致
礼
罗勇刚
Yours
sincerely,
Yonggang Luo
w if it works for you.
>
> Thanks,
>
> Mark
--
此致
礼
罗勇刚
Yours
sincerely,
Yonggang Luo
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
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
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
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
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
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
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
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
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
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/l
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
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
---
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
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
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
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
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
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 501
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
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 de
function
‘bswap_32’ [-Werror=implicit-function-declaration]
Signed-off-by: Yonggang Luo
---
libdwfl/libdwfl_crc32.c | 1 -
libelf/libelf_crc32.c | 1 -
2 files changed, 2 deletions(-)
diff --git a/libdwfl/libdwfl_crc32.c b/libdwfl/libdwfl_crc32.c
index b89d0d36..5bc7a4ad 100644
--- a/lib
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
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
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
27;.
C:\work\xemu\elfutils>
```
--
此致
礼
罗勇刚
Yours
sincerely,
Yonggang Luo
t's fine. But I don't understand the problem - my windows machines have
> no problem with files named "hello2.spec2." with two periods.
>
Hi, Frank, `git clone` can not checkout the file, I didn't know why
> - FChE
>
--
此致
礼
罗勇刚
Yours
sincerely,
Yonggang Luo
I really want this to be merged :) ping Frank,
as this would stop me clone elfutils on windows
On Sat, Oct 15, 2022 at 4:35 AM Mark Wielaard wrote:
>
> Hi,
>
> On Tue, Sep 20, 2022 at 04:43:01PM +0800, Yonggang Luo via Elfutils-devel
wrote:
> > These filenames are invalid on wi
BYTE_ORDER is defined in
--
此致
礼
罗勇刚
Yours
sincerely,
Yonggang Luo
OK, updated in v2
On Sat, Oct 15, 2022 at 5:16 AM Mark Wielaard wrote:
>
> On Tue, Sep 20, 2022 at 04:43:02PM +0800, Yonggang Luo via Elfutils-devel
wrote:
> > All of these files either #include directly or #include
"libelfP.h"
> > And now "libelfP.h also #i
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/l
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
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 |
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.' -> 'hell
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
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
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
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
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
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
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
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 de
74 matches
Mail list logo