From owner-freebsd-hackers Wed Nov 29 11:22:17 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from karon.dynas.se (karon.dynas.se [192.71.43.4]) by hub.freebsd.org (Postfix) with SMTP id 278E037B400 for ; Wed, 29 Nov 2000 11:22:13 -0800 (PST) Received: (qmail 21836 invoked from network); 29 Nov 2000 19:22:08 -0000 Received: from spirit.sto.dynas.se (HELO spirit.dynas.se) (172.16.1.10) by karon.sto.dynas.se with SMTP; 29 Nov 2000 19:22:08 -0000 Received: (qmail 3291 invoked from network); 29 Nov 2000 19:22:08 -0000 Received: from explorer.rsa.com (10.81.217.59) by spirit.dynas.se with SMTP; 29 Nov 2000 19:22:08 -0000 Received: (from mikko@localhost) by explorer.rsa.com (8.11.1/8.11.1) id eATJM3N64716; Wed, 29 Nov 2000 11:22:03 -0800 (PST) (envelope-from mikko) Date: Wed, 29 Nov 2000 11:22:03 -0800 (PST) From: Mikko Tyolajarvi Message-Id: <200011291922.eATJM3N64716@explorer.rsa.com> To: marc@bowtie.nl Cc: freebsd-hackers@freebsd.org Subject: Re: Other Linux stuff... Newsgroups: local.freebsd-current References: marcel's message of Tue, 28 Nov 2000 22:43:33 -0800. <3A24A595.9DFD3FAA@cup.hp.com> <200011290855.JAA09076@bowtie.nl> X-Newsreader: NN version 6.5.6 (NOV) Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In local.freebsd-current you write: >> "Bruce A. Mah" wrote: >> > >> > If memory serves me right, Marcel Moolenaar wrote: >> > >> > > So, from a pure >> > > ELF layout point of view, both shared objects and executables are the >> > > same. But a shared library is not guaranteed to be executable. Allowing >> > > shared objects to be executed is in violation with the specs: >> > >> > This may be a really stupid question, but what on Earth do they gain by >> > allowing the execution of shared object files? >> >> The only gain I see, if you can call it a gain, is that you can get >> non-trivial information out of a shared object from within scripts, but >> I don't know if this has been the reason. If you don't allow execution >> of shared objects, you have to use dlopen(3) and call some functions or >> query some variables. >> >Would it be possible to write a small wrapper to load the shared library >and execute some entryfunction to get it started? I suppose that's what >the elf-loader under linux does. >If so that would be a simple addition to the linux-lib port. Personally, I wouldn't mind being able to run "ldd" on native shared libraries as well (that is how it works on solaris). I can never remember the right flags to "objdump" to get the dependency information... I don't know quite how it works, but from ldd(1) on solaris 7: FILES /usr/lib/lddstub Fake executable loaded to check the dependencies of shared objects. $.02, /Mikko -- Mikko Työläjärvi_______________________________________mikko@rsasecurity.com RSA Security To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message