[PATCH] D27974: [ELF] - Treat .openbsd.randomdata as relro section

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 20 03:39:26 PST 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL290174: [ELF] - Treat .openbsd.randomdata as relro section (authored by grimar).

Changed prior to commit:
  https://reviews.llvm.org/D27974?vs=82077&id=82087#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D27974

Files:
  lld/trunk/ELF/Writer.cpp
  lld/trunk/test/ELF/relro.s


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,"", at nobits
+
+.section .openbsd.randomdata, "aw"
+.quad 0
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 <class ELFT>


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D27974.82087.patch
Type: text/x-patch
Size: 1055 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161220/5ba63f7c/attachment-0001.bin>


More information about the llvm-commits mailing list