[PATCH] D56437: Support blank flag in SHT_GROUP sections for ELF
Rui Ueyama via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 15 11:28:06 PST 2019
ruiu added a comment.
I *believe* that the following strategy seems like a good way to implement the feature (but I didn't try it personally so if you find it unable to work, take another path):
Every input section have a list of `DependentSections`. Usually the list is empty, but if the list is not empty, the GC handles it as edges when doing the mark-sweep garbage collection.
I think you can represent a group with `DependentSections`. If one section in a group is live, all sections in the same group are live. You can pick the first section (an arbitrary section) as a "leader" in a group and add all sections in the group to its `DependentSection`, and add the leader to every member's `DependentSection`.
Repository:
rLLD LLVM Linker
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D56437/new/
https://reviews.llvm.org/D56437
More information about the llvm-commits
mailing list