public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Will Wagner <will_wagner@carallon.com>
To: Gary Thomas <gary@mlbassoc.com>
Cc: eCos Discussion <ecos-discuss@ecos.sourceware.org>
Subject: Re: [ECOS] powerpc.ld question
Date: Fri, 20 Apr 2007 11:41:00 -0000	[thread overview]
Message-ID: <4628A702.9050403@carallon.com> (raw)
In-Reply-To: <4628A29F.1080409@mlbassoc.com>

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.

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.

Will.


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?
>>>
>>
> 
> 

-- 
------------------------------------------------------------------------
Will Wagner                                     will_wagner@carallon.com
Senior Project Engineer                        Office Tel: 0207 371 2032
Carallon Ltd, Studio G20, Shepherds Building, Rockley Rd, London W14 0DA
------------------------------------------------------------------------



-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

  reply	other threads:[~2007-04-20 11:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-20  9:51 Will Wagner
2007-04-20 11:01 ` Gary Thomas
2007-04-20 11:09   ` Will Wagner
2007-04-20 11:23     ` Gary Thomas
2007-04-20 11:41       ` Will Wagner [this message]
2007-04-20 11:51         ` Gary Thomas
2007-04-20 12:15           ` Will Wagner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4628A702.9050403@carallon.com \
    --to=will_wagner@carallon.com \
    --cc=ecos-discuss@ecos.sourceware.org \
    --cc=gary@mlbassoc.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).