[PATCH] D158124: [dsymutil] Add support for mergeable libraries
Alpha Abdoulaye via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 24 18:15:26 PDT 2023
Alpha updated this revision to Diff 553313.
Alpha added a comment.
Addressed review comments. Mainly:
- handle `DW_AT_APPLE_origin` in a more "standard" way.
- Improve computation of relocation offsets for attributes. This also means that the relocations can be simplified to not keep track of the offset within the compile unit. Similarly, the `DW_AT_APPLE_origin` is not tracked in particular for the slide calculation.
- Given that the relocations are not stored after applyValidRelocs, added a `saveValidRelocs` interface (naming is for consistency with `applyValidRelocs` and `addValidRelocs`).
- Renamed the parent relocation class to be more generic.
One "outstanding" item is regarding the ValidReloc itself. The main constraint here is that the data *needs* to be serializable, hence the yaml specific types, which makes the use of subclassing necessary. One of my initial approaches didn't have any subclass, for both ValidRelocs and the RelocationMap, and was trying to rely downcasting to the address manager in `DwarfLinkerForBinary`, but dyn_cast is not available in that context/for those types.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D158124/new/
https://reviews.llvm.org/D158124
Files:
llvm/docs/CommandGuide/dsymutil.rst
llvm/include/llvm/BinaryFormat/Dwarf.def
llvm/include/llvm/BinaryFormat/MachO.h
llvm/include/llvm/DWARFLinker/DWARFLinker.h
llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h
llvm/include/llvm/DWARFLinker/DWARFLinkerRelocs.h
llvm/include/llvm/DWARFLinkerParallel/AddressesMap.h
llvm/include/llvm/TargetParser/Triple.h
llvm/lib/DWARFLinker/DWARFLinker.cpp
llvm/lib/TargetParser/Triple.cpp
llvm/test/tools/dsymutil/Inputs/bar-relink-variant.dylib.dSYM/Contents/Info.plist
llvm/test/tools/dsymutil/Inputs/bar-relink-variant.dylib.dSYM/Contents/Resources/DWARF/bar-relink-variant.dylib
llvm/test/tools/dsymutil/Inputs/bar-relink-variant.dylib.dSYM/Contents/Resources/Relocations/aarch64/bar-relink-variant.dylib.yml
llvm/test/tools/dsymutil/Inputs/bar-relink.dylib.dSYM/Contents/Info.plist
llvm/test/tools/dsymutil/Inputs/bar-relink.dylib.dSYM/Contents/Resources/DWARF/bar-relink.dylib
llvm/test/tools/dsymutil/Inputs/bar-relink.dylib.dSYM/Contents/Resources/Relocations/aarch64/bar-relink.dylib.yml
llvm/test/tools/dsymutil/Inputs/basic-relink.macho.arm64.dylib
llvm/test/tools/dsymutil/Inputs/basic-relink.macho.arm64.o
llvm/test/tools/dsymutil/Inputs/foo-relink-variant.dylib.dSYM/Contents/Info.plist
llvm/test/tools/dsymutil/Inputs/foo-relink-variant.dylib.dSYM/Contents/Resources/DWARF/foo-relink-variant.dylib
llvm/test/tools/dsymutil/Inputs/foo-relink-variant.dylib.dSYM/Contents/Resources/DWARF/foo-relink-variant_debug.dylib
llvm/test/tools/dsymutil/Inputs/foo-relink-variant.dylib.dSYM/Contents/Resources/Relocations/aarch64/foo-relink-variant.dylib.yml
llvm/test/tools/dsymutil/Inputs/foo-relink.dylib.dSYM/Contents/Info.plist
llvm/test/tools/dsymutil/Inputs/foo-relink.dylib.dSYM/Contents/Resources/DWARF/foo-relink.dylib
llvm/test/tools/dsymutil/Inputs/foo-relink.dylib.dSYM/Contents/Resources/Relocations/aarch64/foo-relink.dylib.yml
llvm/test/tools/dsymutil/Inputs/proxy-relink.dylib.dSYM/Contents/Info.plist
llvm/test/tools/dsymutil/Inputs/proxy-relink.dylib.dSYM/Contents/Resources/DWARF/proxy-relink.dylib
llvm/test/tools/dsymutil/Inputs/proxy-relink.dylib.dSYM/Contents/Resources/Relocations/aarch64/proxy-relink.dylib.yml
llvm/test/tools/dsymutil/Inputs/two-level-relink.macho.arm64.dylib
llvm/test/tools/dsymutil/Inputs/variant-relink.macho.arm64.dylib
llvm/test/tools/dsymutil/basic-linking.test
llvm/test/tools/dsymutil/cmdline.test
llvm/tools/dsymutil/CMakeLists.txt
llvm/tools/dsymutil/DebugMap.cpp
llvm/tools/dsymutil/DebugMap.h
llvm/tools/dsymutil/DwarfLinkerForBinary.cpp
llvm/tools/dsymutil/DwarfLinkerForBinary.h
llvm/tools/dsymutil/LinkUtils.h
llvm/tools/dsymutil/MachODebugMapParser.cpp
llvm/tools/dsymutil/Options.td
llvm/tools/dsymutil/RelocationMap.cpp
llvm/tools/dsymutil/RelocationMap.h
llvm/tools/dsymutil/dsymutil.cpp
llvm/tools/dsymutil/dsymutil.h
llvm/tools/llvm-dwarfutil/DebugInfoLinker.cpp
llvm/tools/llvm-nm/llvm-nm.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D158124.553313.patch
Type: text/x-patch
Size: 79454 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230825/bcbe52cf/attachment.bin>
More information about the llvm-commits
mailing list