Subject: Re: Several minor problems
To: None <mw@eunet.ch>
From: H}kan Th|rngren <hth@iar.se>
List: amiga-x
Date: 03/01/1995 08:17:31
> > Is SUN3 compability broken? When I tried a SUN3 binary, it complained
> > that it could not find ld.so, so I tried to copy ld.so from a SUN3.
> > Now it says: ld.so: map heap error (22) for /dev/zero
> > File says 'mc68020 demand paged dynamically linked executable' on the SUN3.
> > I had the impression that the only thing needed was some SUN3 shared
> > libraries...
>
> I'll certainly forget parts, here we go. Someone might put this into a FAQ...
>
> 1/ copy SunOS ld.so to /usr/lib/ld.so
> 2/ edit that ld.so with a binary editor (emacs will do), and do
> replace-string /usr/lib/ /sun/lib/
> replace-string /etc/ld.so.cache /sun/ld.so.cache
> 3/ mkdir /sun
> 4/ ln -s {YOURSUNOSPARTITION}/usr/lib /sun/lib
>
> that's it. Works for me. If you feel like it, chroot to the sunos-partition
> and generate a ld.so.cache file with "ldconfig", and copy that into /sun
> as well.
Does not work for me (I skipped the ldconfig part for the moment).
I get the following output from ktrace, maybe someone can decipher
it?
...
23394 ktrace NAMI "/usr/local/bin/iccz80"
23394 iccz80 RET execve 0
23394 iccz80 CALL open(0x220a,0,0x2224)
23394 iccz80 NAMI "/usr/lib/ld.so"
23394 iccz80 RET open 3
23394 iccz80 CALL read(0x3,0xdfff8e4,0x20)
23394 iccz80 GIO fd 3 read 32 bytes
"\M^@\^B\^A\v\0\0@\0\0\0 \0\0\0\0\0\0\0\0\0\0\0\0 \0\0\0\0\0\0\0\0"
23394 iccz80 RET read 32/0x20
23394 iccz80 CALL old.mmap(0,0x22000,0x5,0x80000002,0x3,0)
23394 iccz80 RET old.mmap 34471936/0x20e0000
23394 iccz80 CALL old.mmap(0x2100000,0x2000,0x7,0x80000012,0x3,0x4000)
23394 iccz80 RET old.mmap 34603008/0x2100000
23394 iccz80 CALL munmap(0x20e4000,0x1c000)
23394 iccz80 RET munmap 0
23394 iccz80 CALL open(0x2219,0,0x226a)
23394 iccz80 NAMI "/dev/zero"
23394 iccz80 RET open 4
23394 iccz80 CALL close(0x3)
23394 iccz80 RET close 0
23394 iccz80 CALL old.getrlimit(0x3,0xdfff838)
23394 iccz80 RET old.getrlimit 0
23394 iccz80 CALL old.mmap(0xee00000,0x2000,0x3,0x80000012,0x4,0)
23394 iccz80 RET old.mmap -1 errno 22 Invalid argument
23394 iccz80 CALL write(0x2,0xdfff764,0x2a)
23394 iccz80 GIO fd 2 wrote 42 bytes
"ld.so: map heap error (22) for /dev/zero\r
"
23394 iccz80 RET write 42/0x2a
23394 iccz80 CALL exit(0x7f)
from man mmap:
[EINVAL] MAP_FIXED was specified and the parameter was not page
aligned. Fd did not reference a regular or character spe-
cial file.
MAP_FIXED Do not permit the system to select a different address than
the one specified. If the specified address cannot be used,
mmap will fail. If MAP_FIXED is specified, addr must be a
multiple of the pagesize. Use of this option is discouraged.
crw-rw-rw- 1 root wheel 2, 12 Jan 29 14:38 /dev/zero
Pagesize is reported to be 0x2000 by getpagesize(). 0xee00000 is a multiple
of 0x2000. The size argument is equal to pagesize. What's wrong?
This is ld.so from SunOS 4.0.
/Håkan
--
Use MS-Windows every morning and nothing worse will happen to you all day.
email: hth@iar.se