ARM64: use GOT for weak symbols & PIC.
authorTim Northover <tnorthover@apple.com>
Wed, 2 Apr 2014 14:39:11 +0000 (14:39 +0000)
committerTim Northover <tnorthover@apple.com>
Wed, 2 Apr 2014 14:39:11 +0000 (14:39 +0000)
commit6584d946102f0e52e7365fa8d05922b6dee29e70
treecb279303dd18a510795326d8661ca4a05cdf5dc6
parent671c92d886c1559e1986141b6f7bb268a63c911e
ARM64: use GOT for weak symbols & PIC.

Weak symbols cannot use the small code model's usual ADRP sequences since the
instruction simply may not be able to encode a value of 0.

This redirects them to use the GOT, which hopefully linkers are able to cope
with even in the static relocation model.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205426 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM64/ARM64Subtarget.cpp
test/CodeGen/ARM64/basic-pic.ll [new file with mode: 0644]
test/CodeGen/ARM64/extern-weak.ll [new file with mode: 0644]