[ECOS] powerpc.ld question
Gary Thomas
gary@mlbassoc.com
Fri Apr 20 11:51:00 GMT 2007
Will Wagner wrote:
> I am seeing two issues with the linker. Either I get the internal error
> ld: internal error /src/binutils-2.17/ld/ldlang.c 3803 when trying to
> link. Or I see that it links but when executing the image and an
> exception is thrown the code doesn't handle it correctly. By changing a
> few lines of code (often containing strings) I can get either of those
> behaviours or an image that works correctly.
>
> Could well be an issue with the gcc I am using, however ld should not
> fail with an internal error either. Have been in touch with binutils
> developers and they suggested to try the head version of ld.
What's your host? I've *never* seen any of these behaviours on Linux.
>
> My powerpc.ld file does contain .eh_frame:
>
> #define SECTION_eh_frame(_region_, _vma_, _lma_) \
> .eh_frame _vma_ : _lma_ \
> { \
> FORCE_OUTPUT; __EH_FRAME_BEGIN__ = .; \
> KEEP(*(.eh_frame)) \
> __FRAME_END__ = .; \
> . = . + 8; \
> } > _region_ = 0
>
> But no mention of .eh_frame_hdr. Should I add it to that KEEP directive?
> Wasn't sure if it should be there or in the text section.
This is not the same setup - try using the version from CVS (attached)
Note: the last time it was changed was 2003-04-10, so you must be
working with some *vintage* code :-)
> Gary Thomas wrote:
>> Will Wagner wrote:
>>> Have had issues with 2.16 & 2.17 of binutils so am now trying to get
>>> the HEAD of CVS working.
>>
>> Just curious - what issues did you have with these previous versions?
>> I run 2.16 and 2.16.1 here (gcc 3.4.3 and 4.1.0 respectively) with
>> no problems.
>>
>> Does your powerpc.ld file not include a line which looks like this?
>> *(.eh_frame)
>> Perhaps it needs to be written as:
>> *(.eh_frame_hdr) *(.eh_frame)
>>
>> I'm perplexed though; I've never had a need for this. Maybe it's in
>> your usage of GCC or how you configured it when building it.
>>
>>>
>>> Am using GCC 3.3.3
>>>
>>> Gary Thomas wrote:
>>>> Will Wagner wrote:
>>>>> I am trying to upgrade to a new version of binutils as I'm
>>>>> experiencing problems with my current version.
>>>>>
>>>>> The new version of ld throws an error when trying to link saying
>>>>> that the section .eh_frame_hdr is not specified.
>>>>>
>>>>> I know I need to add an entry to /hal/powerpc/src/powerpc.ld, but
>>>>> I'm not sure where this needs to go. The only other .ld file I
>>>>> could find that referenced eh_frame_hdr is sh4_202_md.ld but that
>>>>> file is so different I didn't find it very useful.
>>>>>
>>>>
>>>> What version of binutils (and GCC) are you using?
>>>>
>>>
>>
>>
>
--
------------------------------------------------------------
Gary Thomas | Consulting for the
MLB Associates | Embedded world
------------------------------------------------------------
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: powerpc.ld
URL: <http://sourceware.org/pipermail/ecos-discuss/attachments/20070420/41bd2148/attachment.ksh>
-------------- next part --------------
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
More information about the Ecos-discuss
mailing list