Re: [PATCH] readelf: Handle SHT_RISCV_ATTRIBUTES like SHT_GNU_ATTRIBUTES

2022-08-13 Thread Mark Wielaard
On Wed, 10 Aug 2022 10:52:42 +0200, Andreas Schwab wrote: > Applied, thanks! [1/1] readelf: Handle SHT_RISCV_ATTRIBUTES like SHT_GNU_ATTRIBUTES commit: b713edb9a7f3da8e4dd28ac69a1665ed493ca504 Best regards, -- Mark Wielaard

Re: cannot skip augment string handling

2022-08-13 Thread Mark Wielaard
Hi Ulrich, On Tue, Aug 09, 2022 at 08:01:43PM +0200, Ulrich Drepper via Elfutils-devel wrote: > He dwarf_next_cfi function has some clever code which skips over the > processing of the augmentation string content if the first character is 'z' > (for sized augmentation). This would be OK if it wo

Re: buildbot users try branch builders for elfutils

2022-08-15 Thread Mark Wielaard
Hi Martin, On Mon, Aug 15, 2022 at 09:55:13AM +0200, Martin Liška wrote: > On 7/28/22 17:26, Mark Wielaard wrote: > > I setup git users try branches for elfutils. If you have commit > > access to elfutils.git you can now [...] > > I would like to try this great feature

[PATCH] ar: Correct -N COUNT off-by-one

2022-08-28 Thread Mark Wielaard
Reported-by: panxiaohe Signed-off-by: Mark Wielaard --- src/ChangeLog | 6 + src/ar.c | 4 +-- tests/ChangeLog | 6 + tests/Makefile.am | 2 ++ tests/run-ar-N.sh | 65 +++ 5 files changed, 81 insertions(+), 2 deletions(-) create

[PATCH] libelf: Correctly decode ar_mode as octal string

2022-08-28 Thread Mark Wielaard
ar_mode is encoded as an octal ascii string, not decimal. Add a new OCT_FIELD macro to decode it. Signed-off-by: Mark Wielaard --- This was found by the run-ar-N.sh testcase on the try builder. libelf/ChangeLog | 5 + libelf/elf_begin.c | 25 +++-- 2 files changed

Proposing Sourceware as SFC member project

2022-08-30 Thread Mark Wielaard
022q3/018802.html Chris Faylor Frank Eigler Mark Wielaard

Re: [patch git] PR28284 - debuginfod x-debuginfod* header processing

2022-09-06 Thread Mark Wielaard
Hi Frank, On Fri, 2022-09-02 at 20:13 -0400, Frank Ch. Eigler via Elfutils-devel wrote: > I had a bit of time to tweak Noah Sanci's PR28284 work, and I believe > it addresses Mark's last set of comments (from a while ago). This > follow-up patch corrects things like case sensitivity, spacing, \r\

Re: [patch git] PR28284 - debuginfod x-debuginfod* header processing

2022-09-08 Thread Mark Wielaard
Hi Frank, On Tue, 2022-09-06 at 12:05 -0400, Frank Ch. Eigler via Elfutils-devel wrote: > > This looks good, but I think c->winning_headers needs to be > > freed/cleared at the start of debuginfod_query_server. Otherwise if you > > reuse the debuginfod_client and you hit the cache, the user gets t

Sourceware accepted as SFC member project

2022-09-08 Thread Mark Wielaard
p out with, the next steps they are invited to join the sourceware overseers list. https://sourceware.org/pipermail/overseers/2022q3/018834.html Thanks, Chris Faylor Frank Eigler Mark Wielaard

Re: [PATCH v2] tests: do not fail on zero sized DIEs (binutils-2.39 compatible)

