All of lore.kernel.org
 help / color / mirror / Atom feed
From: "H . J . Lu" <hjl@valinux.com>
To: linux-ia64@vger.kernel.org
Subject: [Linux-ia64] Re: [ia64-tools] Re: Re: Re: Re: Re: Re: toolchain status
Date: Thu, 16 Nov 2000 23:30:12 +0000	[thread overview]
Message-ID: <marc-linux-ia64-105590678205737@msgid-missing> (raw)

On Thu, Nov 16, 2000 at 01:43:22PM -0800, Richard Henderson wrote:
> On Thu, Nov 16, 2000 at 10:53:45AM -0800, H . J . Lu wrote:
> > There is no DT_INIT_ARRAY in libc.so. Even if there is DT_INIT_ARRAY,
> > I still don't know how to use it to tell where DT_INIT points to.
> 
> Easy enough -- you know from DT_PLTGOT what the GP is for the DSO.
> If *(long *)(DT_INIT + 8) = GP, then you can assume that DT_INIT
> is a descriptor instead of an offset.
> 

Thanks. This patch seems to work for me.

-- 
H.J. Lu (hjl@valinux.com)
---
2000-11-16  H.J. Lu  <hjl@gnu.org>

	* sysdeps/ia64/dl-lookupcfg.h (DL_DT_INIT_ADDRESS): Check if
	*(long *)(DT_INIT + 8) = GP to tell a descriptor from an
	offset. It is for the backward compatibility.
	(DL_DT_FINI_ADDRESS): Likewise.

Index: sysdeps/ia64/dl-lookupcfg.h
=================================RCS file: /work/cvs/gnu/glibc/sysdeps/ia64/dl-lookupcfg.h,v
retrieving revision 1.1.1.4
diff -u -p -r1.1.1.4 dl-lookupcfg.h
--- sysdeps/ia64/dl-lookupcfg.h	2000/11/16 18:49:34	1.1.1.4
+++ sysdeps/ia64/dl-lookupcfg.h	2000/11/16 23:25:42
@@ -40,5 +40,13 @@ extern Elf64_Addr _dl_function_address (
 					Elf64_Addr start);
 
 #define DL_FUNCTION_ADDRESS(map, addr) _dl_function_address (map, addr)
+#if 0
 #define DL_DT_INIT_ADDRESS(map, addr) DL_FUNCTION_ADDRESS (map, addr)
 #define DL_DT_FINI_ADDRESS(map, addr) DL_FUNCTION_ADDRESS (map, addr)
+#else
+/* When should this backward compatibility be removed? */
+#define DL_DT_INIT_ADDRESS(map, addr)					      \
+  ((map)->l_info[DT_PLTGOT]->d_un.d_ptr = *(Elf64_Addr *) ((addr) + 8)       \
+   ? (addr) : DL_FUNCTION_ADDRESS (map, addr))
+#define DL_DT_FINI_ADDRESS(map, addr) DL_DT_INIT_ADDRESS (map, addr)
+#endif


                 reply	other threads:[~2000-11-16 23:30 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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-105590678205737@msgid-missing \
    --to=hjl@valinux.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 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.