On OpenBSD we always want IBT-compatible PLT entries. Currently we use
authorkettenis <kettenis@openbsd.org>
Sat, 3 Feb 2024 11:03:48 +0000 (11:03 +0000)
committerkettenis <kettenis@openbsd.org>
Sat, 3 Feb 2024 11:03:48 +0000 (11:03 +0000)
commit293d5193af009401b98836cc042d55117ca53694
tree408912aa257d40cc72bafeaa328311cfe58092ac
parent56d02c00c34befa82f36a0070f336a6b39010607
On OpenBSD we always want IBT-compatible PLT entries.  Currently we use
repoline PLT entries that were changed to include the necessary endbr64
instructions.  But with -Wl,-znoretpolineplt we would still emit non-BIT
PLT entries under certain circumstances.  Fix this.

ok deraadt@, guenther@
gnu/llvm/lld/ELF/Arch/X86_64.cpp
gnu/llvm/lld/ELF/SyntheticSections.cpp
gnu/llvm/lld/ELF/Writer.cpp