This is the mail archive of the 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: [gold] enable sorting of text sections with the same prefix

2013/2/9 Ian Lance Taylor <>:
> On Fri, Feb 8, 2013 at 5:11 PM, Ian Lance Taylor <> wrote:
>> On Thu, Feb 7, 2013 at 3:56 AM, Alexander Ivchenko <> wrote:
>>> thank you for your help, Sri. I fixed help string and deleted warning.
>>> Ian, could you please take a look at the attached patch?
>> As far as I can see, with this patch, when you use
>> --sort-section=name, gold will only sort sections that start with
>> .data. and .bss. by name.  Other sections remain unsorted.  This does
>> not appear to be what the GNU linker does.  The GNU linker appears to
>> sort all input sections by name when using --sort-section=name.
> Sorry, I guess that's not quite right.  You call the sorting code one
> every section.  But you only set must_sort_attached_input_sections on
> the .data and .bss sections.  How can you get away with that?
> Ian

You mean from hardcoding those names (.bss and .data) there? I'm not
sure so far,
but I know that BFD sorts them by name when we have -sort-section=name
and at the
same time, BFD doesn't sort, say,.sdata and .sbss.
Do we need to fully mimic the behavior of BFD for this option?

thank you,

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