: nm-print-symbol ( sections symbol -- ) [ sym>> st_value>> "%016d " printf ] [ sym>> st_shndx>> { { SHN_UNDEF [ drop "undefined" ] } { SHN_ABS [ drop "absolute" ] } [ swap nth name>> ] } case "%-16s " printf ] [ name>> "%s\n" printf ] tri ; : nm ( path -- ) [ address>> sections [ [ name>> ".symtab" = ] find nip symbols [ name>> empty? not ] filter ] keep [ swap nm-print-symbol ] curry each ] with-mapped-file ;