bug-gnulib
[Top][All Lists]
Advanced

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

[Bug-gnulib] Re: Multiple definitions of symbol _xalloc_die


From: Bruno Haible
Subject: [Bug-gnulib] Re: Multiple definitions of symbol _xalloc_die
Date: Fri, 15 Oct 2004 20:08:25 +0200
User-agent: KMail/1.5

Simon Josefsson wrote:
> I guess I want the linker to resolve the xalloc_die
> symbol "internally" within libshishi.

Although it's possible to do so, I wouldn't recommend that because
  1) It doesn't work when you link statically,
  2) Reducing the visibility of a symbol in platform dependent (different on
     ELF, AIX, Woe32; I don't even know whether it's supported on MacOS X),
     and libtool doesn't support this functionality. So by using this
     feature you're bound to become a libtool pioneer :-)

> It would help me understand this better, if you could explain why the
> same doesn't apply to, say, xmalloc which is also in both libgss and
> libshishi (via gnulib)?  Why isn't the linker complaining that xmalloc
> is defined both in libgnulib and libshishi, when creating libgss?

No idea.(*) But sure, you have to use the -D trick for xmalloc as well since
you want to have semantically different copies in each library.

Bruno

(*) Maybe the linker has detected that both have identical object code and
refer to the same symbols. Such a heuristic would make sense for minimizing
the size of object code for C++ templates.





reply via email to

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