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 |