http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55693



--- Comment #36 from Jack Howarth <howarth at nitro dot med.uc.edu> 2013-01-23 
21:27:41 UTC ---

The darwin linker developers comments on the testcase I uploaded were...



  The term "weak" is way overloaded.  The original bug was about "weak

definitions" which 

  is how C++ coalescing is done.  Your example uses "weak imports" which means

the 

  symbol can be missing at runtime (because the runtime version of the dylib is

different 

  than the build time).



 You(r) example also uses -dynamic_lookup which tells dyld  to look everywhere

for a 

  symbol (normally it only looks in one dylib at runtime).



Iain, reread Comment 26. He seems to be saying that having weak symbols in

object files is insufficient to override those in shared libraries. I guess the

offending object file would have to be made into a shared library for the weak

symbols to be honored as weak by the linker.

Reply via email to