Searched refs:ELF (Results 1 - 25 of 177) sorted by relevance

12345678

/external/chromium_org/third_party/android_crazy_linker/src/src/
H A Dlinker_phdr.h35 /* Declarations related to the ELF program header table and segments.
38 * to the ELF spec, and does not depend on linker-specific data
44 size_t phdr_table_get_load_size(const ELF::Phdr* phdr_table,
46 ELF::Addr* min_vaddr = NULL,
47 ELF::Addr* max_vaddr = NULL);
49 int phdr_table_protect_segments(const ELF::Phdr* phdr_table,
51 ELF::Addr load_bias);
53 int phdr_table_unprotect_segments(const ELF::Phdr* phdr_table,
55 ELF::Addr load_bias);
57 int phdr_table_get_relro_info(const ELF
[all...]
H A Dcrazy_linker_elf_loader.h14 // Helper class used to load an ELF binary in memory.
31 // |file_offset| is an offset in the file where the ELF header will
50 ELF::Addr load_start() { return reinterpret_cast<ELF::Addr>(load_start_); }
51 ELF::Addr load_size() { return load_size_; }
52 ELF::Addr load_bias() { return load_bias_; }
53 const ELF::Phdr* loaded_phdr() { return loaded_phdr_; }
59 ELF::Ehdr header_;
63 ELF::Phdr* phdr_table_;
64 ELF
[all...]
H A Dcrazy_linker_elf_view.h17 // An ElfView holds information describing a given ELF binary file for
38 bool InitUnmapped(ELF::Addr load_address,
39 const ELF::Phdr* phdr,
43 const ELF::Phdr* phdr() const { return phdr_; }
45 const ELF::Dyn* dynamic() const { return dynamic_; }
73 ELF::Addr GetTag() const { return dyn_->d_tag; }
75 ELF::Addr GetValue() const { return dyn_->d_un.d_val; }
77 ELF::Addr* GetValuePointer() const {
78 return const_cast<ELF::Addr*>(&dyn_->d_un.d_ptr);
88 const ELF
[all...]
H A Dcrazy_linker_elf_relocations.h20 // ELF binary.
38 // Apply all relocations to the target mapped ELF binary. Must be called
54 // existing section of an ELF binary. I.e. |src_addr|...|src_addr + size|
55 // must be inside the mapped ELF binary, this function will first copy its
70 ELF::Addr reloc,
71 ELF::Addr* sym_addr,
73 bool ApplyRelaReloc(const ELF::Rela* rela,
74 ELF::Addr sym_addr,
77 bool ApplyRelReloc(const ELF::Rel* rel,
78 ELF
[all...]
H A Dlinker_phdr.cpp50 TECHNICAL NOTE ON ELF LOADING.
52 An ELF file's program header table contains one or more PT_LOAD
64 We will ignore the p_paddr and p_align fields of ELF::Phdr for now.
116 Note that ELF requires the following condition to make the mmap()-ing work:
120 The load_bias must be added to any p_vaddr value read from the ELF file to
132 * loadable segments in an ELF program header table. This corresponds
141 size_t phdr_table_get_load_size(const ELF::Phdr* phdr_table,
143 ELF::Addr* out_min_vaddr,
144 ELF::Addr* out_max_vaddr) {
145 ELF
[all...]
H A Dcrazy_linker_elf_symbols.h16 // An ElfSymbols instance holds information about symbols in a mapped ELF
25 const ELF::Sym* LookupByName(const char* symbol_name) const;
27 const ELF::Sym* LookupById(size_t symbol_id) const {
31 const ELF::Sym* LookupByAddress(void* address, size_t load_bias) const;
39 const ELF::Sym* sym = LookupById(symbol_id);
46 const ELF::Sym* sym = LookupByName(symbol_name);
63 const ELF::Sym* symbol_table() const { return symbol_table_; }
67 const ELF::Sym* symbol_table_;
69 ELF::Word* hash_bucket_;
71 ELF
[all...]
H A Dcrazy_linker_elf_view.cpp15 bool ElfView::InitUnmapped(ELF::Addr load_address,
16 const ELF::Phdr* phdr,
20 ELF::Addr min_vaddr = 0;
44 const ELF::Phdr* phdr0 = NULL;
48 const ELF::Phdr* entry = &phdr[n];
56 // is 0, it starts with the ELF header, and we can trivially find the
60 const ELF::Phdr* entry = &phdr[n];
63 ELF::Addr elf_addr = load_bias_ + entry->p_vaddr;
64 const ELF::Ehdr* ehdr = reinterpret_cast<const ELF
[all...]
/external/llvm/include/llvm/MC/
H A DMCELFSymbolFlags.h1 //===- MCELFSymbolFlags.h - ELF Symbol Flags ----------------*- C++ -*-===//
10 // This file declares the SymbolFlags used for the ELF target.
17 #include "llvm/Support/ELF.h"
31 ELF_STB_Local = (ELF::STB_LOCAL << ELF_STB_Shift),
32 ELF_STB_Global = (ELF::STB_GLOBAL << ELF_STB_Shift),
33 ELF_STB_Weak = (ELF::STB_WEAK << ELF_STB_Shift),
34 ELF_STB_Loproc = (ELF::STB_LOPROC << ELF_STB_Shift),
35 ELF_STB_Hiproc = (ELF::STB_HIPROC << ELF_STB_Shift),
37 ELF_STT_Notype = (ELF::STT_NOTYPE << ELF_STT_Shift),
38 ELF_STT_Object = (ELF
[all...]
/external/llvm/lib/Target/Sparc/MCTargetDesc/
H A DSparcELFObjectWriter.cpp1 //===-- SparcELFObjectWriter.cpp - Sparc ELF Writer -----------------------===//
26 Is64Bit ? ELF::EM_SPARCV9 : ELF::EM_SPARC,
42 return ELF::R_SPARC_DISP32;
49 case FK_Data_1: return ELF::R_SPARC_DISP8;
50 case FK_Data_2: return ELF::R_SPARC_DISP16;
51 case FK_Data_4: return ELF::R_SPARC_DISP32;
52 case FK_Data_8: return ELF::R_SPARC_DISP64;
53 case Sparc::fixup_sparc_call30: return ELF::R_SPARC_WDISP30;
54 case Sparc::fixup_sparc_br22: return ELF
[all...]
/external/llvm/lib/Target/AArch64/MCTargetDesc/
H A DAArch64ELFObjectWriter.cpp1 //===-- 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,
65 return ELF::R_AARCH64_PREL16;
67 return ELF::R_AARCH64_PREL32;
69 return ELF::R_AARCH64_PREL64;
72 return ELF::R_AARCH64_ADR_PREL_LO21;
75 return ELF::R_AARCH64_ADR_PREL_PG_HI21;
77 return ELF::R_AARCH64_ADR_GOT_PAGE;
79 return ELF
[all...]
/external/llvm/lib/Target/Mips/MCTargetDesc/
H A DMipsELFObjectWriter.cpp1 //===-- MipsELFObjectWriter.cpp - Mips ELF Writer -------------------------===//
39 : MCELFObjectTargetWriter(_is64Bit, OSABI, ELF::EM_MIPS,
49 unsigned Type = (unsigned)ELF::R_MIPS_NONE;
56 Type = ELF::R_MIPS_32;
59 Type = ELF::R_MIPS_64;
63 Type = setRType((unsigned)ELF::R_MIPS_GPREL32, Type);
64 Type = setRType2((unsigned)ELF::R_MIPS_64, Type);
65 Type = setRType3((unsigned)ELF::R_MIPS_NONE, Type);
68 Type = ELF::R_MIPS_GPREL32;
71 Type = ELF
[all...]
/external/llvm/lib/Target/PowerPC/MCTargetDesc/
H A DPPCELFObjectWriter.cpp1 //===-- PPCELFObjectWriter.cpp - PPC ELF Writer ---------------------------===//
38 Is64Bit ? ELF::EM_PPC64 : ELF::EM_PPC,
86 Type = ELF::R_PPC_REL24;
90 Type = ELF::R_PPC_REL14;
96 Type = ELF::R_PPC_REL16;
99 Type = ELF::R_PPC_REL16_LO;
102 Type = ELF::R_PPC_REL16_HI;
105 Type = ELF::R_PPC_REL16_HA;
111 Type = ELF
[all...]
/external/chromium_org/tools/relocation_packer/src/
H A Ddelta_encoder.h8 // .rel.dyn or .rela.dyn sections) in libchrome<version>.so, and the ELF
68 static void Encode(const std::vector<ELF::Rela>& relocations,
69 std::vector<ELF::Sxword>* packed);
74 static void Decode(const std::vector<ELF::Sxword>& packed,
75 std::vector<ELF::Rela>* relocations);
H A Drun_length_encoder.h8 // .rel.dyn or .rela.dyn sections) in libchrome<version>.so, and the ELF
69 static void Encode(const std::vector<ELF::Rel>& relocations,
70 std::vector<ELF::Xword>* packed);
75 static void Decode(const std::vector<ELF::Xword>& packed,
76 std::vector<ELF::Rel>* relocations);
H A Ddelta_encoder.cc17 void RelocationDeltaCodec::Encode(const std::vector<ELF::Rela>& relocations,
18 std::vector<ELF::Sxword>* packed) {
26 ELF::Addr offset = 0;
27 ELF::Sxword addend = 0;
30 const ELF::Rela* relocation = &relocations[i];
31 CHECK(ELF_R_TYPE(relocation->r_info) == ELF::kRelativeRelocationCode);
42 void RelocationDeltaCodec::Decode(const std::vector<ELF::Sxword>& packed,
43 std::vector<ELF::Rela>* relocations) {
53 ELF::Addr offset = 0;
54 ELF
[all...]
H A Drun_length_encoder.cc18 void GetDeltas(const std::vector<ELF::Rel>& relocations,
19 std::vector<ELF::Addr>* deltas) {
23 const ELF::Rel* first = &relocations[i];
24 CHECK(ELF_R_TYPE(first->r_info) == ELF::kRelativeRelocationCode);
26 const ELF::Rel* second = &relocations[i + 1];
27 CHECK(ELF_R_TYPE(second->r_info) == ELF::kRelativeRelocationCode);
39 void Condense(const std::vector<ELF::Addr>& deltas,
40 std::vector<ELF::Xword>* packed) {
43 ELF::Addr current = deltas[0];
47 const ELF
[all...]
H A Dpacker.h62 static void PackRelativeRelocations(const std::vector<ELF::Rel>& relocations,
64 static void PackRelativeRelocations(const std::vector<ELF::Rela>& relocations,
71 std::vector<ELF::Rel>* relocations);
73 std::vector<ELF::Rela>* relocations);
H A Dsleb128.cc25 void Sleb128Encoder::Enqueue(ELF::Sxword value) {
37 value |= -(static_cast<ELF::Sxword>(1) << (size - 7));
50 void Sleb128Encoder::EnqueueAll(const std::vector<ELF::Sxword>& values) {
67 ELF::Sxword Sleb128Decoder::Dequeue() {
68 ELF::Sxword value = 0;
77 value |= (static_cast<ELF::Sxword>(byte & 127) << shift);
84 value |= -(static_cast<ELF::Sxword>(1) << shift);
90 void Sleb128Decoder::DequeueAll(std::vector<ELF::Sxword>* values) {
/external/llvm/lib/MC/
H A DMCELF.cpp1 //===- lib/MC/MCELF.cpp - MC ELF ------------------------------------------===//
10 // This file implements ELF object file writer information.
18 #include "llvm/Support/ELF.h"
23 assert(Binding == ELF::STB_LOCAL || Binding == ELF::STB_GLOBAL ||
24 Binding == ELF::STB_WEAK);
31 assert(Binding == ELF::STB_LOCAL || Binding == ELF::STB_GLOBAL ||
32 Binding == ELF::STB_WEAK);
37 assert(Type == ELF
[all...]
H A DMCSectionELF.cpp1 //===- lib/MC/MCSectionELF.cpp - ELF Code Section Representation ----------===//
15 #include "llvm/Support/ELF.h"
75 !(Flags & ELF::SHF_MERGE)) {
76 if (Flags & ELF::SHF_ALLOC)
78 if (Flags & ELF::SHF_EXECINSTR)
80 if (Flags & ELF::SHF_WRITE)
82 if (Flags & ELF::SHF_EXCLUDE)
84 if (Flags & ELF::SHF_TLS)
91 if (Flags & ELF::SHF_ALLOC)
93 if (Flags & ELF
[all...]
/external/llvm/tools/llvm-readobj/
H A DELFDumper.cpp1 //===-- ELFDumper.cpp - ELF-specific dumper ---------------------*- C++ -*-===//
11 /// \brief This file implements the ELF-specific dumper for llvm-readobj.
33 using namespace ELF;
174 { "None", ELF::ELFCLASSNONE },
175 { "32-bit", ELF::ELFCLASS32 },
176 { "64-bit", ELF::ELFCLASS64 },
180 { "None", ELF::ELFDATANONE },
181 { "LittleEndian", ELF::ELFDATA2LSB },
182 { "BigEndian", ELF::ELFDATA2MSB },
186 { "None", ELF
[all...]
/external/llvm/lib/Target/ARM/MCTargetDesc/
H A DARMELFObjectWriter.cpp1 //===-- ARMELFObjectWriter.cpp - ARM ELF Writer ---------------------------===//
46 ELF::EM_ARM,
59 case ELF::R_ARM_PREL31:
60 case ELF::R_ARM_ABS32:
87 Type = ELF::R_ARM_REL32;
92 Type = ELF::R_ARM_TLS_IE32;
95 Type = ELF::R_ARM_GOT_PREL;
103 Type = ELF::R_ARM_PLT32;
106 Type = ELF::R_ARM_TLS_CALL;
109 Type = ELF
[all...]
/external/llvm/lib/Target/XCore/
H A DXCoreTargetObjectFile.cpp15 #include "llvm/Support/ELF.h"
25 Ctx.getELFSection(".dp.bss", ELF::SHT_NOBITS,
26 ELF::SHF_ALLOC | ELF::SHF_WRITE |
27 ELF::XCORE_SHF_DP_SECTION,
30 Ctx.getELFSection(".dp.bss.large", ELF::SHT_NOBITS,
31 ELF::SHF_ALLOC | ELF::SHF_WRITE |
32 ELF::XCORE_SHF_DP_SECTION,
35 Ctx.getELFSection(".dp.data", ELF
[all...]
/external/llvm/lib/Target/SystemZ/MCTargetDesc/
H A DSystemZMCObjectWriter.cpp1 //===-- SystemZMCObjectWriter.cpp - SystemZ ELF writer --------------------===//
33 : MCELFObjectTargetWriter(/*Is64Bit=*/true, OSABI, ELF::EM_S390,
42 case FK_Data_1: return ELF::R_390_8;
43 case FK_Data_2: return ELF::R_390_16;
44 case FK_Data_4: return ELF::R_390_32;
45 case FK_Data_8: return ELF::R_390_64;
53 case FK_Data_2: return ELF::R_390_PC16;
54 case FK_Data_4: return ELF::R_390_PC32;
55 case FK_Data_8: return ELF::R_390_PC64;
56 case SystemZ::FK_390_PC16DBL: return ELF
[all...]
/external/llvm/lib/Target/X86/MCTargetDesc/
H A DX86ELFObjectWriter.cpp1 //===-- X86ELFObjectWriter.cpp - X86 ELF Writer ---------------------------===//
15 #include "llvm/Support/ELF.h"
36 /*HasRelocationAddend*/ EMachine != ELF::EM_386) {}
48 if (getEMachine() == ELF::EM_X86_64) {
53 case FK_Data_8: Type = ELF::R_X86_64_PC64; break;
54 case FK_Data_4: Type = ELF::R_X86_64_PC32; break;
55 case FK_Data_2: Type = ELF::R_X86_64_PC16; break;
56 case FK_Data_1: Type = ELF::R_X86_64_PC8; break;
60 Type = ELF::R_X86_64_PC64;
70 Type = ELF
[all...]

Completed in 4608 milliseconds

12345678