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@
-/* $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
* __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