Re: -Bgroup?

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

 



On 30 Jul 2007 14:37:42 -0700, Ian Lance Taylor <iant@xxxxxxxxxx> wrote:
> Henry <dimensiondude.oss@xxxxxxxxx> writes:
>
> > I am trying to use -Bgroup, but it doesn't seem to be working. For
> > example, I have libA and libB and they both have function theFunc().
> > What is happening is that a function in either library will theFunc()
> > > From whichever library was loaded first. The behavior I would like
> > > is
> > for if a function in libA calls theFunc(), it calls libA's theFunc(),
> > and if a function in libB calls theFunc(), it calls libB's theFunc().
> > As I understand it, -Bgroup is supposed to do this, but it doesn't
> > seem to do anything. Does it not work with C++?
>
> I don't know what -Bgroup is.  Also, you didn't mention what type of
> system you are using.
>
> Are libA and libB shared libraries?  If so, you can get the behaviour
> you want by controlling the visibility of theFunc.  Or you can use
> -Bstatic when you create libA.so and libB.so.
>
> If libA and libB are static libraries, then there is no way to make
> this work, at least not on a GNU/Linux or other Unix system.
>
> Ian
>

The Solaris linker has a -Bgroup option.
See http://docs.sun.com/app/docs/doc/816-5165/6mbb0m9jt?a=view

The option is used to bind a group of dynamic libraries together,
to avoid interposition.

-- 
Lawrence Crowl

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux