Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(243)

Side by Side Diff: third_party/android_crazy_linker/src/src/crazy_linker_elf_symbols.cpp

Issue 328153002: Roll to android/platform/ndk/681f1b744aec1b0888f4c7a68165720db9670300 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fork
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "crazy_linker_elf_symbols.h" 5 #include "crazy_linker_elf_symbols.h"
6 6
7 #include "crazy_linker_debug.h" 7 #include "crazy_linker_debug.h"
8 #include "crazy_linker_elf_view.h" 8 #include "crazy_linker_elf_view.h"
9 9
10 namespace crazy { 10 namespace crazy {
(...skipping 17 matching lines...) Expand all
28 28
29 bool ElfSymbols::Init(const ElfView* view) { 29 bool ElfSymbols::Init(const ElfView* view) {
30 LOG("%s: Parsing dynamic table\n", __FUNCTION__); 30 LOG("%s: Parsing dynamic table\n", __FUNCTION__);
31 ElfView::DynamicIterator dyn(view); 31 ElfView::DynamicIterator dyn(view);
32 for (; dyn.HasNext(); dyn.GetNext()) { 32 for (; dyn.HasNext(); dyn.GetNext()) {
33 uintptr_t dyn_addr = dyn.GetAddress(view->load_bias()); 33 uintptr_t dyn_addr = dyn.GetAddress(view->load_bias());
34 switch (dyn.GetTag()) { 34 switch (dyn.GetTag()) {
35 case DT_HASH: 35 case DT_HASH:
36 LOG(" DT_HASH addr=%p\n", dyn_addr); 36 LOG(" DT_HASH addr=%p\n", dyn_addr);
37 { 37 {
38 ELF::Addr* data = reinterpret_cast<uintptr_t*>(dyn_addr); 38 ELF::Word* data = reinterpret_cast<ELF::Word*>(dyn_addr);
39 hash_bucket_size_ = data[0]; 39 hash_bucket_size_ = data[0];
40 hash_chain_size_ = data[1]; 40 hash_chain_size_ = data[1];
41 hash_bucket_ = data + 2; 41 hash_bucket_ = data + 2;
42 hash_chain_ = data + 2 + hash_bucket_size_; 42 hash_chain_ = data + 2 + hash_bucket_size_;
43 } 43 }
44 break; 44 break;
45 case DT_STRTAB: 45 case DT_STRTAB:
46 LOG(" DT_STRTAB addr=%p\n", dyn_addr); 46 LOG(" DT_STRTAB addr=%p\n", dyn_addr);
47 string_table_ = reinterpret_cast<const char*>(dyn_addr); 47 string_table_ = reinterpret_cast<const char*>(dyn_addr);
48 break; 48 break;
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 case STB_WEAK: 137 case STB_WEAK:
138 return symbol; 138 return symbol;
139 default: 139 default:
140 ; 140 ;
141 } 141 }
142 } 142 }
143 return NULL; 143 return NULL;
144 } 144 }
145 145
146 } // namespace crazy 146 } // namespace crazy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698