[PATCH] D45118: Linking debug (DWARF) sections from the WebAssembly object files
Yury Delendik via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 2 17:37:32 PDT 2018
yurydelendik marked 3 inline comments as done.
yurydelendik added inline comments.
================
Comment at: wasm/Symbols.h:186
+
+class CombinedSection : public SectionSymbol {
+public:
----------------
sbc100 wrote:
> This extra symbol type seems a little strange to me...
>
> Could we put the getOutputSectionIndex/setOutputSectionIndex in the base SectionSymbol class so we don't need a separate CombinedSection?
>
> Then we could want to call getOutputSectionIndex on all of the DefinedSection object too.
The CombinedSection comprised from InputChunks of one or more DefinedSections and only CombinedSection will be needed getOutputSectionIndex() for linking section. We have getOutputSymbolIndex() for reloc entries, that is assigned in the assignSymtab.
================
Comment at: wasm/Writer.cpp:781
+ Sym->setOutputSymbolIndex(SymbolIndex);
+ DebugSymbolIndicies[Name] = SymbolIndex;
+
----------------
sbc100 wrote:
> I don't see how you can use SymbolIndex here without incrementing it.
It is incremented at `OutputSym->setOutputSymbolIndex(SymbolIndex++);` below
Repository:
rLLD LLVM Linker
https://reviews.llvm.org/D45118
More information about the llvm-commits
mailing list