maryammo wrote:
> > Add -mcsect[=]/-mno-csect and #pragma csect(code|static, "name") for z/OS.
> > Clang emits the CSECT names as zos_csect_code/zos_csect_static module
> > flags; backend support will follow in a separate patch.
>
> What's the actual difference between `-mcsect` (no qualifier) and
> `-mno-csect`? I see that with `-mno-csect` you do not provide the module
> flags, but the back-end will still choose a section name, and that seems to
> be the same as when using `-mcsect` without qualifier. Am I missing something
> here?
They can differ when the output and source file names differ. With
`-mno-csect`, the backend uses the source file name. With `-mcsect`, the output
file name is used. `main.c -o bar` gives `main#C` with `-mno-csect` and `bar#C`
with `-mcsect`.
clang --target=s390x-none-zos main.c -emit-llvm -S -mcsect -o bar.ll
generates the following meta data in IR:
!7 = !{i32 1, !"zos_csect_code", !"bar#C"}
!8 = !{i32 1, !"zos_csect_static", !"bar#S"}
https://github.com/llvm/llvm-project/pull/234368
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits