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.
This commit is contained in:
Eddy (Eduard) Stefes 2025-04-14 09:49:43 +02:00
parent 15f58c46da
commit 1ac3d6bba7

View file

@ -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)]