Index: llvm/trunk/test/tools/llvm-nm/X86/importlibrary.test =================================================================== --- llvm/trunk/test/tools/llvm-nm/X86/importlibrary.test +++ llvm/trunk/test/tools/llvm-nm/X86/importlibrary.test @@ -1,5 +1,7 @@ # RUN: llvm-nm -B %S/Inputs/example.lib | FileCheck --match-full-lines %s +CHECK: 00000000 I __IMPORT_DESCRIPTOR_example +CHECK: 00000000 I __NULL_IMPORT_DESCRIPTOR CHECK: 00000000 R __imp__constant CHECK: 00000000 R _constant CHECK: 00000000 D __imp__data Index: llvm/trunk/tools/llvm-nm/llvm-nm.cpp =================================================================== --- llvm/trunk/tools/llvm-nm/llvm-nm.cpp +++ llvm/trunk/tools/llvm-nm/llvm-nm.cpp @@ -946,6 +946,10 @@ section_iterator SecI = *SecIOrErr; const coff_section *Section = Obj.getCOFFSection(*SecI); Characteristics = Section->Characteristics; + StringRef SectionName; + Obj.getSectionName(Section, SectionName); + if (SectionName.startswith(".idata")) + return 'i'; } switch (Symb.getSectionNumber()) {