[llvm] adaadbf - [JITLink][MachO] Return an error when MachO TLV relocations are encountered.
    Lang Hames via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Thu Aug 13 11:19:46 PDT 2020
    
    
  
Author: Lang Hames
Date: 2020-08-13T11:19:35-07:00
New Revision: adaadbfeac98ab9d5ce34b8bb2ceedddc5dc1fd4
URL: https://github.com/llvm/llvm-project/commit/adaadbfeac98ab9d5ce34b8bb2ceedddc5dc1fd4
DIFF: https://github.com/llvm/llvm-project/commit/adaadbfeac98ab9d5ce34b8bb2ceedddc5dc1fd4.diff
LOG: [JITLink][MachO] Return an error when MachO TLV relocations are encountered.
MachO TLV relocations aren't supported yet. Error out rather than falling
through to llvm_unreachable.
Added: 
    
Modified: 
    llvm/lib/ExecutionEngine/JITLink/MachO_x86_64.cpp
Removed: 
    
################################################################################
diff  --git a/llvm/lib/ExecutionEngine/JITLink/MachO_x86_64.cpp b/llvm/lib/ExecutionEngine/JITLink/MachO_x86_64.cpp
index 134b01f0f656..a70b0dcd8f85 100644
--- a/llvm/lib/ExecutionEngine/JITLink/MachO_x86_64.cpp
+++ b/llvm/lib/ExecutionEngine/JITLink/MachO_x86_64.cpp
@@ -339,6 +339,9 @@ class MachOLinkGraphBuilder_x86_64 : public MachOLinkGraphBuilder {
           assert(TargetSymbol && "No target symbol from parsePairRelocation?");
           break;
         }
+        case PCRel32TLV:
+          return make_error<JITLinkError>(
+              "MachO TLV relocations not yet supported");
         default:
           llvm_unreachable("Special relocation kind should not appear in "
                            "mach-o file");
        
    
    
More information about the llvm-commits
mailing list