bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/16715] -Bsymbolic breaks function pointer comparison under ARM


From: thomas at kdab dot com
Subject: [Bug ld/16715] -Bsymbolic breaks function pointer comparison under ARM
Date: Thu, 20 Mar 2014 10:53:46 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=16715

--- Comment #4 from Thomas McGuire <thomas at kdab dot com> ---
Note that on x86-64, this works, but is *not* solved like the hacky method that
Ian Lance Taylor describes in his blog.

Instead of using an undefined symbol with an actual value in main, x86-64 will
create a normal undefined symbol with a 0 value:
    12: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND testFunction

This works well: The relocations in libshared.so is a relative relocation that
resolves to the actual address of testFunction (not the PLT stub), and the
relocation in main is a R_X86_64_GLOB_DAT relocation that resolves to the
address of testFunction in libshared.so, and all just works.

This is less hacky, and I think also the proposed patch from the mailing list
solves the problem this way.

-- 
You are receiving this mail because:
You are on the CC list for the bug.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]