https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114641
--- Comment #4 from Rich Felker <bugdal at aerifal dot cx> --- It's a C conformance bug that's been present ever since the version of the FDPIC support I submitted for merge, so I think it's appropriate for backport to any branch that's still open and fixing bugs of this type. The code has not been modified since initial merge afaik, so the patch should apply cleanly to any version. I can't speak to whether this patch is the best way to fix it. The condition I'm trying to convey is "non-hidden external symbol". Probably the comment should be updated too, since "weak ref" and "non-hidden external symbol" are distinct conditions that both require going thru the GOT for their own reasons. Weak-ref because it could evaluate to null (which can't be represented as an offset from PC) and non-hidden-external because we need the canonical address for function pointer equality to hold.