summaryrefslogtreecommitdiffstats
path: root/rtemstoolkit/elftoolchain/libelf/elf_strptr.c
diff options
context:
space:
mode:
Diffstat (limited to 'rtemstoolkit/elftoolchain/libelf/elf_strptr.c')
-rw-r--r--rtemstoolkit/elftoolchain/libelf/elf_strptr.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/rtemstoolkit/elftoolchain/libelf/elf_strptr.c b/rtemstoolkit/elftoolchain/libelf/elf_strptr.c
index bfa39de..e2a6b28 100644
--- a/rtemstoolkit/elftoolchain/libelf/elf_strptr.c
+++ b/rtemstoolkit/elftoolchain/libelf/elf_strptr.c
@@ -24,12 +24,14 @@
* SUCH DAMAGE.
*/
+#include <sys/param.h>
+
#include <assert.h>
#include <gelf.h>
#include "_libelf.h"
-LIBELF_VCSID("$Id: elf_strptr.c 189 2008-07-20 10:38:08Z jkoshy $");
+ELFTC_VCSID("$Id: elf_strptr.c 2990 2014-03-17 09:56:58Z jkoshy $");
/*
* Convert an ELF section#,offset pair to a string pointer.
@@ -40,8 +42,8 @@ elf_strptr(Elf *e, size_t scndx, size_t offset)
{
Elf_Scn *s;
Elf_Data *d;
- size_t alignment, count;
GElf_Shdr shdr;
+ uint64_t alignment, count;
if (e == NULL || e->e_kind != ELF_K_ELF) {
LIBELF_SET_ERROR(ARGUMENT, 0);
@@ -88,7 +90,7 @@ elf_strptr(Elf *e, size_t scndx, size_t offset)
* account 'holes' in coverage of the section introduced
* by alignment requirements.
*/
- count = (size_t) 0; /* cumulative count of bytes seen */
+ count = (uint64_t) 0; /* cumulative count of bytes seen */
while ((d = elf_getdata(s, d)) != NULL && count <= offset) {
if (d->d_buf == NULL || d->d_size == 0)