mirror of
https://git.suyu.dev/suyu/breakpad.git
synced 2026-01-09 07:58:24 +01:00
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
This commit is contained in:
parent
3a8617eb8c
commit
6dc56cca44
4 changed files with 63 additions and 27 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue