Re: DLLs ... [OFFTOPIC]

ralf@uni-koblenz.de
Thu, 16 Jul 1998 14:56:50 +0200


On Thu, Jul 16, 1998 at 01:30:43PM +0100, DAVID BALAZIC wrote:

> >Linking to library:
> >gcc -o executable -L/path/to/lib -lXY exec1.o exec2.o ...
>
> Is -fPIC neccesary ?
> Do lib*.so files have no reloc tables ?
>
> I compiled once a shared library without -fPIC and it didn't give me no troubles.

If you need to use -fpic / -fPIC is system dependent. At least on Intel
-fPIC will work but is way less efficient for DSOs. Checkout GNU's
libtool. It will help you to make your program work on many more
architectures than just Linux and avoids that you have to learn about all
the nasty details about shared libs.

Ralf

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html