[PATCH] D42511: [WebAssembly] Add support for --gc-sections
Rui Ueyama via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 30 16:30:08 PST 2018
ruiu added a comment.
> For types, it's annoying, yes, I hadn't thought about it at all, but they do need to pruned via GC don't they. It's tempting to think that type relocations can only appear as the operand of instructions like call_indirect, and those must be pointing to either a defined or imported function - but it's not true, you could write code that does a call_indirect to the null function index using a type that otherwise wouldn't exist in the module at all. (Do we have a test for that?) So we really do have to look at the relocations before pruning the types.
I'm not sure if I understand the last sentence correctly. If you need to scan relocations to garbage-collect types, that's what we do to other things like chunks in this file, so it's not special, is it?
Repository:
rLLD LLVM Linker
https://reviews.llvm.org/D42511
More information about the llvm-commits
mailing list