[lld] [lld][ELF] Add --why-live flag (inspired by Mach-O) (PR #127112)
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Sat Feb 15 17:16:14 PST 2025
================
@@ -0,0 +1,132 @@
+# REQUIRES: x86
+
+# RUN: llvm-mc -n -filetype=obj -triple=x86_64 %s -o %t.o
+# RUN: echo -e ".globl test_shared\n .section .test_shared,\"ax\", at progbits\n test_shared: jmp test_shared" |\
+# RUN: llvm-mc -n -filetype=obj -triple=x86_64 -o %t.shared.o
+# RUN: ld.lld -shared %t.shared.o -o %t.so
+
+## Simple live section
+.globl _start
+.section ._start,"ax", at progbits
+_start:
+jmp test_simple
----------------
MaskRay wrote:
indent instructions but keep labels unintended
https://github.com/llvm/llvm-project/pull/127112
More information about the llvm-commits
mailing list