This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] give .comment sections SHF_MERGE|SHF_STRINGS


On Fri, Jul 24, 2009 at 3:26 PM, Cary Coutant<ccoutant@google.com> wrote:
>>> The compiler-generated .ident strings linked together tend all to be the
>>> same, resulting in giant .comment sections with a duplicate string for each
>>> translation unit. ?We have the technology. ?We can make them smaller, faster,
>>> better than before.
>>>
>>> This looks obviously trivial and safe. ?But I can't be bothered to actually
>>> test it or anything. ?Anyone inspired?
>>
>> How about making it comdat?
>
> That would then keep only one string, even if some happened to be
> different from the rest -- unless you copy the string itself into the
> comdat key, but that would be pretty wasteful. This is what merge
> sections are for.
>

Yes, comment string will be used as group signature. What will be
wasted? I think comdat has lower overhead than string merge in linker.

-- 
H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]