AW: GNU ld fails to link solaris values-Xa.o

"Dehmel, Rüdiger" de@lmnet.de
Tue Oct 22 03:27:00 GMT 2002


Hi Nick,

thank you for your help.

The command line switch helps.

The file values-Xa.o is the version from my solaris 2.5.1 (for which I need
cross compiling)
The dump utility shows different flag values compared to the values-Xa.o on
my sparc solaris 2.6.
(As you expected)

RE: the other error message:
Not enough room for program headers (allocated 2, need 3)

I have change the file
/usr/local/i386-pc-solaris2.5.1/lib/ldscripts/elf_i386.x

orig:	. = 0x08048000 + SIZEOF_HEADERS;
new:	. = 0x08048000 + 1024;

and use the command line switch: -melf_i386

Is this the right way to do it?

PS: Building the cross compiler for the solrais 2.5.1 i386 target runs into
this linking problem.
At this stage the ld is started from xgcc, so I don't know how to modify the
cross compiler building enviroment to get the command line switches.
Not only values-Xa.o is affected, but also other objects in libc.a have the
same wrong section flags.

Thank you
Ruediger

> -----Ursprüngliche Nachricht-----
> Von:	Nick Clifton [SMTP:nickc@redhat.com]
> Gesendet am:	Freitag, 18. Oktober 2002 20:19
> An:	Dehmel, Rüdiger
> Cc:	'binutils@sources.redhat.com'
> Betreff:	Re: GNU ld fails to link solaris values-Xa.o
> 
> Hi Rüdiger,
> 
> > while using a cross compiler I run into this problem:
> > 
> > (Simplified ld command line)
> > /usr/local/i386-pc-solaris2.5.1/bin/ld -v
> > /usr/local/i386-pc-solaris2.5.1/lib/values-Xa.o
> > GNU ld version 2.13
> > /usr/local/i386-pc-solaris2.5.1/bin/ld: section .stab.exclstr [00000000
> ->
> > 0000000d] overlaps section .stab.excl [00000000 -> 00000017]
> > 
> > valuesXa.o is copied from the solaris x86 machine.
> 
> This file must be buggy/broken.  The problem is that the .stab.exclstr
> and .stab.excl sections are supposed to be debug sections, so they
> should not have the ALLOC and LOAD flags sets.  (They are not needed
> in the memory footprint of a running executable).  The linker only
> checks for overlap in sections that have both of these flags set.
> 
> To work around this problem try linking with the:
> 
>         --no-check-sections
> 
> command line switch present.
> 
> Cheers
>         Nick



More information about the Binutils mailing list