Skip to contentSkip to conversation

toolchain status

Linux-ia64 Francis Galiegue 3 participants 6 messages Nov 17, 2000 – Nov 20, 2000

lore
Share & tools
lore
#0 lore raw
Quoted 10 lines · H . J . Lu
Quoted 7 lines
Quoted 2 lines

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 :)

Signature · 4 lines
Francis Galiegue, [email protected]
"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
sysdeps/ia64/dl-lookupcfg.h +8 -0
diff -urN glibc-2.2.old/sysdeps/ia64/dl-lookupcfg.h glibc-2.2/sysdeps/ia64/dl-lookupcfg.h
@@ -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
+
#1 lore raw
Quoted 10 lines · Francis Galiegue
Quoted 8 lines · H . J . Lu
Quoted 7 lines
Quoted 2 lines

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.

Quoted 6 lines
Quoted 2 lines

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.

Your patch looks wrong. Please check out the glibc 2.2 from CVS again.

Signature · 1 line
H.J. Lu ([email protected])
#2 lore raw
In reply to Francis Galiegue
Quoted 7 lines · Francis Galiegue
Quoted 5 lines · H . J . Lu
Quoted 4 lines

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.

Quoted 6 lines
Quoted 2 lines

Your patch looks wrong. Please check out the glibc 2.2 from CVS again.

I'm talking about GNU's stock glibc-2.2.tar.gz here... I didn't know there were CVS snapshots of it again. Where are they to be found?

http://sources.redhat.com/glibc/

Signature · 1 line
H.J. Lu ([email protected])
#3 lore raw
In reply to Francis Galiegue
Quoted 7 lines · H . J . Lu
Quoted 4 lines

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.

Your patch looks wrong. Please check out the glibc 2.2 from CVS again.

I'm talking about GNU's stock glibc-2.2.tar.gz here... I didn't know there were CVS snapshots of it again. Where are they to be found?

Signature · 4 lines
Francis Galiegue, [email protected]
"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
#4 lore raw
In reply to Francis Galiegue
Quoted 7 lines · H . J . Lu
Quoted 4 lines

I'm talking about GNU's stock glibc-2.2.tar.gz here... I didn't know there were CVS snapshots of it again. Where are they to be found?

http://sources.redhat.com/glibc/

Hmmm, in snapshots/, the most recent I see is 2.1.3-pre4. This obviously is not the good one...

Signature · 4 lines
Francis Galiegue, [email protected]
"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
#5 lore raw
In reply to Francis Galiegue
Quoted 7 lines · Francis Galiegue
Quoted 5 lines · H . J . Lu
Quoted 4 lines

I'm talking about GNU's stock glibc-2.2.tar.gz here... I didn't know there were CVS snapshots of it again. Where are they to be found?

Quoted 5 lines
Quoted 2 lines

http://sources.redhat.com/glibc/

Hmmm, in snapshots/, the most recent I see is 2.1.3-pre4. This obviously is not the good one...

You've missed these bits from the URL above:

You can access the development source tree a couple of different ways.

Anonymous CVS read-only access

cvs -z 9 -d :pserver:[email protected]:/cvs/glibc login {enter "anoncvs" as the password}
cvs -z 9 -d :pserver:[email protected]:/cvs/glibc co libc

Read-only web-based CVS access
You can use the cvsweb interface.

Dan