From: Andreas Sorgatz (andi@uni-paderborn.de)
Date: 05/17/93


From: andi@uni-paderborn.de (Andreas Sorgatz)
Subject: Help: C-function `uselib', gcc -fPIC
Date: 17 May 1993 20:28:49 GMT


Hi,

I need some help with linux programing.

I want to port a program running on SunOS 4.x (sparc) and AIX 3.x
(IBM/RS6000) to linux. What I need is the possibility to create
code objects (shared libraries ?), to be load into a main program
at runtime (!).

(1) I found the function `uselib' in unistd.h, but had no access
    in loading any library.
    
(2) I tried to use the gcc-option -fPIC to create an object file
    with position-independent code, but only foolish errors were
    given out.
    
(3) Finally, I haven't found any information, how to create (sha-
    red) libraries which can be used with function `uselib'.
    
Is there anybody who can help me, perhaps with an example ?
If this is a RTFM, please tell me which FM.

Thanks in advance ...

andi
  ___ _____________________________________________________
 /__/ ( Andreas Sorgatz Rechnerbetreuung Mathematik
/ / __) andi@uni-paderborn.de Paderborn, den 17 May. 1993