summaryrefslogtreecommitdiff
path: root/src/format/elf
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2008-07-31 21:46:47 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2008-07-31 21:46:47 (GMT)
commit3786e818fdf8731dd6f310f0aaac75d431646160 (patch)
treea1dc1d1ed27c56d7ae2e361102fef7310a9b1a21 /src/format/elf
parent57758c2cd11938e3e4c6e45b983cee4c2269ff44 (diff)
Handled the virtual offset and fixed the operand-size overriding.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@11 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
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 *);