Comment 4 for bug 1782083

Revision history for this message
rew (r-e-wolff) wrote :

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....)