File tree 2 files changed +6
-12
lines changed
2 files changed +6
-12
lines changed Original file line number Diff line number Diff line change 9
9
# RUN: link_fdata %s %t %t.pa3 PREAGG3
10
10
# RUN: link_fdata %s %t %t.pat PREAGGT1
11
11
# RUN: link_fdata %s %t %t.pat2 PREAGGT2
12
- # RUN: link_fdata %s %t %t.patplt PREAGGPLT --nmtool llvm-nm
12
+ # RUN: link_fdata %s %t %t.patplt PREAGGPLT --synthetic
13
13
14
14
## Check normal case: fallthrough is not LP or secondary entry.
15
15
# RUN: llvm-strip --strip-unneeded %t -o %t.strip
Original file line number Diff line number Diff line change 21
21
parser .add_argument ("--nmtool" , default = "nm" , help = "Path to nm tool" )
22
22
parser .add_argument ("--no-lbr" , action = "store_true" )
23
23
parser .add_argument ("--no-redefine" , action = "store_true" )
24
+ parser .add_argument ("--synthetic" , action = "store_true" )
24
25
25
26
args = parser .parse_args ()
26
27
85
86
exit ("ERROR: unexpected input:\n %s" % line )
86
87
87
88
# Read nm output: <symbol value> <symbol type> <symbol name>
88
- is_llvm_nm = os .path .basename (args .nmtool ) == "llvm-nm"
89
- nm_output = subprocess .run (
90
- [
91
- args .nmtool ,
92
- "--defined-only" ,
93
- "--special-syms" if is_llvm_nm else "--synthetic" ,
94
- args .objfile ,
95
- ],
96
- text = True ,
97
- capture_output = True ,
98
- ).stdout
89
+ nm_args = [args .nmtool , "--defined-only" , args .objfile ]
90
+ if args .synthetic :
91
+ nm_args += ["--synthetic" ]
92
+ nm_output = subprocess .run (nm_args , text = True , capture_output = True ).stdout
99
93
# Populate symbol map
100
94
symbols = {}
101
95
for symline in nm_output .splitlines ():
You can’t perform that action at this time.
0 commit comments