[lld] r190628 - Do not prepend "_" to external symbols if non-i386.

Rui Ueyama ruiu at google.com
Thu Sep 12 12:52:59 PDT 2013


Author: ruiu
Date: Thu Sep 12 14:52:59 2013
New Revision: 190628

URL: http://llvm.org/viewvc/llvm-project?rev=190628&view=rev
Log:
Do not prepend "_" to external symbols if non-i386.

Modified:
    lld/trunk/include/lld/ReaderWriter/PECOFFLinkingContext.h

Modified: lld/trunk/include/lld/ReaderWriter/PECOFFLinkingContext.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/ReaderWriter/PECOFFLinkingContext.h?rev=190628&r1=190627&r2=190628&view=diff
==============================================================================
--- lld/trunk/include/lld/ReaderWriter/PECOFFLinkingContext.h (original)
+++ lld/trunk/include/lld/ReaderWriter/PECOFFLinkingContext.h Thu Sep 12 14:52:59 2013
@@ -77,8 +77,8 @@ public:
   /// adds "_" at the beginning of the string. On other architectures, the
   /// return value is the same as the argument.
   StringRef decorateSymbol(StringRef name) const {
-    // Because we don't support architectures other than 32-bit x86, we'll
-    // prepend an underscore unconditionally.
+    if (_machineType != llvm::COFF::IMAGE_FILE_MACHINE_I386)
+      return name;
     std::string str = "_";
     str.append(name);
     return allocateString(str);





More information about the llvm-commits mailing list