[PATCH] [AArch64] Handle weak references to variables in small model when using the static relocation model

Keith Walker kwalker at arm.com
Fri Aug 29 06:42:30 PDT 2014

This patch addresses the special case when loading the address of a variable
that has a weak reference when in small model and we are using the static
relocation model.   This is a corner case where the code might be executing
too high in memory to be able to generate a zero value if we use the usual
ADRP + ADDX sequence when the weak reference is not satisfied.


There is existing code that already handles weak references in small model
by placing the address in the GOT, however this is not suitable when the
relocation model is static and we have no GOT.   For the static relocation
model case we instead place the address into a constant pool and load it
from there.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140829/0a56e3b7/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: aarch64-weakref.patch
Type: application/octet-stream
Size: 8779 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140829/0a56e3b7/attachment.obj>

More information about the llvm-commits mailing list