summaryrefslogtreecommitdiffstats
path: root/src/strip.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/strip.c')
-rw-r--r--src/strip.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/strip.c b/src/strip.c
index 27eb2106..d788ebf2 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);