authorgravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2021-01-26 08:11:31+01:00
committergravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2021-01-26 08:11:31+01:00
log79730e6f5cdf13b2514781881e69c557fd52eaea
treeba01ad6c0114cab8f2a11aa0538962643237cae6
parent881ecdc72ff1fc7dccc586c5d361e469db7c45d8

macho: add arm64 relocation type enum


1 files changed, 35 insertions(+), 0 deletions(-)

lib/std/macho.zig+35
......@@ -1334,6 +1334,41 @@ pub const reloc_type_x86_64 = packed enum(u4) {
13341334 X86_64_RELOC_TLV,
13351335};
13361336
1337pub const reloc_type_arm64 = packed enum(u4) {
1338 /// For pointers.
1339 ARM64_RELOC_UNSIGNED = 0,
1340
1341 /// Must be followed by a ARM64_RELOC_UNSIGNED.
1342 ARM64_RELOC_SUBTRACTOR,
1343
1344 /// A B/BL instruction with 26-bit displacement.
1345 ARM64_RELOC_BRANCH26,
1346
1347 /// Pc-rel distance to page of target.
1348 ARM64_RELOC_PAGE21,
1349
1350 /// Offset within page, scaled by r_length.
1351 ARM64_RELOC_PAGEOFF12,
1352
1353 /// Pc-rel distance to page of GOT slot.
1354 ARM64_RELOC_GOT_LOAD_PAGE21,
1355
1356 /// Offset within page of GOT slot, scaled by r_length.
1357 ARM64_RELOC_GOT_LOAD_PAGEOFF12,
1358
1359 /// For pointers to GOT slots.
1360 ARM64_RELOC_POINTER_TO_GOT,
1361
1362 /// Pc-rel distance to page of TLVP slot.
1363 ARM64_RELOC_TLVP_LOAD_PAGE21,
1364
1365 /// Offset within page of TLVP slot, scaled by r_length.
1366 ARM64_RELOC_TLVP_LOAD_PAGEOFF12,
1367
1368 /// Must be followed by PAGE21 or PAGEOFF12.
1369 ARM64_RELOC_ADDEND,
1370};
1371
13371372/// This symbol is a reference to an external non-lazy (data) symbol.
13381373pub const REFERENCE_FLAG_UNDEFINED_NON_LAZY: u16 = 0x0;
13391374