[LLVMdev] [lld] Modeling ELF FileNodes/ControlNodes (Group's) in lld
shankare at codeaurora.org
Wed Sep 4 14:03:36 PDT 2013
Yes, the Group is to represent --start-group,--end-group.
So the group here will be contained in the linker Input as a vector of
lld::files (foo.a, bar.a).
On 9/4/2013 3:59 PM, Rui Ueyama wrote:
> The first question is that Group is to represent --start-group/--end-group?
> If I understand your proposal correctly, here's the thing: if file is not
> in group, each individual file is wrapped with LinkerInput, but if it's in
> a group, it's not -- instead the entire group is wrapped with a
> LinkerInput. This asymmetry is a bit concerning. If we don't need a
> LinkerInput for each individual input file, we could get rid of it from the
> former case. Otherwise, I'd think we need LinkerInput in the latter case.
> For example, if the following command line options are given, how it's
> represented with LinkerInput, Group and File?
> --start-group foo.a --as-needed bar.a --no-as-needed --end-group
> On Wed, Sep 4, 2013 at 1:42 PM, Shankar Easwaran <shankare at codeaurora.org>wrote:
>> With the inputGraph now, lld models command line options, input files as
>> nodes in the InputGraph called InputElements.
>> In the current approach, each InputElement is converted to a LinkerInput,
>> which works if all lld deals with individual files.
>> Dealing with ControlNodes (Groups), have a problem with it, on how to
>> model that as a LinkerInput.
>> Joerg/Me were chatting on the IRC about this and we came up with the
>> following approach.
>> - LinkerInput will contain a single file(lld::File), if the node that its
>> pointing to appears to be a FileNode
>> - LinkerInput will contain a vector(lld::Group) of files(lld::Files) , if
>> the node that its pointing appears to be a Group
>> The resolver would need to be modified to consider lld::Groups in addition
>> to lld::File.
>> Does this sound like the approach we want to take ?
>> Shankar Easwaran
>> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted
>> by the Linux Foundation
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by the Linux Foundation
More information about the llvm-dev