Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(24)

Unified Diff: src/common/linux/elfutils.h

Issue 544003: Try to find a build-id through PT_NOTE program headers (Closed)
Patch Set: With comment Created 12 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/common/linux/elfutils.cc ('k') | src/common/linux/file_id.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/common/linux/elfutils.h
diff --git a/src/common/linux/elfutils.h b/src/common/linux/elfutils.h
index 748da988dceaebdca6461b21960eb7f42dfbe71c..fe12e2514abf4c78ac5bbbeaecc95889c1b42b51 100644
--- a/src/common/linux/elfutils.h
+++ b/src/common/linux/elfutils.h
@@ -93,6 +93,17 @@ FindElfSectionByName(const char* name,
const char* names_end,
int nsection);
+// Attempt to find the first segment of type |segment_type| in the ELF
+// binary data at |elf_mapped_base|. On success, returns true and sets
+// |*segment_start| to point to the start of the segment data, and
+// and |*segment_size| to the size of the segment's data. If |elfclass|
+// is not NULL, set |*elfclass| to the ELF file class.
+bool FindElfSegment(const void *elf_mapped_base,
+ uint32_t segment_type,
+ const void **segment_start,
+ int *segment_size,
+ int *elfclass);
+
// Convert an offset from an Elf header into a pointer to the mapped
// address in the current process. Takes an extra template parameter
// to specify the return type to avoid having to dynamic_cast the
« no previous file with comments | « src/common/linux/elfutils.cc ('k') | src/common/linux/file_id.cc » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld 1004:630ec63f810e-tainted