github.com/primecitizens/pcz/std@v0.2.1/encoding/binfmt/macho/relocation.go (about) 1 // SPDX-License-Identifier: Apache-2.0 2 // Copyright 2023 The Prime Citizens 3 // 4 // Copyright 2009 The Go Authors. All rights reserved. 5 // Use of this source code is governed by a BSD-style 6 // license that can be found in the LICENSE file. 7 8 package macho 9 10 type RelocTypeGeneric int 11 12 const ( 13 GENERIC_RELOC_VANILLA RelocTypeGeneric = 0 14 GENERIC_RELOC_PAIR RelocTypeGeneric = 1 15 GENERIC_RELOC_SECTDIFF RelocTypeGeneric = 2 16 GENERIC_RELOC_PB_LA_PTR RelocTypeGeneric = 3 17 GENERIC_RELOC_LOCAL_SECTDIFF RelocTypeGeneric = 4 18 GENERIC_RELOC_TLV RelocTypeGeneric = 5 19 ) 20 21 type RelocTypeX86_64 int 22 23 const ( 24 X86_64_RELOC_UNSIGNED RelocTypeX86_64 = 0 25 X86_64_RELOC_SIGNED RelocTypeX86_64 = 1 26 X86_64_RELOC_BRANCH RelocTypeX86_64 = 2 27 X86_64_RELOC_GOT_LOAD RelocTypeX86_64 = 3 28 X86_64_RELOC_GOT RelocTypeX86_64 = 4 29 X86_64_RELOC_SUBTRACTOR RelocTypeX86_64 = 5 30 X86_64_RELOC_SIGNED_1 RelocTypeX86_64 = 6 31 X86_64_RELOC_SIGNED_2 RelocTypeX86_64 = 7 32 X86_64_RELOC_SIGNED_4 RelocTypeX86_64 = 8 33 X86_64_RELOC_TLV RelocTypeX86_64 = 9 34 ) 35 36 type RelocTypeARM int 37 38 const ( 39 ARM_RELOC_VANILLA RelocTypeARM = 0 40 ARM_RELOC_PAIR RelocTypeARM = 1 41 ARM_RELOC_SECTDIFF RelocTypeARM = 2 42 ARM_RELOC_LOCAL_SECTDIFF RelocTypeARM = 3 43 ARM_RELOC_PB_LA_PTR RelocTypeARM = 4 44 ARM_RELOC_BR24 RelocTypeARM = 5 45 ARM_THUMB_RELOC_BR22 RelocTypeARM = 6 46 ARM_THUMB_32BIT_BRANCH RelocTypeARM = 7 47 ARM_RELOC_HALF RelocTypeARM = 8 48 ARM_RELOC_HALF_SECTDIFF RelocTypeARM = 9 49 ) 50 51 type RelocTypeARM64 int 52 53 const ( 54 ARM64_RELOC_UNSIGNED RelocTypeARM64 = 0 55 ARM64_RELOC_SUBTRACTOR RelocTypeARM64 = 1 56 ARM64_RELOC_BRANCH26 RelocTypeARM64 = 2 57 ARM64_RELOC_PAGE21 RelocTypeARM64 = 3 58 ARM64_RELOC_PAGEOFF12 RelocTypeARM64 = 4 59 ARM64_RELOC_GOT_LOAD_PAGE21 RelocTypeARM64 = 5 60 ARM64_RELOC_GOT_LOAD_PAGEOFF12 RelocTypeARM64 = 6 61 ARM64_RELOC_POINTER_TO_GOT RelocTypeARM64 = 7 62 ARM64_RELOC_TLVP_LOAD_PAGE21 RelocTypeARM64 = 8 63 ARM64_RELOC_TLVP_LOAD_PAGEOFF12 RelocTypeARM64 = 9 64 ARM64_RELOC_ADDEND RelocTypeARM64 = 10 65 )