diff options
author | ted.mielczarek@gmail.com <ted.mielczarek@gmail.com@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2013-04-04 16:24:44 +0000 |
---|---|---|
committer | ted.mielczarek@gmail.com <ted.mielczarek@gmail.com@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2013-04-04 16:24:44 +0000 |
commit | 6dc56cca4401eacf1efbb0bdaf71ca85863c7ca0 (patch) | |
tree | b08f5180248b6f2ab6752d81e33085d568c8846c /src/common/linux/synth_elf.h | |
parent | Refactor BasicElf synth_elf unitest (diff) | |
download | breakpad-6dc56cca4401eacf1efbb0bdaf71ca85863c7ca0.tar.xz |
Support generic Elf notes, with unit tests
A=Mike Hommey <mh@glandium.org>
R=ted at https://breakpad.appspot.com/546002/
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1142 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/common/linux/synth_elf.h')
-rw-r--r-- | src/common/linux/synth_elf.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/common/linux/synth_elf.h b/src/common/linux/synth_elf.h index 9a6c0316..330ceae8 100644 --- a/src/common/linux/synth_elf.h +++ b/src/common/linux/synth_elf.h @@ -177,13 +177,16 @@ class SymbolTable : public Section { StringTable& table_; }; -// A class to build GNU Build ID note sections -class BuildIDNote : public Section { +// A class for note sections +class Notes : public Section { public: - BuildIDNote(const uint8_t* id_bytes, size_t id_size, Endianness endianness); + Notes(Endianness endianness) + : Section(endianness) { + } - // Append a new Build ID note section to |elf|. - static void AppendSection(ELF& elf, const uint8_t* id_bytes, size_t id_size); + // Add a note. + void AddNote(int type, const string &name, const uint8_t* desc_bytes, + size_t desc_size); }; } // namespace synth_elf |