| OLD | NEW |
| 1 // Copyright (c) 2008, Google Inc. | 1 // Copyright (c) 2008, Google Inc. |
| 2 // All rights reserved. | 2 // All rights reserved. |
| 3 // | 3 // |
| 4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
| 5 // modification, are permitted provided that the following conditions are | 5 // modification, are permitted provided that the following conditions are |
| 6 // met: | 6 // met: |
| 7 // | 7 // |
| 8 // * Redistributions of source code must retain the above copyright | 8 // * Redistributions of source code must retain the above copyright |
| 9 // notice, this list of conditions and the following disclaimer. | 9 // notice, this list of conditions and the following disclaimer. |
| 10 // * Redistributions in binary form must reproduce the above | 10 // * Redistributions in binary form must reproduce the above |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 // --- | 30 // --- |
| 31 // Author: Paul Pluzhnikov | 31 // Author: Paul Pluzhnikov |
| 32 // | 32 // |
| 33 // Allow dynamic symbol lookup in an in-memory Elf image. | 33 // Allow dynamic symbol lookup in an in-memory Elf image. |
| 34 // | 34 // |
| 35 | 35 |
| 36 #include "base/elf_mem_image.h" | 36 #include "base/elf_mem_image.h" |
| 37 | 37 |
| 38 #ifdef HAVE_ELF_MEM_IMAGE // defined in elf_mem_image.h | 38 #ifdef HAVE_ELF_MEM_IMAGE // defined in elf_mem_image.h |
| 39 | 39 |
| 40 #include <stddef.h> // for size_t, ptrdiff_t |
| 40 #include "base/logging.h" | 41 #include "base/logging.h" |
| 41 | 42 |
| 42 // From binutils/include/elf/common.h (this doesn't appear to be documented | 43 // From binutils/include/elf/common.h (this doesn't appear to be documented |
| 43 // anywhere else). | 44 // anywhere else). |
| 44 // | 45 // |
| 45 // /* This flag appears in a Versym structure. It means that the symbol | 46 // /* This flag appears in a Versym structure. It means that the symbol |
| 46 // is hidden, and is only visible with an explicit version number. | 47 // is hidden, and is only visible with an explicit version number. |
| 47 // This is a GNU extension. */ | 48 // This is a GNU extension. */ |
| 48 // #define VERSYM_HIDDEN 0x8000 | 49 // #define VERSYM_HIDDEN 0x8000 |
| 49 // | 50 // |
| (...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 423 } | 424 } |
| 424 info_.name = symbol_name; | 425 info_.name = symbol_name; |
| 425 info_.version = version_name; | 426 info_.version = version_name; |
| 426 info_.address = image->GetSymAddr(symbol); | 427 info_.address = image->GetSymAddr(symbol); |
| 427 info_.symbol = symbol; | 428 info_.symbol = symbol; |
| 428 } | 429 } |
| 429 | 430 |
| 430 } // namespace base | 431 } // namespace base |
| 431 | 432 |
| 432 #endif // HAVE_ELF_MEM_IMAGE | 433 #endif // HAVE_ELF_MEM_IMAGE |
| OLD | NEW |