public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [Linux-ia64] toolchain status
@ 2000-11-17 14:55 Francis Galiegue
  2000-11-17 17:01 ` H . J . Lu
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Francis Galiegue @ 2000-11-17 14:55 UTC (permalink / raw)
  To: linux-ia64

[-- 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
+

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

end of thread, other threads:[~2000-11-20 15:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-11-17 14:55 [Linux-ia64] toolchain status Francis Galiegue
2000-11-17 17:01 ` 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

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