summaryrefslogtreecommitdiffstats
path: root/libelf/elf_getaroff.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>2008-01-21 01:39:56 +0000
committerRoland McGrath <roland@redhat.com>2008-01-21 01:39:56 +0000
commit51b3032ea91e5f7e39ff2a60e26ec06e9a17cbfe (patch)
tree9d0ed8fa6b3ab3f150341495fec6817e30fa9183 /libelf/elf_getaroff.c
parentd9488292be8c78615163eb4733e105143cb7b7ba (diff)
propagate from branch 'com.redhat.elfutils' (head fdd0e4957136e12a03ac29445d116d7fcf6fdd02)
to branch 'com.redhat.elfutils.roland.pending' (head ba30c6e5cab6b9316a77ed1c6e8353c0bab892ac)
Diffstat (limited to 'libelf/elf_getaroff.c')
-rw-r--r--libelf/elf_getaroff.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libelf/elf_getaroff.c b/libelf/elf_getaroff.c
index f8b426e7..8dea0614 100644
--- a/libelf/elf_getaroff.c
+++ b/libelf/elf_getaroff.c
@@ -1,5 +1,5 @@
/* Return offset in archive for current file ELF.
- Copyright (C) 2005 Red Hat, Inc.
+ Copyright (C) 2005, 2008 Red Hat, Inc.
This file is part of Red Hat elfutils.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2005.
@@ -71,5 +71,5 @@ elf_getaroff (elf)
Elf *parent = elf->parent;
assert (parent->kind == ELF_K_AR);
- return parent->state.ar.offset;
+ return elf->start_offset - sizeof (struct ar_hdr) - parent->start_offset;
}