[PATCH] D34061: Fix weak symbols on arm and aarch64
Rafael Ávila de Espíndola via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 9 11:22:29 PDT 2017
rafael created this revision.
Herald added subscribers: kristof.beyls, javed.absar, emaste, rengolin, aemerson.
Given
.weak target
.global _start
_start:
b target
The intention is that the branch goes to the instruction after the branch, effectively turning it on a nop. The branch adds the runtime PC, but we were adding it statically too.
I noticed the oddity by inspection, but llvm-objdump seems to agree, since it now prints things like:
b #-4 <_start+0x4>
https://reviews.llvm.org/D34061
Files:
ELF/InputSection.cpp
test/ELF/aarch64-undefined-weak.s
test/ELF/arm-thumb-no-undefined-thunk.s
test/ELF/arm-thumb-undefined-weak.s
test/ELF/arm-undefined-weak.s
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D34061.102057.patch
Type: text/x-patch
Size: 5453 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170609/d36019b3/attachment.bin>
More information about the llvm-commits
mailing list