From: Roland McGrath Date: Tue, 14 Apr 2009 08:02:17 +0000 (-0700) Subject: Fix strip -f infinite loop when coping with some extra kooky object sections. X-Git-Tag: elfutils-0.141~24 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=04a14163323bc4d2d335909a2af7259bc53ddf8b;p=thirdparty%2Felfutils.git Fix strip -f infinite loop when coping with some extra kooky object sections. --- diff --git a/src/ChangeLog b/src/ChangeLog index 88dd78a9f..87c7d7d81 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2009-04-14 Roland McGrath + + * strip.c (handle_elf: check_preserved): Don't note any change when + .debug_data is already filled from a previous pass. + 2009-02-05 Ulrich Drepper * objdump.c (show_relocs_x): Minor cleanups. diff --git a/src/strip.c b/src/strip.c index 27eb21061..d788ebf2f 100644 --- a/src/strip.c +++ b/src/strip.c @@ -835,7 +835,8 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname, inline void check_preserved (size_t i) { - if (i != 0 && shdr_info[i].idx != 0) + if (i != 0 && shdr_info[i].idx != 0 + && shdr_info[i].debug_data == NULL) { if (shdr_info[i].data == NULL) shdr_info[i].data = elf_getdata (shdr_info[i].scn, NULL);