From owner-freebsd-ports Mon May 13 16:07:10 1996 Return-Path: owner-ports Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id QAA04571 for ports-outgoing; Mon, 13 May 1996 16:07:10 -0700 (PDT) Received: from jolt.eng.umd.edu (jolt.eng.umd.edu [129.2.102.5]) by freefall.freebsd.org (8.7.3/8.7.3) with ESMTP id QAA04566 for ; Mon, 13 May 1996 16:07:07 -0700 (PDT) Received: from maryann.eng.umd.edu (maryann.eng.umd.edu [129.2.98.209]) by jolt.eng.umd.edu (8.7.5/8.7.3) with ESMTP id TAA27472; Mon, 13 May 1996 19:07:05 -0400 (EDT) Received: (from chuckr@localhost) by maryann.eng.umd.edu (8.7.5/8.7.3) id TAA11315; Mon, 13 May 1996 19:07:04 -0400 (EDT) Date: Mon, 13 May 1996 19:07:04 -0400 (EDT) From: Chuck Robey X-Sender: chuckr@maryann.eng.umd.edu To: =?iso-8859-1?Q?=22=C5ge?= =?iso-8859-1?Q?R=F8bekk=22?= cc: FreeBSD-Ports@FreeBSD.ORG Subject: Re: dynamic linking In-Reply-To: <199605132230.AAA02514@birk04.studby.uio.no> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-ports@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk 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 > > > 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.