Re: [PATCH] elfclassify tool

2019-07-19 Thread Mark
On Fri, 2019-07-19 at 16:43 +0300, Dmitry V. Levin wrote: > On Fri, Jul 19, 2019 at 02:47:09PM +0200, Mark Wielaard wrote: > [...] > > +static bool > > +is_shared (void) > > +{ > > + if (!is_loadable ()) > > +return false; > > + > > + /* T

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
catching this. Please do add a Signed-off-by line next time. See the CONTRIBUTING file. I was wondering why this hasn't caused an issue before. But it looks like internally when we use the result of dwarf_next_cfi in cie.c and fde.c we always call __libdw_intern_cie or intern_new_cie which recalculates the fde_augmentation_data_size by reading the augmentation string and data again. Thanks, Mark

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
r to give a final > review. Thanks. I like this version except for those two nitpicks above. What do you think? Cheers, Mark

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

2022-09-08 Thread Mark Wielaard
returned (cached) result. Just like we clear client->url early. Thanks, Mark

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
uot;gnu_vendor" convention? So that could be checked at: bool gnu_vendor = (q - name == sizeof "gnu" && !memcmp (name, "gnu", sizeof "gnu")); gnu_vendor |= ebl->has_gnu_attributes; Or something similar? Cheers, Mark

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

2022-10-13 Thread Mark Wielaard
Added a ChangeLog entry and pushed this. Cheers, Mark

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

2022-10-14 Thread Mark Wielaard
recreate the hello3*rpm test files. Frank, would you mind if these are just renamed to normal *.spec? Thanks, Mark > Signed-off-by: Yonggang Luo > --- > tests/Makefile.am | 2 +- > tests/debuginfod-rpms/{hello2.spec. => hello2.spec} | 0 &

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

2022-10-14 Thread Mark Wielaard
heory since it cleans up some of the includes. But it doesn't work as is. libebl/eblobjnotetypename.c only included system.h so now doesn't compile anymore. And libintl.h is removed from libelf/elf_error.c which really is necessary. Cheers, Mark

Re: [PATCH] libdwfl: add dwfl_report_offline_memory

2022-10-16 Thread Mark Wielaard
hed almost as is. While reviewing I added some ChangeLog entries. I added the NEWS entry. In libdw.map I moved dwfl_report_offline_memory under ELFUTILS_0.188. In the tests/Makefile.am I added libeu to dwfl_report_offline_memory_LDADD because the test uses error. Thanks, Mark

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

2022-10-16 Thread Mark Wielaard
x27;t check the results from lseek, read and malloc. Patch to fix that attached. And there is an error on 32bit systems: tests/dwfl-report-offline-memory contains non-lfs symbols: lseek open Fix that by including config.h earlier. Cheers, Mark>From 72860bfdca5286399837080d53ba297bf72c56b3 Mo

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

2022-10-16 Thread Mark Wielaard
eviewing wrote ChangeLog entries. Pushed with those added. Cheers, Mark

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

2022-10-16 Thread Mark Wielaard
le eu-config.h And this works because we include eu-config.h in config.h. All files where libintl.h is removed includes config.h, except for libdwP.h and libeblP.h, but it isn't expected there. Pushed, Mark

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

2022-10-16 Thread Mark Wielaard
onfigure check. Cheers, Mark

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 > ---

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

2022-10-16 Thread Mark Wielaard
this patch can be split up is separate concerns. But I have to admit I am a litle afraid this will be hard to keep working. Cheers, Mark

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
fined macro by gcc/clang, > > BYTE_ORDER is defined in Aha, thanks. I added that to the commit message and pushed the change. Cheers, Mark

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

2022-10-17 Thread Mark Wielaard
re dumped) env LD_LIBRARY_PATH=$ldpath ${abs_builddir}/../debuginfod/debuginfod $VERBOSE -d ${DB} -F -U -t0 -g0 -p $PORT1 L D F > vlog$PORT1 2>&1 The log also says: Fatal error in GNU libmicrohttpd daemon.c:3831: Failed to remove FD from epoll set. Very odd. I don't have any hypothesis for why these are occuring. Cheers, Mark

[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
ove the --sign from rpmbuild - escape the % in spec comments That makes make rpm work out of the box without warnings. Does it also help the windows git thing? Cheers, Mark From f7bd331326a03108095b7593bb48d7482690501f Mon Sep 17 00:00:00 2001 From: Yonggang Luo Date: Tue, 20 Sep 2022 16: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
bool *file_is_elf) Maybe that is over-designed to avoid a little bit of disk waste? Cheers, Mark

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

2022-10-26 Thread Mark Wielaard
: static inline ssize_t write_retry (int fd, const void *buf, size_t len) Which takes care of partial and/or interrupted write calls. Cheers, Mark

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

2022-10-27 Thread Mark Wielaard
nks, Mark

Re: [PATCH 02/25] ignore build directory

2022-10-27 Thread Mark Wielaard
.gitignore > @@ -21,6 +21,7 @@ Makefile.in > /INSTALL > /aclocal.m4 > /autom4te.* > +/build > /config.cache > /config.h > /config.h.in Why is this necessary? Thanks, Mark

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
YSTEM_H 1" > The compile error: > ./../libdw/memory-access.h:390:12: error: implicit declaration of > function ‘bswap_32’ [-Werror=implicit-function-declaration] Thanks, makes sense. Added ChangeLog entries and tweaked the commit message a bit to not exceed 72 chars lines. Pushed, Mark

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
e > descriptor. This can (and soon will be used in systemtap) > as an easy way to scan archive files and quickly/easily extract > information concerning the executables they contain. I see how this could be useful, but wouldn't it be easier to have a database query do this? Cheers, Mark

[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
d > -below. The only supported usage of this function is for adding an > -optional header which might or might not be passed through to the > -server for logging purposes only. > +below. You can use this function to add authorization information for > +access control, or to provide optional headers to the server for > +logging purposes. > > By default, the library adds a descriptive \fIUser-Agent:\fP > header to outgoing requests. If the client application adds Thanks for the documentation, which looks good. I have pushed this with the two extra vfd >= 0 guards mentioned above. Note that it would be really good to have a testcase for this so it doesn't accidentally breaks. Since it might be that other developers won't use this functionality. Thanks, Mark

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

2022-10-28 Thread Mark Wielaard
tive path trick, especially if there it is clear only one is every needed. You also use it for other files, why? Cheers, Mark

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
TE] are elfutils extensions, but they are used internally in other libraries. Cheers, Mark

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
| 4 > libdwfl/link_map.c | 2 -- > libdwfl/linux-pid-attach.c | 1 - > libdwfl/offline.c | 1 - > libdwfl/open.c | 2 -- > 31 files changed, 4 insertions(+), 51 deletions(-) Tweak the commit message to fit on < 72 chars and added ChangeLog entries. Pushed, Mark

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

2022-10-28 Thread Mark Wielaard
t; __libelf_decompress_elf (Elf_Scn *scn, size_t *size_out, size_t *addralign) > @@ -268,7 +316,7 @@ __libelf_decompress_elf (Elf_Scn *scn, size_t *size_out, > size_t *addralign) >if (gelf_getchdr (scn, &chdr) == NULL) > return NULL; > > - if (chdr.ch_type != ELFCOMPRESS_ZLIB) > + if (chdr.ch_type != ELFCOMPRESS_ZLIB && chdr.ch_type != ELFCOMPRESS_ZSTD) > { What about the ifndef USE_ZSTD case? Should this then not recognize ELFCOMPRESS_ZSTD? Thanks, Mark

[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
ed documentation and tests. How can I not merge this? :) Pushed. > Some of the .po files need regenerating, I didn't include that here because it > was a massive diff. Yeah, we only do that before a release. Thanks, Mark

Proposed elfutils 0.188 release in Wednesday

2022-10-31 Thread Mark Wielaard
wait for the next release (lets do 0.189 in 3 months, end of January, as we normally do, instead of waiting 6 months). Cheers, Mark

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
cktrace-native-core-biarch.sh (exit status: 1) > > > > These two need abi_cfi hooks to describe the DWARF CFI needed to > > unwind. > > To be clear, these are the test results on a build without the patch AND > with the patch. I'm not sure why it happens even without the patch on > my system. If you want, I can file a bug report with more details. Aha, sorry, I missed this was on x86_64. That is indeed odd. If you could file a bug report with your environment where this fails that would be good. Thanks, Mark

Re: PATCH: Bug debuginfod/29472 followup

2022-11-01 Thread Mark Wielaard
which would be nice to see a separate patch. Why does debuginfod-client.c use json-c? Can't the server sent the json object as a normal char string? Why does the string from the server need to be interpreted as a json object and then turned into a string again? Cheers, Mark

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

2022-11-02 Thread Mark Wielaard
nfod-federation-metrics.sh crash in libmicrohttpd (version 0.9.75): libmicrohttpd error: Call to epoll_ctl failed: Bad file descriptor Fatal error in GNU libmicrohttpd daemon.c:2927: Close socket failed. Still don't know why that is sometimes triggered. It does seem to be caused by the latest libmicrohttpd release. But only occasionally. Cheers, Mark

[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
fd >= 0 ? That is what is checked in the rest of the code. Except for the debuginfod_find_section function which uses fd >0 twice. It is unlikely, but I think fd can be zero if it (stdin) was closed by the program for some reason. Then I think zero can be reused as new file descriptor? Cheers, Mark

[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
do at the Cauldron this year: https://gnu.wildebeest.org/~mark/sourceware/presentation.html

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
except as sanity check that the ELF header can be read properly. OK, with and without that change. Cheers, Mark

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

2022-11-25 Thread Mark Wielaard
e just build libraries (and so they run under valgrind when configured with --enable-valgrind). So in this case just add a testrun in front. -${abs_top_builddir}/src/readelf --elf-section -sW testfilebaxmin 2>&1 \ +testrun ${abs_top_builddir}/src/readelf --elf-section -sW testfilebaxmin 2>&1 \ OK with that change. Thanks, Mark

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

2022-11-28 Thread Mark Wielaard
arly unrelated. Another Fatal error in GNU libmicrohttpd daemon.c:3239: Failed to remove FD from epoll set. Grmbl. Undeterministic tests :{ Cheers, Mark

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
(dyn_data_size != 0 && dyn_data_size < dyn_filesz) dyn_filesz = dyn_data_size; ? Thanks, Mark

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

2022-11-30 Thread Mark Wielaard
ilable checks are necessary. So I removed them all. I also adjusted the commit message a bit. Could you look at this patch and let me know if this works for you? Cheers, Mark>From 59f1b49c1a1163ebde891196c1b24e3f4225915b Mon Sep 17 00:00:00 2001 From: Gavin Li Date: Wed, 30 Nov 2022 18:26

Re: [PATCH] Add support for ARCv2

2022-11-30 Thread Mark Wielaard
Hi Shahab, On Wed, Nov 30, 2022 at 08:15:55AM +, Shahab Vahedi via Elfutils-devel wrote: > The necessary changes are in glibc now [1]. How/When does the sync happen? > Should > I submit a patch, or trigger a request, etc.? Nice. I just synced elf.h. Thanks, M

Re: dwarf_nextcu can't handle abbrev offset correctly ?

2022-12-01 Thread Mark Wielaard
#x27;t know how to handle the relocations for LoongArch yet. Specifically the backend should implement the reloc_simple_type hook. Cheers, Mark

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
> - asm ("" > + __asm ("" > : "=mr" (opoff), "=mr" (correct_prefix), "=mr" > (codep), >"=mr" (next_curr), "=mr" (len)); > } Urgh. Is this really (still) necessary? It is inside an if (0) block. So it also is never used. Can we just get rid of the whole block? Thanks, Mark

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
$64r_m FCT_mod$r_m" in i386_data.h This is enough and can be recognized by clang-cl on windows Signed-off-by: Yonggang Luo Cheers, Mark

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

2022-12-12 Thread Mark Wielaard
ory-access.h Signed-off-by: Yonggang Luo Thanks, Mark

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
bdw, so there must be a real implementation. So we want to generate code for these functions whether or not __OPTIMIZE__ is defined. Cheers, Mark

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

2022-12-12 Thread Mark Wielaard
27: printf: write error: No space left on device Tom, could you take a look? Thanks, Mark

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

2022-12-12 Thread Mark Wielaard
ignores errno and doesn't exit when necessary. Cheers, Mark

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
eck validity of fildes using fcntl, then shouldn't you at least check for fildes >= 0 ? Cheers, Mark

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
7;t warn for that. There is a xlatefrom.d_size = phnum * phentsize; just before this that does the correct assignment. Pushed with that line removed. Cheers, Mark

Re: [PATCHv2] support ZSTD compression algorithm

2022-12-15 Thread Mark Wielaard
AC_SUBST for LIBZSTD in config/libelf.pc.in now, as used in the libdw.pc.in: Requires.private: zlib @LIBZSTD@ > diff --git a/libelf/Makefile.am b/libelf/Makefile.am > index 560ed45f..24c25cf8 100644 > --- a/libelf/Makefile.am > +++ b/libelf/Makefile.am > @@ -106,7 +106,7 @@ libelf_pic_a_SOURCES = > am_libelf_pic_a_OBJECTS = $(libelf_a_SOURCES:.c=.os) > > libelf_so_DEPS = ../lib/libeu.a > -libelf_so_LDLIBS = $(libelf_so_DEPS) -lz > +libelf_so_LDLIBS = $(libelf_so_DEPS) -lz $(zstd_LIBS) > if USE_LOCKS > libelf_so_LDLIBS += -lpthread > endif OK. Haven't read the actual code yet. I'll get back to that later today. Cheers, Mark

Re: [PATCHv2] support ZSTD compression algorithm

2022-12-15 Thread Mark Wielaard
;"), > 0 }, >{ "name", 'n', "SECTION", 0, > N_("SECTION name to (de)compress, SECTION is an extended wildcard > pattern (defaults to '.?(z)debug*')"), I would say or 'zstd' (ELF ZSTD compression)" to match the 'zlib; type description. > diff --git a/src/readelf.c b/src/readelf.c > index cc3e0229..451f8400 100644 > --- a/src/readelf.c > +++ b/src/readelf.c > @@ -1238,13 +1238,17 @@ get_visibility_type (int value) > static const char * > elf_ch_type_name (unsigned int code) > { > - if (code == 0) > -return "NONE"; > - > - if (code == ELFCOMPRESS_ZLIB) > -return "ZLIB"; > - > - return "UNKNOWN"; > + switch (code) > +{ > +case 0: > + return "NONE"; > +case ELFCOMPRESS_ZLIB: > + return "ZLIB"; > +case ELFCOMPRESS_ZSTD: > + return "ZSTD"; > +default: > + return "UNKNOWN"; > +} > } > /* Print the section headers. */ OK. > diff --git a/tests/run-compress-test.sh b/tests/run-compress-test.sh > index a6a298f5..3f9c990e 100755 > --- a/tests/run-compress-test.sh > +++ b/tests/run-compress-test.sh > @@ -61,6 +61,30 @@ testrun_elfcompress_file() > echo "uncompress $elfcompressedfile -> $elfuncompressedfile" > testrun ${abs_top_builddir}/src/elfcompress -v -t none -o > ${elfuncompressedfile} ${elfcompressedfile} > testrun ${abs_top_builddir}/src/elfcmp ${uncompressedfile} > ${elfuncompressedfile} > + > +outputfile="${infile}.gabi.zstd" > +tempfiles "$outputfile" > +echo "zstd compress $elfcompressedfile -> $outputfile" > +testrun ${abs_top_builddir}/src/elfcompress -v -t zstd -o ${outputfile} > ${elfcompressedfile} > +testrun ${abs_top_builddir}/src/elfcmp ${uncompressedfile} ${outputfile} > +echo "checking compressed section header" $outputfile > +testrun ${abs_top_builddir}/src/readelf -Sz ${outputfile} | grep "ELF > ZSTD" >/dev/null > + > +zstdfile="${infile}.zstd" > +tempfiles "$zstdfile" > +echo "zstd compress $uncompressedfile -> $zstdfile" > +testrun ${abs_top_builddir}/src/elfcompress -v -t zstd -o ${zstdfile} > ${elfuncompressedfile} > +testrun ${abs_top_builddir}/src/elfcmp ${uncompressedfile} ${zstdfile} > +echo "checking compressed section header" $zstdfile > +testrun ${abs_top_builddir}/src/readelf -Sz ${zstdfile} | grep "ELF > ZSTD" >/dev/null > + > +zstdgnufile="${infile}.zstd.gnu" > +tempfiles "$zstdgnufile" > +echo "zstd re-compress to GNU ZLIB $zstdfile -> $zstdgnufile" > +testrun ${abs_top_builddir}/src/elfcompress -v -t zlib-gnu -o > ${zstdgnufile} ${zstdfile} > +testrun ${abs_top_builddir}/src/elfcmp ${uncompressedfile} ${zstdgnufile} > +echo "checking .zdebug section name" $zstdgnufile > +testrun ${abs_top_builddir}/src/readelf -S ${zstdgnufile} | grep > ".zdebug" >/dev/null > } > testrun_elfcompress() You might add these to a separate run test file or pass some ZSTD flag through the test environment to conditionally run these new tests. Cheers, Mark

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
e). And/Or if the program needs a cleanup you'll goto cleanup (as is done in process_file). Cheers, Mark

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
ink this is correct either. Some system headers might depend on __OPTIMIZE__ being defined. Are you using a compiler that doesn't define __OPTIMIZE__ ? Cheers, Mark

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
o.bz2 \ > + hello_arc_hs4.ko.bz2 \ >run-unstrip-test.sh run-unstrip-test2.sh \ >testfile-info-link.bz2 testfile-info-link.debuginfo.bz2 \ >testfile-info-link.stripped.bz2 run-unstrip-test3.sh \ > diff --git a/tests/hello_arc_hs4.ko.bz2 b/tests/hello_arc_hs4.ko.bz2 > new file mode 100644 > index > ..56ccb3c494e84450c7aeac5f57f > 94aef8336f8e0 > GIT binary patch > literal 15004 > [...] > literal 0 > HcmV?d1 > > diff --git a/tests/run-strip-reloc.sh b/tests/run-strip-reloc.sh > index b7ec1420..033ed278 100755 > --- a/tests/run-strip-reloc.sh > +++ b/tests/run-strip-reloc.sh > @@ -18,7 +18,8 @@ > . $srcdir/test-subr.sh > > testfiles hello_i386.ko hello_x86_64.ko hello_ppc64.ko hello_s390.ko > \ > - hello_aarch64.ko hello_m68k.ko hello_riscv64.ko hello_csky.ko > + hello_aarch64.ko hello_m68k.ko hello_riscv64.ko hello_csky.ko \ > + hello_arc_hs4.ko > > tempfiles readelf.out readelf.out1 readelf.out2 > tempfiles out.stripped1 out.debug1 out.stripped2 out.debug2 > @@ -120,6 +121,7 @@ runtest hello_aarch64.ko 1 > runtest hello_m68k.ko 1 > runtest hello_riscv64.ko 1 > runtest hello_csky.ko 1 > +runtest hello_arc_hs4.ko 1 > > # self test, shouldn't impact non-ET_REL files at all. > runtest ${abs_top_builddir}/src/strip 0 Very nice, that makes it possible to test some of this on non-ARC setups. (Seems to run fine here) Let me know if you want this to go in as is or if you want to sent a v4 with the tweaks suggested above. Cheers. Mark >

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
ction should/shouldn't be stripped (into a separate .debug file). What was the conclusion of that? Thanks, Mark

[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

  1   2   3   4   5   6   7   8   9   10   >