Issue 357: New Linux file_id code doesn't persist across strip. r=agl,nealsid at http://breakpad.appspot.com/49008

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@461 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
ted.mielczarek
2009-12-23 17:09:27 +00:00
parent 1adb184d42
commit 0a5fc5d663
9 changed files with 283 additions and 36 deletions

View File

@@ -49,10 +49,16 @@ class FileID {
// Load the identifier for the elf file path specified in the constructor into
// |identifier|. Return false if the identifier could not be created for the
// file.
// The current implementation will XOR the first page of data to generate an
// identifier.
// The current implementation will XOR the first 4096 bytes of the
// .text section to generate an identifier.
bool ElfFileIdentifier(uint8_t identifier[kMDGUIDSize]);
// Load the identifier for the elf file mapped into memory at |base| into
// |identifier|. Return false if the identifier could not be created for the
// file.
static bool ElfFileIdentifierFromMappedFile(void* base,
uint8_t identifier[kMDGUIDSize]);
// Convert the |identifier| data to a NULL terminated string. The string will
// be formatted as a UUID (e.g., 22F065BB-FC9C-49F7-80FE-26A7CEBD7BCE).
// The |buffer| should be at least 37 bytes long to receive all of the data