[lld] [lld][ELF] Improve the vulnerability in Orphan Sections initialization (PR #156354)
Peter Smith via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 2 05:32:44 PDT 2025
================
@@ -0,0 +1,30 @@
+# REQUIRES: x86
+# RUN: rm -rf %t && mkdir -p %t
+# RUN: split-file %s %t && cd %t
+
+# RUN: llvm-mc -filetype=obj -triple=x86_64 foo.s -o foo.o
+
+# RUN: ld.lld -r foo.o -T script.ld -o foo_mc.o
+
+# RUN: llvm-objcopy --rename-section .text=.com.text foo_mc.o foo_mc.o
----------------
smithp35 wrote:
You can merge do both -rename-section commands with a single instance of llvm-objcopy.
https://github.com/llvm/llvm-project/pull/156354
More information about the llvm-commits
mailing list