Skip to content
This repository has been archived by the owner on May 21, 2019. It is now read-only.

Commit

Permalink
Adjust gen_dynamic_list for PowerPC function descriptors
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@213577 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
vonosmas committed Jul 21, 2014
1 parent a13548a commit b2573db
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/sanitizer_common/scripts/gen_dynamic_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,13 @@ def get_global_functions(library):
nm_out = nm_proc.communicate()[0].decode().split('\n')
if nm_proc.returncode != 0:
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"]:
func_symbols += ['D']
for line in nm_out:
cols = line.split(' ')
if (len(cols) == 3 and cols[1] in ('T', 'W')) :
if len(cols) == 3 and cols[1] in func_symbols :
functions.append(cols[2])
return functions

Expand Down

0 comments on commit b2573db

Please sign in to comment.