summaryrefslogtreecommitdiff
path: root/src/format/elf
diff options
context:
space:
mode:
Diffstat (limited to 'src/format/elf')
-rw-r--r--src/format/elf/format_elf.c3
-rw-r--r--src/format/elf/format_elf.h2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/format/elf/format_elf.c b/src/format/elf/format_elf.c
index b70eef5..9f929fb 100644
--- a/src/format/elf/format_elf.c
+++ b/src/format/elf/format_elf.c
@@ -82,7 +82,7 @@ bool find_target_section(const uint8_t *content, const char *target, const char
-bool find_text_data(const uint8_t *content, off_t *offset, off_t *size)
+bool find_text_data(const uint8_t *content, off_t *offset, off_t *size, uint64_t *voffset)
{
bool result;
Elf32_Ehdr header;
@@ -111,6 +111,7 @@ bool find_text_data(const uint8_t *content, off_t *offset, off_t *size)
*offset = data.sh_offset;
*size = data.sh_size;
+ *voffset = data.sh_addr;
result = true;
diff --git a/src/format/elf/format_elf.h b/src/format/elf/format_elf.h
index feca71d..742d036 100644
--- a/src/format/elf/format_elf.h
+++ b/src/format/elf/format_elf.h
@@ -32,7 +32,7 @@
-bool find_text_data(const uint8_t *content, off_t *, off_t *);
+bool find_text_data(const uint8_t *content, off_t *, off_t *, uint64_t *);