[llvm] [RISCV] Let -data-sections also work on sbss/sdata sections (PR #87040)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 22 00:27:27 PDT 2024
================
@@ -0,0 +1,25 @@
+; RUN: llc -mtriple=riscv32 -data-sections < %s | FileCheck -check-prefix=RV32 %s
+; RUN: llc -mtriple=riscv64 -data-sections < %s | FileCheck -check-prefix=RV64 %s
+
+; Append an unique name to each sdata/sbss section when -data-section.
+
+ at v = dso_local global i32 0, align 4
+ at r = dso_local global i64 7, align 8
+
+; If a symbol has an explicit sdata/sbss section name, we should honor it.
+ at vv = dso_local global i32 0, section ".sbss", align 4
+ at rr = dso_local global i64 7, section ".sdata", align 8
----------------
KaiYG wrote:
Addressed.
https://github.com/llvm/llvm-project/pull/87040
More information about the llvm-commits
mailing list