2022-10-13 Thread Mark Wielaard
Hi, On Mon, 2022-08-08 at 01:17 +0200, Mark Wielaard wrote: > On Sun, Aug 07, 2022 at 07:31:38PM +0100, Sergei Trofimovich via > Elfutils-devel wrote: > > binutils started producing 0-sized DIEs on functions interspersed > > by nested sections (".section ...; .previou

Re: [PATCH RFC] backends: Add RISC-V object attribute printing

2022-10-13 Thread Mark Wielaard
Hi Andreas, On Wed, 2022-08-10 at 11:27 +0200, Andreas Schwab via Elfutils-devel wrote: > This does not work yet. The RISC-V attribute tags use the same > convention as the GNU attributes: odd numbered tags take a string > value, > even numbered ones an integer value, but print_attributes assumes

Re: [PATCH] tests: Add libeu to tests needing error() API

2022-10-13 Thread Mark Wielaard
Hi, On Tue, 2022-09-13 at 09:40 -0700, Khem Raj via Elfutils-devel wrote: > A local error() impelmentation is used when libc does not provide it, > therefore link in libeu.a which contains this function in tests > needing > error() API > > Signed-off-by: Khem Raj Thanks. Added a ChangeLog entry

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

2022-10-14 Thread Mark Wielaard
Hi, On Tue, Sep 20, 2022 at 04:43:01PM +0800, Yonggang Luo via Elfutils-devel wrote: > These filenames are invalid on win32 This looks ok to me, but I don't really know why these files were named this way in the first place. The files themselves are not directly used, they are there to recreate

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

2022-10-14 Thread Mark Wielaard
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 #include , so the platform depended include > can be moved to system.h safely I like this in theory since it cleans up s

Re: [PATCH] libdwfl: add dwfl_report_offline_memory

2022-10-16 Thread Mark Wielaard
Hi Aleksei, On Tue, Sep 20, 2022 at 01:36:37PM +, Aleksei Vetrov via Elfutils-devel wrote: > 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. > > Anot

Re: ☠ Buildbot (GNU Toolchain): elfutils - failed test (failure) (master)

2022-10-16 Thread Mark Wielaard
n Sep 17 00:00:00 2001 From: Mark Wielaard Date: Sun, 16 Oct 2022 18:02:46 +0200 Subject: [PATCH] tests: Check lseek, read and malloc results with correct types in test. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When compiling dwfl-report-offline-mem

Re: [PATCH v2 2/7] move platform depended include into system.h of libelf

2022-10-16 Thread Mark Wielaard
On Sun, Oct 16, 2022 at 12:36:20AM +0800, Yonggang Luo via Elfutils-devel wrote: > 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 Thanks. While reviewing wrote ChangeLog en

Re: [PATCH v2 3/7] Move the #include into eu-config.h

2022-10-16 Thread Mark Wielaard
On Sun, Oct 16, 2022 at 12:36:21AM +0800, Yonggang Luo via Elfutils-devel wrote: > 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 And this works b

Re: [PATCH v2 4/7] lib: Use NOT_HAVE_LIBINTL to guard #include

2022-10-16 Thread Mark Wielaard
Hi, On Sun, Oct 16, 2022 at 12:36:22AM +0800, Yonggang Luo via Elfutils-devel wrote: > 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. This needs a configure check.

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

2022-10-16 Thread Mark Wielaard
Hi, This seems to work and is probably OK. But do you know when/what the __ prefix versions are defined and when/what defines the non-prefixed versions? Thanks, Mark On Tue, Sep 20, 2022 at 04:43:05PM +0800, Yonggang Luo via Elfutils-devel wrote: > Signed-off-by: Yonggang Luo > --- > lib/sys

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

2022-10-16 Thread Mark Wielaard
Hi, I find this hard to review. I have no experienc with msvc and don't know when/what _MSC_VER implies or how to verify system_win32.c. I am also a bit worried that the various ifdefs will be hard to keep correct. If we don't have HAVE_DECL_MMAP does the testsuite still work? Maybe this patch c

Re: [PATCH 7/7] Add CMake build files

2022-10-16 Thread Mark Wielaard
Hi, I rather not have multiple build systems in the tree. Are the autotools not available on your system? Cheers, Mark

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

2022-10-17 Thread Mark Wielaard
Hi, On Mon, Oct 17, 2022 at 11:40:11AM +0800, 罗勇刚(Yonggang Luo) wrote: > > This seems to work and is probably OK. But do you know when/what the > > __ prefix versions are defined and when/what defines the non-prefixed > > versions? > > __BYTE_ORDER__ is a predefined macro by gcc/clang, > > BYTE

Re: ☠ Buildbot (GNU Toolchain): elfutils - failed test (failure) (master)

2022-10-17 Thread Mark Wielaard
Hi, On Mon, 2022-10-17 at 09:08 +, builder--- via Elfutils-devel wrote: > A new failure has been detected on builder elfutils-opensusetw-x86_64 > while building elfutils. > > Full details are available at: > https://builder.sourceware.org/buildbot/#builders/88/builds/50 > > Build state:

[PATCH] readelf: Handle DW_LLE_GNU_view_pair

2022-10-19 Thread Mark Wielaard
DW_LLE_GNU_view_pair is used by gcc -gvariable-location-views=incompat5. As described in http://www.fsfla.org/~lxoliva/papers/sfn/dwarf6-sfn-lvu.txt and proposed for DWARF6 https://dwarfstd.org/ShowIssue.php?issue=170427.1 Signed-off-by: Mark Wielaard --- libdw/ChangeLog | 4 libdw

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

2022-10-20 Thread Mark Wielaard
ros in the elfutils.spec.in file comments. Signed-off-by: Yonggang Luo Signed-off-by: Mark Wielaard --- ChangeLog | 4 Makefile.am | 2 +- config/ChangeLog| 4

[PATCH] configure.ac: Update AC_PROG_CC and AC_PROG_LEX for autoconf 2.70

2022-10-22 Thread Mark Wielaard
With autoconf 2.70 we must use AC_PROG_CC (which will check for c11 and c99), for earlier versions we'll use AC_PROG_CC_C99. Also use AC_PROG_LEX([noyywrap]), the extra argument is ignored with earlier versions, but required for 2.70. Signed-off-by: Mark Wielaard --- ChangeLog

Re: [PATCH] debuginfod: Support queries for ELF/DWARF sections

2022-10-26 Thread Mark Wielaard
Hi, On Mon, 2022-10-24 at 14:38 -0400, Frank Ch. Eigler via Elfutils-devel wrote: > - not sure I understand why the code worries about dots in or not in > section names. Why not just pass them verbatim throughout the code > base, and not worry about whether or not there's a dot? Does the >

Re: [PATCH] debuginfod: Support queries for ELF/DWARF sections

2022-10-26 Thread Mark Wielaard
Hi, On Mon, 2022-10-24 at 14:38 -0400, Frank Ch. Eigler via Elfutils-devel wrote: > - use of write(2) to put files onto disk is not quite right; write(2) > can > be partial, so you need a loop (or a macro wrapping a loop) Since debuginfod-client.c already includes system.h it can use: static i

Re: [PATCH 01/25] Rename 'hello2.spec.' -> 'hello2.spec' 'hello3.spec.' -> 'hello3.spec'

2022-10-27 Thread Mark Wielaard
Hi, On Fri, 2022-10-21 at 02:25 +0800, Yonggang Luo via Elfutils-devel wrote: > These filenames are invalid on win32 But using .spec causes make rpm to fail. Did you try this variant: https://inbox.sourceware.org/elfutils-devel/3bf19d05c8976411432709fae1cc2bcc2d21d700.ca...@klomp.org/ Thanks,

Re: [PATCH 02/25] ignore build directory

2022-10-27 Thread Mark Wielaard
On Fri, 2022-10-21 at 02:25 +0800, Yonggang Luo via Elfutils-devel wrote: > 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 @@

Re: [PATCH 03/25] libebl: There is no need #include in eblclosebackend.c and eblopenbackend.c

2022-10-27 Thread Mark Wielaard
On Fri, 2022-10-21 at 02:25 +0800, Yonggang Luo via Elfutils-devel wrote: > It's not accessed symbols in dlfcn.h in eblclosebackend.c and > eblopenbackend.c Tweaked the commit message (so it fits on one line), added ChangeLog entries and pushed. Thanks, Mark

Re: [PATCH 04/25] libelf/libdwfl: Remove "#define LIB_SYSTEM_H 1" in libelf_crc32.c and libdwfl_crc32.c

2022-10-27 Thread Mark Wielaard
On Fri, 2022-10-21 at 02:25 +0800, Yonggang Luo via Elfutils-devel wrote: > 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 err

Re: [PATCH 05/25] use #include instead platform depended header in libdw/memory-access.h

2022-10-27 Thread Mark Wielaard
On Fri, 2022-10-21 at 02:25 +0800, Yonggang Luo via Elfutils-devel wrote: > Signed-off-by: Yonggang Luo Thanks, added ChangeLog entry and tweaked commit message to have < 72 char lines. Pushed, Mark

Re: [PATCH] readelf: Handle DW_LLE_GNU_view_pair

2022-10-27 Thread Mark Wielaard
Hi, On Thu, 2022-10-20 at 00:02 +0200, Mark Wielaard wrote: > DW_LLE_GNU_view_pair is used by gcc -gvariable-location- > views=incompat5. > As described in > http://www.fsfla.org/~lxoliva/papers/sfn/dwarf6-sfn-lvu.txt > and proposed for DWARF6 > https://dwarfstd.org/ShowIssue.

Re: One shot mode for debuginfod server

2022-10-27 Thread Mark Wielaard
Hi Ryan, On Tue, 2022-08-09 at 17:40 -0400, Ryan Goldberg via Elfutils-devel wrote: > Here is a patch for a new one-shot mode for the debuginfod server. > In this mode the first scanning pass of the server will also output > the found executables' paths and buildids to the given file > descriptor.

[COMMITTED] config: Add BuildRequires socat for run-debuginfod-response-headers.sh

2022-10-27 Thread Mark Wielaard
Signed-off-by: Mark Wielaard --- config/ChangeLog| 4 config/elfutils.spec.in | 2 ++ 2 files changed, 6 insertions(+) diff --git a/config/ChangeLog b/config/ChangeLog index 1265f399..9aadd71f 100644 --- a/config/ChangeLog +++ b/config/ChangeLog @@ -1,3 +1,7 @@ +2022-10-27 Mark

[COMMITTED] Use grep -E instead of egrep, use grep -F instead of fgrep.

2022-10-27 Thread Mark Wielaard
GNU grep 3.8 gives a deprecation warning when using egrep or fgrep. Just use grep -E and grep -F. Signed-off-by: Mark Wielaard --- config/ChangeLog | 4 config/eu.am | 2 +- tests/ChangeLog| 11

Re: [PATCH] configure.ac: Update AC_PROG_CC and AC_PROG_LEX for autoconf 2.70

2022-10-27 Thread Mark Wielaard
On Sat, 2022-10-22 at 21:58 +0200, Mark Wielaard wrote: > With autoconf 2.70 we must use AC_PROG_CC (which will check for c11 > and c99), for earlier versions we'll use AC_PROG_CC_C99. Also use > AC_PROG_LEX([noyywrap]), the extra argument is ignored with earlier > versions, but

Re: [PATCH] debuginfod-client: Add DEBUGINFOD_HEADERS_FILE.

2022-10-28 Thread Mark Wielaard
Hi Daniel, On Tue, 2022-10-18 at 14:21 -0700, Daniel Thornburgh via Elfutils-devel wrote: > This DEBUGINFOD_HEADERS_FILE environment variable names a file to supply > HTTP headers to outgoing requests. Notably, this allows for > Authorization headers to be added from a file under OS access control

Re: [PATCH 06/25] move platform depended include into system.h of libebl

2022-10-28 Thread Mark Wielaard
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, so use > relative path to > include it properly, I am not a fan of the relative path trick, especiall

Re: [PATCH 08/25] Use configure to detect HAVE_DECL_MMAP and use it for system doesn't provide sys/mman.h

2022-10-28 Thread Mark Wielaard
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 ++-- > lib/system.h | 2 ++ > libelf/elf32_updatefile.c | 3 ++- > libelf/elf_begin.c| 5

Re: [PATCH 09/25] include libgen.h in system.h

2022-10-28 Thread Mark Wielaard
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 basename (from string.h with _GNU_SOURCE), not the POSIX one (from libgen.h). Cheers, Mark

Re: [PATCH 07/25] move platform depended include into system.h of libasm, libcpu, libdw, libdwfl and libdwelf

2022-10-28 Thread Mark Wielaard
On Fri, 2022-10-21 at 02:25 +0800, Yonggang Luo via Elfutils-devel wrote: > Signed-off-by: Yonggang Luo > --- > lib/color.c| 1 - > libasm/asm_abort.c | 1 - > libasm/asm_addint8.c | 2 -- > libasm/asm_begin.c |

Re: [PATCH][RFC] readelf: partial support of ZSTD compression

2022-10-28 Thread Mark Wielaard
Hi Martin, On Mon, Oct 24, 2022 at 08:16:09PM +0200, Martin Liška wrote: > Anyway, I'm sending V2 that works fine --with-zstd and --without-zstd as > expected. > > Ready for master? The decompression part looks good. Few small nitpicks below. Although I like to also have compression working.

[COMMITTED] libelf: Sync elf.h from glibc

2022-10-28 Thread Mark Wielaard
Adds ELFCOMPRESS_ZSTD, NT_S390_PV_CPU_DATA and NT_LOONGARCH_*. Signed-off-by: Mark Wielaard --- libelf/ChangeLog | 4 libelf/elf.h | 18 +- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/libelf/ChangeLog b/libelf/ChangeLog index aefb31b3..8107c71e

Re: [PATCH v3] debuginfod: Support queries for ELF/DWARF sections

2022-10-29 Thread Mark Wielaard
t; path ");" > +.BI "int debuginfod_find_section(debuginfod_client *" client "," > +.BI " const unsigned char *" build_id "," > +.BI " int " build_id_len ",&qu

Re: [PATCH] readelf: add binutils-style --syms option

2022-10-29 Thread Mark Wielaard
Hi Arsen, On Fri, Oct 28, 2022 at 10:44:47PM +0200, Arsen Arsenović via Elfutils-devel wrote: > This helps people with a lot of built up muscle memory :) > > Signed-off-by: Arsen Arsenović > --- > > I often use the "medium length" form of --symbols when using readelf, and I've > been trying to

