From 1ac3d6bba71fce59939e6a4d50de98e289e87b9b Mon Sep 17 00:00:00 2001 From: "Eddy (Eduard) Stefes" Date: Mon, 14 Apr 2025 09:49:43 +0200 Subject: [PATCH] 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. --- tests/assembly/cstring-merging.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/assembly/cstring-merging.rs b/tests/assembly/cstring-merging.rs index 07f25d1e1a427..b5c530ac35d76 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)]