[PATCH] D39540: [llvm-nm] Print 'I' for import table data in COFF

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 3 00:18:50 PDT 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rL317300: [llvm-nm] Print 'I' for import table data in COFF (authored by mstorsjo).

Changed prior to commit:
  https://reviews.llvm.org/D39540?vs=121264&id=121434#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D39540

Files:
  llvm/trunk/test/tools/llvm-nm/X86/importlibrary.test
  llvm/trunk/tools/llvm-nm/llvm-nm.cpp


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()) {
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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39540.121434.patch
Type: text/x-patch
Size: 1070 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171103/bc00694b/attachment.bin>


More information about the llvm-commits mailing list