[llvm-bugs] [Bug 38435] [ARM] `BL $ADDR` becomes `BLX $ADDR` after linking

via llvm-bugs llvm-bugs at lists.llvm.org
Sun Mar 22 22:20:32 PDT 2020


Fangrui Song <i at maskray.me> changed:

           What    |Removed                     |Added
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED
                 CC|                            |i at maskray.me

--- Comment #3 from Fangrui Song <i at maskray.me> ---
link.x requires a small change to work with lld:

   /DISCARD/ :
-    *(.ARM.exidx.*);
+    *(.ARM.exidx*);

lld can produce more empty sections than GNU ld. The synthetic section
.ARM.exidx needs to be discarded as well even if it has no composing

The original problem has been fixed by Peter's https://reviews.llvm.org/D73542
Different from GNU ld, lld will issue a warning:

% ld.lld @response.txt
ld.lld: warning: app0-bb017cc3d2efe9d5e6ed62661cfeec84.rs:(function main:
.text.main+0x2): branch and link relocation: R_ARM_THM_CALL to non STT_FUNC 
symbol: __nop interworking not performed; consider using directive '.type
__nop, %function' to give symbol type STT_FUNC if interworking between ARM a
nd Thumb is required

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200323/aa9f1cf3/attachment.html>

More information about the llvm-bugs mailing list