Try passing the function pointer through an opaque identity transform:

    asm("" : "=r"(p) : "0"(main));
    if ((uintptr_t)p & 1) /* do thumb case */

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/721531

Title:
  [armel] gcc computes wrong address for main() at build time

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to