]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
propagate from branch 'com.redhat.elfutils' (head fdd0e4957136e12a03ac29445d116d7fcf6...
authorRoland McGrath <roland@redhat.com>
Mon, 21 Jan 2008 01:39:56 +0000 (01:39 +0000)
committerRoland McGrath <roland@redhat.com>
Mon, 21 Jan 2008 01:39:56 +0000 (01:39 +0000)
            to branch 'com.redhat.elfutils.roland.pending' (head ba30c6e5cab6b9316a77ed1c6e8353c0bab892ac)

libelf/ChangeLog
libelf/elf_getaroff.c

index df73af01dbb5dd6ceff6f4415560f154f0daf7f4..0688cbdbed47c5ff1cfaa3cf35bf5b9469c5dd29 100644 (file)
@@ -1,3 +1,8 @@
+2008-01-20  Roland McGrath  <roland@redhat.com>
+
+       * elf_getaroff.c: Calculate from start_offset, instead of using
+       parent's state.ar.offset field.
+
 2008-01-08  Roland McGrath  <roland@redhat.com>
 
        * Makefile.am (euinclude): Variable removed.
index f8b426e72dc88e3bf4065cfb2d994b4618a904b9..8dea0614368ebf37168ef5ff23f44636f0cffac1 100644 (file)
@@ -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;
 }