Lines Matching full:elf
1 //===-- ELFDumper.cpp - ELF-specific dumper ---------------------*- C++ -*-===//
11 /// \brief This file implements the ELF-specific dumper for llvm-readobj.
35 using namespace ELF;
243 if (vn->vn_version != ELF::VER_NEED_CURRENT) in LoadVersionNeeds()
252 size_t index = vna->vna_other & ELF::VERSYM_VERSION; in LoadVersionNeeds()
277 if (vd->vd_version != ELF::VER_DEF_CURRENT) in LoadVersionDefs()
279 size_t index = vd->vd_ndx & ELF::VERSYM_VERSION; in LoadVersionDefs()
416 size_t version_index = vs->vs_index & ELF::VERSYM_VERSION; in getSymbolVersion()
419 if (version_index == ELF::VER_NDX_LOCAL || in getSymbolVersion()
420 version_index == ELF::VER_NDX_GLOBAL) { in getSymbolVersion()
436 IsDefault = !(vs->vs_index & ELF::VERSYM_HIDDEN); in getSymbolVersion()
512 { "None", ELF::ELFCLASSNONE },
513 { "32-bit", ELF::ELFCLASS32 },
514 { "64-bit", ELF::ELFCLASS64 },
518 { "None", ELF::ELFDATANONE },
519 { "LittleEndian", ELF::ELFDATA2LSB },
520 { "BigEndian", ELF::ELFDATA2MSB },
524 { "None", ELF::ET_NONE },
525 { "Relocatable", ELF::ET_REL },
526 { "Executable", ELF::ET_EXEC },
527 { "SharedObject", ELF::ET_DYN },
528 { "Core", ELF::ET_CORE },
532 { "SystemV", ELF::ELFOSABI_NONE },
533 { "HPUX", ELF::ELFOSABI_HPUX },
534 { "NetBSD", ELF::ELFOSABI_NETBSD },
535 { "GNU/Linux", ELF::ELFOSABI_LINUX },
536 { "GNU/Hurd", ELF::ELFOSABI_HURD },
537 { "Solaris", ELF::ELFOSABI_SOLARIS },
538 { "AIX", ELF::ELFOSABI_AIX },
539 { "IRIX", ELF::ELFOSABI_IRIX },
540 { "FreeBSD", ELF::ELFOSABI_FREEBSD },
541 { "TRU64", ELF::ELFOSABI_TRU64 },
542 { "Modesto", ELF::ELFOSABI_MODESTO },
543 { "OpenBSD", ELF::ELFOSABI_OPENBSD },
544 { "OpenVMS", ELF::ELFOSABI_OPENVMS },
545 { "NSK", ELF::ELFOSABI_NSK },
546 { "AROS", ELF::ELFOSABI_AROS },
547 { "FenixOS", ELF::ELFOSABI_FENIXOS },
548 { "CloudABI", ELF::ELFOSABI_CLOUDABI },
549 { "C6000_ELFABI", ELF::ELFOSABI_C6000_ELFABI },
550 { "C6000_LINUX" , ELF::ELFOSABI_C6000_LINUX },
551 { "ARM", ELF::ELFOSABI_ARM },
552 { "Standalone" , ELF::ELFOSABI_STANDALONE }
556 LLVM_READOBJ_ENUM_ENT(ELF, EM_NONE ),
557 LLVM_READOBJ_ENUM_ENT(ELF, EM_M32 ),
558 LLVM_READOBJ_ENUM_ENT(ELF, EM_SPARC ),
559 LLVM_READOBJ_ENUM_ENT(ELF, EM_386 ),
560 LLVM_READOBJ_ENUM_ENT(ELF, EM_68K ),
561 LLVM_READOBJ_ENUM_ENT(ELF, EM_88K ),
562 LLVM_READOBJ_ENUM_ENT(ELF, EM_IAMCU ),
563 LLVM_READOBJ_ENUM_ENT(ELF, EM_860 ),
564 LLVM_READOBJ_ENUM_ENT(ELF, EM_MIPS ),
565 LLVM_READOBJ_ENUM_ENT(ELF, EM_S370 ),
566 LLVM_READOBJ_ENUM_ENT(ELF, EM_MIPS_RS3_LE ),
567 LLVM_READOBJ_ENUM_ENT(ELF, EM_PARISC ),
568 LLVM_READOBJ_ENUM_ENT(ELF, EM_VPP500 ),
569 LLVM_READOBJ_ENUM_ENT(ELF, EM_SPARC32PLUS ),
570 LLVM_READOBJ_ENUM_ENT(ELF, EM_960 ),
571 LLVM_READOBJ_ENUM_ENT(ELF, EM_PPC ),
572 LLVM_READOBJ_ENUM_ENT(ELF, EM_PPC64 ),
573 LLVM_READOBJ_ENUM_ENT(ELF, EM_S390 ),
574 LLVM_READOBJ_ENUM_ENT(ELF, EM_SPU ),
575 LLVM_READOBJ_ENUM_ENT(ELF, EM_V800 ),
576 LLVM_READOBJ_ENUM_ENT(ELF, EM_FR20 ),
577 LLVM_READOBJ_ENUM_ENT(ELF, EM_RH32 ),
578 LLVM_READOBJ_ENUM_ENT(ELF, EM_RCE ),
579 LLVM_READOBJ_ENUM_ENT(ELF, EM_ARM ),
580 LLVM_READOBJ_ENUM_ENT(ELF, EM_ALPHA ),
581 LLVM_READOBJ_ENUM_ENT(ELF, EM_SH ),
582 LLVM_READOBJ_ENUM_ENT(ELF, EM_SPARCV9 ),
583 LLVM_READOBJ_ENUM_ENT(ELF, EM_TRICORE ),
584 LLVM_READOBJ_ENUM_ENT(ELF, EM_ARC ),
585 LLVM_READOBJ_ENUM_ENT(ELF, EM_H8_300 ),
586 LLVM_READOBJ_ENUM_ENT(ELF, EM_H8_300H ),
587 LLVM_READOBJ_ENUM_ENT(ELF, EM_H8S ),
588 LLVM_READOBJ_ENUM_ENT(ELF, EM_H8_500 ),
589 LLVM_READOBJ_ENUM_ENT(ELF, EM_IA_64 ),
590 LLVM_READOBJ_ENUM_ENT(ELF, EM_MIPS_X ),
591 LLVM_READOBJ_ENUM_ENT(ELF, EM_COLDFIRE ),
592 LLVM_READOBJ_ENUM_ENT(ELF, EM_68HC12 ),
593 LLVM_READOBJ_ENUM_ENT(ELF, EM_MMA ),
594 LLVM_READOBJ_ENUM_ENT(ELF, EM_PCP ),
595 LLVM_READOBJ_ENUM_ENT(ELF, EM_NCPU ),
596 LLVM_READOBJ_ENUM_ENT(ELF, EM_NDR1 ),
597 LLVM_READOBJ_ENUM_ENT(ELF, EM_STARCORE ),
598 LLVM_READOBJ_ENUM_ENT(ELF, EM_ME16 ),
599 LLVM_READOBJ_ENUM_ENT(ELF, EM_ST100 ),
600 LLVM_READOBJ_ENUM_ENT(ELF, EM_TINYJ ),
601 LLVM_READOBJ_ENUM_ENT(ELF, EM_X86_64 ),
602 LLVM_READOBJ_ENUM_ENT(ELF, EM_PDSP ),
603 LLVM_READOBJ_ENUM_ENT(ELF, EM_PDP10 ),
604 LLVM_READOBJ_ENUM_ENT(ELF, EM_PDP11 ),
605 LLVM_READOBJ_ENUM_ENT(ELF, EM_FX66 ),
606 LLVM_READOBJ_ENUM_ENT(ELF, EM_ST9PLUS ),
607 LLVM_READOBJ_ENUM_ENT(ELF, EM_ST7 ),
608 LLVM_READOBJ_ENUM_ENT(ELF, EM_68HC16 ),
609 LLVM_READOBJ_ENUM_ENT(ELF, EM_68HC11 ),
610 LLVM_READOBJ_ENUM_ENT(ELF, EM_68HC08 ),
611 LLVM_READOBJ_ENUM_ENT(ELF, EM_68HC05 ),
612 LLVM_READOBJ_ENUM_ENT(ELF, EM_SVX ),
613 LLVM_READOBJ_ENUM_ENT(ELF, EM_ST19 ),
614 LLVM_READOBJ_ENUM_ENT(ELF, EM_VAX ),
615 LLVM_READOBJ_ENUM_ENT(ELF, EM_CRIS ),
616 LLVM_READOBJ_ENUM_ENT(ELF, EM_JAVELIN ),
617 LLVM_READOBJ_ENUM_ENT(ELF, EM_FIREPATH ),
618 LLVM_READOBJ_ENUM_ENT(ELF, EM_ZSP ),
619 LLVM_READOBJ_ENUM_ENT(ELF, EM_MMIX ),
620 LLVM_READOBJ_ENUM_ENT(ELF, EM_HUANY ),
621 LLVM_READOBJ_ENUM_ENT(ELF, EM_PRISM ),
622 LLVM_READOBJ_ENUM_ENT(ELF, EM_AVR ),
623 LLVM_READOBJ_ENUM_ENT(ELF, EM_FR30 ),
624 LLVM_READOBJ_ENUM_ENT(ELF, EM_D10V ),
625 LLVM_READOBJ_ENUM_ENT(ELF, EM_D30V ),
626 LLVM_READOBJ_ENUM_ENT(ELF, EM_V850 ),
627 LLVM_READOBJ_ENUM_ENT(ELF, EM_M32R ),
628 LLVM_READOBJ_ENUM_ENT(ELF, EM_MN10300 ),
629 LLVM_READOBJ_ENUM_ENT(ELF, EM_MN10200 ),
630 LLVM_READOBJ_ENUM_ENT(ELF, EM_PJ ),
631 LLVM_READOBJ_ENUM_ENT(ELF, EM_OPENRISC ),
632 LLVM_READOBJ_ENUM_ENT(ELF, EM_ARC_COMPACT ),
633 LLVM_READOBJ_ENUM_ENT(ELF, EM_XTENSA ),
634 LLVM_READOBJ_ENUM_ENT(ELF, EM_VIDEOCORE ),
635 LLVM_READOBJ_ENUM_ENT(ELF, EM_TMM_GPP ),
636 LLVM_READOBJ_ENUM_ENT(ELF, EM_NS32K ),
637 LLVM_READOBJ_ENUM_ENT(ELF, EM_TPC ),
638 LLVM_READOBJ_ENUM_ENT(ELF, EM_SNP1K ),
639 LLVM_READOBJ_ENUM_ENT(ELF, EM_ST200 ),
640 LLVM_READOBJ_ENUM_ENT(ELF, EM_IP2K ),
641 LLVM_READOBJ_ENUM_ENT(ELF, EM_MAX ),
642 LLVM_READOBJ_ENUM_ENT(ELF, EM_CR ),
643 LLVM_READOBJ_ENUM_ENT(ELF, EM_F2MC16 ),
644 LLVM_READOBJ_ENUM_ENT(ELF, EM_MSP430 ),
645 LLVM_READOBJ_ENUM_ENT(ELF, EM_BLACKFIN ),
646 LLVM_READOBJ_ENUM_ENT(ELF, EM_SE_C33 ),
647 LLVM_READOBJ_ENUM_ENT(ELF, EM_SEP ),
648 LLVM_READOBJ_ENUM_ENT(ELF, EM_ARCA ),
649 LLVM_READOBJ_ENUM_ENT(ELF, EM_UNICORE ),
650 LLVM_READOBJ_ENUM_ENT(ELF, EM_EXCESS ),
651 LLVM_READOBJ_ENUM_ENT(ELF, EM_DXP ),
652 LLVM_READOBJ_ENUM_ENT(ELF, EM_ALTERA_NIOS2 ),
653 LLVM_READOBJ_ENUM_ENT(ELF, EM_CRX ),
654 LLVM_READOBJ_ENUM_ENT(ELF, EM_XGATE ),
655 LLVM_READOBJ_ENUM_ENT(ELF, EM_C166 ),
656 LLVM_READOBJ_ENUM_ENT(ELF, EM_M16C ),
657 LLVM_READOBJ_ENUM_ENT(ELF, EM_DSPIC30F ),
658 LLVM_READOBJ_ENUM_ENT(ELF, EM_CE ),
659 LLVM_READOBJ_ENUM_ENT(ELF, EM_M32C ),
660 LLVM_READOBJ_ENUM_ENT(ELF, EM_TSK3000 ),
661 LLVM_READOBJ_ENUM_ENT(ELF, EM_RS08 ),
662 LLVM_READOBJ_ENUM_ENT(ELF, EM_SHARC ),
663 LLVM_READOBJ_ENUM_ENT(ELF, EM_ECOG2 ),
664 LLVM_READOBJ_ENUM_ENT(ELF, EM_SCORE7 ),
665 LLVM_READOBJ_ENUM_ENT(ELF, EM_DSP24 ),
666 LLVM_READOBJ_ENUM_ENT(ELF, EM_VIDEOCORE3 ),
667 LLVM_READOBJ_ENUM_ENT(ELF, EM_LATTICEMICO32),
668 LLVM_READOBJ_ENUM_ENT(ELF, EM_SE_C17 ),
669 LLVM_READOBJ_ENUM_ENT(ELF, EM_TI_C6000 ),
670 LLVM_READOBJ_ENUM_ENT(ELF, EM_TI_C2000 ),
671 LLVM_READOBJ_ENUM_ENT(ELF, EM_TI_C5500 ),
672 LLVM_READOBJ_ENUM_ENT(ELF, EM_MMDSP_PLUS ),
673 LLVM_READOBJ_ENUM_ENT(ELF, EM_CYPRESS_M8C ),
674 LLVM_READOBJ_ENUM_ENT(ELF, EM_R32C ),
675 LLVM_READOBJ_ENUM_ENT(ELF, EM_TRIMEDIA ),
676 LLVM_READOBJ_ENUM_ENT(ELF, EM_HEXAGON ),
677 LLVM_READOBJ_ENUM_ENT(ELF, EM_8051 ),
678 LLVM_READOBJ_ENUM_ENT(ELF, EM_STXP7X ),
679 LLVM_READOBJ_ENUM_ENT(ELF, EM_NDS32 ),
680 LLVM_READOBJ_ENUM_ENT(ELF, EM_ECOG1 ),
681 LLVM_READOBJ_ENUM_ENT(ELF, EM_ECOG1X ),
682 LLVM_READOBJ_ENUM_ENT(ELF, EM_MAXQ30 ),
683 LLVM_READOBJ_ENUM_ENT(ELF, EM_XIMO16 ),
684 LLVM_READOBJ_ENUM_ENT(ELF, EM_MANIK ),
685 LLVM_READOBJ_ENUM_ENT(ELF, EM_CRAYNV2 ),
686 LLVM_READOBJ_ENUM_ENT(ELF, EM_RX ),
687 LLVM_READOBJ_ENUM_ENT(ELF, EM_METAG ),
688 LLVM_READOBJ_ENUM_ENT(ELF, EM_MCST_ELBRUS ),
689 LLVM_READOBJ_ENUM_ENT(ELF, EM_ECOG16 ),
690 LLVM_READOBJ_ENUM_ENT(ELF, EM_CR16 ),
691 LLVM_READOBJ_ENUM_ENT(ELF, EM_ETPU ),
692 LLVM_READOBJ_ENUM_ENT(ELF, EM_SLE9X ),
693 LLVM_READOBJ_ENUM_ENT(ELF, EM_L10M ),
694 LLVM_READOBJ_ENUM_ENT(ELF, EM_K10M ),
695 LLVM_READOBJ_ENUM_ENT(ELF, EM_AARCH64 ),
696 LLVM_READOBJ_ENUM_ENT(ELF, EM_AVR32 ),
697 LLVM_READOBJ_ENUM_ENT(ELF, EM_STM8 ),
698 LLVM_READOBJ_ENUM_ENT(ELF, EM_TILE64 ),
699 LLVM_READOBJ_ENUM_ENT(ELF, EM_TILEPRO ),
700 LLVM_READOBJ_ENUM_ENT(ELF, EM_CUDA ),
701 LLVM_READOBJ_ENUM_ENT(ELF, EM_TILEGX ),
702 LLVM_READOBJ_ENUM_ENT(ELF, EM_CLOUDSHIELD ),
703 LLVM_READOBJ_ENUM_ENT(ELF, EM_COREA_1ST ),
704 LLVM_READOBJ_ENUM_ENT(ELF, EM_COREA_2ND ),
705 LLVM_READOBJ_ENUM_ENT(ELF, EM_ARC_COMPACT2 ),
706 LLVM_READOBJ_ENUM_ENT(ELF, EM_OPEN8 ),
707 LLVM_READOBJ_ENUM_ENT(ELF, EM_RL78 ),
708 LLVM_READOBJ_ENUM_ENT(ELF, EM_VIDEOCORE5 ),
709 LLVM_READOBJ_ENUM_ENT(ELF, EM_78KOR ),
710 LLVM_READOBJ_ENUM_ENT(ELF, EM_56800EX ),
711 LLVM_READOBJ_ENUM_ENT(ELF, EM_AMDGPU )
715 { "Local", ELF::STB_LOCAL },
716 { "Global", ELF::STB_GLOBAL },
717 { "Weak", ELF::STB_WEAK },
718 { "Unique", ELF::STB_GNU_UNIQUE }
722 { "None", ELF::STT_NOTYPE },
723 { "Object", ELF::STT_OBJECT },
724 { "Function", ELF::STT_FUNC },
725 { "Section", ELF::STT_SECTION },
726 { "File", ELF::STT_FILE },
727 { "Common", ELF::STT_COMMON },
728 { "TLS", ELF::STT_TLS },
729 { "GNU_IFunc", ELF::STT_GNU_IFUNC }
733 { "AMDGPU_HSA_KERNEL", ELF::STT_AMDGPU_HSA_KERNEL },
734 { "AMDGPU_HSA_INDIRECT_FUNCTION", ELF::STT_AMDGPU_HSA_INDIRECT_FUNCTION },
735 { "AMDGPU_HSA_METADATA", ELF::STT_AMDGPU_HSA_METADATA }
740 case ELF::EM_ARM: in getElfSectionType()
742 LLVM_READOBJ_ENUM_CASE(ELF, SHT_ARM_EXIDX); in getElfSectionType()
743 LLVM_READOBJ_ENUM_CASE(ELF, SHT_ARM_PREEMPTMAP); in getElfSectionType()
744 LLVM_READOBJ_ENUM_CASE(ELF, SHT_ARM_ATTRIBUTES); in getElfSectionType()
745 LLVM_READOBJ_ENUM_CASE(ELF, SHT_ARM_DEBUGOVERLAY); in getElfSectionType()
746 LLVM_READOBJ_ENUM_CASE(ELF, SHT_ARM_OVERLAYSECTION); in getElfSectionType()
748 case ELF::EM_HEXAGON: in getElfSectionType()
749 switch (Type) { LLVM_READOBJ_ENUM_CASE(ELF, SHT_HEX_ORDERED); } in getElfSectionType()
750 case ELF::EM_X86_64: in getElfSectionType()
751 switch (Type) { LLVM_READOBJ_ENUM_CASE(ELF, SHT_X86_64_UNWIND); } in getElfSectionType()
752 case ELF::EM_MIPS: in getElfSectionType()
753 case ELF::EM_MIPS_RS3_LE: in getElfSectionType()
755 LLVM_READOBJ_ENUM_CASE(ELF, SHT_MIPS_REGINFO); in getElfSectionType()
756 LLVM_READOBJ_ENUM_CASE(ELF, SHT_MIPS_OPTIONS); in getElfSectionType()
757 LLVM_READOBJ_ENUM_CASE(ELF, SHT_MIPS_ABIFLAGS); in getElfSectionType()
762 LLVM_READOBJ_ENUM_CASE(ELF, SHT_NULL ); in getElfSectionType()
763 LLVM_READOBJ_ENUM_CASE(ELF, SHT_PROGBITS ); in getElfSectionType()
764 LLVM_READOBJ_ENUM_CASE(ELF, SHT_SYMTAB ); in getElfSectionType()
765 LLVM_READOBJ_ENUM_CASE(ELF, SHT_STRTAB ); in getElfSectionType()
766 LLVM_READOBJ_ENUM_CASE(ELF, SHT_RELA ); in getElfSectionType()
767 LLVM_READOBJ_ENUM_CASE(ELF, SHT_HASH ); in getElfSectionType()
768 LLVM_READOBJ_ENUM_CASE(ELF, SHT_DYNAMIC ); in getElfSectionType()
769 LLVM_READOBJ_ENUM_CASE(ELF, SHT_NOTE ); in getElfSectionType()
770 LLVM_READOBJ_ENUM_CASE(ELF, SHT_NOBITS ); in getElfSectionType()
771 LLVM_READOBJ_ENUM_CASE(ELF, SHT_REL ); in getElfSectionType()
772 LLVM_READOBJ_ENUM_CASE(ELF, SHT_SHLIB ); in getElfSectionType()
773 LLVM_READOBJ_ENUM_CASE(ELF, SHT_DYNSYM ); in getElfSectionType()
774 LLVM_READOBJ_ENUM_CASE(ELF, SHT_INIT_ARRAY ); in getElfSectionType()
775 LLVM_READOBJ_ENUM_CASE(ELF, SHT_FINI_ARRAY ); in getElfSectionType()
776 LLVM_READOBJ_ENUM_CASE(ELF, SHT_PREINIT_ARRAY ); in getElfSectionType()
777 LLVM_READOBJ_ENUM_CASE(ELF, SHT_GROUP ); in getElfSectionType()
778 LLVM_READOBJ_ENUM_CASE(ELF, SHT_SYMTAB_SHNDX ); in getElfSectionType()
779 LLVM_READOBJ_ENUM_CASE(ELF, SHT_GNU_ATTRIBUTES ); in getElfSectionType()
780 LLVM_READOBJ_ENUM_CASE(ELF, SHT_GNU_HASH ); in getElfSectionType()
781 LLVM_READOBJ_ENUM_CASE(ELF, SHT_GNU_verdef ); in getElfSectionType()
782 LLVM_READOBJ_ENUM_CASE(ELF, SHT_GNU_verneed ); in getElfSectionType()
783 LLVM_READOBJ_ENUM_CASE(ELF, SHT_GNU_versym ); in getElfSectionType()
789 LLVM_READOBJ_ENUM_ENT(ELF, SHF_WRITE ),
790 LLVM_READOBJ_ENUM_ENT(ELF, SHF_ALLOC ),
791 LLVM_READOBJ_ENUM_ENT(ELF, SHF_EXCLUDE ),
792 LLVM_READOBJ_ENUM_ENT(ELF, SHF_EXECINSTR ),
793 LLVM_READOBJ_ENUM_ENT(ELF, SHF_MERGE ),
794 LLVM_READOBJ_ENUM_ENT(ELF, SHF_STRINGS ),
795 LLVM_READOBJ_ENUM_ENT(ELF, SHF_INFO_LINK ),
796 LLVM_READOBJ_ENUM_ENT(ELF, SHF_LINK_ORDER ),
797 LLVM_READOBJ_ENUM_ENT(ELF, SHF_OS_NONCONFORMING),
798 LLVM_READOBJ_ENUM_ENT(ELF, SHF_GROUP ),
799 LLVM_READOBJ_ENUM_ENT(ELF, SHF_TLS ),
800 LLVM_READOBJ_ENUM_ENT(ELF, XCORE_SHF_CP_SECTION),
801 LLVM_READOBJ_ENUM_ENT(ELF, XCORE_SHF_DP_SECTION),
802 LLVM_READOBJ_ENUM_ENT(ELF, SHF_MIPS_NOSTRIP ),
803 LLVM_READOBJ_ENUM_ENT(ELF, SHF_AMDGPU_HSA_GLOBAL),
804 LLVM_READOBJ_ENUM_ENT(ELF, SHF_AMDGPU_HSA_READONLY),
805 LLVM_READOBJ_ENUM_ENT(ELF, SHF_AMDGPU_HSA_CODE),
806 LLVM_READOBJ_ENUM_ENT(ELF, SHF_AMDGPU_HSA_AGENT)
813 case ELF::EM_AMDGPU: in getElfSegmentType()
815 LLVM_READOBJ_ENUM_CASE(ELF, PT_AMDGPU_HSA_LOAD_GLOBAL_PROGRAM); in getElfSegmentType()
816 LLVM_READOBJ_ENUM_CASE(ELF, PT_AMDGPU_HSA_LOAD_GLOBAL_AGENT); in getElfSegmentType()
817 LLVM_READOBJ_ENUM_CASE(ELF, PT_AMDGPU_HSA_LOAD_READONLY_AGENT); in getElfSegmentType()
818 LLVM_READOBJ_ENUM_CASE(ELF, PT_AMDGPU_HSA_LOAD_CODE_AGENT); in getElfSegmentType()
820 case ELF::EM_ARM: in getElfSegmentType()
822 LLVM_READOBJ_ENUM_CASE(ELF, PT_ARM_EXIDX); in getElfSegmentType()
824 case ELF::EM_MIPS: in getElfSegmentType()
825 case ELF::EM_MIPS_RS3_LE: in getElfSegmentType()
827 LLVM_READOBJ_ENUM_CASE(ELF, PT_MIPS_REGINFO); in getElfSegmentType()
828 LLVM_READOBJ_ENUM_CASE(ELF, PT_MIPS_RTPROC); in getElfSegmentType()
829 LLVM_READOBJ_ENUM_CASE(ELF, PT_MIPS_OPTIONS); in getElfSegmentType()
830 LLVM_READOBJ_ENUM_CASE(ELF, PT_MIPS_ABIFLAGS); in getElfSegmentType()
835 LLVM_READOBJ_ENUM_CASE(ELF, PT_NULL ); in getElfSegmentType()
836 LLVM_READOBJ_ENUM_CASE(ELF, PT_LOAD ); in getElfSegmentType()
837 LLVM_READOBJ_ENUM_CASE(ELF, PT_DYNAMIC); in getElfSegmentType()
838 LLVM_READOBJ_ENUM_CASE(ELF, PT_INTERP ); in getElfSegmentType()
839 LLVM_READOBJ_ENUM_CASE(ELF, PT_NOTE ); in getElfSegmentType()
840 LLVM_READOBJ_ENUM_CASE(ELF, PT_SHLIB ); in getElfSegmentType()
841 LLVM_READOBJ_ENUM_CASE(ELF, PT_PHDR ); in getElfSegmentType()
842 LLVM_READOBJ_ENUM_CASE(ELF, PT_TLS ); in getElfSegmentType()
844 LLVM_READOBJ_ENUM_CASE(ELF, PT_GNU_EH_FRAME); in getElfSegmentType()
845 LLVM_READOBJ_ENUM_CASE(ELF, PT_SUNW_UNWIND); in getElfSegmentType()
847 LLVM_READOBJ_ENUM_CASE(ELF, PT_GNU_STACK); in getElfSegmentType()
848 LLVM_READOBJ_ENUM_CASE(ELF, PT_GNU_RELRO); in getElfSegmentType()
854 LLVM_READOBJ_ENUM_ENT(ELF, PF_X),
855 LLVM_READOBJ_ENUM_ENT(ELF, PF_W),
856 LLVM_READOBJ_ENUM_ENT(ELF, PF_R)
860 LLVM_READOBJ_ENUM_ENT(ELF, EF_MIPS_NOREORDER),
861 LLVM_READOBJ_ENUM_ENT(ELF, EF_MIPS_PIC),
862 LLVM_READOBJ_ENUM_ENT(ELF, EF_MIPS_CPIC),
863 LLVM_READOBJ_ENUM_ENT(ELF, EF_MIPS_ABI2),
864 LLVM_READOBJ_ENUM_ENT(ELF, EF_MIPS_32BITMODE),
865 LLVM_READOBJ_ENUM_ENT(ELF, EF_MIPS_FP64),
866 LLVM_READOBJ_ENUM_ENT(ELF, EF_MIPS_NAN2008),
867 LLVM_READOBJ_ENUM_ENT(ELF, EF_MIPS_ABI_O32),
868 LLVM_READOBJ_ENUM_ENT(ELF, EF_MIPS_ABI_O64),
869 LLVM_READOBJ_ENUM_ENT(ELF, EF_MIPS_ABI_EABI32),
870 LLVM_READOBJ_ENUM_ENT(ELF, EF_MIPS_ABI_EABI64),
871 LLVM_READOBJ_ENUM_ENT(ELF, EF_MIPS_MACH_3900),
872 LLVM_READOBJ_ENUM_ENT(ELF, EF_MIPS_MACH_4010),
873 LLVM_READOBJ_ENUM_ENT(ELF, EF_MIPS_MACH_4100),
874 LLVM_READOBJ_ENUM_ENT(ELF, EF_MIPS_MACH_4650),
875 LLVM_READOBJ_ENUM_ENT(ELF, EF_MIPS_MACH_4120),
876 LLVM_READOBJ_ENUM_ENT(ELF, EF_MIPS_MACH_4111),
877 LLVM_READOBJ_ENUM_ENT(ELF, EF_MIPS_MACH_SB1),
878 LLVM_READOBJ_ENUM_ENT(ELF, EF_MIPS_MACH_OCTEON),
879 LLVM_READOBJ_ENUM_ENT(ELF, EF_MIPS_MACH_XLR),
880 LLVM_READOBJ_ENUM_ENT(ELF, EF_MIPS_MACH_OCTEON2),
881 LLVM_READOBJ_ENUM_ENT(ELF, EF_MIPS_MACH_OCTEON3),
882 LLVM_READOBJ_ENUM_ENT(ELF, EF_MIPS_MACH_5400),
883 LLVM_READOBJ_ENUM_ENT(ELF, EF_MIPS_MACH_5900),
884 LLVM_READOBJ_ENUM_ENT(ELF, EF_MIPS_MACH_5500),
885 LLVM_READOBJ_ENUM_ENT(ELF, EF_MIPS_MACH_9000),
886 LLVM_READOBJ_ENUM_ENT(ELF, EF_MIPS_MACH_LS2E),
887 LLVM_READOBJ_ENUM_ENT(ELF, EF_MIPS_MACH_LS2F),
888 LLVM_READOBJ_ENUM_ENT(ELF, EF_MIPS_MACH_LS3A),
889 LLVM_READOBJ_ENUM_ENT(ELF, EF_MIPS_MICROMIPS),
890 LLVM_READOBJ_ENUM_ENT(ELF, EF_MIPS_ARCH_ASE_M16),
891 LLVM_READOBJ_ENUM_ENT(ELF, EF_MIPS_ARCH_ASE_MDMX),
892 LLVM_READOBJ_ENUM_ENT(ELF, EF_MIPS_ARCH_1),
893 LLVM_READOBJ_ENUM_ENT(ELF, EF_MIPS_ARCH_2),
894 LLVM_READOBJ_ENUM_ENT(ELF, EF_MIPS_ARCH_3),
895 LLVM_READOBJ_ENUM_ENT(ELF, EF_MIPS_ARCH_4),
896 LLVM_READOBJ_ENUM_ENT(ELF, EF_MIPS_ARCH_5),
897 LLVM_READOBJ_ENUM_ENT(ELF, EF_MIPS_ARCH_32),
898 LLVM_READOBJ_ENUM_ENT(ELF, EF_MIPS_ARCH_64),
899 LLVM_READOBJ_ENUM_ENT(ELF, EF_MIPS_ARCH_32R2),
900 LLVM_READOBJ_ENUM_ENT(ELF, EF_MIPS_ARCH_64R2),
901 LLVM_READOBJ_ENUM_ENT(ELF, EF_MIPS_ARCH_32R6),
902 LLVM_READOBJ_ENUM_ENT(ELF, EF_MIPS_ARCH_64R6)
911 if (Phdr.p_type == ELF::PT_DYNAMIC) { in ELFDumper()
915 if (Phdr.p_type != ELF::PT_LOAD || Phdr.p_filesz == 0) in ELFDumper()
938 case ELF::DT_HASH: in ELFDumper()
942 case ELF::DT_GNU_HASH: in ELFDumper()
946 case ELF::DT_RELA: in ELFDumper()
949 case ELF::DT_RELASZ: in ELFDumper()
952 case ELF::DT_RELAENT: in ELFDumper()
955 case ELF::DT_SONAME: in ELFDumper()
958 case ELF::DT_STRTAB: in ELFDumper()
961 case ELF::DT_STRSZ: in ELFDumper()
964 case ELF::DT_SYMTAB: in ELFDumper()
977 case ELF::SHT_GNU_versym: in ELFDumper()
982 case ELF::SHT_GNU_verdef: in ELFDumper()
987 case ELF::SHT_GNU_verneed: in ELFDumper()
992 case ELF::SHT_DYNSYM: in ELFDumper()
997 case ELF::SHT_SYMTAB: in ELFDumper()
1002 case ELF::SHT_SYMTAB_SHNDX: { in ELFDumper()
1042 W.printBinary("Magic", makeArrayRef(Header->e_ident).slice(ELF::EI_MAG0, in printFileHeaders()
1044 W.printEnum ("Class", Header->e_ident[ELF::EI_CLASS], in printFileHeaders()
1046 W.printEnum ("DataEncoding", Header->e_ident[ELF::EI_DATA], in printFileHeaders()
1048 W.printNumber("FileVersion", Header->e_ident[ELF::EI_VERSION]); in printFileHeaders()
1051 if (Header->e_machine == ELF::EM_AMDGPU && in printFileHeaders()
1052 Header->e_ident[ELF::EI_OSABI] == ELF::ELFOSABI_AMDGPU_HSA) in printFileHeaders()
1053 W.printHex("OS/ABI", "AMDGPU_HSA", ELF::ELFOSABI_AMDGPU_HSA); in printFileHeaders()
1055 W.printEnum ("OS/ABI", Header->e_ident[ELF::EI_OSABI], in printFileHeaders()
1057 W.printNumber("ABIVersion", Header->e_ident[ELF::EI_ABIVERSION]); in printFileHeaders()
1058 W.printBinary("Unused", makeArrayRef(Header->e_ident).slice(ELF::EI_PAD)); in printFileHeaders()
1069 unsigned(ELF::EF_MIPS_ARCH), unsigned(ELF::EF_MIPS_ABI), in printFileHeaders()
1070 unsigned(ELF::EF_MIPS_MACH)); in printFileHeaders()
1129 if (opts::SectionData && Sec.sh_type != ELF::SHT_NOBITS) { in printSections()
1145 if (Sec.sh_type != ELF::SHT_REL && Sec.sh_type != ELF::SHT_RELA) in printRelocations()
1196 case ELF::SHT_REL: in printRelocations()
1205 case ELF::SHT_RELA: in printRelocations()
1218 if (Sym && Sym->getType() == ELF::STT_SECTION) { in printRelocation()
1285 if (Obj->getHeader()->e_machine == ELF::EM_AMDGPU && in printSymbol()
1286 SymbolType >= ELF::STT_LOOS && SymbolType < ELF::STT_HIOS) in printSymbol()
1554 while (I != E && E->getTag() == ELF::DT_NULL) in printDynamicTable()
1556 if (E->getTag() != ELF::DT_NULL) in printDynamicTable()
1593 if (Entry.d_tag == ELF::DT_NEEDED) in printNeededLibraries()
1668 if (Sec.sh_type != ELF::SHT_ARM_ATTRIBUTES) in printAttributes()
1739 case ELF::DT_PLTGOT: in MipsGOTParser()
1742 case ELF::DT_MIPS_LOCAL_GOTNO: in MipsGOTParser()
1745 case ELF::DT_MIPS_GOTSYM: in MipsGOTParser()
1748 case ELF::DT_MIPS_PLTGOT: in MipsGOTParser()
1751 case ELF::DT_JMPREL: in MipsGOTParser()
1905 case ELF::SHT_REL: in parsePLT()
1913 case ELF::SHT_RELA: in parsePLT()