diff options
author | Fred Grim <fgrim@apple.com> | 2024-06-26 06:41:53 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-26 06:41:53 -0700 |
commit | 161e1689ba98fabba71cac21f536708c78e9d7b0 (patch) | |
tree | e96b493c6349e2213833ad94f56888a94987865d /lldb/packages/Python/lldbsuite/test/dotest.py | |
parent | e5e0d8739d4a2b70d7ad317863d7b168e4895b18 (diff) | |
download | llvm-161e1689ba98fabba71cac21f536708c78e9d7b0.zip llvm-161e1689ba98fabba71cac21f536708c78e9d7b0.tar.gz llvm-161e1689ba98fabba71cac21f536708c78e9d7b0.tar.bz2 |
[llvm-readobj][ELF] Test multivalued rpath entries and alter the output for readobj to emphasize the single valued nature of NEEDED, SONAME, USED etc. (#96562)
In the context of #95976 it became clear that the output for readobj
implied multi valued entries in several cases in the elf headers that
the documentation only allowed for a single value. DT_NEEDED is the
example here where the value is an offset into the string table without
any sort of separator that could give you multiple entries. This patch
alters the LLVM output so that the single valued nature is emphasized.
For example the output was:
```
DynamicSection [ (35 entries)
Tag Type Name/Value
0x000000000000001D RUNPATH Library runpath: [$ORIGIN/../lib:]
0x0000000000000001 NEEDED Shared library: [libm.so.6]
0x0000000000000001 NEEDED Shared library: [libz.so.1]
0x0000000000000001 NEEDED Shared library: [libzstd.so.1]
```
and is now
```
Tag Type Name/Value
0x000000000000001D RUNPATH Library runpath: [$ORIGIN/../lib:]
0x0000000000000001 NEEDED Shared library: libm.so.6
0x0000000000000001 NEEDED Shared library: libz.so.1
0x0000000000000001 NEEDED Shared library: libzstd.so.1
```
This pr also tests that multi-valued rpaths are handled correctly in the
JSON case (i.e. they become proper lists) like:
```
{
"Tag": 15,
"Type": "RPATH",
"Value": 9,
"Path": [
"x",
"w",
"U"
]
},
```
when separated by :
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/dotest.py')
0 files changed, 0 insertions, 0 deletions