# # Usage: nm -o files | awk -f # Prints the filename in the first column and the symbol in the second # for each symbol defined in the given object files. # { if (NF >= 2) { type = $(NF-1); name = $NF; file = $1; if ((type == "A") || \ (type == "A") || \ (type == "B") || \ (type == "D") || \ (type == "T")) { for (i = 1; i <= length($file); i++) { if (substr(file, i, 1) == ":") { file = substr(file, 1, i-1); break; } } printf("%-20s\t%s %s\n", file, type, name); } } }