summaryrefslogtreecommitdiff
path: root/ldso
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2007-01-28 10:32:59 +0000
committerMike Frysinger <vapier@gentoo.org>2007-01-28 10:32:59 +0000
commit7dd268d2730b13a7fa58287f4db3f3e7b63b2cc9 (patch)
treebeb10504726fc0ba3ca85907f1c6282c871f74ca /ldso
parent1a3a1e4343f67866b164e87426d20a07af3f0f0d (diff)
fix from Bernd Schmidt to make sure _dl_debug_state isnt optimized away and does not generate relocs
Diffstat (limited to 'ldso')
-rw-r--r--ldso/ldso/ldso.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/ldso/ldso/ldso.c b/ldso/ldso/ldso.c
index bf6ebde33..cf8ba5f9d 100644
--- a/ldso/ldso/ldso.c
+++ b/ldso/ldso/ldso.c
@@ -75,8 +75,13 @@ static int _dl_suid_ok(void);
* address mapping is changed in some way.
*/
void _dl_debug_state(void);
-void _dl_debug_state()
+rtld_hidden_proto(_dl_debug_state, noinline);
+void _dl_debug_state(void)
{
+ /* Make sure GCC doesn't recognize this function as pure, to avoid
+ * having the calls optimized away.
+ */
+ __asm__("");
}
static unsigned char *_dl_malloc_addr = 0; /* Lets _dl_malloc use the already allocated memory page */