If you disable retpolineplt then _dl_bind_start is called with an
authorguenther <guenther@openbsd.org>
Thu, 18 May 2023 16:33:39 +0000 (16:33 +0000)
committerguenther <guenther@openbsd.org>
Thu, 18 May 2023 16:33:39 +0000 (16:33 +0000)
indirect branch, so include an endbr64 Just In Case.

ok deraadt@

libexec/ld.so/amd64/ldasm.S

index 6ae3f8d..9dca7ef 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: ldasm.S,v 1.30 2019/05/10 13:29:21 guenther Exp $     */
+/*     $OpenBSD: ldasm.S,v 1.31 2023/05/18 16:33:39 guenther Exp $     */
 
 /*
  * Copyright (c) 2002,2004 Dale Rahn
@@ -70,6 +70,7 @@ END(_dl_start)
 _ENTRY(_dl_bind_start)
        .cfi_startproc
        .cfi_adjust_cfa_offset  16
+       endbr64
        pushfq                          # save registers
        .cfi_adjust_cfa_offset  8
        /*.cfi_offset   %rflags, -16 */