fix bug 2603717. Ensure all elf program headers are copied. beagle-gingerbread
authorNick Kralevich <nnk@google.com>
Tue, 20 Apr 2010 18:17:57 +0000 (11:17 -0700)
committerNick Kralevich <nnk@google.com>
Tue, 20 Apr 2010 18:17:57 +0000 (11:17 -0700)
commit62c1bed1c4505369cac2e72fbe30452a598fb690
tree0941e7968475a5c95f19d93d737cc41c958e6430
parentbe3f8e1b166f13cce6d9c682d300b8bacb5f414d
fix bug 2603717.  Ensure all elf program headers are copied.

When stripping a binary, soslim calls adjust_elf.  adjust_elf
copies over the elf program headers, making adjustments
as necessary.  Under some circumstances, the code which loops
over all the program headers will fail to call gelf_update_phdr().
Instead of copying over the elf program header from the old
binary to the new binary, a "NULL" header is written to the
binary.

Change-Id: I7afdc8e3af2638c386546f1bfe4f151e1f002087
elfcopy.c