From 6dc56cca4401eacf1efbb0bdaf71ca85863c7ca0 Mon Sep 17 00:00:00 2001 From: "ted.mielczarek@gmail.com" Date: Thu, 4 Apr 2013 16:24:44 +0000 Subject: Support generic Elf notes, with unit tests A=Mike Hommey R=ted at https://breakpad.appspot.com/546002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1142 4c0a9323-5329-0410-9bdc-e9ce6186880e --- src/common/linux/synth_elf.h | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'src/common/linux/synth_elf.h') 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 -- cgit v1.2.1