From: <scorpio@dodds.net>
To: axp-list@redhat.com
Subject: Re: em86 + glibc?
Date: Fri, 24 Jul 1998 17:15:52 -0500 (CDT) [thread overview]
Message-ID: <Pine.LNX.3.96.980724163927.1832B-300000@prophet> (raw)
In-Reply-To: <199807232117.RAA02430@linux01.hlo.dec.com>
[-- Attachment #1: Type: TEXT/PLAIN, Size: 1925 bytes --]
On Thu, 23 Jul 1998, Jim Paradis wrote:
> Remember; everything pertaining to "em86-x86" is *INTEL* stuff. You've
> got to have access to an Intel development system and the Intel SRPMS
> in order to do anything useful.
Good thing I have access to 5 intel boxxen, 2 alphas, and (with a
little work) a PPC or 2 running linux, eh? ;-)
> That said, the goods are in glibc-2.0.7-19.src.rpm. Yes, you will have to
> hunt down the pieces you need and toss the rest...
Got it. Couldn't use much of it save the tarballs and patches,
but then that's the only reason I got it. :-)
Ok, I have ld-linux.so.2 built now, but I get an illegal
instruction every time I try to run it. Running either the binary, or the
old ldd86 or the ldd that came with glibc (hacked to use
/usr/x86/lib/ld-linux.so.2 instead of /lib/ld-linux.so.2) causes a
segfault, presumably because ld-linux.so.2 dies with SIGILL.
The build process I used:
rpm -bp /usr/src/redhat/SPECS/glibc-2.0.7.spec
-- unarchive all the tarballs, prep it.
apply the attached patch to rtld.c (allows changing the path of
ld.so.cache)
(in BUILD/glibc-2.0.7/)
CFLAGS="-O2" ./configure --disable-sanity-checks --prefix=/usr/x86
--host=i386-unknown-linux-gnu
apply the patch to config.make (sets slibdir and libdir to use
/usr/x86)
make -r CC='gcc -DLD_SO_PRELOAD=\"/usr/x86/etc/ld.so.preload\"
-DLD_SO_CACHE=\"/usr/x86/etc/ld.so.cache\"' -C elf
copy glibc-2.0.7/elf/ld-linux.so.2 to /usr/x86/lib/ld-linux.so.2
on the alpha, run ldconfig86, etc., etc. (Note that since this uses
/usr/x86/etc/ld.so.{preload,cache} and the old stuff uses stuff in
/usr/x86, some symlinks or copies will be necessary.)
run some intel glibc-based proggy, see segfault, get register
list, smile wearily. Contemplate. Experiment. ;-)
Any ideas or suggestions? The binary I built can be grabbed from
ftp.dodds.net/incoming/ld-linux.so.2.gz if it'll help.
Thanks!
- Bob
[-- Attachment #2: Type: TEXT/PLAIN, Size: 693 bytes --]
--- glibc-2.0.7/elf/rtld.c.orig Fri Jul 24 14:24:17 1998
+++ glibc-2.0.7/elf/rtld.c Fri Jul 24 16:50:00 1998
@@ -28,6 +28,9 @@
#include "dynamic-link.h"
#include <dl-envvars.h>
+#ifndef LD_SO_PRELOAD
+#define LD_SO_PRELOAD "/etc/ld.so.preload"
+#endif
/* System-specific function to do initial startup for the dynamic linker.
After this, file access calls and getenv must work. This is responsible
@@ -387,7 +390,7 @@
}
/* Read the contents of the file. */
- file = _dl_sysdep_read_whole_file ("/etc/ld.so.preload", &file_size,
+ file = _dl_sysdep_read_whole_file (LD_SO_PRELOAD, &file_size,
PROT_READ | PROT_WRITE);
if (file)
{
[-- Attachment #3: Type: TEXT/PLAIN, Size: 293 bytes --]
--- glibc-2.0.7/config.make~ Fri Jul 24 16:24:08 1998
+++ glibc-2.0.7/config.make Fri Jul 24 16:24:39 1998
@@ -6,7 +6,8 @@
install_root =
prefix = /usr/x86
exec_prefix = ${prefix}
-slibdir =
+slibdir = ${prefix}/lib
+libdir = ${prefix}/usr/lib
sysconfdir =
rootsbindir =
next prev parent reply other threads:[~1998-07-24 22:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-07-22 22:12 em86 + glibc? Bibek Sahu
1998-07-23 13:47 ` Jim Paradis
1998-07-23 20:54 ` scorpio
1998-07-23 21:17 ` Jim Paradis
1998-07-24 22:15 ` scorpio [this message]
1998-07-23 22:39 ` Richard Henderson
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox