Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Nov 2011 07:51:10 -0800
From:      Artem Belevich <art@freebsd.org>
To:        David Wolfskill <david@catwhisker.org>, stable@freebsd.org
Subject:   Re: ld: kernel.debug: Not enough room for program headers (allocated 5, need 6)
Message-ID:  <CAFqOu6gRG2QHvxhppx45TxK_K5ZA6z4Oj9tCtZz2Y=0gyX95hw@mail.gmail.com>
In-Reply-To: <20111117144157.GL1706@albert.catwhisker.org>
References:  <20111117144157.GL1706@albert.catwhisker.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Nov 17, 2011 at 6:41 AM, David Wolfskill <david@catwhisker.org> wro=
te:
> MAKE=3D/usr/obj/usr/src/make.i386/make sh /usr/src/sys/conf/newvers.sh GE=
NERIC
> cc -c -O -pipe =A0-std=3Dc99 -g -Wall -Wredundant-decls -Wnested-externs =
-Wstrict-prototypes =A0-Wmissing-prototypes -Wpointer-arith -Winline -Wcast=
-qual =A0-Wundef -Wno-pointer-sign -fformat-extensions -nostdinc =A0-I. -I/=
usr/src/sys -I/usr/src/sys/contrib/altq -D_KERNEL -DHAVE_KERNEL_OPTION_HEAD=
ERS -include opt_global.h -fno-common -finline-limit=3D8000 --param inline-=
unit-growth=3D100 --param large-function-growth=3D1000 =A0-mno-align-long-s=
trings -mpreferred-stack-boundary=3D2 =A0-mno-mmx -mno-3dnow -mno-sse -mno-=
sse2 -mno-sse3 -ffreestanding -fstack-protector -Werror =A0vers.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

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

Room for the program headers at the beginning of the ELF file. Look at
sys/conf/ldscript.* and search for SIZEOF_HEADERS.
One way to work around the issue is to replace SIZEOF_HEADERS with a
fixed value. Try 0x1000.

--Artem



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFqOu6gRG2QHvxhppx45TxK_K5ZA6z4Oj9tCtZz2Y=0gyX95hw>