From owner-freebsd-current Wed Nov 29 1: 4:22 2000 Delivered-To: freebsd-current@freebsd.org Received: from news.IAEhv.nl (news.IAE.nl [194.151.64.4]) by hub.freebsd.org (Postfix) with ESMTP id A443437B401; Wed, 29 Nov 2000 01:04:18 -0800 (PST) Received: (from uucp@localhost) by news.IAEhv.nl (8.9.1/8.9.1) with IAEhv.nl id KAA18695; Wed, 29 Nov 2000 10:00:12 +0100 (MET) Received: from localhost (localhost [127.0.0.1]) by bowtie.nl (8.8.8/8.8.8) with ESMTP id JAA09076; Wed, 29 Nov 2000 09:55:49 +0100 (CET) (envelope-from marc@bowtie.nl) Message-Id: <200011290855.JAA09076@bowtie.nl> X-Mailer: exmh version 2.1.1 10/15/1999 To: Marcel Moolenaar Cc: bmah@FreeBSD.ORG, janb@cs.utep.edu, dmaddox@sc.rr.com, current@FreeBSD.ORG Subject: Re: Other Linux stuff... In-reply-to: marcel's message of Tue, 28 Nov 2000 22:43:33 -0800. <3A24A595.9DFD3FAA@cup.hp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 29 Nov 2000 09:55:49 +0100 From: Marc van Kempen Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > "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. Marc. -- ---------------------------------------------------- Marc van Kempen BowTie Technology Raiffeisenstraat 7 5611 CH Eindhoven tel. +31 40 2 64 98 60 mailto:marc@bowtie.nl fax. +31 40 2 64 98 61 http://www.bowtie.nl ---------------------------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message