Remove duplicate code in elf/dl-deps.c.