How are CPU-optimized libraries supposed to work?
Daniel Jacobowitz
drow@mvista.com
Fri Oct 3 15:36:00 GMT 2003
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
More information about the Libc-alpha
mailing list