Re: Remove misleading XOR

2021-02-17 Thread Timm Bäder via Elfutils-devel
On 17/02/2021 17:49, Mark Wielaard wrote: I think both the comment and the warning message are a little misleading. The comment should really read "Change state from CLEANING to NO_RESIZING". You are right that NO_RESIZING is just zero, but still removing it seems to make the code less clear.

[PATCH v2] Improve building with LTO

2021-02-17 Thread Alexander Miller via Elfutils-devel
From: Alexander Miller Use symver attribute for symbol versioning instead of .symver assembler directive when available. Convert to use double @ syntax for default version in all cases (required when using the attribute). Add the attributes externally_visible, no_reorder if available when using

Re: PATCH OBV: debuginfod testsuite tweak

2021-02-17 Thread Frank Ch. Eigler via Elfutils-devel
Hi - > Committing as obvious #2: Author: Frank Ch. Eigler Date: Wed Feb 17 19:34:09 2021 -0500 testsuite: run-debuginfod-find.sh: Fix grooming test indeterminacy We were looking at a less-than-ideal metric to check the effects of grooming on the database. It turns out there

Buildbot failure in Wildebeest Builder on whole buildset

2021-02-17 Thread buildbot
The Buildbot has detected a failed build on builder whole buildset while building elfutils. Full details are available at: https://builder.wildebeest.org/buildbot/#builders/1/builds/724 Buildbot URL: https://builder.wildebeest.org/buildbot/ Worker for this Build: centos-x86_64 Build Reason:

PATCH OBV: debuginfod testsuite tweak

2021-02-17 Thread Frank Ch. Eigler via Elfutils-devel
Hi - Committing as obvious: Author: Frank Ch. Eigler Date: Wed Feb 17 15:38:43 2021 -0500 testsuite: run-debuginfod-find.sh: Be more verbose on failure To help diagnose timing glitches in debuginfod testing, print more diagnostics on a metric-timeout failure. Signed

Re: [PATCH] Improve building with LTO

2021-02-17 Thread Mark Wielaard
Hi Alexander, First my apologies, your last commit had "Alexander Miller via Elfutils-devel " as author. That is the stupid mailinglist doing From mangling, bad mailinglist. But also bad me for not catching that. We probably need a git hook to reject pushes with such bogus authors. Could you add a

Re: PATCH: PR27413: use bsdtar to unpack deb-related formats

2021-02-17 Thread Mark Wielaard
Hi Frank, On Sun, 2021-02-14 at 16:06 -0500, Frank Ch. Eigler via Elfutils-devel wrote: > commit 6c607f8df4ee6f7a31e25ed07d4fe43a11c32804 > Author: Frank Ch. Eigler > Date: Sun Feb 14 16:02:05 2021 -0500 > > PR27413: use bsdtar to unpack deb-related formats > > dpkg-deb has been r

Re: Remove misleading XOR

2021-02-17 Thread Mark Wielaard
Hi Érico, On Wed, 2021-02-17 at 15:15 -0300, Érico Nogueira wrote: > Em 17/02/2021 13:49, Mark Wielaard escreveu: > > -#define NO_RESIZING 0u > > -#define ALLOCATING_MEMORY 1u > > -#define MOVING_DATA 3u > > -#define CLEANING 2u > > +#define NO_RESIZING 0x0 > > +#define ALLOCATING_MEMORY 0

Re: Remove misleading XOR

2021-02-17 Thread Érico Nogueira via Elfutils-devel
Em 17/02/2021 13:49, Mark Wielaard escreveu: On Wed, 2021-02-17 at 11:12 +0100, Timm Bäder via Elfutils-devel wrote: Hi, I'm mainly leaving this patch here to discuss what to do about it. Clang complains because of -Wxor-used-as-pow. So of course one possibility is to use -Wno-xor-used-as-po

Re: Remove misleading XOR

2021-02-17 Thread Mark Wielaard
On Wed, 2021-02-17 at 11:12 +0100, Timm Bäder via Elfutils-devel wrote: > Hi, > > I'm mainly leaving this patch here to discuss what to do about it. > Clang complains because of -Wxor-used-as-pow. So of course one > possibility is to use -Wno-xor-used-as-pow. It also prints > '0x2 ^ NO_RESIZING' a

