[all-commits] [llvm/llvm-project] 161e16: [llvm-readobj][ELF] Test multivalued rpath entries...
Fred Grim via All-commits
all-commits at lists.llvm.org
Wed Jun 26 06:42:15 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 161e1689ba98fabba71cac21f536708c78e9d7b0
https://github.com/llvm/llvm-project/commit/161e1689ba98fabba71cac21f536708c78e9d7b0
Author: Fred Grim <fgrim at apple.com>
Date: 2024-06-26 (Wed, 26 Jun 2024)
Changed paths:
M lld/test/ELF/as-needed-no-reloc.s
M lld/test/ELF/as-needed.s
M lld/test/ELF/auxiliary.s
M lld/test/ELF/dynamic-reloc.s
M lld/test/ELF/filter.s
M lld/test/ELF/gc-sections-shared.s
M lld/test/ELF/no-soname.s
M lld/test/ELF/partition-synthetic-sections.s
M lld/test/ELF/push-state.s
M lld/test/ELF/shared-ppc64.s
M lld/test/ELF/shared.s
M lld/test/ELF/soname.s
M lld/test/ELF/soname2.s
M lld/test/ELF/wrap-drop-shared-original.s
M llvm/test/tools/llvm-ifs/write-stub.test
M llvm/test/tools/llvm-readobj/ELF/dynamic-malformed.test
M llvm/test/tools/llvm-readobj/ELF/dynamic-tags.test
M llvm/test/tools/llvm-readobj/ELF/loadname.test
M llvm/tools/llvm-readobj/ELFDumper.cpp
Log Message:
-----------
[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 :
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list