summaryrefslogtreecommitdiffstats
path: root/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp
diff options
context:
space:
mode:
authorNick Kledzik <kledzik@apple.com>2014-06-27 18:25:01 +0000
committerNick Kledzik <kledzik@apple.com>2014-06-27 18:25:01 +0000
commit3f69076278421d731a80804a743f89c72384b379 (patch)
treec169e62efc983af55f662101612ae1241d2ff07f /lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp
parentdad0a645a7b392900c9fb34f11815060d03a2233 (diff)
downloadbcm5719-llvm-3f69076278421d731a80804a743f89c72384b379.tar.gz
bcm5719-llvm-3f69076278421d731a80804a743f89c72384b379.zip
[mach-o] refactor x86_64 relocation handling.
This is first step in reworking how mach-o relocations are processed. The existing KindHandler is going to become a delgate/helper object for processing architecture specific references. The KindHandler knows how to convert mach-o relocations into References and back, as well, as fixing up the content the relocation is on. One of the messy things about mach-o relocations is that they sometime come in pairs, but the pairs still convert to one lld::Reference. So, the conversion has to detect pairs (arch specific) and change the stride. llvm-svn: 211921
Diffstat (limited to 'lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp')
-rw-r--r--lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp b/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp
index 1dca1681b32..a328ec46a2d 100644
--- a/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp
+++ b/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp
@@ -339,7 +339,7 @@ readBinary(std::unique_ptr<MemoryBuffer> &mb,
sout.value = sin->n_value;
if (sout.type == N_UNDF)
f->undefinedSymbols.push_back(sout);
- else if (sout.scope == (SymbolScope)N_EXT)
+ else if (sin->n_type & N_EXT)
f->globalSymbols.push_back(sout);
else
f->localSymbols.push_back(sout);
OpenPOWER on IntegriCloud