Not enough room for program headers

Hi,

While trying to create a shared lib at the end of the link stage I’m getting the following statement:
"Not enough room for program headers (allocated 4, need 5)

/usr/bin/ld: final link failed: Bad value"

Now, I have tried also the “–no-keep-memory” switch, and I’ve got the same output.

I have also attached the output dump file.

Any ideas ?

\

==========================================Benzy Gabay, R&D of wireless security
Everbee Wireless http://www.everbee.com

Could you please send me the object files, and I will investigate.

Colin

Benzy Gabay <bgabay@everbee.com> wrote:

This is a multi-part message in MIME format.

------=_NextPart_000_000B_01C103BF.55DC6AB0
Content-Type: multipart/alternative;
boundary=“----=_NextPart_001_000C_01C103BF.55DDF150”



------=_NextPart_001_000C_01C103BF.55DDF150
Content-Type: text/plain;
charset=“iso-8859-1”
Content-Transfer-Encoding: quoted-printable

Hi,

While trying to create a shared lib at the end of the link stage I’m =
getting the following statement:
"Not enough room for program headers (allocated 4, need 5)

/usr/bin/ld: final link failed: Bad value"

Now, I have tried also the “–no-keep-memory” switch, and I’ve got the =
same output.

I have also attached the output dump file.

Any ideas ?



–=20
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Benzy Gabay, R&D of wireless security
Everbee Wireless > http://www.everbee.com
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D



------=_NextPart_001_000C_01C103BF.55DDF150
Content-Type: text/html;
charset=“iso-8859-1”
Content-Transfer-Encoding: quoted-printable

!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.0 Transitional//EN”
HTML><HEAD
META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1"
META content=3D"MSHTML 6.00.2462.0" name=3DGENERATOR
STYLE></STYLE
/HEAD
BODY
DIV>Hi,</DIV
DIV> </DIV
DIV>While trying to create a shared =
lib at=20
the end of the link stage I’m getting the following =
statement:</DIV
DIV
P>“Not enough room for program headers =
(allocated 4,=20
need 5)</P
P>/usr/bin/ld: final link failed: Bad =
value”</P
P>Now, I have tried also the =
“–no-keep-memory” switch,=20
and I’ve got the same output.</P
P>I have also attached the output dump =
file.</P
P>Any ideas ?</P
P>
–=20
BR>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Benzy =
Gabay, R&D of=20
wireless security
Everbee=20
Wireless          &nbsp=
;     =20
/FONT><A href=3D"http://www.everbee.com"><FONT face=3DArial=20
size=3D2>http://www.everbee.com
<FONT face=3DArial=20
size=3D2>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D<BR=
/P></HTML

------=_NextPart_001_000C_01C103BF.55DDF150–

------=_NextPart_000_000B_01C103BF.55DC6AB0
Content-Type: text/plain;
name=“OUTLINK.TXT”
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename=“OUTLINK.TXT”

GNU ld version 2.9.1 (with BFD 2.9.1-QNX-1.2)=0A=
Supported emulations:=0A=
i386nto=0A=
elf32ppcnto=0A=
elf32bmipnto=0A=
sh=0A=
shl=0A=
using internal linker script:=0A=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A=
OUTPUT_FORMAT(“elf32-i386”, “elf32-i386”,=0A=
“elf32-i386”)=0A=
OUTPUT_ARCH(i386)=0A=
ENTRY(_start)=0A=
SEARCH_DIR(/usr/ntox86/lib);=0A=
/* Do we need any of these for elf?=0A=
__DYNAMIC =3D 0; /=0A=
SECTIONS=0A=
{=0A=
/
Read-only sections, merged into text segment: */=0A=
. =3D 0xb0300000 + SIZEOF_HEADERS;=0A=
.hash : { *(.hash) }=0A=
.dynsym : { *(.dynsym) }=0A=
.dynstr : { *(.dynstr) }=0A=
.gnu.version : { *(.gnu.version) }=0A=
.gnu.version_d : { *(.gnu.version_d) }=0A=
.gnu.version_r : { *(.gnu.version_r) }=0A=
.rel.text :=0A=
{ *(.rel.text) (.rel.gnu.linkonce.t) }=0A=
.rela.text :=0A=
{ *(.rela.text) (.rela.gnu.linkonce.t) }=0A=
.rel.data :=0A=
{ *(.rel.data) (.rel.gnu.linkonce.d) }=0A=
.rela.data :=0A=
{ *(.rela.data) (.rela.gnu.linkonce.d) }=0A=
.rel.rodata :=0A=
{ *(.rel.rodata) (.rel.gnu.linkonce.r) }=0A=
.rela.rodata :=0A=
{ *(.rela.rodata) (.rela.gnu.linkonce.r) }=0A=
.rel.got : { *(.rel.got) }=0A=
.rela.got : { *(.rela.got) }=0A=
.rel.ctors : { *(.rel.ctors) }=0A=
.rela.ctors : { *(.rela.ctors) }=0A=
.rel.dtors : { *(.rel.dtors) }=0A=
.rela.dtors : { *(.rela.dtors) }=0A=
.rel.init : { *(.rel.init) }=0A=
.rela.init : { *(.rela.init) }=0A=
.rel.fini : { *(.rel.fini) }=0A=
.rela.fini : { *(.rela.fini) }=0A=
.rel.bss : { *(.rel.bss) }=0A=
.rela.bss : { *(.rela.bss) }=0A=
.rel.plt : { *(.rel.plt) }=0A=
.rela.plt : { *(.rela.plt) }=0A=
.init : { *(.init) } =3D0x9090=0A=
.plt : { *(.plt) }=0A=
.text :=0A=
{=0A=
_btext =3D .;=0A=
*(.text)=0A=
(.stub)=0A=
/
.gnu.warning sections are handled specially by elf32.em. */=0A=
*(.gnu.warning)=0A=
(.gnu.linkonce.t)=0A=
} =3D0x9090=0A=
_etext =3D .;=0A=
PROVIDE (etext =3D .);=0A=
.fini : { *(.fini) } =3D0x9090=0A=
.rodata : { *(.rodata) (.gnu.linkonce.r) }=0A=
.rodata1 : { (.rodata1) }=0A=
/
Adjust the address for the data segment. We want to adjust up to=0A=
the same address within the page on the next page up. */=0A=
. =3D ALIGN(0x1000) + (. & (0x1000 - 1));=0A=
.data :=0A=
{=0A=
*(.data)=0A=
(.gnu.linkonce.d)=0A=
CONSTRUCTORS=0A=
}=0A=
.data1 : { *(.data1) }=0A=
.ctors :=0A=
{=0A=
*(.ctors)=0A=
}=0A=
.dtors :=0A=
{=0A=
*(.dtors)=0A=
}=0A=
.got : { *(.got.plt) *(.got) }=0A=
.dynamic : { (.dynamic) }=0A=
/
We want the small data sections together, so single-instruction =
offsets=0A=
can access them all, and initialized data all before uninitialized, =
so=0A=
we can shorten the on-disk segment size. */=0A=
.sdata : { *(.sdata) }=0A=
_edata =3D .;=0A=
PROVIDE (edata =3D .);=0A=
__bss_start =3D .;=0A=
.sbss : { *(.sbss) *(.scommon) }=0A=
.bss :=0A=
{=0A=
*(.dynbss)=0A=
*(.bss)=0A=
(COMMON)=0A=
}=0A=
. =3D ALIGN(32 / > :sunglasses:> ;=0A=
_end =3D . ;=0A=
PROVIDE (end =3D .);=0A=
/
Stabs debugging sections. */=0A=
.stab 0 : { *(.stab) }=0A=
.stabstr 0 : { *(.stabstr) }=0A=
.stab.excl 0 : { *(.stab.excl) }=0A=
.stab.exclstr 0 : { *(.stab.exclstr) }=0A=
.stab.index 0 : { *(.stab.index) }=0A=
.stab.indexstr 0 : { *(.stab.indexstr) }=0A=
.comment 0 : { (.comment) }=0A=
/
DWARF debug sections.=0A=
Symbols in the DWARF debugging sections are relative to the =
beginning=0A=
of the section so we begin them at 0. /=0A=
/
DWARF 1 */=0A=
.debug 0 : { *(.debug) }=0A=
.line 0 : { (.line) }=0A=
/
GNU DWARF 1 extensions */=0A=
.debug_srcinfo 0 : { *(.debug_srcinfo) }=0A=
.debug_sfnames 0 : { (.debug_sfnames) }=0A=
/
DWARF 1.1 and DWARF 2 */=0A=
.debug_aranges 0 : { *(.debug_aranges) }=0A=
.debug_pubnames 0 : { (.debug_pubnames) }=0A=
/
DWARF 2 */=0A=
.debug_info 0 : { *(.debug_info) }=0A=
.debug_abbrev 0 : { *(.debug_abbrev) }=0A=
.debug_line 0 : { *(.debug_line) }=0A=
.debug_frame 0 : { *(.debug_frame) }=0A=
.debug_str 0 : { *(.debug_str) }=0A=
.debug_loc 0 : { *(.debug_loc) }=0A=
.debug_macinfo 0 : { (.debug_macinfo) }=0A=
/
SGI/MIPS DWARF 2 extensions */=0A=
.debug_weaknames 0 : { *(.debug_weaknames) }=0A=
.debug_funcnames 0 : { *(.debug_funcnames) }=0A=
.debug_typenames 0 : { *(.debug_typenames) }=0A=
.debug_varnames 0 : { (.debug_varnames) }=0A=
/
These must appear regardless of . */=0A=
}=0A=
=0A=
=0A=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A=
attempt to open /x86/lib/crti.o succeeded=0A=
/x86/lib/crti.o=0A=
attempt to open /usr/lib/gcc-lib/ntox86/2.95.2/crtbeginC++.o succeeded=0A=
/usr/lib/gcc-lib/ntox86/2.95.2/crtbeginC++.o=0A=
attempt to open a1shim.o succeeded=0A=
foo.o =0A=
=0A=
attempt to open /x86/usr/lib/libstdc++.so succeeded=0A=
-lstdc++ (/x86/usr/lib/libstdc++.so)=0A=
attempt to open /x86/usr/lib/libm.so failed=0A=
attempt to open /x86/usr/lib/libm.a failed=0A=
attempt to open /x86/lib/libm.so succeeded=0A=
-lm (/x86/lib/libm.so)=0A=
attempt to open /usr/lib/gcc-lib/ntox86/2.95.2/exceptions/libgcc.a =
succeeded=0A=
(/usr/lib/gcc-lib/ntox86/2.95.2/exceptions/libgcc.a)_pure.o=0A=
attempt to open /x86/usr/lib/libc.so failed=0A=
attempt t/usr/bin/ld: a.out: Not enough room for program headers =
(allocated 4, need 5)=0A=
/usr/bin/ld: final link failed: Bad value=0A=
o open /x86/usr/lib/libc.a failed=0A=
attempt to open /x86/lib/libc.so succeeded=0A=
-lc (/x86/lib/libc.so)=0A=
attempt to open /x86/usr/lib/libcS.a failed=0A=
attempt to open /x86/lib/libcS.a succeeded=0A=
attempt to open /usr/lib/gcc-lib/ntox86/2.95.2/exceptions/libgcc.a =
succeeded=0A=
attempt to open /usr/lib/gcc-lib/ntox86/2.95.2/crtendC++.o succeeded=0A=
/usr/lib/gcc-lib/ntox86/2.95.2/crtendC++.o=0A=
attempt to open /x86/lib/crtn.o succeeded=0A=
/x86/lib/crtn.o=0A=

------=_NextPart_000_000B_01C103BF.55DC6AB0–


cburgess@qnx.com