[LLVMdev] [lld] Modeling ELF FileNodes/ControlNodes (Group's) in lld
Rui Ueyama
ruiu at google.com
Wed Sep 4 14:16:29 PDT 2013
On Wed, Sep 4, 2013 at 2:13 PM, Shankar Easwaran <shankare at codeaurora.org>wrote:
> The --as-needed attribute is preserved and is contained within the ELF
> FileNode.
>
I'm not really get your point. If each input file don't need LinkerInput,
why it needs LinkerInput only when an input file is not within
--start-group/end-group? I really agree with Nick's point that we have too
many classes.
By lld::files, I am referring to lld::File.
>
> Thanks
>
> Shankar Easwaran
>
>
> On 9/4/2013 4:10 PM, Rui Ueyama wrote:
>
>> On Wed, Sep 4, 2013 at 2:03 PM, Shankar Easwaran <shankare at codeaurora.org
>> >**wrote:
>>
>> 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).
>>>
>>
>> It seems you dropped --as-needed attribute... ?
>>
>> By lld::files, what class are you pointing to, lld::File or
>> lld::InputFiles?
>>
>>
>> thanks
>>
>>> Shankar Easwaran
>>>
>>>
>>> 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:
>>>>>
>>>> Hi,
>>>>
>>>>> 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 ?
>>>>>
>>>>> Thanks
>>>>>
>>>>> 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
>>>
>>>
>>>
>
> --
> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted
> by the Linux Foundation
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130904/c251ff43/attachment.html>
More information about the llvm-dev
mailing list