aboutsummaryrefslogtreecommitdiff
path: root/src/common/linux/elfutils.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/linux/elfutils.h')
-rw-r--r--src/common/linux/elfutils.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/common/linux/elfutils.h b/src/common/linux/elfutils.h
index 748da988..fe12e251 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