Re: pam linking stuff

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Igmar,

On Wed, 6 Dec 2000, Igmar Palsenberg wrote:

> Bit OT I think, but here it goes :

> I'm reworking the makefile stuff for my PAM module, and I end up having
> several .a files in a dir.

> Those files needed to be linked into a .so file. I had the following in
> mind:

> gcc -shared -Xlinker -x -o module.so file1.a file2.a

> It links, however, the module is only a few KB's and can never contain all
> needed data. Anyone ever done this ??

> The pam-0.73 file uses about the same command, but uses .o's, not .a

A .a file is not a proper input file for a sharedlib target.  You will need to
use the original .o files when linking the shared lib, or else reference your
.a files as libraries (which is what they are) with the -l syntax.

Fortunately, AFAIK a .a file still contains all the information necessary to
extract the original .o files, so even if you had third-party static libs you
could still turn the static lib into a shared lib.  OTOH, I once had a
closed-source shared lib for which I needed a static equivalent.  Sigh...

Steve Langasek
postmodern programmer





[Index of Archives]     [Fedora Users]     [Kernel]     [Red Hat Install]     [Linux for the blind]     [Gimp]

  Powered by Linux