aboutsummaryrefslogtreecommitdiff
path: root/lib/std
diff options
context:
space:
mode:
authorJakub Konka <kubkon@jakubkonka.com>2021-01-26 08:11:31 +0100
committerJakub Konka <kubkon@jakubkonka.com>2021-01-26 08:11:31 +0100
commit79730e6f5cdf13b2514781881e69c557fd52eaea (patch)
treeba01ad6c0114cab8f2a11aa0538962643237cae6 /lib/std
parent881ecdc72ff1fc7dccc586c5d361e469db7c45d8 (diff)
downloadzig-79730e6f5cdf13b2514781881e69c557fd52eaea.tar.gz
zig-79730e6f5cdf13b2514781881e69c557fd52eaea.zip
macho: add arm64 relocation type enum
Diffstat (limited to 'lib/std')
-rw-r--r--lib/std/macho.zig35
1 files changed, 35 insertions, 0 deletions
diff --git a/lib/std/macho.zig b/lib/std/macho.zig
index 459410861e..6785abffca 100644
--- a/lib/std/macho.zig
+++ b/lib/std/macho.zig
@@ -1334,6 +1334,41 @@ pub const reloc_type_x86_64 = packed enum(u4) {
X86_64_RELOC_TLV,
};
+pub const reloc_type_arm64 = packed enum(u4) {
+ /// For pointers.
+ ARM64_RELOC_UNSIGNED = 0,
+
+ /// Must be followed by a ARM64_RELOC_UNSIGNED.
+ ARM64_RELOC_SUBTRACTOR,
+
+ /// A B/BL instruction with 26-bit displacement.
+ ARM64_RELOC_BRANCH26,
+
+ /// Pc-rel distance to page of target.
+ ARM64_RELOC_PAGE21,
+
+ /// Offset within page, scaled by r_length.
+ ARM64_RELOC_PAGEOFF12,
+
+ /// Pc-rel distance to page of GOT slot.
+ ARM64_RELOC_GOT_LOAD_PAGE21,
+
+ /// Offset within page of GOT slot, scaled by r_length.
+ ARM64_RELOC_GOT_LOAD_PAGEOFF12,
+
+ /// For pointers to GOT slots.
+ ARM64_RELOC_POINTER_TO_GOT,
+
+ /// Pc-rel distance to page of TLVP slot.
+ ARM64_RELOC_TLVP_LOAD_PAGE21,
+
+ /// Offset within page of TLVP slot, scaled by r_length.
+ ARM64_RELOC_TLVP_LOAD_PAGEOFF12,
+
+ /// Must be followed by PAGE21 or PAGEOFF12.
+ ARM64_RELOC_ADDEND,
+};
+
/// This symbol is a reference to an external non-lazy (data) symbol.
pub const REFERENCE_FLAG_UNDEFINED_NON_LAZY: u16 = 0x0;