diff options
| author | Roland McGrath <[email protected]> | 2008-12-11 21:23:44 -0800 |
|---|---|---|
| committer | Roland McGrath <[email protected]> | 2008-12-11 21:23:44 -0800 |
| commit | 534ad315b34c1fcce8f51ca8762fed1044dbaa47 (patch) | |
| tree | 63a25b8084ce0774446b6371d7b5522726383b9a /libelf/elf32_updatefile.c | |
| parent | 75b07c00481fa85152fed79a5c5132b09da49d32 (diff) | |
Comment fix in last change.
Diffstat (limited to 'libelf/elf32_updatefile.c')
| -rw-r--r-- | libelf/elf32_updatefile.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/libelf/elf32_updatefile.c b/libelf/elf32_updatefile.c index 58ea7551..e88f4a45 100644 --- a/libelf/elf32_updatefile.c +++ b/libelf/elf32_updatefile.c @@ -1,5 +1,5 @@ /* Write changed data structures. - Copyright (C) 2000, 2001, 2002, 2004, 2005, 2006, 2007 Red Hat, Inc. + Copyright (C) 2000, 2001, 2002, 2004, 2005, 2006, 2007, 2008 Red Hat, Inc. This file is part of Red Hat elfutils. Written by Ulrich Drepper <[email protected]>, 2000. @@ -321,12 +321,12 @@ __elfw2(LIBELFBITS,updatemmap) (Elf *elf, int change_bo, size_t shnum) && shdr_end < scn_start + dl->data.d.d_off) memset (shdr_end, __libelf_fill_byte, scn_start + dl->data.d.d_off - shdr_end); - } - /* Let it go backward if the sections are not - presented in layout order, or use a bogus - layout (overlaps, etc.). */ + /* Let it go backward if the sections use a bogus + layout with overlaps. We'll overwrite the stupid + user's section data with the latest one, rather than + crashing. */ last_position = scn_start + dl->data.d.d_off; @@ -640,9 +640,10 @@ __elfw2(LIBELFBITS,updatefile) (Elf *elf, int change_bo, size_t shnum) return 1; } - /* Let it go backward if the sections are not - presented in layout order, or use a bogus - layout (overlaps, etc.). */ + /* Let it go backward if the sections use a bogus + layout with overlaps. We'll overwrite the stupid + user's section data with the latest one, rather than + crashing. */ last_offset = scn_start + dl->data.d.d_off; |
