Read .note.gnu.build-id.
This will be used by heapprofd to allow us to correlate build ids with
memory leaks in libraries and binaries.
Test: m
Test: host libunwindstack_test
Test: run unwind_info against my phone's libc.so (32/64) and compare
to readelf Build ID output.
Bug: 120186412
Change-Id: I3cefd6cce9a8733509bf35b7175eb0f967783477
diff --git a/libunwindstack/Elf.cpp b/libunwindstack/Elf.cpp
index 4d72ead..5b586a2 100644
--- a/libunwindstack/Elf.cpp
+++ b/libunwindstack/Elf.cpp
@@ -140,6 +140,10 @@
return true;
}
+bool Elf::GetBuildID(std::string* build_id) {
+ return valid_ && interface_->GetBuildID(build_id);
+}
+
void Elf::GetLastError(ErrorData* data) {
if (valid_) {
*data = interface_->last_error();