[PATCH] D43391: [WebAssembly] Separate out InputGlobal from InputChunk
Nicholas Wilson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 16 08:05:23 PST 2018
ncw created this revision.
ncw added reviewers: sbc100, ruiu.
Herald added subscribers: llvm-commits, sunfish, aheejin, jgravelle-google, dschuff, jfb.
This is a follow-up to https://reviews.llvm.org/D43264, or maybe Sam could take this apply and merge into https://reviews.llvm.org/D43264?
This is a follow-on from the discussion in that issue.
I've tried to separate out InputGlobal from InputChunk, so that it doesn't derive from it (since InputChunk has relocations, but InputGlobal doesn't). This change ripples out and impacts the rest of the code a bit.
InputGlobal (not derived from anything, this duplicates/complicates too much code)
What I've done here:
-> InputSection - new class, all the relocation stuff and section offsets
moved from InputChunk to here
As part of that, I had a re-jigg of the handling of the function/global signature on the FunctionSymbol/GlobalSymbol objects, and discovered a bug! The current handling of undefined function signatures is wrong, oops, as evidenced by the fact that one of tests provides `__cxa_at_exit` with the wrong signature, yet the test passes. I discovered this when my refactoring broke the test, and then I realised I'd accidentally fixed a bug.
Other small fixes, while I was at it (should surely be rolled into https://reviews.llvm.org/D43264):
- Fixed MarkLive to log the InputGlobals that are discarded
- Fixed Symbol::hasOutputIndex for globals
- Added missing DefinedGlobal::classof! Yikes.
rLLD LLVM Linker
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 37287 bytes
Desc: not available
More information about the llvm-commits