Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/libexec/ld.elf_so Mark _rtld_debug_state as not to be inline...
details: https://anonhg.NetBSD.org/src/rev/a140d90c07c2
branches: trunk
changeset: 778036:a140d90c07c2
user: joerg <joerg%NetBSD.org@localhost>
date: Tue Mar 13 21:00:31 2012 +0000
description:
Mark _rtld_debug_state as not to be inlined. Add an explicit instruction
barrier to prevent removal of calls to it.
diffstat:
libexec/ld.elf_so/rtld.c | 7 ++++---
libexec/ld.elf_so/rtld.h | 4 ++--
2 files changed, 6 insertions(+), 5 deletions(-)
diffs (46 lines):
diff -r 4bc66a561877 -r a140d90c07c2 libexec/ld.elf_so/rtld.c
--- a/libexec/ld.elf_so/rtld.c Tue Mar 13 19:25:39 2012 +0000
+++ b/libexec/ld.elf_so/rtld.c Tue Mar 13 21:00:31 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rtld.c,v 1.156 2012/02/16 23:00:39 joerg Exp $ */
+/* $NetBSD: rtld.c,v 1.157 2012/03/13 21:00:31 joerg Exp $ */
/*
* Copyright 1996 John D. Polstra.
@@ -40,7 +40,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: rtld.c,v 1.156 2012/02/16 23:00:39 joerg Exp $");
+__RCSID("$NetBSD: rtld.c,v 1.157 2012/03/13 21:00:31 joerg Exp $");
#endif /* not lint */
#include <sys/param.h>
@@ -1385,7 +1385,8 @@
_rtld_debug_state(void)
{
- /* do nothing */
+ /* Prevent optimizer from removing calls to this function */
+ __insn_barrier();
}
void
diff -r 4bc66a561877 -r a140d90c07c2 libexec/ld.elf_so/rtld.h
--- a/libexec/ld.elf_so/rtld.h Tue Mar 13 19:25:39 2012 +0000
+++ b/libexec/ld.elf_so/rtld.h Tue Mar 13 21:00:31 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rtld.h,v 1.108 2012/02/16 23:00:39 joerg Exp $ */
+/* $NetBSD: rtld.h,v 1.109 2012/03/13 21:00:32 joerg Exp $ */
/*
* Copyright 1996 John D. Polstra.
@@ -338,7 +338,7 @@
__attribute__((__format__(__printf__,1,2)));
void _rtld_die(void) __attribute__((__noreturn__));
void *_rtld_objmain_sym(const char *);
-__dso_public void _rtld_debug_state(void);
+__dso_public void _rtld_debug_state(void) __noinline;
void _rtld_linkmap_add(Obj_Entry *);
void _rtld_linkmap_delete(Obj_Entry *);
void _rtld_objlist_push_head(Objlist *, Obj_Entry *);
Home |
Main Index |
Thread Index |
Old Index