[lld] [lld][ELF] Allow explicit address expressions on .tbss output sections (PR #196447)
Peter Smith via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 3 09:50:19 PDT 2026
================
@@ -0,0 +1,30 @@
+# REQUIRES: x86
+## Test that an explicit address expression on a .tbss section is respected.
----------------
smithp35 wrote:
Could we also add an explicitly addressed .tdata section as well, would mean renaming the test.
```
MEMORY {
text_mem (rx) : ORIGIN = 0xFFFFFFFFFFF00000, LENGTH = 0x10000
tdata_mem (rw) : ORIGIN = 0x100000, LENGTH = 0x1000
tbss_mem (rw) : ORIGIN = 0x200000, LENGTH = 0x1000
}
SECTIONS {
.text : { *(.text) } >text_mem AT>text_mem
.tdata 0x100000 : { *(.tdata) } >tdata_mem AT>tdata_mem
.tbss 0x200000 (NOLOAD) : { *(.tbss) } >tbss_mem AT>tbss_mem
}
```
https://github.com/llvm/llvm-project/pull/196447
More information about the llvm-commits
mailing list