mirror of
https://github.com/Binject/debug
synced 2026-06-08 10:28:33 +00:00
bd546f9e10
Fixes #21435 Change-Id: I5f8d93a45b84a871ceea881ecb1a38a37e96006c Reviewed-on: https://go-review.googlesource.com/55263 Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
73 lines
2.4 KiB
Go
73 lines
2.4 KiB
Go
// Copyright 2017 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
package macho
|
|
|
|
//go:generate stringer -type=RelocTypeGeneric,RelocTypeX86_64,RelocTypeARM,RelocTypeARM64 -output reloctype_string.go
|
|
|
|
type RelocTypeGeneric int
|
|
|
|
const (
|
|
GENERIC_RELOC_VANILLA RelocTypeGeneric = 0
|
|
GENERIC_RELOC_PAIR RelocTypeGeneric = 1
|
|
GENERIC_RELOC_SECTDIFF RelocTypeGeneric = 2
|
|
GENERIC_RELOC_PB_LA_PTR RelocTypeGeneric = 3
|
|
GENERIC_RELOC_LOCAL_SECTDIFF RelocTypeGeneric = 4
|
|
GENERIC_RELOC_TLV RelocTypeGeneric = 5
|
|
)
|
|
|
|
func (r RelocTypeGeneric) GoString() string { return "macho." + r.String() }
|
|
|
|
type RelocTypeX86_64 int
|
|
|
|
const (
|
|
X86_64_RELOC_UNSIGNED RelocTypeX86_64 = 0
|
|
X86_64_RELOC_SIGNED RelocTypeX86_64 = 1
|
|
X86_64_RELOC_BRANCH RelocTypeX86_64 = 2
|
|
X86_64_RELOC_GOT_LOAD RelocTypeX86_64 = 3
|
|
X86_64_RELOC_GOT RelocTypeX86_64 = 4
|
|
X86_64_RELOC_SUBTRACTOR RelocTypeX86_64 = 5
|
|
X86_64_RELOC_SIGNED_1 RelocTypeX86_64 = 6
|
|
X86_64_RELOC_SIGNED_2 RelocTypeX86_64 = 7
|
|
X86_64_RELOC_SIGNED_4 RelocTypeX86_64 = 8
|
|
X86_64_RELOC_TLV RelocTypeX86_64 = 9
|
|
)
|
|
|
|
func (r RelocTypeX86_64) GoString() string { return "macho." + r.String() }
|
|
|
|
type RelocTypeARM int
|
|
|
|
const (
|
|
ARM_RELOC_VANILLA RelocTypeARM = 0
|
|
ARM_RELOC_PAIR RelocTypeARM = 1
|
|
ARM_RELOC_SECTDIFF RelocTypeARM = 2
|
|
ARM_RELOC_LOCAL_SECTDIFF RelocTypeARM = 3
|
|
ARM_RELOC_PB_LA_PTR RelocTypeARM = 4
|
|
ARM_RELOC_BR24 RelocTypeARM = 5
|
|
ARM_THUMB_RELOC_BR22 RelocTypeARM = 6
|
|
ARM_THUMB_32BIT_BRANCH RelocTypeARM = 7
|
|
ARM_RELOC_HALF RelocTypeARM = 8
|
|
ARM_RELOC_HALF_SECTDIFF RelocTypeARM = 9
|
|
)
|
|
|
|
func (r RelocTypeARM) GoString() string { return "macho." + r.String() }
|
|
|
|
type RelocTypeARM64 int
|
|
|
|
const (
|
|
ARM64_RELOC_UNSIGNED RelocTypeARM64 = 0
|
|
ARM64_RELOC_SUBTRACTOR RelocTypeARM64 = 1
|
|
ARM64_RELOC_BRANCH26 RelocTypeARM64 = 2
|
|
ARM64_RELOC_PAGE21 RelocTypeARM64 = 3
|
|
ARM64_RELOC_PAGEOFF12 RelocTypeARM64 = 4
|
|
ARM64_RELOC_GOT_LOAD_PAGE21 RelocTypeARM64 = 5
|
|
ARM64_RELOC_GOT_LOAD_PAGEOFF12 RelocTypeARM64 = 6
|
|
ARM64_RELOC_POINTER_TO_GOT RelocTypeARM64 = 7
|
|
ARM64_RELOC_TLVP_LOAD_PAGE21 RelocTypeARM64 = 8
|
|
ARM64_RELOC_TLVP_LOAD_PAGEOFF12 RelocTypeARM64 = 9
|
|
ARM64_RELOC_ADDEND RelocTypeARM64 = 10
|
|
)
|
|
|
|
func (r RelocTypeARM64) GoString() string { return "macho." + r.String() }
|