From: Ulrich Drepper Date: Mon, 26 Jan 2009 17:20:36 +0000 (-0800) Subject: Fix commit in updatenull_wrlock wrt to layout resulting from section header X-Git-Tag: elfutils-0.140~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=119f4acbaec5b538a4206fd261067137d3588f55;p=thirdparty%2Felfutils.git Fix commit in updatenull_wrlock wrt to layout resulting from section header table position and size. --- diff --git a/libelf/ChangeLog b/libelf/ChangeLog index 119fa5b1e..87c24e4f9 100644 --- a/libelf/ChangeLog +++ b/libelf/ChangeLog @@ -1,3 +1,8 @@ +2009-01-26 Ulrich Drepper + + * elf32_updatenull.c (updatenull_wrlock): Fix comment of + ELF_F_LAYOUT behaviour re section header table. + 2009-01-22 Ulrich Drepper * elf32_updatefile.c (__elfXX_updatemmap): Fill the gap between diff --git a/libelf/elf32_updatenull.c b/libelf/elf32_updatenull.c index a18d0bea0..5ce8bbc94 100644 --- a/libelf/elf32_updatenull.c +++ b/libelf/elf32_updatenull.c @@ -1,5 +1,5 @@ /* Update data structures for changes. - Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006 Red Hat, Inc. + Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 Red Hat, Inc. This file is part of Red Hat elfutils. Written by Ulrich Drepper , 2000. @@ -401,8 +401,9 @@ __elfw2(LIBELFBITS,updatenull_wrlock) (Elf *elf, int *change_bop, size_t shnum) /* Store section information. */ if (elf->flags & ELF_F_LAYOUT) { - /* The user is supposed to fill out e_phoff. Use it and - e_phnum to determine the maximum extend. */ + /* The user is supposed to fill out e_shoff. Use it and + e_shnum (or sh_size of the dummy, first section header) + to determine the maximum extend. */ size = MAX ((GElf_Word) size, (ehdr->e_shoff + (elf_typesize (LIBELFBITS, ELF_T_SHDR, shnum))));