diff options
Diffstat (limited to 'src/strip.c')
| -rw-r--r-- | src/strip.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/strip.c b/src/strip.c index 41169eda..6fdb3bf9 100644 --- a/src/strip.c +++ b/src/strip.c @@ -1379,9 +1379,11 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname, shdr_info[cnt].shdr.sh_info = destidx - 1; } } - else if (debug_fname == NULL - || shdr_info[cnt].debug_data == NULL) - /* This is a section or group signature symbol + else if (debug_fname != NULL + && shdr_info[cnt].debug_data == NULL) + /* The symbol points to a section that is discarded + but isn't preserved in the debug file. Check that + this is a section or group signature symbol for a section which has been removed. */ { size_t sidx = (sym->st_shndx != SHN_XINDEX |
