Subject: Re: Cannot map ld.so
To: Chris G. Demetriou <cgd@postgres.berkeley.edu>
From: None <Mark_Weaver@brown.edu>
List: current-users
Date: 04/04/1994 21:13:40
> > Any shared binaries I make are producing 'Cannot map ld.so'
> > What could I have done wrong ? (btw. it took this long
> > to notice, because I normally compile everything static ---
> > the static binaries are working fine)
> 
> sounds like you did something seriously wrong, when doing the
> include/library/binary install sequence...

I found the bug:

diff -c  src/lib/csu/i386/crt0.c.mhw1 src/lib/csu/i386/crt0.c
*** src/lib/csu/i386/crt0.c.mhw1	Mon Mar 28 06:11:32 1994
--- src/lib/csu/i386/crt0.c	Mon Apr  4 21:10:34 1994
***************
*** 99,108 ****
  #define dup2(fd, fdnew)		__syscall(SYS_dup2, (fd), (fdnew))
  #ifdef sun
  #define mmap(addr, len, prot, flags, fd, off)	\
!     __syscall(SYS_mmap, (addr), (len), (prot), _MAP_NEW|(flags), (fd), (off))
  #else
  #define mmap(addr, len, prot, flags, fd, off)	\
!     __syscall(SYS_mmap, (addr), (len), (prot), (flags), (fd), (off_t)(off))
  #endif
  
  #define _FATAL(str) \
--- 99,108 ----
  #define dup2(fd, fdnew)		__syscall(SYS_dup2, (fd), (fdnew))
  #ifdef sun
  #define mmap(addr, len, prot, flags, fd, off)	\
!     __syscall(SYS_mmap, (addr), (len), (prot), _MAP_NEW|(flags), (fd), 0, (off))
  #else
  #define mmap(addr, len, prot, flags, fd, off)	\
!     __syscall(SYS_mmap, (addr), (len), (prot), (flags), (fd), 0, (off_t)(off))
  #endif
  
  #define _FATAL(str) \

	Mark
--------------------------------------------------------------------
Email: Mark_Weaver@brown.edu           | Brown University
PGP Key: finger mhw@cs.brown.edu       | Dept of Computer Science

------------------------------------------------------------------------------