[PATCH] ARM: Resolve thumb_bl fixup in same MCFragment.

Logan Chien tzuhsiang.chien at gmail.com
Mon Feb 3 07:30:41 PST 2014


Hi rengolin,

In Thumb1 mode, bl instruction might be selected for branches between
basic blocks in the function if the offset is greater than 2KB.
However, this might cause SEGV because the destination symbol
is not marked as thumb function and the execution mode will be reset
to ARM mode.

Since we are sure that these symbols are in the same data fragment, we
can simply resolve these local symbols, and don't emit any relocation
information for this bl instruction.

http://llvm-reviews.chandlerc.com/D2675

Files:
  lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp
  test/MC/ARM/thumb-far-jump.s
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D2675.1.patch
Type: text/x-patch
Size: 15874 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140203/f1bdf8d0/attachment.bin>


More information about the llvm-commits mailing list