* em86 + glibc? @ 1998-07-22 22:12 Bibek Sahu 1998-07-23 13:47 ` Jim Paradis 0 siblings, 1 reply; 6+ messages in thread From: Bibek Sahu @ 1998-07-22 22:12 UTC (permalink / raw) To: axp-list Quick question for anyone who might have an answer: how does one go about running libc6-based x86 apps on an alpha? I have statically linked libc6 x86 apps and successfully run them under em86, but I've had no success getting the necessary shared libraries / loader to work to run shared binaries. Any suggestions / pointers? I much prefer running alpha apps on my alpha, but sometimes that just isn't an option... Thanks for any and all help! - Bob ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: em86 + glibc? 1998-07-22 22:12 em86 + glibc? Bibek Sahu @ 1998-07-23 13:47 ` Jim Paradis 1998-07-23 20:54 ` scorpio 0 siblings, 1 reply; 6+ messages in thread From: Jim Paradis @ 1998-07-23 13:47 UTC (permalink / raw) To: axp-list > Quick question for anyone who might have an answer: how does one > go about running libc6-based x86 apps on an alpha? Here's what needs to be done. I don't know if I'll have the time to do it soon, but if anyone else wants to give it a shot, be my guest. First, pull all the required shared libraries over into /usr/x86/lib on your alpha system. Second, you need to crock up a version of ld-linux.so.2 which uses /usr/x86 as its default library path. This *should* be a simple source code change and rebuild. Finally, run ldconfig86 on the alpha system. -- Jim Paradis (paradis@linux01.hlo.dec.com) "The early bird gets the worm. Compaq Computer Corporation If you want something else for (508)841-3243 breakfast, get up later." http://www.tiac.net/users/jrp/index.html ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: em86 + glibc? 1998-07-23 13:47 ` Jim Paradis @ 1998-07-23 20:54 ` scorpio 1998-07-23 21:17 ` Jim Paradis 1998-07-23 22:39 ` Richard Henderson 0 siblings, 2 replies; 6+ messages in thread From: scorpio @ 1998-07-23 20:54 UTC (permalink / raw) To: axp-list Figured I'd give it a shot myself. Grabbed all the sources and I intend to tackle it tomorrow sometine. The question I have is in regards to crocking up that /usr/x86 ld-linux.so.2... The em86-x86 srpm has that and a couple other things arranged nicely in a single tarball. However, ld-linux.so.2 actually comes from the glibc package. I've been poking at the sources without actually finding anything about ld-linux.so.2. Any pointers? I'm sure I'll find it eventually if I keep looking, but if anyone's got pointers, it'd likely speed up the process... :-) Thanks in advance for any help! - Bob On Thu, 23 Jul 1998, Jim Paradis wrote: > Here's what needs to be done. I don't know if I'll have the time to > do it soon, but if anyone else wants to give it a shot, be my guest. > > First, pull all the required shared libraries over into /usr/x86/lib > on your alpha system. > > Second, you need to crock up a version of ld-linux.so.2 which uses > /usr/x86 as its default library path. This *should* be a simple > source code change and rebuild. > > Finally, run ldconfig86 on the alpha system. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: em86 + glibc? 1998-07-23 20:54 ` scorpio @ 1998-07-23 21:17 ` Jim Paradis 1998-07-24 22:15 ` scorpio 1998-07-23 22:39 ` Richard Henderson 1 sibling, 1 reply; 6+ messages in thread From: Jim Paradis @ 1998-07-23 21:17 UTC (permalink / raw) To: axp-list > The em86-x86 srpm has that and a couple other things arranged > nicely in a single tarball. However, ld-linux.so.2 actually comes from > the glibc package. I've been poking at the sources without actually > finding anything about ld-linux.so.2. Any pointers? I'm sure I'll find > it eventually if I keep looking, but if anyone's got pointers, it'd likely > speed up the process... :-) 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. 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... -- Jim Paradis (paradis@linux01.hlo.dec.com) "The early bird gets the worm. Compaq Computer Corporation If you want something else for (508)841-3243 breakfast, get up later." http://www.tiac.net/users/jrp/index.html ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: em86 + glibc? 1998-07-23 21:17 ` Jim Paradis @ 1998-07-24 22:15 ` scorpio 0 siblings, 0 replies; 6+ messages in thread From: scorpio @ 1998-07-24 22:15 UTC (permalink / raw) To: axp-list [-- 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 = ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: em86 + glibc? 1998-07-23 20:54 ` scorpio 1998-07-23 21:17 ` Jim Paradis @ 1998-07-23 22:39 ` Richard Henderson 1 sibling, 0 replies; 6+ messages in thread From: Richard Henderson @ 1998-07-23 22:39 UTC (permalink / raw) To: axp-list On Thu, Jul 23, 1998 at 03:54:15PM -0500, scorpio@dodds.net wrote: > However, ld-linux.so.2 actually comes from the glibc package. I've > been poking at the sources without actually finding anything about > ld-linux.so.2. Any pointers? That would be most everything under the glibc/elf/ subdirectory. In the copy of glibc I have unpacked (2.0.94), I see that there is a file "trusted-dirs.h" generated at compile time. So a tiny bit of makefile hacking would be all that is required to excise the default rpath and install your own. r~ ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~1998-07-24 22:16 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 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 1998-07-23 22:39 ` Richard Henderson
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox