[llvm-commits] [llvm] r115753 - /llvm/trunk/lib/Linker/LinkModules.cpp

Eric Christopher echristo at apple.com
Wed Oct 6 13:03:54 PDT 2010


On Oct 6, 2010, at 1:00 PM, Dan Gohman wrote:

> 
> On Oct 6, 2010, at 11:43 AM, Bill Wendling wrote:
> 
>> On Oct 6, 2010, at 11:27 AM, Dan Gohman wrote:
>> 
>>> On Oct 5, 2010, at 11:16 PM, Bill Wendling wrote:
>>> 
>>>> --- llvm/trunk/lib/Linker/LinkModules.cpp (original)
>>>> +++ llvm/trunk/lib/Linker/LinkModules.cpp Wed Oct  6 01:16:30 2010
>>> [...]
>>>> +  // The Objective-C __image_info section should be unique.
>>>> +  if (SrcSec == DstSec &&
>>>> +      (SrcSec.find("__objc_imageinfo") != StringRef::npos ||
>>>> +       SrcSec.find("__image_info") != StringRef::npos))
>>> 
>>> Hi Bill, magic names, in the LLVM IR linker? If this is the way this will
>>> be done, can you document this in LangRef.html?
>>> 
>> That's where my "polish" comment comes into play. I don't like it either, and I don't think that this is the way to go in the future. This predicate should exist in a centralized place...
> 
> 
> Even if the predicate is moved somewhere central, it's still a magic-name
> predicate, and this is in frontend-independent code.  What is the way to go
> in the future?

It think it's kindof a mix in that it's a magic section that is required to be unique,
but only happens when objective-c is one of the languages. I still like the idea of
putting it in the object file format handling (or target dependent code) so that
the linker can look there to find out what the deal is with any section.

-eric



More information about the llvm-commits mailing list