public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
From: Francis Galiegue <fg@mandrakesoft.com>
To: linux-ia64@vger.kernel.org
Subject: Re: [Linux-ia64] toolchain status
Date: Fri, 17 Nov 2000 14:55:30 +0000	[thread overview]
Message-ID: <marc-linux-ia64-105590678205739@msgid-missing> (raw)

[-- Attachment #1: Type: TEXT/PLAIN, Size: 935 bytes --]

On Thu, 16 Nov 2000, 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.
> 

I don't know which version this patch is supposed to apply to, but it doesn't
apply as is on the stock FSF tree. "Corrected" patch for this tree is attached,
in case it is of interest for someone.

Now if only I understood what you were talking about :)

-- 
Francis Galiegue, fg@mandrakesoft.com
"Programming is a race between programmers, who try and make more and more
idiot-proof software, and universe, which produces more and more remarkable
idiots. Until now, universe leads the race"  -- R. Cook

[-- Attachment #2: Type: TEXT/PLAIN, Size: 792 bytes --]

diff -urN glibc-2.2.old/sysdeps/ia64/dl-lookupcfg.h glibc-2.2/sysdeps/ia64/dl-lookupcfg.h
--- glibc-2.2.old/sysdeps/ia64/dl-lookupcfg.h	Thu Nov 16 18:55:16 2000
+++ glibc-2.2/sysdeps/ia64/dl-lookupcfg.h	Thu Nov 16 19:03:46 2000
@@ -39,5 +39,13 @@
 					ElfW(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
+#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-17 14:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-11-17 14:55 Francis Galiegue [this message]
2000-11-17 17:01 ` [Linux-ia64] toolchain status H . J . Lu
2000-11-17 17:26 ` H . J . Lu
2000-11-17 17:29 ` Francis Galiegue
2000-11-20  9:56 ` Francis Galiegue
2000-11-20 15:34 ` Dan Pop

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-105590678205739@msgid-missing \
    --to=fg@mandrakesoft.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