Fix segfault when creating a dso with discarded .dynsym section.