Home
last modified time | relevance | path

Searched refs:ElfW (Results 1 – 22 of 22) sorted by relevance

/bionic/linker/
Dlinker_phdr.h50 ElfW(Addr) load_start() const { return reinterpret_cast<ElfW(Addr)>(load_start_); } in load_start()
52 ElfW(Addr) load_bias() const { return load_bias_; } in load_bias()
53 const ElfW(Phdr)* loaded_phdr() const { return loaded_phdr_; } in ElfW() function
54 const ElfW(Dyn)* dynamic() const { return dynamic_; } in ElfW() function
55 const char* get_string(ElfW(Word) index) const;
67 bool CheckPhdr(ElfW(Addr));
68 bool CheckFileRange(ElfW(Addr) offset, size_t size, size_t alignment);
77 ElfW(Ehdr) header_;
81 const ElfW(Phdr)* phdr_table_;
84 const ElfW(Shdr)* shdr_table_;
[all …]
Dlinker_phdr.cpp183 const char* ElfReader::get_string(ElfW(Word) index) const { in get_string()
264 if (header_.e_shentsize != sizeof(ElfW(Shdr))) { in VerifyElfHeader()
268 name_.c_str(), header_.e_shentsize, sizeof(ElfW(Shdr))); in VerifyElfHeader()
272 name_.c_str(), header_.e_shentsize, sizeof(ElfW(Shdr))); in VerifyElfHeader()
290 bool ElfReader::CheckFileRange(ElfW(Addr) offset, size_t size, size_t alignment) { in CheckFileRange()
313 if (phdr_num_ < 1 || phdr_num_ > 65536/sizeof(ElfW(Phdr))) { in ReadProgramHeaders()
319 size_t size = phdr_num_ * sizeof(ElfW(Phdr)); in ReadProgramHeaders()
320 if (!CheckFileRange(header_.e_phoff, size, alignof(ElfW(Phdr)))) { in ReadProgramHeaders()
333 phdr_table_ = static_cast<ElfW(Phdr)*>(phdr_fragment_.data()); in ReadProgramHeaders()
345 size_t size = shdr_num_ * sizeof(ElfW(Shdr)); in ReadSectionHeaders()
[all …]
Dlinker_soinfo.h95 const ElfW(Phdr)* phdr;
98 ElfW(Addr) unused0; // DO NOT USE, maintained for compatibility.
100 ElfW(Addr) base;
107 ElfW(Dyn)* dynamic;
119 ElfW(Sym)* symtab_;
129 ElfW(Addr)** plt_got_;
133 ElfW(Rela)* plt_rela_;
136 ElfW(Rela)* rela_;
139 ElfW(Rel)* plt_rel_;
142 ElfW(Rel)* rel_;
[all …]
Dlinker_main.cpp57 static ElfW(Addr) get_elf_exec_load_bias(const ElfW(Ehdr)* elf);
142 ElfW(Ehdr)* ehdr_vdso = reinterpret_cast<ElfW(Ehdr)*>(args.getauxval(AT_SYSINFO_EHDR)); in add_vdso()
149 si->phdr = reinterpret_cast<ElfW(Phdr)*>(reinterpret_cast<char*>(ehdr_vdso) + ehdr_vdso->e_phoff); in add_vdso()
151 si->base = reinterpret_cast<ElfW(Addr)>(ehdr_vdso); in add_vdso()
167 static void init_linker_info_for_gdb(ElfW(Addr) linker_base, char* linker_path) { in init_linker_info_for_gdb()
177 ElfW(Ehdr)* elf_hdr = reinterpret_cast<ElfW(Ehdr)*>(linker_base); in init_linker_info_for_gdb()
178 ElfW(Phdr)* phdr = reinterpret_cast<ElfW(Phdr)*>(linker_base + elf_hdr->e_phoff); in init_linker_info_for_gdb()
211 static ElfW(Addr) __linker_init_post_relocation(KernelArgumentBlock& args) {
292 si->phdr = reinterpret_cast<ElfW(Phdr)*>(args.getauxval(AT_PHDR));
304 si->load_bias = reinterpret_cast<ElfW(Addr)>(si->phdr) - si->phdr[i].p_vaddr;
[all …]
Dlinker_mips.cpp65 ElfW(Word) type = ELFW(R_TYPE)(rel->r_info); in relocate()
66 ElfW(Word) sym = ELFW(R_SYM)(rel->r_info); in relocate()
68 ElfW(Addr) reloc = static_cast<ElfW(Addr)>(rel->r_offset + load_bias); in relocate()
69 ElfW(Addr) sym_addr = 0; in relocate()
77 const ElfW(Sym)* s = nullptr; in relocate() local
122 *reinterpret_cast<ElfW(Addr)*>(reloc) += sym_addr; in relocate()
124 *reinterpret_cast<ElfW(Addr)*>(reloc) += load_bias; in relocate()
138 ElfW(Addr)** got = plt_got_; in mips_relocate_got()
149 got[g++] = reinterpret_cast<ElfW(Addr)*>(0xdeadbeef); in mips_relocate_got()
151 got[g++] = reinterpret_cast<ElfW(Addr)*>(0xdeadfeed); in mips_relocate_got()
[all …]
Dlinker_soinfo.cpp45 bool find_verdef_version_index(const soinfo* si, const version_info* vi, ElfW(Versym)* versym);
46 ElfW(Addr) call_ifunc_resolver(ElfW(Addr) resolver_addr);
94 const ElfW(Versym)* soinfo::get_versym(size_t n) const { in ElfW() function
102 ElfW(Addr) soinfo::get_verneed_ptr() const { in ElfW() function
118 ElfW(Addr) soinfo::get_verdef_ptr() const { in ElfW() function
136 const ElfW(Sym)** symbol) const { in find_symbol_by_name()
150 static bool is_symbol_global_and_defined(const soinfo* si, const ElfW(Sym)* s) { in is_symbol_global_and_defined()
162 static const ElfW(Versym) kVersymHiddenBit = 0x8000;
164 static inline bool is_versym_hidden(const ElfW(Versym)* versym) { in is_versym_hidden()
169 static inline bool check_symbol_version(const ElfW(Versym) verneed, in check_symbol_version()
[all …]
Dlinker.cpp401 const soinfo_list_t& local_group, const ElfW(Sym)** symbol) { in soinfo_do_lookup()
403 const ElfW(Sym)* s = nullptr; in soinfo_do_lookup() local
745 static const ElfW(Sym)* dlsym_handle_lookup(android_namespace_t* ns, in ElfW() function
751 const ElfW(Sym)* result = nullptr; in ElfW() local
780 static const ElfW(Sym)* dlsym_linear_lookup(android_namespace_t* ns,
789 static const ElfW(Sym)* dlsym_handle_lookup(soinfo* si, in ElfW() function
817 static const ElfW(Sym)* dlsym_linear_lookup(android_namespace_t* ns, in ElfW() function
838 const ElfW(Sym)* s = nullptr; in ElfW() local
883 ElfW(Addr) address = reinterpret_cast<ElfW(Addr)>(p); in find_containing_library()
1119 for (const ElfW(Dyn)* d = elf_reader.dynamic(); d->d_tag != DT_NULL; ++d) { in for_each_dt_needed() local
[all …]
Dlinker_globals.h59 constexpr ElfW(Versym) kVersymNotNeeded = 0;
60 constexpr ElfW(Versym) kVersymGlobal = 1;
Dlinker_reloc_iterators.h43 typedef ElfW(Rela) rel_t;
45 typedef ElfW(Rel) rel_t;
69 typedef ElfW(Rela) rel_t;
71 typedef ElfW(Rel) rel_t;
Dlinker.h77 const version_info* get_version_info(ElfW(Versym) source_symver) const;
81 void add_version_info(size_t source_index, ElfW(Word) elf_hash,
91 const soinfo_list_t& local_group, const ElfW(Sym)** symbol);
Ddlfcn.cpp274 static ElfW(Sym) g_libdl_symtab[] = {
Dlinker_cfi.cpp145 const ElfW(Sym) * sym; in soinfo_find_symbol() local
/bionic/libc/include/
Dlink.h40 #define ElfW(type) Elf64_ ## type macro
42 #define ElfW(type) Elf32_ ## type
46 ElfW(Addr) dlpi_addr;
48 const ElfW(Phdr)* dlpi_phdr;
49 ElfW(Half) dlpi_phnum;
65 ElfW(Addr) l_addr;
67 ElfW(Dyn)* l_ld;
76 ElfW(Addr) r_brk;
82 ElfW(Addr) r_ldbase;
/bionic/libc/bionic/
Dvdso.cpp58 ElfW(Ehdr)* vdso_ehdr = reinterpret_cast<ElfW(Ehdr)*>(vdso_ehdr_addr); in __libc_init_vdso()
65 ElfW(Shdr)* vdso_shdr = reinterpret_cast<ElfW(Shdr)*>(vdso_ehdr_addr + vdso_ehdr->e_shoff); in __libc_init_vdso()
68 symbol_count = vdso_shdr[i].sh_size / sizeof(ElfW(Sym)); in __libc_init_vdso()
76 ElfW(Addr) vdso_addr = 0; in __libc_init_vdso()
77 ElfW(Dyn)* vdso_dyn = nullptr; in __libc_init_vdso()
78 ElfW(Phdr)* vdso_phdr = reinterpret_cast<ElfW(Phdr)*>(vdso_ehdr_addr + vdso_ehdr->e_phoff); in __libc_init_vdso()
81 vdso_dyn = reinterpret_cast<ElfW(Dyn)*>(vdso_ehdr_addr + vdso_phdr[i].p_offset); in __libc_init_vdso()
92 ElfW(Sym)* symtab = nullptr; in __libc_init_vdso()
93 for (ElfW(Dyn)* d = vdso_dyn; d->d_tag != DT_NULL; ++d) { in __libc_init_vdso()
97 symtab = reinterpret_cast<ElfW(Sym)*>(vdso_addr + d->d_un.d_ptr); in __libc_init_vdso()
Ddl_iterate_phdr_static.cpp39 ElfW(Ehdr)* ehdr = reinterpret_cast<ElfW(Ehdr)*>(&__executable_start); in dl_iterate_phdr()
53 …exe_info.dlpi_phdr = reinterpret_cast<ElfW(Phdr)*>(reinterpret_cast<uintptr_t>(ehdr) + ehdr->e_pho… in dl_iterate_phdr()
64 ElfW(Ehdr)* ehdr_vdso = reinterpret_cast<ElfW(Ehdr)*>(getauxval(AT_SYSINFO_EHDR)); in dl_iterate_phdr()
73 …vdso_info.dlpi_phdr = reinterpret_cast<ElfW(Phdr)*>(reinterpret_cast<char*>(ehdr_vdso) + ehdr_vdso… in dl_iterate_phdr()
77 vdso_info.dlpi_addr = (ElfW(Addr)) ehdr_vdso - vdso_info.dlpi_phdr[i].p_vaddr; in dl_iterate_phdr()
Dlibc_init_static.cpp57 ElfW(Phdr)* phdr_start = reinterpret_cast<ElfW(Phdr)*>(getauxval(AT_PHDR)); in apply_gnu_relro()
60 for (ElfW(Phdr)* phdr = phdr_start; phdr < (phdr_start + phdr_ct); phdr++) { in apply_gnu_relro()
65 ElfW(Addr) seg_page_start = PAGE_START(phdr->p_vaddr); in apply_gnu_relro()
66 ElfW(Addr) seg_page_end = PAGE_END(phdr->p_vaddr + phdr->p_memsz); in apply_gnu_relro()
Dgetauxval.cpp36 __LIBC_HIDDEN__ ElfW(auxv_t)* __libc_auxv = NULL;
39 for (ElfW(auxv_t)* v = __libc_auxv; v->a_type != AT_NULL; ++v) { in getauxval()
Dlibc_init_common.cpp321 for (ElfW(auxv_t)* v = __libc_auxv; v->a_type != AT_NULL; ++v) { in __libc_init_AT_SECURE()
/bionic/libc/malloc_debug/
DMapData.cpp86 ElfW(Ehdr) ehdr; in read_loadbase()
87 if (!get_val<ElfW(Half)>(entry, addr + offsetof(ElfW(Ehdr), e_phnum), &ehdr.e_phnum)) { in read_loadbase()
90 if (!get_val<ElfW(Off)>(entry, addr + offsetof(ElfW(Ehdr), e_phoff), &ehdr.e_phoff)) { in read_loadbase()
95 ElfW(Phdr) phdr; in read_loadbase()
96 if (!get_val<ElfW(Word)>(entry, addr + offsetof(ElfW(Phdr), p_type), &phdr.p_type)) { in read_loadbase()
99 if (!get_val<ElfW(Off)>(entry, addr + offsetof(ElfW(Phdr), p_offset), &phdr.p_offset)) { in read_loadbase()
103 if (!get_val<ElfW(Addr)>(entry, addr + offsetof(ElfW(Phdr), p_vaddr), &phdr.p_vaddr)) { in read_loadbase()
/bionic/libc/private/
DKernelArgumentBlock.h49 auxv = reinterpret_cast<ElfW(auxv_t)*>(p); in KernelArgumentBlock()
55 for (ElfW(auxv_t)* v = auxv; v->a_type != AT_NULL; ++v) { in getauxval()
66 ElfW(auxv_t)* auxv;
Dbionic_auxv.h37 extern ElfW(auxv_t)* __libc_auxv;
/bionic/tests/
Dlink_test.cpp52 for (ElfW(Half) i = 0; i < info->dlpi_phnum; ++i) { in TEST()
53 const ElfW(Phdr)* phdr = reinterpret_cast<const ElfW(Phdr)*>(&info->dlpi_phdr[i]); in TEST() local
55 const ElfW(Ehdr)* ehdr = reinterpret_cast<const ElfW(Ehdr)*>(info->dlpi_addr + in TEST() local