[PATCH] D45846: [ELF] Increase NextGroupId with --end-group
Rui Ueyama via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 19 16:09:09 PDT 2018
ruiu added a comment.
Please add a test for the linker script.
================
Comment at: ELF/ScriptParser.cpp:336
InputFile::IsInGroup = Orig;
+ ++InputFile::NextGroupId;
}
----------------
I think you should do this only when Orig is false. Consider a scenario like this
ld.lld -( a.o b.script c.o -)
where b.script contains "GROUP(d.o e.o)". All these object files (i.e. a.o c.o d.o and e.o) should be in the same group, so we don't want to increment NextGroupId at end of the GROUP directive.
Repository:
rLLD LLVM Linker
https://reviews.llvm.org/D45846
More information about the llvm-commits
mailing list