[PATCH] D49446: [WebAssembly] Move .debug_line section address of dead function outside section range
Sam Clegg via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 21 11:42:26 PDT 2018
sbc100 added inline comments.
================
Comment at: wasm/InputFiles.cpp:145
if (auto *Sym = dyn_cast<DefinedFunction>(getFunctionSymbol(Reloc.Index))) {
+ if (Sym->Function->OutputOffset == InputFunction::UNKNOWN_OUTPUT_OFFSET)
+ return DEAD_FUNCTION_OFFSET;
----------------
sbc100 wrote:
> yurydelendik wrote:
> > sbc100 wrote:
> > > Could/Should this be "->isLive()"?
> > >
> > >
> > >
> > InputFunction/InputChunk does not provide such method. Do you want to add this attribute to the InpurtFunction?
> But Sym does have this, no? See line 134 above? Maybe I'm missing something.
You should be able use the same pattern as R_WEBASSEMBLY_MEMORY_ADDR_LEB above I think.
Doing that, should allow you to revert InputFiles.cpp and InputChunks.h making this patch really trivial. We could then consider the DEADFUNC thing as a followup?
Repository:
rLLD LLVM Linker
https://reviews.llvm.org/D49446
More information about the llvm-commits
mailing list