Skip to content
Commit ca30902f authored by Michael Trent's avatar Michael Trent
Browse files

Do not look up symbol names when n_strx == 0

Summary:
Historical tools for working with mach-o binaries verify the nlist field
n_strx has a non-zero value before using that value to retrieve symbol names.
Under some cirumstances, llvm-nm will attempt to display the symbol name at 
position 0, even though symbol names at that position are not well defined. 
This change addresses this problem by returning an empty string when n_strx
is zero.

rdar://problem/35750548

Reviewers: enderby, davide

Reviewed By: enderby, davide

Subscribers: davide, llvm-commits, JDevlieghere

Differential Revision: https://reviews.llvm.org/D41657

llvm-svn: 321773
parent bba41066
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment