OLD | NEW |
1 // Copyright 2005 Google Inc. All Rights Reserved. | 1 // Copyright 2005 Google Inc. All Rights Reserved. |
2 // Author: chatham@google.com (Andrew Chatham) | 2 // Author: chatham@google.com (Andrew Chatham) |
3 // Author: satorux@google.com (Satoru Takabayashi) | 3 // Author: satorux@google.com (Satoru Takabayashi) |
4 // | 4 // |
5 // Code for reading in ELF files. | 5 // Code for reading in ELF files. |
6 // | 6 // |
7 // For information on the ELF format, see | 7 // For information on the ELF format, see |
8 // http://www.x86.org/ftp/manuals/tools/elf.pdf | 8 // http://www.x86.org/ftp/manuals/tools/elf.pdf |
9 // | 9 // |
10 // I also liked: | 10 // I also liked: |
(...skipping 23 matching lines...) Expand all Loading... |
34 #include <sys/stat.h> | 34 #include <sys/stat.h> |
35 #include <sys/mman.h> | 35 #include <sys/mman.h> |
36 #include <unistd.h> | 36 #include <unistd.h> |
37 #include <fcntl.h> | 37 #include <fcntl.h> |
38 #include <string.h> | 38 #include <string.h> |
39 | 39 |
40 #include <algorithm> | 40 #include <algorithm> |
41 #include <map> | 41 #include <map> |
42 #include <string> | 42 #include <string> |
43 #include <vector> | 43 #include <vector> |
44 #include "zlib.h" | 44 // TODO(saugustine): Add support for compressed debug. |
| 45 // Also need to add configure tests for zlib. |
| 46 //#include "zlib.h" |
45 | 47 |
46 #include "third_party/musl/include/elf.h" | 48 #include "third_party/musl/include/elf.h" |
47 #include "elf_reader.h" | 49 #include "elf_reader.h" |
48 //#include "using_std_string.h" | 50 //#include "using_std_string.h" |
49 // EM_AARCH64 is not defined by elf.h of GRTE v3 on x86. | 51 // EM_AARCH64 is not defined by elf.h of GRTE v3 on x86. |
50 // TODO(dougkwan): Remove this when v17 is retired. | 52 // TODO(dougkwan): Remove this when v17 is retired. |
51 #if !defined(EM_AARCH64) | 53 #if !defined(EM_AARCH64) |
52 #define EM_AARCH64 183 /* ARM AARCH64 */ | 54 #define EM_AARCH64 183 /* ARM AARCH64 */ |
53 #endif | 55 #endif |
54 | 56 |
(...skipping 1207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1262 } | 1264 } |
1263 | 1265 |
1264 bool ElfReader::IsNonStrippedELFBinary(const string &path) { | 1266 bool ElfReader::IsNonStrippedELFBinary(const string &path) { |
1265 return IsNonStrippedELFBinaryHelper(path, false); | 1267 return IsNonStrippedELFBinaryHelper(path, false); |
1266 } | 1268 } |
1267 | 1269 |
1268 bool ElfReader::IsNonDebugStrippedELFBinary(const string &path) { | 1270 bool ElfReader::IsNonDebugStrippedELFBinary(const string &path) { |
1269 return IsNonStrippedELFBinaryHelper(path, true); | 1271 return IsNonStrippedELFBinaryHelper(path, true); |
1270 } | 1272 } |
1271 } // namespace dwarf2reader | 1273 } // namespace dwarf2reader |
OLD | NEW |