This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [PATCH] Limited export of dynamic syms (elf32)


"H . J . Lu" wrote:
> 
> On Fri, Aug 17, 2001 at 08:26:57AM +0200, Eirik Byrkjeflot Anonsen wrote:
> > I implemented it because I could not figure out how to avoid
> > exporting all symbols from an executable with binutils
> > 2.9.5.0.37 (debian stable).  I can maintain that version
> > internally in Opera until we all got working symbol versioning
> > (with executables) on all platforms.
> >
> > Incidentally, I'm not sure that it is obvious that symbol versioning
> > actually can be used to "unexport" symbols.  I overlooked it completely
> 
> I think you may use symbol versioning to "unexport" symbols on all ELF
> targets even if ld.so on those targets don't support symbol versioning.
> But I never tried it.
> 
> H.J.


I've tested it on a shared library with ld 2.9.5, and the symbols bound
to "local:" seems to disappear from the dynamic symbol table.  I'll
have to do some more testing to be absolutely sure, but it looks
promising.

Maybe it would be a good idea to add
@cindex limiting export of dynamic symbols
or something like that to the @node VERSION in ld.texinfo.
That might make it possible to discover that the ability is there.

Or maybe there should be a "How to do special tasks" section that could
contain descriptions of these things.  I don't know what other more or
less obscure tasks would qualify for this section, though.

eirik


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]