And also set the SHF_X86_64_LARGE section flag.
gcc only uses the "l" prefix and SHF_X86_64_LARGE in the medium code model for data larger than -mlarge-data-threshold. But it seems more consistent to use it in the large code model as well in case separate parts of the binary aren't compiled with the large code model and also have a .data/.bss/.rodata section.
This is fine as you have it in the compiler, but I'll just note that we cannot really do RELRO for .ldata.rel.ro sections in the linker, because today's program loaders only permit a single GNU_RELRO segment -- so .ldata.rel.ro has to be treated just like .ldata in the linker -- and thus stay as RW during program execution.