Re: [AD] Weak symbols in *nix (was: [AD] Magic main in Windows)

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Mon, Aug 02, 2004, Evert Glebbeek wrote:

> In case you're wondering, the way this is currently done is through the 
> xfixicon.sh script. It outputs a .c file given a source image (say, .xpm) 
> that will re-define the weak allegro_icon to point to the (inlined) pixmap 
> data if weak symbols can be used, or point it there using a constructor 
> function if it cannot define a weak symbol but can use a constructor.
> 
> Would this be something that could cause a problem? If not, I can simply 
> change the current scheme to always use a constructor function and never 
> use a weak symbol.

   Nothing critical; it's just against the Debian policy to have
undefined weak symbols in libraries, for the reasons I mentioned (plus
it prevents some other things such as dlopen("liballegro.so")). In
general, having a library's headers add symbols to the executable is bad
style.

-- 
Sam.




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/