[lld] [lld][ELF] Allow explicit address expressions on .tbss output sections (PR #196447)
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 14 12:47:21 PDT 2026
================
@@ -0,0 +1,49 @@
+# REQUIRES: x86
+## Test that an explicit address expression on a .tbss section is respected,
+## and that TLS offsets and PT_TLS are generated correctly when one is specified.
+
+# RUN: rm -rf %t && split-file %s %t && cd %t
+# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux a.s -o a.o
+
+# RUN: ld.lld -T explicit.t a.o -o explicit
+# RUN: llvm-readelf -S explicit | FileCheck %s --check-prefix=EXPLICIT
+# RUN: llvm-readelf -l explicit | FileCheck %s --check-prefix=PHDR
+# RUN: llvm-objdump --no-print-imm-hex -d --no-show-raw-insn explicit | FileCheck %s --check-prefix=DIS
----------------
MaskRay wrote:
In this case the default print-imm-hex makes `movl %fs:-1048580, %eax` more readable.
https://github.com/llvm/llvm-project/pull/196447
More information about the llvm-commits
mailing list