[Openmp-commits] [compiler-rt] [mlir] [lldb] [lld] [llvm] [openmp] [clang-tools-extra] [libcxx] [libclc] [clang] [libc] Make llvm-strip not eat the .gnu_debuglink section (PR #78919)

Felix Kellenbenz via Openmp-commits openmp-commits at lists.llvm.org
Mon Jan 22 01:19:29 PST 2024


felixkellenbenz wrote:

Hey thanks for the review, 

I will add a test case in a moment.

That's true, my change only impacts `--strip-all`. I tested `llvm-strip` with the `--strip-debug` flag and this didn't  remove the `.gnu_debuglink` section. This is also seen when using `GNU strip`.

Here are the commands I used when testing the `--strip-debug` flag:
```
gcc -g -xc /dev/null -ffreestanding -shared -o a.out
llvm-objcopy --only-keep-debug a.out a.out.dbg
llvm-objcopy --add-gnu-debuglink=a.out.dbg a.out
llvm-strip --strip-debug -o a.out.stripped a.out
readelf -wk a.out
```

https://github.com/llvm/llvm-project/pull/78919


More information about the Openmp-commits mailing list