public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* [Linux-ia64] IA64 ELF header question...
@ 2002-01-21 18:48 Peter Bergner
  2002-01-22 22:26 ` Cary Coutant
  2002-01-24 13:51 ` Peter Bergner
  0 siblings, 2 replies; 3+ messages in thread
From: Peter Bergner @ 2002-01-21 18:48 UTC (permalink / raw)
  To: linux-ia64

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-01-24 13:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-01-21 18:48 [Linux-ia64] IA64 ELF header question Peter Bergner
2002-01-22 22:26 ` Cary Coutant
2002-01-24 13:51 ` Peter Bergner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox