about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEddy (Eduard) Stefes <eduard.stefes@ibm.com>2025-04-14 09:49:43 +0200
committerEddy (Eduard) Stefes <eduard.stefes@ibm.com>2025-04-14 10:03:31 +0200
commit1ac3d6bba71fce59939e6a4d50de98e289e87b9b (patch)
tree22be84230cf23ddef93d4c2f0eb36309ccd998f5
parent15f58c46da79399961a09db0c650a2f90f442e6b (diff)
downloadrust-1ac3d6bba71fce59939e6a4d50de98e289e87b9b.tar.gz
rust-1ac3d6bba71fce59939e6a4d50de98e289e87b9b.zip
Let CStrings be either 1 or 2 byte aligned.
Some architectures (like s390x) require strings to be 2 byte aligned.
Therefor the section name will be marked with a .2  postfix on this
architectures.

Allowing a section name with a .1 or .2 postfix will make the test pass
on either platform.
-rw-r--r--tests/assembly/cstring-merging.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/assembly/cstring-merging.rs b/tests/assembly/cstring-merging.rs
index 07f25d1e1a4..b5c530ac35d 100644
--- a/tests/assembly/cstring-merging.rs
+++ b/tests/assembly/cstring-merging.rs
@@ -5,7 +5,7 @@
 
 use std::ffi::CStr;
 
-// CHECK: .section .rodata.str1.1,"aMS"
+// CHECK: .section .rodata.str1.{{[12]}},"aMS"
 // CHECK: .Lanon.{{.+}}:
 // CHECK-NEXT: .asciz "foo"
 #[unsafe(no_mangle)]