Proposed elfutils 0.188 release in Wednesday

2022-10-31 Thread Mark Wielaard
Hi, It has been 6 months since 0.187. There have been almost 80 commits since, various bug fixes and some new features (see NEWS). I would like to push out a 0.188 this Wednesday (Nov 2). Please go over any open bugs or patches to see if they should be fixed/committed before the release or can wai

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

2022-10-31 Thread Mark Wielaard
Hi, On Thu, 2022-10-20 at 18:07 +0200, Mark Wielaard wrote: > So maybe we just should rename them to .specfile? > That is what the attached patch does, plus some other cleanups. > - We forgot to include the hello3.specfile > - Remove the --sign from rpmbuild > - escape the % i

Re: [PATCH v3] debuginfod: Support queries for ELF/DWARF sections

2022-11-01 Thread Mark Wielaard
Hi Aaron, On Tue, Nov 01, 2022 at 12:53:41AM -0400, Aaron Merey wrote: > Thanks again for the detailed review. I fixed the issues you pointed out. This version looks really good. Please push, so it is included in the release tomorrow. > On Sat, Oct 29, 2022 at 8:29 PM Mark Wielaard

Re: [PATCH] Add support for ARCv2

2022-11-01 Thread Mark Wielaard
Hi Shahab, On Mon, Oct 31, 2022 at 02:54:33PM +, Shahab Vahedi via Elfutils-devel wrote: > Thank you for response. First and foremost, there is a second iteration of the > patch [1]. I don't want you, or anybody else, waste time looking into v1. The > changes from v1 have been mentioned at th

