Index: lld/trunk/ELF/Writer.cpp =================================================================== --- lld/trunk/ELF/Writer.cpp +++ lld/trunk/ELF/Writer.cpp @@ -491,6 +491,8 @@ return ".text"; if (S.startswith(".rodata.")) return ".rodata"; + if (S.startswith(".data.rel.ro")) + return ".data.rel.ro"; if (S.startswith(".data.")) return ".data"; if (S.startswith(".bss.")) Index: lld/trunk/test/elf2/section-name.s =================================================================== --- lld/trunk/test/elf2/section-name.s +++ lld/trunk/test/elf2/section-name.s @@ -17,6 +17,10 @@ .section .bss,"",@nobits .section .foo.a,"aw" .section .foo,"aw" +.section .data.rel.ro,"aw",%progbits +.section .data.rel.ro.a,"aw",%progbits +.section .data.rel.ro.local,"aw",%progbits +.section .data.rel.ro.local.a,"aw",%progbits // CHECK-NOT: Name: .rodata.a // CHECK: Name: .rodata @@ -26,5 +30,8 @@ // CHECK: Name: .data // CHECK: Name: .foo.a // CHECK: Name: .foo +// CHECK-NOT: Name: .data.rel.ro.a +// CHECK-NOT: Name: .data.rel.ro.local.a +// CHECK: Name: .data.rel.ro // CHECK-NOT: Name: .bss.a // CHECK: Name: .bss