/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 …]
|
D | readobj-elf-versioning.test | 1 RUN: llvm-readobj -dt %p/Inputs/elf-versioning-test.i386 \ 2 RUN: | FileCheck %s -check-prefix ELF 3 RUN: llvm-readobj -dt %p/Inputs/elf-versioning-test.i386 \ 5 RUN: llvm-readobj -dt %p/Inputs/elf-versioning-test.x86_64 \ 6 RUN: | FileCheck %s -check-prefix ELF 7 RUN: llvm-readobj -dt %p/Inputs/elf-versioning-test.x86_64 \ 10 ELF: DynamicSymbols [ 11 ELF: Symbol { 12 ELF: Name: foo@@VER2 13 ELF: Binding: Global [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-lanai | FileCheck %s -check-prefix EL… 11 …: llvm-readobj -r -expand-relocs %p/Inputs/relocs.obj.elf-mips | FileCheck %s -check-prefix EL… 12 …: llvm-readobj -r -expand-relocs %p/Inputs/relocs.obj.elf-mips64el | FileCheck %s -check-prefix EL… 13 …: llvm-readobj -r -expand-relocs %p/Inputs/relocs.obj.elf-ppc64 | FileCheck %s -check-prefix EL… 21 ELF-32: Type: R_386_NONE (0) [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 …]
|
D | symbols.test | 3 RUN: llvm-readobj -t %p/Inputs/trivial.obj.elf-i386 \ 4 RUN: | FileCheck %s -check-prefix ELF 43 ELF: Symbols [ 44 ELF-NEXT: Symbol { 45 ELF-NEXT: Name: (0) 46 ELF-NEXT: Value: 0x0 47 ELF-NEXT: Size: 0 48 ELF-NEXT: Binding: Local (0x0) 49 ELF-NEXT: Type: None (0x0) 50 ELF-NEXT: Other: 0 [all …]
|
/external/llvm/lib/Target/Hexagon/MCTargetDesc/ |
D | HexagonELFObjectWriter.cpp | 18 #define DEBUG_TYPE "hexagon-elf-writer" 38 : MCELFObjectTargetWriter(/*Is64bit*/ false, OSABI, ELF::EM_HEXAGON, in HexagonELFObjectWriter() 54 return ELF::R_HEX_DTPREL_32; in getRelocType() 56 return ELF::R_HEX_GOT_32; in getRelocType() 58 return ELF::R_HEX_GOTREL_32; in getRelocType() 60 return ELF::R_HEX_GD_GOT_32; in getRelocType() 62 return ELF::R_HEX_IE_32; in getRelocType() 64 return ELF::R_HEX_IE_GOT_32; in getRelocType() 66 return ELF::R_HEX_LD_GOT_32; in getRelocType() 68 return ELF::R_HEX_32_PCREL; in getRelocType() [all …]
|
/external/llvm/lib/Target/Mips/MCTargetDesc/ |
D | MipsELFObjectWriter.cpp | 1 //===-- MipsELFObjectWriter.cpp - Mips ELF Writer -------------------------===// 26 #define DEBUG_TYPE "mips-elf-object-writer" 129 /// is ELF::R_MIPS_NONE. 136 if (Type == ELF::R_MIPS_HI16) in getMatchingLoType() 137 return ELF::R_MIPS_LO16; in getMatchingLoType() 138 if (Type == ELF::R_MICROMIPS_HI16) in getMatchingLoType() 139 return ELF::R_MICROMIPS_LO16; in getMatchingLoType() 140 if (Type == ELF::R_MIPS16_HI16) in getMatchingLoType() 141 return ELF::R_MIPS16_LO16; in getMatchingLoType() 143 if (Reloc.OriginalSymbol->getBinding() != ELF::STB_LOCAL) in getMatchingLoType() [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 42 : MCELFObjectTargetWriter(/*Is64Bit*/ true, OSABI, ELF::EM_AARCH64, in AArch64ELFObjectWriter() 68 return ELF::R_AARCH64_NONE; in getRelocType() 70 return ELF::R_AARCH64_PREL16; in getRelocType() 72 return ELF::R_AARCH64_PREL32; in getRelocType() 74 return ELF::R_AARCH64_PREL64; in getRelocType() 77 return ELF::R_AARCH64_ADR_PREL_LO21; in getRelocType() 80 return ELF::R_AARCH64_ADR_PREL_PG_HI21; in getRelocType() 82 return ELF::R_AARCH64_ADR_GOT_PAGE; in getRelocType() [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/lib/Target/Sparc/MCTargetDesc/ |
D | SparcELFObjectWriter.cpp | 1 //===-- SparcELFObjectWriter.cpp - Sparc ELF Writer -----------------------===// 26 Is64Bit ? ELF::EM_SPARCV9 : ELF::EM_SPARC, in SparcELFObjectWriter() 48 return ELF::R_SPARC_DISP32; in getRelocType() 55 case FK_Data_1: return ELF::R_SPARC_DISP8; in getRelocType() 56 case FK_Data_2: return ELF::R_SPARC_DISP16; in getRelocType() 57 case FK_Data_4: return ELF::R_SPARC_DISP32; in getRelocType() 58 case FK_Data_8: return ELF::R_SPARC_DISP64; in getRelocType() 59 case Sparc::fixup_sparc_call30: return ELF::R_SPARC_WDISP30; in getRelocType() 60 case Sparc::fixup_sparc_br22: return ELF::R_SPARC_WDISP22; in getRelocType() 61 case Sparc::fixup_sparc_br19: return ELF::R_SPARC_WDISP19; 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_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 | 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_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 | 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 …]
|
/external/kmod/libkmod/ |
D | libkmod-elf.c | 21 #include <elf.h> 73 #define ELFDBG(elf, ...) \ argument 74 _elf_dbg(elf, __FILE__, __LINE__, __func__, __VA_ARGS__); 76 static inline void _elf_dbg(const struct kmod_elf *elf, const char *fname, unsigned line, const cha… in _elf_dbg() argument 81 (elf->class & KMOD_ELF_32) ? 32 : 64, in _elf_dbg() 82 (elf->class & KMOD_ELF_MSB) ? 'M' : 'L', in _elf_dbg() 89 #define ELFDBG(elf, ...) argument 130 static inline uint64_t elf_get_uint(const struct kmod_elf *elf, uint64_t offset, uint16_t size) in elf_get_uint() argument 137 assert(offset + size <= elf->size); in elf_get_uint() 138 if (offset + size > elf->size) { in elf_get_uint() [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 ---------------------------===// 17 #include "llvm/Support/ELF.h" 40 (EMachine != ELF::EM_386) && in X86ELFObjectWriter() 41 (EMachine != ELF::EM_IAMCU)) {} in X86ELFObjectWriter() 101 return IsPCRel ? ELF::R_X86_64_PC64 : ELF::R_X86_64_64; in getRelocType64() 103 return IsPCRel ? ELF::R_X86_64_PC32 : ELF::R_X86_64_32; in getRelocType64() 105 return ELF::R_X86_64_32S; in getRelocType64() 107 return IsPCRel ? ELF::R_X86_64_PC16 : ELF::R_X86_64_16; in getRelocType64() 109 return IsPCRel ? ELF::R_X86_64_PC8 : ELF::R_X86_64_8; in getRelocType64() 114 return IsPCRel ? ELF::R_X86_64_GOTPC64 : ELF::R_X86_64_GOT64; in getRelocType64() [all …]
|