aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/tomo.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/tomo.c b/src/tomo.c
index d26ba73d..c319dda7 100644
--- a/src/tomo.c
+++ b/src/tomo.c
@@ -446,9 +446,9 @@ void build_library(Text_t lib_dir_name)
FILE *prog;
for (int64_t i = 0; i < tm_files.length; i++) {
Path_t f = *(Path_t*)(tm_files.data + i*tm_files.stride);
- prog = run_cmd("nm -Ug -fjust-symbols '", build_file(f, ".o"), "' "
- "| sed -n 's/_\\$\\(.*\\)/\\0 _$", CORD_to_const_char_star(env->libname),
- "$\\1/p' >>.build/symbol_renames.txt");
+ prog = run_cmd("nm -g '", build_file(f, ".o"), "' | awk '$2~/^[DT]$/{print $3 \" _$",
+ CORD_to_const_char_star(env->libname), "\" substr($3,2)}' "
+ ">>.build/symbol_renames.txt");
if (!prog) print_err("Could not find symbols!");
int status = pclose(prog);
if (!WIFEXITED(status) || WEXITSTATUS(status) != 0)