diff options
| author | Ulrich Drepper <[email protected]> | 2009-01-26 09:20:36 -0800 |
|---|---|---|
| committer | Ulrich Drepper <[email protected]> | 2009-01-26 09:20:36 -0800 |
| commit | 119f4acbaec5b538a4206fd261067137d3588f55 (patch) | |
| tree | eff50ddcadd3e2a727820220e980f2b48c655ae3 /libelf/elf32_updatenull.c | |
| parent | 11ed669865964b0ea98954c15557d99c0c55364e (diff) | |
Fix commit in updatenull_wrlock wrt to layout resulting from section header
table position and size.
Diffstat (limited to 'libelf/elf32_updatenull.c')
| -rw-r--r-- | libelf/elf32_updatenull.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libelf/elf32_updatenull.c b/libelf/elf32_updatenull.c index a18d0bea..5ce8bbc9 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 <[email protected]>, 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)))); |
