9/9 Does OSX gcc still not support weak symbol definitions? ie, I
can't redefine malloc or new? (In this case actually I'm defining
something as weak, either with #pragma weak or
__attribute__((weak)) but OSX doesn't seem to support either!)
-jrleek
\- hello, have you tried __attribute__((weak_import)). what gcc
version. i dont have access to my gcc 4/10.4 machine right now.
i dont think this will work on gcc 2.9x either. who are you?
\_ probably your other personality?
\_ I'm trying weak_import right now. So far it seems to be
working, but I'll update when the build finishes and I can
test it. (Yes, it takes that long.) The only problem with
weak_import is that now I'm going to have to throw in an
#ifdef DARWIN or something. -jrleek
\- there are a fair number of hacks to gcc/darwin, so
get used it it. i am supporting a bunch of mathematical
codes and recently added osX and now with tiger/10.4/gcc4/
xcode2 and osX-old, there's lots of #ifdefing to be done.
there is some adequate documentation on various
http://developer.apple.com WEEB sites. there is also a code
snippet i can send you that give you some info on what
options are supported. ok tnx.
\_ Hmm.. weak_import didn't work for me, I still get
"ld: multiple definitions of symbol
_Hello_World__rmicast" I hear another alternitive is
upgrading to 10.4 and gcc4. That's supposed to
support full weak linking through gcc. Another option
is to call ld straight, not through gcc. :(
Yes, please send me that code snippit. Right now I'm
using OSX v10.3.9 and gcc3.3, but I guess I can
upgrade. -jrleek
\- you may not be specifying correct linker options
i have to go to dolores park now,
\- Leek Weak Advisory: see ~psb/MOTD/weaktest.{c,sh} |