Index: lld/trunk/ELF/Writer.cpp =================================================================== --- lld/trunk/ELF/Writer.cpp +++ lld/trunk/ELF/Writer.cpp @@ -500,7 +500,7 @@ return true; StringRef S = Sec->getName(); return S == ".data.rel.ro" || S == ".ctors" || S == ".dtors" || S == ".jcr" || - S == ".eh_frame"; + S == ".eh_frame" || S == ".openbsd.randomdata"; } template Index: lld/trunk/test/ELF/relro.s =================================================================== --- lld/trunk/test/ELF/relro.s +++ lld/trunk/test/ELF/relro.s @@ -19,8 +19,8 @@ // CHECK-NEXT: GNU_RELRO // CHECK: Section to Segment mapping: -// FULLRELRO: 05 .dynamic .got .got.plt {{$}} -// PARTRELRO: 05 .dynamic .got {{$}} +// FULLRELRO: 05 .openbsd.randomdata .dynamic .got .got.plt {{$}} +// PARTRELRO: 05 .openbsd.randomdata .dynamic .got {{$}} // NORELRO-NOT: GNU_RELRO @@ -36,3 +36,6 @@ .zero 4 .section .foo,"aw" .section .bss,"",@nobits + +.section .openbsd.randomdata, "aw" +.quad 0