// Generated by Lisette bindgen
// Source: debug/elf (Go stdlib)
// Go: 1.25.5
// Lisette: 0.1.11

import "go:debug/dwarf"
import "go:encoding/binary"
import "go:io"

pub enum CompressionType: int {
  COMPRESS_HIOS = 0x6fffffff,
  COMPRESS_HIPROC = 0x7fffffff,
  COMPRESS_LOOS = 0x60000000,
  COMPRESS_LOPROC = 0x70000000,
  COMPRESS_ZLIB = 1,
  COMPRESS_ZSTD = 2,
}

pub const COMPRESS_HIOS: CompressionType = 0x6fffffff

pub const COMPRESS_HIPROC: CompressionType = 0x7fffffff

pub const COMPRESS_LOOS: CompressionType = 0x60000000

pub const COMPRESS_LOPROC: CompressionType = 0x70000000

pub const COMPRESS_ZLIB: CompressionType = 1

pub const COMPRESS_ZSTD: CompressionType = 2

pub enum DynTag: int {
  DT_ADDRRNGHI = 0x6ffffeff,
  DT_ADDRRNGLO = 0x6ffffe00,
  DT_AUDIT = 0x6ffffefc,
  DT_AUXILIARY = 0x7ffffffd,
  DT_BIND_NOW = 24,
  DT_CHECKSUM = 0x6ffffdf8,
  DT_CONFIG = 0x6ffffefa,
  DT_DEBUG = 21,
  DT_DEPAUDIT = 0x6ffffefb,
  DT_ENCODING = 32,
  DT_FEATURE = 0x6ffffdfc,
  DT_FILTER = 0x7fffffff,
  DT_FINI = 13,
  DT_FINI_ARRAY = 26,
  DT_FINI_ARRAYSZ = 28,
  DT_FLAGS = 30,
  DT_FLAGS_1 = 0x6ffffffb,
  DT_GNU_CONFLICT = 0x6ffffef8,
  DT_GNU_CONFLICTSZ = 0x6ffffdf6,
  DT_GNU_HASH = 0x6ffffef5,
  DT_GNU_LIBLIST = 0x6ffffef9,
  DT_GNU_LIBLISTSZ = 0x6ffffdf7,
  DT_GNU_PRELINKED = 0x6ffffdf5,
  DT_HASH = 4,
  DT_HIOS = 0x6ffff000,
  DT_HIPROC = 0x7fffffff,
  DT_INIT = 12,
  DT_INIT_ARRAY = 25,
  DT_INIT_ARRAYSZ = 27,
  DT_JMPREL = 23,
  DT_LOOS = 0x6000000d,
  DT_LOPROC = 0x70000000,
  DT_MIPS_AUX_DYNAMIC = 0x70000031,
  DT_MIPS_BASE_ADDRESS = 0x70000006,
  DT_MIPS_COMPACT_SIZE = 0x7000002f,
  DT_MIPS_CONFLICT = 0x70000008,
  DT_MIPS_CONFLICTNO = 0x7000000b,
  DT_MIPS_CXX_FLAGS = 0x70000022,
  DT_MIPS_DELTA_CLASS = 0x70000017,
  DT_MIPS_DELTA_CLASSSYM = 0x70000020,
  DT_MIPS_DELTA_CLASSSYM_NO = 0x70000021,
  DT_MIPS_DELTA_CLASS_NO = 0x70000018,
  DT_MIPS_DELTA_INSTANCE = 0x70000019,
  DT_MIPS_DELTA_INSTANCE_NO = 0x7000001a,
  DT_MIPS_DELTA_RELOC = 0x7000001b,
  DT_MIPS_DELTA_RELOC_NO = 0x7000001c,
  DT_MIPS_DELTA_SYM = 0x7000001d,
  DT_MIPS_DELTA_SYM_NO = 0x7000001e,
  DT_MIPS_DYNSTR_ALIGN = 0x7000002b,
  DT_MIPS_FLAGS = 0x70000005,
  DT_MIPS_GOTSYM = 0x70000013,
  DT_MIPS_GP_VALUE = 0x70000030,
  DT_MIPS_HIDDEN_GOTIDX = 0x70000027,
  DT_MIPS_HIPAGENO = 0x70000014,
  DT_MIPS_ICHECKSUM = 0x70000003,
  DT_MIPS_INTERFACE = 0x7000002a,
  DT_MIPS_INTERFACE_SIZE = 0x7000002c,
  DT_MIPS_IVERSION = 0x70000004,
  DT_MIPS_LIBLIST = 0x70000009,
  DT_MIPS_LIBLISTNO = 0x70000010,
  DT_MIPS_LOCALPAGE_GOTIDX = 0x70000025,
  DT_MIPS_LOCAL_GOTIDX = 0x70000026,
  DT_MIPS_LOCAL_GOTNO = 0x7000000a,
  DT_MIPS_MSYM = 0x70000007,
  DT_MIPS_OPTIONS = 0x70000029,
  DT_MIPS_PERF_SUFFIX = 0x7000002e,
  DT_MIPS_PIXIE_INIT = 0x70000023,
  DT_MIPS_PLTGOT = 0x70000032,
  DT_MIPS_PROTECTED_GOTIDX = 0x70000028,
  DT_MIPS_RLD_MAP = 0x70000016,
  DT_MIPS_RLD_MAP_REL = 0x70000035,
  DT_MIPS_RLD_TEXT_RESOLVE_ADDR = 0x7000002d,
  DT_MIPS_RLD_VERSION = 0x70000001,
  DT_MIPS_RWPLT = 0x70000034,
  DT_MIPS_SYMBOL_LIB = 0x70000024,
  DT_MIPS_SYMTABNO = 0x70000011,
  DT_MIPS_TIME_STAMP = 0x70000002,
  DT_MIPS_UNREFEXTNO = 0x70000012,
  DT_MOVEENT = 0x6ffffdfa,
  DT_MOVESZ = 0x6ffffdfb,
  DT_MOVETAB = 0x6ffffefe,
  DT_NEEDED = 1,
  DT_NULL = 0,
  DT_PLTGOT = 3,
  DT_PLTPAD = 0x6ffffefd,
  DT_PLTPADSZ = 0x6ffffdf9,
  DT_PLTREL = 20,
  DT_PLTRELSZ = 2,
  DT_POSFLAG_1 = 0x6ffffdfd,
  DT_PPC64_GLINK = 0x70000000,
  DT_PPC64_OPD = 0x70000001,
  DT_PPC64_OPDSZ = 0x70000002,
  DT_PPC64_OPT = 0x70000003,
  DT_PPC_GOT = 0x70000000,
  DT_PPC_OPT = 0x70000001,
  DT_PREINIT_ARRAY = 32,
  DT_PREINIT_ARRAYSZ = 33,
  DT_REL = 17,
  DT_RELA = 7,
  DT_RELACOUNT = 0x6ffffff9,
  DT_RELAENT = 9,
  DT_RELASZ = 8,
  DT_RELCOUNT = 0x6ffffffa,
  DT_RELENT = 19,
  DT_RELSZ = 18,
  DT_RPATH = 15,
  DT_RUNPATH = 29,
  DT_SONAME = 14,
  DT_SPARC_REGISTER = 0x70000001,
  DT_STRSZ = 10,
  DT_STRTAB = 5,
  DT_SYMBOLIC = 16,
  DT_SYMENT = 11,
  DT_SYMINENT = 0x6ffffdff,
  DT_SYMINFO = 0x6ffffeff,
  DT_SYMINSZ = 0x6ffffdfe,
  DT_SYMTAB = 6,
  DT_SYMTAB_SHNDX = 34,
  DT_TEXTREL = 22,
  DT_TLSDESC_GOT = 0x6ffffef7,
  DT_TLSDESC_PLT = 0x6ffffef6,
  DT_USED = 0x7ffffffe,
  DT_VALRNGHI = 0x6ffffdff,
  DT_VALRNGLO = 0x6ffffd00,
  DT_VERDEF = 0x6ffffffc,
  DT_VERDEFNUM = 0x6ffffffd,
  DT_VERNEED = 0x6ffffffe,
  DT_VERNEEDNUM = 0x6fffffff,
  DT_VERSYM = 0x6ffffff0,
}

pub const DT_ADDRRNGHI: DynTag = 0x6ffffeff

pub const DT_ADDRRNGLO: DynTag = 0x6ffffe00

pub const DT_AUDIT: DynTag = 0x6ffffefc

pub const DT_AUXILIARY: DynTag = 0x7ffffffd

pub const DT_BIND_NOW: DynTag = 24

pub const DT_CHECKSUM: DynTag = 0x6ffffdf8

pub const DT_CONFIG: DynTag = 0x6ffffefa

pub const DT_DEBUG: DynTag = 21

pub const DT_DEPAUDIT: DynTag = 0x6ffffefb

pub const DT_ENCODING: DynTag = 32

pub const DT_FEATURE: DynTag = 0x6ffffdfc

pub const DT_FILTER: DynTag = 0x7fffffff

pub const DT_FINI: DynTag = 13

pub const DT_FINI_ARRAY: DynTag = 26

pub const DT_FINI_ARRAYSZ: DynTag = 28

pub const DT_FLAGS: DynTag = 30

pub const DT_FLAGS_1: DynTag = 0x6ffffffb

pub const DT_GNU_CONFLICT: DynTag = 0x6ffffef8

pub const DT_GNU_CONFLICTSZ: DynTag = 0x6ffffdf6

pub const DT_GNU_HASH: DynTag = 0x6ffffef5

pub const DT_GNU_LIBLIST: DynTag = 0x6ffffef9

pub const DT_GNU_LIBLISTSZ: DynTag = 0x6ffffdf7

pub const DT_GNU_PRELINKED: DynTag = 0x6ffffdf5

pub const DT_HASH: DynTag = 4

pub const DT_HIOS: DynTag = 0x6ffff000

pub const DT_HIPROC: DynTag = 0x7fffffff

pub const DT_INIT: DynTag = 12

pub const DT_INIT_ARRAY: DynTag = 25

pub const DT_INIT_ARRAYSZ: DynTag = 27

pub const DT_JMPREL: DynTag = 23

pub const DT_LOOS: DynTag = 0x6000000d

pub const DT_LOPROC: DynTag = 0x70000000

pub const DT_MIPS_AUX_DYNAMIC: DynTag = 0x70000031

pub const DT_MIPS_BASE_ADDRESS: DynTag = 0x70000006

pub const DT_MIPS_COMPACT_SIZE: DynTag = 0x7000002f

pub const DT_MIPS_CONFLICT: DynTag = 0x70000008

pub const DT_MIPS_CONFLICTNO: DynTag = 0x7000000b

pub const DT_MIPS_CXX_FLAGS: DynTag = 0x70000022

pub const DT_MIPS_DELTA_CLASS: DynTag = 0x70000017

pub const DT_MIPS_DELTA_CLASSSYM: DynTag = 0x70000020

pub const DT_MIPS_DELTA_CLASSSYM_NO: DynTag = 0x70000021

pub const DT_MIPS_DELTA_CLASS_NO: DynTag = 0x70000018

pub const DT_MIPS_DELTA_INSTANCE: DynTag = 0x70000019

pub const DT_MIPS_DELTA_INSTANCE_NO: DynTag = 0x7000001a

pub const DT_MIPS_DELTA_RELOC: DynTag = 0x7000001b

pub const DT_MIPS_DELTA_RELOC_NO: DynTag = 0x7000001c

pub const DT_MIPS_DELTA_SYM: DynTag = 0x7000001d

pub const DT_MIPS_DELTA_SYM_NO: DynTag = 0x7000001e

pub const DT_MIPS_DYNSTR_ALIGN: DynTag = 0x7000002b

pub const DT_MIPS_FLAGS: DynTag = 0x70000005

pub const DT_MIPS_GOTSYM: DynTag = 0x70000013

pub const DT_MIPS_GP_VALUE: DynTag = 0x70000030

pub const DT_MIPS_HIDDEN_GOTIDX: DynTag = 0x70000027

pub const DT_MIPS_HIPAGENO: DynTag = 0x70000014

pub const DT_MIPS_ICHECKSUM: DynTag = 0x70000003

pub const DT_MIPS_INTERFACE: DynTag = 0x7000002a

pub const DT_MIPS_INTERFACE_SIZE: DynTag = 0x7000002c

pub const DT_MIPS_IVERSION: DynTag = 0x70000004

pub const DT_MIPS_LIBLIST: DynTag = 0x70000009

pub const DT_MIPS_LIBLISTNO: DynTag = 0x70000010

pub const DT_MIPS_LOCALPAGE_GOTIDX: DynTag = 0x70000025

pub const DT_MIPS_LOCAL_GOTIDX: DynTag = 0x70000026

pub const DT_MIPS_LOCAL_GOTNO: DynTag = 0x7000000a

pub const DT_MIPS_MSYM: DynTag = 0x70000007

pub const DT_MIPS_OPTIONS: DynTag = 0x70000029

pub const DT_MIPS_PERF_SUFFIX: DynTag = 0x7000002e

pub const DT_MIPS_PIXIE_INIT: DynTag = 0x70000023

pub const DT_MIPS_PLTGOT: DynTag = 0x70000032

pub const DT_MIPS_PROTECTED_GOTIDX: DynTag = 0x70000028

pub const DT_MIPS_RLD_MAP: DynTag = 0x70000016

pub const DT_MIPS_RLD_MAP_REL: DynTag = 0x70000035

pub const DT_MIPS_RLD_TEXT_RESOLVE_ADDR: DynTag = 0x7000002d

pub const DT_MIPS_RLD_VERSION: DynTag = 0x70000001

pub const DT_MIPS_RWPLT: DynTag = 0x70000034

pub const DT_MIPS_SYMBOL_LIB: DynTag = 0x70000024

pub const DT_MIPS_SYMTABNO: DynTag = 0x70000011

pub const DT_MIPS_TIME_STAMP: DynTag = 0x70000002

pub const DT_MIPS_UNREFEXTNO: DynTag = 0x70000012

pub const DT_MOVEENT: DynTag = 0x6ffffdfa

pub const DT_MOVESZ: DynTag = 0x6ffffdfb

pub const DT_MOVETAB: DynTag = 0x6ffffefe

pub const DT_NEEDED: DynTag = 1

pub const DT_NULL: DynTag = 0

pub const DT_PLTGOT: DynTag = 3

pub const DT_PLTPAD: DynTag = 0x6ffffefd

pub const DT_PLTPADSZ: DynTag = 0x6ffffdf9

pub const DT_PLTREL: DynTag = 20

pub const DT_PLTRELSZ: DynTag = 2

pub const DT_POSFLAG_1: DynTag = 0x6ffffdfd

pub const DT_PPC64_GLINK: DynTag = 0x70000000

pub const DT_PPC64_OPD: DynTag = 0x70000001

pub const DT_PPC64_OPDSZ: DynTag = 0x70000002

pub const DT_PPC64_OPT: DynTag = 0x70000003

pub const DT_PPC_GOT: DynTag = 0x70000000

pub const DT_PPC_OPT: DynTag = 0x70000001

pub const DT_PREINIT_ARRAY: DynTag = 32

pub const DT_PREINIT_ARRAYSZ: DynTag = 33

pub const DT_REL: DynTag = 17

pub const DT_RELA: DynTag = 7

pub const DT_RELACOUNT: DynTag = 0x6ffffff9

pub const DT_RELAENT: DynTag = 9

pub const DT_RELASZ: DynTag = 8

pub const DT_RELCOUNT: DynTag = 0x6ffffffa

pub const DT_RELENT: DynTag = 19

pub const DT_RELSZ: DynTag = 18

pub const DT_RPATH: DynTag = 15

pub const DT_RUNPATH: DynTag = 29

pub const DT_SONAME: DynTag = 14

pub const DT_SPARC_REGISTER: DynTag = 0x70000001

pub const DT_STRSZ: DynTag = 10

pub const DT_STRTAB: DynTag = 5

pub const DT_SYMBOLIC: DynTag = 16

pub const DT_SYMENT: DynTag = 11

pub const DT_SYMINENT: DynTag = 0x6ffffdff

pub const DT_SYMINFO: DynTag = 0x6ffffeff

pub const DT_SYMINSZ: DynTag = 0x6ffffdfe

pub const DT_SYMTAB: DynTag = 6

pub const DT_SYMTAB_SHNDX: DynTag = 34

pub const DT_TEXTREL: DynTag = 22

pub const DT_TLSDESC_GOT: DynTag = 0x6ffffef7

pub const DT_TLSDESC_PLT: DynTag = 0x6ffffef6

pub const DT_USED: DynTag = 0x7ffffffe

pub const DT_VALRNGHI: DynTag = 0x6ffffdff

pub const DT_VALRNGLO: DynTag = 0x6ffffd00

pub const DT_VERDEF: DynTag = 0x6ffffffc

pub const DT_VERDEFNUM: DynTag = 0x6ffffffd

pub const DT_VERNEED: DynTag = 0x6ffffffe

pub const DT_VERNEEDNUM: DynTag = 0x6fffffff

pub const DT_VERSYM: DynTag = 0x6ffffff0

pub enum Machine: uint16 {
  EM_386 = 3,
  EM_486 = 6,
  EM_56800EX = 200,
  EM_68HC05 = 72,
  EM_68HC08 = 71,
  EM_68HC11 = 70,
  EM_68HC12 = 53,
  EM_68HC16 = 69,
  EM_68K = 4,
  EM_78KOR = 199,
  EM_8051 = 165,
  EM_860 = 7,
  EM_88K = 5,
  EM_960 = 19,
  EM_AARCH64 = 183,
  EM_ALPHA = 0x9026,
  EM_ALPHA_STD = 41,
  EM_ALTERA_NIOS2 = 113,
  EM_AMDGPU = 224,
  EM_ARC = 45,
  EM_ARCA = 109,
  EM_ARC_COMPACT = 93,
  EM_ARC_COMPACT2 = 195,
  EM_ARM = 40,
  EM_AVR = 83,
  EM_AVR32 = 185,
  EM_BA1 = 201,
  EM_BA2 = 202,
  EM_BLACKFIN = 106,
  EM_BPF = 247,
  EM_C166 = 116,
  EM_CDP = 215,
  EM_CE = 119,
  EM_CLOUDSHIELD = 192,
  EM_COGE = 216,
  EM_COLDFIRE = 52,
  EM_COOL = 217,
  EM_COREA_1ST = 193,
  EM_COREA_2ND = 194,
  EM_CR = 103,
  EM_CR16 = 177,
  EM_CRAYNV2 = 172,
  EM_CRIS = 76,
  EM_CRX = 114,
  EM_CSR_KALIMBA = 219,
  EM_CUDA = 190,
  EM_CYPRESS_M8C = 161,
  EM_D10V = 85,
  EM_D30V = 86,
  EM_DSP24 = 136,
  EM_DSPIC30F = 118,
  EM_DXP = 112,
  EM_ECOG1 = 168,
  EM_ECOG16 = 176,
  EM_ECOG1X = 168,
  EM_ECOG2 = 134,
  EM_ETPU = 178,
  EM_EXCESS = 111,
  EM_F2MC16 = 104,
  EM_FIREPATH = 78,
  EM_FR20 = 37,
  EM_FR30 = 84,
  EM_FT32 = 222,
  EM_FX66 = 66,
  EM_H8S = 48,
  EM_H8_300 = 46,
  EM_H8_300H = 47,
  EM_H8_500 = 49,
  EM_HUANY = 81,
  EM_IA_64 = 50,
  EM_INTEL205 = 205,
  EM_INTEL206 = 206,
  EM_INTEL207 = 207,
  EM_INTEL208 = 208,
  EM_INTEL209 = 209,
  EM_IP2K = 101,
  EM_JAVELIN = 77,
  EM_K10M = 181,
  EM_KM32 = 210,
  EM_KMX16 = 212,
  EM_KMX32 = 211,
  EM_KMX8 = 213,
  EM_KVARC = 214,
  EM_L10M = 180,
  EM_LANAI = 244,
  EM_LATTICEMICO32 = 138,
  EM_LOONGARCH = 258,
  EM_M16C = 117,
  EM_M32 = 1,
  EM_M32C = 120,
  EM_M32R = 88,
  EM_MANIK = 171,
  EM_MAX = 102,
  EM_MAXQ30 = 169,
  EM_MCHP_PIC = 204,
  EM_MCST_ELBRUS = 175,
  EM_ME16 = 59,
  EM_METAG = 174,
  EM_MICROBLAZE = 189,
  EM_MIPS = 8,
  EM_MIPS_RS3_LE = 10,
  EM_MIPS_RS4_BE = 10,
  EM_MIPS_X = 51,
  EM_MMA = 54,
  EM_MMDSP_PLUS = 160,
  EM_MMIX = 80,
  EM_MN10200 = 90,
  EM_MN10300 = 89,
  EM_MOXIE = 223,
  EM_MSP430 = 105,
  EM_NCPU = 56,
  EM_NDR1 = 57,
  EM_NDS32 = 167,
  EM_NONE = 0,
  EM_NORC = 218,
  EM_NS32K = 97,
  EM_OPEN8 = 196,
  EM_OPENRISC = 92,
  EM_PARISC = 15,
  EM_PCP = 55,
  EM_PDP10 = 64,
  EM_PDP11 = 65,
  EM_PDSP = 63,
  EM_PJ = 91,
  EM_PPC = 20,
  EM_PPC64 = 21,
  EM_PRISM = 82,
  EM_QDSP6 = 164,
  EM_R32C = 162,
  EM_RCE = 39,
  EM_RH32 = 38,
  EM_RISCV = 243,
  EM_RL78 = 197,
  EM_RS08 = 132,
  EM_RX = 173,
  EM_S370 = 9,
  EM_S390 = 22,
  EM_SCORE7 = 135,
  EM_SEP = 108,
  EM_SE_C17 = 139,
  EM_SE_C33 = 107,
  EM_SH = 42,
  EM_SHARC = 133,
  EM_SLE9X = 179,
  EM_SNP1K = 99,
  EM_SPARC = 2,
  EM_SPARC32PLUS = 18,
  EM_SPARCV9 = 43,
  EM_ST100 = 60,
  EM_ST19 = 74,
  EM_ST200 = 100,
  EM_ST7 = 68,
  EM_ST9PLUS = 67,
  EM_STARCORE = 58,
  EM_STM8 = 186,
  EM_STXP7X = 166,
  EM_SVX = 73,
  EM_TILE64 = 187,
  EM_TILEGX = 191,
  EM_TILEPRO = 188,
  EM_TINYJ = 61,
  EM_TI_ARP32 = 143,
  EM_TI_C2000 = 141,
  EM_TI_C5500 = 142,
  EM_TI_C6000 = 140,
  EM_TI_PRU = 144,
  EM_TMM_GPP = 96,
  EM_TPC = 98,
  EM_TRICORE = 44,
  EM_TRIMEDIA = 163,
  EM_TSK3000 = 131,
  EM_UNICORE = 110,
  EM_V800 = 36,
  EM_V850 = 87,
  EM_VAX = 75,
  EM_VIDEOCORE = 95,
  EM_VIDEOCORE3 = 137,
  EM_VIDEOCORE5 = 198,
  EM_VISIUM = 221,
  EM_VPP500 = 17,
  EM_X86_64 = 62,
  EM_XCORE = 203,
  EM_XGATE = 115,
  EM_XIMO16 = 170,
  EM_XTENSA = 94,
  EM_Z80 = 220,
  EM_ZSP = 79,
}

