From e5234c0e9ee1d60b7a87df8de0350fee2d4e6c55 Mon Sep 17 00:00:00 2001 From: Jakub Konka Date: Wed, 17 Mar 2021 00:21:56 +0100 Subject: macho: offset table part of GOT --- lib/std/macho.zig | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lib/std') diff --git a/lib/std/macho.zig b/lib/std/macho.zig index 6785abffca..bca222b5b7 100644 --- a/lib/std/macho.zig +++ b/lib/std/macho.zig @@ -1422,6 +1422,14 @@ pub const EXPORT_SYMBOL_FLAGS_KIND_WEAK_DEFINITION: u8 = 0x04; pub const EXPORT_SYMBOL_FLAGS_REEXPORT: u8 = 0x08; pub const EXPORT_SYMBOL_FLAGS_STUB_AND_RESOLVER: u8 = 0x10; +// An indirect symbol table entry is simply a 32bit index into the symbol table +// to the symbol that the pointer or stub is refering to. Unless it is for a +// non-lazy symbol pointer section for a defined symbol which strip(1) as +// removed. In which case it has the value INDIRECT_SYMBOL_LOCAL. If the +// symbol was also absolute INDIRECT_SYMBOL_ABS is or'ed with that. +pub const INDIRECT_SYMBOL_LOCAL: u32 = 0x80000000; +pub const INDIRECT_SYMBOL_ABS: u32 = 0x40000000; + // Codesign consts and structs taken from: // https://opensource.apple.com/source/xnu/xnu-6153.81.5/osfmk/kern/cs_blobs.h.auto.html -- cgit v1.2.3