All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Huggins-Daines <dhd@linuxcare.com>
To: Alan Modra <alan@linuxcare.com.au>
Cc: parisc-linux@thepuffingroup.com
Subject: [parisc-linux] PIC code generation in gcc/binutils
Date: 18 Jul 2000 13:58:53 -0400	[thread overview]
Message-ID: <8766q3uxpe.fsf@linuxcare.com> (raw)

Hi Alan, other porters,

I'm at the point now (userland mostly works for me as does the 64-bit
toolchain) where I'd like to start working on the implementation of
ELF dynamic linking for hppa-linux.  Obviously the precondition for
this is a working PIC code model in GCC and binutils.

I was hoping to write up a preliminary ABI specification based on the
64-bit ELF implementation on HP/UX, so I've been trying to find
detailed specifications on how the ELF64 ABI actually works but so far
have not come up with much information from HP's documentation.  The
64-bit runtime architecture document has some useful information, but
I suspect I'll have to look at the actual implementation to nail down
the details.

One thing I am sure of is that if we try to follow the HP/UX ELF64
specification for dynamic linking on 32-bit Linux we are going to be
substantially different from other Linux/ELF platforms.  In
particular, the handling of inter-module calls and function pointers,
and the management of the GP, are done in a totally different way from
all the other platforms I've encountered (i386, m68k, alpha).
(i.e. inter-module calls are handled by another set of stubs, and GP
management is done by the caller via the function descriptors, rather
than by the callee with GPDISP and similar relocations)

This will potentially make implementing ld.so more difficult, and thus
I'm not sure how desireable it is to follow the 64-bit example; we
will never have to actually link and load HP/UX ELF binaries with our
native toolchain and dynamic linker, even when we do have support for
64-bit userland.

On the other hand following the ELF64 example *will* allow us to reuse
code (though the ELF64 PIC implementation in BFD appears to be still
somewhat incomplete) in binutils, so it looks like kind of a
binutils/ld.so tradeoff.

Thus I am playing a bit with adapting the ELF64 code to produce a
preliminary PIC-generating toolchain.  I don't, however, want to get
too far into this before knowing (a) what other people are working on,
and (b) what the implementation is going to look like.

Thoughts?

-- 
dhd@linuxcare.com, http://www.linuxcare.com/
Linuxcare. Support for the revolution.

             reply	other threads:[~2000-07-18 17:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-07-18 17:58 David Huggins-Daines [this message]
  -- strict thread matches above, loose matches on Subject: below --
2000-07-24 23:58 [parisc-linux] PIC code generation in gcc/binutils Cary Coutant
2000-07-25  0:05 ` Ulrich Drepper
2000-07-25  0:23 ` David Huggins-Daines
2000-07-25  1:12   ` Alan Modra
2000-07-25 14:36     ` Matthew Wilcox
2000-07-25 15:16     ` Matthew Wilcox
2000-07-25 17:20 Cary Coutant
2000-07-25 17:21 Cary Coutant

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=8766q3uxpe.fsf@linuxcare.com \
    --to=dhd@linuxcare.com \
    --cc=alan@linuxcare.com.au \
    --cc=parisc-linux@thepuffingroup.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.