public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Ian Lance Taylor <iant@google.com>
To: "Frank Ch. Eigler" <fche@redhat.com>
Cc: Fumiaki Isoya <isoyaf@gmail.com>, gcc@gcc.gnu.org
Subject: Re: The Extension to ELF
Date: Wed, 08 Aug 2012 13:24:00 -0000	[thread overview]
Message-ID: <CAKOQZ8wWzn1te8BkeF16ZXmYpnoraH-gY68k6WNR0BwMML9cmQ@mail.gmail.com> (raw)
In-Reply-To: <y0mr4rhsk4r.fsf@fche.csb>

On Wed, Aug 8, 2012 at 4:23 AM, Frank Ch. Eigler <fche@redhat.com> wrote:
> Ian Lance Taylor <iant@google.com> writes:
>
>> [...]
>> ELF is designed to permit fast program loading at runtime, and to
>> permit fast linking.  Changing symbol and relocation values to take
>> general expressions works against that goal.
>> [...]
>
> It may interest you to know that, for an older Cygnus project (mep),
> we implemented a facility called computed/complex relocations, as an
> ELF extension.  This is a way of encoding general symbol/arithmetic
> expressions to be evaluated at link time and substituted into the
> binary output.  (It may be similar to the vms-alpha ETIR facility.)
>
> This has been merged into gnu binutils some time ago, though is not
> widely known, and only used by a single cgen-based gas port.  See the
> OBJ_COMPLEX_RELC conditionals in gas/*, the BSF_*RELC/STT_RELC logic
> in bfd/*.

Thanks, I was trying to remember that.

It is perhaps also worth noting that the IEEE-695 object file format
supports arbitrary expressions in a number of different ways,
including for relocation calculations.  The format is not widely used
today, for more or less that reason.

Ian

  reply	other threads:[~2012-08-08 13:24 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-08  5:39 Fumiaki Isoya
2012-08-08  6:32 ` Ian Lance Taylor
2012-08-08  7:47   ` Fumiaki Isoya
2012-08-08 11:23   ` Frank Ch. Eigler
2012-08-08 13:24     ` Ian Lance Taylor [this message]
2012-08-08 13:34       ` Frank Ch. Eigler
2012-08-08 15:42     ` Fumiaki Isoya
2012-08-08 16:23       ` Frank Ch. Eigler
2012-08-08 17:36         ` Fumiaki Isoya

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=CAKOQZ8wWzn1te8BkeF16ZXmYpnoraH-gY68k6WNR0BwMML9cmQ@mail.gmail.com \
    --to=iant@google.com \
    --cc=fche@redhat.com \
    --cc=gcc@gcc.gnu.org \
    --cc=isoyaf@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).