Skip to content

Commit b655027

Browse files
committed
Stable-symbol-names test: compare only global symbols
With MinGW and specific flags symbol may end up in multiple sections in some cases like: 0000000000000000 p .pdata$_ZN20stable_symbol_names113mono_function17hd4880e88dec8766dE 0000000000000000 t .text$_ZN20stable_symbol_names113mono_function17hd4880e88dec8766dE 0000000000000000 r .xdata$_ZN20stable_symbol_names113mono_function17hd4880e88dec8766dE 0000000000000000 T _ZN20stable_symbol_names113mono_function17hd4880e88dec8766dE This will cause an error when comparing that output directly with other library that only imports the symbol since it will appear only once. To avoid the issue pass "-g" to nm so only the global symbol (the one with "T" letter) will be listed.
1 parent 7c97ddf commit b655027

File tree

1 file changed

+1
-1
lines changed
  • src/test/run-make-fulldeps/stable-symbol-names

1 file changed

+1
-1
lines changed

src/test/run-make-fulldeps/stable-symbol-names/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# 4. sort those symbol names for deterministic comparison
1010
# 5. write the result into a file
1111

12-
dump-symbols = nm "$(TMPDIR)/lib$(1).rlib" \
12+
dump-symbols = nm -g "$(TMPDIR)/lib$(1).rlib" \
1313
| grep -E "$(2)" \
1414
| sed -E "s/.*(_ZN.*E|_R[a-zA-Z0-9_]*).*/\1/" \
1515
| sort \

0 commit comments

Comments
 (0)