From 11ba26db13698a4567730be13a154c5690ef5e75 Mon Sep 17 00:00:00 2001 From: "Michael J. Spencer" Date: Wed, 16 Nov 2011 23:36:12 +0000 Subject: [PATCH] Object/COFF: Support common symbols. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144861 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Object/COFFObjectFile.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/Object/COFFObjectFile.cpp b/lib/Object/COFFObjectFile.cpp index 2abfb446f39..c6ce56221a5 100644 --- a/lib/Object/COFFObjectFile.cpp +++ b/lib/Object/COFFObjectFile.cpp @@ -226,7 +226,9 @@ error_code COFFObjectFile::getSymbolNMTypeChar(DataRefImpl Symb, if (symb->StorageClass == COFF::IMAGE_SYM_CLASS_WEAK_EXTERNAL) { Result = 'w'; return object_error::success; // Don't do ::toupper. - } else + } else if (symb->Value != 0) // Check for common symbols. + ret = 'c'; + else ret = 'u'; break; case COFF::IMAGE_SYM_ABSOLUTE: -- 2.34.1