diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/strip.c | 8 |
2 files changed, 10 insertions, 3 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index f5778856..5e69d3a4 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2015-10-04 Mark Wielaard <[email protected]> + + * strip.c (handle_elf): Only sanity check section symbols to not + kept discarded sections if we are creating a debug file. + 2015-10-07 Mark Wielaard <[email protected]> * unstrip.c (MAX): Removed. 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 |
