[Top][All Lists]

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

Re: Runtime Linker and friends.

From: Tristan Van Berkom
Subject: Re: Runtime Linker and friends.
Date: Fri, 26 Mar 2004 12:34:42 -0500
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225

Paul Jarc wrote:
> Tristan Van Berkom <> wrote:
>>I'm trying to get an application to link against a library that
>>references a global variable declared by the application in question.
> You might try moving the variable into the library instead - or put it
> in a new library, and then make the existing library and the program
> both link to the new library.

Yes, I ended up doing that (creating a library to hold those symbols that
get initialized before the invokation of `main').

The beauty of the original solution was to provide a program tracing
api completely in a header file.

Using glibc's:
    extern char *program_invocation_short_name;
to automaticly create an output filename and some shared initialization
stubs (notably "int filename_resolved = 0;").

Oh well, it just means that all our programs will have to specify `-ltrace'
in thier respective makefiles.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]