Use 0 as sh_link when we don't have a dynamic symbol table.
authorRafael Espindola <rafael.espindola@gmail.com>
Thu, 12 Oct 2017 15:05:04 +0000 (15:05 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Thu, 12 Oct 2017 15:05:04 +0000 (15:05 +0000)
commit49419bb30322ff00e143cbaad7af98221dd0c008
tree4e1b5f2222547dc7c215dfce76ad2ea179746ca4
parent8d4ba5fd23474b2317396d077db9703bc8878ce3
Use 0 as sh_link when we don't have a dynamic symbol table.

It doesn't make sense to link from an alloc section to a non alloc
one as we were doing.

This matches the behavior of both gold and bfd.

llvm-svn: 315584
lld/ELF/SyntheticSections.cpp
lld/test/ELF/aarch64-gnu-ifunc.s
lld/test/ELF/gnu-ifunc-i386.s
lld/test/ELF/gnu-ifunc.s