public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: "Ramana Radhakrishnan" <ramana.r@gmail.com>
To: "Jonathan S. Shapiro" <shap@eros-os.com>
Cc: binutils <binutils@sources.redhat.com>
Subject: Re: Link start address
Date: Fri, 03 Aug 2007 17:30:00 -0000	[thread overview]
Message-ID: <67ea2eb0708031030v4e016671gf976815459a55cbc@mail.gmail.com> (raw)
In-Reply-To: <1186161144.23564.126.camel@shap.om-md.eros-os.com>

Redirecting it there ...

On 8/3/07, Jonathan S. Shapiro <shap@eros-os.com> wrote:
> This is probably a question that should be directed to the binutils
> list.
>
> We need to set the default link start address used by ld. Unfortunately
> ld doesn't have a nice porting guide like GCC does. :-)

Look at emulparams/*.sh and scriptempl/*.sc  in the ld directory in
binutils sources. You would need to set up TEXT_START_ADDRESS
depending on your target to the correct address. Its a bunch of shell
scripts that run to generate the default linker script and the
corresponding start addresses.

If you were however writing your own standalone linker script you'd do a
. = <startaddress> in your linker script.

>
> Actually, we need to choose one of two possible start addresses based on
> command line options to GCC, and I am wondering if this may make things
> more complicated.

You might want to have different linker options chosen - you could
have different emul targets depending on the command line option you
choose. You can control this using LINK_SPEC in the gcc driver .

hope this helps

cheers
Ramana


>
> This is an ELF target. If we simply issue a --section-start for
> the .init section from GCC, will the other sections get adjusted
> accordingly under the generic linker script, or do we need to do
> something more involved?
>
> If it's more involved, where to look?
>
> Bother. I used to know how to do this. :-)
>
>
> shap
>
>


-- 
Ramana Radhakrishnan

       reply	other threads:[~2007-08-03 17:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1186161144.23564.126.camel@shap.om-md.eros-os.com>
2007-08-03 17:30 ` Ramana Radhakrishnan [this message]
2007-08-03 17:44   ` Jonathan S. Shapiro
2007-08-03 23:12     ` Ian Lance Taylor

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=67ea2eb0708031030v4e016671gf976815459a55cbc@mail.gmail.com \
    --to=ramana.r@gmail.com \
    --cc=binutils@sources.redhat.com \
    --cc=shap@eros-os.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).