This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] Gold: Add a target hook to allow overriding output section name.
The gold_assert fixes are commited.
-Doug
2009-06-03 Doug Kwan <dougkwan@google.com>
* arm.cc (utils::sign_extend): Reverse test in gold_assert.
(utils::has_overflow): Same.
2009/6/3 Ian Lance Taylor <iant@google.com>:
> "Doug Kwan (Ãö®¶¼w)" <dougkwan@google.com> writes:
>
>> This patch adds a hook allowing a target to override the output
>> section name used by Layout::choose_output_section(). Without this
>> hook, all input sections with names of the form foo.bar will go to
>> output section foo. That does not work for ARM, which has special
>> output sections like .ARM.attributes and .ARM.exidx. The patch was
>> tested by linking a test program for arm-eabi and checking that
>> .ARM.attributes was present. In addition, I also ran the gold
>> test-suite on the host.
>
> I can see that we are just going to continue accruing exceptions, so I
> took a different approach. I reworked the code to follow the default
> GNU linker script in the mapping from input section names to output
> section names. Rather than try to come up with a rule, I just used an
> explicit mapping.
>
> I committed this patch to the repository. It should make most of your
> patch unnecessary. Go ahead and commit the fixes to the assertions,
> though.
>
> Ian
>
>
> 2009-06-03 Ian Lance Taylor <iant@google.com>
>
> * layout.cc (Layout::section_name_mapping): New array, replacing
> Layout::linkonce_mapping.
> (Layout::section_name_mapping_count): New variable, replacing
> Layout::linkonce_mapping_count.
> (Layout::linkonce_output_name): Remove.
> (Layout::output_section_name): Rewrite.
> * layout.h (class Layout): Rename Linkonce_mapping to
> Section_name_mapping, linkonce_mapping to section_name_mapping,
> linkonce_mapping_count to section_name_mapping_count. Don't
> declare linkonce_output_name.
>
>
>