From 5834520bfebff4ff9884487e72e48225b7b5cc13 Mon Sep 17 00:00:00 2001 From: Pat Hickey Date: Tue, 12 Dec 2017 13:52:46 -0800 Subject: [PATCH] binemit: add PIC relocation types for Intel --- lib/cretonne/src/binemit/mod.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/cretonne/src/binemit/mod.rs b/lib/cretonne/src/binemit/mod.rs index 7851e491a5..43665d945b 100644 --- a/lib/cretonne/src/binemit/mod.rs +++ b/lib/cretonne/src/binemit/mod.rs @@ -28,6 +28,10 @@ pub enum Reloc { IntelAbs4, /// Intel absolute 8-byte IntelAbs8, + /// Intel GOT PC-relative 4-byte + IntelGotPCRel4, + /// Intel PLT-relative 4-byte + IntelPLTRel4, /// Arm32 call target Arm32Call, /// Arm64 call target @@ -44,6 +48,8 @@ impl fmt::Display for Reloc { Reloc::IntelPCRel4 => write!(f, "{}", "PCRel4"), Reloc::IntelAbs4 => write!(f, "{}", "Abs4"), Reloc::IntelAbs8 => write!(f, "{}", "Abs8"), + Reloc::IntelGotPCRel4 => write!(f, "{}", "GotPCRel4"), + Reloc::IntelPLTRel4 => write!(f, "{}", "PLTRel4"), Reloc::Arm32Call | Reloc::Arm64Call | Reloc::RiscvCall => write!(f, "{}", "Call"), } }