Created attachment 8422 [details] fix ported from aarch64 If this code is in a shared library, linked with -Bsymbolic-functions ld.bfd on arm (32): #include <stdio.h> #include "dep.h" int interpos(void) { return 0; } intfunc intfuncs[] = { interpos }; intfunc getintfunc(void) { return intfuncs[0]; } void callinterpos(void) { printf("calling interpos directly says %d\n", interpos()); } and this code is in a linked executable: #include <stdio.h> #include "dep/dep.h" int interpos() { return 1; } int main(int argc, char** argv) { callinterpos(); printf("calling interpos via pointer says %d\n", getintfunc()()); } then running the executable prints calling interpos directly says 0 calling interpos via pointer says 1 when it should print 0 twice. Luckily for me, the isomorphic bug got fixed for aarch64 recently in https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=0941db698eba22727c9a944b5da5c76ae93cc664 and the same fix (attached) fixes the problem for ARM too.
Hi Michael, Thanks for reporting this problem. Fortunately it has already been fixed: 2015-07-25 Thomas Preud'homme <thomas.preudhomme@arm.com> * elf32-arm.c (elf32_arm_final_link_relocate): Use SYMBOLIC_BIND to check if a symbol should be bound symbolically. Cheers Nick