Public bug reported:

GCC for armhf emits incorrect instructions for calling to functions that
are written and compiled as ARM code from Thumb compiled code.  Objdump
of the executables reveals GCC is calling to the ARM compiled functions
with a normal "bl" instruction when it should be a "blx" instruction.
The symptoms experienced with this compiler bug are mysterious segfaults
and gdb complaining of a corrupted stack when trying to debug.  For
reproducing, compile the code with the following flags:

ARM code:  gcc -O3 -marm -mthumb-interwork
Thumb code: gcc -O3 -mthumb-interwork

Testing with GCC 4.5.2 on an armel install with the same compiler flags
generates correct code, emitting "blx" instructions in the proper
places.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: gcc 4:4.6.3-1ubuntu5
Uname: Linux 3.0.13 armv7l
ApportVersion: 2.0.1-0ubuntu8
Architecture: armhf
Date: Fri Jul  6 14:45:15 2012
ProcEnviron:
 TERM=xterm
 SHELL=/bin/bash
 LANG=C
SourcePackage: gcc-defaults
UpgradeStatus: No upgrade log present (probably fresh install)

** Affects: gcc-defaults (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: apport-bug armhf precise

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

Title:
  GCC for armhf does not emit proper arm/thumb interworking code

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gcc-defaults/+bug/1021774/+subscriptions

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

Reply via email to