NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: port-amd64/43438: x86 module map size is limited



The following reply was made to PR port-amd64/43438; it has been noted by GNATS.

From: Nicolas Joly <njoly%pasteur.fr@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: port-amd64/43438: x86 module map size is limited
Date: Wed, 9 Jun 2010 22:30:04 +0200

 --RnlQjJ0d97Da+TV1
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 
 On Wed, Jun 09, 2010 at 08:05:03PM +0000, David Laight wrote:
 > The following reply was made to PR port-amd64/43438; it has been noted by 
 > GNATS.
 > 
 > From: David Laight <david%l8s.co.uk@localhost>
 > To: gnats-bugs%NetBSD.org@localhost
 > Cc: 
 > Subject: Re: port-amd64/43438: x86 module map size is limited
 > Date: Wed, 9 Jun 2010 21:02:18 +0100
 > 
 >  On Wed, Jun 09, 2010 at 12:15:04PM +0000, Nicolas Joly wrote:
 >  >  
 >  >  I hit the same problem quite some time ago while playing with
 >  >  compat_linux modules ... At least for me, the problem is that modules
 >  >  for a MKDEBUG=yes,COPTS=-g build are gigantic...
 >  
 >  Do they also have the .ehframe section?
 
 Yes.
 
   2 .eh_frame     000115a8  0000000000000000  0000000000000000  000b5988  2**3
                   CONTENTS, ALLOC, LOAD, RELOC, READONLY, DATA
 
 >  We ought to be removing that (gcc option) for all amd64 kernel bits.
 
 Ok. The new patch save a few more byte by discarding this section in
 modules.
 
 njoly@petaure [~]> ll /stand/amd64/5.99.30/modules/zfs/zfs.kmod 
 -r--r--r--  1 root  wheel  1461032 Jun  8 09:34 
/stand/amd64/5.99.30/modules/zfs/zfs.kmod
 
 njoly@petaure [~]> ll /stand/amd64/5.99.30/modules/zfs/zfs.kmod 
 -r--r--r--  1 root  wheel  1338720 Jun  9 22:22 
/stand/amd64/5.99.30/modules/zfs/zfs.kmod
 
 -- 
 Nicolas Joly
 
 Biological Software and Databanks.
 Institut Pasteur, Paris.
 
 --RnlQjJ0d97Da+TV1
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: attachment; filename="netbsd-stripkmod.diff"
 
 Index: share/mk/bsd.kmodule.mk
 ===================================================================
 RCS file: /cvsroot/src/share/mk/bsd.kmodule.mk,v
 retrieving revision 1.24
 diff -u -p -r1.24 bsd.kmodule.mk
 --- share/mk/bsd.kmodule.mk    18 Jan 2010 23:39:07 -0000      1.24
 +++ share/mk/bsd.kmodule.mk    9 Jun 2010 20:23:19 -0000
 @@ -48,6 +48,15 @@ KMODSCRIPT= ${DESTDIR}/usr/libdata/ldscr
  OBJS+=                ${SRCS:N*.h:N*.sh:R:S/$/.o/g}
  PROG?=                ${KMOD}.kmod
  
 +.if ${MKDEBUG} != "no"
 +KMODDEBUG=    mv ${PROG} ${PROG}.gdb && \
 +              ${STRIP} --strip-debug --remove-section=.eh_frame \
 +                  -o ${PROG} ${PROG}.gdb
 +CLEANFILES+=  ${PROG}.gdb
 +.else
 +KMODDEBUG=    true
 +.endif
 +
  ##### Build rules
  realall:      ${PROG}
  
 @@ -57,6 +66,7 @@ ${PROG}: ${OBJS} ${DPADD}
        ${_MKTARGET_LINK}
        ${CC} ${LDFLAGS} -nostdlib -r -Wl,-T,${KMODSCRIPT},-d \
                -o ${.TARGET} ${OBJS}
 +      ${KMODDEBUG}
  
  ##### Install rules
  .if !target(kmodinstall)
 @@ -88,7 +98,7 @@ ${_PROG}:    .MADE                                   # no 
build at instal
        done
        ${INSTALL_DIR} ${KMODULEDIR}
        ${INSTALL_FILE} -o ${KMODULEOWN} -g ${KMODULEGRP} -m ${KMODULEMODE} \
 -              ${.ALLSRC} ${.TARGET}
 +              ${STRIPFLAG} ${.ALLSRC} ${.TARGET}
  
  kmodinstall:: ${_PROG}
  .PHONY:               kmodinstall
 
 --RnlQjJ0d97Da+TV1--
 


Home | Main Index | Thread Index | Old Index