pub const EM_386: Machine = 3

pub const EM_486: Machine = 6

pub const EM_56800EX: Machine = 200

pub const EM_68HC05: Machine = 72

pub const EM_68HC08: Machine = 71

pub const EM_68HC11: Machine = 70

pub const EM_68HC12: Machine = 53

pub const EM_68HC16: Machine = 69

pub const EM_68K: Machine = 4

pub const EM_78KOR: Machine = 199

pub const EM_8051: Machine = 165

pub const EM_860: Machine = 7

pub const EM_88K: Machine = 5

pub const EM_960: Machine = 19

pub const EM_AARCH64: Machine = 183

pub const EM_ALPHA: Machine = 0x9026

pub const EM_ALPHA_STD: Machine = 41

pub const EM_ALTERA_NIOS2: Machine = 113

pub const EM_AMDGPU: Machine = 224

pub const EM_ARC: Machine = 45

pub const EM_ARCA: Machine = 109

pub const EM_ARC_COMPACT: Machine = 93

pub const EM_ARC_COMPACT2: Machine = 195

pub const EM_ARM: Machine = 40

pub const EM_AVR: Machine = 83

pub const EM_AVR32: Machine = 185

pub const EM_BA1: Machine = 201

pub const EM_BA2: Machine = 202

pub const EM_BLACKFIN: Machine = 106

pub const EM_BPF: Machine = 247

pub const EM_C166: Machine = 116

pub const EM_CDP: Machine = 215

pub const EM_CE: Machine = 119

pub const EM_CLOUDSHIELD: Machine = 192

pub const EM_COGE: Machine = 216

pub const EM_COLDFIRE: Machine = 52

pub const EM_COOL: Machine = 217

pub const EM_COREA_1ST: Machine = 193

pub const EM_COREA_2ND: Machine = 194

pub const EM_CR: Machine = 103

pub const EM_CR16: Machine = 177

pub const EM_CRAYNV2: Machine = 172

pub const EM_CRIS: Machine = 76

pub const EM_CRX: Machine = 114

pub const EM_CSR_KALIMBA: Machine = 219

pub const EM_CUDA: Machine = 190

pub const EM_CYPRESS_M8C: Machine = 161

pub const EM_D10V: Machine = 85

pub const EM_D30V: Machine = 86

pub const EM_DSP24: Machine = 136

pub const EM_DSPIC30F: Machine = 118

pub const EM_DXP: Machine = 112

pub const EM_ECOG1: Machine = 168

pub const EM_ECOG16: Machine = 176

pub const EM_ECOG1X: Machine = 168

pub const EM_ECOG2: Machine = 134

pub const EM_ETPU: Machine = 178

pub const EM_EXCESS: Machine = 111

pub const EM_F2MC16: Machine = 104

pub const EM_FIREPATH: Machine = 78

pub const EM_FR20: Machine = 37

pub const EM_FR30: Machine = 84

pub const EM_FT32: Machine = 222

pub const EM_FX66: Machine = 66

pub const EM_H8S: Machine = 48

pub const EM_H8_300: Machine = 46

pub const EM_H8_300H: Machine = 47

pub const EM_H8_500: Machine = 49

pub const EM_HUANY: Machine = 81

pub const EM_IA_64: Machine = 50

pub const EM_INTEL205: Machine = 205

pub const EM_INTEL206: Machine = 206

pub const EM_INTEL207: Machine = 207

pub const EM_INTEL208: Machine = 208

pub const EM_INTEL209: Machine = 209

pub const EM_IP2K: Machine = 101

pub const EM_JAVELIN: Machine = 77

pub const EM_K10M: Machine = 181

pub const EM_KM32: Machine = 210

pub const EM_KMX16: Machine = 212

pub const EM_KMX32: Machine = 211

pub const EM_KMX8: Machine = 213

pub const EM_KVARC: Machine = 214

pub const EM_L10M: Machine = 180

pub const EM_LANAI: Machine = 244

pub const EM_LATTICEMICO32: Machine = 138

pub const EM_LOONGARCH: Machine = 258

pub const EM_M16C: Machine = 117

pub const EM_M32: Machine = 1

pub const EM_M32C: Machine = 120

pub const EM_M32R: Machine = 88

pub const EM_MANIK: Machine = 171

pub const EM_MAX: Machine = 102

pub const EM_MAXQ30: Machine = 169

pub const EM_MCHP_PIC: Machine = 204

pub const EM_MCST_ELBRUS: Machine = 175

pub const EM_ME16: Machine = 59

pub const EM_METAG: Machine = 174

pub const EM_MICROBLAZE: Machine = 189

pub const EM_MIPS: Machine = 8

pub const EM_MIPS_RS3_LE: Machine = 10

pub const EM_MIPS_RS4_BE: Machine = 10

pub const EM_MIPS_X: Machine = 51

pub const EM_MMA: Machine = 54

pub const EM_MMDSP_PLUS: Machine = 160

pub const EM_MMIX: Machine = 80

pub const EM_MN10200: Machine = 90

pub const EM_MN10300: Machine = 89

pub const EM_MOXIE: Machine = 223

pub const EM_MSP430: Machine = 105

pub const EM_NCPU: Machine = 56

pub const EM_NDR1: Machine = 57

pub const EM_NDS32: Machine = 167

pub const EM_NONE: Machine = 0

pub const EM_NORC: Machine = 218

pub const EM_NS32K: Machine = 97

pub const EM_OPEN8: Machine = 196

pub const EM_OPENRISC: Machine = 92

pub const EM_PARISC: Machine = 15

pub const EM_PCP: Machine = 55

pub const EM_PDP10: Machine = 64

pub const EM_PDP11: Machine = 65

pub const EM_PDSP: Machine = 63

pub const EM_PJ: Machine = 91

pub const EM_PPC: Machine = 20

pub const EM_PPC64: Machine = 21

pub const EM_PRISM: Machine = 82

pub const EM_QDSP6: Machine = 164

pub const EM_R32C: Machine = 162

pub const EM_RCE: Machine = 39

pub const EM_RH32: Machine = 38

pub const EM_RISCV: Machine = 243

pub const EM_RL78: Machine = 197

pub const EM_RS08: Machine = 132

pub const EM_RX: Machine = 173

pub const EM_S370: Machine = 9

pub const EM_S390: Machine = 22

pub const EM_SCORE7: Machine = 135

pub const EM_SEP: Machine = 108

pub const EM_SE_C17: Machine = 139

pub const EM_SE_C33: Machine = 107

pub const EM_SH: Machine = 42

pub const EM_SHARC: Machine = 133

pub const EM_SLE9X: Machine = 179

pub const EM_SNP1K: Machine = 99

pub const EM_SPARC: Machine = 2

pub const EM_SPARC32PLUS: Machine = 18

pub const EM_SPARCV9: Machine = 43

pub const EM_ST100: Machine = 60

pub const EM_ST19: Machine = 74

pub const EM_ST200: Machine = 100

pub const EM_ST7: Machine = 68

pub const EM_ST9PLUS: Machine = 67

pub const EM_STARCORE: Machine = 58

pub const EM_STM8: Machine = 186

pub const EM_STXP7X: Machine = 166

pub const EM_SVX: Machine = 73

pub const EM_TILE64: Machine = 187

pub const EM_TILEGX: Machine = 191

pub const EM_TILEPRO: Machine = 188

pub const EM_TINYJ: Machine = 61

pub const EM_TI_ARP32: Machine = 143

pub const EM_TI_C2000: Machine = 141

pub const EM_TI_C5500: Machine = 142

pub const EM_TI_C6000: Machine = 140

pub const EM_TI_PRU: Machine = 144

pub const EM_TMM_GPP: Machine = 96

pub const EM_TPC: Machine = 98

pub const EM_TRICORE: Machine = 44

pub const EM_TRIMEDIA: Machine = 163

pub const EM_TSK3000: Machine = 131

pub const EM_UNICORE: Machine = 110

pub const EM_V800: Machine = 36

pub const EM_V850: Machine = 87

pub const EM_VAX: Machine = 75

pub const EM_VIDEOCORE: Machine = 95

pub const EM_VIDEOCORE3: Machine = 137

pub const EM_VIDEOCORE5: Machine = 198

pub const EM_VISIUM: Machine = 221

pub const EM_VPP500: Machine = 17

pub const EM_X86_64: Machine = 62

pub const EM_XCORE: Machine = 203

pub const EM_XGATE: Machine = 115

pub const EM_XIMO16: Machine = 170

pub const EM_XTENSA: Machine = 94

pub const EM_Z80: Machine = 220

pub const EM_ZSP: Machine = 79

pub enum OSABI: byte {
  ELFOSABI_86OPEN = 5,
  ELFOSABI_AIX = 7,
  ELFOSABI_ARM = 97,
  ELFOSABI_AROS = 15,
  ELFOSABI_CLOUDABI = 17,
  ELFOSABI_FENIXOS = 16,
  ELFOSABI_FREEBSD = 9,
  ELFOSABI_HPUX = 1,
  ELFOSABI_HURD = 4,
  ELFOSABI_IRIX = 8,
  ELFOSABI_LINUX = 3,
  ELFOSABI_MODESTO = 11,
  ELFOSABI_NETBSD = 2,
  ELFOSABI_NONE = 0,
  ELFOSABI_NSK = 14,
  ELFOSABI_OPENBSD = 12,
  ELFOSABI_OPENVMS = 13,
  ELFOSABI_SOLARIS = 6,
  ELFOSABI_STANDALONE = 255,
  ELFOSABI_TRU64 = 10,
}

pub const ELFOSABI_86OPEN: OSABI = 5

pub const ELFOSABI_AIX: OSABI = 7

pub const ELFOSABI_ARM: OSABI = 97

pub const ELFOSABI_AROS: OSABI = 15

pub const ELFOSABI_CLOUDABI: OSABI = 17

pub const ELFOSABI_FENIXOS: OSABI = 16

pub const ELFOSABI_FREEBSD: OSABI = 9

pub const ELFOSABI_HPUX: OSABI = 1

pub const ELFOSABI_HURD: OSABI = 4

pub const ELFOSABI_IRIX: OSABI = 8

pub const ELFOSABI_LINUX: OSABI = 3

pub const ELFOSABI_MODESTO: OSABI = 11

pub const ELFOSABI_NETBSD: OSABI = 2

pub const ELFOSABI_NONE: OSABI = 0

pub const ELFOSABI_NSK: OSABI = 14

pub const ELFOSABI_OPENBSD: OSABI = 12

pub const ELFOSABI_OPENVMS: OSABI = 13

pub const ELFOSABI_SOLARIS: OSABI = 6

pub const ELFOSABI_STANDALONE: OSABI = 255

pub const ELFOSABI_TRU64: OSABI = 10

pub enum ProgType: int {
  PT_AARCH64_ARCHEXT = 0x70000000,
  PT_AARCH64_UNWIND = 0x70000001,
  PT_ARM_ARCHEXT = 0x70000000,
  PT_ARM_EXIDX = 0x70000001,
  PT_DYNAMIC = 2,
  PT_GNU_EH_FRAME = 0x6474e550,
  PT_GNU_MBIND_HI = 0x6474f554,
  PT_GNU_MBIND_LO = 0x6474e555,
  PT_GNU_PROPERTY = 0x6474e553,
  PT_GNU_RELRO = 0x6474e552,
  PT_GNU_STACK = 0x6474e551,
  PT_HIOS = 0x6fffffff,
  PT_HIPROC = 0x7fffffff,
  PT_INTERP = 3,
  PT_LOAD = 1,
  PT_LOOS = 0x60000000,
  PT_LOPROC = 0x70000000,
  PT_MIPS_ABIFLAGS = 0x70000003,
  PT_MIPS_OPTIONS = 0x70000002,
  PT_MIPS_REGINFO = 0x70000000,
  PT_MIPS_RTPROC = 0x70000001,
  PT_NOTE = 4,
  PT_NULL = 0,
  PT_OPENBSD_BOOTDATA = 0x65a41be6,
  PT_OPENBSD_NOBTCFI = 0x65a3dbe8,
  PT_OPENBSD_RANDOMIZE = 0x65a3dbe6,
  PT_OPENBSD_WXNEEDED = 0x65a3dbe7,
  PT_PAX_FLAGS = 0x65041580,
  PT_PHDR = 6,
  PT_RISCV_ATTRIBUTES = 0x70000003,
  PT_S390_PGSTE = 0x70000000,
  PT_SHLIB = 5,
  PT_SUNWSTACK = 0x6ffffffb,
  PT_SUNW_EH_FRAME = 0x6474e550,
  PT_TLS = 7,
}

pub const PT_AARCH64_ARCHEXT: ProgType = 0x70000000

pub const PT_AARCH64_UNWIND: ProgType = 0x70000001

pub const PT_ARM_ARCHEXT: ProgType = 0x70000000

pub const PT_ARM_EXIDX: ProgType = 0x70000001

pub const PT_DYNAMIC: ProgType = 2

pub const PT_GNU_EH_FRAME: ProgType = 0x6474e550

pub const PT_GNU_MBIND_HI: ProgType = 0x6474f554

pub const PT_GNU_MBIND_LO: ProgType = 0x6474e555

pub const PT_GNU_PROPERTY: ProgType = 0x6474e553

pub const PT_GNU_RELRO: ProgType = 0x6474e552

pub const PT_GNU_STACK: ProgType = 0x6474e551

pub const PT_HIOS: ProgType = 0x6fffffff

pub const PT_HIPROC: ProgType = 0x7fffffff

pub const PT_INTERP: ProgType = 3

pub const PT_LOAD: ProgType = 1

pub const PT_LOOS: ProgType = 0x60000000

pub const PT_LOPROC: ProgType = 0x70000000

pub const PT_MIPS_ABIFLAGS: ProgType = 0x70000003

pub const PT_MIPS_OPTIONS: ProgType = 0x70000002

pub const PT_MIPS_REGINFO: ProgType = 0x70000000

pub const PT_MIPS_RTPROC: ProgType = 0x70000001

pub const PT_NOTE: ProgType = 4

pub const PT_NULL: ProgType = 0

pub const PT_OPENBSD_BOOTDATA: ProgType = 0x65a41be6

pub const PT_OPENBSD_NOBTCFI: ProgType = 0x65a3dbe8

pub const PT_OPENBSD_RANDOMIZE: ProgType = 0x65a3dbe6

pub const PT_OPENBSD_WXNEEDED: ProgType = 0x65a3dbe7

pub const PT_PAX_FLAGS: ProgType = 0x65041580

pub const PT_PHDR: ProgType = 6

pub const PT_RISCV_ATTRIBUTES: ProgType = 0x70000003

pub const PT_S390_PGSTE: ProgType = 0x70000000

pub const PT_SHLIB: ProgType = 5

pub const PT_SUNWSTACK: ProgType = 0x6ffffffb

pub const PT_SUNW_EH_FRAME: ProgType = 0x6474e550

pub const PT_TLS: ProgType = 7

pub enum R_386: int {
  R_386_16 = 20,
  R_386_32 = 1,
  R_386_32PLT = 11,
  R_386_8 = 22,
  R_386_COPY = 5,
  R_386_GLOB_DAT = 6,
  R_386_GOT32 = 3,
  R_386_GOT32X = 43,
  R_386_GOTOFF = 9,
  R_386_GOTPC = 10,
  R_386_IRELATIVE = 42,
  R_386_JMP_SLOT = 7,
  R_386_NONE = 0,
  R_386_PC16 = 21,
  R_386_PC32 = 2,
  R_386_PC8 = 23,
  R_386_PLT32 = 4,
  R_386_RELATIVE = 8,
  R_386_SIZE32 = 38,
  R_386_TLS_DESC = 41,
  R_386_TLS_DESC_CALL = 40,
  R_386_TLS_DTPMOD32 = 35,
  R_386_TLS_DTPOFF32 = 36,
  R_386_TLS_GD = 18,
  R_386_TLS_GD_32 = 24,
  R_386_TLS_GD_CALL = 26,
  R_386_TLS_GD_POP = 27,
  R_386_TLS_GD_PUSH = 25,
  R_386_TLS_GOTDESC = 39,
  R_386_TLS_GOTIE = 16,
  R_386_TLS_IE = 15,
  R_386_TLS_IE_32 = 33,
  R_386_TLS_LDM = 19,
  R_386_TLS_LDM_32 = 28,
  R_386_TLS_LDM_CALL = 30,
  R_386_TLS_LDM_POP = 31,
  R_386_TLS_LDM_PUSH = 29,
  R_386_TLS_LDO_32 = 32,
  R_386_TLS_LE = 17,
  R_386_TLS_LE_32 = 34,
  R_386_TLS_TPOFF = 14,
  R_386_TLS_TPOFF32 = 37,
}

pub const R_386_16: R_386 = 20

pub const R_386_32: R_386 = 1

pub const R_386_32PLT: R_386 = 11

pub const R_386_8: R_386 = 22

pub const R_386_COPY: R_386 = 5

pub const R_386_GLOB_DAT: R_386 = 6

pub const R_386_GOT32: R_386 = 3

pub const R_386_GOT32X: R_386 = 43

pub const R_386_GOTOFF: R_386 = 9

pub const R_386_GOTPC: R_386 = 10

pub const R_386_IRELATIVE: R_386 = 42

pub const R_386_JMP_SLOT: R_386 = 7

pub const R_386_NONE: R_386 = 0

pub const R_386_PC16: R_386 = 21

pub const R_386_PC32: R_386 = 2

pub const R_386_PC8: R_386 = 23

pub const R_386_PLT32: R_386 = 4

pub const R_386_RELATIVE: R_386 = 8

pub const R_386_SIZE32: R_386 = 38

pub const R_386_TLS_DESC: R_386 = 41

pub const R_386_TLS_DESC_CALL: R_386 = 40

pub const R_386_TLS_DTPMOD32: R_386 = 35

pub const R_386_TLS_DTPOFF32: R_386 = 36

pub const R_386_TLS_GD: R_386 = 18

pub const R_386_TLS_GD_32: R_386 = 24

pub const R_386_TLS_GD_CALL: R_386 = 26

pub const R_386_TLS_GD_POP: R_386 = 27

pub const R_386_TLS_GD_PUSH: R_386 = 25

pub const R_386_TLS_GOTDESC: R_386 = 39

pub const R_386_TLS_GOTIE: R_386 = 16

pub const R_386_TLS_IE: R_386 = 15

pub const R_386_TLS_IE_32: R_386 = 33

pub const R_386_TLS_LDM: R_386 = 19

pub const R_386_TLS_LDM_32: R_386 = 28

pub const R_386_TLS_LDM_CALL: R_386 = 30

pub const R_386_TLS_LDM_POP: R_386 = 31

pub const R_386_TLS_LDM_PUSH: R_386 = 29

pub const R_386_TLS_LDO_32: R_386 = 32

pub const R_386_TLS_LE: R_386 = 17

pub const R_386_TLS_LE_32: R_386 = 34

pub const R_386_TLS_TPOFF: R_386 = 14

pub const R_386_TLS_TPOFF32: R_386 = 37

pub enum R_390: int {
  R_390_12 = 2,
  R_390_16 = 3,
  R_390_20 = 57,
  R_390_32 = 4,
  R_390_64 = 22,
  R_390_8 = 1,
  R_390_COPY = 9,
  R_390_GLOB_DAT = 10,
  R_390_GOT12 = 6,
  R_390_GOT16 = 15,
  R_390_GOT20 = 58,
  R_390_GOT32 = 7,
  R_390_GOT64 = 24,
  R_390_GOTENT = 26,
  R_390_GOTOFF = 13,
  R_390_GOTOFF16 = 27,
  R_390_GOTOFF64 = 28,
  R_390_GOTPC = 14,
  R_390_GOTPCDBL = 21,
  R_390_GOTPLT12 = 29,
  R_390_GOTPLT16 = 30,
  R_390_GOTPLT20 = 59,
  R_390_GOTPLT32 = 31,
  R_390_GOTPLT64 = 32,
  R_390_GOTPLTENT = 33,
  R_390_GOTPLTOFF16 = 34,
  R_390_GOTPLTOFF32 = 35,
  R_390_GOTPLTOFF64 = 36,
  R_390_JMP_SLOT = 11,
  R_390_NONE = 0,
  R_390_PC16 = 16,
  R_390_PC16DBL = 17,
  R_390_PC32 = 5,
  R_390_PC32DBL = 19,
  R_390_PC64 = 23,
  R_390_PLT16DBL = 18,
  R_390_PLT32 = 8,
  R_390_PLT32DBL = 20,
  R_390_PLT64 = 25,
  R_390_RELATIVE = 12,
  R_390_TLS_DTPMOD = 54,
  R_390_TLS_DTPOFF = 55,
  R_390_TLS_GD32 = 40,
  R_390_TLS_GD64 = 41,
  R_390_TLS_GDCALL = 38,
  R_390_TLS_GOTIE12 = 42,
  R_390_TLS_GOTIE20 = 60,
  R_390_TLS_GOTIE32 = 43,
  R_390_TLS_GOTIE64 = 44,
  R_390_TLS_IE32 = 47,
  R_390_TLS_IE64 = 48,
  R_390_TLS_IEENT = 49,
  R_390_TLS_LDCALL = 39,
  R_390_TLS_LDM32 = 45,
  R_390_TLS_LDM64 = 46,
  R_390_TLS_LDO32 = 52,
  R_390_TLS_LDO64 = 53,
  R_390_TLS_LE32 = 50,
  R_390_TLS_LE64 = 51,
  R_390_TLS_LOAD = 37,
  R_390_TLS_TPOFF = 56,
}

pub const R_390_12: R_390 = 2

pub const R_390_16: R_390 = 3

pub const R_390_20: R_390 = 57

pub const R_390_32: R_390 = 4

pub const R_390_64: R_390 = 22

pub const R_390_8: R_390 = 1

pub const R_390_COPY: R_390 = 9

pub const R_390_GLOB_DAT: R_390 = 10

pub const R_390_GOT12: R_390 = 6

pub const R_390_GOT16: R_390 = 15

pub const R_390_GOT20: R_390 = 58

pub const R_390_GOT32: R_390 = 7

pub const R_390_GOT64: R_390 = 24

pub const R_390_GOTENT: R_390 = 26

pub const R_390_GOTOFF: R_390 = 13

pub const R_390_GOTOFF16: R_390 = 27

pub const R_390_GOTOFF64: R_390 = 28

pub const R_390_GOTPC: R_390 = 14

pub const R_390_GOTPCDBL: R_390 = 21

pub const R_390_GOTPLT12: R_390 = 29

pub const R_390_GOTPLT16: R_390 = 30

pub const R_390_GOTPLT20: R_390 = 59

pub const R_390_GOTPLT32: R_390 = 31

pub const R_390_GOTPLT64: R_390 = 32

pub const R_390_GOTPLTENT: R_390 = 33

pub const R_390_GOTPLTOFF16: R_390 = 34

pub const R_390_GOTPLTOFF32: R_390 = 35

pub const R_390_GOTPLTOFF64: R_390 = 36

pub const R_390_JMP_SLOT: R_390 = 11

pub const R_390_NONE: R_390 = 0

pub const R_390_PC16: R_390 = 16

pub const R_390_PC16DBL: R_390 = 17

pub const R_390_PC32: R_390 = 5

pub const R_390_PC32DBL: R_390 = 19

pub const R_390_PC64: R_390 = 23

pub const R_390_PLT16DBL: R_390 = 18

pub const R_390_PLT32: R_390 = 8

pub const R_390_PLT32DBL: R_390 = 20

pub const R_390_PLT64: R_390 = 25

pub const R_390_RELATIVE: R_390 = 12

pub const R_390_TLS_DTPMOD: R_390 = 54

pub const R_390_TLS_DTPOFF: R_390 = 55

pub const R_390_TLS_GD32: R_390 = 40

pub const R_390_TLS_GD64: R_390 = 41

pub const R_390_TLS_GDCALL: R_390 = 38

pub const R_390_TLS_GOTIE12: R_390 = 42

pub const R_390_TLS_GOTIE20: R_390 = 60

pub const R_390_TLS_GOTIE32: R_390 = 43

pub const R_390_TLS_GOTIE64: R_390 = 44

pub const R_390_TLS_IE32: R_390 = 47

pub const R_390_TLS_IE64: R_390 = 48

pub const R_390_TLS_IEENT: R_390 = 49

pub const R_390_TLS_LDCALL: R_390 = 39

pub const R_390_TLS_LDM32: R_390 = 45

pub const R_390_TLS_LDM64: R_390 = 46

pub const R_390_TLS_LDO32: R_390 = 52

pub const R_390_TLS_LDO64: R_390 = 53

pub const R_390_TLS_LE32: R_390 = 50

pub const R_390_TLS_LE64: R_390 = 51

pub const R_390_TLS_LOAD: R_390 = 37

pub const R_390_TLS_TPOFF: R_390 = 56

pub enum R_AARCH64: int {
  R_AARCH64_ABS16 = 259,
  R_AARCH64_ABS32 = 258,
  R_AARCH64_ABS64 = 257,
  R_AARCH64_ADD_ABS_LO12_NC = 277,
  R_AARCH64_ADR_GOT_PAGE = 311,
  R_AARCH64_ADR_PREL_LO21 = 274,
  R_AARCH64_ADR_PREL_PG_HI21 = 275,
  R_AARCH64_ADR_PREL_PG_HI21_NC = 276,
  R_AARCH64_CALL26 = 283,
  R_AARCH64_CONDBR19 = 280,
  R_AARCH64_COPY = 1024,
  R_AARCH64_GLOB_DAT = 1025,
  R_AARCH64_GOT_LD_PREL19 = 309,
  R_AARCH64_IRELATIVE = 1032,
  R_AARCH64_JUMP26 = 282,
  R_AARCH64_JUMP_SLOT = 1026,
  R_AARCH64_LD64_GOTOFF_LO15 = 310,
  R_AARCH64_LD64_GOTPAGE_LO15 = 313,
  R_AARCH64_LD64_GOT_LO12_NC = 312,
  R_AARCH64_LDST128_ABS_LO12_NC = 299,
  R_AARCH64_LDST16_ABS_LO12_NC = 284,
  R_AARCH64_LDST32_ABS_LO12_NC = 285,
  R_AARCH64_LDST64_ABS_LO12_NC = 286,
  R_AARCH64_LDST8_ABS_LO12_NC = 278,
  R_AARCH64_LD_PREL_LO19 = 273,
  R_AARCH64_MOVW_SABS_G0 = 270,
  R_AARCH64_MOVW_SABS_G1 = 271,
  R_AARCH64_MOVW_SABS_G2 = 272,
  R_AARCH64_MOVW_UABS_G0 = 263,
  R_AARCH64_MOVW_UABS_G0_NC = 264,
  R_AARCH64_MOVW_UABS_G1 = 265,
  R_AARCH64_MOVW_UABS_G1_NC = 266,
  R_AARCH64_MOVW_UABS_G2 = 267,
  R_AARCH64_MOVW_UABS_G2_NC = 268,
  R_AARCH64_MOVW_UABS_G3 = 269,
  R_AARCH64_NONE = 0,
  R_AARCH64_NULL = 256,
  R_AARCH64_P32_ABS16 = 2,
  R_AARCH64_P32_ABS32 = 1,
  R_AARCH64_P32_ADD_ABS_LO12_NC = 12,
  R_AARCH64_P32_ADR_GOT_PAGE = 26,
  R_AARCH64_P32_ADR_PREL_LO21 = 10,
  R_AARCH64_P32_ADR_PREL_PG_HI21 = 11,
  R_AARCH64_P32_CALL26 = 21,
  R_AARCH64_P32_CONDBR19 = 19,
  R_AARCH64_P32_COPY = 180,
  R_AARCH64_P32_GLOB_DAT = 181,
  R_AARCH64_P32_GOT_LD_PREL19 = 25,
  R_AARCH64_P32_IRELATIVE = 188,
  R_AARCH64_P32_JUMP26 = 20,
  R_AARCH64_P32_JUMP_SLOT = 182,
  R_AARCH64_P32_LD32_GOT_LO12_NC = 27,
  R_AARCH64_P32_LDST128_ABS_LO12_NC = 17,
  R_AARCH64_P32_LDST16_ABS_LO12_NC = 14,
  R_AARCH64_P32_LDST32_ABS_LO12_NC = 15,
  R_AARCH64_P32_LDST64_ABS_LO12_NC = 16,
  R_AARCH64_P32_LDST8_ABS_LO12_NC = 13,
  R_AARCH64_P32_LD_PREL_LO19 = 9,
  R_AARCH64_P32_MOVW_SABS_G0 = 8,
  R_AARCH64_P32_MOVW_UABS_G0 = 5,
  R_AARCH64_P32_MOVW_UABS_G0_NC = 6,
  R_AARCH64_P32_MOVW_UABS_G1 = 7,
  R_AARCH64_P32_PREL16 = 4,
  R_AARCH64_P32_PREL32 = 3,
  R_AARCH64_P32_RELATIVE = 183,
  R_AARCH64_P32_TLSDESC = 187,
  R_AARCH64_P32_TLSDESC_ADD_LO12_NC = 126,
  R_AARCH64_P32_TLSDESC_ADR_PAGE21 = 124,
  R_AARCH64_P32_TLSDESC_ADR_PREL21 = 123,
  R_AARCH64_P32_TLSDESC_CALL = 127,
  R_AARCH64_P32_TLSDESC_LD32_LO12_NC = 125,
  R_AARCH64_P32_TLSDESC_LD_PREL19 = 122,
  R_AARCH64_P32_TLSGD_ADD_LO12_NC = 82,
  R_AARCH64_P32_TLSGD_ADR_PAGE21 = 81,
  R_AARCH64_P32_TLSIE_ADR_GOTTPREL_PAGE21 = 103,
  R_AARCH64_P32_TLSIE_LD32_GOTTPREL_LO12_NC = 104,
  R_AARCH64_P32_TLSIE_LD_GOTTPREL_PREL19 = 105,
  R_AARCH64_P32_TLSLE_ADD_TPREL_HI12 = 109,
  R_AARCH64_P32_TLSLE_ADD_TPREL_LO12 = 110,
  R_AARCH64_P32_TLSLE_ADD_TPREL_LO12_NC = 111,
  R_AARCH64_P32_TLSLE_MOVW_TPREL_G0 = 107,
  R_AARCH64_P32_TLSLE_MOVW_TPREL_G0_NC = 108,
  R_AARCH64_P32_TLSLE_MOVW_TPREL_G1 = 106,
  R_AARCH64_P32_TLS_DTPMOD = 184,
  R_AARCH64_P32_TLS_DTPREL = 185,
  R_AARCH64_P32_TLS_TPREL = 186,
  R_AARCH64_P32_TSTBR14 = 18,
  R_AARCH64_PREL16 = 262,
  R_AARCH64_PREL32 = 261,
  R_AARCH64_PREL64 = 260,
  R_AARCH64_RELATIVE = 1027,
  R_AARCH64_TLSDESC = 1031,
  R_AARCH64_TLSDESC_ADD = 568,
  R_AARCH64_TLSDESC_ADD_LO12_NC = 564,
  R_AARCH64_TLSDESC_ADR_PAGE21 = 562,
  R_AARCH64_TLSDESC_ADR_PREL21 = 561,
  R_AARCH64_TLSDESC_CALL = 569,
  R_AARCH64_TLSDESC_LD64_LO12_NC = 563,
  R_AARCH64_TLSDESC_LDR = 567,
  R_AARCH64_TLSDESC_LD_PREL19 = 560,
  R_AARCH64_TLSDESC_OFF_G0_NC = 566,
  R_AARCH64_TLSDESC_OFF_G1 = 565,
  R_AARCH64_TLSGD_ADD_LO12_NC = 514,
  R_AARCH64_TLSGD_ADR_PAGE21 = 513,
  R_AARCH64_TLSGD_ADR_PREL21 = 512,
  R_AARCH64_TLSGD_MOVW_G0_NC = 516,
  R_AARCH64_TLSGD_MOVW_G1 = 515,
  R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21 = 541,
  R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC = 542,
  R_AARCH64_TLSIE_LD_GOTTPREL_PREL19 = 543,
  R_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC = 540,
  R_AARCH64_TLSIE_MOVW_GOTTPREL_G1 = 539,
  R_AARCH64_TLSLD_ADR_PAGE21 = 518,
  R_AARCH64_TLSLD_ADR_PREL21 = 517,
  R_AARCH64_TLSLD_LDST128_DTPREL_LO12 = 572,
  R_AARCH64_TLSLD_LDST128_DTPREL_LO12_NC = 573,
  R_AARCH64_TLSLE_ADD_TPREL_HI12 = 549,
  R_AARCH64_TLSLE_ADD_TPREL_LO12 = 550,
  R_AARCH64_TLSLE_ADD_TPREL_LO12_NC = 551,
  R_AARCH64_TLSLE_LDST128_TPREL_LO12 = 570,
  R_AARCH64_TLSLE_LDST128_TPREL_LO12_NC = 571,
  R_AARCH64_TLSLE_MOVW_TPREL_G0 = 547,
  R_AARCH64_TLSLE_MOVW_TPREL_G0_NC = 548,
  R_AARCH64_TLSLE_MOVW_TPREL_G1 = 545,
  R_AARCH64_TLSLE_MOVW_TPREL_G1_NC = 546,
  R_AARCH64_TLSLE_MOVW_TPREL_G2 = 544,
  R_AARCH64_TLS_DTPMOD64 = 1028,
  R_AARCH64_TLS_DTPREL64 = 1029,
  R_AARCH64_TLS_TPREL64 = 1030,
  R_AARCH64_TSTBR14 = 279,
}

pub const R_AARCH64_ABS16: R_AARCH64 = 259

pub const R_AARCH64_ABS32: R_AARCH64 = 258

pub const R_AARCH64_ABS64: R_AARCH64 = 257

pub const R_AARCH64_ADD_ABS_LO12_NC: R_AARCH64 = 277

pub const R_AARCH64_ADR_GOT_PAGE: R_AARCH64 = 311

pub const R_AARCH64_ADR_PREL_LO21: R_AARCH64 = 274

pub const R_AARCH64_ADR_PREL_PG_HI21: R_AARCH64 = 275

pub const R_AARCH64_ADR_PREL_PG_HI21_NC: R_AARCH64 = 276

pub const R_AARCH64_CALL26: R_AARCH64 = 283

pub const R_AARCH64_CONDBR19: R_AARCH64 = 280

pub const R_AARCH64_COPY: R_AARCH64 = 1024

pub const R_AARCH64_GLOB_DAT: R_AARCH64 = 1025

pub const R_AARCH64_GOT_LD_PREL19: R_AARCH64 = 309

pub const R_AARCH64_IRELATIVE: R_AARCH64 = 1032

pub const R_AARCH64_JUMP26: R_AARCH64 = 282

pub const R_AARCH64_JUMP_SLOT: R_AARCH64 = 1026

pub const R_AARCH64_LD64_GOTOFF_LO15: R_AARCH64 = 310

pub const R_AARCH64_LD64_GOTPAGE_LO15: R_AARCH64 = 313

pub const R_AARCH64_LD64_GOT_LO12_NC: R_AARCH64 = 312

pub const R_AARCH64_LDST128_ABS_LO12_NC: R_AARCH64 = 299

pub const R_AARCH64_LDST16_ABS_LO12_NC: R_AARCH64 = 284

pub const R_AARCH64_LDST32_ABS_LO12_NC: R_AARCH64 = 285

pub const R_AARCH64_LDST64_ABS_LO12_NC: R_AARCH64 = 286

pub const R_AARCH64_LDST8_ABS_LO12_NC: R_AARCH64 = 278

pub const R_AARCH64_LD_PREL_LO19: R_AARCH64 = 273

pub const R_AARCH64_MOVW_SABS_G0: R_AARCH64 = 270

pub const R_AARCH64_MOVW_SABS_G1: R_AARCH64 = 271

pub const R_AARCH64_MOVW_SABS_G2: R_AARCH64 = 272

pub const R_AARCH64_MOVW_UABS_G0: R_AARCH64 = 263

pub const R_AARCH64_MOVW_UABS_G0_NC: R_AARCH64 = 264

pub const R_AARCH64_MOVW_UABS_G1: R_AARCH64 = 265

pub const R_AARCH64_MOVW_UABS_G1_NC: R_AARCH64 = 266

pub const R_AARCH64_MOVW_UABS_G2: R_AARCH64 = 267

pub const R_AARCH64_MOVW_UABS_G2_NC: R_AARCH64 = 268

pub const R_AARCH64_MOVW_UABS_G3: R_AARCH64 = 269

pub const R_AARCH64_NONE: R_AARCH64 = 0

pub const R_AARCH64_NULL: R_AARCH64 = 256

pub const R_AARCH64_P32_ABS16: R_AARCH64 = 2

pub const R_AARCH64_P32_ABS32: R_AARCH64 = 1

pub const R_AARCH64_P32_ADD_ABS_LO12_NC: R_AARCH64 = 12

pub const R_AARCH64_P32_ADR_GOT_PAGE: R_AARCH64 = 26

pub const R_AARCH64_P32_ADR_PREL_LO21: R_AARCH64 = 10

pub const R_AARCH64_P32_ADR_PREL_PG_HI21: R_AARCH64 = 11

pub const R_AARCH64_P32_CALL26: R_AARCH64 = 21

pub const R_AARCH64_P32_CONDBR19: R_AARCH64 = 19

pub const R_AARCH64_P32_COPY: R_AARCH64 = 180

pub const R_AARCH64_P32_GLOB_DAT: R_AARCH64 = 181

pub const R_AARCH64_P32_GOT_LD_PREL19: R_AARCH64 = 25

pub const R_AARCH64_P32_IRELATIVE: R_AARCH64 = 188

pub const R_AARCH64_P32_JUMP26: R_AARCH64 = 20

pub const R_AARCH64_P32_JUMP_SLOT: R_AARCH64 = 182

pub const R_AARCH64_P32_LD32_GOT_LO12_NC: R_AARCH64 = 27

pub const R_AARCH64_P32_LDST128_ABS_LO12_NC: R_AARCH64 = 17

pub const R_AARCH64_P32_LDST16_ABS_LO12_NC: R_AARCH64 = 14

pub const R_AARCH64_P32_LDST32_ABS_LO12_NC: R_AARCH64 = 15

pub const R_AARCH64_P32_LDST64_ABS_LO12_NC: R_AARCH64 = 16

pub const R_AARCH64_P32_LDST8_ABS_LO12_NC: R_AARCH64 = 13

pub const R_AARCH64_P32_LD_PREL_LO19: R_AARCH64 = 9

pub const R_AARCH64_P32_MOVW_SABS_G0: R_AARCH64 = 8

pub const R_AARCH64_P32_MOVW_UABS_G0: R_AARCH64 = 5

pub const R_AARCH64_P32_MOVW_UABS_G0_NC: R_AARCH64 = 6

pub const R_AARCH64_P32_MOVW_UABS_G1: R_AARCH64 = 7

pub const R_AARCH64_P32_PREL16: R_AARCH64 = 4

pub const R_AARCH64_P32_PREL32: R_AARCH64 = 3

pub const R_AARCH64_P32_RELATIVE: R_AARCH64 = 183

pub const R_AARCH64_P32_TLSDESC: R_AARCH64 = 187

pub const R_AARCH64_P32_TLSDESC_ADD_LO12_NC: R_AARCH64 = 126

pub const R_AARCH64_P32_TLSDESC_ADR_PAGE21: R_AARCH64 = 124

pub const R_AARCH64_P32_TLSDESC_ADR_PREL21: R_AARCH64 = 123

pub const R_AARCH64_P32_TLSDESC_CALL: R_AARCH64 = 127

pub const R_AARCH64_P32_TLSDESC_LD32_LO12_NC: R_AARCH64 = 125

pub const R_AARCH64_P32_TLSDESC_LD_PREL19: R_AARCH64 = 122

pub const R_AARCH64_P32_TLSGD_ADD_LO12_NC: R_AARCH64 = 82

pub const R_AARCH64_P32_TLSGD_ADR_PAGE21: R_AARCH64 = 81

pub const R_AARCH64_P32_TLSIE_ADR_GOTTPREL_PAGE21: R_AARCH64 = 103

pub const R_AARCH64_P32_TLSIE_LD32_GOTTPREL_LO12_NC: R_AARCH64 = 104

pub const R_AARCH64_P32_TLSIE_LD_GOTTPREL_PREL19: R_AARCH64 = 105

pub const R_AARCH64_P32_TLSLE_ADD_TPREL_HI12: R_AARCH64 = 109

pub const R_AARCH64_P32_TLSLE_ADD_TPREL_LO12: R_AARCH64 = 110

pub const R_AARCH64_P32_TLSLE_ADD_TPREL_LO12_NC: R_AARCH64 = 111

pub const R_AARCH64_P32_TLSLE_MOVW_TPREL_G0: R_AARCH64 = 107

pub const R_AARCH64_P32_TLSLE_MOVW_TPREL_G0_NC: R_AARCH64 = 108

pub const R_AARCH64_P32_TLSLE_MOVW_TPREL_G1: R_AARCH64 = 106

pub const R_AARCH64_P32_TLS_DTPMOD: R_AARCH64 = 184

pub const R_AARCH64_P32_TLS_DTPREL: R_AARCH64 = 185

pub const R_AARCH64_P32_TLS_TPREL: R_AARCH64 = 186

pub const R_AARCH64_P32_TSTBR14: R_AARCH64 = 18

pub const R_AARCH64_PREL16: R_AARCH64 = 262

pub const R_AARCH64_PREL32: R_AARCH64 = 261

pub const R_AARCH64_PREL64: R_AARCH64 = 260

pub const R_AARCH64_RELATIVE: R_AARCH64 = 1027

pub const R_AARCH64_TLSDESC: R_AARCH64 = 1031

pub const R_AARCH64_TLSDESC_ADD: R_AARCH64 = 568

pub const R_AARCH64_TLSDESC_ADD_LO12_NC: R_AARCH64 = 564

pub const R_AARCH64_TLSDESC_ADR_PAGE21: R_AARCH64 = 562

pub const R_AARCH64_TLSDESC_ADR_PREL21: R_AARCH64 = 561

pub const R_AARCH64_TLSDESC_CALL: R_AARCH64 = 569

pub const R_AARCH64_TLSDESC_LD64_LO12_NC: R_AARCH64 = 563

pub const R_AARCH64_TLSDESC_LDR: R_AARCH64 = 567

pub const R_AARCH64_TLSDESC_LD_PREL19: R_AARCH64 = 560

pub const R_AARCH64_TLSDESC_OFF_G0_NC: R_AARCH64 = 566

pub const R_AARCH64_TLSDESC_OFF_G1: R_AARCH64 = 565

pub const R_AARCH64_TLSGD_ADD_LO12_NC: R_AARCH64 = 514

pub const R_AARCH64_TLSGD_ADR_PAGE21: R_AARCH64 = 513

pub const R_AARCH64_TLSGD_ADR_PREL21: R_AARCH64 = 512

pub const R_AARCH64_TLSGD_MOVW_G0_NC: R_AARCH64 = 516

pub const R_AARCH64_TLSGD_MOVW_G1: R_AARCH64 = 515

pub const R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21: R_AARCH64 = 541

pub const R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC: R_AARCH64 = 542

pub const R_AARCH64_TLSIE_LD_GOTTPREL_PREL19: R_AARCH64 = 543

pub const R_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC: R_AARCH64 = 540

pub const R_AARCH64_TLSIE_MOVW_GOTTPREL_G1: R_AARCH64 = 539

pub const R_AARCH64_TLSLD_ADR_PAGE21: R_AARCH64 = 518

pub const R_AARCH64_TLSLD_ADR_PREL21: R_AARCH64 = 517

pub const R_AARCH64_TLSLD_LDST128_DTPREL_LO12: R_AARCH64 = 572

pub const R_AARCH64_TLSLD_LDST128_DTPREL_LO12_NC: R_AARCH64 = 573

pub const R_AARCH64_TLSLE_ADD_TPREL_HI12: R_AARCH64 = 549

pub const R_AARCH64_TLSLE_ADD_TPREL_LO12: R_AARCH64 = 550

pub const R_AARCH64_TLSLE_ADD_TPREL_LO12_NC: R_AARCH64 = 551

pub const R_AARCH64_TLSLE_LDST128_TPREL_LO12: R_AARCH64 = 570

pub const R_AARCH64_TLSLE_LDST128_TPREL_LO12_NC: R_AARCH64 = 571

pub const R_AARCH64_TLSLE_MOVW_TPREL_G0: R_AARCH64 = 547

pub const R_AARCH64_TLSLE_MOVW_TPREL_G0_NC: R_AARCH64 = 548

pub const R_AARCH64_TLSLE_MOVW_TPREL_G1: R_AARCH64 = 545

pub const R_AARCH64_TLSLE_MOVW_TPREL_G1_NC: R_AARCH64 = 546

pub const R_AARCH64_TLSLE_MOVW_TPREL_G2: R_AARCH64 = 544

pub const R_AARCH64_TLS_DTPMOD64: R_AARCH64 = 1028

pub const R_AARCH64_TLS_DTPREL64: R_AARCH64 = 1029

pub const R_AARCH64_TLS_TPREL64: R_AARCH64 = 1030

pub const R_AARCH64_TSTBR14: R_AARCH64 = 279

pub enum R_ALPHA: int {
  R_ALPHA_BRADDR = 7,
  R_ALPHA_COPY = 24,
  R_ALPHA_GLOB_DAT = 25,
  R_ALPHA_GPDISP = 6,
  R_ALPHA_GPREL32 = 3,
  R_ALPHA_GPRELHIGH = 17,
  R_ALPHA_GPRELLOW = 18,
  R_ALPHA_GPVALUE = 16,
  R_ALPHA_HINT = 8,
  R_ALPHA_IMMED_BR_HI32 = 22,
  R_ALPHA_IMMED_GP_16 = 19,
  R_ALPHA_IMMED_GP_HI32 = 20,
  R_ALPHA_IMMED_LO32 = 23,
  R_ALPHA_IMMED_SCN_HI32 = 21,
  R_ALPHA_JMP_SLOT = 26,
  R_ALPHA_LITERAL = 4,
  R_ALPHA_LITUSE = 5,
  R_ALPHA_NONE = 0,
  R_ALPHA_OP_PRSHIFT = 15,
  R_ALPHA_OP_PSUB = 14,
  R_ALPHA_OP_PUSH = 12,
  R_ALPHA_OP_STORE = 13,
  R_ALPHA_REFLONG = 1,
  R_ALPHA_REFQUAD = 2,
  R_ALPHA_RELATIVE = 27,
  R_ALPHA_SREL16 = 9,
  R_ALPHA_SREL32 = 10,
  R_ALPHA_SREL64 = 11,
}

pub const R_ALPHA_BRADDR: R_ALPHA = 7

pub const R_ALPHA_COPY: R_ALPHA = 24

pub const R_ALPHA_GLOB_DAT: R_ALPHA = 25

pub const R_ALPHA_GPDISP: R_ALPHA = 6

pub const R_ALPHA_GPREL32: R_ALPHA = 3

pub const R_ALPHA_GPRELHIGH: R_ALPHA = 17

pub const R_ALPHA_GPRELLOW: R_ALPHA = 18

pub const R_ALPHA_GPVALUE: R_ALPHA = 16

pub const R_ALPHA_HINT: R_ALPHA = 8

pub const R_ALPHA_IMMED_BR_HI32: R_ALPHA = 22

pub const R_ALPHA_IMMED_GP_16: R_ALPHA = 19

pub const R_ALPHA_IMMED_GP_HI32: R_ALPHA = 20

pub const R_ALPHA_IMMED_LO32: R_ALPHA = 23

pub const R_ALPHA_IMMED_SCN_HI32: R_ALPHA = 21

pub const R_ALPHA_JMP_SLOT: R_ALPHA = 26

pub const R_ALPHA_LITERAL: R_ALPHA = 4

pub const R_ALPHA_LITUSE: R_ALPHA = 5

pub const R_ALPHA_NONE: R_ALPHA = 0

pub const R_ALPHA_OP_PRSHIFT: R_ALPHA = 15

pub const R_ALPHA_OP_PSUB: R_ALPHA = 14

pub const R_ALPHA_OP_PUSH: R_ALPHA = 12

pub const R_ALPHA_OP_STORE: R_ALPHA = 13

pub const R_ALPHA_REFLONG: R_ALPHA = 1

pub const R_ALPHA_REFQUAD: R_ALPHA = 2

pub const R_ALPHA_RELATIVE: R_ALPHA = 27

pub const R_ALPHA_SREL16: R_ALPHA = 9

pub const R_ALPHA_SREL32: R_ALPHA = 10

pub const R_ALPHA_SREL64: R_ALPHA = 11

pub enum R_ARM: int {
  R_ARM_ABS12 = 6,
  R_ARM_ABS16 = 5,
  R_ARM_ABS32 = 2,
  R_ARM_ABS32_NOI = 55,
  R_ARM_ABS8 = 8,
  R_ARM_ALU_PCREL_15_8 = 33,
  R_ARM_ALU_PCREL_23_15 = 34,
  R_ARM_ALU_PCREL_7_0 = 32,
  R_ARM_ALU_PC_G0 = 58,
  R_ARM_ALU_PC_G0_NC = 57,
  R_ARM_ALU_PC_G1 = 60,
  R_ARM_ALU_PC_G1_NC = 59,
  R_ARM_ALU_PC_G2 = 61,
  R_ARM_ALU_SBREL_19_12_NC = 36,
  R_ARM_ALU_SBREL_27_20_CK = 37,
  R_ARM_ALU_SB_G0 = 71,
  R_ARM_ALU_SB_G0_NC = 70,
  R_ARM_ALU_SB_G1 = 73,
  R_ARM_ALU_SB_G1_NC = 72,
  R_ARM_ALU_SB_G2 = 74,
  R_ARM_AMP_VCALL9 = 12,
  R_ARM_BASE_ABS = 31,
  R_ARM_CALL = 28,
  R_ARM_COPY = 20,
  R_ARM_GLOB_DAT = 21,
  R_ARM_GNU_VTENTRY = 100,
  R_ARM_GNU_VTINHERIT = 101,
  R_ARM_GOT32 = 26,
  R_ARM_GOTOFF = 24,
  R_ARM_GOTOFF12 = 98,
  R_ARM_GOTPC = 25,
  R_ARM_GOTRELAX = 99,
  R_ARM_GOT_ABS = 95,
  R_ARM_GOT_BREL12 = 97,
  R_ARM_GOT_PREL = 96,
  R_ARM_IRELATIVE = 160,
  R_ARM_JUMP24 = 29,
  R_ARM_JUMP_SLOT = 22,
  R_ARM_LDC_PC_G0 = 67,
  R_ARM_LDC_PC_G1 = 68,
  R_ARM_LDC_PC_G2 = 69,
  R_ARM_LDC_SB_G0 = 81,
  R_ARM_LDC_SB_G1 = 82,
  R_ARM_LDC_SB_G2 = 83,
  R_ARM_LDRS_PC_G0 = 64,
  R_ARM_LDRS_PC_G1 = 65,
  R_ARM_LDRS_PC_G2 = 66,
  R_ARM_LDRS_SB_G0 = 78,
  R_ARM_LDRS_SB_G1 = 79,
  R_ARM_LDRS_SB_G2 = 80,
  R_ARM_LDR_PC_G1 = 62,
  R_ARM_LDR_PC_G2 = 63,
  R_ARM_LDR_SBREL_11_10_NC = 35,
  R_ARM_LDR_SB_G0 = 75,
  R_ARM_LDR_SB_G1 = 76,
  R_ARM_LDR_SB_G2 = 77,
  R_ARM_ME_TOO = 128,
  R_ARM_MOVT_ABS = 44,
  R_ARM_MOVT_BREL = 85,
  R_ARM_MOVT_PREL = 46,
  R_ARM_MOVW_ABS_NC = 43,
  R_ARM_MOVW_BREL = 86,
  R_ARM_MOVW_BREL_NC = 84,
  R_ARM_MOVW_PREL_NC = 45,
  R_ARM_NONE = 0,
  R_ARM_PC13 = 4,
  R_ARM_PC24 = 1,
  R_ARM_PLT32 = 27,
  R_ARM_PLT32_ABS = 94,
  R_ARM_PREL31 = 42,
  R_ARM_PRIVATE_0 = 112,
  R_ARM_PRIVATE_1 = 113,
  R_ARM_PRIVATE_10 = 122,
  R_ARM_PRIVATE_11 = 123,
  R_ARM_PRIVATE_12 = 124,
  R_ARM_PRIVATE_13 = 125,
  R_ARM_PRIVATE_14 = 126,
  R_ARM_PRIVATE_15 = 127,
  R_ARM_PRIVATE_2 = 114,
  R_ARM_PRIVATE_3 = 115,
  R_ARM_PRIVATE_4 = 116,
  R_ARM_PRIVATE_5 = 117,
  R_ARM_PRIVATE_6 = 118,
  R_ARM_PRIVATE_7 = 119,
  R_ARM_PRIVATE_8 = 120,
  R_ARM_PRIVATE_9 = 121,
  R_ARM_RABS32 = 253,
  R_ARM_RBASE = 255,
  R_ARM_REL32 = 3,
  R_ARM_REL32_NOI = 56,
  R_ARM_RELATIVE = 23,
  R_ARM_RPC24 = 254,
  R_ARM_RREL32 = 252,
  R_ARM_RSBREL32 = 250,
  R_ARM_RXPC25 = 249,
  R_ARM_SBREL31 = 39,
  R_ARM_SBREL32 = 9,
  R_ARM_SWI24 = 13,
  R_ARM_TARGET1 = 38,
  R_ARM_TARGET2 = 41,
  R_ARM_THM_ABS5 = 7,
  R_ARM_THM_ALU_ABS_G0_NC = 132,
  R_ARM_THM_ALU_ABS_G1_NC = 133,
  R_ARM_THM_ALU_ABS_G2_NC = 134,
  R_ARM_THM_ALU_ABS_G3 = 135,
  R_ARM_THM_ALU_PREL_11_0 = 53,
  R_ARM_THM_GOT_BREL12 = 131,
  R_ARM_THM_JUMP11 = 102,
  R_ARM_THM_JUMP19 = 51,
  R_ARM_THM_JUMP24 = 30,
  R_ARM_THM_JUMP6 = 52,
  R_ARM_THM_JUMP8 = 103,
  R_ARM_THM_MOVT_ABS = 48,
  R_ARM_THM_MOVT_BREL = 88,
  R_ARM_THM_MOVT_PREL = 50,
  R_ARM_THM_MOVW_ABS_NC = 47,
  R_ARM_THM_MOVW_BREL = 89,
  R_ARM_THM_MOVW_BREL_NC = 87,
  R_ARM_THM_MOVW_PREL_NC = 49,
  R_ARM_THM_PC12 = 54,
  R_ARM_THM_PC22 = 10,
  R_ARM_THM_PC8 = 11,
  R_ARM_THM_RPC22 = 251,
  R_ARM_THM_SWI8 = 14,
  R_ARM_THM_TLS_CALL = 93,
  R_ARM_THM_TLS_DESCSEQ16 = 129,
  R_ARM_THM_TLS_DESCSEQ32 = 130,
  R_ARM_THM_XPC22 = 16,
  R_ARM_TLS_CALL = 91,
  R_ARM_TLS_DESCSEQ = 92,
  R_ARM_TLS_DTPMOD32 = 17,
  R_ARM_TLS_DTPOFF32 = 18,
  R_ARM_TLS_GD32 = 104,
  R_ARM_TLS_GOTDESC = 90,
  R_ARM_TLS_IE12GP = 111,
  R_ARM_TLS_IE32 = 107,
  R_ARM_TLS_LDM32 = 105,
  R_ARM_TLS_LDO12 = 109,
  R_ARM_TLS_LDO32 = 106,
  R_ARM_TLS_LE12 = 110,
  R_ARM_TLS_LE32 = 108,
  R_ARM_TLS_TPOFF32 = 19,
  R_ARM_V4BX = 40,
  R_ARM_XPC25 = 15,
}

pub const R_ARM_ABS12: R_ARM = 6

pub const R_ARM_ABS16: R_ARM = 5

pub const R_ARM_ABS32: R_ARM = 2

pub const R_ARM_ABS32_NOI: R_ARM = 55

pub const R_ARM_ABS8: R_ARM = 8

pub const R_ARM_ALU_PCREL_15_8: R_ARM = 33

pub const R_ARM_ALU_PCREL_23_15: R_ARM = 34

pub const R_ARM_ALU_PCREL_7_0: R_ARM = 32

pub const R_ARM_ALU_PC_G0: R_ARM = 58

pub const R_ARM_ALU_PC_G0_NC: R_ARM = 57

pub const R_ARM_ALU_PC_G1: R_ARM = 60

pub const R_ARM_ALU_PC_G1_NC: R_ARM = 59

pub const R_ARM_ALU_PC_G2: R_ARM = 61

pub const R_ARM_ALU_SBREL_19_12_NC: R_ARM = 36

pub const R_ARM_ALU_SBREL_27_20_CK: R_ARM = 37

pub const R_ARM_ALU_SB_G0: R_ARM = 71

pub const R_ARM_ALU_SB_G0_NC: R_ARM = 70

pub const R_ARM_ALU_SB_G1: R_ARM = 73

pub const R_ARM_ALU_SB_G1_NC: R_ARM = 72

pub const R_ARM_ALU_SB_G2: R_ARM = 74

pub const R_ARM_AMP_VCALL9: R_ARM = 12

pub const R_ARM_BASE_ABS: R_ARM = 31

pub const R_ARM_CALL: R_ARM = 28

pub const R_ARM_COPY: R_ARM = 20

pub const R_ARM_GLOB_DAT: R_ARM = 21

pub const R_ARM_GNU_VTENTRY: R_ARM = 100

pub const R_ARM_GNU_VTINHERIT: R_ARM = 101

pub const R_ARM_GOT32: R_ARM = 26

pub const R_ARM_GOTOFF: R_ARM = 24

pub const R_ARM_GOTOFF12: R_ARM = 98

pub const R_ARM_GOTPC: R_ARM = 25

pub const R_ARM_GOTRELAX: R_ARM = 99

pub const R_ARM_GOT_ABS: R_ARM = 95

pub const R_ARM_GOT_BREL12: R_ARM = 97

pub const R_ARM_GOT_PREL: R_ARM = 96

pub const R_ARM_IRELATIVE: R_ARM = 160

pub const R_ARM_JUMP24: R_ARM = 29

pub const R_ARM_JUMP_SLOT: R_ARM = 22

pub const R_ARM_LDC_PC_G0: R_ARM = 67

pub const R_ARM_LDC_PC_G1: R_ARM = 68

pub const R_ARM_LDC_PC_G2: R_ARM = 69

pub const R_ARM_LDC_SB_G0: R_ARM = 81

pub const R_ARM_LDC_SB_G1: R_ARM = 82

pub const R_ARM_LDC_SB_G2: R_ARM = 83

pub const R_ARM_LDRS_PC_G0: R_ARM = 64

pub const R_ARM_LDRS_PC_G1: R_ARM = 65

pub const R_ARM_LDRS_PC_G2: R_ARM = 66

pub const R_ARM_LDRS_SB_G0: R_ARM = 78

pub const R_ARM_LDRS_SB_G1: R_ARM = 79

pub const R_ARM_LDRS_SB_G2: R_ARM = 80

pub const R_ARM_LDR_PC_G1: R_ARM = 62

pub const R_ARM_LDR_PC_G2: R_ARM = 63

pub const R_ARM_LDR_SBREL_11_10_NC: R_ARM = 35

pub const R_ARM_LDR_SB_G0: R_ARM = 75

pub const R_ARM_LDR_SB_G1: R_ARM = 76

pub const R_ARM_LDR_SB_G2: R_ARM = 77

pub const R_ARM_ME_TOO: R_ARM = 128

pub const R_ARM_MOVT_ABS: R_ARM = 44

pub const R_ARM_MOVT_BREL: R_ARM = 85

pub const R_ARM_MOVT_PREL: R_ARM = 46

pub const R_ARM_MOVW_ABS_NC: R_ARM = 43

pub const R_ARM_MOVW_BREL: R_ARM = 86

pub const R_ARM_MOVW_BREL_NC: R_ARM = 84

pub const R_ARM_MOVW_PREL_NC: R_ARM = 45

pub const R_ARM_NONE: R_ARM = 0

pub const R_ARM_PC13: R_ARM = 4

pub const R_ARM_PC24: R_ARM = 1

pub const R_ARM_PLT32: R_ARM = 27

pub const R_ARM_PLT32_ABS: R_ARM = 94

pub const R_ARM_PREL31: R_ARM = 42

pub const R_ARM_PRIVATE_0: R_ARM = 112

pub const R_ARM_PRIVATE_1: R_ARM = 113

pub const R_ARM_PRIVATE_10: R_ARM = 122

pub const R_ARM_PRIVATE_11: R_ARM = 123

pub const R_ARM_PRIVATE_12: R_ARM = 124

pub const R_ARM_PRIVATE_13: R_ARM = 125

pub const R_ARM_PRIVATE_14: R_ARM = 126

pub const R_ARM_PRIVATE_15: R_ARM = 127

pub const R_ARM_PRIVATE_2: R_ARM = 114

pub const R_ARM_PRIVATE_3: R_ARM = 115

pub const R_ARM_PRIVATE_4: R_ARM = 116

pub const R_ARM_PRIVATE_5: R_ARM = 117

pub const R_ARM_PRIVATE_6: R_ARM = 118

pub const R_ARM_PRIVATE_7: R_ARM = 119

pub const R_ARM_PRIVATE_8: R_ARM = 120

pub const R_ARM_PRIVATE_9: R_ARM = 121

pub const R_ARM_RABS32: R_ARM = 253

pub const R_ARM_RBASE: R_ARM = 255

pub const R_ARM_REL32: R_ARM = 3

pub const R_ARM_REL32_NOI: R_ARM = 56

pub const R_ARM_RELATIVE: R_ARM = 23

pub const R_ARM_RPC24: R_ARM = 254

pub const R_ARM_RREL32: R_ARM = 252

pub const R_ARM_RSBREL32: R_ARM = 250

pub const R_ARM_RXPC25: R_ARM = 249

pub const R_ARM_SBREL31: R_ARM = 39

pub const R_ARM_SBREL32: R_ARM = 9

pub const R_ARM_SWI24: R_ARM = 13

pub const R_ARM_TARGET1: R_ARM = 38

pub const R_ARM_TARGET2: R_ARM = 41

pub const R_ARM_THM_ABS5: R_ARM = 7

pub const R_ARM_THM_ALU_ABS_G0_NC: R_ARM = 132

pub const R_ARM_THM_ALU_ABS_G1_NC: R_ARM = 133

pub const R_ARM_THM_ALU_ABS_G2_NC: R_ARM = 134

pub const R_ARM_THM_ALU_ABS_G3: R_ARM = 135

pub const R_ARM_THM_ALU_PREL_11_0: R_ARM = 53

pub const R_ARM_THM_GOT_BREL12: R_ARM = 131

pub const R_ARM_THM_JUMP11: R_ARM = 102

pub const R_ARM_THM_JUMP19: R_ARM = 51

pub const R_ARM_THM_JUMP24: R_ARM = 30

pub const R_ARM_THM_JUMP6: R_ARM = 52

pub const R_ARM_THM_JUMP8: R_ARM = 103

pub const R_ARM_THM_MOVT_ABS: R_ARM = 48

pub const R_ARM_THM_MOVT_BREL: R_ARM = 88

pub const R_ARM_THM_MOVT_PREL: R_ARM = 50

pub const R_ARM_THM_MOVW_ABS_NC: R_ARM = 47

pub const R_ARM_THM_MOVW_BREL: R_ARM = 89

pub const R_ARM_THM_MOVW_BREL_NC: R_ARM = 87

pub const R_ARM_THM_MOVW_PREL_NC: R_ARM = 49

pub const R_ARM_THM_PC12: R_ARM = 54

pub const R_ARM_THM_PC22: R_ARM = 10

pub const R_ARM_THM_PC8: R_ARM = 11

pub const R_ARM_THM_RPC22: R_ARM = 251

pub const R_ARM_THM_SWI8: R_ARM = 14

pub const R_ARM_THM_TLS_CALL: R_ARM = 93

pub const R_ARM_THM_TLS_DESCSEQ16: R_ARM = 129

pub const R_ARM_THM_TLS_DESCSEQ32: R_ARM = 130

pub const R_ARM_THM_XPC22: R_ARM = 16

pub const R_ARM_TLS_CALL: R_ARM = 91

pub const R_ARM_TLS_DESCSEQ: R_ARM = 92

pub const R_ARM_TLS_DTPMOD32: R_ARM = 17

pub const R_ARM_TLS_DTPOFF32: R_ARM = 18

pub const R_ARM_TLS_GD32: R_ARM = 104

pub const R_ARM_TLS_GOTDESC: R_ARM = 90

pub const R_ARM_TLS_IE12GP: R_ARM = 111

pub const R_ARM_TLS_IE32: R_ARM = 107

pub const R_ARM_TLS_LDM32: R_ARM = 105

pub const R_ARM_TLS_LDO12: R_ARM = 109

pub const R_ARM_TLS_LDO32: R_ARM = 106

pub const R_ARM_TLS_LE12: R_ARM = 110

pub const R_ARM_TLS_LE32: R_ARM = 108

pub const R_ARM_TLS_TPOFF32: R_ARM = 19

pub const R_ARM_V4BX: R_ARM = 40

pub const R_ARM_XPC25: R_ARM = 15

pub enum R_LARCH: int {
  R_LARCH_32 = 1,
  R_LARCH_32_PCREL = 99,
  R_LARCH_64 = 2,
  R_LARCH_64_PCREL = 109,
  R_LARCH_ABS64_HI12 = 70,
  R_LARCH_ABS64_LO20 = 69,
  R_LARCH_ABS_HI20 = 67,
  R_LARCH_ABS_LO12 = 68,
  R_LARCH_ADD16 = 48,
  R_LARCH_ADD24 = 49,
  R_LARCH_ADD32 = 50,
  R_LARCH_ADD6 = 105,
  R_LARCH_ADD64 = 51,
  R_LARCH_ADD8 = 47,
  R_LARCH_ADD_ULEB128 = 107,
  R_LARCH_ALIGN = 102,
  R_LARCH_B16 = 64,
  R_LARCH_B21 = 65,
  R_LARCH_B26 = 66,
  R_LARCH_CFA = 104,
  R_LARCH_COPY = 4,
  R_LARCH_DELETE = 101,
  R_LARCH_GNU_VTENTRY = 58,
  R_LARCH_GNU_VTINHERIT = 57,
  R_LARCH_GOT64_HI12 = 82,
  R_LARCH_GOT64_LO20 = 81,
  R_LARCH_GOT64_PC_HI12 = 78,
  R_LARCH_GOT64_PC_LO20 = 77,
  R_LARCH_GOT_HI20 = 79,
  R_LARCH_GOT_LO12 = 80,
  R_LARCH_GOT_PC_HI20 = 75,
  R_LARCH_GOT_PC_LO12 = 76,
  R_LARCH_IRELATIVE = 12,
  R_LARCH_JUMP_SLOT = 5,
  R_LARCH_MARK_LA = 20,
  R_LARCH_MARK_PCREL = 21,
  R_LARCH_NONE = 0,
  R_LARCH_PCALA64_HI12 = 74,
  R_LARCH_PCALA64_LO20 = 73,
  R_LARCH_PCALA_HI20 = 71,
  R_LARCH_PCALA_LO12 = 72,
  R_LARCH_PCREL20_S2 = 103,
  R_LARCH_RELATIVE = 3,
  R_LARCH_RELAX = 100,
  R_LARCH_SOP_ADD = 35,
  R_LARCH_SOP_AND = 36,
  R_LARCH_SOP_ASSERT = 30,
  R_LARCH_SOP_IF_ELSE = 37,
  R_LARCH_SOP_NOT = 31,
  R_LARCH_SOP_POP_32_S_0_10_10_16_S2 = 45,
  R_LARCH_SOP_POP_32_S_0_5_10_16_S2 = 44,
  R_LARCH_SOP_POP_32_S_10_12 = 40,
  R_LARCH_SOP_POP_32_S_10_16 = 41,
  R_LARCH_SOP_POP_32_S_10_16_S2 = 42,
  R_LARCH_SOP_POP_32_S_10_5 = 38,
  R_LARCH_SOP_POP_32_S_5_20 = 43,
  R_LARCH_SOP_POP_32_U = 46,
  R_LARCH_SOP_POP_32_U_10_12 = 39,
  R_LARCH_SOP_PUSH_ABSOLUTE = 23,
  R_LARCH_SOP_PUSH_DUP = 24,
  R_LARCH_SOP_PUSH_GPREL = 25,
  R_LARCH_SOP_PUSH_PCREL = 22,
  R_LARCH_SOP_PUSH_PLT_PCREL = 29,
  R_LARCH_SOP_PUSH_TLS_GD = 28,
  R_LARCH_SOP_PUSH_TLS_GOT = 27,
  R_LARCH_SOP_PUSH_TLS_TPREL = 26,
  R_LARCH_SOP_SL = 33,
  R_LARCH_SOP_SR = 34,
  R_LARCH_SOP_SUB = 32,
  R_LARCH_SUB16 = 53,
  R_LARCH_SUB24 = 54,
  R_LARCH_SUB32 = 55,
  R_LARCH_SUB6 = 106,
  R_LARCH_SUB64 = 56,
  R_LARCH_SUB8 = 52,
  R_LARCH_SUB_ULEB128 = 108,
  R_LARCH_TLS_DTPMOD32 = 6,
  R_LARCH_TLS_DTPMOD64 = 7,
  R_LARCH_TLS_DTPREL32 = 8,
  R_LARCH_TLS_DTPREL64 = 9,
  R_LARCH_TLS_GD_HI20 = 98,
  R_LARCH_TLS_GD_PC_HI20 = 97,
  R_LARCH_TLS_IE64_HI12 = 94,
  R_LARCH_TLS_IE64_LO20 = 93,
  R_LARCH_TLS_IE64_PC_HI12 = 90,
  R_LARCH_TLS_IE64_PC_LO20 = 89,
  R_LARCH_TLS_IE_HI20 = 91,
  R_LARCH_TLS_IE_LO12 = 92,
  R_LARCH_TLS_IE_PC_HI20 = 87,
  R_LARCH_TLS_IE_PC_LO12 = 88,
  R_LARCH_TLS_LD_HI20 = 96,
  R_LARCH_TLS_LD_PC_HI20 = 95,
  R_LARCH_TLS_LE64_HI12 = 86,
  R_LARCH_TLS_LE64_LO20 = 85,
  R_LARCH_TLS_LE_HI20 = 83,
  R_LARCH_TLS_LE_LO12 = 84,
  R_LARCH_TLS_TPREL32 = 10,
  R_LARCH_TLS_TPREL64 = 11,
}

pub const R_LARCH_32: R_LARCH = 1

pub const R_LARCH_32_PCREL: R_LARCH = 99

pub const R_LARCH_64: R_LARCH = 2

pub const R_LARCH_64_PCREL: R_LARCH = 109

pub const R_LARCH_ABS64_HI12: R_LARCH = 70

pub const R_LARCH_ABS64_LO20: R_LARCH = 69

pub const R_LARCH_ABS_HI20: R_LARCH = 67

pub const R_LARCH_ABS_LO12: R_LARCH = 68

pub const R_LARCH_ADD16: R_LARCH = 48

pub const R_LARCH_ADD24: R_LARCH = 49

pub const R_LARCH_ADD32: R_LARCH = 50

pub const R_LARCH_ADD6: R_LARCH = 105

pub const R_LARCH_ADD64: R_LARCH = 51

pub const R_LARCH_ADD8: R_LARCH = 47

pub const R_LARCH_ADD_ULEB128: R_LARCH = 107

pub const R_LARCH_ALIGN: R_LARCH = 102

pub const R_LARCH_B16: R_LARCH = 64

pub const R_LARCH_B21: R_LARCH = 65

pub const R_LARCH_B26: R_LARCH = 66

pub const R_LARCH_CFA: R_LARCH = 104

pub const R_LARCH_COPY: R_LARCH = 4

pub const R_LARCH_DELETE: R_LARCH = 101

pub const R_LARCH_GNU_VTENTRY: R_LARCH = 58

pub const R_LARCH_GNU_VTINHERIT: R_LARCH = 57

pub const R_LARCH_GOT64_HI12: R_LARCH = 82

pub const R_LARCH_GOT64_LO20: R_LARCH = 81

pub const R_LARCH_GOT64_PC_HI12: R_LARCH = 78

pub const R_LARCH_GOT64_PC_LO20: R_LARCH = 77

pub const R_LARCH_GOT_HI20: R_LARCH = 79

pub const R_LARCH_GOT_LO12: R_LARCH = 80

pub const R_LARCH_GOT_PC_HI20: R_LARCH = 75

pub const R_LARCH_GOT_PC_LO12: R_LARCH = 76

pub const R_LARCH_IRELATIVE: R_LARCH = 12

pub const R_LARCH_JUMP_SLOT: R_LARCH = 5

pub const R_LARCH_MARK_LA: R_LARCH = 20

pub const R_LARCH_MARK_PCREL: R_LARCH = 21

pub const R_LARCH_NONE: R_LARCH = 0

pub const R_LARCH_PCALA64_HI12: R_LARCH = 74

pub const R_LARCH_PCALA64_LO20: R_LARCH = 73

pub const R_LARCH_PCALA_HI20: R_LARCH = 71

pub const R_LARCH_PCALA_LO12: R_LARCH = 72

pub const R_LARCH_PCREL20_S2: R_LARCH = 103

pub const R_LARCH_RELATIVE: R_LARCH = 3

pub const R_LARCH_RELAX: R_LARCH = 100

pub const R_LARCH_SOP_ADD: R_LARCH = 35

pub const R_LARCH_SOP_AND: R_LARCH = 36

pub const R_LARCH_SOP_ASSERT: R_LARCH = 30

pub const R_LARCH_SOP_IF_ELSE: R_LARCH = 37

pub const R_LARCH_SOP_NOT: R_LARCH = 31

pub const R_LARCH_SOP_POP_32_S_0_10_10_16_S2: R_LARCH = 45

pub const R_LARCH_SOP_POP_32_S_0_5_10_16_S2: R_LARCH = 44

pub const R_LARCH_SOP_POP_32_S_10_12: R_LARCH = 40

pub const R_LARCH_SOP_POP_32_S_10_16: R_LARCH = 41

pub const R_LARCH_SOP_POP_32_S_10_16_S2: R_LARCH = 42

pub const R_LARCH_SOP_POP_32_S_10_5: R_LARCH = 38

pub const R_LARCH_SOP_POP_32_S_5_20: R_LARCH = 43

pub const R_LARCH_SOP_POP_32_U: R_LARCH = 46

pub const R_LARCH_SOP_POP_32_U_10_12: R_LARCH = 39

pub const R_LARCH_SOP_PUSH_ABSOLUTE: R_LARCH = 23

pub const R_LARCH_SOP_PUSH_DUP: R_LARCH = 24

pub const R_LARCH_SOP_PUSH_GPREL: R_LARCH = 25

pub const R_LARCH_SOP_PUSH_PCREL: R_LARCH = 22

pub const R_LARCH_SOP_PUSH_PLT_PCREL: R_LARCH = 29

pub const R_LARCH_SOP_PUSH_TLS_GD: R_LARCH = 28

pub const R_LARCH_SOP_PUSH_TLS_GOT: R_LARCH = 27

pub const R_LARCH_SOP_PUSH_TLS_TPREL: R_LARCH = 26

pub const R_LARCH_SOP_SL: R_LARCH = 33

pub const R_LARCH_SOP_SR: R_LARCH = 34

pub const R_LARCH_SOP_SUB: R_LARCH = 32

pub const R_LARCH_SUB16: R_LARCH = 53

pub const R_LARCH_SUB24: R_LARCH = 54

pub const R_LARCH_SUB32: R_LARCH = 55

pub const R_LARCH_SUB6: R_LARCH = 106

pub const R_LARCH_SUB64: R_LARCH = 56

pub const R_LARCH_SUB8: R_LARCH = 52

pub const R_LARCH_SUB_ULEB128: R_LARCH = 108

pub const R_LARCH_TLS_DTPMOD32: R_LARCH = 6

pub const R_LARCH_TLS_DTPMOD64: R_LARCH = 7

pub const R_LARCH_TLS_DTPREL32: R_LARCH = 8

pub const R_LARCH_TLS_DTPREL64: R_LARCH = 9

pub const R_LARCH_TLS_GD_HI20: R_LARCH = 98

pub const R_LARCH_TLS_GD_PC_HI20: R_LARCH = 97

pub const R_LARCH_TLS_IE64_HI12: R_LARCH = 94

pub const R_LARCH_TLS_IE64_LO20: R_LARCH = 93

pub const R_LARCH_TLS_IE64_PC_HI12: R_LARCH = 90

pub const R_LARCH_TLS_IE64_PC_LO20: R_LARCH = 89

pub const R_LARCH_TLS_IE_HI20: R_LARCH = 91

pub const R_LARCH_TLS_IE_LO12: R_LARCH = 92

pub const R_LARCH_TLS_IE_PC_HI20: R_LARCH = 87

pub const R_LARCH_TLS_IE_PC_LO12: R_LARCH = 88

pub const R_LARCH_TLS_LD_HI20: R_LARCH = 96

pub const R_LARCH_TLS_LD_PC_HI20: R_LARCH = 95

pub const R_LARCH_TLS_LE64_HI12: R_LARCH = 86

pub const R_LARCH_TLS_LE64_LO20: R_LARCH = 85

pub const R_LARCH_TLS_LE_HI20: R_LARCH = 83

pub const R_LARCH_TLS_LE_LO12: R_LARCH = 84

pub const R_LARCH_TLS_TPREL32: R_LARCH = 10

pub const R_LARCH_TLS_TPREL64: R_LARCH = 11

pub enum R_MIPS: int {
  R_MIPS_16 = 1,
  R_MIPS_26 = 4,
  R_MIPS_32 = 2,
  R_MIPS_64 = 18,
  R_MIPS_ADD_IMMEDIATE = 34,
  R_MIPS_CALL16 = 11,
  R_MIPS_CALL_HI16 = 30,
  R_MIPS_CALL_LO16 = 31,
  R_MIPS_DELETE = 27,
  R_MIPS_GOT16 = 9,
  R_MIPS_GOT_DISP = 19,
  R_MIPS_GOT_HI16 = 22,
  R_MIPS_GOT_LO16 = 23,
  R_MIPS_GOT_OFST = 21,
  R_MIPS_GOT_PAGE = 20,
  R_MIPS_GPREL16 = 7,
  R_MIPS_GPREL32 = 12,
  R_MIPS_HI16 = 5,
  R_MIPS_HIGHER = 28,
  R_MIPS_HIGHEST = 29,
  R_MIPS_INSERT_A = 25,
  R_MIPS_INSERT_B = 26,
  R_MIPS_JALR = 37,
  R_MIPS_LITERAL = 8,
  R_MIPS_LO16 = 6,
  R_MIPS_NONE = 0,
  R_MIPS_PC16 = 10,
  R_MIPS_PC32 = 248,
  R_MIPS_PJUMP = 35,
  R_MIPS_REL16 = 33,
  R_MIPS_REL32 = 3,
  R_MIPS_RELGOT = 36,
  R_MIPS_SCN_DISP = 32,
  R_MIPS_SHIFT5 = 16,
  R_MIPS_SHIFT6 = 17,
  R_MIPS_SUB = 24,
  R_MIPS_TLS_DTPMOD32 = 38,
  R_MIPS_TLS_DTPMOD64 = 40,
  R_MIPS_TLS_DTPREL32 = 39,
  R_MIPS_TLS_DTPREL64 = 41,
  R_MIPS_TLS_DTPREL_HI16 = 44,
  R_MIPS_TLS_DTPREL_LO16 = 45,
  R_MIPS_TLS_GD = 42,
  R_MIPS_TLS_GOTTPREL = 46,
  R_MIPS_TLS_LDM = 43,
  R_MIPS_TLS_TPREL32 = 47,
  R_MIPS_TLS_TPREL64 = 48,
  R_MIPS_TLS_TPREL_HI16 = 49,
  R_MIPS_TLS_TPREL_LO16 = 50,
}

pub const R_MIPS_16: R_MIPS = 1

pub const R_MIPS_26: R_MIPS = 4

pub const R_MIPS_32: R_MIPS = 2

pub const R_MIPS_64: R_MIPS = 18

pub const R_MIPS_ADD_IMMEDIATE: R_MIPS = 34

pub const R_MIPS_CALL16: R_MIPS = 11

pub const R_MIPS_CALL_HI16: R_MIPS = 30

pub const R_MIPS_CALL_LO16: R_MIPS = 31

pub const R_MIPS_DELETE: R_MIPS = 27

pub const R_MIPS_GOT16: R_MIPS = 9

pub const R_MIPS_GOT_DISP: R_MIPS = 19

pub const R_MIPS_GOT_HI16: R_MIPS = 22

pub const R_MIPS_GOT_LO16: R_MIPS = 23

pub const R_MIPS_GOT_OFST: R_MIPS = 21

pub const R_MIPS_GOT_PAGE: R_MIPS = 20

pub const R_MIPS_GPREL16: R_MIPS = 7

pub const R_MIPS_GPREL32: R_MIPS = 12

pub const R_MIPS_HI16: R_MIPS = 5

pub const R_MIPS_HIGHER: R_MIPS = 28

pub const R_MIPS_HIGHEST: R_MIPS = 29

pub const R_MIPS_INSERT_A: R_MIPS = 25

pub const R_MIPS_INSERT_B: R_MIPS = 26

pub const R_MIPS_JALR: R_MIPS = 37

pub const R_MIPS_LITERAL: R_MIPS = 8

pub const R_MIPS_LO16: R_MIPS = 6

pub const R_MIPS_NONE: R_MIPS = 0

pub const R_MIPS_PC16: R_MIPS = 10

pub const R_MIPS_PC32: R_MIPS = 248

pub const R_MIPS_PJUMP: R_MIPS = 35

pub const R_MIPS_REL16: R_MIPS = 33

pub const R_MIPS_REL32: R_MIPS = 3

pub const R_MIPS_RELGOT: R_MIPS = 36

pub const R_MIPS_SCN_DISP: R_MIPS = 32

pub const R_MIPS_SHIFT5: R_MIPS = 16

pub const R_MIPS_SHIFT6: R_MIPS = 17

pub const R_MIPS_SUB: R_MIPS = 24

pub const R_MIPS_TLS_DTPMOD32: R_MIPS = 38

pub const R_MIPS_TLS_DTPMOD64: R_MIPS = 40

pub const R_MIPS_TLS_DTPREL32: R_MIPS = 39

pub const R_MIPS_TLS_DTPREL64: R_MIPS = 41

pub const R_MIPS_TLS_DTPREL_HI16: R_MIPS = 44

pub const R_MIPS_TLS_DTPREL_LO16: R_MIPS = 45

pub const R_MIPS_TLS_GD: R_MIPS = 42

pub const R_MIPS_TLS_GOTTPREL: R_MIPS = 46

pub const R_MIPS_TLS_LDM: R_MIPS = 43

pub const R_MIPS_TLS_TPREL32: R_MIPS = 47

pub const R_MIPS_TLS_TPREL64: R_MIPS = 48

pub const R_MIPS_TLS_TPREL_HI16: R_MIPS = 49

pub const R_MIPS_TLS_TPREL_LO16: R_MIPS = 50

pub enum R_PPC: int {
  R_PPC_ADDR14 = 7,
  R_PPC_ADDR14_BRNTAKEN = 9,
  R_PPC_ADDR14_BRTAKEN = 8,
  R_PPC_ADDR16 = 3,
  R_PPC_ADDR16_HA = 6,
  R_PPC_ADDR16_HI = 5,
  R_PPC_ADDR16_LO = 4,
  R_PPC_ADDR24 = 2,
  R_PPC_ADDR32 = 1,
  R_PPC_COPY = 19,
  R_PPC_DTPMOD32 = 68,
  R_PPC_DTPREL16 = 74,
  R_PPC_DTPREL16_HA = 77,
  R_PPC_DTPREL16_HI = 76,
  R_PPC_DTPREL16_LO = 75,
  R_PPC_DTPREL32 = 78,
  R_PPC_EMB_BIT_FLD = 115,
  R_PPC_EMB_MRKREF = 110,
  R_PPC_EMB_NADDR16 = 102,
  R_PPC_EMB_NADDR16_HA = 105,
  R_PPC_EMB_NADDR16_HI = 104,
  R_PPC_EMB_NADDR16_LO = 103,
  R_PPC_EMB_NADDR32 = 101,
  R_PPC_EMB_RELSDA = 116,
  R_PPC_EMB_RELSEC16 = 111,
  R_PPC_EMB_RELST_HA = 114,
  R_PPC_EMB_RELST_HI = 113,
  R_PPC_EMB_RELST_LO = 112,
  R_PPC_EMB_SDA21 = 109,
  R_PPC_EMB_SDA2I16 = 107,
  R_PPC_EMB_SDA2REL = 108,
  R_PPC_EMB_SDAI16 = 106,
  R_PPC_GLOB_DAT = 20,
  R_PPC_GOT16 = 14,
  R_PPC_GOT16_HA = 17,
  R_PPC_GOT16_HI = 16,
  R_PPC_GOT16_LO = 15,
  R_PPC_GOT_TLSGD16 = 79,
  R_PPC_GOT_TLSGD16_HA = 82,
  R_PPC_GOT_TLSGD16_HI = 81,
  R_PPC_GOT_TLSGD16_LO = 80,
  R_PPC_GOT_TLSLD16 = 83,
  R_PPC_GOT_TLSLD16_HA = 86,
  R_PPC_GOT_TLSLD16_HI = 85,
  R_PPC_GOT_TLSLD16_LO = 84,
  R_PPC_GOT_TPREL16 = 87,
  R_PPC_GOT_TPREL16_HA = 90,
  R_PPC_GOT_TPREL16_HI = 89,
  R_PPC_GOT_TPREL16_LO = 88,
  R_PPC_JMP_SLOT = 21,
  R_PPC_LOCAL24PC = 23,
  R_PPC_NONE = 0,
  R_PPC_PLT16_HA = 31,
  R_PPC_PLT16_HI = 30,
  R_PPC_PLT16_LO = 29,
  R_PPC_PLT32 = 27,
  R_PPC_PLTREL24 = 18,
  R_PPC_PLTREL32 = 28,
  R_PPC_REL14 = 11,
  R_PPC_REL14_BRNTAKEN = 13,
  R_PPC_REL14_BRTAKEN = 12,
  R_PPC_REL24 = 10,
  R_PPC_REL32 = 26,
  R_PPC_RELATIVE = 22,
  R_PPC_SDAREL16 = 32,
  R_PPC_SECTOFF = 33,
  R_PPC_SECTOFF_HA = 36,
  R_PPC_SECTOFF_HI = 35,
  R_PPC_SECTOFF_LO = 34,
  R_PPC_TLS = 67,
  R_PPC_TPREL16 = 69,
  R_PPC_TPREL16_HA = 72,
  R_PPC_TPREL16_HI = 71,
  R_PPC_TPREL16_LO = 70,
  R_PPC_TPREL32 = 73,
  R_PPC_UADDR16 = 25,
  R_PPC_UADDR32 = 24,
}

pub const R_PPC_ADDR14: R_PPC = 7

pub const R_PPC_ADDR14_BRNTAKEN: R_PPC = 9

pub const R_PPC_ADDR14_BRTAKEN: R_PPC = 8

pub const R_PPC_ADDR16: R_PPC = 3

pub const R_PPC_ADDR16_HA: R_PPC = 6

pub const R_PPC_ADDR16_HI: R_PPC = 5

pub const R_PPC_ADDR16_LO: R_PPC = 4

pub const R_PPC_ADDR24: R_PPC = 2

pub const R_PPC_ADDR32: R_PPC = 1

pub const R_PPC_COPY: R_PPC = 19

pub const R_PPC_DTPMOD32: R_PPC = 68

pub const R_PPC_DTPREL16: R_PPC = 74

pub const R_PPC_DTPREL16_HA: R_PPC = 77

pub const R_PPC_DTPREL16_HI: R_PPC = 76

pub const R_PPC_DTPREL16_LO: R_PPC = 75

pub const R_PPC_DTPREL32: R_PPC = 78

pub const R_PPC_EMB_BIT_FLD: R_PPC = 115

pub const R_PPC_EMB_MRKREF: R_PPC = 110

pub const R_PPC_EMB_NADDR16: R_PPC = 102

pub const R_PPC_EMB_NADDR16_HA: R_PPC = 105

pub const R_PPC_EMB_NADDR16_HI: R_PPC = 104

pub const R_PPC_EMB_NADDR16_LO: R_PPC = 103

pub const R_PPC_EMB_NADDR32: R_PPC = 101

pub const R_PPC_EMB_RELSDA: R_PPC = 116

pub const R_PPC_EMB_RELSEC16: R_PPC = 111

pub const R_PPC_EMB_RELST_HA: R_PPC = 114

pub const R_PPC_EMB_RELST_HI: R_PPC = 113

pub const R_PPC_EMB_RELST_LO: R_PPC = 112

pub const R_PPC_EMB_SDA21: R_PPC = 109

pub const R_PPC_EMB_SDA2I16: R_PPC = 107

pub const R_PPC_EMB_SDA2REL: R_PPC = 108

pub const R_PPC_EMB_SDAI16: R_PPC = 106

pub const R_PPC_GLOB_DAT: R_PPC = 20

pub const R_PPC_GOT16: R_PPC = 14

pub const R_PPC_GOT16_HA: R_PPC = 17

pub const R_PPC_GOT16_HI: R_PPC = 16

pub const R_PPC_GOT16_LO: R_PPC = 15

pub const R_PPC_GOT_TLSGD16: R_PPC = 79

pub const R_PPC_GOT_TLSGD16_HA: R_PPC = 82

pub const R_PPC_GOT_TLSGD16_HI: R_PPC = 81

pub const R_PPC_GOT_TLSGD16_LO: R_PPC = 80

pub const R_PPC_GOT_TLSLD16: R_PPC = 83

pub const R_PPC_GOT_TLSLD16_HA: R_PPC = 86

pub const R_PPC_GOT_TLSLD16_HI: R_PPC = 85

pub const R_PPC_GOT_TLSLD16_LO: R_PPC = 84

pub const R_PPC_GOT_TPREL16: R_PPC = 87

pub const R_PPC_GOT_TPREL16_HA: R_PPC = 90

pub const R_PPC_GOT_TPREL16_HI: R_PPC = 89

pub const R_PPC_GOT_TPREL16_LO: R_PPC = 88

pub const R_PPC_JMP_SLOT: R_PPC = 21

pub const R_PPC_LOCAL24PC: R_PPC = 23

pub const R_PPC_NONE: R_PPC = 0

pub const R_PPC_PLT16_HA: R_PPC = 31

pub const R_PPC_PLT16_HI: R_PPC = 30

pub const R_PPC_PLT16_LO: R_PPC = 29

pub const R_PPC_PLT32: R_PPC = 27

pub const R_PPC_PLTREL24: R_PPC = 18

pub const R_PPC_PLTREL32: R_PPC = 28

pub const R_PPC_REL14: R_PPC = 11

pub const R_PPC_REL14_BRNTAKEN: R_PPC = 13

pub const R_PPC_REL14_BRTAKEN: R_PPC = 12

pub const R_PPC_REL24: R_PPC = 10

pub const R_PPC_REL32: R_PPC = 26

pub const R_PPC_RELATIVE: R_PPC = 22

pub const R_PPC_SDAREL16: R_PPC = 32

pub const R_PPC_SECTOFF: R_PPC = 33

pub const R_PPC_SECTOFF_HA: R_PPC = 36

pub const R_PPC_SECTOFF_HI: R_PPC = 35

pub const R_PPC_SECTOFF_LO: R_PPC = 34

pub const R_PPC_TLS: R_PPC = 67

pub const R_PPC_TPREL16: R_PPC = 69

pub const R_PPC_TPREL16_HA: R_PPC = 72

pub const R_PPC_TPREL16_HI: R_PPC = 71

pub const R_PPC_TPREL16_LO: R_PPC = 70

pub const R_PPC_TPREL32: R_PPC = 73

pub const R_PPC_UADDR16: R_PPC = 25

pub const R_PPC_UADDR32: R_PPC = 24

pub enum R_PPC64: int {
  R_PPC64_ADDR14 = 7,
  R_PPC64_ADDR14_BRNTAKEN = 9,
  R_PPC64_ADDR14_BRTAKEN = 8,
  R_PPC64_ADDR16 = 3,
  R_PPC64_ADDR16_DS = 56,
  R_PPC64_ADDR16_HA = 6,
  R_PPC64_ADDR16_HI = 5,
  R_PPC64_ADDR16_HIGH = 110,
  R_PPC64_ADDR16_HIGHA = 111,
  R_PPC64_ADDR16_HIGHER = 39,
  R_PPC64_ADDR16_HIGHER34 = 136,
  R_PPC64_ADDR16_HIGHERA = 40,
  R_PPC64_ADDR16_HIGHERA34 = 137,
  R_PPC64_ADDR16_HIGHEST = 41,
  R_PPC64_ADDR16_HIGHEST34 = 138,
  R_PPC64_ADDR16_HIGHESTA = 42,
  R_PPC64_ADDR16_HIGHESTA34 = 139,
  R_PPC64_ADDR16_LO = 4,
  R_PPC64_ADDR16_LO_DS = 57,
  R_PPC64_ADDR24 = 2,
  R_PPC64_ADDR32 = 1,
  R_PPC64_ADDR64 = 38,
  R_PPC64_ADDR64_LOCAL = 117,
  R_PPC64_COPY = 19,
  R_PPC64_D28 = 144,
  R_PPC64_D34 = 128,
  R_PPC64_D34_HA30 = 131,
  R_PPC64_D34_HI30 = 130,
  R_PPC64_D34_LO = 129,
  R_PPC64_DTPMOD64 = 68,
  R_PPC64_DTPREL16 = 74,
  R_PPC64_DTPREL16_DS = 101,
  R_PPC64_DTPREL16_HA = 77,
  R_PPC64_DTPREL16_HI = 76,
  R_PPC64_DTPREL16_HIGH = 114,
  R_PPC64_DTPREL16_HIGHA = 115,
  R_PPC64_DTPREL16_HIGHER = 103,
  R_PPC64_DTPREL16_HIGHERA = 104,
  R_PPC64_DTPREL16_HIGHEST = 105,
  R_PPC64_DTPREL16_HIGHESTA = 106,
  R_PPC64_DTPREL16_LO = 75,
  R_PPC64_DTPREL16_LO_DS = 102,
  R_PPC64_DTPREL34 = 147,
  R_PPC64_DTPREL64 = 78,
  R_PPC64_ENTRY = 118,
  R_PPC64_GLOB_DAT = 20,
  R_PPC64_GNU_VTENTRY = 254,
  R_PPC64_GNU_VTINHERIT = 253,
  R_PPC64_GOT16 = 14,
  R_PPC64_GOT16_DS = 58,
  R_PPC64_GOT16_HA = 17,
  R_PPC64_GOT16_HI = 16,
  R_PPC64_GOT16_LO = 15,
  R_PPC64_GOT16_LO_DS = 59,
  R_PPC64_GOT_DTPREL16_DS = 91,
  R_PPC64_GOT_DTPREL16_HA = 94,
  R_PPC64_GOT_DTPREL16_HI = 93,
  R_PPC64_GOT_DTPREL16_LO_DS = 92,
  R_PPC64_GOT_DTPREL_PCREL34 = 151,
  R_PPC64_GOT_PCREL34 = 133,
  R_PPC64_GOT_TLSGD16 = 79,
  R_PPC64_GOT_TLSGD16_HA = 82,
  R_PPC64_GOT_TLSGD16_HI = 81,
  R_PPC64_GOT_TLSGD16_LO = 80,
  R_PPC64_GOT_TLSGD_PCREL34 = 148,
  R_PPC64_GOT_TLSLD16 = 83,
  R_PPC64_GOT_TLSLD16_HA = 86,
  R_PPC64_GOT_TLSLD16_HI = 85,
  R_PPC64_GOT_TLSLD16_LO = 84,
  R_PPC64_GOT_TLSLD_PCREL34 = 149,
  R_PPC64_GOT_TPREL16_DS = 87,
  R_PPC64_GOT_TPREL16_HA = 90,
  R_PPC64_GOT_TPREL16_HI = 89,
  R_PPC64_GOT_TPREL16_LO_DS = 88,
  R_PPC64_GOT_TPREL_PCREL34 = 150,
  R_PPC64_IRELATIVE = 248,
  R_PPC64_JMP_IREL = 247,
  R_PPC64_JMP_SLOT = 21,
  R_PPC64_NONE = 0,
  R_PPC64_PCREL28 = 145,
  R_PPC64_PCREL34 = 132,
  R_PPC64_PCREL_OPT = 123,
  R_PPC64_PLT16_HA = 31,
  R_PPC64_PLT16_HI = 30,
  R_PPC64_PLT16_LO = 29,
  R_PPC64_PLT16_LO_DS = 60,
  R_PPC64_PLT32 = 27,
  R_PPC64_PLT64 = 45,
  R_PPC64_PLTCALL = 120,
  R_PPC64_PLTCALL_NOTOC = 122,
  R_PPC64_PLTGOT16 = 52,
  R_PPC64_PLTGOT16_DS = 65,
  R_PPC64_PLTGOT16_HA = 55,
  R_PPC64_PLTGOT16_HI = 54,
  R_PPC64_PLTGOT16_LO = 53,
  R_PPC64_PLTGOT_LO_DS = 66,
  R_PPC64_PLTREL32 = 28,
  R_PPC64_PLTREL64 = 46,
  R_PPC64_PLTSEQ = 119,
  R_PPC64_PLTSEQ_NOTOC = 121,
  R_PPC64_PLT_PCREL34 = 134,
  R_PPC64_PLT_PCREL34_NOTOC = 135,
  R_PPC64_REL14 = 11,
  R_PPC64_REL14_BRNTAKEN = 13,
  R_PPC64_REL14_BRTAKEN = 12,
  R_PPC64_REL16 = 249,
  R_PPC64_REL16DX_HA = 246,
  R_PPC64_REL16_HA = 252,
  R_PPC64_REL16_HI = 251,
  R_PPC64_REL16_HIGH = 240,
  R_PPC64_REL16_HIGHA = 241,
  R_PPC64_REL16_HIGHER = 242,
  R_PPC64_REL16_HIGHER34 = 140,
  R_PPC64_REL16_HIGHERA = 243,
  R_PPC64_REL16_HIGHERA34 = 141,
  R_PPC64_REL16_HIGHEST = 244,
  R_PPC64_REL16_HIGHEST34 = 142,
  R_PPC64_REL16_HIGHESTA = 245,
  R_PPC64_REL16_HIGHESTA34 = 143,
  R_PPC64_REL16_LO = 250,
  R_PPC64_REL24 = 10,
  R_PPC64_REL24_NOTOC = 116,
  R_PPC64_REL24_P9NOTOC = 124,
  R_PPC64_REL30 = 37,
  R_PPC64_REL32 = 26,
  R_PPC64_REL64 = 44,
  R_PPC64_RELATIVE = 22,
  R_PPC64_SECTOFF = 33,
  R_PPC64_SECTOFF_DS = 61,
  R_PPC64_SECTOFF_HA = 36,
  R_PPC64_SECTOFF_HI = 35,
  R_PPC64_SECTOFF_LO = 34,
  R_PPC64_SECTOFF_LO_DS = 62,
  R_PPC64_TLS = 67,
  R_PPC64_TLSGD = 107,
  R_PPC64_TLSLD = 108,
  R_PPC64_TOC = 51,
  R_PPC64_TOC16 = 47,
  R_PPC64_TOC16_DS = 63,
  R_PPC64_TOC16_HA = 50,
  R_PPC64_TOC16_HI = 49,
  R_PPC64_TOC16_LO = 48,
  R_PPC64_TOC16_LO_DS = 64,
  R_PPC64_TOCSAVE = 109,
  R_PPC64_TPREL16 = 69,
  R_PPC64_TPREL16_DS = 95,
  R_PPC64_TPREL16_HA = 72,
  R_PPC64_TPREL16_HI = 71,
  R_PPC64_TPREL16_HIGH = 112,
  R_PPC64_TPREL16_HIGHA = 113,
  R_PPC64_TPREL16_HIGHER = 97,
  R_PPC64_TPREL16_HIGHERA = 98,
  R_PPC64_TPREL16_HIGHEST = 99,
  R_PPC64_TPREL16_HIGHESTA = 100,
  R_PPC64_TPREL16_LO = 70,
  R_PPC64_TPREL16_LO_DS = 96,
  R_PPC64_TPREL34 = 146,
  R_PPC64_TPREL64 = 73,
  R_PPC64_UADDR16 = 25,
  R_PPC64_UADDR32 = 24,
  R_PPC64_UADDR64 = 43,
}

pub const R_PPC64_ADDR14: R_PPC64 = 7

pub const R_PPC64_ADDR14_BRNTAKEN: R_PPC64 = 9

pub const R_PPC64_ADDR14_BRTAKEN: R_PPC64 = 8

pub const R_PPC64_ADDR16: R_PPC64 = 3

pub const R_PPC64_ADDR16_DS: R_PPC64 = 56

pub const R_PPC64_ADDR16_HA: R_PPC64 = 6

pub const R_PPC64_ADDR16_HI: R_PPC64 = 5

pub const R_PPC64_ADDR16_HIGH: R_PPC64 = 110

pub const R_PPC64_ADDR16_HIGHA: R_PPC64 = 111

pub const R_PPC64_ADDR16_HIGHER: R_PPC64 = 39

pub const R_PPC64_ADDR16_HIGHER34: R_PPC64 = 136

pub const R_PPC64_ADDR16_HIGHERA: R_PPC64 = 40

pub const R_PPC64_ADDR16_HIGHERA34: R_PPC64 = 137

pub const R_PPC64_ADDR16_HIGHEST: R_PPC64 = 41

pub const R_PPC64_ADDR16_HIGHEST34: R_PPC64 = 138

pub const R_PPC64_ADDR16_HIGHESTA: R_PPC64 = 42

pub const R_PPC64_ADDR16_HIGHESTA34: R_PPC64 = 139

pub const R_PPC64_ADDR16_LO: R_PPC64 = 4

pub const R_PPC64_ADDR16_LO_DS: R_PPC64 = 57

pub const R_PPC64_ADDR24: R_PPC64 = 2

pub const R_PPC64_ADDR32: R_PPC64 = 1

pub const R_PPC64_ADDR64: R_PPC64 = 38

pub const R_PPC64_ADDR64_LOCAL: R_PPC64 = 117

pub const R_PPC64_COPY: R_PPC64 = 19

pub const R_PPC64_D28: R_PPC64 = 144

pub const R_PPC64_D34: R_PPC64 = 128

pub const R_PPC64_D34_HA30: R_PPC64 = 131

pub const R_PPC64_D34_HI30: R_PPC64 = 130

pub const R_PPC64_D34_LO: R_PPC64 = 129

pub const R_PPC64_DTPMOD64: R_PPC64 = 68

pub const R_PPC64_DTPREL16: R_PPC64 = 74

pub const R_PPC64_DTPREL16_DS: R_PPC64 = 101

pub const R_PPC64_DTPREL16_HA: R_PPC64 = 77

pub const R_PPC64_DTPREL16_HI: R_PPC64 = 76

pub const R_PPC64_DTPREL16_HIGH: R_PPC64 = 114

pub const R_PPC64_DTPREL16_HIGHA: R_PPC64 = 115

pub const R_PPC64_DTPREL16_HIGHER: R_PPC64 = 103

pub const R_PPC64_DTPREL16_HIGHERA: R_PPC64 = 104

pub const R_PPC64_DTPREL16_HIGHEST: R_PPC64 = 105

pub const R_PPC64_DTPREL16_HIGHESTA: R_PPC64 = 106

pub const R_PPC64_DTPREL16_LO: R_PPC64 = 75

pub const R_PPC64_DTPREL16_LO_DS: R_PPC64 = 102

pub const R_PPC64_DTPREL34: R_PPC64 = 147

pub const R_PPC64_DTPREL64: R_PPC64 = 78

pub const R_PPC64_ENTRY: R_PPC64 = 118

pub const R_PPC64_GLOB_DAT: R_PPC64 = 20

pub const R_PPC64_GNU_VTENTRY: R_PPC64 = 254

pub const R_PPC64_GNU_VTINHERIT: R_PPC64 = 253

pub const R_PPC64_GOT16: R_PPC64 = 14

pub const R_PPC64_GOT16_DS: R_PPC64 = 58

pub const R_PPC64_GOT16_HA: R_PPC64 = 17

pub const R_PPC64_GOT16_HI: R_PPC64 = 16

pub const R_PPC64_GOT16_LO: R_PPC64 = 15

pub const R_PPC64_GOT16_LO_DS: R_PPC64 = 59

pub const R_PPC64_GOT_DTPREL16_DS: R_PPC64 = 91

pub const R_PPC64_GOT_DTPREL16_HA: R_PPC64 = 94

pub const R_PPC64_GOT_DTPREL16_HI: R_PPC64 = 93

pub const R_PPC64_GOT_DTPREL16_LO_DS: R_PPC64 = 92

pub const R_PPC64_GOT_DTPREL_PCREL34: R_PPC64 = 151

pub const R_PPC64_GOT_PCREL34: R_PPC64 = 133

pub const R_PPC64_GOT_TLSGD16: R_PPC64 = 79

pub const R_PPC64_GOT_TLSGD16_HA: R_PPC64 = 82

pub const R_PPC64_GOT_TLSGD16_HI: R_PPC64 = 81

pub const R_PPC64_GOT_TLSGD16_LO: R_PPC64 = 80

pub const R_PPC64_GOT_TLSGD_PCREL34: R_PPC64 = 148

pub const R_PPC64_GOT_TLSLD16: R_PPC64 = 83

pub const R_PPC64_GOT_TLSLD16_HA: R_PPC64 = 86

pub const R_PPC64_GOT_TLSLD16_HI: R_PPC64 = 85

pub const R_PPC64_GOT_TLSLD16_LO: R_PPC64 = 84

pub const R_PPC64_GOT_TLSLD_PCREL34: R_PPC64 = 149

pub const R_PPC64_GOT_TPREL16_DS: R_PPC64 = 87

pub const R_PPC64_GOT_TPREL16_HA: R_PPC64 = 90

pub const R_PPC64_GOT_TPREL16_HI: R_PPC64 = 89

pub const R_PPC64_GOT_TPREL16_LO_DS: R_PPC64 = 88

pub const R_PPC64_GOT_TPREL_PCREL34: R_PPC64 = 150

pub const R_PPC64_IRELATIVE: R_PPC64 = 248

pub const R_PPC64_JMP_IREL: R_PPC64 = 247

pub const R_PPC64_JMP_SLOT: R_PPC64 = 21

pub const R_PPC64_NONE: R_PPC64 = 0

pub const R_PPC64_PCREL28: R_PPC64 = 145

pub const R_PPC64_PCREL34: R_PPC64 = 132

pub const R_PPC64_PCREL_OPT: R_PPC64 = 123

pub const R_PPC64_PLT16_HA: R_PPC64 = 31

pub const R_PPC64_PLT16_HI: R_PPC64 = 30

pub const R_PPC64_PLT16_LO: R_PPC64 = 29

pub const R_PPC64_PLT16_LO_DS: R_PPC64 = 60

pub const R_PPC64_PLT32: R_PPC64 = 27

pub const R_PPC64_PLT64: R_PPC64 = 45

pub const R_PPC64_PLTCALL: R_PPC64 = 120

pub const R_PPC64_PLTCALL_NOTOC: R_PPC64 = 122

pub const R_PPC64_PLTGOT16: R_PPC64 = 52

pub const R_PPC64_PLTGOT16_DS: R_PPC64 = 65

pub const R_PPC64_PLTGOT16_HA: R_PPC64 = 55

pub const R_PPC64_PLTGOT16_HI: R_PPC64 = 54

pub const R_PPC64_PLTGOT16_LO: R_PPC64 = 53

pub const R_PPC64_PLTGOT_LO_DS: R_PPC64 = 66

pub const R_PPC64_PLTREL32: R_PPC64 = 28

pub const R_PPC64_PLTREL64: R_PPC64 = 46

pub const R_PPC64_PLTSEQ: R_PPC64 = 119

pub const R_PPC64_PLTSEQ_NOTOC: R_PPC64 = 121

pub const R_PPC64_PLT_PCREL34: R_PPC64 = 134

pub const R_PPC64_PLT_PCREL34_NOTOC: R_PPC64 = 135

pub const R_PPC64_REL14: R_PPC64 = 11

pub const R_PPC64_REL14_BRNTAKEN: R_PPC64 = 13

pub const R_PPC64_REL14_BRTAKEN: R_PPC64 = 12

pub const R_PPC64_REL16: R_PPC64 = 249

pub const R_PPC64_REL16DX_HA: R_PPC64 = 246

pub const R_PPC64_REL16_HA: R_PPC64 = 252

pub const R_PPC64_REL16_HI: R_PPC64 = 251

pub const R_PPC64_REL16_HIGH: R_PPC64 = 240

pub const R_PPC64_REL16_HIGHA: R_PPC64 = 241

pub const R_PPC64_REL16_HIGHER: R_PPC64 = 242

pub const R_PPC64_REL16_HIGHER34: R_PPC64 = 140

pub const R_PPC64_REL16_HIGHERA: R_PPC64 = 243

pub const R_PPC64_REL16_HIGHERA34: R_PPC64 = 141

pub const R_PPC64_REL16_HIGHEST: R_PPC64 = 244

pub const R_PPC64_REL16_HIGHEST34: R_PPC64 = 142

pub const R_PPC64_REL16_HIGHESTA: R_PPC64 = 245

pub const R_PPC64_REL16_HIGHESTA34: R_PPC64 = 143

pub const R_PPC64_REL16_LO: R_PPC64 = 250

pub const R_PPC64_REL24: R_PPC64 = 10

pub const R_PPC64_REL24_NOTOC: R_PPC64 = 116

pub const R_PPC64_REL24_P9NOTOC: R_PPC64 = 124

pub const R_PPC64_REL30: R_PPC64 = 37

pub const R_PPC64_REL32: R_PPC64 = 26

pub const R_PPC64_REL64: R_PPC64 = 44

pub const R_PPC64_RELATIVE: R_PPC64 = 22

pub const R_PPC64_SECTOFF: R_PPC64 = 33

pub const R_PPC64_SECTOFF_DS: R_PPC64 = 61

pub const R_PPC64_SECTOFF_HA: R_PPC64 = 36

pub const R_PPC64_SECTOFF_HI: R_PPC64 = 35

pub const R_PPC64_SECTOFF_LO: R_PPC64 = 34

pub const R_PPC64_SECTOFF_LO_DS: R_PPC64 = 62

pub const R_PPC64_TLS: R_PPC64 = 67

pub const R_PPC64_TLSGD: R_PPC64 = 107

pub const R_PPC64_TLSLD: R_PPC64 = 108

pub const R_PPC64_TOC: R_PPC64 = 51

pub const R_PPC64_TOC16: R_PPC64 = 47

pub const R_PPC64_TOC16_DS: R_PPC64 = 63

pub const R_PPC64_TOC16_HA: R_PPC64 = 50

pub const R_PPC64_TOC16_HI: R_PPC64 = 49

pub const R_PPC64_TOC16_LO: R_PPC64 = 48

pub const R_PPC64_TOC16_LO_DS: R_PPC64 = 64

pub const R_PPC64_TOCSAVE: R_PPC64 = 109

pub const R_PPC64_TPREL16: R_PPC64 = 69

pub const R_PPC64_TPREL16_DS: R_PPC64 = 95

pub const R_PPC64_TPREL16_HA: R_PPC64 = 72

pub const R_PPC64_TPREL16_HI: R_PPC64 = 71

pub const R_PPC64_TPREL16_HIGH: R_PPC64 = 112

pub const R_PPC64_TPREL16_HIGHA: R_PPC64 = 113

pub const R_PPC64_TPREL16_HIGHER: R_PPC64 = 97

pub const R_PPC64_TPREL16_HIGHERA: R_PPC64 = 98

pub const R_PPC64_TPREL16_HIGHEST: R_PPC64 = 99

pub const R_PPC64_TPREL16_HIGHESTA: R_PPC64 = 100

pub const R_PPC64_TPREL16_LO: R_PPC64 = 70

pub const R_PPC64_TPREL16_LO_DS: R_PPC64 = 96

pub const R_PPC64_TPREL34: R_PPC64 = 146

pub const R_PPC64_TPREL64: R_PPC64 = 73

pub const R_PPC64_UADDR16: R_PPC64 = 25

pub const R_PPC64_UADDR32: R_PPC64 = 24

pub const R_PPC64_UADDR64: R_PPC64 = 43

pub enum R_RISCV: int {
  R_RISCV_32 = 1,
  R_RISCV_32_PCREL = 57,
  R_RISCV_64 = 2,
  R_RISCV_ADD16 = 34,
  R_RISCV_ADD32 = 35,
  R_RISCV_ADD64 = 36,
  R_RISCV_ADD8 = 33,
  R_RISCV_ALIGN = 43,
  R_RISCV_BRANCH = 16,
  R_RISCV_CALL = 18,
  R_RISCV_CALL_PLT = 19,
  R_RISCV_COPY = 4,
  R_RISCV_GNU_VTENTRY = 42,
  R_RISCV_GNU_VTINHERIT = 41,
  R_RISCV_GOT_HI20 = 20,
  R_RISCV_GPREL_I = 47,
  R_RISCV_GPREL_S = 48,
  R_RISCV_HI20 = 26,
  R_RISCV_JAL = 17,
  R_RISCV_JUMP_SLOT = 5,
  R_RISCV_LO12_I = 27,
  R_RISCV_LO12_S = 28,
  R_RISCV_NONE = 0,
  R_RISCV_PCREL_HI20 = 23,
  R_RISCV_PCREL_LO12_I = 24,
  R_RISCV_PCREL_LO12_S = 25,
  R_RISCV_RELATIVE = 3,
  R_RISCV_RELAX = 51,
  R_RISCV_RVC_BRANCH = 44,
  R_RISCV_RVC_JUMP = 45,
  R_RISCV_RVC_LUI = 46,
  R_RISCV_SET16 = 55,
  R_RISCV_SET32 = 56,
  R_RISCV_SET6 = 53,
  R_RISCV_SET8 = 54,
  R_RISCV_SUB16 = 38,
  R_RISCV_SUB32 = 39,
  R_RISCV_SUB6 = 52,
  R_RISCV_SUB64 = 40,
  R_RISCV_SUB8 = 37,
  R_RISCV_TLS_DTPMOD32 = 6,
  R_RISCV_TLS_DTPMOD64 = 7,
  R_RISCV_TLS_DTPREL32 = 8,
  R_RISCV_TLS_DTPREL64 = 9,
  R_RISCV_TLS_GD_HI20 = 22,
  R_RISCV_TLS_GOT_HI20 = 21,
  R_RISCV_TLS_TPREL32 = 10,
  R_RISCV_TLS_TPREL64 = 11,
  R_RISCV_TPREL_ADD = 32,
  R_RISCV_TPREL_HI20 = 29,
  R_RISCV_TPREL_I = 49,
  R_RISCV_TPREL_LO12_I = 30,
  R_RISCV_TPREL_LO12_S = 31,
  R_RISCV_TPREL_S = 50,
}

pub const R_RISCV_32: R_RISCV = 1

pub const R_RISCV_32_PCREL: R_RISCV = 57

pub const R_RISCV_64: R_RISCV = 2

pub const R_RISCV_ADD16: R_RISCV = 34

pub const R_RISCV_ADD32: R_RISCV = 35

pub const R_RISCV_ADD64: R_RISCV = 36

pub const R_RISCV_ADD8: R_RISCV = 33

pub const R_RISCV_ALIGN: R_RISCV = 43

pub const R_RISCV_BRANCH: R_RISCV = 16

pub const R_RISCV_CALL: R_RISCV = 18

pub const R_RISCV_CALL_PLT: R_RISCV = 19

pub const R_RISCV_COPY: R_RISCV = 4

pub const R_RISCV_GNU_VTENTRY: R_RISCV = 42

pub const R_RISCV_GNU_VTINHERIT: R_RISCV = 41

pub const R_RISCV_GOT_HI20: R_RISCV = 20

pub const R_RISCV_GPREL_I: R_RISCV = 47

pub const R_RISCV_GPREL_S: R_RISCV = 48

pub const R_RISCV_HI20: R_RISCV = 26

pub const R_RISCV_JAL: R_RISCV = 17

pub const R_RISCV_JUMP_SLOT: R_RISCV = 5

pub const R_RISCV_LO12_I: R_RISCV = 27

pub const R_RISCV_LO12_S: R_RISCV = 28

pub const R_RISCV_NONE: R_RISCV = 0

pub const R_RISCV_PCREL_HI20: R_RISCV = 23

pub const R_RISCV_PCREL_LO12_I: R_RISCV = 24

pub const R_RISCV_PCREL_LO12_S: R_RISCV = 25

pub const R_RISCV_RELATIVE: R_RISCV = 3

pub const R_RISCV_RELAX: R_RISCV = 51

pub const R_RISCV_RVC_BRANCH: R_RISCV = 44

pub const R_RISCV_RVC_JUMP: R_RISCV = 45

pub const R_RISCV_RVC_LUI: R_RISCV = 46

pub const R_RISCV_SET16: R_RISCV = 55

pub const R_RISCV_SET32: R_RISCV = 56

pub const R_RISCV_SET6: R_RISCV = 53

pub const R_RISCV_SET8: R_RISCV = 54

pub const R_RISCV_SUB16: R_RISCV = 38

pub const R_RISCV_SUB32: R_RISCV = 39

pub const R_RISCV_SUB6: R_RISCV = 52

pub const R_RISCV_SUB64: R_RISCV = 40

pub const R_RISCV_SUB8: R_RISCV = 37

pub const R_RISCV_TLS_DTPMOD32: R_RISCV = 6

pub const R_RISCV_TLS_DTPMOD64: R_RISCV = 7

pub const R_RISCV_TLS_DTPREL32: R_RISCV = 8

pub const R_RISCV_TLS_DTPREL64: R_RISCV = 9

pub const R_RISCV_TLS_GD_HI20: R_RISCV = 22

pub const R_RISCV_TLS_GOT_HI20: R_RISCV = 21

pub const R_RISCV_TLS_TPREL32: R_RISCV = 10

pub const R_RISCV_TLS_TPREL64: R_RISCV = 11

pub const R_RISCV_TPREL_ADD: R_RISCV = 32

pub const R_RISCV_TPREL_HI20: R_RISCV = 29

pub const R_RISCV_TPREL_I: R_RISCV = 49

pub const R_RISCV_TPREL_LO12_I: R_RISCV = 30

pub const R_RISCV_TPREL_LO12_S: R_RISCV = 31

pub const R_RISCV_TPREL_S: R_RISCV = 50

pub enum R_SPARC: int {
  R_SPARC_10 = 30,
  R_SPARC_11 = 31,
  R_SPARC_13 = 11,
  R_SPARC_16 = 2,
  R_SPARC_22 = 10,
  R_SPARC_32 = 3,
  R_SPARC_5 = 44,
  R_SPARC_6 = 45,
  R_SPARC_64 = 32,
  R_SPARC_7 = 43,
  R_SPARC_8 = 1,
  R_SPARC_COPY = 19,
  R_SPARC_DISP16 = 5,
  R_SPARC_DISP32 = 6,
  R_SPARC_DISP64 = 46,
  R_SPARC_DISP8 = 4,
  R_SPARC_GLOB_DAT = 20,
  R_SPARC_GLOB_JMP = 42,
  R_SPARC_GOT10 = 13,
  R_SPARC_GOT13 = 14,
  R_SPARC_GOT22 = 15,
  R_SPARC_H44 = 50,
  R_SPARC_HH22 = 34,
  R_SPARC_HI22 = 9,
  R_SPARC_HIPLT22 = 25,
  R_SPARC_HIX22 = 48,
  R_SPARC_HM10 = 35,
  R_SPARC_JMP_SLOT = 21,
  R_SPARC_L44 = 52,
  R_SPARC_LM22 = 36,
  R_SPARC_LO10 = 12,
  R_SPARC_LOPLT10 = 26,
  R_SPARC_LOX10 = 49,
  R_SPARC_M44 = 51,
  R_SPARC_NONE = 0,
  R_SPARC_OLO10 = 33,
  R_SPARC_PC10 = 16,
  R_SPARC_PC22 = 17,
  R_SPARC_PCPLT10 = 29,
  R_SPARC_PCPLT22 = 28,
  R_SPARC_PCPLT32 = 27,
  R_SPARC_PC_HH22 = 37,
  R_SPARC_PC_HM10 = 38,
  R_SPARC_PC_LM22 = 39,
  R_SPARC_PLT32 = 24,
  R_SPARC_PLT64 = 47,
  R_SPARC_REGISTER = 53,
  R_SPARC_RELATIVE = 22,
  R_SPARC_UA16 = 55,
  R_SPARC_UA32 = 23,
  R_SPARC_UA64 = 54,
  R_SPARC_WDISP16 = 40,
  R_SPARC_WDISP19 = 41,
  R_SPARC_WDISP22 = 8,
  R_SPARC_WDISP30 = 7,
  R_SPARC_WPLT30 = 18,
}

pub const R_SPARC_10: R_SPARC = 30

pub const R_SPARC_11: R_SPARC = 31

pub const R_SPARC_13: R_SPARC = 11

pub const R_SPARC_16: R_SPARC = 2

pub const R_SPARC_22: R_SPARC = 10

pub const R_SPARC_32: R_SPARC = 3

pub const R_SPARC_5: R_SPARC = 44

pub const R_SPARC_6: R_SPARC = 45

pub const R_SPARC_64: R_SPARC = 32

pub const R_SPARC_7: R_SPARC = 43

pub const R_SPARC_8: R_SPARC = 1

pub const R_SPARC_COPY: R_SPARC = 19

pub const R_SPARC_DISP16: R_SPARC = 5

pub const R_SPARC_DISP32: R_SPARC = 6

pub const R_SPARC_DISP64: R_SPARC = 46

pub const R_SPARC_DISP8: R_SPARC = 4

pub const R_SPARC_GLOB_DAT: R_SPARC = 20

pub const R_SPARC_GLOB_JMP: R_SPARC = 42

pub const R_SPARC_GOT10: R_SPARC = 13

pub const R_SPARC_GOT13: R_SPARC = 14

pub const R_SPARC_GOT22: R_SPARC = 15

pub const R_SPARC_H44: R_SPARC = 50

pub const R_SPARC_HH22: R_SPARC = 34

pub const R_SPARC_HI22: R_SPARC = 9

pub const R_SPARC_HIPLT22: R_SPARC = 25

pub const R_SPARC_HIX22: R_SPARC = 48

pub const R_SPARC_HM10: R_SPARC = 35

pub const R_SPARC_JMP_SLOT: R_SPARC = 21

pub const R_SPARC_L44: R_SPARC = 52

pub const R_SPARC_LM22: R_SPARC = 36

pub const R_SPARC_LO10: R_SPARC = 12

pub const R_SPARC_LOPLT10: R_SPARC = 26

pub const R_SPARC_LOX10: R_SPARC = 49

pub const R_SPARC_M44: R_SPARC = 51

pub const R_SPARC_NONE: R_SPARC = 0

pub const R_SPARC_OLO10: R_SPARC = 33

pub const R_SPARC_PC10: R_SPARC = 16

pub const R_SPARC_PC22: R_SPARC = 17

pub const R_SPARC_PCPLT10: R_SPARC = 29

pub const R_SPARC_PCPLT22: R_SPARC = 28

pub const R_SPARC_PCPLT32: R_SPARC = 27

pub const R_SPARC_PC_HH22: R_SPARC = 37

pub const R_SPARC_PC_HM10: R_SPARC = 38

pub const R_SPARC_PC_LM22: R_SPARC = 39

pub const R_SPARC_PLT32: R_SPARC = 24

pub const R_SPARC_PLT64: R_SPARC = 47

pub const R_SPARC_REGISTER: R_SPARC = 53

pub const R_SPARC_RELATIVE: R_SPARC = 22

pub const R_SPARC_UA16: R_SPARC = 55

pub const R_SPARC_UA32: R_SPARC = 23

pub const R_SPARC_UA64: R_SPARC = 54

pub const R_SPARC_WDISP16: R_SPARC = 40

pub const R_SPARC_WDISP19: R_SPARC = 41

pub const R_SPARC_WDISP22: R_SPARC = 8

pub const R_SPARC_WDISP30: R_SPARC = 7

pub const R_SPARC_WPLT30: R_SPARC = 18

pub enum R_X86_64: int {
  R_X86_64_16 = 12,
  R_X86_64_32 = 10,
  R_X86_64_32S = 11,
  R_X86_64_64 = 1,
  R_X86_64_8 = 14,
  R_X86_64_COPY = 5,
  R_X86_64_DTPMOD64 = 16,
  R_X86_64_DTPOFF32 = 21,
  R_X86_64_DTPOFF64 = 17,
  R_X86_64_GLOB_DAT = 6,
  R_X86_64_GOT32 = 3,
  R_X86_64_GOT64 = 27,
  R_X86_64_GOTOFF64 = 25,
  R_X86_64_GOTPC32 = 26,
  R_X86_64_GOTPC32_TLSDESC = 34,
  R_X86_64_GOTPC64 = 29,
  R_X86_64_GOTPCREL = 9,
  R_X86_64_GOTPCREL64 = 28,
  R_X86_64_GOTPCRELX = 41,
  R_X86_64_GOTPLT64 = 30,
  R_X86_64_GOTTPOFF = 22,
  R_X86_64_IRELATIVE = 37,
  R_X86_64_JMP_SLOT = 7,
  R_X86_64_NONE = 0,
  R_X86_64_PC16 = 13,
  R_X86_64_PC32 = 2,
  R_X86_64_PC32_BND = 39,
  R_X86_64_PC64 = 24,
  R_X86_64_PC8 = 15,
  R_X86_64_PLT32 = 4,
  R_X86_64_PLT32_BND = 40,
  R_X86_64_PLTOFF64 = 31,
  R_X86_64_RELATIVE = 8,
  R_X86_64_RELATIVE64 = 38,
  R_X86_64_REX_GOTPCRELX = 42,
  R_X86_64_SIZE32 = 32,
  R_X86_64_SIZE64 = 33,
  R_X86_64_TLSDESC = 36,
  R_X86_64_TLSDESC_CALL = 35,
  R_X86_64_TLSGD = 19,
  R_X86_64_TLSLD = 20,
  R_X86_64_TPOFF32 = 23,
  R_X86_64_TPOFF64 = 18,
}

pub const R_X86_64_16: R_X86_64 = 12

pub const R_X86_64_32: R_X86_64 = 10

pub const R_X86_64_32S: R_X86_64 = 11

pub const R_X86_64_64: R_X86_64 = 1

pub const R_X86_64_8: R_X86_64 = 14

pub const R_X86_64_COPY: R_X86_64 = 5

pub const R_X86_64_DTPMOD64: R_X86_64 = 16

pub const R_X86_64_DTPOFF32: R_X86_64 = 21

pub const R_X86_64_DTPOFF64: R_X86_64 = 17

pub const R_X86_64_GLOB_DAT: R_X86_64 = 6

pub const R_X86_64_GOT32: R_X86_64 = 3

pub const R_X86_64_GOT64: R_X86_64 = 27

pub const R_X86_64_GOTOFF64: R_X86_64 = 25

pub const R_X86_64_GOTPC32: R_X86_64 = 26

pub const R_X86_64_GOTPC32_TLSDESC: R_X86_64 = 34

pub const R_X86_64_GOTPC64: R_X86_64 = 29

pub const R_X86_64_GOTPCREL: R_X86_64 = 9

pub const R_X86_64_GOTPCREL64: R_X86_64 = 28

pub const R_X86_64_GOTPCRELX: R_X86_64 = 41

pub const R_X86_64_GOTPLT64: R_X86_64 = 30

pub const R_X86_64_GOTTPOFF: R_X86_64 = 22

pub const R_X86_64_IRELATIVE: R_X86_64 = 37

pub const R_X86_64_JMP_SLOT: R_X86_64 = 7

pub const R_X86_64_NONE: R_X86_64 = 0

pub const R_X86_64_PC16: R_X86_64 = 13

pub const R_X86_64_PC32: R_X86_64 = 2

pub const R_X86_64_PC32_BND: R_X86_64 = 39

pub const R_X86_64_PC64: R_X86_64 = 24

pub const R_X86_64_PC8: R_X86_64 = 15

pub const R_X86_64_PLT32: R_X86_64 = 4

pub const R_X86_64_PLT32_BND: R_X86_64 = 40

pub const R_X86_64_PLTOFF64: R_X86_64 = 31

pub const R_X86_64_RELATIVE: R_X86_64 = 8

pub const R_X86_64_RELATIVE64: R_X86_64 = 38

pub const R_X86_64_REX_GOTPCRELX: R_X86_64 = 42

pub const R_X86_64_SIZE32: R_X86_64 = 32

pub const R_X86_64_SIZE64: R_X86_64 = 33

pub const R_X86_64_TLSDESC: R_X86_64 = 36

pub const R_X86_64_TLSDESC_CALL: R_X86_64 = 35

pub const R_X86_64_TLSGD: R_X86_64 = 19

pub const R_X86_64_TLSLD: R_X86_64 = 20

pub const R_X86_64_TPOFF32: R_X86_64 = 23

pub const R_X86_64_TPOFF64: R_X86_64 = 18

pub enum SectionIndex: int {
  SHN_ABS = 0xfff1,
  SHN_COMMON = 0xfff2,
  SHN_HIOS = 0xff3f,
  SHN_HIPROC = 0xff1f,
  SHN_HIRESERVE = 0xffff,
  SHN_LOOS = 0xff20,
  SHN_LOPROC = 0xff00,
  SHN_LORESERVE = 0xff00,
  SHN_UNDEF = 0,
  SHN_XINDEX = 0xffff,
}

pub const SHN_ABS: SectionIndex = 0xfff1

pub const SHN_COMMON: SectionIndex = 0xfff2

pub const SHN_HIOS: SectionIndex = 0xff3f

pub const SHN_HIPROC: SectionIndex = 0xff1f

pub const SHN_HIRESERVE: SectionIndex = 0xffff

pub const SHN_LOOS: SectionIndex = 0xff20

pub const SHN_LOPROC: SectionIndex = 0xff00

pub const SHN_LORESERVE: SectionIndex = 0xff00

pub const SHN_UNDEF: SectionIndex = 0

pub const SHN_XINDEX: SectionIndex = 0xffff

pub enum SectionType: uint32 {
  SHT_DYNAMIC = 6,
  SHT_DYNSYM = 11,
  SHT_FINI_ARRAY = 15,
  SHT_GNU_ATTRIBUTES = 0x6ffffff5,
  SHT_GNU_HASH = 0x6ffffff6,
  SHT_GNU_LIBLIST = 0x6ffffff7,
  SHT_GNU_VERDEF = 0x6ffffffd,
  SHT_GNU_VERNEED = 0x6ffffffe,
  SHT_GNU_VERSYM = 0x6fffffff,
  SHT_GROUP = 17,
  SHT_HASH = 5,
  SHT_HIOS = 0x6fffffff,
  SHT_HIPROC = 0x7fffffff,
  SHT_HIUSER = 0xffffffff,
  SHT_INIT_ARRAY = 14,
  SHT_LOOS = 0x60000000,
  SHT_LOPROC = 0x70000000,
  SHT_LOUSER = 0x80000000,
  SHT_MIPS_ABIFLAGS = 0x7000002a,
  SHT_NOBITS = 8,
  SHT_NOTE = 7,
  SHT_NULL = 0,
  SHT_PREINIT_ARRAY = 16,
  SHT_PROGBITS = 1,
  SHT_REL = 9,
  SHT_RELA = 4,
  SHT_RISCV_ATTRIBUTES = 0x70000003,
  SHT_SHLIB = 10,
  SHT_STRTAB = 3,
  SHT_SYMTAB = 2,
  SHT_SYMTAB_SHNDX = 18,
}

pub const SHT_DYNAMIC: SectionType = 6

pub const SHT_DYNSYM: SectionType = 11

pub const SHT_FINI_ARRAY: SectionType = 15

pub const SHT_GNU_ATTRIBUTES: SectionType = 0x6ffffff5

pub const SHT_GNU_HASH: SectionType = 0x6ffffff6

pub const SHT_GNU_LIBLIST: SectionType = 0x6ffffff7

pub const SHT_GNU_VERDEF: SectionType = 0x6ffffffd

pub const SHT_GNU_VERNEED: SectionType = 0x6ffffffe

pub const SHT_GNU_VERSYM: SectionType = 0x6fffffff

pub const SHT_GROUP: SectionType = 17

pub const SHT_HASH: SectionType = 5

pub const SHT_HIOS: SectionType = 0x6fffffff

pub const SHT_HIPROC: SectionType = 0x7fffffff

pub const SHT_HIUSER: SectionType = 0xffffffff

pub const SHT_INIT_ARRAY: SectionType = 14

pub const SHT_LOOS: SectionType = 0x60000000

pub const SHT_LOPROC: SectionType = 0x70000000

pub const SHT_LOUSER: SectionType = 0x80000000

pub const SHT_MIPS_ABIFLAGS: SectionType = 0x7000002a

pub const SHT_NOBITS: SectionType = 8

pub const SHT_NOTE: SectionType = 7

pub const SHT_NULL: SectionType = 0

pub const SHT_PREINIT_ARRAY: SectionType = 16

pub const SHT_PROGBITS: SectionType = 1

pub const SHT_REL: SectionType = 9

pub const SHT_RELA: SectionType = 4

pub const SHT_RISCV_ATTRIBUTES: SectionType = 0x70000003

pub const SHT_SHLIB: SectionType = 10

pub const SHT_STRTAB: SectionType = 3

pub const SHT_SYMTAB: SectionType = 2

pub const SHT_SYMTAB_SHNDX: SectionType = 18

pub enum SymBind: int {
  STB_GLOBAL = 1,
  STB_HIOS = 12,
  STB_HIPROC = 15,
  STB_LOCAL = 0,
  STB_LOOS = 10,
  STB_LOPROC = 13,
  STB_WEAK = 2,
}

pub const STB_GLOBAL: SymBind = 1

pub const STB_HIOS: SymBind = 12

pub const STB_HIPROC: SymBind = 15

pub const STB_LOCAL: SymBind = 0

pub const STB_LOOS: SymBind = 10

pub const STB_LOPROC: SymBind = 13

pub const STB_WEAK: SymBind = 2

pub enum SymType: int {
  STT_COMMON = 5,
  STT_FILE = 4,
  STT_FUNC = 2,
  STT_GNU_IFUNC = 10,
  STT_HIOS = 12,
  STT_HIPROC = 15,
  STT_LOOS = 10,
  STT_LOPROC = 13,
  STT_NOTYPE = 0,
  STT_OBJECT = 1,
  STT_RELC = 8,
  STT_SECTION = 3,
  STT_SRELC = 9,
  STT_TLS = 6,
}

pub const STT_COMMON: SymType = 5

pub const STT_FILE: SymType = 4

pub const STT_FUNC: SymType = 2

pub const STT_GNU_IFUNC: SymType = 10

pub const STT_HIOS: SymType = 12

pub const STT_HIPROC: SymType = 15

pub const STT_LOOS: SymType = 10

pub const STT_LOPROC: SymType = 13

pub const STT_NOTYPE: SymType = 0

pub const STT_OBJECT: SymType = 1

