This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
How are CPU-optimized libraries supposed to work?
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: libc-alpha at sources dot redhat dot com
- Date: Fri, 3 Oct 2003 11:36:33 -0400
- Subject: How are CPU-optimized libraries supposed to work?
I built an i386 ld.so and an i686 libc.so/libpthread.so, and put the latter
in /lib/i686. It crashes in pthread_initialize, and I tracked the problem
down to this:
--- linker-glob.txt 2003-10-03 11:28:45.000000000 -0400
+++ ../i386-i686/pthread-glob.txt 2003-10-03 11:27:23.000000000 -0400
@@ -70,7 +70,16 @@
struct link_map *_dl_initfirst;
-# 304 "../sysdeps/generic/ldsodefs.h"
+
+
+
+ hp_timing_t _dl_cpuclock_offset;
+
+
+ hp_timing_t _dl_hp_timing_overhead;
+
+
+
const char *_dl_profile;
struct link_map *_dl_profile_map;
@@ -201,4 +210,3 @@
};
-
That's in struct rtld_global. The linker doesn't think the timing offsets
are there, so pthread's access to the structure crashes. So, two questions:
- This is supposed to work the way I'm doing it... right?
- Should the hp_timing members be moved, or should they be always provided
for i386 in case i686 libs are used?
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer