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/a48bc4ff5dd7
branches:  trunk
changeset: 379387:a48bc4ff5dd7
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 08cb93bf5d09 -r a48bc4ff5dd7 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 @@ void *
        return NULL;
 }
 
-#ifdef __powerpc__
+#if defined(__powerpc__) && !defined(__clang__)
 static __noinline void *
 hackish_return_address(void)
 {
@@ -1284,7 +1284,7 @@ dlsym(void *handle, const char *name)
 
        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 @@ dlvsym(void *handle, const char *name, c
                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 @@ dlinfo(void *handle, int req, void *v)
        _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