[PATCH] D120574: [dsymutil] Apply relocations present in Swift reflection sections
Adrian Prantl via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 25 11:33:24 PST 2022
aprantl added inline comments.
================
Comment at: llvm/tools/dsymutil/DwarfLinkerForBinary.cpp:342
-static void
-copySwiftReflectionMetadata(const llvm::dsymutil::DebugMapObject *Obj,
- DwarfStreamer *Streamer) {
+static bool isMachOPairedReloc(uint64_t RelocType, uint64_t Arch) {
+ switch (Arch) {
----------------
We might want to sink this into MachO.h if it doesn't exist there already. You might want to check if there is code for it that we could upstream.
================
Comment at: llvm/tools/dsymutil/DwarfLinkerForBinary.h:210
+ const llvm::object::MachOObjectFile *MO,
+ const std::unordered_map<llvm::binaryformat::Swift5ReflectionSectionKind,
+ uint64_t> &SectionToOffsetInDwarf,
----------------
The keys in this map will be integers from 0..~10. Should this just be a std::vector instead?
================
Comment at: llvm/tools/dsymutil/MachOUtils.cpp:623
}
+ uint64_t Pos = OutFile.tell();
----------------
Can you add a comment that explains that we are applying relocations here?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120574/new/
https://reviews.llvm.org/D120574
More information about the llvm-commits
mailing list