[comp.unix.internals] what is in sysV v4?

aed@netcom.COM (Andrew Davidson) (03/13/91)

does anyone know what the fnew features of at&t's sys V version 4 of
unix? I have herd rummors that is supposed to support dynamic linking.
does anyone know how this will work. I currently work on a SUN
workstation using sunos 4.1. it supports "dynamic linking" but I would
argue that this is not true dynamic linking as it only accures when my
program loads. I would link to be able to link and load on the fly

Andy
-- 
-----------------------------------------------------------------
                  "bede-bede-bede Thats all Folks"
				Porky Pig
Andy Davidson
Woodside CA.
aed@netcom.COM
-----------------------------------------------------------------

ekrell@ulysses.att.com (Eduardo Krell) (03/13/91)

In article <27919@netcom.COM> aed@netcom.COM (Andrew Davidson) writes:

>I currently work on a SUN
>workstation using sunos 4.1. it supports "dynamic linking" but I would
>argue that this is not true dynamic linking as it only accures when my
>program loads. I would link to be able to link and load on the fly

You can do that already. Look at the mmap() man page. The run-time loader
(ld.so) runs in user space, so anything it does, you can do too (mmap
whatever you want to load, relocate symbols, etc.)

Sun provides in 4.1.1 a simple dynamic linker interface library with
dlopen(), dlsym(), etc.  These are also available in SVR4.
    
Eduardo Krell                   AT&T Bell Laboratories, Murray Hill, NJ

UUCP: {att,decvax,ucbvax}!ulysses!ekrell  Internet: ekrell@ulysses.att.com

guy@auspex.auspex.com (Guy Harris) (03/14/91)

>does anyone know what the fnew features of at&t's sys V version 4 of
>unix? I have herd rummors that is supposed to support dynamic linking.

It does.

>does anyone know how this will work.

The same way it works in SunOS 4.1, essentially (although it doesn't
seem to have the same major/minor version number mechanism that SunOS
4.x does).

>I currently work on a SUN workstation using sunos 4.1. it supports
>"dynamic linking" but I would argue that this is not true dynamic
>linking as it only accures when my program loads. I would link to
>be able to link and load on the fly

Then use "dlopen()" and "dlsym()", which are in both SunOS 4.1 and
System V Release 4.  "dlopen()" takes a pathname of a shareable object
(and a flag argument), maps the shareable object into the process's
address space, and returns an opaque handle for that object.  "dlsym()"
takes a handle for a loaded object, and a pointer to a string containing
the name of a function in that object, and returns a pointer to the
function in question.