Subject: Re: weird link required, please help?
To: der Mouse <mouse@Rodents.Montreal.QC.CA>
From: Kevin P. Neal <email@example.com>
Date: 05/02/1997 18:47:27
At 10:55 PM 5/1/97 -0400, der Mouse wrote:
>I have a program that will take a .o file and frob the N_EXT bits in
>the symbol table, thereby (for example) rendering certain symbols,
>formerly globally visible, hidden. Then you can
>% ld -x -r foo1.o libfoo.a -o foo1a.o
>% localsym -c foo1a.o _visible_symbol_1 _visible_symbol_2 ...
>% ld -x -r foo1a.o foo1b.o
>Then foo1b.o has only the listed symbols visible; everything else was
>made local by localsym, then stripped by ld -x -r.
Hey, nifty. How would something like this interact with debuggers?
I've been told that some debuggers blow chunks when they come across static
functions in a program (where multiple static functions with the same name
exist in a program). Would this do the same thing, except on a library
scale (instead of source file scale)?
>Of course, this may not solve your problem; it may not be possible for
>both versions of the library to coexist in the same process because
>they clash over some shared resource, such as the current directory, or
>the open file table. I assume you've considered such dangers.
How does namespace normally stay sane? I mean, X has it's Xfunctions,
Xtfunctions, Xmfunctions, etc. What do other libraries do to avoid
clashing over names?
How would a library export an interface, and then keep it's internals hidden
from the rest of the program? (Don't even think of saying "C++")
XCOMM Kevin P. Neal, Junior, Comp. Sci. - House of Retrocomputing
XCOMM mailto:firstname.lastname@example.org - http://www.pobox.com/~kpn/
XCOMM email@example.com Spoken by Keir Finlow-Bates:
XCOMM "Good grief, I've just noticed I've typed in a rant. Sorry chaps!"