19#ifndef LLVM_BINARYFORMAT_ELF_H
20#define LLVM_BINARYFORMAT_ELF_H
45static const char ElfMagic[] = {0x7f,
'E',
'L',
'F',
'\0'};
384#define ELF_RELOC(name, value) name = value,
388#include "ELFRelocs/x86_64.def"
393#include "ELFRelocs/i386.def"
398#include "ELFRelocs/PowerPC.def"
417 return ((1 << Val) >> 2) << 2;
422#include "ELFRelocs/PowerPC64.def"
427#include "ELFRelocs/AArch64.def"
454#include "ELFRelocs/ARM.def"
475#include "ELFRelocs/ARC.def"
507#include "ELFRelocs/AVR.def"
583#include "ELFRelocs/Mips.def"
664#include "ELFRelocs/Hexagon.def"
669#include "ELFRelocs/Lanai.def"
686#include "ELFRelocs/RISCV.def"
697#include "ELFRelocs/SystemZ.def"
723#include "ELFRelocs/Sparc.def"
888#include "ELFRelocs/AMDGPU.def"
936#include "ELFRelocs/BPF.def"
941#include "ELFRelocs/M68k.def"
973#include "ELFRelocs/MSP430.def"
978#include "ELFRelocs/VE.def"
1001#include "ELFRelocs/CSKY.def"
1024#include "ELFRelocs/LoongArch.def"
1039#include "ELFRelocs/Xtensa.def"
1307 st_info = (b << 4) + (t & 0x0f);
1327 st_info = (b << 4) + (t & 0x0f);
1569#define DYNAMIC_TAG(name, value) DT_##name = value,
1570#include "DynamicTags.def"
Merge contiguous icmps into a memcmp
StringRef - Represent a constant reference to a string, i.e.
StringRef convertOSABIToName(uint8_t OSABI)
@ RHS_NO_LIBRARY_REPLACEMENT
@ RHF_GUARANTEE_START_INIT
@ NT_LLVM_OPENMP_OFFLOAD_PRODUCER
@ NT_LLVM_OPENMP_OFFLOAD_VERSION
@ NT_LLVM_OPENMP_OFFLOAD_PRODUCER_VERSION
@ STO_AARCH64_VARIANT_PCS
@ EF_CUDA_TEXMODE_INDEPENDANT
@ EF_CUDA_TEXMODE_UNIFIED
static int64_t decodePPC64LocalEntryOffset(unsigned Other)
constexpr const char * ELF_NOTE_GNU
static const char ElfMagic[]
@ ELFABIVERSION_AMDGPU_HSA_V4
@ ELFABIVERSION_AMDGPU_HSA_V5
@ ELFABIVERSION_AMDGPU_HSA_V3
@ ELFABIVERSION_AMDGPU_HSA_V6
@ ELFABIVERSION_AMDGPU_HSA_V2
@ NT_FREEBSD_PROCSTAT_PROC
@ NT_FREEBSD_PROCSTAT_UMASK
@ NT_FREEBSD_PROCSTAT_FILES
@ NT_FREEBSD_PROCSTAT_GROUPS
@ NT_FREEBSD_PROCSTAT_OSREL
@ NT_FREEBSD_PROCSTAT_RLIMIT
@ NT_FREEBSD_PROCSTAT_AUXV
@ NT_FREEBSD_PROCSTAT_PSSTRINGS
@ NT_FREEBSD_PROCSTAT_VMMAP
@ RELOCATION_GROUPED_BY_OFFSET_DELTA_FLAG
@ RELOCATION_GROUPED_BY_INFO_FLAG
@ RELOCATION_GROUPED_BY_ADDEND_FLAG
@ RELOCATION_GROUP_HAS_ADDEND_FLAG
@ NT_GNU_BUILD_ATTRIBUTE_OPEN
@ NT_GNU_BUILD_ATTRIBUTE_FUNC
constexpr unsigned CREL_HDR_ADDEND
@ EF_AMDGPU_GENERIC_VERSION_MAX
@ EF_AMDGPU_FEATURE_XNACK_ANY_V4
@ EF_AMDGPU_MACH_AMDGCN_GFX703
@ EF_AMDGPU_MACH_AMDGCN_GFX1035
@ EF_AMDGPU_FEATURE_SRAMECC_V3
@ EF_AMDGPU_MACH_AMDGCN_GFX1031
@ EF_AMDGPU_MACH_AMDGCN_RESERVED_0X58
@ EF_AMDGPU_GENERIC_VERSION_OFFSET
@ EF_AMDGPU_MACH_R600_CAYMAN
@ EF_AMDGPU_FEATURE_SRAMECC_UNSUPPORTED_V4
@ EF_AMDGPU_MACH_AMDGCN_RESERVED_0X56
@ EF_AMDGPU_MACH_AMDGCN_GFX704
@ EF_AMDGPU_MACH_AMDGCN_RESERVED_0X57
@ EF_AMDGPU_MACH_AMDGCN_GFX902
@ EF_AMDGPU_MACH_AMDGCN_GFX810
@ EF_AMDGPU_MACH_AMDGCN_LAST
@ EF_AMDGPU_MACH_AMDGCN_GFX1036
@ EF_AMDGPU_MACH_AMDGCN_GFX1102
@ EF_AMDGPU_MACH_R600_RESERVED_LAST
@ EF_AMDGPU_MACH_R600_RV730
@ EF_AMDGPU_MACH_R600_RV710
@ EF_AMDGPU_MACH_AMDGCN_GFX908
@ EF_AMDGPU_MACH_AMDGCN_GFX1011
@ EF_AMDGPU_MACH_R600_CYPRESS
@ EF_AMDGPU_MACH_AMDGCN_GFX1032
@ EF_AMDGPU_MACH_R600_R600
@ EF_AMDGPU_MACH_AMDGCN_GFX940
@ EF_AMDGPU_MACH_AMDGCN_GFX941
@ EF_AMDGPU_MACH_R600_TURKS
@ EF_AMDGPU_MACH_R600_JUNIPER
@ EF_AMDGPU_FEATURE_SRAMECC_OFF_V4
@ EF_AMDGPU_FEATURE_XNACK_UNSUPPORTED_V4
@ EF_AMDGPU_MACH_AMDGCN_GFX601
@ EF_AMDGPU_MACH_AMDGCN_GFX942
@ EF_AMDGPU_MACH_R600_LAST
@ EF_AMDGPU_MACH_R600_RESERVED_FIRST
@ EF_AMDGPU_MACH_AMDGCN_GFX1152
@ EF_AMDGPU_MACH_AMDGCN_RESERVED_0X27
@ EF_AMDGPU_FEATURE_TRAP_HANDLER_V2
@ EF_AMDGPU_MACH_R600_R630
@ EF_AMDGPU_MACH_R600_REDWOOD
@ EF_AMDGPU_MACH_AMDGCN_FIRST
@ EF_AMDGPU_MACH_R600_RV770
@ EF_AMDGPU_FEATURE_XNACK_OFF_V4
@ EF_AMDGPU_MACH_AMDGCN_GFX600
@ EF_AMDGPU_FEATURE_XNACK_V3
@ EF_AMDGPU_MACH_AMDGCN_GFX602
@ EF_AMDGPU_MACH_AMDGCN_GFX1101
@ EF_AMDGPU_MACH_AMDGCN_GFX1100
@ EF_AMDGPU_MACH_AMDGCN_GFX1033
@ EF_AMDGPU_MACH_AMDGCN_GFX801
@ EF_AMDGPU_FEATURE_XNACK_V4
@ EF_AMDGPU_MACH_AMDGCN_GFX705
@ EF_AMDGPU_MACH_AMDGCN_GFX1010
@ EF_AMDGPU_MACH_R600_RV670
@ EF_AMDGPU_MACH_AMDGCN_GFX701
@ EF_AMDGPU_GENERIC_VERSION_MIN
@ EF_AMDGPU_MACH_AMDGCN_GFX10_3_GENERIC
@ EF_AMDGPU_MACH_AMDGCN_GFX1012
@ EF_AMDGPU_MACH_AMDGCN_GFX1151
@ EF_AMDGPU_MACH_AMDGCN_GFX1030
@ EF_AMDGPU_MACH_R600_CEDAR
@ EF_AMDGPU_MACH_AMDGCN_GFX1200
@ EF_AMDGPU_MACH_AMDGCN_RESERVED_0X4F
@ EF_AMDGPU_MACH_AMDGCN_GFX700
@ EF_AMDGPU_MACH_AMDGCN_RESERVED_0X4D
@ EF_AMDGPU_MACH_AMDGCN_GFX11_GENERIC
@ EF_AMDGPU_MACH_AMDGCN_GFX803
@ EF_AMDGPU_MACH_AMDGCN_GFX802
@ EF_AMDGPU_MACH_AMDGCN_GFX90C
@ EF_AMDGPU_MACH_AMDGCN_RESERVED_0X50
@ EF_AMDGPU_FEATURE_SRAMECC_V4
@ EF_AMDGPU_FEATURE_XNACK_ON_V4
@ EF_AMDGPU_MACH_AMDGCN_GFX900
@ EF_AMDGPU_MACH_AMDGCN_GFX909
@ EF_AMDGPU_MACH_AMDGCN_GFX906
@ EF_AMDGPU_MACH_AMDGCN_GFX9_GENERIC
@ EF_AMDGPU_MACH_AMDGCN_GFX1103
@ EF_AMDGPU_MACH_R600_CAICOS
@ EF_AMDGPU_MACH_AMDGCN_GFX90A
@ EF_AMDGPU_MACH_AMDGCN_GFX1034
@ EF_AMDGPU_MACH_AMDGCN_GFX1013
@ EF_AMDGPU_MACH_AMDGCN_GFX12_GENERIC
@ EF_AMDGPU_MACH_AMDGCN_GFX10_1_GENERIC
@ EF_AMDGPU_MACH_AMDGCN_GFX904
@ EF_AMDGPU_MACH_R600_RS880
@ EF_AMDGPU_MACH_R600_FIRST
@ EF_AMDGPU_MACH_AMDGCN_GFX805
@ EF_AMDGPU_MACH_AMDGCN_GFX1201
@ EF_AMDGPU_MACH_AMDGCN_GFX1150
@ EF_AMDGPU_MACH_R600_SUMO
@ EF_AMDGPU_MACH_R600_BARTS
@ EF_AMDGPU_FEATURE_SRAMECC_ANY_V4
@ EF_AMDGPU_FEATURE_XNACK_V2
@ EF_AMDGPU_FEATURE_SRAMECC_ON_V4
@ EF_AMDGPU_MACH_AMDGCN_RESERVED_0X49
@ EF_AMDGPU_MACH_AMDGCN_GFX702
@ EF_AMDGPU_GENERIC_VERSION
@ NT_FREEBSD_FCTL_STKGAP_DISABLE
@ NT_FREEBSD_FCTL_ASG_DISABLE
@ NT_FREEBSD_FCTL_WXNEEDED
@ NT_FREEBSD_FCTL_ASLR_DISABLE
@ NT_FREEBSD_FCTL_PROTMAX_DISABLE
@ EF_MSP430_MACH_MSP430x42
@ EF_MSP430_MACH_MSP430x24
@ EF_MSP430_MACH_MSP430x46
@ EF_MSP430_MACH_MSP430x31
@ EF_MSP430_MACH_MSP430x43
@ EF_MSP430_MACH_MSP430x14
@ EF_MSP430_MACH_MSP430x26
@ EF_MSP430_MACH_MSP430x23
@ EF_MSP430_MACH_MSP430x20
@ EF_MSP430_MACH_MSP430x11
@ EF_MSP430_MACH_MSP430x41
@ EF_MSP430_MACH_MSP430x16
@ EF_MSP430_MACH_MSP430x33
@ EF_MSP430_MACH_MSP430x12
@ EF_MSP430_MACH_MSP430x44
@ EF_MSP430_MACH_MSP430x32
@ EF_MSP430_MACH_MSP430x22
@ EF_MSP430_MACH_MSP430x47
@ EF_MSP430_MACH_MSP430x15
@ EF_MSP430_MACH_MSP430x13
@ EF_MSP430_MACH_MSP430x54
@ EF_MSP430_MACH_MSP430x11x1
@ GNU_PROPERTY_NO_COPY_ON_PROTECTED
@ GNU_PROPERTY_X86_UINT32_OR_LO
@ GNU_PROPERTY_X86_FEATURE_1_AND
@ GNU_PROPERTY_X86_UINT32_OR_AND_LO
@ GNU_PROPERTY_X86_ISA_1_NEEDED
@ GNU_PROPERTY_X86_ISA_1_USED
@ GNU_PROPERTY_X86_FEATURE_2_USED
@ GNU_PROPERTY_X86_FEATURE_2_NEEDED
@ GNU_PROPERTY_AARCH64_FEATURE_PAUTH
@ GNU_PROPERTY_STACK_SIZE
@ GNU_PROPERTY_AARCH64_FEATURE_1_AND
@ NT_ARM_TAGGED_ADDR_CTRL
@ GNU_PROPERTY_AARCH64_FEATURE_1_BTI
@ GNU_PROPERTY_AARCH64_FEATURE_1_PAC
@ GNU_PROPERTY_AARCH64_FEATURE_1_GCS
@ SHT_LLVM_BB_ADDR_MAP_V0
@ SHT_AARCH64_MEMTAG_GLOBALS_DYNAMIC
@ SHT_LLVM_DEPENDENT_LIBRARIES
@ SHT_LLVM_LINKER_OPTIONS
@ SHT_AARCH64_MEMTAG_GLOBALS_STATIC
@ SHT_LLVM_CALL_GRAPH_PROFILE
@ EF_RISCV_FLOAT_ABI_SOFT
@ EF_RISCV_FLOAT_ABI_SINGLE
@ EF_RISCV_FLOAT_ABI_DOUBLE
@ EF_RISCV_FLOAT_ABI_QUAD
uint16_t convertArchNameToEMachine(StringRef Arch)
Convert an architecture name into ELF's e_machine value.
@ NT_AMD_HSA_CODE_OBJECT_VERSION
@ EF_AVR_LINKRELAX_PREPARED
@ GNU_PROPERTY_X86_FEATURE_1_SHSTK
@ GNU_PROPERTY_X86_FEATURE_2_ZMM
@ GNU_PROPERTY_X86_FEATURE_2_FXSR
@ GNU_PROPERTY_X86_FEATURE_2_X86
@ GNU_PROPERTY_X86_ISA_1_V4
@ GNU_PROPERTY_X86_ISA_1_BASELINE
@ GNU_PROPERTY_X86_ISA_1_V2
@ GNU_PROPERTY_X86_FEATURE_2_XSAVEOPT
@ GNU_PROPERTY_X86_FEATURE_2_XMM
@ GNU_PROPERTY_X86_FEATURE_2_YMM
@ GNU_PROPERTY_X86_FEATURE_2_XSAVE
@ GNU_PROPERTY_X86_ISA_1_V3
@ GNU_PROPERTY_X86_FEATURE_2_X87
@ GNU_PROPERTY_X86_FEATURE_2_MMX
@ GNU_PROPERTY_X86_FEATURE_2_XSAVEC
@ GNU_PROPERTY_X86_FEATURE_1_IBT
@ NT_NETBSDCORE_LWPSTATUS
StringRef convertEMachineToArchName(uint16_t EMachine)
Convert an ELF's e_machine value into an architecture name.
@ AARCH64_PAUTH_PLATFORM_LLVM_LINUX
@ AARCH64_PAUTH_PLATFORM_INVALID
@ AARCH64_PAUTH_PLATFORM_BAREMETAL
@ EF_LOONGARCH_OBJABI_MASK
@ EF_LOONGARCH_ABI_SINGLE_FLOAT
@ EF_LOONGARCH_ABI_DOUBLE_FLOAT
@ EF_LOONGARCH_ABI_SOFT_FLOAT
@ EF_LOONGARCH_ABI_MODIFIER_MASK
@ AARCH64_PAUTH_PLATFORM_LLVM_LINUX_VERSION_INITFINIADDRDISC
@ AARCH64_PAUTH_PLATFORM_LLVM_LINUX_VERSION_VPTRADDRDISCR
@ AARCH64_PAUTH_PLATFORM_LLVM_LINUX_VERSION_AUTHTRAPS
@ AARCH64_PAUTH_PLATFORM_LLVM_LINUX_VERSION_INITFINI
@ AARCH64_PAUTH_PLATFORM_LLVM_LINUX_VERSION_INTRINSICS
@ AARCH64_PAUTH_PLATFORM_LLVM_LINUX_VERSION_RETURNS
@ AARCH64_PAUTH_PLATFORM_LLVM_LINUX_VERSION_VPTRTYPEDISCR
@ AARCH64_PAUTH_PLATFORM_LLVM_LINUX_VERSION_LAST
@ AARCH64_PAUTH_PLATFORM_LLVM_LINUX_VERSION_GOT
@ AARCH64_PAUTH_PLATFORM_LLVM_LINUX_VERSION_CALLS
@ XCORE_SHF_DP_SECTION
All sections with the "d" flag are grouped together by the linker to form the data section and the dp...
@ XCORE_SHF_CP_SECTION
All sections with the "c" flag are grouped together by the linker to form the constant pool and the c...
uint8_t convertNameToOSABI(StringRef Name)
This is an optimization pass for GlobalISel generic memory operations.