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 ...; .previous). This led to
> > run-low_high_pc.sh failure in form of:
> > 
> > FAIL: run-low_high_pc.sh
> > 
> > 
> > [b] main.c
> > [2d] main
> > 
> > [b] ../sysdeps/i386/start.S
> > [26] _start
> > [40] ../sysdeps/x86/abi-note.c
> > [b52] init.c
> > [b8e] static-reloc.c
> > [2dba] _dl_relocate_static_pie
> > [2dd8] ../sysdeps/i386/crti.S
> > [2def] _init
> > lowpc: 8049000, highpc: 8049000lx
> > ../sysdeps/i386/crti.S: [2def] '_init' highpc <= lowpc
> > FAIL run-low_high_pc.sh (exit status: 255)
> > 
> > To work it around let's allow lowpc == highpc special case.
> > 
> > https://sourceware.org/bugzilla/show_bug.cgi?id=29450
> 
> Thanks for finding this and suggesting a workaround.  But lets first
> try to fix binutils. This seems like a pretty bad bug, lets hope it
> gets fixed soon. So we don't need these kind of workarounds.
> 
> I added a comment to the binutils bug:
> https://sourceware.org/bugzilla/show_bug.cgi?id=29451#c2

Since this binutils bug was fixed I assume this patch isn't needed
anymore.

Thanks,

Mark


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 the
> ARM numbering scheme by default for non-GNU attributes.

Yeah, I see this comment in print_attributes:

 /* GNU style tags have either a uleb128 value,
when lowest bit is not set, or a string
when the lowest bit is set.
"compatibility" (32) is special.  It has
both a string and a uleb128 value.  For
non-gnu we assume 6 till 31 only take ints.
XXX see arm backend, do we need a separate
hook?  */

Maybe we need a flag in the backend to tell whether attributes follow
the "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
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 and pushed this.

Cheers,

Mark


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

2022-10-13 Thread builder--- via Elfutils-devel
A new failure has been detected on builder elfutils-centos-x86_64 while 
building elfutils.

Full details are available at:
https://builder.sourceware.org/buildbot/#builders/39/builds/75

Build state: failed test (failure)
Revision: 6284f4d12ccbc6405e986fd84ac6d4d72dc9c2a7
Worker: centos-x86_64
Build Reason: (unknown)
Blamelist: Khem Raj 

Steps:

- 0: worker_preparation ( success )

- 1: set package name ( success )

- 2: git checkout ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/39/builds/75/steps/2/logs/stdio

- 3: autoreconf ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/39/builds/75/steps/3/logs/stdio

- 4: configure ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/39/builds/75/steps/4/logs/stdio

- 5: get version ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/39/builds/75/steps/5/logs/stdio
- property changes: 
https://builder.sourceware.org/buildbot/#builders/39/builds/75/steps/5/logs/property_changes

- 6: make ( warnings )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/39/builds/75/steps/6/logs/stdio
- warnings (2): 
https://builder.sourceware.org/buildbot/#builders/39/builds/75/steps/6/logs/warnings__2_

- 7: make check ( failure )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/39/builds/75/steps/7/logs/stdio
- test-suite.log: 
https://builder.sourceware.org/buildbot/#builders/39/builds/75/steps/7/logs/test-suite_log

- 8: prep ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/39/builds/75/steps/8/logs/stdio

- 9: build bunsen.cpio.gz ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/39/builds/75/steps/9/logs/stdio

- 10: fetch bunsen.cpio.gz ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/39/builds/75/steps/10/logs/stdio

- 11: unpack bunsen.cpio.gz ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/39/builds/75/steps/11/logs/stdio

- 12: pass .bunsen.source.gitname ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/39/builds/75/steps/12/logs/stdio

- 13: pass .bunsen.source.gitdescribe ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/39/builds/75/steps/13/logs/stdio

- 14: pass .bunsen.source.gitbranch ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/39/builds/75/steps/14/logs/stdio

- 15: pass .bunsen.source.gitrepo ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/39/builds/75/steps/15/logs/stdio

- 16: upload to bunsen ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/39/builds/75/steps/16/logs/stdio

- 17: clean up ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/39/builds/75/steps/17/logs/stdio

- 18: make distclean ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/39/builds/75/steps/18/logs/stdio



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

2022-10-13 Thread Sergei Trofimovich via Elfutils-devel
On Thu, 13 Oct 2022 16:40:36 +0200
Mark Wielaard  wrote:

> 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 ...; .previous). This led to
> > > run-low_high_pc.sh failure in form of:
> > > 
> > > FAIL: run-low_high_pc.sh
> > > 
> > > 
> > > [b] main.c
> > > [2d] main
> > > 
> > > [b] ../sysdeps/i386/start.S
> > > [26] _start
> > > [40] ../sysdeps/x86/abi-note.c
> > > [b52] init.c
> > > [b8e] static-reloc.c
> > > [2dba] _dl_relocate_static_pie
> > > [2dd8] ../sysdeps/i386/crti.S
> > > [2def] _init
> > > lowpc: 8049000, highpc: 8049000lx
> > > ../sysdeps/i386/crti.S: [2def] '_init' highpc <= lowpc
> > > FAIL run-low_high_pc.sh (exit status: 255)
> > > 
> > > To work it around let's allow lowpc == highpc special case.
> > > 
> > > https://sourceware.org/bugzilla/show_bug.cgi?id=29450  
> > 
> > Thanks for finding this and suggesting a workaround.  But lets first
> > try to fix binutils. This seems like a pretty bad bug, lets hope it
> > gets fixed soon. So we don't need these kind of workarounds.
> > 
> > I added a comment to the binutils bug:
> > https://sourceware.org/bugzilla/show_bug.cgi?id=29451#c2  
> 
> Since this binutils bug was fixed I assume this patch isn't needed
> anymore.

Agreed. https://sourceware.org/PR29450#c8 cosed the bug as RESOLVED/MOVED
to declare it a binutils deficiency. Downstream use binutils-2.39 with a
gas patch and are able to run unmodified elfutils testsuite as is.

Thank you!

-- 

  Sergei