diff options
Diffstat (limited to 'rtemstoolkit/elftoolchain/libelf/libelf_xlate.c')
-rw-r--r-- | rtemstoolkit/elftoolchain/libelf/libelf_xlate.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/rtemstoolkit/elftoolchain/libelf/libelf_xlate.c b/rtemstoolkit/elftoolchain/libelf/libelf_xlate.c index ace4e09..6ee7624 100644 --- a/rtemstoolkit/elftoolchain/libelf/libelf_xlate.c +++ b/rtemstoolkit/elftoolchain/libelf/libelf_xlate.c @@ -24,14 +24,12 @@ * SUCH DAMAGE. */ -#include <sys/cdefs.h> - #include <assert.h> #include <libelf.h> #include "_libelf.h" -LIBELF_VCSID("$Id: libelf_xlate.c 316 2009-02-28 16:08:44Z jkoshy $"); +ELFTC_VCSID("$Id: libelf_xlate.c 3174 2015-03-27 17:13:41Z emaste $"); /* * Translate to/from the file representation of ELF objects. @@ -99,10 +97,10 @@ _libelf_xlate(Elf_Data *dst, const Elf_Data *src, unsigned int encoding, * buffer. */ if (direction == ELF_TOMEMORY) { - cnt = src->d_size / fsz; + cnt = (size_t) src->d_size / fsz; dsz = cnt * msz; } else { - cnt = src->d_size / msz; + cnt = (size_t) src->d_size / msz; dsz = cnt * fsz; } @@ -112,9 +110,9 @@ _libelf_xlate(Elf_Data *dst, const Elf_Data *src, unsigned int encoding, } sb = (uintptr_t) src->d_buf; - se = sb + src->d_size; + se = sb + (size_t) src->d_size; db = (uintptr_t) dst->d_buf; - de = db + dst->d_size; + de = db + (size_t) dst->d_size; /* * Check for overlapping buffers. Note that db == sb is |