Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 May 1996 19:07:04 -0400 (EDT)
From:      Chuck Robey <chuckr@Glue.umd.edu>
To:        =?iso-8859-1?Q?=22=C5ge?= =?iso-8859-1?Q?R=F8bekk=22?= <aagero@aage.priv.no>
Cc:        FreeBSD-Ports@FreeBSD.ORG
Subject:   Re: dynamic linking
Message-ID:  <Pine.OSF.3.91.960513190554.13181L-100000@maryann.eng.umd.edu>
In-Reply-To: <199605132230.AAA02514@birk04.studby.uio.no>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 14 May 1996, =?iso-8859-1?Q?=22=C5ge?= =?iso-8859-1?Q?R=F8bekk=22?= wrote:

> [Chuck Robey]
> | ./dltests /usr/obj/lib/libc/rmdir.so
> | testing file /usr/obj/lib/libc/rmdir.so ... dlopen call returned pointer 
> | value 0
> | dlerror call returns mmap failed for "/usr/obj/lib/libc/rmdir.so" : 
> | Invalid argument
> 
> I was able to load a shared object by doing
> 
> $ gcc -c -fpic dlopen.c
> $ ld -Bshareable dlopen.o -o dlopen.so
> $ size dlopen.o
> text    data    bss     dec     hex
> 528     0       0       528     210
> $ size dlopen.so
> text    data    bss     dec     hex
> 4096    4096    0       8192    2000
> $ ./dlopen ./dlopen.so
> <works>
> 
> The reason for failing in the other case is that the object is not
> page-aligned, which -Bshareable sets up.  mmap() is given an offset
> which is not a multiply of the pagesize.

Thanks to all who replied, I understand now.  I can get back to solving 
the tcl problem which kicked this off!

> 
> -aage
> 

==========================================================================
Chuck Robey chuckr@eng.umd.edu, I run FreeBSD-current on n3lxx + Journey2
 
Three Accounts for the Super-users in the sky,
  Seven for the Operators in their halls of fame,
Nine for Ordinary Users doomed to crie,
  One for the Illegal Cracker with his evil game
In the Domains of Internet where the data lie.
  One Account to rule them all, One Account to watch them,
  One Account to make them all and in the network bind them.





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.OSF.3.91.960513190554.13181L-100000>