Source file src/debug/macho/reloctype.go

     1  // Copyright 2017 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package macho
     6  
     7  //go:generate stringer -type=RelocTypeGeneric,RelocTypeX86_64,RelocTypeARM,RelocTypeARM64 -output reloctype_string.go
     8  
     9  type RelocTypeGeneric int
    10  
    11  const (
    12  	GENERIC_RELOC_VANILLA        RelocTypeGeneric = 0
    13  	GENERIC_RELOC_PAIR           RelocTypeGeneric = 1
    14  	GENERIC_RELOC_SECTDIFF       RelocTypeGeneric = 2
    15  	GENERIC_RELOC_PB_LA_PTR      RelocTypeGeneric = 3
    16  	GENERIC_RELOC_LOCAL_SECTDIFF RelocTypeGeneric = 4
    17  	GENERIC_RELOC_TLV            RelocTypeGeneric = 5
    18  )
    19  
    20  func (r RelocTypeGeneric) GoString() string { return "macho." + r.String() }
    21  
    22  type RelocTypeX86_64 int
    23  
    24  const (
    25  	X86_64_RELOC_UNSIGNED   RelocTypeX86_64 = 0
    26  	X86_64_RELOC_SIGNED     RelocTypeX86_64 = 1
    27  	X86_64_RELOC_BRANCH     RelocTypeX86_64 = 2
    28  	X86_64_RELOC_GOT_LOAD   RelocTypeX86_64 = 3
    29  	X86_64_RELOC_GOT        RelocTypeX86_64 = 4
    30  	X86_64_RELOC_SUBTRACTOR RelocTypeX86_64 = 5
    31  	X86_64_RELOC_SIGNED_1   RelocTypeX86_64 = 6
    32  	X86_64_RELOC_SIGNED_2   RelocTypeX86_64 = 7
    33  	X86_64_RELOC_SIGNED_4   RelocTypeX86_64 = 8
    34  	X86_64_RELOC_TLV        RelocTypeX86_64 = 9
    35  )
    36  
    37  func (r RelocTypeX86_64) GoString() string { return "macho." + r.String() }
    38  
    39  type RelocTypeARM int
    40  
    41  const (
    42  	ARM_RELOC_VANILLA        RelocTypeARM = 0
    43  	ARM_RELOC_PAIR           RelocTypeARM = 1
    44  	ARM_RELOC_SECTDIFF       RelocTypeARM = 2
    45  	ARM_RELOC_LOCAL_SECTDIFF RelocTypeARM = 3
    46  	ARM_RELOC_PB_LA_PTR      RelocTypeARM = 4
    47  	ARM_RELOC_BR24           RelocTypeARM = 5
    48  	ARM_THUMB_RELOC_BR22     RelocTypeARM = 6
    49  	ARM_THUMB_32BIT_BRANCH   RelocTypeARM = 7
    50  	ARM_RELOC_HALF           RelocTypeARM = 8
    51  	ARM_RELOC_HALF_SECTDIFF  RelocTypeARM = 9
    52  )
    53  
    54  func (r RelocTypeARM) GoString() string { return "macho." + r.String() }
    55  
    56  type RelocTypeARM64 int
    57  
    58  const (
    59  	ARM64_RELOC_UNSIGNED            RelocTypeARM64 = 0
    60  	ARM64_RELOC_SUBTRACTOR          RelocTypeARM64 = 1
    61  	ARM64_RELOC_BRANCH26            RelocTypeARM64 = 2
    62  	ARM64_RELOC_PAGE21              RelocTypeARM64 = 3
    63  	ARM64_RELOC_PAGEOFF12           RelocTypeARM64 = 4
    64  	ARM64_RELOC_GOT_LOAD_PAGE21     RelocTypeARM64 = 5
    65  	ARM64_RELOC_GOT_LOAD_PAGEOFF12  RelocTypeARM64 = 6
    66  	ARM64_RELOC_POINTER_TO_GOT      RelocTypeARM64 = 7
    67  	ARM64_RELOC_TLVP_LOAD_PAGE21    RelocTypeARM64 = 8
    68  	ARM64_RELOC_TLVP_LOAD_PAGEOFF12 RelocTypeARM64 = 9
    69  	ARM64_RELOC_ADDEND              RelocTypeARM64 = 10
    70  )
    71  
    72  func (r RelocTypeARM64) GoString() string { return "macho." + r.String() }
    73  

View as plain text