[mach-o] enhance arm64 reloc parser to support local pointer relocations
authorNick Kledzik <kledzik@apple.com>
Tue, 18 Nov 2014 00:30:22 +0000 (00:30 +0000)
committerNick Kledzik <kledzik@apple.com>
Tue, 18 Nov 2014 00:30:22 +0000 (00:30 +0000)
commitf6e5ace974b6949297e228ed2afd09b9ff628e6f
tree41cdcc69e2eba76ac4b22f70b9c79b85a266a8cc
parent68c42ecae05e1a28c90d600e1d61bf068713f270
[mach-o] enhance arm64 reloc parser to support local pointer relocations

The arm64 assembler almost always uses r_extern=1 relocations in which the
r_symbolnum field is the index of the symbol the relocation references.  But
sometimes it will set r_extern=0 in which case the linker needs to read the
content of the reloction to determine the target.

Add test case that the r_extern=0 relocation round trips.

llvm-svn: 222200
lld/lib/ReaderWriter/MachO/ArchHandler_arm64.cpp