aboutsummaryrefslogtreecommitdiff
path: root/ltrace-elf.h
diff options
context:
space:
mode:
authorPetr Machata <pmachata@redhat.com>2013-02-05 01:48:54 +0100
committerPetr Machata <pmachata@redhat.com>2013-03-12 00:08:52 +0100
commit3c636fb789a29cac0c8f7f0982fb17afeee489dc (patch)
tree723dcb86ad18e7c2d46cc5ea0929c74c4069b6bc /ltrace-elf.h
parent99b19eb1bb736d7066026894aa69e70de8a03094 (diff)
downloadltrace-3c636fb789a29cac0c8f7f0982fb17afeee489dc.tar.gz
Add elf_read_u8
Diffstat (limited to 'ltrace-elf.h')
-rw-r--r--ltrace-elf.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/ltrace-elf.h b/ltrace-elf.h
index ab599eb..a50ad8a 100644
--- a/ltrace-elf.h
+++ b/ltrace-elf.h
@@ -108,9 +108,10 @@ int elf_get_section_type(struct ltelf *lte, GElf_Word type,
int elf_get_section_named(struct ltelf *lte, const char *name,
Elf_Scn **tgt_sec, GElf_Shdr *tgt_shdr);
-/* Read, respectively, 2, 4, or 8 bytes from Elf data at given OFFSET,
- * and store it in *RETP. Returns 0 on success or a negative value if
- * there's not enough data. */
+/* Read, respectively, 1, 2, 4, or 8 bytes from Elf data at given
+ * OFFSET, and store it in *RETP. Returns 0 on success or a negative
+ * value if there's not enough data. */
+int elf_read_u8(Elf_Data *data, GElf_Xword offset, uint8_t *retp);
int elf_read_u16(Elf_Data *data, GElf_Xword offset, uint16_t *retp);
int elf_read_u32(Elf_Data *data, GElf_Xword offset, uint32_t *retp);
int elf_read_u64(Elf_Data *data, GElf_Xword offset, uint64_t *retp);