From 39e2bbc0d4f9d535bbb760c80608c2bc2fb5cced Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Sat, 31 Dec 2016 20:28:50 +0100 Subject: [PATCH] tool/abi_symbols: normalize symbol order --- tool/abi_symbols | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tool/abi_symbols b/tool/abi_symbols index 5d80ee596..99efd6d0a 100755 --- a/tool/abi_symbols +++ b/tool/abi_symbols @@ -10,8 +10,11 @@ # type, and size # +# normalize sort order across platforms +set env(LC_COLLATE) C + # obtain symbol information via 'nm' -set symbols [exec nm --format posix --dynamic $argv] +set symbols [exec nm --format posix --dynamic $argv | sort] # obtain demangled input via c++filt set demangled [exec c++filt << $symbols] @@ -29,7 +32,7 @@ foreach line [split $symbols "\n"] { regexp {^(\w+) U\s*$} $line dummy name # match defined symbol, which does not always feature a size value - regexp {^(\w+) (\w) \w+ ?(\w*)$} $line dummy name type size_hex + regexp {^([\w.]+) (\w) \w+ ?(\w*)$} $line dummy name type size_hex # decimal symbol size set size_dec [expr 0x0$size_hex]