Re: PATCH: Bug debuginfod/29472 followup

2022-11-01 Thread Mark Wielaard
Hi Frank, On Tue, Nov 01, 2022 at 10:23:06AM -0400, Frank Ch. Eigler via Elfutils-devel wrote: > On the users/fche/try-pr29472 branch, I pushed a followup to Ryan's > PR29472 draft from a bunch of weeks ago. It's missing some > ChangeLog's but appears otherwise complete. It's structured as Ryan

Re: ☠ Buildbot (GNU Toolchain): elfutils - failed test (failure) (master)

2022-11-02 Thread Mark Wielaard
Hi, On Wed, 2022-11-02 at 01:15 +, builder--- via Elfutils-devel wrote: > A new failure has been detected on builder elfutils-fedora-ppc64le > while building elfutils. > > Full details are available at: > https://builder.sourceware.org/buildbot/#builders/55/builds/96 > > Build state: fai

[COMMITTED] Prepare for 0.188

2022-11-02 Thread Mark Wielaard
Set version to 0.188 Update elfutils.spec.in Regenerate po/*.po files Signed-off-by: Mark Wielaard --- ChangeLog |5 + NEWS|2 +- config/ChangeLog|7 + config/elfutils.spec.in | 13 +- configure.ac|2 +- po/ChangeLog

Re: ☠ Buildbot (GNU Toolchain): elfutils - failed test (failure) (master)

2022-11-02 Thread Mark Wielaard
gt; > Build state: failed test (failure) > Revision: e9f3045caa5c4498f371383e5519151942d48b6d > Worker: centos-x86_64 > Build Reason: (unknown) > Blamelist: Mark Wielaard > > Steps: > [...] > https://builder.sourceware.org/buildbot/#builders/39/builds/99/steps/6/log

elfutils 0.188 released

2022-11-02 Thread Mark Wielaard
debuginfod: create indexes to speed up grooming debuginfod: optimize regular expressions in groom() Khem Raj (1): tests: Add libeu to tests needing error() API Mark Wielaard (31): configure: Don't use valgrind and sanitize-undefined for make distcheck config: Move the 2&g

[COMMITTED] debuginfod: Mark extract_section function static

2022-11-02 Thread Mark Wielaard
The extract_section function in debuginfod-client.c is an internal function and should not be exported. Mark it as static. Signed-off-by: Mark Wielaard --- debuginfod/ChangeLog | 4 debuginfod/debuginfod-client.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git

[COMMITTED] readelf: Check phdr != NULL or shdr != NULL in handle_dynamic.

2022-11-03 Thread Mark Wielaard
The compiler doesn't know that when use_dynamic_segment is true, then phdr should/will be non-NULL and otherwise shdr is non-NULL. Add explicit checks to help the compiler out and in case an error is made calling the handle_dynamic function. Signed-off-by: Mark Wielaard --- src/ChangeLog

[COMMITTED] readelf: Check gelf_getdyn doesn't return NULL

2022-11-03 Thread Mark Wielaard
Signed-off-by: Mark Wielaard --- src/ChangeLog | 5 + src/readelf.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 0c5ab37e..66428b70 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2022-11-03 Mark Wielaard

[COMMITTED] libdw: Don't dereference and assign values we are skipping

2022-11-03 Thread Mark Wielaard
We don't use the FDE address encoding byte, so no reason to read and store it. Just skip past it. Signed-off-by: Mark Wielaard --- libdw/ChangeLog| 5 + libdw/dwarf_next_cfi.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/libdw/ChangeLog b/libdw/Chan

Re: [COMMITTED] debuginfod_find_section: Always update rc with most recent error code

2022-11-07 Thread Mark Wielaard
Hi Aaron, On Fri, 2022-11-04 at 17:40 -0400, Aaron Merey via Elfutils-devel wrote: > debuginfod_find_section may attempt to download both the debuginfo > and executable matching the given build-id. If neither of these > files can be found, update rc to ensure that we always return an > accurate e

[PATCH] debuginfod: Initialize response_data early in debuginfod-client query

2022-11-15 Thread Mark Wielaard
On error going to out2, the response_data is freed. So initialize the response_data to NULL immediately after allocation or when going back to query_in_parallel. Signed-off-by: Mark Wielaard --- debuginfod/ChangeLog | 5 + debuginfod/debuginfod-client.c | 4 ++-- 2 files changed

elfutils-devel@sourceware.org

2022-11-15 Thread Mark Wielaard
This Friday, 18 November, at 16:00 UTC (11:00am Eastern, 17:00 Central European Time) the FSF will host a session on their BBB server about the current sourceware infrastructure and future plans. https://www.fsf.org/events/sourceware-infrastructure-a-presentation-and-community-q-a https://inbox.so

Re: [PATCH] debuginfod: Initialize response_data early in debuginfod-client query

2022-11-21 Thread Mark Wielaard
Hi, On Tue, 2022-11-15 at 17:55 +0100, Mark Wielaard wrote: > On error going to out2, the response_data is freed. So initialize the > response_data to NULL immediately after allocation or when going back > to query_in_parallel. Frank on irc said this looked fine. Pushed, Mark

Re: [PATCH] libebl: Do not require EI_OSABI for IFUNC.

2022-11-24 Thread Mark Wielaard
Hi Martin, On Thu, 2022-11-24 at 13:23 +0100, Martin Liška wrote: > Similar fix to: > https://sourceware.org/bugzilla/show_bug.cgi?id=29718 > > Ready for master? Assuming runtime, glibc/ld.so, accepts this without EI_OSABI set to ELFOSABI_LINUX, it seems ok to print it as GNU_IFUNC. > e

Re: [PATCH] readelf: print warning for -sW

2022-11-25 Thread Mark Wielaard
Hi Marin, On Fri, 2022-11-25 at 14:29 +0100, Martin Liška wrote: > The option -s accepts in elfutils (compared to binutils) a positional > argument that is name of a symbol table section which should be > printed. > > Thus, print a reasonable warning if -sW is used: > ./src/readelf -sW a.out > WA

Re: [PATCH] Missing newline for: elfcompress -t zlib-gnu a.out -force

2022-11-28 Thread Mark Wielaard
Hi Martin, On Mon, 2022-11-28 at 14:03 +0100, Martin Liška wrote: > Fixes: > ./src/elfcompress -t zlib-gnu a.out -force > [28] .zdebug_aranges unchanged, already GNU compressed[29] > .zdebug_info unchanged, already GNU compressed[30] .zdebug_abbrev > unchanged, already GNU compressed[31] .zdebug_l

Re: [PATCH][RFC] readelf: partial support of ZSTD compression

2022-11-28 Thread Mark Wielaard
Hi Martin, On Mon, Nov 28, 2022 at 02:16:35PM +0100, Martin Liška wrote: > On 10/29/22 00:21, Mark Wielaard wrote: > > Although I like to also have compression working. Then we can also > > add support to src/elfcompress, which makes for a good testcase. See > > tests/run-c

Re: [PATCH] libdwfl: Read no more than required to parse dynamic sections

2022-11-29 Thread Mark Wielaard
Hi Gavin, On Mon, 2022-11-28 at 22:26 -0800, ga...@matician.com wrote: > Since size checking has been moved to > dwfl_elf_phdr_memory_callback(), > there is no longer a need for dwfl_segment_report_module() to enforce > the same. Reading beyond the end of the dynamic section actually causes > issu

Re: [PATCH] libdwfl: Read no more than required to parse dynamic sections

2022-11-30 Thread Mark Wielaard
ignment is 8), causing elfXX_xlatetom() to return ELF_E_INVALID_DATA. Signed-off-by: Gavin Li Signed-off-by: Mark Wielaard --- libdwfl/ChangeLog| 6 ++ libdwfl/dwfl_segment_report_module.c | 28 +++- 2 files changed, 9 insertions(+), 25 deletions(-)

Re: [PATCH] Add support for ARCv2

2022-11-30 Thread Mark Wielaard
ark >From 86347d80bec28c762ddc47aee866fcdaf781f25a Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Thu, 1 Dec 2022 00:25:01 +0100 Subject: [PATCH] libelf: Sync elf.h from glibc Adds various new ARC related declarations. Signed-off-by: Mark Wielaard --- libelf/ChangeLog | 4 libelf/el

Re: dwarf_nextcu can't handle abbrev offset correctly ?

2022-12-01 Thread Mark Wielaard
Hi Hengqi, On Thu, 2022-12-01 at 23:34 +0800, Hengqi Chen via Elfutils-devel wrote: > I am using pahole (which relies on libelf) to process an elf file > ([0]): > > LLVM_OBJCOPY="objcopy" pahole -J --btf_gen_floats --btf_base > vmlinux adl_pci9111.ko > > This failed with: > > die__proce

Re: [PATCH 10/25] libcpu: Remove the need of NMNES by using enum

2022-12-12 Thread Mark Wielaard
Hi, On Fri, 2022-10-21 at 02:25 +0800, Yonggang Luo via Elfutils-devel wrote: > 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

Re: [PATCH 11/25] libcpu: Use __asm instead asm that can be recognized by both clang-cl and gcc

2022-12-12 Thread Mark Wielaard
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 deletion(-) > > diff --git a/libcpu/i386_disasm.c b/libcpu/i386_disasm.c > index 599d1654..cc75a7b1 100644 > --- a

Re: [PATCH 12/25] libcpu: Use "#define FCT_mod$64r_m FCT_mod$r_m" is enough and can be recognized by clang-cl on windows in i386_data.h

2022-12-12 Thread Mark Wielaard
Hi, On Fri, 2022-10-21 at 02:25 +0800, Yonggang Luo via Elfutils-devel wrote: > 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/libcp

Re: [PATCH 13/25] libdw: typeof -> __typeof that can be recognized by both clang-cl and gcc

2022-12-12 Thread Mark Wielaard
Hi, We seem to use __typeof everywhere except in memory-access.h. So this seems like an OK change. Added a ChangeLog entry and pushed as: commit 78dd3b32edf55fc8bdc6268163d5d743a84b1075 Author: Yonggang Luo Date: Fri Oct 21 02:25:52 2022 +0800 libdw: Change typeof -> __typeof in memory-a

Re: [PATCH 14/25] libdw: check __OPTIMIZE__ in dwarf_whatattr.c and dwarf_whatform.c to match the header

2022-12-12 Thread Mark Wielaard
Hi, On Fri, 2022-10-21 at 02:25 +0800, Yonggang Luo via Elfutils-devel wrote: > - > +#ifndef __OPTIMIZE__ > unsigned int > dwarf_whatattr (Dwarf_Attribute *attr) > { >return attr == NULL ? 0 : attr->code; > } > +#endif > diff --git a/libdw/dwarf_whatform.c b/libdw/dwarf_whatform.c > index

Re: ☠ Buildbot (GNU Toolchain): elfutils - failed configure (failure) (master)

2022-12-12 Thread Mark Wielaard
Hi, On Mon, Dec 12, 2022 at 02:01:49PM +, builder--- via Elfutils-devel wrote: > A new failure has been detected on builder elfutils-debian-ppc64 while > building elfutils. > > Full details are available at: > https://builder.sourceware.org/buildbot/#builders/63/builds/113 > > Build sta

Re: [PATCH 15/25] lib: Implement error properly even when not HAVE_ERR_H

2022-12-12 Thread Mark Wielaard
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, argp); > +#endif >va_end(argp); That doesn't look like a valid implementation of error, it ignores errno and doesn't ex

Re: [PATCH 16/25] libeu: Move the implementation of pwrite_retry, write_retry and pread_retry from header to source

2022-12-12 Thread Mark Wielaard
Hi, Why is this necessary? Thanks, Mark

Re: [PATCH 19/25] libelf: F_GETFD may not predefined with msvc/mingw, guard the usage of it

2022-12-12 Thread Mark Wielaard
Hi, On Fri, 2022-10-21 at 02:25 +0800, Yonggang Luo via Elfutils-devel wrote: > 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

Re: [PATCH] Add support for ARCv2

2022-12-13 Thread Mark Wielaard
Hi Shahab, On Thu, 2022-12-01 at 09:44 +, Shahab Vahedi via Elfutils-devel wrote: > On 12/1/22 00:36, Mark Wielaard wrote: > > Nice. I just synced elf.h. > > Thanks a lot Mark! I will send a new patch sans the elf.h and will > add possible test(s) that can be related to it.

Re: [PATCH] libdwfl: Read no more than required to parse dynamic sections

2022-12-13 Thread Mark Wielaard
Hi Gavin, On Thu, 2022-12-01 at 13:13 -0800, Gavin Li wrote: > Awesome, thanks for looking over this. I only have one comment: > there's an extra "xlatefrom.d_size = xlatefrom.d_size;" line that > should be removed. Thanks for spotting that. Odd the compiler didn't warn for that. There is a xlate

Re: [PATCHv2] support ZSTD compression algorithm

2022-12-15 Thread Mark Wielaard
Hi Martin, On Tue, 2022-11-29 at 13:05 +0100, Martin Liška wrote: > There's second version of the patch that fully support both > compression and decompression. > > Changes from the v1: > - compression support added > - zstd detection is fixed > - new tests are added > - builds fine w/ and w/o th

Re: [PATCHv2] support ZSTD compression algorithm

2022-12-15 Thread Mark Wielaard
Hi Martin, On Tue, Nov 29, 2022 at 01:05:45PM +0100, Martin Liška wrote: > diff --git a/libelf/elf_compress.c b/libelf/elf_compress.c > index d7f53af2..7a6e37a4 100644 > --- a/libelf/elf_compress.c > +++ b/libelf/elf_compress.c > @@ -39,6 +39,10 @@ > #include > #include > +#ifdef USE_ZSTD > +#

Re: [PATCHv2] support ZSTD compression algorithm

2022-12-19 Thread Mark Wielaard
Hi Martin, On Mon, 2022-12-19 at 15:19 +0100, Martin Liška wrote: > On 12/15/22 14:17, Mark Wielaard wrote: > > Is there a particular way you are running eu-readelf? Is it with > > generic -w or -a, or decoding a specific section type? > > Hello. > > $ LD_LIBRARY_PAT

Re: [PATCHv2] support ZSTD compression algorithm

2022-12-19 Thread Mark Wielaard
Hi Martin, On Mon, 2022-12-19 at 15:21 +0100, Martin Liška wrote: > > > + else > > > +error (0, 0, "Couldn't get chdr for section %zd", ndx); > > > > Shouldn't this error be fatal? > > What do you use for fatal errors? Depends a bit on context. It might be that this error isn't fatal,

Re: [PATCH] Add support for LoongArch

2022-12-19 Thread Mark Wielaard
100644 > --- a/libebl/eblopenbackend.c > +++ b/libebl/eblopenbackend.c > @@ -55,6 +55,7 @@ Ebl *m68k_init (Elf *, GElf_Half, Ebl *); > Ebl *bpf_init (Elf *, GElf_Half, Ebl *); > Ebl *riscv_init (Elf *, GElf_Half, Ebl *); > Ebl *csky_init (Elf *, GElf_Half, Ebl *); > +Ebl *loong

Re: [PATCH 02/25] ignore build directory

2022-12-20 Thread Mark Wielaard
On Sat, 2022-12-17 at 05:14 +0800, 罗勇刚(Yonggang Luo) wrote: > It's a common step to configure and make under build directory, so > that the > IDE won't affect by it I rather not just ignore a random directory name, unless it clearly is a default for the build system.

Re: [PATCH 06/25] move platform depended include into system.h of libebl

2022-12-20 Thread Mark Wielaard
Hi, On Sat, 2022-12-17 at 05:19 +0800, 罗勇刚(Yonggang Luo) wrote: > 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 #includ

Re: [PATCH 08/25] Use configure to detect HAVE_DECL_MMAP and use it for system doesn't provide sys/mman.h

2022-12-20 Thread Mark Wielaard
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 > > wrote: > > > Signed-off-by: Yonggang Luo > > > --- > > >

Re: [PATCH 09/25] include libgen.h in system.h

2022-12-20 Thread Mark Wielaard
On Sat, 2022-12-17 at 05:22 +0800, 罗勇刚(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: > > > basename function are accessed multiple place, but used

Re: [PATCH 14/25] libdw: check __OPTIMIZE__ in dwarf_whatattr.c and dwarf_whatform.c to match the header

2022-12-20 Thread Mark Wielaard
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 > Subject: [PATCH] libdw: Fixes compile of dwarf_whatattr.c and > dwarf_whatform.c > > If __OPTIMIZE_

Re: [PATCH 15/25] lib: Implement error properly even when not HAVE_ERR_H

2022-12-20 Thread Mark Wielaard
Hi, On Sat, 2022-12-17 at 05:50 +0800, 罗勇刚(Yonggang Luo) wrote: > On Mon, Dec 12, 2022 at 11:37 PM Mark Wielaard > wrote: > > On Fri, 2022-10-21 at 02:25 +0800, Yonggang Luo via Elfutils-devel > > wrote: > > > on win32, there is no err.h > > > [...

Re: [PATCH v3] Add support for Synopsys ARCv2 processors

2022-12-20 Thread Mark Wielaard
Hi Shabab, On Tue, 2022-12-20 at 12:56 +0100, Shahab Vahedi wrote: > There is no regression in tests for an x86_64 build, while the new > hello_arc_hs4.ko is added as well. This is the only meaningful > test that I could add at the moment, given the features supported > by this port. > > $ cat t

Re: [PATCH 06/25] move platform depended include into system.h of libebl

2022-12-20 Thread Mark Wielaard
On Tue, 2022-12-20 at 14:59 +0100, Mark Wielaard wrote: > The attached patch does that so no relative paths are needed in > #include statements. The try-bot looked good: https://builder.sourceware.org/buildbot/#/changes/16025 So I pushed this: commit 6ecd16410ce1fe5cb0ac5b7c3342c5cc33

Re: [PATCHv2] strip: keep .ctf section in stripped file

2022-12-20 Thread Mark Wielaard
Hi Guillermo, On Wed, Jun 01, 2022 at 10:55:27AM -0500, Guillermo E. Martinez via Elfutils-devel wrote: > This is the second version patch to avoid remove the CTF section in > stripped files. Changes from v1: > > - Add description in tests/run-strip-remove-keep-ctf.sh > mentioning how to r

[PATCH] lib: Remove -ffunction-sections for xmalloc

2022-12-20 Thread Mark Wielaard
The build used -ffunction-sections just for one file. Signed-off-by: Mark Wielaard --- lib/ChangeLog | 4 lib/Makefile.am | 4 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/ChangeLog b/lib/ChangeLog index 6bb0d4d0..5ab9477e 100644 --- a/lib/ChangeLog +++ b/lib

Re: [PATCH 1/1] support cross compilation

2022-12-21 Thread Mark Wielaard
Hi, It looks like I missed this. Sorry. On Wed, 2021-05-26 at 19:34 +0300, Petr Ovtchenkov wrote: > On Wed, 26 May 2021 12:41:51 -0300 > Érico Nogueira wrote: > > > > > Yes, we really cross. > > It doesn't matter because > > > We always use the release tarballs, which already have the %_dis.

  1   2   3   4   5   6   7   8   9   10   >