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: Linker scripts and Section Reordering.

On Wed, Jan 9, 2013 at 3:22 PM, Ian Lance Taylor <> wrote:
> On Wed, Jan 9, 2013 at 2:46 PM, Sriraman Tallam <> wrote:
>> I moved this to Output_section_definition::set_section_addresses. I
>> dont think this is necessary in
>> Orphan_output_section::set_section_addresses for the following reason.
>> Orphan_output_sections are for those not seen in the linker script.
>> Such an output section is created for every input section that is not
>> caught in the linker script. Such input sections are not grouped by
>> prefix as the output_section_name method in is used
>> to group them. So, these input sections cannot be handled by section
>> ordering.

It seems like this is needed in
Orphan_output_section::set_section_addresses too. I can have cases
where there are multiple input sections with the same name that are
not referenced by the linker script. They will all be grouped under
one Orphan_output_section and this can be reordered later. I have
attached the new patch with this correction. Sorry about the
confusion. I have attached the new patch. I duplicated the code in
set_section_addresses. I did not create a new function as only the
comments are long and repeating.


> This patch is OK.
> Thanks.
> Ian

Attachment: script_ordering_bug.txt
Description: Text document

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