[PATCH] Add DarwinInputGraph

Shankar Easwaram shankarke at gmail.com
Tue Oct 21 17:33:54 PDT 2014


If we could have lld::file have a back reference to the input element (or) use the file ordinal to access the input element in the input graph you could just add inputs on a need basis ?

Let's discuss alternative proposals as part of this thread ?

I am also interested in moving the input file which could be a linker script from the driver to the registry too in addition.

We still need to have the getNextFile as it made the resolver more flavor neutral.

Shankar easwaran 



> On Oct 21, 2014, at 17:58, Rui Ueyama <ruiu at google.com> wrote:
> 
>> On Tue, Oct 21, 2014 at 3:41 PM, Michael Spencer <bigcheesegs at gmail.com> wrote:
>> On Mon, Oct 20, 2014 at 9:21 PM, Rui Ueyama <ruiu at google.com> wrote:
>> > I'm not still sure whether or not "InputGraph" thing was after all the right way to abstract the input file list. That often makes easy things hard. In this case, sorting a list of input files became that hard. When I proposed the idea I was thinking that would make this kind of things easier to handle. I don't think the current shape of the API is not desirable at least. Or the fundamental idea was not very good.
>> >
>> > One thing we probably should consider is, in my opinion, we are pushing too hard to separate all ports. We are trying to write any architecture-dependent code into architecture-specific file. But the natural border of API doesn't always fit to the architecture dependent/independent border. We should probably relax that constraint a bit where that makes sense and write code that's short and easier to understand.
>> 
>> I agree. The current InputGraph code makes modifying the input very
>> difficult to do. Part of the reason for the model in the first place
>> was to make this easy. I'm currently working on adding #pragma lib
>> like support for ELF (PS4 specific stuff) and have found it basically
>> impossible to add a new input file in the correct position in the
>> graph with the current model.
> 
> To deal with the issue of the InputGraph I have a few ugly hacks in PECOFF/LinkerGeneratedSymbolFile.h. There are a few virtual .a files there that generate magical symbols on the fly to control the core linker in an obscure way. These hacks need to be removed, but because the InputFile API exists in between, it's impossible to do.
> 
> The InputGraph API design needs to be revisited and probably be rewritten.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141021/c4a0bb77/attachment.html>


More information about the llvm-commits mailing list