pub const STT_RELC: SymType = 8

pub const STT_SECTION: SymType = 3

pub const STT_SRELC: SymType = 9

pub const STT_TLS: SymType = 6

pub enum SymVis: int {
  STV_DEFAULT = 0x0,
  STV_HIDDEN = 0x2,
  STV_INTERNAL = 0x1,
  STV_PROTECTED = 0x3,
}

pub const STV_DEFAULT: SymVis = 0x0

pub const STV_HIDDEN: SymVis = 0x2

pub const STV_INTERNAL: SymVis = 0x1

pub const STV_PROTECTED: SymVis = 0x3

pub enum Type: uint16 {
  ET_CORE = 4,
  ET_DYN = 3,
  ET_EXEC = 2,
  ET_HIOS = 0xfeff,
  ET_HIPROC = 0xffff,
  ET_LOOS = 0xfe00,
  ET_LOPROC = 0xff00,
  ET_NONE = 0,
  ET_REL = 1,
}

pub const ET_CORE: Type = 4

pub const ET_DYN: Type = 3

pub const ET_EXEC: Type = 2

pub const ET_HIOS: Type = 0xfeff

pub const ET_HIPROC: Type = 0xffff

pub const ET_LOOS: Type = 0xfe00

pub const ET_LOPROC: Type = 0xff00

pub const ET_NONE: Type = 0

pub const ET_REL: Type = 1

pub enum Version: byte {
  EV_CURRENT = 1,
  EV_NONE = 0,
}

pub const EV_CURRENT: Version = 1

pub const EV_NONE: Version = 0

/// NewFile creates a new [File] for accessing an ELF binary in an underlying reader.
/// The ELF binary is expected to start at position 0 in the ReaderAt.
pub fn NewFile(r: io.ReaderAt) -> Result<Ref<File>, error>

/// Open opens the named file using [os.Open] and prepares it for use as an ELF binary.
pub fn Open(name: string) -> Result<Ref<File>, error>

pub fn R_INFO(sym: uint32, typ: uint32) -> uint64

pub fn R_INFO32(sym: uint32, typ: uint32) -> uint32

pub fn R_SYM32(info: uint32) -> uint32

pub fn R_SYM64(info: uint64) -> uint32

pub fn R_TYPE32(info: uint32) -> uint32

pub fn R_TYPE64(info: uint64) -> uint32

pub fn ST_BIND(info: uint8) -> SymBind

pub fn ST_INFO(bind: SymBind, typ: SymType) -> uint8

pub fn ST_TYPE(info: uint8) -> SymType

pub fn ST_VISIBILITY(other: uint8) -> SymVis

/// ELF32 Compression header.
pub struct Chdr32 {
  pub Type: uint32,
  pub Size: uint32,
  pub Addralign: uint32,
}

/// ELF64 Compression header.
pub struct Chdr64 {
  pub Type: uint32,
  pub Size: uint64,
  pub Addralign: uint64,
}

/// Class is found in Header.Ident[EI_CLASS] and Header.Class.
pub struct Class(uint8)

/// Data is found in Header.Ident[EI_DATA] and Header.Data.
pub struct Data(uint8)

/// ELF32 Dynamic structure. The ".dynamic" section contains an array of them.
pub struct Dyn32 {
  pub Tag: int32,
  pub Val: uint32,
}

/// ELF64 Dynamic structure. The ".dynamic" section contains an array of them.
pub struct Dyn64 {
  pub Tag: int64,
  pub Val: uint64,
}

/// DT_FLAGS values.
pub struct DynFlag(int)

/// DT_FLAGS_1 values.
pub struct DynFlag1(uint32)

/// DynamicVersion is a version defined by a dynamic object.
/// This describes entries in the ELF SHT_GNU_verdef section.
/// We assume that the vd_version field is 1.
/// Note that the name of the version appears here;
/// it is not in the first Deps entry as it is in the ELF file.
pub struct DynamicVersion {
  pub Name: string,
  pub Index: uint16,
  pub Flags: DynamicVersionFlag,
  pub Deps: Slice<string>,
}

/// DynamicVersionDep is a version needed from some shared library.
pub struct DynamicVersionDep {
  pub Flags: DynamicVersionFlag,
  pub Index: uint16,
  pub Dep: string,
}

/// Dynamic version flags.
pub struct DynamicVersionFlag(uint16)

/// DynamicVersionNeed describes a shared library needed by a dynamic object,
/// with a list of the versions needed from that shared library.
/// This describes entries in the ELF SHT_GNU_verneed section.
/// We assume that the vn_version field is 1.
pub struct DynamicVersionNeed {
  pub Name: string,
  pub Needs: Slice<DynamicVersionDep>,
}

/// A File represents an open ELF file.
pub struct File {
  pub FileHeader: FileHeader,
  pub Sections: Slice<Option<Ref<Section>>>,
  pub Progs: Slice<Option<Ref<Prog>>>,
}

/// A FileHeader represents an ELF file header.
pub struct FileHeader {
  pub Class: Class,
  pub Data: Data,
  pub Version: Version,
  pub OSABI: OSABI,
  pub ABIVersion: uint8,
  pub ByteOrder: Option<binary.ByteOrder>,
  pub Type: Type,
  pub Machine: Machine,
  pub Entry: uint64,
}

pub type FormatError

/// ELF32 File header.
pub struct Header32 {
  pub Ident: Slice<uint8>,
  pub Type: uint16,
  pub Machine: uint16,
  pub Version: uint32,
  pub Entry: uint32,
  pub Phoff: uint32,
  pub Shoff: uint32,
  pub Flags: uint32,
  pub Ehsize: uint16,
  pub Phentsize: uint16,
  pub Phnum: uint16,
  pub Shentsize: uint16,
  pub Shnum: uint16,
  pub Shstrndx: uint16,
}

/// ELF64 file header.
pub struct Header64 {
  pub Ident: Slice<uint8>,
  pub Type: uint16,
  pub Machine: uint16,
  pub Version: uint32,
  pub Entry: uint64,
  pub Phoff: uint64,
  pub Shoff: uint64,
  pub Flags: uint32,
  pub Ehsize: uint16,
  pub Phentsize: uint16,
  pub Phnum: uint16,
  pub Shentsize: uint16,
  pub Shnum: uint16,
  pub Shstrndx: uint16,
}

pub struct ImportedSymbol {
  pub Name: string,
  pub Version: string,
  pub Library: string,
}

/// NType values; used in core files.
pub struct NType(int)

/// A Prog represents a single ELF program header in an ELF binary.
pub struct Prog {
  pub ProgHeader: ProgHeader,
  pub ReaderAt: Option<io.ReaderAt>,
}

/// ELF32 Program header.
pub struct Prog32 {
  pub Type: uint32,
  pub Off: uint32,
  pub Vaddr: uint32,
  pub Paddr: uint32,
  pub Filesz: uint32,
  pub Memsz: uint32,
  pub Flags: uint32,
  pub Align: uint32,
}

/// ELF64 Program header.
pub struct Prog64 {
  pub Type: uint32,
  pub Flags: uint32,
  pub Off: uint64,
  pub Vaddr: uint64,
  pub Paddr: uint64,
  pub Filesz: uint64,
  pub Memsz: uint64,
  pub Align: uint64,
}

/// Prog.Flag
pub struct ProgFlag(uint32)

/// A ProgHeader represents a single ELF program header.
pub struct ProgHeader {
  pub Type: ProgType,
  pub Flags: ProgFlag,
  pub Off: uint64,
  pub Vaddr: uint64,
  pub Paddr: uint64,
  pub Filesz: uint64,
  pub Memsz: uint64,
  pub Align: uint64,
}

/// ELF32 Relocations that don't need an addend field.
pub struct Rel32 {
  pub Off: uint32,
  pub Info: uint32,
}

/// ELF64 relocations that don't need an addend field.
pub struct Rel64 {
  pub Off: uint64,
  pub Info: uint64,
}

/// ELF32 Relocations that need an addend field.
pub struct Rela32 {
  pub Off: uint32,
  pub Info: uint32,
  pub Addend: int32,
}

/// ELF64 relocations that need an addend field.
pub struct Rela64 {
  pub Off: uint64,
  pub Info: uint64,
  pub Addend: int64,
}

/// A Section represents a single section in an ELF file.
pub struct Section {
  pub SectionHeader: SectionHeader,
  pub ReaderAt: Option<io.ReaderAt>,
}

/// ELF32 Section header.
pub struct Section32 {
  pub Name: uint32,
  pub Type: uint32,
  pub Flags: uint32,
  pub Addr: uint32,
  pub Off: uint32,
  pub Size: uint32,
  pub Link: uint32,
  pub Info: uint32,
  pub Addralign: uint32,
  pub Entsize: uint32,
}

/// ELF64 Section header.
pub struct Section64 {
  pub Name: uint32,
  pub Type: uint32,
  pub Flags: uint64,
  pub Addr: uint64,
  pub Off: uint64,
  pub Size: uint64,
  pub Link: uint32,
  pub Info: uint32,
  pub Addralign: uint64,
  pub Entsize: uint64,
}

/// Section flags.
pub struct SectionFlag(uint32)

/// A SectionHeader represents a single ELF section header.
pub struct SectionHeader {
  pub Name: string,
  pub Type: SectionType,
  pub Flags: SectionFlag,
  pub Addr: uint64,
  pub Offset: uint64,
  pub Size: uint64,
  pub Link: uint32,
  pub Info: uint32,
  pub Addralign: uint64,
  pub Entsize: uint64,
  pub FileSize: uint64,
}

/// ELF32 Symbol.
pub struct Sym32 {
  pub Name: uint32,
  pub Value: uint32,
  pub Size: uint32,
  pub Info: uint8,
  pub Other: uint8,
  pub Shndx: uint16,
}

/// ELF64 symbol table entries.
pub struct Sym64 {
  pub Name: uint32,
  pub Info: uint8,
  pub Other: uint8,
  pub Shndx: uint16,
  pub Value: uint64,
  pub Size: uint64,
}

/// A Symbol represents an entry in an ELF symbol table section.
pub struct Symbol {
  pub Name: string,
  pub Info: uint8,
  pub Other: uint8,
  pub HasVersion: bool,
  pub VersionIndex: VersionIndex,
  pub Section: SectionIndex,
  pub Value: uint64,
  pub Size: uint64,
  pub Version: string,
  pub Library: string,
}

/// VersionIndex is the type of a [Symbol] version index.
pub struct VersionIndex(uint16)

/// Magic number for the elf trampoline, chosen wisely to be an immediate value.
const ARM_MAGIC_TRAMP_NUMBER = 0x5c000003

const DF_1_CONFALT: DynFlag1 = 0x00002000

const DF_1_DIRECT: DynFlag1 = 0x00000100

const DF_1_DISPRELDNE: DynFlag1 = 0x00008000

const DF_1_DISPRELPND: DynFlag1 = 0x00010000

const DF_1_EDITED: DynFlag1 = 0x00200000

const DF_1_ENDFILTEE: DynFlag1 = 0x00004000

const DF_1_GLOBAL: DynFlag1 = 0x00000002

const DF_1_GLOBAUDIT: DynFlag1 = 0x01000000

const DF_1_GROUP: DynFlag1 = 0x00000004

const DF_1_IGNMULDEF: DynFlag1 = 0x00040000

const DF_1_INITFIRST: DynFlag1 = 0x00000020

const DF_1_INTERPOSE: DynFlag1 = 0x00000400

const DF_1_KMOD: DynFlag1 = 0x10000000

const DF_1_LOADFLTR: DynFlag1 = 0x00000010

const DF_1_NOCOMMON: DynFlag1 = 0x40000000

const DF_1_NODEFLIB: DynFlag1 = 0x00000800

const DF_1_NODELETE: DynFlag1 = 0x00000008

const DF_1_NODIRECT: DynFlag1 = 0x00020000

const DF_1_NODUMP: DynFlag1 = 0x00001000

const DF_1_NOHDR: DynFlag1 = 0x00100000

const DF_1_NOKSYMS: DynFlag1 = 0x00080000

const DF_1_NOOPEN: DynFlag1 = 0x00000040

const DF_1_NORELOC: DynFlag1 = 0x00400000

const DF_1_NOW: DynFlag1 = 0x00000001

const DF_1_ORIGIN: DynFlag1 = 0x00000080

const DF_1_PIE: DynFlag1 = 0x08000000

const DF_1_SINGLETON: DynFlag1 = 0x02000000

const DF_1_STUB: DynFlag1 = 0x04000000

const DF_1_SYMINTPOSE: DynFlag1 = 0x00800000

const DF_1_TRANS: DynFlag1 = 0x00000200

const DF_1_WEAKFILTER: DynFlag1 = 0x20000000

const DF_BIND_NOW: DynFlag = 0x0008

const DF_ORIGIN: DynFlag = 0x0001

const DF_STATIC_TLS: DynFlag = 0x0010

const DF_SYMBOLIC: DynFlag = 0x0002

const DF_TEXTREL: DynFlag = 0x0004

/// Indexes into the Header.Ident array.
const EI_ABIVERSION = 8

/// Indexes into the Header.Ident array.
const EI_CLASS = 4

/// Indexes into the Header.Ident array.
const EI_DATA = 5

/// Indexes into the Header.Ident array.
const EI_NIDENT = 16

/// Indexes into the Header.Ident array.
const EI_OSABI = 7

/// Indexes into the Header.Ident array.
const EI_PAD = 9

/// Indexes into the Header.Ident array.
const EI_VERSION = 6

const ELFCLASS32: Class = 1

const ELFCLASS64: Class = 2

const ELFCLASSNONE: Class = 0

const ELFDATA2LSB: Data = 1

const ELFDATA2MSB: Data = 2

const ELFDATANONE: Data = 0

/// Initial magic number for ELF files.
const ELFMAG = "\x7fELF"

const NT_FPREGSET: NType = 2

const NT_PRPSINFO: NType = 3

const NT_PRSTATUS: NType = 1

const PF_MASKOS: ProgFlag = 0x0ff00000

const PF_MASKPROC: ProgFlag = 0xf0000000

const PF_R: ProgFlag = 0x4

const PF_W: ProgFlag = 0x2

const PF_X: ProgFlag = 0x1

const SHF_ALLOC: SectionFlag = 0x2

const SHF_COMPRESSED: SectionFlag = 0x800

const SHF_EXECINSTR: SectionFlag = 0x4

const SHF_GROUP: SectionFlag = 0x200

const SHF_INFO_LINK: SectionFlag = 0x40

const SHF_LINK_ORDER: SectionFlag = 0x80

const SHF_MASKOS: SectionFlag = 0x0ff00000

const SHF_MASKPROC: SectionFlag = 0xf0000000

const SHF_MERGE: SectionFlag = 0x10

const SHF_OS_NONCONFORMING: SectionFlag = 0x100

const SHF_STRINGS: SectionFlag = 0x20

const SHF_TLS: SectionFlag = 0x400

const SHF_WRITE: SectionFlag = 0x1

const Sym32Size = 16

const Sym64Size = 24

const VER_FLG_BASE: DynamicVersionFlag = 0x1

const VER_FLG_INFO: DynamicVersionFlag = 0x4

const VER_FLG_WEAK: DynamicVersionFlag = 0x2

/// ErrNoSymbols is returned by [File.Symbols] and [File.DynamicSymbols]
/// if there is no such section in the File.
pub var ErrNoSymbols: error

impl Class {
  fn GoString(self) -> string

  fn String(self) -> string
}

impl CompressionType {
  fn GoString(self) -> string

  fn String(self) -> string
}

impl Data {
  fn GoString(self) -> string

  fn String(self) -> string
}

impl DynFlag {
  fn GoString(self) -> string

  fn String(self) -> string
}

impl DynFlag1 {
  fn GoString(self) -> string

  fn String(self) -> string
}

impl DynTag {
  fn GoString(self) -> string

  fn String(self) -> string
}

impl File {
  /// Close closes the [File].
  /// If the [File] was created using [NewFile] directly instead of [Open],
  /// Close has no effect.
  #[allow(unused_result)]
  fn Close(self: Ref<File>) -> Result<(), error>

  fn DWARF(self: Ref<File>) -> Result<Ref<dwarf.Data>, error>

  /// DynString returns the strings listed for the given tag in the file's dynamic
  /// section.
  /// 
  /// The tag must be one that takes string values: [DT_NEEDED], [DT_SONAME], [DT_RPATH], or
  /// [DT_RUNPATH].
  fn DynString(self: Ref<File>, tag: DynTag) -> Result<Slice<string>, error>

  /// DynValue returns the values listed for the given tag in the file's dynamic
  /// section.
  fn DynValue(self: Ref<File>, tag: DynTag) -> Result<Slice<uint64>, error>

  /// DynamicSymbols returns the dynamic symbol table for f. The symbols
  /// will be listed in the order they appear in f.
  /// 
  /// If f has a symbol version table, the returned [File.Symbols] will have
  /// initialized Version and Library fields.
  /// 
  /// For compatibility with [File.Symbols], [File.DynamicSymbols] omits the null symbol at index 0.
  /// After retrieving the symbols as symtab, an externally supplied index x
  /// corresponds to symtab[x-1], not symtab[x].
  fn DynamicSymbols(self: Ref<File>) -> Result<Slice<Symbol>, error>

  /// DynamicVersionNeeds returns version dependencies for a dynamic object.
  fn DynamicVersionNeeds(self: Ref<File>) -> Result<Slice<DynamicVersionNeed>, error>

  /// DynamicVersions returns version information for a dynamic object.
  fn DynamicVersions(self: Ref<File>) -> Result<Slice<DynamicVersion>, error>

  /// ImportedLibraries returns the names of all libraries
  /// referred to by the binary f that are expected to be
  /// linked with the binary at dynamic link time.
  fn ImportedLibraries(self: Ref<File>) -> Result<Slice<string>, error>

  /// ImportedSymbols returns the names of all symbols
  /// referred to by the binary f that are expected to be
  /// satisfied by other libraries at dynamic load time.
  /// It does not return weak symbols.
  fn ImportedSymbols(self: Ref<File>) -> Result<Slice<ImportedSymbol>, error>

  /// Section returns a section with the given name, or nil if no such
  /// section exists.
  fn Section(self: Ref<File>, name: string) -> Option<Ref<Section>>

  /// SectionByType returns the first section in f with the
  /// given type, or nil if there is no such section.
  fn SectionByType(self: Ref<File>, typ: SectionType) -> Option<Ref<Section>>

  /// Symbols returns the symbol table for f. The symbols will be listed in the order
  /// they appear in f.
  /// 
  /// For compatibility with Go 1.0, Symbols omits the null symbol at index 0.
  /// After retrieving the symbols as symtab, an externally supplied index x
  /// corresponds to symtab[x-1], not symtab[x].
  fn Symbols(self: Ref<File>) -> Result<Slice<Symbol>, error>
}

impl FormatError {
  fn Error(self: Ref<FormatError>) -> string
}

impl Machine {
  fn GoString(self) -> string

  fn String(self) -> string
}

impl NType {
  fn GoString(self) -> string

  fn String(self) -> string
}

impl OSABI {
  fn GoString(self) -> string

  fn String(self) -> string
}

impl Prog {
  /// Open returns a new ReadSeeker reading the ELF program body.
  fn Open(self: Ref<Prog>) -> io.ReadSeeker

  fn ReadAt(self, mut p: Slice<uint8>, off: int64) -> Partial<int, error>
}

impl ProgFlag {
  fn GoString(self) -> string

  fn String(self) -> string
}

impl ProgType {
  fn GoString(self) -> string

  fn String(self) -> string
}

impl R_386 {
  fn GoString(self) -> string

  fn String(self) -> string
}

impl R_390 {
  fn GoString(self) -> string

  fn String(self) -> string
}

impl R_AARCH64 {
  fn GoString(self) -> string

  fn String(self) -> string
}

impl R_ALPHA {
  fn GoString(self) -> string

  fn String(self) -> string
}

impl R_ARM {
  fn GoString(self) -> string

  fn String(self) -> string
}

impl R_LARCH {
  fn GoString(self) -> string

  fn String(self) -> string
}

impl R_MIPS {
  fn GoString(self) -> string

  fn String(self) -> string
}

impl R_PPC {
  fn GoString(self) -> string

  fn String(self) -> string
}

impl R_PPC64 {
  fn GoString(self) -> string

  fn String(self) -> string
}

impl R_RISCV {
  fn GoString(self) -> string

  fn String(self) -> string
}

impl R_SPARC {
  fn GoString(self) -> string

  fn String(self) -> string
}

impl R_X86_64 {
  fn GoString(self) -> string

  fn String(self) -> string
}

impl Section {
  /// Data reads and returns the contents of the ELF section.
  /// Even if the section is stored compressed in the ELF file,
  /// Data returns uncompressed data.
  /// 
  /// For an [SHT_NOBITS] section, Data always returns a non-nil error.
  fn Data(self: Ref<Section>) -> Result<Slice<uint8>, error>

  /// Open returns a new ReadSeeker reading the ELF section.
  /// Even if the section is stored compressed in the ELF file,
  /// the ReadSeeker reads uncompressed data.
  /// 
  /// For an [SHT_NOBITS] section, all calls to the opened reader
  /// will return a non-nil error.
  fn Open(self: Ref<Section>) -> io.ReadSeeker

  fn ReadAt(self, mut p: Slice<uint8>, off: int64) -> Partial<int, error>
}

impl SectionFlag {
  fn GoString(self) -> string

  fn String(self) -> string
}

impl SectionIndex {
  fn GoString(self) -> string

  fn String(self) -> string
}

impl SectionType {
  fn GoString(self) -> string

  fn String(self) -> string
}

impl SymBind {
  fn GoString(self) -> string

  fn String(self) -> string
}

impl SymType {
  fn GoString(self) -> string

  fn String(self) -> string
}

impl SymVis {
  fn GoString(self) -> string

  fn String(self) -> string
}

impl Type {
  fn GoString(self) -> string

  fn String(self) -> string
}

impl Version {
  fn GoString(self) -> string

  fn String(self) -> string
}

impl VersionIndex {
  /// Index returns the version index.
  /// If this is the value 0, it means that the symbol is local,
  /// and is not visible externally.
  /// If this is the value 1, it means that the symbol is in the base version,
  /// and has no specific version; it may or may not match a
  /// [DynamicVersion.Index] in the slice returned by [File.DynamicVersions].
  /// Other values will match either [DynamicVersion.Index]
  /// in the slice returned by [File.DynamicVersions],
  /// or [DynamicVersionDep.Index] in the Needs field
  /// of the elements of the slice returned by [File.DynamicVersionNeeds].
  /// In general, a defined symbol will have an index referring
  /// to DynamicVersions, and an undefined symbol will have an index
  /// referring to some version in DynamicVersionNeeds.
  fn Index(self) -> uint16

  /// IsHidden reports whether the symbol is hidden within the version.
  /// This means that the symbol can only be seen by specifying the exact version.
  fn IsHidden(self) -> bool
}
