Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/rump/librump/rumpkern Force references to the component ...
details: https://anonhg.NetBSD.org/src/rev/4a52f23bb317
branches: trunk
changeset: 785295:4a52f23bb317
user: pooka <pooka%NetBSD.org@localhost>
date: Thu Mar 07 18:33:27 2013 +0000
description:
Force references to the component setlist __start/__stop symbols so
that they get generated for rump kernels constructed from static libs.
diffstat:
sys/rump/librump/rumpkern/rump.c | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diffs (36 lines):
diff -r 69c15797dede -r 4a52f23bb317 sys/rump/librump/rumpkern/rump.c
--- a/sys/rump/librump/rumpkern/rump.c Thu Mar 07 18:02:54 2013 +0000
+++ b/sys/rump/librump/rumpkern/rump.c Thu Mar 07 18:33:27 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rump.c,v 1.252 2013/03/03 13:11:33 pooka Exp $ */
+/* $NetBSD: rump.c,v 1.253 2013/03/07 18:33:27 pooka Exp $ */
/*
* Copyright (c) 2007-2011 Antti Kantee. All Rights Reserved.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.252 2013/03/03 13:11:33 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.253 2013/03/07 18:33:27 pooka Exp $");
#include <sys/systm.h>
#define ELFSIZE ARCH_ELFSIZE
@@ -210,11 +210,15 @@
RUMP_COMPONENT(RUMP_COMPONENT_POSTINIT)
{
+ extern void *__start_link_set_rump_components;
+ extern void *__stop_link_set_rump_components;
/*
- * dummy component to make sure at least one component is
- * present in every possible rump kernel configuration
+ * Trick compiler into generating references so that statically
+ * linked rump kernels are generated with the link set symbols.
*/
+ asm("" :: "r"(__start_link_set_rump_components));
+ asm("" :: "r"(__stop_link_set_rump_components));
}
int
Home |
Main Index |
Thread Index |
Old Index