bjorn3 opened issue #8901:
Feature
See title
Benefit
This would allow the linker to deduplicate the strings. In addition some linker don't like mixing attributes between sections that get merged, so if the user of cg_clif specified that the data object needs to end up in
__TEXT/__cstring, we will need to respect thecstring_literalssection type likely specified by the user too.Implementation
cranelift-jit can ignore this and cranelift-object can use
SectionKind::ReadOnlyString.
alexcrichton closed issue #8901:
Feature
See title
Benefit
This would allow the linker to deduplicate the strings. In addition some linker don't like mixing attributes between sections that get merged, so if the user of cg_clif specified that the data object needs to end up in
__TEXT/__cstring, we will need to respect thecstring_literalssection type likely specified by the user too.Implementation
cranelift-jit can ignore this and cranelift-object can use
SectionKind::ReadOnlyString.
bjorn3 commented on issue #8901:
Can this be re-opened? That PR only allows it on Mach-O. ELF and COFF still don't allow marking as C string.
alexcrichton reopened issue #8901:
Feature
See title
Benefit
This would allow the linker to deduplicate the strings. In addition some linker don't like mixing attributes between sections that get merged, so if the user of cg_clif specified that the data object needs to end up in
__TEXT/__cstring, we will need to respect thecstring_literalssection type likely specified by the user too.Implementation
cranelift-jit can ignore this and cranelift-object can use
SectionKind::ReadOnlyString.
Last updated: Jul 29 2026 at 05:03 UTC