[llvm] [llvm-objcopy][COFF] Keep COMDAT section definition symbols when stripping (PR #228783)

Martin Storsjö via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 4 13:57:07 PDT 2026


https://github.com/mstorsjo approved this pull request.

LGTM, thanks!

This matches my analysis of the issue (that was shared with me elsewhere before opening the PR), and the code for the fix looks very straightforward and precise for fixing this issue.

The test also looks good - it exercises this specific case, making sure that the `.rdata$.refptr.foo` section symbol is kept, but also checks that the `.text` section symbol (which isn't a comdat section) still is removed as expected.

Do note that LLVM uses github "squash and merge" as PR merge strategy, which means that the default commit message is the PR description field (the first post), which would be slightly wrong here. I'll change the commit message to the one from the actual commit when merging. 

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


More information about the llvm-commits mailing list