This is the mail archive of the
mailing list for the binutils project.
Re: Issue with --unique=.text.* on hppa
- From: Alan Modra <amodra at gmail dot com>
- To: Guy Martin <gmsoft at tuxicoman dot be>
- Cc: binutils at sourceware dot org
- Date: Thu, 16 Jan 2014 08:54:59 +1030
- Subject: Re: Issue with --unique=.text.* on hppa
- Authentication-results: sourceware.org; auth=none
- References: <40590ef10cd8c08dddafc067cf818ee7 at tuxicoman dot be>
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
> - 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
> 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
Australia Development Lab, IBM