summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorotto <otto@openbsd.org>2011-05-09 18:13:34 +0000
committerotto <otto@openbsd.org>2011-05-09 18:13:34 +0000
commita82a6c7782c3f433be19a5a75f2aff81a2a6e875 (patch)
tree9a87bef4edf389d916beb4b391ada330763d4232
parentmove all hardcoded offsets and constants relative to midi system (diff)
downloadwireguard-openbsd-a82a6c7782c3f433be19a5a75f2aff81a2a6e875.tar.xz
wireguard-openbsd-a82a6c7782c3f433be19a5a75f2aff81a2a6e875.zip
Outsmart gcc4 on mips* by moving the declaration of _dl_debug_state
outside the file the call is in. Since the function is empty, gcc optmizes the call away, breaking the gdb hook needed to resolve symbols in lazy bound shared libs. Analysis by kettenis@; ok miod@ kettenis@
-rw-r--r--libexec/ld.so/library.c9
-rw-r--r--libexec/ld.so/loader.c8
2 files changed, 9 insertions, 8 deletions
diff --git a/libexec/ld.so/library.c b/libexec/ld.so/library.c
index 87dc3fde2f5..4ff768ff35d 100644
--- a/libexec/ld.so/library.c
+++ b/libexec/ld.so/library.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: library.c,v 1.60 2010/11/16 18:59:00 drahn Exp $ */
+/* $OpenBSD: library.c,v 1.61 2011/05/09 18:13:34 otto Exp $ */
/*
* Copyright (c) 2002 Dale Rahn
@@ -251,3 +251,10 @@ _dl_tryload_shlib(const char *libname, int type, int flags)
}
return(object);
}
+
+void
+_dl_debug_state(void)
+{
+ /* Debugger stub */
+}
+
diff --git a/libexec/ld.so/loader.c b/libexec/ld.so/loader.c
index 042395519d1..bf778f433e6 100644
--- a/libexec/ld.so/loader.c
+++ b/libexec/ld.so/loader.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: loader.c,v 1.122 2011/04/06 11:36:25 miod Exp $ */
+/* $OpenBSD: loader.c,v 1.123 2011/05/09 18:13:34 otto Exp $ */
/*
* Copyright (c) 1998 Per Fogelstrom, Opsycon AB
@@ -89,12 +89,6 @@ _dl_set_sod(const char *path, struct sod *sod)
_dl_build_sod(path, sod);
}
-void
-_dl_debug_state(void)
-{
- /* Debugger stub */
-}
-
/*
* Run dtors for all objects that are eligible.
*/