OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #define XOPEN_SOURCE 500 | 5 #define XOPEN_SOURCE 500 |
6 #include <algorithm> | 6 #include <algorithm> |
7 #include <elf.h> | 7 #include <elf.h> |
8 #include <errno.h> | 8 #include <errno.h> |
9 #include <errno.h> | 9 #include <errno.h> |
10 #include <fcntl.h> | 10 #include <fcntl.h> |
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 if (!valid_) { | 311 if (!valid_) { |
312 return NULL; | 312 return NULL; |
313 } | 313 } |
314 SectionTable::const_iterator iter = section_table_.find(section); | 314 SectionTable::const_iterator iter = section_table_.find(section); |
315 if (iter == section_table_.end()) { | 315 if (iter == section_table_.end()) { |
316 return NULL; | 316 return NULL; |
317 } | 317 } |
318 return &iter->second.second; | 318 return &iter->second.second; |
319 } | 319 } |
320 | 320 |
321 const int Library::getSectionIndex(const string& section) { | 321 int Library::getSectionIndex(const string& section) { |
322 if (!valid_) { | 322 if (!valid_) { |
323 return -1; | 323 return -1; |
324 } | 324 } |
325 SectionTable::const_iterator iter = section_table_.find(section); | 325 SectionTable::const_iterator iter = section_table_.find(section); |
326 if (iter == section_table_.end()) { | 326 if (iter == section_table_.end()) { |
327 return -1; | 327 return -1; |
328 } | 328 } |
329 return iter->second.first; | 329 return iter->second.first; |
330 } | 330 } |
331 | 331 |
(...skipping 870 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1202 } | 1202 } |
1203 iter = symbols_.find("__kernel_rt_sigreturn"); | 1203 iter = symbols_.find("__kernel_rt_sigreturn"); |
1204 if (iter != symbols_.end() && iter->second.st_value) { | 1204 if (iter != symbols_.end() && iter->second.st_value) { |
1205 __kernel_rt_sigreturn = asr_offset_ + iter->second.st_value; | 1205 __kernel_rt_sigreturn = asr_offset_ + iter->second.st_value; |
1206 } | 1206 } |
1207 | 1207 |
1208 return true; | 1208 return true; |
1209 } | 1209 } |
1210 | 1210 |
1211 } // namespace | 1211 } // namespace |
OLD | NEW |