[ARM64] When compiling for ELF in PIC mode, local symbols shouldn't go through the GOT
authorTilmann Scheller <t.scheller@samsung.com>
Fri, 25 Apr 2014 13:43:18 +0000 (13:43 +0000)
committerTilmann Scheller <t.scheller@samsung.com>
Fri, 25 Apr 2014 13:43:18 +0000 (13:43 +0000)
commite1cd93134fc2629b4be907c75bb5c7b4dd9b4657
tree14109c2580f8d18523d7d13e99eea04844caaa98
parent0c4797c31a29964acdbdb70694b91c4c647a5fa2
[ARM64] When compiling for ELF in PIC mode, local symbols shouldn't go through the GOT

There's no need for local symbols to go through the GOT, in fact it seems GNU ld is not even emitting GOT entries for local symbols and will error out when trying to resolve a GOT relocation for a local symbol.

This bug triggers when bootstrapping clang on AArch64 Linux with -fPIC and the ARM64 backend. The AArch64 backend is not affected.

With this commit it's now possible to bootstrap clang on AArch64 Linux with the ARM64 backend (-fPIC, -O3).

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