Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/rump binutils 2.19 has changed the old behaviour of defi...
details: https://anonhg.NetBSD.org/src/rev/980a78bd5f5d
branches: trunk
changeset: 747407:980a78bd5f5d
user: pooka <pooka%NetBSD.org@localhost>
date: Sun Sep 13 22:51:41 2009 +0000
description:
binutils 2.19 has changed the old behaviour of defining __start_SECTNAME
for orphaned sections to using PROVIDE. What this means is that
unless a rump component internally references that symbol, it will
not be included in the component shared library, and hence cannot
be referenced when the component is loaded. Add a workaround which
works both with 2.16 and 2.19: force a reference to the __start
symbol internally and hence retain it in the resulting library.
diffstat:
sys/rump/Makefile.rump | 11 ++++++++++-
sys/rump/fs/lib/Makefile.inc | 3 ++-
sys/rump/librump/rump_domain.c | 14 ++++++++++++++
sys/rump/librump/rump_module.c | 14 ++++++++++++++
sys/rump/net/lib/liblocal/Makefile | 4 +++-
sys/rump/net/lib/libnet/Makefile | 4 +++-
sys/rump/net/lib/libsockin/Makefile | 4 +++-
7 files changed, 49 insertions(+), 5 deletions(-)
diffs (125 lines):
diff -r a069ae58cd11 -r 980a78bd5f5d sys/rump/Makefile.rump
--- a/sys/rump/Makefile.rump Sun Sep 13 22:45:27 2009 +0000
+++ b/sys/rump/Makefile.rump Sun Sep 13 22:51:41 2009 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.rump,v 1.40 2009/09/08 20:24:08 pooka Exp $
+# $NetBSD: Makefile.rump,v 1.41 2009/09/13 22:51:41 pooka Exp $
#
WARNS?= 3 # XXX: src/sys won't compile with -Wsign-compare yet
@@ -39,6 +39,15 @@
# If this file changes, we need a full rebuild
DPSRCS+= ${RUMPTOP}/Makefile.rump
+.ifdef RUMP_ISMODULE
+.PATH: ${RUMPTOP}/librump
+SRCS+= rump_module.c
+.endif
+.ifdef RUMP_ISDOMAIN
+.PATH: ${RUMPTOP}/librump
+SRCS+= rump_domain.c
+.endif
+
#
# Rename library symbols before use. If a symbol does not already belong
# to a rump namespace ("rump" or "RUMP"), prefix it with "rumpns". This
diff -r a069ae58cd11 -r 980a78bd5f5d sys/rump/fs/lib/Makefile.inc
--- a/sys/rump/fs/lib/Makefile.inc Sun Sep 13 22:45:27 2009 +0000
+++ b/sys/rump/fs/lib/Makefile.inc Sun Sep 13 22:51:41 2009 +0000
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile.inc,v 1.12 2008/10/15 13:57:03 pooka Exp $
+# $NetBSD: Makefile.inc,v 1.13 2009/09/13 22:51:41 pooka Exp $
#
RUMPTOP= ${.CURDIR}/../../..
+RUMP_ISMODULE= # defined
.include "${RUMPTOP}/Makefile.rump"
diff -r a069ae58cd11 -r 980a78bd5f5d sys/rump/librump/rump_domain.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/rump/librump/rump_domain.c Sun Sep 13 22:51:41 2009 +0000
@@ -0,0 +1,14 @@
+/* $NetBSD: rump_domain.c,v 1.1 2009/09/13 22:51:42 pooka Exp $ */
+
+/*
+ * Force reference to __start_link_set_domains, so that the
+ * binutils 2.19 linker does not lose the symbol due to it being
+ * PROVIDEd in 2.19 as opposed to earlier versions where it was
+ * defined.
+ *
+ * Note: look into this again when all platforms use 2.19
+ */
+extern void *__start_link_set_domains;
+void *rump_start_domains = &__start_link_set_domains;
+extern void *__stop_link_set_domains;
+void *rump_stop_domains = &__stop_link_set_domains;
diff -r a069ae58cd11 -r 980a78bd5f5d sys/rump/librump/rump_module.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/rump/librump/rump_module.c Sun Sep 13 22:51:41 2009 +0000
@@ -0,0 +1,14 @@
+/* $NetBSD: rump_module.c,v 1.1 2009/09/13 22:51:42 pooka Exp $ */
+
+/*
+ * Force reference to __start_link_set_modules, so that the
+ * binutils 2.19 linker does not lose the symbol due to it being
+ * PROVIDEd in 2.19 as opposed to earlier versions where it was
+ * defined.
+ *
+ * Note: look into this again when all platforms use 2.19
+ */
+extern void *__start_link_set_modules;
+void *rump_start_modules = &__start_link_set_modules;
+extern void *__stop_link_set_modules;
+void *rump_stop_modules = &__stop_link_set_modules;
diff -r a069ae58cd11 -r 980a78bd5f5d sys/rump/net/lib/liblocal/Makefile
--- a/sys/rump/net/lib/liblocal/Makefile Sun Sep 13 22:45:27 2009 +0000
+++ b/sys/rump/net/lib/liblocal/Makefile Sun Sep 13 22:51:41 2009 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2 2009/05/28 00:02:16 pooka Exp $
+# $NetBSD: Makefile,v 1.3 2009/09/13 22:51:42 pooka Exp $
#
.PATH: ${.CURDIR}/../../../../kern
@@ -10,5 +10,7 @@
CFLAGS+= -Wno-pointer-sign
+RUMP_ISDOMAIN=
+
.include <bsd.lib.mk>
.include <bsd.klinks.mk>
diff -r a069ae58cd11 -r 980a78bd5f5d sys/rump/net/lib/libnet/Makefile
--- a/sys/rump/net/lib/libnet/Makefile Sun Sep 13 22:45:27 2009 +0000
+++ b/sys/rump/net/lib/libnet/Makefile Sun Sep 13 22:51:41 2009 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.5 2009/05/28 00:02:16 pooka Exp $
+# $NetBSD: Makefile,v 1.6 2009/09/13 22:51:42 pooka Exp $
#
.PATH: ${.CURDIR}/../../../../net
@@ -12,6 +12,8 @@
CPPFLAGS+= -I${.CURDIR}/opt -I${.CURDIR}/../libnetinet/opt
+RUMP_ISDOMAIN=
+
.include "${.CURDIR}/../libnetinet/Makefile.inc"
.include <bsd.lib.mk>
diff -r a069ae58cd11 -r 980a78bd5f5d sys/rump/net/lib/libsockin/Makefile
--- a/sys/rump/net/lib/libsockin/Makefile Sun Sep 13 22:45:27 2009 +0000
+++ b/sys/rump/net/lib/libsockin/Makefile Sun Sep 13 22:51:41 2009 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3 2009/05/28 00:02:16 pooka Exp $
+# $NetBSD: Makefile,v 1.4 2009/09/13 22:51:42 pooka Exp $
#
LIB= rumpnet_sockin
@@ -8,5 +8,7 @@
CPPFLAGS+= -I${RUMPTOP}/librump/rumpkern
+RUMP_ISDOMAIN=
+
.include <bsd.lib.mk>
.include <bsd.klinks.mk>
Home |
Main Index |
Thread Index |
Old Index