Module Name: src Committed By: pooka Date: Sat Dec 12 17:10:20 UTC 2009
Modified Files: src/sys/rump: Makefile.rump src/sys/rump/fs/lib: Makefile.inc src/sys/rump/net/lib/liblocal: Makefile src/sys/rump/net/lib/libnet: Makefile src/sys/rump/net/lib/libsockin: Makefile Added Files: src/sys/rump: ldscript.rump Removed Files: src/sys/rump/librump: rump_domain.c rump_module.c Log Message: Use linker script to make __start/stop_link_set_modules be present in libs built with binutils >=2.19. This is a less error-prone method than the previous where components had to be tagged in the Makefile as modules (and if they weren't, things broke. and vice versa). To generate a diff of this commit: cvs rdiff -u -r1.44 -r1.45 src/sys/rump/Makefile.rump cvs rdiff -u -r0 -r1.1 src/sys/rump/ldscript.rump cvs rdiff -u -r1.13 -r1.14 src/sys/rump/fs/lib/Makefile.inc cvs rdiff -u -r1.1 -r0 src/sys/rump/librump/rump_domain.c \ src/sys/rump/librump/rump_module.c cvs rdiff -u -r1.3 -r1.4 src/sys/rump/net/lib/liblocal/Makefile cvs rdiff -u -r1.6 -r1.7 src/sys/rump/net/lib/libnet/Makefile cvs rdiff -u -r1.4 -r1.5 src/sys/rump/net/lib/libsockin/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/rump/Makefile.rump diff -u src/sys/rump/Makefile.rump:1.44 src/sys/rump/Makefile.rump:1.45 --- src/sys/rump/Makefile.rump:1.44 Fri Nov 27 13:36:30 2009 +++ src/sys/rump/Makefile.rump Sat Dec 12 17:10:19 2009 @@ -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}/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 @@ # 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 Index: src/sys/rump/fs/lib/Makefile.inc diff -u src/sys/rump/fs/lib/Makefile.inc:1.13 src/sys/rump/fs/lib/Makefile.inc:1.14 --- src/sys/rump/fs/lib/Makefile.inc:1.13 Sun Sep 13 22:51:41 2009 +++ src/sys/rump/fs/lib/Makefile.inc Sat Dec 12 17:10:19 2009 @@ -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" Index: src/sys/rump/net/lib/liblocal/Makefile diff -u src/sys/rump/net/lib/liblocal/Makefile:1.3 src/sys/rump/net/lib/liblocal/Makefile:1.4 --- src/sys/rump/net/lib/liblocal/Makefile:1.3 Sun Sep 13 22:51:42 2009 +++ src/sys/rump/net/lib/liblocal/Makefile Sat Dec 12 17:10:19 2009 @@ -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 @@ CFLAGS+= -Wno-pointer-sign -RUMP_ISDOMAIN= - .include <bsd.lib.mk> .include <bsd.klinks.mk> Index: src/sys/rump/net/lib/libnet/Makefile diff -u src/sys/rump/net/lib/libnet/Makefile:1.6 src/sys/rump/net/lib/libnet/Makefile:1.7 --- src/sys/rump/net/lib/libnet/Makefile:1.6 Sun Sep 13 22:51:42 2009 +++ src/sys/rump/net/lib/libnet/Makefile Sat Dec 12 17:10:19 2009 @@ -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 @@ CPPFLAGS+= -I${.CURDIR}/opt -I${.CURDIR}/../libnetinet/opt -RUMP_ISDOMAIN= - .include "${.CURDIR}/../libnetinet/Makefile.inc" .include <bsd.lib.mk> Index: src/sys/rump/net/lib/libsockin/Makefile diff -u src/sys/rump/net/lib/libsockin/Makefile:1.4 src/sys/rump/net/lib/libsockin/Makefile:1.5 --- src/sys/rump/net/lib/libsockin/Makefile:1.4 Sun Sep 13 22:51:42 2009 +++ src/sys/rump/net/lib/libsockin/Makefile Sat Dec 12 17:10:20 2009 @@ -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 @@ CPPFLAGS+= -I${RUMPTOP}/librump/rumpkern -RUMP_ISDOMAIN= - .include <bsd.lib.mk> .include <bsd.klinks.mk> Added files: Index: src/sys/rump/ldscript.rump diff -u /dev/null src/sys/rump/ldscript.rump:1.1 --- /dev/null Sat Dec 12 17:10:20 2009 +++ src/sys/rump/ldscript.rump Sat Dec 12 17:10:19 2009 @@ -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;