[ELF] Never mark the dynamic linker as DT_NEEDED
[ELF] Never mark the dynamic linker as DT_NEEDED

This patch adds logic to avoid putting the dynamic linker library (ld.so) as a
DT_NEEDED entry in the dynamic table. It should only appear in PT_INTERP.

This patch fixes SPEC programs 433, 445, 450, 453, 456, 462 when running on
Ubuntu Linux x86_64 and when linking SPEC programs with LLD and glibc 2.19.

http://reviews.llvm.org/D5573


git-svn-id: f6089bf0e6284f307027cef4f64114ee9ebb0424@218847 91177308-0d34-0410-b5e6-96231b3b80d8

llvm-mirror/lld,llvm-mirror/lld