diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5faa9b3ac..ad23caa50 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -264,7 +264,7 @@ jobs: ../build/c3c compile-run examples/load_world.c3 ../build/c3c compile-run examples/process.c3 ../build/c3c compile-run examples/ls.c3 - ../build/c3c compile-run --system-linker=no linux_stack.c3 + ../build/c3c compile-run --reloc=none --system-linker=no linux_stack.c3 - name: Compile run unit tests run: | diff --git a/lib/std/os/linux/linux.c3 b/lib/std/os/linux/linux.c3 index 4c7eaee3d..353b92d8d 100644 --- a/lib/std/os/linux/linux.c3 +++ b/lib/std/os/linux/linux.c3 @@ -144,7 +144,7 @@ fn Backtrace! backtrace_load_element(void* addr, Allocator* allocator = mem::hea void* obj_address = addr - (uptr)info.dli_fbase + (uptr)elf_module_image_base(info.dli_fname.str_view())!; ZString obj_path = info.dli_fname; ZString sname = info.dli_sname ? info.dli_sname : (ZString)"???"; - String s = process::execute_stdout_to_buffer(buf, { "addr2line", "-p", "-C", "-f", "-e", obj_path.str_view(), string::tformat("0x%x", obj_address) })!; + String s = process::execute_stdout_to_buffer(buf, { "addr2line", "-p", "-i", "-C", "-f", "-e", obj_path.str_view(), string::tformat("0x%x", obj_address) })!; String[] parts = s.tsplit(" at "); if (parts.len != 2) { @@ -194,7 +194,6 @@ fn BacktraceList! backtrace_load(Allocator* allocator) for (usz i = 0; i < size; i++) { Backtrace trace = backtrace_load_element(bt_buffer[i], allocator)!; - io::printn(trace); list.append(trace); } };