[llvm] [llvm-objcopy] Handle SHF_ALLOC relocation sections in relocatable files (PR #227204)
James Henderson via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 30 01:23:38 PDT 2026
================
@@ -0,0 +1,42 @@
+## In a relocatable file, an SHF_ALLOC relocation section (e.g. .klp.rela.* in
+## Linux livepatch modules) is a static relocation section: its symbol indexes
+## are updated and the symbols it references are kept.
+
+# RUN: yaml2obj %s -o %t
+# RUN: llvm-strip --strip-unneeded %t -o %t1
----------------
jh7370 wrote:
Just to clarify: you're using `--strip-unneeded` here to exercise the difference between dynamic and static relocation handling and you could equally use other options to demonstrate it?
https://github.com/llvm/llvm-project/pull/227204
More information about the llvm-commits
mailing list