public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Ian Lance Taylor <iant@google.com>
To: Raphael Zulliger <zulli73@gmail.com>
Cc: "binutils@sourceware.org" <binutils@sourceware.org>
Subject: Re: gold linker: Access section start & end address w/o using a linker script
Date: Sun, 21 Apr 2013 17:42:00 -0000	[thread overview]
Message-ID: <CAKOQZ8ym43X48NJQbM81AiB+f-THT-we-Md0OJ1u-s-MnEpn6w@mail.gmail.com> (raw)
In-Reply-To: <10A84606-654D-4FBC-A66D-40BA39916061@gmail.com>

On Sun, Apr 21, 2013 at 9:04 AM, Raphael Zulliger <zulli73@gmail.com> wrote:
>
> After having read several things about gold in the net, my impression is that gold mainly supports linker scripts to be backward compatible to the bfd linker. But the "gold style of linking" is to avoid using linker scripts. Am I roughly right with this conclusion?

Yes.

> The problem that arises when no linker script should be used is that our RTOS (and probably embedded system in general) requires to know the start address and end address of certain sections, such as data, sbss, etc. We need to know these addresses in order to create copies of these section during startup to support 'soft reset OS' features.

With both gold and GNU ld, if the name of the section is a valid C
identifier (e.g., does not start with '.') then the symbols
__start_SECNAME and __stop_SECNAME will be automatically defined by
the linker and available for use by the program.

Ian

  reply	other threads:[~2013-04-21 17:42 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-21 16:04 Raphael Zulliger
2013-04-21 17:42 ` Ian Lance Taylor [this message]
2013-04-21 19:27   ` Raphael Zulliger
2013-04-21 19:42     ` Ian Lance Taylor
2013-04-22 11:39       ` Raphael Zulliger
2013-04-22 17:51         ` Ian Lance Taylor
2013-05-12 12:08           ` Raphael Zulliger
2014-02-02  1:20           ` Kevin
2014-02-02  4:59             ` 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=CAKOQZ8ym43X48NJQbM81AiB+f-THT-we-Md0OJ1u-s-MnEpn6w@mail.gmail.com \
    --to=iant@google.com \
    --cc=binutils@sourceware.org \
    --cc=zulli73@gmail.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).