Kernel size reduction
[email protected] Sat, 13 May 2017 03:46:08 +0000
| Newsgroups | gmane.os.netbsd.ports.sun2 |
|---|---|
| Message-ID | <[email protected]> |
--i0/AhcQY5QxfSsSZ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, attached diff decreases kernel size (FOURMEG 1858620 -> 1832788) Also, it would be nice to strip the kernels, but not sure how to do it. The resulting kernel (even in a release) contains a symbol table. --i0/AhcQY5QxfSsSZ Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="sun2.diff" Index: arch/sun2/conf/std.sun2 =================================================================== RCS file: /cvsroot/src/sys/arch/sun2/conf/std.sun2,v retrieving revision 1.7 diff -u -r1.7 std.sun2 --- arch/sun2/conf/std.sun2 19 Sep 2010 02:09:29 -0000 1.7 +++ arch/sun2/conf/std.sun2 13 May 2017 03:29:05 -0000 @@ -5,5 +5,7 @@ include "conf/std" # MI standard options include "arch/m68k/conf/std.m68k" # m68k standard options +makeoptions CPUFLAGS="-DSMALL" + # XXX temporary option until sun3 port migrates to all sun68k stuff options _SUN2_ Index: sys/cdefs_elf.h =================================================================== RCS file: /cvsroot/src/sys/sys/cdefs_elf.h,v retrieving revision 1.52 diff -u -r1.52 cdefs_elf.h --- sys/cdefs_elf.h 7 Jun 2016 12:09:29 -0000 1.52 +++ sys/cdefs_elf.h 13 May 2017 03:29:12 -0000 @@ -136,16 +136,24 @@ ".popsection") #endif -#define __IDSTRING(_n,_s) __SECTIONSTRING(.ident,_s) -#define __RCSID(_s) __IDSTRING(rcsid,_s) #define __SCCSID(_s) #define __SCCSID2(_s) -#define __COPYRIGHT(_s) __SECTIONSTRING(.copyright,_s) +#define __KERNEL_SCCSID(_n, _s) +#ifndef SMALL +#define __IDSTRING(_n,_s) __SECTIONSTRING(.ident,_s) +#define __RCSID(_s) __IDSTRING(rcsid,_s) +#define __COPYRIGHT(_s) __SECTIONSTRING(.copyright,_s) #define __KERNEL_RCSID(_n, _s) __RCSID(_s) -#define __KERNEL_SCCSID(_n, _s) #define __KERNEL_COPYRIGHT(_n, _s) __COPYRIGHT(_s) +#else +#define __IDSTRING(_n,_s) +#define __RCSID(_s) +#define __COPYRIGHT(_s) +#define __KERNEL_RCSID(_n, _s) +#define __KERNEL_COPYRIGHT(_n, _s) +#endif #ifndef __lint__ #define __link_set_make_entry(set, sym) \ --i0/AhcQY5QxfSsSZ--