diff --git a/sys/rump/Makefile.rump b/sys/rump/Makefile.rump index d7dfa483fd2a..94f907fe72ad 100644 --- a/sys/rump/Makefile.rump +++ b/sys/rump/Makefile.rump @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.rump,v 1.44 2009/11/27 13:36:30 pooka Exp $ +# $NetBSD: Makefile.rump,v 1.45 2009/12/12 17:10:19 pooka Exp $ # WARNS?= 3 # XXX: src/sys won't compile with -Wsign-compare yet @@ -24,6 +24,7 @@ CPPFLAGS+= -I${RUMPTOP}/../../common/include -I${RUMPTOP}/../arch CPPFLAGS+= -I${RUMPTOP}/include CPPFLAGS+= -I${RUMPTOP}/librump/rumpkern/opt CPPFLAGS+= -nostdinc -I${RUMPTOP}/.. +LDFLAGS+= -T ${RUMPTOP}/ldscript.rump #CPPFLAGS+= -DDEBUG # kernel libs should not get linked against libc @@ -45,15 +46,6 @@ CPPFLAGS+= -DPPC_OEA # 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 --git a/sys/rump/fs/lib/Makefile.inc b/sys/rump/fs/lib/Makefile.inc index c7f7b071cc80..2accae671b7a 100644 --- a/sys/rump/fs/lib/Makefile.inc +++ b/sys/rump/fs/lib/Makefile.inc @@ -1,7 +1,6 @@ -# $NetBSD: Makefile.inc,v 1.13 2009/09/13 22:51:41 pooka Exp $ +# $NetBSD: Makefile.inc,v 1.14 2009/12/12 17:10:19 pooka Exp $ # RUMPTOP= ${.CURDIR}/../../.. -RUMP_ISMODULE= # defined .include "${RUMPTOP}/Makefile.rump" diff --git a/sys/rump/ldscript.rump b/sys/rump/ldscript.rump new file mode 100644 index 000000000000..1f0b0bedb598 --- /dev/null +++ b/sys/rump/ldscript.rump @@ -0,0 +1,28 @@ +/* $NetBSD: ldscript.rump,v 1.1 2009/12/12 17:10:19 pooka Exp $ */ + +/* + * From binutils 2.19 onwards (in NetBSD) binutils ld PROVIDEs + * __start/__stop for orphaned sections. This means that + * __start_link_set_modules/__stop_link_set_modules will no + * longer automatically be present in shared libraries. This + * ldscript forces those symbols to be present for all rump + * shared lib components. + */ + +SECTIONS +{ + link_set_modules : + { + __start_link_set_modules = .; + *(link_set_modules); + __stop_link_set_modules = .; + } + + link_set_domains : + { + __start_link_set_domains = .; + *(link_set_domains); + __stop_link_set_domains = .; + } +} +INSERT AFTER .data; diff --git a/sys/rump/librump/rump_domain.c b/sys/rump/librump/rump_domain.c deleted file mode 100644 index b7b45fce279e..000000000000 --- a/sys/rump/librump/rump_domain.c +++ /dev/null @@ -1,14 +0,0 @@ -/* $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 --git a/sys/rump/librump/rump_module.c b/sys/rump/librump/rump_module.c deleted file mode 100644 index eb1f5042c96a..000000000000 --- a/sys/rump/librump/rump_module.c +++ /dev/null @@ -1,14 +0,0 @@ -/* $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 --git a/sys/rump/net/lib/liblocal/Makefile b/sys/rump/net/lib/liblocal/Makefile index 59ea1e99a154..802c54eee170 100644 --- a/sys/rump/net/lib/liblocal/Makefile +++ b/sys/rump/net/lib/liblocal/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.3 2009/09/13 22:51:42 pooka Exp $ +# $NetBSD: Makefile,v 1.4 2009/12/12 17:10:19 pooka Exp $ # .PATH: ${.CURDIR}/../../../../kern @@ -10,7 +10,5 @@ SRCS+= component.c CFLAGS+= -Wno-pointer-sign -RUMP_ISDOMAIN= - .include .include diff --git a/sys/rump/net/lib/libnet/Makefile b/sys/rump/net/lib/libnet/Makefile index 2f3e7c4fb682..1d5b42653d95 100644 --- a/sys/rump/net/lib/libnet/Makefile +++ b/sys/rump/net/lib/libnet/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.6 2009/09/13 22:51:42 pooka Exp $ +# $NetBSD: Makefile,v 1.7 2009/12/12 17:10:19 pooka Exp $ # .PATH: ${.CURDIR}/../../../../net @@ -12,8 +12,6 @@ SRCS+= component.c CPPFLAGS+= -I${.CURDIR}/opt -I${.CURDIR}/../libnetinet/opt -RUMP_ISDOMAIN= - .include "${.CURDIR}/../libnetinet/Makefile.inc" .include diff --git a/sys/rump/net/lib/libsockin/Makefile b/sys/rump/net/lib/libsockin/Makefile index 18b3e30bd401..30d670a23c4e 100644 --- a/sys/rump/net/lib/libsockin/Makefile +++ b/sys/rump/net/lib/libsockin/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.4 2009/09/13 22:51:42 pooka Exp $ +# $NetBSD: Makefile,v 1.5 2009/12/12 17:10:20 pooka Exp $ # LIB= rumpnet_sockin @@ -8,7 +8,5 @@ SRCS+= component.c CPPFLAGS+= -I${RUMPTOP}/librump/rumpkern -RUMP_ISDOMAIN= - .include .include