aboutsummaryrefslogtreecommitdiff
path: root/src/common/linux/dump_symbols.cc
diff options
context:
space:
mode:
authorjimblandy <jimblandy@4c0a9323-5329-0410-9bdc-e9ce6186880e>2010-07-17 05:08:04 +0000
committerjimblandy <jimblandy@4c0a9323-5329-0410-9bdc-e9ce6186880e>2010-07-17 05:08:04 +0000
commitc5f5e0ae653c4acbc34325283a6d56475dd56f00 (patch)
treed95f72bd551c6f5c7d4ffeec5d530c52baad6238 /src/common/linux/dump_symbols.cc
parentAdd functionality to read the .gnu_debuglink section and load symbols from a ... (diff)
downloadbreakpad-c5f5e0ae653c4acbc34325283a6d56475dd56f00.tar.xz
Breakpad Linux dumper: Don't map file into memory a second time just to compute file ID
At present, the Linux symbol dumper maps the ELF file into memory to examine the debugging information it contains, but then also calls google_breakpad::FileID::ElfFileIdentifier, which maps the ELF file into memory again. Some of our object files are large; Mozilla's libxul.so is 1.1GiB. Trying to map such files twice can interfere with tools like valgrind that map themselves into high addresses (in an attempt to stay out of the way of ordinary programs). The FileID class has another method, ElfFileIdentifierFromMappedFile, that operates on an already-loaded image of the file; use that instead. a=jimblandy, r=thestig git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@625 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/common/linux/dump_symbols.cc')
-rw-r--r--src/common/linux/dump_symbols.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/linux/dump_symbols.cc b/src/common/linux/dump_symbols.cc
index b4e0ea3a..65e577c8 100644
--- a/src/common/linux/dump_symbols.cc
+++ b/src/common/linux/dump_symbols.cc
@@ -685,7 +685,7 @@ bool WriteSymbolFile(const std::string &obj_file,
unsigned char identifier[16];
google_breakpad::FileID file_id(obj_file.c_str());
- if (!file_id.ElfFileIdentifier(identifier)) {
+ if (!file_id.ElfFileIdentifierFromMappedFile(elf_header, identifier)) {
fprintf(stderr, "%s: unable to generate file identifier\n",
obj_file.c_str());
return false;