Re: [PATCH] readelf: Type DIE offset is from start of CU.

2021-02-17 Thread Mark Wielaard
On Fri, 2021-02-12 at 16:47 +0100, Mark Wielaard wrote: > While inspecting some type units I noticed the type offset seemed off. > We were printing the offset as is, but it should include the offset of > the unit. There was actually a testcase for this, run-readelf-types.sh > but that had the same

Re: [PATCH] readelf, libdw: blocks aren't expressions for DWARF version 4

2021-02-17 Thread Mark Wielaard
On Fri, 2021-02-12 at 16:30 +0100, Mark Wielaard wrote: > For DWARF version 4 or higher a block form really encodes a block, > not an expression location. Also constant offsets can be expressed > as DW_FORM_implicit_const in DWARF version 5. Pushed.

[Bug debuginfod/27413] use bsdtar for .deb extraction too

2021-02-17 Thread fche at redhat dot com via Elfutils-devel
https://sourceware.org/bugzilla/show_bug.cgi?id=27413 Frank Ch. Eigler changed: What|Removed |Added Resolution|--- |FIXED Status|NEW

[PATCH] Remove misleading XOR

2021-02-17 Thread Timm Bäder via Elfutils-devel
From: Timm Bäder Clang complains about this because it has -Wxor-used-as-pow: ../../lib/dynamicsizehash_concurrent.c:288:61: error: result of 'CLEANING ^ NO_RESIZING' is 2; did you mean '1 << NO_RESIZING' (1)? [-Werror,-Wxor-used-as-pow] atomic_fetch_xor_explicit(&htab->resizing_state, CLEAN

Remove misleading XOR

2021-02-17 Thread Timm Bäder via Elfutils-devel
Hi, I'm mainly leaving this patch here to discuss what to do about it. Clang complains because of -Wxor-used-as-pow. So of course one possibility is to use -Wno-xor-used-as-pow. It also prints '0x2 ^ NO_RESIZING' as an alternative to silence the warning. Given the comment just above the changed li

[PATCH 2/3] build: Check for -Wtrampolines support

2021-02-17 Thread Timm Bäder via Elfutils-devel
From: Timm Bäder Clang does not support -Wtrampolines, so check if the compiler supports it before using it. Signed-off-by: Timm Bäder --- config/eu.am | 10 -- configure.ac | 9 + 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/config/eu.am b/config/eu.am inde

[PATCH 1/3] build: Check for -Wimplicit-fallthrough=5 separately

2021-02-17 Thread Timm Bäder via Elfutils-devel
From: Timm Bäder GCC accepts the =5, which means it doesn't try to parse any comments and only accepts the fallthrough attribute in code. Clang does not ever parse any comments and always wants the fallthrough attribute anyway. Clang also doesn't accept the =n parameter for -Wimplicit-fallthrough

[PATCH 3/3] build: Check for -Wno-packed-not-aligned support

2021-02-17 Thread Timm Bäder via Elfutils-devel
From: Timm Bäder Clang does not support this warning, so check for compiler support before using it. Signed-off-by: Timm Bäder --- config/eu.am | 10 -- configure.ac | 9 + 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/config/eu.am b/config/eu.am index 025125

[PATCH 2/2] elfstrmerge: Pull new_data_buf() into file scope

2021-02-17 Thread Timm Bäder via Elfutils-devel
From: Timm Bäder Get rid of a nested function this way. Signed-off-by: Timm Bäder --- tests/elfstrmerge.c | 32 +--- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/tests/elfstrmerge.c b/tests/elfstrmerge.c index 00f025ec..197c6a5d 100644 --- a/tests

[PATCH 1/2] elfstrmerge: Pull newsecndx() info file scope

2021-02-17 Thread Timm Bäder via Elfutils-devel
From: Timm Bäder Get rid of a nested function this way. Signed-off-by: Timm Bäder --- tests/elfstrmerge.c | 76 + 1 file changed, 42 insertions(+), 34 deletions(-) diff --git a/tests/elfstrmerge.c b/tests/elfstrmerge.c index abbdf3fd..00f025ec 10064

[PATCH 4/4] elfcompress: Replace cleanup() with label

2021-02-17 Thread Timm Bäder via Elfutils-devel
From: Timm Bäder Get rid of a nested function this way. Signed-off-by: Timm Bäder --- src/elfcompress.c | 218 +++--- 1 file changed, 109 insertions(+), 109 deletions(-) diff --git a/src/elfcompress.c b/src/elfcompress.c index 65e28f0e..ba08e73f 100644

[PATCH 3/4] elfcompress: Pull get_sections() into file scope

2021-02-17 Thread Timm Bäder via Elfutils-devel
From: Timm Bäder Get rid of a nested function this way. Signed-off-by: Timm Bäder --- src/elfcompress.c | 21 +++-- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/elfcompress.c b/src/elfcompress.c index 2dc74a0c..65e28f0e 100644 --- a/src/elfcompress.c +++

[PATCH 1/4] elfcompress: Pull set_section() into file scope

2021-02-17 Thread Timm Bäder via Elfutils-devel
From: Timm Bäder Get rid of a nested function this way. Signed-off-by: Timm Bäder --- src/elfcompress.c | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/elfcompress.c b/src/elfcompress.c index 1b5b1e36..65a922a7 100644 --- a/src/elfcompress.c +++ b/src/e

[PATCH 2/4] elfcompress: Pull get_section() into file scope

2021-02-17 Thread Timm Bäder via Elfutils-devel
From: Timm Bäder Get rid of a nested function this way. Signed-off-by: Timm Bäder --- src/elfcompress.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/elfcompress.c b/src/elfcompress.c index 65a922a7..2dc74a0c 100644 --- a/src/elfcompress.c +++ b/src/elfc

[PATCH 5/5] unstrip: Remove nested next() function

2021-02-17 Thread Timm Bäder via Elfutils-devel
From: Timm Bäder This is a simple one-liner, so inline this into the few callers. Get rid of a nested function this way. Signed-off-by: Timm Bäder --- src/unstrip.c | 14 ++ 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/unstrip.c b/src/unstrip.c index 3822a19b..

[PATCH 3/5] unstrip: Inline find_unalloc_section() into only caller

2021-02-17 Thread Timm Bäder via Elfutils-devel
From: Timm Bäder Get rid of an unnecessary nested function this way. Signed-off-by: Timm Bäder --- src/unstrip.c | 47 +-- 1 file changed, 21 insertions(+), 26 deletions(-) diff --git a/src/unstrip.c b/src/unstrip.c index 72fabac8..90e02831 100644 -

[PATCH 4/5] unstrip: Pull warn() into file scope

2021-02-17 Thread Timm Bäder via Elfutils-devel
From: Timm Bäder Get rid of a nested function this way. Signed-off-by: Timm Bäder --- src/unstrip.c | 35 --- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/src/unstrip.c b/src/unstrip.c index 90e02831..3822a19b 100644 --- a/src/unstrip.c +++ b/

[PATCH 2/5] unstrip: Pull check_match() into file scope

2021-02-17 Thread Timm Bäder via Elfutils-devel
From: Timm Bäder Get rid of a nested function this way. Signed-off-by: Timm Bäder --- src/unstrip.c | 28 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/src/unstrip.c b/src/unstrip.c index 6e874c3a..72fabac8 100644 --- a/src/unstrip.c +++ b/src/uns

[PATCH 1/5] unstrip: Pull adjust_reloc() into file scope

2021-02-17 Thread Timm Bäder via Elfutils-devel
From: Timm Bäder Get rid of a nested function this way. Signed-off-by: Timm Bäder --- src/unstrip.c | 28 +++- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/src/unstrip.c b/src/unstrip.c index 85803295..6e874c3a 100644 --- a/src/unstrip.c +++ b/src/uns

[PATCH 2/2] elflint: Pull left() in file scope

2021-02-17 Thread Timm Bäder via Elfutils-devel
From: Timm Bäder And rename it to buffer_left() to be a bit more descriptive Signed-off-by: Timm Bäder --- src/elflint.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/elflint.c b/src/elflint.c index 4df6f6e5..85cc7833 100644 --- a/src/elflint.c +++ b

[PATCH 1/2] elflint: Pull pos() info file scope

2021-02-17 Thread Timm Bäder via Elfutils-devel
From: Timm Bäder Rename it to buffer_pos() to be a bit more descriptive and get rid of a nested function this way. Signed-off-by: Timm Bäder --- src/elflint.c | 39 --- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/src/elflint.c b/src/elfli