summaryrefslogtreecommitdiff
path: root/libelf/elf_data.c
diff options
context:
space:
mode:
Diffstat (limited to 'libelf/elf_data.c')
-rw-r--r--libelf/elf_data.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libelf/elf_data.c b/libelf/elf_data.c
index d494eda2de3f..bab70d003cee 100644
--- a/libelf/elf_data.c
+++ b/libelf/elf_data.c
@@ -32,7 +32,7 @@
#include "_libelf.h"
-ELFTC_VCSID("$Id: elf_data.c 3466 2016-05-11 18:35:44Z emaste $");
+ELFTC_VCSID("$Id: elf_data.c 3632 2018-10-10 21:12:43Z jkoshy $");
Elf_Data *
elf_getdata(Elf_Scn *s, Elf_Data *ed)
@@ -43,8 +43,7 @@ elf_getdata(Elf_Scn *s, Elf_Data *ed)
size_t count, fsz, msz;
struct _Libelf_Data *d;
uint64_t sh_align, sh_offset, sh_size;
- int (*xlate)(unsigned char *_d, size_t _dsz, unsigned char *_s,
- size_t _c, int _swap);
+ _libelf_translator_function *xlate;
d = (struct _Libelf_Data *) ed;
@@ -151,7 +150,8 @@ elf_getdata(Elf_Scn *s, Elf_Data *ed)
d->d_flags |= LIBELF_F_DATA_MALLOCED;
- xlate = _libelf_get_translator(elftype, ELF_TOMEMORY, elfclass);
+ xlate = _libelf_get_translator(elftype, ELF_TOMEMORY, elfclass,
+ _libelf_elfmachine(e));
if (!(*xlate)(d->d_data.d_buf, (size_t) d->d_data.d_size,
e->e_rawfile + sh_offset, count,
e->e_byteorder != LIBELF_PRIVATE(byteorder))) {