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



--- Comment #39 from Iain Sandoe <iains at gcc dot gnu.org> 2013-01-24 11:34:20 
UTC ---

(In reply to comment #38)

> Tested proposed patch from Comment 37 on x86_64-apple-darwin11 and

> x86_64-apple-darwin12 with Xcode 4.5.2 on both systems. No regressions are

> found 



> in darwin_objdir/x86_64-apple-darwin11.4.2/libitm build directory. Looks good

> to go.



FAOD, I was not (at this stage) proposing comment #37 as a "fix" - but rather

to demonstrate what seems to be inconsistent behavior in the linker.



The inconsistency is:

 (where there is a reference made in "other objects" to some symbol(s) present

in both the dylib and the object):



<other objects and libs> <dlib with non-weak symbols> <object with weak

symbols> 

  causes the references to be satisfied from the object, NOT the dylib.



(and also seems unexpected to me)



whereas:



<other objects and libs> <dylib with non-weak symbols> <static archive

containing one object with weak symbols> 



causes the symbols to be resolved from the dylib (which is what I would have

expected)



===



IFF that behavior is as expected and documented - then, fine - the patch is a

fix, but I think we need to establish what is expected behavior - or we will be

going around this loop again in 6 months, 1 year .. etc.

Reply via email to