aboutsummaryrefslogtreecommitdiff
path: root/src/common/linux/file_id_unittest.cc
diff options
context:
space:
mode:
authorted.mielczarek@gmail.com <ted.mielczarek@gmail.com@4c0a9323-5329-0410-9bdc-e9ce6186880e>2013-04-04 16:24:44 +0000
committerted.mielczarek@gmail.com <ted.mielczarek@gmail.com@4c0a9323-5329-0410-9bdc-e9ce6186880e>2013-04-04 16:24:44 +0000
commit6dc56cca4401eacf1efbb0bdaf71ca85863c7ca0 (patch)
treeb08f5180248b6f2ab6752d81e33085d568c8846c /src/common/linux/file_id_unittest.cc
parentRefactor BasicElf synth_elf unitest (diff)
downloadbreakpad-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/file_id_unittest.cc')
-rw-r--r--src/common/linux/file_id_unittest.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/common/linux/file_id_unittest.cc b/src/common/linux/file_id_unittest.cc
index 7c6550b1..e2e13747 100644
--- a/src/common/linux/file_id_unittest.cc
+++ b/src/common/linux/file_id_unittest.cc
@@ -47,8 +47,8 @@ using namespace google_breakpad;
using google_breakpad::ElfClass32;
using google_breakpad::ElfClass64;
using google_breakpad::SafeReadLink;
-using google_breakpad::synth_elf::BuildIDNote;
using google_breakpad::synth_elf::ELF;
+using google_breakpad::synth_elf::Notes;
using google_breakpad::test_assembler::kLittleEndian;
using google_breakpad::test_assembler::Section;
using ::testing::Types;
@@ -160,9 +160,10 @@ TYPED_TEST(FileIDTest, BuildID) {
Section text(kLittleEndian);
text.Append(4096, 0);
elf.AddSection(".text", text, SHT_PROGBITS);
- BuildIDNote::AppendSection(elf,
- kExpectedIdentifier,
- sizeof(kExpectedIdentifier));
+ Notes notes(kLittleEndian);
+ notes.AddNote(NT_GNU_BUILD_ID, "GNU", kExpectedIdentifier,
+ sizeof(kExpectedIdentifier));
+ elf.AddSection(".note.gnu.build-id", notes, SHT_NOTE);
elf.Finish();
this->GetElfContents(elf);