From 69670e3bb3f78f9a1d172c9e263ca1b95f8196db Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Sun, 25 Feb 2024 15:10:26 -0500 Subject: sh dlsym: fix passing of return address for RTLD_NEXT use this code dates back to the original commit of the sh port, with no real clue as to how the bug was introduced. it looks like it was written to assume the return address was pushed to the stack like on x86, rather than arriving in the pr special register. --- src/ldso/sh/dlsym.s | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/ldso/sh/dlsym.s b/src/ldso/sh/dlsym.s index 11a6fff5..34f3c35c 100644 --- a/src/ldso/sh/dlsym.s +++ b/src/ldso/sh/dlsym.s @@ -5,7 +5,7 @@ dlsym: mov.l L1, r0 1: braf r0 - mov.l @r15, r6 + sts pr, r6 .align 2 L1: .long __dlsym@PLT-(1b+4-.) -- cgit v1.2.1