[PATCH] [lld][core] sectionGroup support.
Shankar Easwaram
shankarke at gmail.com
Thu Feb 27 20:37:34 PST 2014
This is a very good suggestion. But I am not sure on how to accomplish that as With lld each file is parsed in parallel. It might be useful to produce an error probably after atomizing them if the atoms in the group are different, also it would make sense to discard eh frame information as well for discarded sections.
Sent from my iPhone
On Feb 27, 2014, at 21:46, Rafael Espíndola <rafael.espindola at gmail.com> wrote:
>> Yes. There would need to be another map<> in the symbol table just for
>> groups, and the symbol table would
>> need to look at the atom’s contentType to see if it goes into the the new
>> group map or the existing _nameTable.
>> When there is a collision in the group map, all atoms in one group (the new
>> one?) need to be added to
>> the _replacementAtoms map to be removed.
>
> I might be misunderstanding something, but if I remember correctly one
> of the features of how groups is defined on elf is that the linker can
> avoid even reading those sections if it already found a group with
> that symbol.
>
> We want deterministic output from lld, so we can't just use the first
> to be found during a parallel read, but it also seems wasteful to
> fully atomize these sections just to discard them.
>
> Cheers,
> Rafael
More information about the llvm-commits
mailing list