diff options
Diffstat (limited to 'lib/Object/COFFObjectFile.cpp')
-rw-r--r-- | lib/Object/COFFObjectFile.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/Object/COFFObjectFile.cpp b/lib/Object/COFFObjectFile.cpp index bf27878..d55aba5 100644 --- a/lib/Object/COFFObjectFile.cpp +++ b/lib/Object/COFFObjectFile.cpp @@ -143,7 +143,7 @@ error_code COFFObjectFile::getSymbolType(DataRefImpl Symb, Result = SymbolRef::ST_Other; if (symb->StorageClass == COFF::IMAGE_SYM_CLASS_EXTERNAL && symb->SectionNumber == COFF::IMAGE_SYM_UNDEFINED) { - Result = SymbolRef::ST_External; + Result = SymbolRef::ST_Unknown; } else { if (symb->getComplexType() == COFF::IMAGE_SYM_DTYPE_FUNCTION) { Result = SymbolRef::ST_Function; @@ -164,7 +164,11 @@ error_code COFFObjectFile::getSymbolFlags(DataRefImpl Symb, const coff_symbol *symb = toSymb(Symb); Result = SymbolRef::SF_None; - // TODO: Set SF_FormatSpecific. + // TODO: Correctly set SF_FormatSpecific, SF_ThreadLocal, SF_Common + + if (symb->StorageClass == COFF::IMAGE_SYM_CLASS_EXTERNAL && + symb->SectionNumber == COFF::IMAGE_SYM_UNDEFINED) + Result |= SymbolRef::SF_Undefined; // TODO: This are certainly too restrictive. if (symb->StorageClass == COFF::IMAGE_SYM_CLASS_EXTERNAL) |