You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by sameer <sa...@c2.net> on 1997/11/08 00:03:30 UTC

dlopen/dlsym working

	OK, so i figured out how to create .so files in FreeBSD and I
got my modified mod_dll.c to work with dlopen/dlsym on freebsd. We're
in a beta cycle, so I can't make the module standard apache, right? I
would like to do that, if possible, but I will defer to the Release
Master.

	So I made it so that the command would be:

LoadModule _module_name mod_name.so

	would it be worthwhile to add code so that the leading
underscore can be removed?

-- 
Sameer Parekh					Voice:   510-986-8770
President					FAX:     510-986-8777
C2Net
http://www.c2.net/				sameer@c2.net

Re: dlopen/dlsym working

Posted by Martin Kraemer <Ma...@mch.sni.de>.
On Fri, Nov 07, 1997 at 03:03:30PM -0800, sameer wrote:
> 	OK, so i figured out how to create .so files in FreeBSD and I
> got my modified mod_dll.c to work with dlopen/dlsym on freebsd.

Great! Really: can I give it a try under SVR4? Or Linux?
However, It would be a tremendous help if you could summarize
the steps necessary to build a .so out of a module source...

> 	So I made it so that the command would be:
> 
> LoadModule _module_name mod_name.so
> 
> 	would it be worthwhile to add code so that the leading
> underscore can be removed?
"What does it cost?" OTOH: would be nice to have... Otherwise there's
so much to explain to users.

    Martin
-- 
| S I E M E N S |  <Ma...@mch.sni.de>  |      Siemens Nixdorf
| ------------- |   Voice: +49-89-636-46021     |  Informationssysteme AG
| N I X D O R F |   FAX:   +49-89-636-44994     |   81730 Munich, Germany
~~~~~~~~~~~~~~~~My opinions only, of course; pgp key available on request

Re: dlopen/dlsym working

Posted by Dean Gaudet <dg...@arctic.org>.
Or even that mod_dld doesn't work so ...

Dean

On Fri, 7 Nov 1997, Michael Parker wrote:

> On Fri, Nov 07, 1997 at 03:03:30PM -0800, sameer wrote:
> > 	OK, so i figured out how to create .so files in FreeBSD and I
> > got my modified mod_dll.c to work with dlopen/dlsym on freebsd. We're
> > in a beta cycle, so I can't make the module standard apache, right? I
> > would like to do that, if possible, but I will defer to the Release
> > Master.
> > 
> 
> Couldn't it be argued that technically mod_dll.c is broken under Unix
> anyway so this would just be a fix.
> 
> Michael
> 


Re: dlopen/dlsym working

Posted by Michael Parker <pa...@austx.tandem.com>.
On Fri, Nov 07, 1997 at 03:03:30PM -0800, sameer wrote:
> 	OK, so i figured out how to create .so files in FreeBSD and I
> got my modified mod_dll.c to work with dlopen/dlsym on freebsd. We're
> in a beta cycle, so I can't make the module standard apache, right? I
> would like to do that, if possible, but I will defer to the Release
> Master.
> 

Couldn't it be argued that technically mod_dll.c is broken under Unix
anyway so this would just be a fix.

Michael

Re: dlopen/dlsym working

Posted by Marc Slemko <ma...@worldgate.com>.
On Fri, 7 Nov 1997, sameer wrote:

> 	OK, so i figured out how to create .so files in FreeBSD and I
> got my modified mod_dll.c to work with dlopen/dlsym on freebsd. We're
> in a beta cycle, so I can't make the module standard apache, right? I
> would like to do that, if possible, but I will defer to the Release
> Master.

We are beta so you can't do it unless you convince people it can't break
anything and it is cool and perhaps maybe.

> 
> 	So I made it so that the command would be:
> 
> LoadModule _module_name mod_name.so
> 
> 	would it be worthwhile to add code so that the leading
> underscore can be removed?

Yes.  Allow both forms.

> 
> -- 
> Sameer Parekh					Voice:   510-986-8770
> President					FAX:     510-986-8777
> C2Net
> http://www.c2.net/				sameer@c2.net
> 


Re: dlopen/dlsym working

Posted by Ben Laurie <be...@algroup.co.uk>.
Stanley Gambarin wrote:
> 
> On Sat, 8 Nov 1997, Ben Laurie wrote:
> 
> > > I don't particuarly care about that, but please don't call it
> > > mod_dll.c. Because... um... well, Unix doesn't have DLLs. I don't know
> > > what the proper acronym is, but I know it's not DLL. If it works, I'd
> > > perfer it just replaces mod_dld.c, unless that's an improper name, too
> > > (I have no idea what dld stands for, really, except that it's probably
> > > dynamic link... something).
> >
> > I've always assumed it stood for "dynamic ld" (as in the program "ld").
> >
>         Actually, ld is the name of the linker executable (i don't
> know who came up with this first, but almost every Un*x system uses
> it).  "dld" stands for dynamic loader, not linker, and whose job is
> to load the executable and the libraries into memory before
> running the program.

And to link the symbols...

Cheers,

Ben.

-- 
Ben Laurie            |Phone: +44 (181) 735 0686|Apache Group member
Freelance Consultant  |Fax:   +44 (181) 735 0689|http://www.apache.org
and Technical Director|Email: ben@algroup.co.uk |Apache-SSL author
A.L. Digital Ltd,     |http://www.algroup.co.uk/Apache-SSL
London, England.      |"Apache: TDG" http://www.ora.com/catalog/apache

