[PATCH] D23278: [compiler-rt] Allow nm program to be over-ridden for global symbol detection

Francis Ricci via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 9 17:53:31 PDT 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL278187: [compiler-rt] Allow nm program to be over-ridden for global symbol detection (authored by fjricci).

Changed prior to commit:
  https://reviews.llvm.org/D23278?vs=67210&id=67442#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D23278

Files:
  compiler-rt/trunk/lib/sanitizer_common/scripts/gen_dynamic_list.py

Index: compiler-rt/trunk/lib/sanitizer_common/scripts/gen_dynamic_list.py
===================================================================
--- compiler-rt/trunk/lib/sanitizer_common/scripts/gen_dynamic_list.py
+++ compiler-rt/trunk/lib/sanitizer_common/scripts/gen_dynamic_list.py
@@ -42,11 +42,12 @@
 
 def get_global_functions(library):
   functions = []
-  nm_proc = subprocess.Popen(['nm', library], stdout=subprocess.PIPE,
+  nm = os.environ.get('NM', 'nm')
+  nm_proc = subprocess.Popen([nm, library], stdout=subprocess.PIPE,
                              stderr=subprocess.PIPE)
   nm_out = nm_proc.communicate()[0].decode().split('\n')
   if nm_proc.returncode != 0:
-    raise subprocess.CalledProcessError(nm_proc.returncode, 'nm')
+    raise subprocess.CalledProcessError(nm_proc.returncode, nm)
   func_symbols = ['T', 'W']
   # On PowerPC, nm prints function descriptors from .data section.
   if os.uname()[4] in ["powerpc", "ppc64"]:


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D23278.67442.patch
Type: text/x-patch
Size: 952 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160810/c616ccc6/attachment.bin>


More information about the llvm-commits mailing list