Refactor some common code out of proc_name2sym() proc_addr2sym().