ld: kernel.debug: Not enough room for program headers (allocated 5, need 6)

David Wolfskill david at catwhisker.org
Thu Nov 17 14:54:13 UTC 2011


Color me perplexed.

3 of the 4 kernels I build were fine; the 4th one ... ugh.

I'm tracking stable/8 daily & rebuild as often as that (less if there
are no changes).  I do this on 2 machines: my laptop (which only builds
for itself) and a "build machine" (named "freebeast"), which builds
GENERIC for itself, as well as kernels ALBERT & JANUS for a couple of
other machines.

The laptop was fine (for stable/8); it was running:

FreeBSD g1-227.catwhisker.org 8.2-STABLE FreeBSD 8.2-STABLE #272 r227447M: Fri Nov 11 04:07:05 PST 2011     root at g1-227.catwhisker.org:/common/S1/obj/usr/src/sys/CANARY  i386

and is now running:

FreeBSD g1-227.catwhisker.org 8.2-STABLE FreeBSD 8.2-STABLE #273 r227611M: Thu Nov 17 04:16:50 PST 2011     root at g1-227.catwhisker.org:/common/S1/obj/usr/src/sys/CANARY  i386

(The "M" suffix on the GRN is for a patch to sys/conf/newvers.sh
so it will recognize my working copy as SVN even though there is
no sys/.svn directory, since I'm using subversion-1.7.1.)

The build machine is running:

FreeBSD freebeast.catwhisker.org 8.2-STABLE FreeBSD 8.2-STABLE #400 r227447M: Fri Nov 11 04:11:35 PST 2011     root at freebeast.catwhisker.org:/common/S1/obj/usr/src/sys/GENERIC  i386

it rebuilt GENERIC & ALBERT OK, then on JANUS, the "make buildkernel"
terminated with:

...
cc -c -O -pipe  -std=c99 -g -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions -nostdinc  -I. -I/usr/src/sys -I/usr/src/sys/contrib/altq -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000  -mno-align-long-strings -mpreferred-stack-boundary=2  -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -ffreestanding -fstack-protector -Werror  hints.c
cc -c -O -pipe  -std=c99 -g -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions -nostdinc  -I. -I/usr/src/sys -I/usr/src/sys/contrib/altq -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000  -mno-align-long-strings -mpreferred-stack-boundary=2  -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -ffreestanding -fstack-protector -Werror  vnode_if.c
:> hack.c
cc -shared -nostdlib hack.c -o hack.So
rm -f hack.c
MAKE=/usr/obj/usr/src/make.i386/make sh /usr/src/sys/conf/newvers.sh GENERIC
cc -c -O -pipe  -std=c99 -g -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions -nostdinc  -I. -I/usr/src/sys -I/usr/src/sys/contrib/altq -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000  -mno-align-long-strings -mpreferred-stack-boundary=2  -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -ffreestanding -fstack-protector -Werror  vers.c
linking kernel.debug
ld: kernel.debug: Not enough room for program headers (allocated 5, need 6)
ld: final link failed: Bad value
*** Error code 1

Stop in /common/S1/obj/usr/src/sys/JANUS.
*** Error code 1

Stop in /usr/src.
*** Error code 1

Stop in /usr/src.
freebeast(8.2-S)[3] 


I'm rather left wondering "room" where, precisely?


The other perplexing thing is that JANUS is actually a subset of
my laptop's kernel config, and it's been getting built routinely;
as of its most recent update, it is running:

FreeBSD janus.catwhisker.org 8.2-STABLE FreeBSD 8.2-STABLE #398 r227447M: Fri Nov 11 04:15:30 PST 2011     root at freebeast.catwhisker.org:/common/S1/obj/usr/src/sys/JANUS  i386

And I've not changed the JANUS config since date: 2010/04/18 13:04:27;
author: david;  state: Exp;

Here's a copy:

#
# JANUS -- kernel configuration file for FreeBSD/i386 as a packet filter
#

include GENERIC

# firewall support, for access limiting

options 	IPFIREWALL
# options 	IPFIREWALL_DEFAULT_TO_ACCEPT
options 	IPFIREWALL_VERBOSE	#enable logging to syslogd(8)
options 	IPFIREWALL_VERBOSE_LIMIT=0	#do not limit verbosity

# dummynet for bandwidth limiting (requires IPFIREWALL)

options DUMMYNET

# divert sockets for natd

options IPDIVERT

[End of JANUS config]


As noted, since my laptop is also exposed to networks I don't
control, its kernel is also built with the above options (as well
as quite a few more, for support of user-interface, vs. headless
server, operation).  And it built & runs fine....

Clues?

Thanks!

Peace,
david
-- 
David H. Wolfskill				david at catwhisker.org
Depriving a girl or boy of an opportunity for education is evil.

See http://www.catwhisker.org/~david/publickey.gpg for my public key.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20111117/693df584/attachment.pgp


More information about the freebsd-stable mailing list