]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
Fix strip -f infinite loop when coping with some extra kooky object sections.
authorRoland McGrath <roland@redhat.com>
Tue, 14 Apr 2009 08:02:17 +0000 (01:02 -0700)
committerRoland McGrath <roland@redhat.com>
Tue, 14 Apr 2009 08:02:17 +0000 (01:02 -0700)
src/ChangeLog
src/strip.c

index 88dd78a9faee576cb3c8d159eefdc6756612146c..87c7d7d819bdf51699d9f38740ed730463cd2141 100644 (file)
@@ -1,3 +1,8 @@
+2009-04-14  Roland McGrath  <roland@redhat.com>
+
+       * 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  <drepper@redhat.com>
 
        * objdump.c (show_relocs_x): Minor cleanups.
index 27eb210612cacc8a6316b0a396a7baa3b3483a08..d788ebf2f32b1ecd0bb5d2f09b85373dc0c17d4d 100644 (file)
@@ -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);