public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Nick Clifton <nickc@redhat.com>
To: Torsten Mohr <tmohr@s.netic.de>
Cc: binutils <binutils@sourceware.org>, newlib@sourceware.org
Subject: Re: linker script for V850?
Date: Tue, 02 May 2006 07:48:00 -0000	[thread overview]
Message-ID: <44570EB2.3010600@redhat.com> (raw)
In-Reply-To: <200604292043.09647.tmohr@s.netic.de>

Hi Torsten,

   First of all, this question should be asked on the binutils mailing 
list (binutils@sourceware.org) since it concerns the linker and linker 
scripts and not the newlib mailing list since it does not concern the 
newlib C library.  I am adding a CC to the the binutils list and I 
suggest that future respondents remove the CC to newlib.

   Second of all, it really helps if you can provide a *small* 
reproducible example when you encounter a problem like this.  It lets us 
investigate the problem on our own machines, often leading to a much 
speedier answer.

   Also you do not mention which version of the linker you are using, 
nor whether you have checked to see if this problem still exists with 
the sources in the mainline binutils CVS repository.  (It may be that 
there is an actual bug in the linker that you are using and that this 
bug has now been fixed).

> So i tried to split it into two sections ".tdata_ram" and
> ".tdata_rom":
> 
>   .tdata_ram ALIGN (4) :
>   {
>         PROVIDE (__ep = .);
>         *(.tbyte)
>         *(.tcommon_byte)
>         *(.tbss)
>         *(.tcommon)
>   } >ram
> 
>   .tdata_rom ALIGN (4) :
>   {
>         *(.tdata)
>   } >ram AT>rom

In theory this looks like the right way to solve your problem.

> But this also fails.  I expected this to work, as i really separate
> RAM and ROM.  The error at linking is this:
> 
> v850e-unknown-elf-gcc -o hw2.elf \
> Â Â Â Â Â Â Â Â -Wl,-Map=hw2.map \
> Â Â Â Â Â Â Â Â -Wl,-Tv850.x \
> Â Â Â Â Â Â Â Â main.o vectors.o
> c:\v850e\bin\..\lib\gcc\v850e-unknown-elf\3.4.6\..\..\..\..
> \v850e-unknown-elf\bin\ld.exe: address 0x75ec of hw2.elf section .tdata is 
> not within region ram

Have you tried separating the .tdata_ram and .tdata_rom sections so that 
the .tdata_rom section is near the beginning of the SECTIONS part of the 
linker script, with the other sections that are being placed into the 
rom memory region and the .tdata_ram section is near the end of the 
SECTIONS part of the script, with the other sections that are being 
placed into the ram memory region ?

Cheers
   Nick

           reply	other threads:[~2006-05-02  7:48 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <200604292043.09647.tmohr@s.netic.de>]

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=44570EB2.3010600@redhat.com \
    --to=nickc@redhat.com \
    --cc=binutils@sourceware.org \
    --cc=newlib@sourceware.org \
    --cc=tmohr@s.netic.de \
    /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).