[lld] [llvm] [llvm-readobj][ELF] Test multivalued rpath entries and alter the output for readobj to emphasize the single valued nature of NEEDED, SONAME, USED etc. (PR #96562)
Khem Raj via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 27 19:49:01 PDT 2024
kraj wrote:
> > The output now differs from what GNU readelf/objdump generates. There is a tool in yocto which processes `SONAME` entry to detect the name of the shared object and now that test fails and several packages fail when using llvm-readelf, I wonder if there are more such tools post processing ELF files, they all will have similar issues.
>
> Ah, sorry, that was my mistake: the intent was this only impacted LLVM/JSON output. I didn't realise the code was shared with GNU style. @feg208, could you revert and look at redoing this to not impact GNU output, please? (GNU output should generally match GNU readelf output, for compatibility).
>
> Aside: @kraj, if there are multiple e.g. NEEDED entries in an ELF, does GNU readelf produce separate entries, each with a single-element list? If so, this feels like a bug in the GNU readelf tool to me, and I wonder if we could get the behaviour changed there to make more sense.
It seems there is one entry per line
```
0x0000000000000001 (NEEDED) Shared library: [libncursesw.so.6]
0x0000000000000001 (NEEDED) Shared library: [libc.so.6]
0x000000000000000e (SONAME) Library soname: [libreadline.so.8]
```
https://github.com/llvm/llvm-project/pull/96562
More information about the llvm-commits
mailing list