[LLVMdev] [lld] -emit-yaml doesnot contain linker added symbols specified with command line options

Shankar Easwaran shankare at codeaurora.org
Wed Aug 28 15:14:17 PDT 2013


Hi Nick,

The problem is when the -emit-yaml option is used, the writer is set to 
the YAML writer.

The YAML writer doesnot have anything to add here.

The problem can be solved by having the YAML writer append a list of 
undefined atoms specified by the -u option, but the problem I have is 
each flavor has extra command line options
for which it wants to create a DefinedAtom/UndefinedAtom. The flavor 
also may want to add extra linker internal files in the future.

I prefer addImplicitFiles calling the reader to add more files, which 
means addFiles API moves to the reader.

Thanks

Shankar Easwaran


On 8/28/2013 4:57 PM, Nick Kledzik wrote:
> Shankar,
>
> The LinkingContext has a addImplictFiles() method that is supposed to call the Writer and give it a chance to add any implicit files.  Is the problem that the -u atoms are not attached to that implicit file?  Or that the implicit file is not getting added?  Or that this got lost in the transition from InputFiles to InputGraph?
>
> -Nick
>
> On Aug 28, 2013, at 2:44 PM, Shankar Easwaran <shankare at codeaurora.org> wrote:
>> Right now, linker added symbols specified by the -u option do not endup in the output YAML file.
>>
>> This is because the target specific Writers dont get called, which creates the undefined atoms.
>>
>> I am in the process of adding more options and I would like the atoms created internally by the options available in the output YAML file.
>>
>> The options that I am trying to consider for the linker internal atoms to appear in the output YAML file are :-
>>
>> a) Replace Writer::addFiles to Reader::addFiles
>>
>> This would achieve any file to be added to the list of input files that is processed.
>>
>>                               (or)
>> b) Create a seperate API in the inputGraph for the driver to add lld::Files, that are consumed by the Universal driver and that gets
>> added to the list of File objects that is being considered
>>
>>                               (or)
>>
>> c) Handle all the command line switches of -u or any atoms that we want to see them appear in the YAML file as a seperate pass.
>>
>> I dont like the option (c), because we are using a hammer to kill this problem.
>>
>> 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




More information about the llvm-dev mailing list