public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Bergner <bergner@vnet.ibm.com>
To: linux-ia64@vger.kernel.org
Subject: [Linux-ia64] IA64 ELF header question...
Date: Mon, 21 Jan 2002 18:48:19 +0000	[thread overview]
Message-ID: <marc-linux-ia64-105590698805902@msgid-missing> (raw)

Does anyone know whether the e_entry field in the IA64 ELF header
is equal to the address of the function descriptor of the _start
routine or whether it's equal to the address of the _start code?
(ie, ._start)  Looking at the IA64 kernel and GLIBC sources
(the IA64 ABI was a little vague), I'm guessing e_entry is actually
the address of the _start code (ie, e_entry = address of ._start).

The reason I ask, is that I'm working on the PPC64 GLIBC port
and our ABI states that our e_entry field is equal to the
address of the function descriptor for _start.  This was fine
for statically linked apps.  All we needed to change in the
kernel was an extra dereference in start_thread to load the
actual code address of _start and away we went.

My problem is with dynamically linked apps.  The kernel is smart
enough to know when it loads ld.so to reloc the e_entry field.
The problem is that the function descriptor entries for _start
need to be reloc'd too before we can use them.  I'd prefer not
to touch arch independent code to fix this, but it doesn't look
like I have enough info in start_thread to determine whether
I need to reloc the function descriptor entries or not before
using them.  Since PPC64 and IA64 share the use of function
descriptors, I thought I'd check with people here on how this
was solved for IA64.  Anyone have any ideas I can use?

...I guess another option I could try is to change the PowerPC64-ELF
ABI to say that the e_entry field holds the address of ._start
rather than _start.  Although, I'm not sure whether that's possible
or not.


Peter

--
Peter Bergner
SLIC Optimizing Translator Development / Linux PPC64 Kernel Development
IBM Rochester, MN
bergner@vnet.ibm.com


             reply	other threads:[~2002-01-21 18:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-21 18:48 Peter Bergner [this message]
2002-01-22 22:26 ` [Linux-ia64] IA64 ELF header question Cary Coutant
2002-01-24 13:51 ` Peter Bergner

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=marc-linux-ia64-105590698805902@msgid-missing \
    --to=bergner@vnet.ibm.com \
    --cc=linux-ia64@vger.kernel.org \
    /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