This is for Linux. You must first prepare and sort your nm output
nm -g libxxx0.1.a | awk '{print $3}' | sort -u >nm_0.1.txt
nm -g libxxx0.2.a | awk '{print $3}' | sort -u >nm_0.2.txt
If you are interested in all symbols, leave out -g
and use cut
instead of awk
nm libxxx0.1.a | cut -c20- | sort -u >nm_0.1.txt
nm libxxx0.2.a | cut -c20- | sort -u >nm_0.2.txt
Then you can show the differences with diff
diff -U0 nm_0.1.txt nm_0.2.txt
or comm
comm -3 nm_0.1.txt nm_0.2.txt