------- Comment #8 from rsandifo at gcc dot gnu dot org 2007-09-06 18:25 ------- Created an attachment (id=14164) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14164&action=view) The patch that I think fixed this on mainline
This is a compiler bug rather than a linker bug. The compiler must only apply %lo to local GOT entries, not global ones. I'm pretty certain this is the bug I fixed on mainline with: http://gcc.gnu.org/ml/gcc-patches/2006-10/msg01451.html (The problem being that weakrefs are an odd case: they're weak, but !TREE_PUBLIC.) The patch applies cleanly to 4.2, and I've attached it here for convenience. Aaron, could you confirm it fixes the bug you're seeing? (Also, please could you close the binutils bug? The assembly code is, as you suspected, invalid.) -- rsandifo at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|unassigned at gcc dot gnu |rsandifo at gcc dot gnu dot |dot org |org Status|UNCONFIRMED |ASSIGNED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33169