Re: -Bsymbolic for exactly one symbol.

jfc@mit.edu (John F Carr)
8 Aug 2001 13:35:21 -0400

          From comp.compilers

Related articles
-Bsymbolic for exactly one symbol. vugluskr@unicorn.math.spbu.ru (2001-08-08)
Re: -Bsymbolic for exactly one symbol. jfc@mit.edu (2001-08-08)
Re: -Bsymbolic for exactly one symbol. ian@airs.com (Ian Lance Taylor) (2001-08-15)
Re: -Bsymbolic for exactly one symbol. shankarunni@earthlink.net (Shankar Unni) (2001-08-15)
| List of all articles for this month |

From: jfc@mit.edu (John F Carr)
Newsgroups: comp.compilers
Date: 8 Aug 2001 13:35:21 -0400
Organization: Massachvsetts Institvte of Technology
References: 01-08-051
Keywords: linker
Posted-Date: 08 Aug 2001 13:35:21 EDT

Roman Shaposhnick <vugluskr@unicorn.math.spbu.ru> wrote:


>Of course the problem is related to the fact, that references to UNDEF symbols
>in shared objects are not bound at a link phase, but instead they are being
>resolved by a dynamic linker. One option is to use -Bsymbolic when linking
>shared.so, but it will *resolve* all references to a local symbols from
>that shared.so, which is not desirable, since it won't let me override them
>later on.
>
>So my question is: how can I force linker to resolve just one reference
>to the particular symbol ( A::A() from the shared2.cc in my example ).


Many linkers offer control over resolution of individual symbols.
I recall some SVR4 linkers accepting -Bsymbolic:<filename>, where
the file contains a list of symbols to be bound within the library.
AIX has always allowed you to specify which symbols are internal and
external, using the -bE: directive. Sun has yet another type of
control file, and it changed around Solaris 2.5 or 2.6.


--
        John Carr (jfc@mit.edu)


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.