[PATCH] D27458: [ELF] - Teach LLD to recognize PT_OPENBSD_BOOTDATA

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 6 10:08:02 PST 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL288832: [ELF] - Teach LLD to recognize PT_OPENBSD_BOOTDATA (authored by grimar).

Changed prior to commit:
  https://reviews.llvm.org/D27458?vs=80433&id=80441#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D27458

Files:
  lld/trunk/ELF/LinkerScript.cpp
  lld/trunk/test/ELF/linkerscript/openbsd-bootdata.s


Index: lld/trunk/test/ELF/linkerscript/openbsd-bootdata.s
===================================================================
--- lld/trunk/test/ELF/linkerscript/openbsd-bootdata.s
+++ lld/trunk/test/ELF/linkerscript/openbsd-bootdata.s
@@ -0,0 +1,7 @@
+# RUN: llvm-mc -filetype=obj -triple=i686-unknown-linux %s -o %t.o
+# RUN: echo "PHDRS { boot PT_OPENBSD_BOOTDATA; }" > %t.script
+# RUN: ld.lld --script %t.script %t.o -o %t
+# RUN: llvm-readobj --program-headers -s %t | FileCheck %s
+
+# CHECK:      ProgramHeader {
+# CHECK:        Type: PT_OPENBSD_BOOTDATA (0x65A41BE6)
Index: lld/trunk/ELF/LinkerScript.cpp
===================================================================
--- lld/trunk/ELF/LinkerScript.cpp
+++ lld/trunk/ELF/LinkerScript.cpp
@@ -1859,6 +1859,7 @@
                      .Case("PT_GNU_RELRO", PT_GNU_RELRO)
                      .Case("PT_OPENBSD_RANDOMIZE", PT_OPENBSD_RANDOMIZE)
                      .Case("PT_OPENBSD_WXNEEDED", PT_OPENBSD_WXNEEDED)
+                     .Case("PT_OPENBSD_BOOTDATA", PT_OPENBSD_BOOTDATA)
                      .Default(-1);
 
   if (Ret == (unsigned)-1) {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D27458.80441.patch
Type: text/x-patch
Size: 1119 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161206/26add12a/attachment.bin>


More information about the llvm-commits mailing list