[PATCH] D56187: [LLVM-C] Expand LLVMRelocMode

Robert Widmann via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 1 11:12:20 PST 2019


CodaFi created this revision.
CodaFi added reviewers: whitequark, deadalnix.
Herald added a subscriber: llvm-commits.

Add read[only|write] PIC relocation models to the C API and teach the TargetMachine API about it.


Repository:
  rL LLVM

https://reviews.llvm.org/D56187

Files:
  include/llvm-c/TargetMachine.h
  lib/Target/TargetMachineC.cpp


Index: lib/Target/TargetMachineC.cpp
===================================================================
--- lib/Target/TargetMachineC.cpp
+++ lib/Target/TargetMachineC.cpp
@@ -115,6 +115,15 @@
     case LLVMRelocDynamicNoPic:
       RM = Reloc::DynamicNoPIC;
       break;
+    case LLVMRelocROPI:
+      RM = Reloc::ROPI;
+      break;
+    case LLVMRelocRWPI:
+      RM = Reloc::RWPI;
+      break;
+    case LLVMRelocROPI_RWPI:
+      RM = Reloc::ROPI_RWPI;
+      break;
     default:
       break;
   }
Index: include/llvm-c/TargetMachine.h
===================================================================
--- include/llvm-c/TargetMachine.h
+++ include/llvm-c/TargetMachine.h
@@ -39,7 +39,10 @@
     LLVMRelocDefault,
     LLVMRelocStatic,
     LLVMRelocPIC,
-    LLVMRelocDynamicNoPic
+    LLVMRelocDynamicNoPic,
+    LLVMRelocROPI,
+    LLVMRelocRWPI,
+    LLVMRelocROPI_RWPI
 } LLVMRelocMode;
 
 typedef enum {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56187.179800.patch
Type: text/x-patch
Size: 923 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190101/9ef5d42b/attachment.bin>


More information about the llvm-commits mailing list