Don't create IBT .plt if there are no PLT entries. Cherry picked from
authorkettenis <kettenis@openbsd.org>
Sun, 23 Apr 2023 21:08:26 +0000 (21:08 +0000)
committerkettenis <kettenis@openbsd.org>
Sun, 23 Apr 2023 21:08:26 +0000 (21:08 +0000)
commita3cd701e6e5f3719a4f464aecc0f437a5f4de7af
tree70e27b74ef9aa3c3d91e43555a5be4773bb421b9
parent9153aeb5d05b43516a8d079e2fa5d5f714bacae8
Don't create IBT .plt if there are no PLT entries.  Cherry picked from
upstream.  Fixes several issues including problems with ld.bfd when it
sees such a .plt in an object file that is getting linked into a binary.

ok deraadt@
gnu/llvm/lld/ELF/SyntheticSections.cpp
gnu/llvm/lld/ELF/SyntheticSections.h