[PATCH] D45118: Linking debug (DWARF) sections from the WebAssembly object files
Sam Clegg via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 3 14:48:12 PDT 2018
sbc100 added a comment.
I like this better. Almost ready to land I think.
I'm mentioned that we can/should remove as much of the checking for ".debug_" as we can since I don't think change is specific the debug sections really, it should work for any custom section that want to include relocations.
@ruiu do you understand what are trying to do here?
================
Comment at: wasm/Writer.cpp:398
+ else if (OSec->Type == WASM_SEC_CUSTOM &&
+ StringRef(OSec->Name).startswith(".debug"))
+ Name = Saver.save("reloc." + OSec->Name);
----------------
I think we can drop the second part of this condition perhaps?
================
Comment at: wasm/Writer.cpp:401
else
llvm_unreachable("relocations only supported for code and data");
----------------
now I guess it should be "code, data, or custom sections"
================
Comment at: wasm/Writer.cpp:780
+ StringMap<uint32_t> DebugSymbolIndicies;
+
----------------
SectionSymbolIndices?
================
Comment at: wasm/Writer.cpp:791
+ StringRef Name = S->getName();
+ if (!Name.startswith(".debug_") ||
+ CustomSectionMapping.find(Name) == CustomSectionMapping.end())
----------------
Can we drop the first clause of this condition?
================
Comment at: wasm/Writer.cpp:792
+ if (!Name.startswith(".debug_") ||
+ CustomSectionMapping.find(Name) == CustomSectionMapping.end())
+ continue;
----------------
.count(Name) == 0?
Repository:
rLLD LLVM Linker
https://reviews.llvm.org/D45118
More information about the llvm-commits
mailing list