[Bug general/28608] elflint elfstrmerge fails with ld.gold

2023-01-16 Thread mliska at suse dot cz via Elfutils-devel
https://sourceware.org/bugzilla/show_bug.cgi?id=28608

Martin Liska  changed:

   What|Removed |Added

 Resolution|--- |INVALID
 Status|NEW |RESOLVED

--- Comment #6 from Martin Liska  ---
Ok, so it's a bug in gold which is not supported much anyway.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

[Bug tools/28873] Implement eu-readelf -D

2023-01-16 Thread dichen at redhat dot com via Elfutils-devel
https://sourceware.org/bugzilla/show_bug.cgi?id=28873

--- Comment #5 from Di Chen  ---
Created attachment 14600
  --> https://sourceware.org/bugzilla/attachment.cgi?id=14600&action=edit
readelf: display dynamic symtab without section headers

```
# failed to print symtab of a binary which has section headers removed.
$ ./src/readelf -s ~/test/a.out

# it works with "-D" for a binary which has section headers removed.
$ ./src/readelf -Ds ~/test/a.out 
0:   0 NOTYPE  LOCAL  DEFAULTUNDEF 
1:   0 FUNCGLOBAL DEFAULTUNDEF
__libc_start_main@GLIBC_2.34 (2)
2:   0 NOTYPE  WEAK   DEFAULTUNDEF __gmon_start__
```

It works well for binaries which has SYMTAB section right after STRTAB section.
```
$ readelf -Dd ~/test/a.out 

Dynamic section at offset 0x2e60 contains 20 entries:
  TagType Name/Value
 0x0001 (NEEDED) Shared library: [libc.so.6]
 0x000c (INIT)   0x401000
 0x000d (FINI)   0x401124
 0x0019 (INIT_ARRAY) 0x403e50
 0x001b (INIT_ARRAYSZ)   8 (bytes)
 0x001a (FINI_ARRAY) 0x403e58
 0x001c (FINI_ARRAYSZ)   8 (bytes)
 0x6ef5 (GNU_HASH)   0x4003c0
 0x0005 (STRTAB) 0x400428
 0x0006 (SYMTAB) 0x4003e0
 0x000a (STRSZ)  55 (bytes)
 0x000b (SYMENT) 24 (bytes)
 0x0015 (DEBUG)  0x0
 0x0007 (RELA)   0x400488
 0x0008 (RELASZ) 48 (bytes)
 0x0009 (RELAENT)24 (bytes)
 0x6ffe (VERNEED)0x400468
 0x6fff (VERNEEDNUM) 1
 0x6ff0 (VERSYM) 0x400460
 0x (NULL)   0x0
```
Because I use offset difference between SYMTAB and STRTAB to get the symbol
table entry number.
```
  size_t syments = ((offs[i_strtab] - offs[i_symtab]) /
gelf_fsize(ebl->elf, ELF_T_SYM, 1, EV_CURRENT));
```

-- 
You are receiving this mail because:
You are on the CC list for the bug.

[Bug tools/28873] Implement eu-readelf -D

2023-01-16 Thread dichen at redhat dot com via Elfutils-devel
https://sourceware.org/bugzilla/show_bug.cgi?id=28873

--- Comment #6 from Di Chen  ---
[Follow the last comment]

For a binary with SYMTAB STRTAB having different order, like upside down, or
having other section in between. eg.

```
$ readelf -Dd /usr/local/go/bin/go

Dynamic section at offset 0x9e5220 contains 19 entries:
  TagType Name/Value
 0x0004 (HASH)   0xb3c3c0
 0x0006 (SYMTAB) 0xb3c880
 0x000b (SYMENT) 24 (bytes)
 0x0005 (STRTAB) 0xb3c660
 0x000a (STRSZ)  531 (bytes)
 0x0007 (RELA)   0xb3bfd8
 0x0008 (RELASZ) 24 (bytes)
 0x0009 (RELAENT)24 (bytes)
 0x0003 (PLTGOT) 0xde5100
 0x0015 (DEBUG)  0x0
 0x0001 (NEEDED) Shared library: [libpthread.so.0]
 0x0001 (NEEDED) Shared library: [libc.so.6]
 0x6ffe (VERNEED)0xb3c360
 0x6fff (VERNEEDNUM) 2
 0x6ff0 (VERSYM) 0xb3c300
 0x0014 (PLTREL) RELA
 0x0002 (PLTRELSZ)   768 (bytes)
 0x0017 (JMPREL) 0xb3bff0
 0x (NULL)   0x0

```

It will mess up the syments (symbol table entry number) calculation.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Re: [PATCH] readelf: Check compression status of .debug section data

2023-01-16 Thread Mark Wielaard
Hi,

On Tue, 2023-01-10 at 18:44 +0100, Mark Wielaard wrote:
> The various print_debug_*_section functions didn't get the section
> data in the same way. Add a new get_debug_elf_data function that
> gets the (possibly relocated) section data and that checks (and
> warns) if the data might still be compressed in a way that we
> cannot decompress.

Pushed.

Cheers,

Mark


☺ Buildbot (Sourceware): elfutils - build successful (master)

2023-01-16 Thread builder--- via Elfutils-devel
A restored build 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/96

Build state: build successful
Revision: 61c6accb64ba7424f92d617680a6a61fbb562b57
Worker: bbo1-1
Build Reason: (unknown)
Blamelist: Mark Wielaard , Sam James 

Steps:

- 0: worker_preparation ( success )

- 1: set package name ( success )

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

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

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

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

- 6: make ( warnings )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/88/builds/96/steps/6/logs/stdio
- warnings (3): 
https://builder.sourceware.org/buildbot/#builders/88/builds/96/steps/6/logs/warnings__3_

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

- 8: make distcheck ( warnings )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/88/builds/96/steps/8/logs/stdio
- test-suite.log: 
https://builder.sourceware.org/buildbot/#builders/88/builds/96/steps/8/logs/test-suite_log
- warnings (5): 
https://builder.sourceware.org/buildbot/#builders/88/builds/96/steps/8/logs/warnings__5_

- 9: prep ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/88/builds/96/steps/9/logs/stdio

- 10: build bunsen.cpio.gz ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/88/builds/96/steps/10/logs/stdio

- 11: fetch bunsen.cpio.gz ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/88/builds/96/steps/11/logs/stdio

- 12: unpack bunsen.cpio.gz ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/88/builds/96/steps/12/logs/stdio

- 13: pass .bunsen.source.gitname ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/88/builds/96/steps/13/logs/stdio

- 14: pass .bunsen.source.gitdescribe ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/88/builds/96/steps/14/logs/stdio

- 15: pass .bunsen.source.gitbranch ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/88/builds/96/steps/15/logs/stdio

- 16: pass .bunsen.source.gitrepo ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/88/builds/96/steps/16/logs/stdio

- 17: upload to bunsen ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/88/builds/96/steps/17/logs/stdio

- 18: clean up ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/88/builds/96/steps/18/logs/stdio

- 19: make distclean ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#builders/88/builds/96/steps/19/logs/stdio