OLD | NEW |
1 // -*- mode: c++ -*- | 1 // -*- mode: c++ -*- |
2 | 2 |
3 // Copyright (c) 2011 Google Inc. All Rights Reserved. | 3 // Copyright (c) 2011 Google Inc. All Rights Reserved. |
4 // | 4 // |
5 // Redistribution and use in source and binary forms, with or without | 5 // Redistribution and use in source and binary forms, with or without |
6 // modification, are permitted provided that the following conditions are | 6 // modification, are permitted provided that the following conditions are |
7 // met: | 7 // met: |
8 // | 8 // |
9 // * Redistributions of source code must retain the above copyright | 9 // * Redistributions of source code must retain the above copyright |
10 // notice, this list of conditions and the following disclaimer. | 10 // notice, this list of conditions and the following disclaimer. |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 - string_section; | 148 - string_section; |
149 } | 149 } |
150 ByteBuffer strings(string_section, string_size); | 150 ByteBuffer strings(string_section, string_size); |
151 | 151 |
152 // The iterator walking the symbol table. | 152 // The iterator walking the symbol table. |
153 ELFSymbolIterator iterator(&symbols, big_endian, value_size); | 153 ELFSymbolIterator iterator(&symbols, big_endian, value_size); |
154 | 154 |
155 while(!iterator->at_end) { | 155 while(!iterator->at_end) { |
156 if (ELF32_ST_TYPE(iterator->info) == STT_FUNC && | 156 if (ELF32_ST_TYPE(iterator->info) == STT_FUNC && |
157 iterator->shndx != SHN_UNDEF) { | 157 iterator->shndx != SHN_UNDEF) { |
158 Module::Extern *ext = new Module::Extern; | 158 Module::Extern *ext = new Module::Extern(iterator->value); |
159 ext->name = SymbolString(iterator->name_offset, strings); | 159 ext->name = SymbolString(iterator->name_offset, strings); |
160 ext->address = iterator->value; | |
161 module->AddExtern(ext); | 160 module->AddExtern(ext); |
162 } | 161 } |
163 ++iterator; | 162 ++iterator; |
164 } | 163 } |
165 return true; | 164 return true; |
166 } | 165 } |
167 | 166 |
168 } // namespace google_breakpad | 167 } // namespace google_breakpad |
OLD | NEW |