github.com/primecitizens/pcz/std@v0.2.1/encoding/binfmt/pe/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 pe 9 10 // Reloc represents a PE COFF relocation. 11 // Each section contains its own relocation list. 12 type Reloc struct { 13 VirtualAddress uint32 14 SymbolTableIndex uint32 15 Type uint16 16 } 17 18 const ( 19 IMAGE_REL_I386_DIR32 = 0x0006 20 IMAGE_REL_I386_SECREL = 0x000B 21 IMAGE_REL_I386_REL32 = 0x0014 22 23 IMAGE_REL_AMD64_ADDR64 = 0x0001 24 IMAGE_REL_AMD64_ADDR32 = 0x0002 25 IMAGE_REL_AMD64_REL32 = 0x0004 26 IMAGE_REL_AMD64_SECREL = 0x000B 27 28 IMAGE_REL_ARM_ABSOLUTE = 0x0000 29 IMAGE_REL_ARM_ADDR32 = 0x0001 30 IMAGE_REL_ARM_ADDR32NB = 0x0002 31 IMAGE_REL_ARM_BRANCH24 = 0x0003 32 IMAGE_REL_ARM_BRANCH11 = 0x0004 33 IMAGE_REL_ARM_SECREL = 0x000F 34 35 IMAGE_REL_ARM64_ABSOLUTE = 0x0000 36 IMAGE_REL_ARM64_ADDR32 = 0x0001 37 IMAGE_REL_ARM64_ADDR32NB = 0x0002 38 IMAGE_REL_ARM64_BRANCH26 = 0x0003 39 IMAGE_REL_ARM64_PAGEBASE_REL21 = 0x0004 40 IMAGE_REL_ARM64_REL21 = 0x0005 41 IMAGE_REL_ARM64_PAGEOFFSET_12A = 0x0006 42 IMAGE_REL_ARM64_PAGEOFFSET_12L = 0x0007 43 IMAGE_REL_ARM64_SECREL = 0x0008 44 IMAGE_REL_ARM64_SECREL_LOW12A = 0x0009 45 IMAGE_REL_ARM64_SECREL_HIGH12A = 0x000A 46 IMAGE_REL_ARM64_SECREL_LOW12L = 0x000B 47 IMAGE_REL_ARM64_TOKEN = 0x000C 48 IMAGE_REL_ARM64_SECTION = 0x000D 49 IMAGE_REL_ARM64_ADDR64 = 0x000E 50 IMAGE_REL_ARM64_BRANCH19 = 0x000F 51 IMAGE_REL_ARM64_BRANCH14 = 0x0010 52 IMAGE_REL_ARM64_REL32 = 0x0011 53 54 IMAGE_REL_BASED_HIGHLOW = 3 55 IMAGE_REL_BASED_DIR64 = 10 56 )