From 40e7ed58d73eae59d0cf2fed61284d16692e307b Mon Sep 17 00:00:00 2001 From: Andrew Hsieh Date: Mon, 2 Jul 2012 11:17:04 -0700 Subject: [PATCH] Unhide rtld_db_dlactivity() Since linker is built with -fvisibility=hidden rtld_db_dlactivity() if hidden from gdb. Unhide it otherwise gdb may not know linker activity and rescan solib Change-Id: Ia8cd8d9738c6ea5696ba2ef0ebf2cf783f9ca70a --- linker/linker.c | 2 +- linker/rt.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/linker/linker.c b/linker/linker.c index eb9cc3e98..df4a8b124 100644 --- a/linker/linker.c +++ b/linker/linker.c @@ -159,7 +159,7 @@ const char *linker_get_error(void) * This function is an empty stub where GDB locates a breakpoint to get notified * about linker activity. */ -extern void __attribute__((noinline)) rtld_db_dlactivity(void); +extern void __attribute__((noinline)) __attribute__((visibility("default"))) rtld_db_dlactivity(void); static struct r_debug _r_debug = {1, NULL, &rtld_db_dlactivity, RT_CONSISTENT, 0}; diff --git a/linker/rt.c b/linker/rt.c index 30d5a4877..afbd65146 100644 --- a/linker/rt.c +++ b/linker/rt.c @@ -28,9 +28,9 @@ /* * This function is an empty stub where GDB locates a breakpoint to get notified - * about linker activity. + * about linker activity. It canʼt be inlined away, canʼt be hidden. */ -void __attribute__((noinline)) rtld_db_dlactivity(void) +void __attribute__((noinline)) __attribute__((visibility("default"))) rtld_db_dlactivity(void) { }