From 6fb2acf3203402d4905ca2695e56ad3391a3ed01 Mon Sep 17 00:00:00 2001 From: Otto Moerbeek Date: Mon, 9 May 2011 18:13:35 +0000 Subject: 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@ --- libexec/ld.so/library.c | 9 ++++++++- libexec/ld.so/loader.c | 8 +------- 2 files changed, 9 insertions(+), 8 deletions(-) (limited to 'libexec/ld.so') 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. */ -- cgit v1.2.3