[PATCH] D26937: llvm-nm: Print correct symbol types for init and fini sections

Meador Inge via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 23 12:27:18 PST 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL287803: llvm-nm: Print correct symbol types for init and fini sections (authored by meadori).

Changed prior to commit:
  https://reviews.llvm.org/D26937?vs=78782&id=79137#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D26937

Files:
  llvm/trunk/test/tools/llvm-nm/X86/Inputs/init-fini.out.elf-x86_64
  llvm/trunk/test/tools/llvm-nm/X86/init-fini.test
  llvm/trunk/tools/llvm-nm/llvm-nm.cpp


Index: llvm/trunk/test/tools/llvm-nm/X86/init-fini.test
===================================================================
--- llvm/trunk/test/tools/llvm-nm/X86/init-fini.test
+++ llvm/trunk/test/tools/llvm-nm/X86/init-fini.test
@@ -0,0 +1,8 @@
+# RUN: llvm-nm -B -S %p/Inputs/init-fini.out.elf-x86_64 | FileCheck --match-full-lines %s
+
+CHECK: 00000000006000c2 0000000000000000 T __bss_start
+CHECK: 00000000006000c2 0000000000000000 t __init_array_end
+CHECK: 00000000006000ba 0000000000000000 t __init_array_start
+CHECK: 00000000006000c2 0000000000000000 T _edata
+CHECK: 00000000006000c8 0000000000000000 T _end
+CHECK: 00000000004000b0 0000000000000000 T _start
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
@@ -778,6 +778,9 @@
       break;
     case ELF::SHT_NOBITS:
       return 'b';
+    case ELF::SHT_INIT_ARRAY:
+    case ELF::SHT_FINI_ARRAY:
+      return 't';
     }
   }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D26937.79137.patch
Type: text/x-patch
Size: 1039 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161123/e9ac0fcf/attachment.bin>


More information about the llvm-commits mailing list