diff options
Diffstat (limited to 'elf/ldconfig.c')
-rw-r--r-- | elf/ldconfig.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/elf/ldconfig.c b/elf/ldconfig.c index a087da85e4..ba05c67a97 100644 --- a/elf/ldconfig.c +++ b/elf/ldconfig.c @@ -699,6 +699,10 @@ search_dir (const struct dir_entry *entry) { if (opt_verbose) error (0, errno, _("Cannot stat %s"), file_name); + + /* Remove stale symlinks. */ + if (strstr (direntry->d_name, ".so.")) + unlink (real_file_name); continue; } is_dir = S_ISDIR (stat_buf.st_mode); |