Re: dlopen/dlsym working

Posted by Igor Tatarinov <ta...@prairie.NoDak.edu>.
> > 	Actually, ld is the name of the linker executable (i don't 
> > know who came up with this first, but almost every Un*x system uses
> 
> Which brings up the question of what ld stands for... if I recall my
> history correctly (and It's quote possible that ld was first written
> before I was born), ld stands for link editor or something like
> that. So I think names are pretty much meaningless here :)

As far as I remember, ld means load (like cp means copy, to save
keystrokes). The idea is that in the 60s you had to load a program before
executing it. I guess, it was similar to what now happens automatically
when we start a program that was linked with shared libraries. 

Just my 2 cents,
igor

Re: dlopen/dlsym working

Posted by Alexei Kosut <ak...@nueva.pvt.k12.ca.us>.
On Sat, 8 Nov 1997, Stanley Gambarin wrote:

> On Sat, 8 Nov 1997, Ben Laurie wrote:
> 
> > > I don't particuarly care about that, but please don't call it
> > > mod_dll.c. Because... um... well, Unix doesn't have DLLs. I don't know
> > > what the proper acronym is, but I know it's not DLL. If it works, I'd
> > > perfer it just replaces mod_dld.c, unless that's an improper name, too
> > > (I have no idea what dld stands for, really, except that it's probably
> > > dynamic link... something).
> > 
> > I've always assumed it stood for "dynamic ld" (as in the program "ld").
> > 
> 	Actually, ld is the name of the linker executable (i don't 
> know who came up with this first, but almost every Un*x system uses

Which brings up the question of what ld stands for... if I recall my
history correctly (and It's quote possible that ld was first written
before I was born), ld stands for link editor or something like
that. So I think names are pretty much meaningless here :)

> it).  "dld" stands for dynamic loader, not linker, and whose job is
> to load the executable and the libraries into memory before 
> running the program.  

-- Alexei Kosut <ak...@nueva.pvt.k12.ca.us>


Re: dlopen/dlsym working

Posted by Stanley Gambarin <st...@cs.bu.edu>.

On Sat, 8 Nov 1997, Ben Laurie wrote:

> > I don't particuarly care about that, but please don't call it
> > mod_dll.c. Because... um... well, Unix doesn't have DLLs. I don't know
> > what the proper acronym is, but I know it's not DLL. If it works, I'd
> > perfer it just replaces mod_dld.c, unless that's an improper name, too
> > (I have no idea what dld stands for, really, except that it's probably
> > dynamic link... something).
> 
> I've always assumed it stood for "dynamic ld" (as in the program "ld").
> 
	Actually, ld is the name of the linker executable (i don't 
know who came up with this first, but almost every Un*x system uses
it).  "dld" stands for dynamic loader, not linker, and whose job is
to load the executable and the libraries into memory before 
running the program.  
	
	A small note on the code for mod_dld.c:
	- you may want to abstract calls to dlopen/dlsym, etc, since
some systems use shl_load/shl_sym API (in particular old HP-UX).  This
would avoid the problems later on.


Re: dlopen/dlsym working

Posted by Ben Laurie <be...@algroup.co.uk>.
Alexei Kosut wrote:
> 
> On Fri, 7 Nov 1997, sameer wrote:
> 
> >       OK, so i figured out how to create .so files in FreeBSD and I
> > got my modified mod_dll.c to work with dlopen/dlsym on freebsd. We're
> > in a beta cycle, so I can't make the module standard apache, right? I
> > would like to do that, if possible, but I will defer to the Release
> > Master.
> 
> I don't particuarly care about that, but please don't call it
> mod_dll.c. Because... um... well, Unix doesn't have DLLs. I don't know
> what the proper acronym is, but I know it's not DLL. If it works, I'd
> perfer it just replaces mod_dld.c, unless that's an improper name, too
> (I have no idea what dld stands for, really, except that it's probably
> dynamic link... something).

I've always assumed it stood for "dynamic ld" (as in the program "ld").

Cheers,

Ben.

-- 
Ben Laurie            |Phone: +44 (181) 735 0686|Apache Group member
Freelance Consultant  |Fax:   +44 (181) 735 0689|http://www.apache.org
and Technical Director|Email: ben@algroup.co.uk |Apache-SSL author
A.L. Digital Ltd,     |http://www.algroup.co.uk/Apache-SSL
London, England.      |"Apache: TDG" http://www.ora.com/catalog/apache

Re: dlopen/dlsym working

Posted by Alexei Kosut <ak...@nueva.pvt.k12.ca.us>.
On Fri, 7 Nov 1997, sameer wrote:

> 	OK, so i figured out how to create .so files in FreeBSD and I
> got my modified mod_dll.c to work with dlopen/dlsym on freebsd. We're
> in a beta cycle, so I can't make the module standard apache, right? I
> would like to do that, if possible, but I will defer to the Release
> Master.

I don't particuarly care about that, but please don't call it
mod_dll.c. Because... um... well, Unix doesn't have DLLs. I don't know
what the proper acronym is, but I know it's not DLL. If it works, I'd
perfer it just replaces mod_dld.c, unless that's an improper name, too
(I have no idea what dld stands for, really, except that it's probably
dynamic link... something).

-- Alexei Kosut <ak...@nueva.pvt.k12.ca.us>