On Sun, Mar 18, 2012 at 11:17:32PM -0700, Matt Thomas wrote: > > On Mar 18, 2012, at 10:38 PM, Hiroyuki Bessho wrote: > > > Module Name: src > > Committed By: bsh > > Date: Mon Mar 19 05:38:26 UTC 2012 > > > > Modified Files: > > src/external/gpl3/binutils/usr.sbin/dbsym: dbsym.8 dbsym.c > > src/sys/arch/arm/conf: Makefile.arm > > src/sys/conf: Makefile.kern.inc > > > > Log Message: > > adjust the size of db_symtab space automatically. > > proposed on tech-toolchain@, and got no objections. > > Opps. I meant to complain. I really dislike the editing of opt_ksyms.h > since that will cause things to be rebuilt after every config. > > I wonder if we could do a ld -r -o <kernel>_prelink.o *.o > and then use that to calculate SYMTAB_SPACE.
I think the idea is basically sound, but might want a few minor changes. What about: - kern_ksyms.c has a weak reference to the real db_symtab - initial link uses normal OBJS list and computes SYMTAB_SPACE - an additional object file containing just db_symtab is built from that - final link uses all normal OBJS and this additional one. Joerg