Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/libexec/ld.elf_so Don't use the return address hack with clang.



details:   https://anonhg.NetBSD.org/src/rev/5c37603d426d
branches:  trunk
changeset: 1021418:5c37603d426d
user:      joerg <joerg%NetBSD.org@localhost>
date:      Sun May 30 02:26:08 2021 +0000

description:
Don't use the return address hack with clang.

diffstat:

 libexec/ld.elf_so/rtld.c |  12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diffs (54 lines):

diff -r e81691ea17b3 -r 5c37603d426d libexec/ld.elf_so/rtld.c
--- a/libexec/ld.elf_so/rtld.c  Sun May 30 02:24:05 2021 +0000
+++ b/libexec/ld.elf_so/rtld.c  Sun May 30 02:26:08 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rtld.c,v 1.207 2020/09/22 00:41:27 kamil Exp $  */
+/*     $NetBSD: rtld.c,v 1.208 2021/05/30 02:26:08 joerg Exp $  */
 
 /*
  * Copyright 1996 John D. Polstra.
@@ -40,7 +40,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: rtld.c,v 1.207 2020/09/22 00:41:27 kamil Exp $");
+__RCSID("$NetBSD: rtld.c,v 1.208 2021/05/30 02:26:08 joerg Exp $");
 #endif /* not lint */
 
 #include <sys/param.h>
@@ -1118,7 +1118,7 @@
        return NULL;
 }
 
-#ifdef __powerpc__
+#if defined(__powerpc__) && !defined(__clang__)
 static __noinline void *
 hackish_return_address(void)
 {
@@ -1284,7 +1284,7 @@
 
        dbg(("dlsym of %s in %p", name, handle));
 
-#ifdef __powerpc__
+#if defined(__powerpc__) && !defined(__clang__)
        retaddr = hackish_return_address();
 #else
        retaddr = __builtin_return_address(0);
@@ -1309,7 +1309,7 @@
                ver_entry.flags = 0;
                ventry = &ver_entry;
        }
-#ifdef __powerpc__
+#if defined(__powerpc__) && !defined(__clang__)
        retaddr = hackish_return_address();
 #else
        retaddr = __builtin_return_address(0);
@@ -1407,7 +1407,7 @@
        _rtld_shared_enter();
 
        if (handle == RTLD_SELF) {
-#ifdef __powerpc__
+#if defined(__powerpc__) && !defined(__clang__)
                retaddr = hackish_return_address();
 #else
                retaddr = __builtin_return_address(0);



Home | Main Index | Thread Index | Old Index