Lines Matching refs:elf
25 #include <unwindstack/Elf.h>
42 // - There is an elf file embedded in a file.
43 // - The whole file is an elf file, and the offset needs to be saved.
46 // a valid elf, then reinit as if the whole file is an elf file.
47 // If the offset is a valid elf, then determine the size of the map
49 // only maps in a portion of the original elf, and never the symbol
58 Elf::GetInfo(memory.get(), &valid, &max_size);
60 // Init as if the whole file is an elf.
108 Elf* MapInfo::GetElf(const std::shared_ptr<Memory>& process_memory, bool init_gnu_debugdata) {
109 // Make sure no other thread is trying to add the elf to this map.
112 if (elf.get() != nullptr) {
113 return elf.get();
117 if (Elf::CachingEnabled() && !name.empty()) {
118 Elf::CacheLock();
120 if (Elf::CacheGet(this)) {
121 Elf::CacheUnlock();
122 return elf.get();
128 if (Elf::CacheAfterCreateMemory(this)) {
130 Elf::CacheUnlock();
131 return elf.get();
134 elf.reset(new Elf(memory));
135 // If the init fails, keep the elf around as an invalid object so we
137 elf->Init(init_gnu_debugdata);
140 Elf::CacheAdd(this);
141 Elf::CacheUnlock();
143 return elf.get();
153 // Make sure no other thread is trying to add the elf to this map.
155 if (elf != nullptr) {
156 if (elf->valid()) {
157 cur_load_bias = elf->GetLoadBias();
168 // elf data to get the load bias.
170 cur_load_bias = Elf::GetLoadBias(memory.get());