[gold] enable sorting of text sections with the same prefix
Alexander Ivchenko
aivchenk@gmail.com
Mon Feb 4 12:15:00 GMT 2013
Hi,
The attached patch implements --sort-section=name that sorts text
sections by name within each
prefix and also sorts .data and .sdata sections by name (as BFD does).
That is enough for closing
that http://sourceware.org/bugzilla/show_bug.cgi?id=14948
thank you,
Alexander
2013/1/29 Sriraman Tallam <tmsriram@google.com>:
> On Tue, Jan 29, 2013 at 9:55 AM, Alexander Ivchenko <aivchenk@gmail.com> wrote:
>> Hello Sri,
>>
>> thank you for your input!
>> Please, look at
>> http://sourceware.org/bugzilla/show_bug.cgi?id=14948
>
> So, why not do this guarded by --sort-section=name just like BFD ld?
> That way, it does not affect the default. Just my two cents.
>
> Thanks
> Sri
>
>>
>> thank you,
>> Alexander
>>
>> 2013/1/29 Sriraman Tallam <tmsriram@google.com>:
>>> Hi,
>>>
>>> On Tue, Jan 29, 2013 at 7:28 AM, Alexander Ivchenko <aivchenk@gmail.com> wrote:
>>>> Hi,
>>>>
>>>> This patch to gold: http://sourceware.org/ml/binutils/2013-01/msg00335.html
>>>> disabled sorting of text sections with the same prefix like
>>>> .text.hot0001, .text.hot0002
>>>> which is very desirable.
>>>
>>> Sorting by section names in general for text sections turns out to be
>>> a bad idea as we have seen many performance issues. That is the reason
>>> why the patch you reference was created.
>>>
>>> The reason why some text sections are grouped to begin with is to
>>> mimic the default GNU ld behaviour. I dont think GNU ld groups these
>>> two sections. AFAIK, ".text.hot." is the prefix for hot text
>>> sections. How were these two sections you mention created?Which
>>> compiler is generating these two sections? Or, did you explicitly use
>>> a section attribute?
>>>
>>> Thanks
>>> Sri
>>>
>>> The attached patch fix this.
>>>>
>>>> OK for trunk?
>>>>
>>>> thank you,
>>>> Alexander
-------------- next part --------------
A non-text attachment was scrubbed...
Name: enable_sorting_text_sections_by_name_3.patch
Type: application/octet-stream
Size: 5084 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20130204/b48f64ed/attachment.obj>
More information about the Binutils
mailing list