public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: fche@redhat.com (Frank Ch. Eigler)
To: Fumiaki Isoya <isoyaf@gmail.com>
Cc: Ian Lance Taylor <iant@google.com>, gcc@gcc.gnu.org
Subject: Re: The Extension to ELF
Date: Wed, 08 Aug 2012 16:23:00 -0000	[thread overview]
Message-ID: <y0mtxwdqroo.fsf@fche.csb> (raw)
In-Reply-To: <502288B8.2090802@gmail.com> (Fumiaki Isoya's message of "Thu, 09 Aug 2012 00:41:44 +0900")

Fumiaki Isoya <isoyaf@gmail.com> writes:

>> 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.  [...]
>
> Did you write some compiler language to evaluate that feature?

No.  Software for this particular was mainly coded in assembly, and
the assembly language / instruction set were itself very
configurable(!), so relocations had to be general.  If this capability
is useful for a higher-level language, a binding would have to be
created, and the arch gas/binutils would have to start generating the
info.

> How is the idea of adopting it as the standard format of GNU Hurd?

I have no opinion on this.  Note though that these complex relocations
are encoded within a standard ELF file (merely using separate
relocation-type and symbol-type codes).  There is no need for an
OS/kernel to support it, since all the action takes place within the
assembler and linker.

- FChE

  reply	other threads:[~2012-08-08 16:23 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
2012-08-08 13:34       ` Frank Ch. Eigler
2012-08-08 15:42     ` Fumiaki Isoya
2012-08-08 16:23       ` Frank Ch. Eigler [this message]
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=y0mtxwdqroo.fsf@fche.csb \
    --to=fche@redhat.com \
    --cc=gcc@gcc.gnu.org \
    --cc=iant@google.com \
    --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).