/external/llvm/test/Object/ |
D | readobj-shared-object.test | 2 RUN: %p/Inputs/shared-object-test.elf-i386 \ 3 RUN: | FileCheck %s -check-prefix ELF 5 RUN: %p/Inputs/shared-object-test.elf-i386 \ 9 RUN: %p/Inputs/shared-object-test.elf-x86-64 \ 10 RUN: | FileCheck %s -check-prefix ELF 12 RUN: %p/Inputs/shared-object-test.elf-x86-64 \ 25 ELF: Sections [ 26 ELF: Section { 27 ELF: Name: (0) 28 ELF: Type: SHT_NULL [all …]
|
D | obj2yaml.test | 3 RUN: obj2yaml %p/Inputs/trivial-object-test.elf-mipsel | FileCheck %s --check-prefix ELF-MIPSEL 4 RUN: obj2yaml %p/Inputs/trivial-object-test.elf-mips64el | FileCheck %s --check-prefix ELF-MIPS64EL 5 RUN: obj2yaml %p/Inputs/trivial-object-test.elf-x86-64 | FileCheck %s --check-prefix ELF-X86-64 6 RUN: obj2yaml %p/Inputs/trivial-object-test.elf-avr | FileCheck %s --check-prefix ELF-AVR 7 RUN: obj2yaml %p/Inputs/unwind-section.elf-x86-64 \ 8 RUN: | FileCheck %s --check-prefix ELF-X86-64-UNWIND 192 ELF-MIPSEL: FileHeader: 193 ELF-MIPSEL-NEXT: Class: ELFCLASS32 194 ELF-MIPSEL-NEXT: Data: ELFDATA2LSB 195 ELF-MIPSEL-NEXT: OSABI: ELFOSABI_GNU [all …]
|
D | objdump-relocations.test | 5 RUN: llvm-objdump -r %p/Inputs/trivial-object-test.elf-i386 \ 6 RUN: | FileCheck %s -check-prefix ELF-i386 7 RUN: llvm-objdump -r %p/Inputs/trivial-object-test.elf-x86-64 \ 8 RUN: | FileCheck %s -check-prefix ELF-x86-64 9 RUN: llvm-objdump -r %p/Inputs/trivial-object-test.elf-hexagon \ 10 RUN: | FileCheck %s -check-prefix ELF-hexagon 11 RUN: llvm-objdump -r %p/Inputs/trivial-object-test.elf-mips64el \ 12 RUN: | FileCheck %s -check-prefix ELF-MIPS64EL 13 RUN: llvm-objdump -r %p/Inputs/trivial-object-test.elf-mipsel \ 14 RUN: | FileCheck %s -check-prefix ELF-MIPSEL [all …]
|
/external/llvm/test/tools/llvm-readobj/ |
D | reloc-types.test | 4 // Todo: ELF-PPC, ELF-HEXAGON 6 …: llvm-readobj -r -expand-relocs %p/Inputs/relocs.obj.elf-i386 | FileCheck %s -check-prefix EL… 7 …: llvm-readobj -r -expand-relocs %p/Inputs/relocs.obj.elf-x86_64 | FileCheck %s -check-prefix EL… 8 …: llvm-readobj -r -expand-relocs %p/Inputs/relocs.obj.elf-aarch64 | FileCheck %s -check-prefix EL… 9 …: llvm-readobj -r -expand-relocs %p/Inputs/relocs.obj.elf-arm | FileCheck %s -check-prefix EL… 10 …: llvm-readobj -r -expand-relocs %p/Inputs/relocs.obj.elf-mips | FileCheck %s -check-prefix EL… 11 …: llvm-readobj -r -expand-relocs %p/Inputs/relocs.obj.elf-mips64el | FileCheck %s -check-prefix EL… 12 …: llvm-readobj -r -expand-relocs %p/Inputs/relocs.obj.elf-ppc64 | FileCheck %s -check-prefix EL… 20 ELF-32: Type: R_386_NONE (0) 21 ELF-32: Type: R_386_32 (1) [all …]
|
D | program-headers.test | 1 RUN: llvm-readobj -program-headers %p/../../Object/Inputs/program-headers.elf-i386 \ 2 RUN: | FileCheck %s -check-prefix ELF-I386 3 RUN: llvm-readobj -program-headers %p/../../Object/Inputs/program-headers.elf-x86-64 \ 4 RUN: | FileCheck %s -check-prefix ELF-X86-64 6 RUN: | FileCheck %s -check-prefix ELF-MIPS 8 RUN: | FileCheck %s -check-prefix ELF-MIPS64 10 ELF-I386: ProgramHeaders [ 11 ELF-I386-NEXT: ProgramHeader { 12 ELF-I386-NEXT: Type: PT_LOAD (0x1) 13 ELF-I386-NEXT: Offset: 0x0 [all …]
|
D | dynamic.test | 3 RUN: | FileCheck %s -check-prefix ELF-MIPS 5 ELF-MIPS: Format: ELF32-mips 6 ELF-MIPS: Arch: mipsel 7 ELF-MIPS: AddressSize: 32bit 8 ELF-MIPS: LoadName: 9 ELF-MIPS: DynamicSection [ (23 entries) 10 ELF-MIPS: Tag Type Name/Value 11 ELF-MIPS: 0x00000001 NEEDED SharedLibrary (libc.so.6) 12 ELF-MIPS: 0x0000000C INIT 0x528 13 ELF-MIPS: 0x0000000D FINI 0x860 [all …]
|
/external/llvm/lib/Target/Hexagon/MCTargetDesc/ |
D | HexagonELFObjectWriter.cpp | 17 #define DEBUG_TYPE "hexagon-elf-writer" 37 : MCELFObjectTargetWriter(/*Is64bit*/ false, OSABI, ELF::EM_HEXAGON, in HexagonELFObjectWriter() 48 return ELF::R_HEX_NONE; in GetRelocType() 50 return (IsPCRel) ? ELF::R_HEX_32_PCREL : ELF::R_HEX_32; in GetRelocType() 52 return ELF::R_HEX_32_PCREL; in GetRelocType() 54 return ELF::R_HEX_16; in GetRelocType() 56 return ELF::R_HEX_8; in GetRelocType() 58 return ELF::R_HEX_B22_PCREL; in GetRelocType() 60 return ELF::R_HEX_B15_PCREL; in GetRelocType() 62 return ELF::R_HEX_B7_PCREL; in GetRelocType() [all …]
|
/external/llvm/test/CodeGen/AMDGPU/ |
D | hsa-globals.ll | 2 …bj -triple amdgcn--amdhsa -mcpu=kaveri | llvm-readobj -symbols -s | FileCheck %s --check-prefix=ELF 59 ; ELF: Section { 60 ; ELF: Name: .hsadata_global_program 61 ; ELF: Type: SHT_PROGBITS (0x1) 62 ; ELF: Flags [ (0x100003) 63 ; ELF: SHF_ALLOC (0x2) 64 ; ELF: SHF_AMDGPU_HSA_GLOBAL (0x100000) 65 ; ELF: SHF_WRITE (0x1) 66 ; ELF: ] 67 ; ELF: } [all …]
|
/external/llvm/lib/Target/PowerPC/MCTargetDesc/ |
D | PPCELFObjectWriter.cpp | 1 //===-- PPCELFObjectWriter.cpp - PPC ELF Writer ---------------------------===// 38 Is64Bit ? ELF::EM_PPC64 : ELF::EM_PPC, in PPCELFObjectWriter() 85 Type = ELF::R_PPC_REL24; in GetRelocType() 88 Type = ELF::R_PPC_PLTREL24; in GetRelocType() 91 Type = ELF::R_PPC_LOCAL24PC; in GetRelocType() 97 Type = ELF::R_PPC_REL14; in GetRelocType() 103 Type = ELF::R_PPC_REL16; in GetRelocType() 106 Type = ELF::R_PPC_REL16_LO; in GetRelocType() 109 Type = ELF::R_PPC_REL16_HI; in GetRelocType() 112 Type = ELF::R_PPC_REL16_HA; in GetRelocType() [all …]
|
/external/llvm/tools/llvm-readobj/ |
D | ELFDumper.cpp | 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() [all …]
|
/external/llvm/lib/Target/AArch64/MCTargetDesc/ |
D | AArch64ELFObjectWriter.cpp | 1 //===-- AArch64ELFObjectWriter.cpp - AArch64 ELF Writer -------------------===// 10 // This file handles ELF-specific object emission, converting LLVM's internal 41 : MCELFObjectTargetWriter(/*Is64Bit*/ true, OSABI, ELF::EM_AARCH64, in AArch64ELFObjectWriter() 65 return ELF::R_AARCH64_PREL16; in GetRelocType() 67 return ELF::R_AARCH64_PREL32; in GetRelocType() 69 return ELF::R_AARCH64_PREL64; in GetRelocType() 72 return ELF::R_AARCH64_ADR_PREL_LO21; in GetRelocType() 75 return ELF::R_AARCH64_ADR_PREL_PG_HI21; in GetRelocType() 77 return ELF::R_AARCH64_ADR_GOT_PAGE; in GetRelocType() 79 return ELF::R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21; in GetRelocType() [all …]
|
/external/elfutils/libelf/ |
D | elf32_newphdr.c | 1 /* Create new ELF program header table. 46 elfw2(LIBELFBITS,newphdr) (Elf *elf, size_t count) in ElfW2() 50 if (elf == NULL) in ElfW2() 53 if (unlikely (elf->kind != ELF_K_ELF)) in ElfW2() 65 rwlock_wrlock (elf->lock); in ElfW2() 67 if (elf->class == 0) in ElfW2() 68 elf->class = ELFW(ELFCLASS,LIBELFBITS); in ElfW2() 69 else if (unlikely (elf->class != ELFW(ELFCLASS,LIBELFBITS))) in ElfW2() 76 if (unlikely (elf->state.ELFW(elf,LIBELFBITS).ehdr == NULL)) in ElfW2() 87 if (elf->state.ELFW(elf,LIBELFBITS).phdr != NULL) in ElfW2() [all …]
|
D | elf_newscn.c | 44 elf_newscn (Elf *elf) in elf_newscn() argument 49 if (elf == NULL) in elf_newscn() 52 /* We rely on the prefix of the `elf', `elf32', and `elf64' element in elf_newscn() 54 assert (offsetof (Elf, state.elf.scns_last) in elf_newscn() 55 == offsetof (Elf, state.elf32.scns_last)); in elf_newscn() 56 assert (offsetof (Elf, state.elf.scns_last) in elf_newscn() 57 == offsetof (Elf, state.elf64.scns_last)); in elf_newscn() 58 assert (offsetof (Elf, state.elf32.scns) in elf_newscn() 59 == offsetof (Elf, state.elf64.scns)); in elf_newscn() 61 rwlock_wrlock (elf->lock); in elf_newscn() [all …]
|
D | elf_end.c | 1 /* Free resources associated with Elf descriptor. 43 elf_end (Elf *elf) in elf_end() argument 45 Elf *parent; in elf_end() 47 if (elf == NULL) in elf_end() 52 rwlock_wrlock (elf->lock); in elf_end() 54 if (elf->ref_count != 0 && --elf->ref_count != 0) in elf_end() 57 int result = elf->ref_count; in elf_end() 58 rwlock_unlock (elf->lock); in elf_end() 62 if (elf->kind == ELF_K_AR) in elf_end() 66 symbol table since this is only available via the archive ELF in elf_end() [all …]
|
D | elf_begin.c | 52 static inline Elf * 54 Elf_Cmd cmd, Elf *parent) in file_read_ar() 56 Elf *elf; in file_read_ar() local 59 elf = allocate_elf (fildes, map_address, offset, maxsize, cmd, parent, in file_read_ar() 61 if (elf != NULL) in file_read_ar() 65 elf->state.ar.offset = offset + SARMAG; in file_read_ar() 67 elf->state.ar.elf_ar_hdr.ar_rawname = elf->state.ar.raw_name; in file_read_ar() 70 return elf; in file_read_ar() 92 /* Make the ELF header available. */ in get_shnum() 101 /* We already read the ELF header. We have to copy the header in get_shnum() [all …]
|
D | elf_getshdrstrndx.c | 46 elf_getshdrstrndx (Elf *elf, size_t *dst) in elf_getshdrstrndx() argument 50 if (elf == NULL) in elf_getshdrstrndx() 53 if (unlikely (elf->kind != ELF_K_ELF)) in elf_getshdrstrndx() 59 rwlock_rdlock (elf->lock); in elf_getshdrstrndx() 61 /* We rely here on the fact that the `elf' element is a common prefix in elf_getshdrstrndx() 63 assert (offsetof (struct Elf, state.elf.ehdr) in elf_getshdrstrndx() 64 == offsetof (struct Elf, state.elf32.ehdr)); in elf_getshdrstrndx() 65 assert (sizeof (elf->state.elf.ehdr) in elf_getshdrstrndx() 66 == sizeof (elf->state.elf32.ehdr)); in elf_getshdrstrndx() 67 assert (offsetof (struct Elf, state.elf.ehdr) in elf_getshdrstrndx() [all …]
|
D | elf32_updatefile.c | 129 __elfw2(LIBELFBITS,updatemmap) (Elf *elf, int change_bo, size_t shnum) in __elfw2() 133 /* We need the ELF header several times. */ in __elfw2() 134 ElfW2(LIBELFBITS,Ehdr) *ehdr = elf->state.ELFW(elf,LIBELFBITS).ehdr; in __elfw2() 136 /* Write out the ELF header. */ in __elfw2() 137 if ((elf->state.ELFW(elf,LIBELFBITS).ehdr_flags | elf->flags) & ELF_F_DIRTY) in __elfw2() 146 /* Today there is only one version of the ELF header. */ in __elfw2() 156 (*fctp) ((char *) elf->map_address + elf->start_offset, ehdr, in __elfw2() 159 else if (elf->map_address + elf->start_offset != ehdr) in __elfw2() 160 memcpy (elf->map_address + elf->start_offset, ehdr, in __elfw2() 163 elf->state.ELFW(elf,LIBELFBITS).ehdr_flags &= ~ELF_F_DIRTY; in __elfw2() [all …]
|
D | elf_update.c | 44 write_file (Elf *elf, off_t size, int change_bo, size_t shnum) in write_file() argument 46 int class = elf->class; in write_file() 50 if (unlikely (fstat (elf->fildes, &st) != 0)) in write_file() 61 if (elf->parent == NULL in write_file() 62 && (elf->maximum_size == ~((size_t) 0) in write_file() 63 || (size_t) size > elf->maximum_size) in write_file() 64 && unlikely (ftruncate (elf->fildes, size) != 0)) in write_file() 71 if (elf->map_address == NULL && elf->cmd == ELF_C_WRITE_MMAP) in write_file() 73 elf->map_address = mmap (NULL, size, PROT_READ | PROT_WRITE, in write_file() 74 MAP_SHARED, elf->fildes, 0); in write_file() [all …]
|
D | elf32_getphdr.c | 1 /* Get ELF program header table. 49 __elfw2(LIBELFBITS,getphdr_wrlock) (Elf *elf) in ElfW2() 56 result = elf->state.ELFW(elf,LIBELFBITS).phdr; in ElfW2() 60 if (elf->class == 0) in ElfW2() 61 elf->class = ELFW(ELFCLASS,LIBELFBITS); in ElfW2() 62 else if (elf->class != ELFW(ELFCLASS,LIBELFBITS)) in ElfW2() 72 ElfW2(LIBELFBITS,Ehdr) *ehdr = elf->state.ELFW(elf,LIBELFBITS).ehdr; in ElfW2() 76 if (__elf_getphdrnum_rdlock (elf, &phnum) != 0) in ElfW2() 88 || ehdr->e_phoff > elf->maximum_size in ElfW2() 89 || elf->maximum_size - ehdr->e_phoff < size) in ElfW2() [all …]
|
D | libelf.h | 35 /* Get the ELF types. */ 36 #include <elf.h> 39 /* Older glibc elf.h might not yet define the ELF compression types. */ 73 ELF_T_EHDR, /* ELF header. */ 105 unsigned int d_version; /* ELF version. */ 137 /* Flags for the ELF structures. */ 161 ELF_K_ELF, /* ELF file. */ 189 /* Descriptor for the ELF file. */ 190 typedef struct Elf Elf; typedef 192 /* Descriptor for ELF file section. */ [all …]
|
/external/llvm/lib/Target/Sparc/MCTargetDesc/ |
D | SparcELFObjectWriter.cpp | 1 //===-- SparcELFObjectWriter.cpp - Sparc ELF Writer -----------------------===// 26 Is64Bit ? ELF::EM_SPARCV9 : ELF::EM_SPARC, in SparcELFObjectWriter() 47 return ELF::R_SPARC_DISP32; in GetRelocType() 54 case FK_Data_1: return ELF::R_SPARC_DISP8; in GetRelocType() 55 case FK_Data_2: return ELF::R_SPARC_DISP16; in GetRelocType() 56 case FK_Data_4: return ELF::R_SPARC_DISP32; in GetRelocType() 57 case FK_Data_8: return ELF::R_SPARC_DISP64; in GetRelocType() 58 case Sparc::fixup_sparc_call30: return ELF::R_SPARC_WDISP30; in GetRelocType() 59 case Sparc::fixup_sparc_br22: return ELF::R_SPARC_WDISP22; in GetRelocType() 60 case Sparc::fixup_sparc_br19: return ELF::R_SPARC_WDISP19; in GetRelocType() [all …]
|
/external/llvm/lib/Target/Mips/MCTargetDesc/ |
D | MipsELFObjectWriter.cpp | 1 //===-- MipsELFObjectWriter.cpp - Mips ELF Writer -------------------------===// 58 : MCELFObjectTargetWriter(_is64Bit, OSABI, ELF::EM_MIPS, in MipsELFObjectWriter() 72 return ELF::R_MIPS_NONE; in GetRelocType() 75 return IsPCRel ? ELF::R_MIPS_PC16 : ELF::R_MIPS_16; in GetRelocType() 78 return IsPCRel ? ELF::R_MIPS_PC32 : ELF::R_MIPS_32; in GetRelocType() 85 return ELF::R_MIPS_PC16; in GetRelocType() 87 return ELF::R_MICROMIPS_PC7_S1; in GetRelocType() 89 return ELF::R_MICROMIPS_PC10_S1; in GetRelocType() 91 return ELF::R_MICROMIPS_PC16_S1; in GetRelocType() 93 return ELF::R_MIPS_PC19_S2; in GetRelocType() [all …]
|
/external/llvm/lib/Target/XCore/ |
D | XCoreTargetObjectFile.cpp | 15 #include "llvm/Support/ELF.h" 24 BSSSection = Ctx.getELFSection(".dp.bss", ELF::SHT_NOBITS, in Initialize() 25 ELF::SHF_ALLOC | ELF::SHF_WRITE | in Initialize() 26 ELF::XCORE_SHF_DP_SECTION); in Initialize() 27 BSSSectionLarge = Ctx.getELFSection(".dp.bss.large", ELF::SHT_NOBITS, in Initialize() 28 ELF::SHF_ALLOC | ELF::SHF_WRITE | in Initialize() 29 ELF::XCORE_SHF_DP_SECTION); in Initialize() 30 DataSection = Ctx.getELFSection(".dp.data", ELF::SHT_PROGBITS, in Initialize() 31 ELF::SHF_ALLOC | ELF::SHF_WRITE | in Initialize() 32 ELF::XCORE_SHF_DP_SECTION); in Initialize() [all …]
|
/external/elfutils/tests/ |
D | newdata.c | 30 #include ELFUTILS_HEADER(elf) 38 add_section_data (Elf *elf, char *buf, size_t len) in add_section_data() argument 42 Elf_Scn *scn = elf_getscn (elf, 1); in add_section_data() 63 if (elf_update (elf, ELF_C_NULL) < 0) in add_section_data() 71 static Elf * 74 Elf *elf = elf_begin (fd, use_mmap ? ELF_C_WRITE_MMAP : ELF_C_WRITE, NULL); in create_elf() local 75 if (elf == NULL) in create_elf() 77 printf ("cannot create ELF descriptor: %s\n", elf_errmsg (-1)); in create_elf() 81 // Create an ELF header. in create_elf() 82 if (gelf_newehdr (elf, class) == 0) in create_elf() [all …]
|
/external/llvm/lib/Target/X86/MCTargetDesc/ |
D | X86ELFObjectWriter.cpp | 1 //===-- X86ELFObjectWriter.cpp - X86 ELF Writer ---------------------------===// 15 #include "llvm/Support/ELF.h" 38 (EMachine != ELF::EM_386) && in X86ELFObjectWriter() 39 (EMachine != ELF::EM_IAMCU)) {} in X86ELFObjectWriter() 88 return IsPCRel ? ELF::R_X86_64_PC64 : ELF::R_X86_64_64; in getRelocType64() 90 return IsPCRel ? ELF::R_X86_64_PC32 : ELF::R_X86_64_32; in getRelocType64() 92 return ELF::R_X86_64_32S; in getRelocType64() 94 return IsPCRel ? ELF::R_X86_64_PC16 : ELF::R_X86_64_16; in getRelocType64() 96 return IsPCRel ? ELF::R_X86_64_PC8 : ELF::R_X86_64_8; in getRelocType64() 101 return IsPCRel ? ELF::R_X86_64_GOTPC64 : ELF::R_X86_64_GOT64; in getRelocType64() [all …]
|