diff options
author | Otto Moerbeek <otto@cvs.openbsd.org> | 2011-05-09 18:13:35 +0000 |
---|---|---|
committer | Otto Moerbeek <otto@cvs.openbsd.org> | 2011-05-09 18:13:35 +0000 |
commit | 6fb2acf3203402d4905ca2695e56ad3391a3ed01 (patch) | |
tree | 7228a7a556a479f9ab0f1c4ba1bf82eb7acf6181 /libexec | |
parent | 0beabbbf921d20f11ee32f54174b0bde623347f0 (diff) |
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@
Diffstat (limited to 'libexec')
-rw-r--r-- | libexec/ld.so/library.c | 9 | ||||
-rw-r--r-- | libexec/ld.so/loader.c | 8 |
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. */ |