title: LLVM ARM64 assembly: Getting a symbol/label address?
body: <p>I am porting some 32-bit ARM code to 64-bit and am having trouble determining the 64-bit version of this instruction:</p>
  
  <pre><code>ldr  r1, =_fns
  </code></pre>
  
  <p>Where _fns is a symbol defined in some C source file elsewhere in the project.</p>
  
  <p>I've tried the below but both give errors:</p>
  
  <pre><code>adr  x1, _fns     &lt;== "error: unknown AArch64 fixup kind!"
  adrl  x1, _fns    &lt;== "error: unrecognized instruction mnemonic"
  </code></pre>
  
  <p>The assembler is LLVM in the iOS SDK (XCode 7.1).</p>
  
  <p>I've noticed that if _fns is locally defined (i.e. in the same .S file) then "adr x1,_fns" works fine. However that's not a fix as _fns has to be in C code (i.e. in a different translation unit).</p>
  
  <p>What is the right way to do this with LLVM ARM assembler?</p>