diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2023-01-09 13:45:56 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2023-01-09 13:45:56 +0000 |
commit | b07de9e89a2e0ede56b57a5185dc73159ed9a6ba (patch) | |
tree | fe0dea8afe5f88b6e2990604bb6a5f3b61aa90b1 /libexec | |
parent | ce0287bd51219efc9c002cc5402b9ccb8f54aa0d (diff) |
In preparation for upcoming execute-only support, change the magic branch
instruction used by __canonicalize_funcptr_for_compare() from "bl" into "b".
This allows __canonicalize_funcptr_for_compare() to execute the branch
instead of decoding the instruction to find the address of _dl_bind().
This is the first step in the transition to a new ABI. Once an updated
ld.so has been installed, we can change __canonicalize_funcptr_for_compare()
(which lives in libgcc) and rebuild everything with a new libgcc. Only
then we can actually make ld.so executable-only.
ok deraadt@, miod@
Diffstat (limited to 'libexec')
-rw-r--r-- | libexec/ld.so/hppa/ldasm.S | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libexec/ld.so/hppa/ldasm.S b/libexec/ld.so/hppa/ldasm.S index 13621295ef4..4d19f9bfecb 100644 --- a/libexec/ld.so/hppa/ldasm.S +++ b/libexec/ld.so/hppa/ldasm.S @@ -1,4 +1,4 @@ -/* $OpenBSD: ldasm.S,v 1.24 2017/08/27 21:59:52 deraadt Exp $ */ +/* $OpenBSD: ldasm.S,v 1.25 2023/01/09 13:45:55 kettenis Exp $ */ /* * Copyright (c) 2004 Michael Shalayeff @@ -113,7 +113,7 @@ EXIT(_hppa_dl_set_dp) * __canonicalize_funcptr_for_compare() function to fixup relocations * in order to do function pointer comparisons. */ - bl _dl_bind, rp + b _dl_bind ENTRY(_dl_bind_start,32) copy r3, r1 |