I decided to try to trace this down to the source line that compiles
differently between the two distributions causing the difference in
behavior.....

I failed.

The problem is with the linker. linking the executable on xenial from
the objects compiled on bionic creates a working binary and linking the
objects created on xenial with the linker on bionic results in a  non-
working binary.

Oh...... There is an old bug where the linker would forget to or in the
"this is thumb" flag when linking thumb code. (A jump in ARM is to a
target address, but as instructions are always at least 16 bit wide, the
bottom bit is in essence always zero. This is used to signal "this is
thumb code" when that bit is high. So when jumping to the function at
address 0x8000120, the actual target should resolve to 0x8000121 to
indicate it is arm-thumb code. My processor is thumb-only and will fault
on a jump that resolves to 0x8000120.)

I will check if this is the case and report back. 
(If this is in fact the bug, I reported this years ago. 2010-2014 era....)

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

Title:
  Compilation seems to succeed, but binary does not run correctly

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gcc-arm-none-eabi/+bug/1782083/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to