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: Issue with --unique=.text.* on hppa

On Wed, Jan 15, 2014 at 12:08:59PM +0100, Guy Martin wrote:
> How should this be solved ?
> - add .text.startup and other to the default linker script ?
>   This approach seems more like a workaround than a real fix.

I doubt that would work.  At the heart of this issue is the fact that
output sections are searched for by name, which fails when there are
duplicate sections.

> - use a different way to find the correct
> lang_output_section_statement_type ?
>   Maybe the lang_output_section_statement_type should be directly
> set in the
>   struct asection of the input_section instead of setting
>   input_section->output_section and then later on find the statement
> based
>   on the name of the output_section

Good idea, but don't try to do away with input_section->output_section
indirection.  In an output bfd_section, make userdata point at the
associated lang_output_section_statement_type and you can dispense
with the search.  You'll find the current ld source contains old cruft
that sets this field already for an output section, but in fact the
field is only used by input sections.  I may even clean that up for

Alan Modra
Australia Development Lab, IBM

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