[lld] r246533 - COFF: Set "Data" bit for data symbols in the import descriptor.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 31 23:46:10 PDT 2015
Author: ruiu
Date: Tue Sep 1 01:46:10 2015
New Revision: 246533
URL: http://llvm.org/viewvc/llvm-project?rev=246533&view=rev
Log:
COFF: Set "Data" bit for data symbols in the import descriptor.
Modified:
lld/trunk/COFF/DriverUtils.cpp
lld/trunk/test/COFF/export.test
Modified: lld/trunk/COFF/DriverUtils.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/DriverUtils.cpp?rev=246533&r1=246532&r2=246533&view=diff
==============================================================================
--- lld/trunk/COFF/DriverUtils.cpp (original)
+++ lld/trunk/COFF/DriverUtils.cpp Tue Sep 1 01:46:10 2015
@@ -564,7 +564,6 @@ public:
if (Ordinal > 0)
Imp->OrdinalHint = Ordinal;
Imp->TypeInfo = (isData ? IMPORT_DATA : IMPORT_CODE);
- Imp->TypeInfo = IMPORT_CODE;
Imp->TypeInfo |= NameType << 2;
// Write symbol name and DLL name.
Modified: lld/trunk/test/COFF/export.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/COFF/export.test?rev=246533&r1=246532&r2=246533&view=diff
==============================================================================
--- lld/trunk/test/COFF/export.test (original)
+++ lld/trunk/test/COFF/export.test Tue Sep 1 01:46:10 2015
@@ -71,3 +71,12 @@ CHECK5-NEXT: 4 0x1010 exportfn3
CHECK6: duplicate /export option: exportfn2
CHECK6-NOT: duplicate /export option: exportfn1
+
+# RUN: llvm-nm -M %t.lib | FileCheck --check-prefix=SYMTAB %s
+
+SYMTAB: __imp_exportfn1 in 1.obj
+SYMTAB: exportfn1 in 1.obj
+SYMTAB: __imp_exportfn2 in 2.obj
+SYMTAB: exportfn2 in 2.obj
+SYMTAB: __imp_exportfn3 in 3.obj
+SYMTAB: exportfn3 in 3.obj
\ No newline at end of file
More information about the llvm-commits
mailing list