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 Unbreak HPPA
details: https://anonhg.NetBSD.org/src/rev/7a1446b05fcc
branches: trunk
changeset: 763746:7a1446b05fcc
user: joerg <joerg%NetBSD.org@localhost>
date: Sat Apr 02 12:30:41 2011 +0000
description:
Unbreak HPPA
diffstat:
libexec/ld.elf_so/rtld.c | 25 +++++++++++++++++++++++--
1 files changed, 23 insertions(+), 2 deletions(-)
diffs (53 lines):
diff -r 7ac7e659fac5 -r 7a1446b05fcc libexec/ld.elf_so/rtld.c
--- a/libexec/ld.elf_so/rtld.c Sat Apr 02 10:22:09 2011 +0000
+++ b/libexec/ld.elf_so/rtld.c Sat Apr 02 12:30:41 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rtld.c,v 1.148 2011/03/29 20:56:35 joerg Exp $ */
+/* $NetBSD: rtld.c,v 1.149 2011/04/02 12:30:41 joerg Exp $ */
/*
* Copyright 1996 John D. Polstra.
@@ -40,7 +40,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: rtld.c,v 1.148 2011/03/29 20:56:35 joerg Exp $");
+__RCSID("$NetBSD: rtld.c,v 1.149 2011/04/02 12:30:41 joerg Exp $");
#endif /* not lint */
#include <sys/param.h>
@@ -1147,6 +1147,9 @@
const Elf_Sym *def, *best_def;
void *symbol_addr;
unsigned long symoffset;
+#ifdef __HAVE_FUNCTION_DESCRIPTORS
+ sigset_t mask;
+#endif
dbg(("dladdr of %p", addr));
@@ -1405,6 +1408,24 @@
}
}
+void
+_rtld_lock(int arg, sigset_t *mask)
+{
+ switch (arg) {
+ default:
+ dbg(("%s: invalid argument: %d", __func__, arg));
+ break;
+ case RTLD_LOCK_PRE_FORK:
+ _rtld_exclusive_enter(mask);
+ _rtld_mutex_may_recurse = true;
+ break;
+ case RTLD_LOCK_POST_FORK:
+ _rtld_mutex_may_recurse = false;
+ _rtld_exclusive_exit(mask);
+ break;
+ }
+}
+
#define RTLD_EXCLUSIVE_MASK 0x80000000U
static volatile unsigned int _rtld_mutex;
static volatile unsigned int _rtld_waiter_exclusive;
Home |
Main Index |
Thread Index |
Old Index