This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: binutils-2.15: sh-elf-ld segfault


I'm experiencing the same thing with an arm-elf target. The problem seems to
be related to having a statement of the form "__text_start = DEFINED (
<label> ) ? <value if true> : <value if false>;" in the link script and only
appears when generating a mapfile. In your case I'd guess the linkscript has
a line to set a default _HeapSize if one has not been defined already.

The most recent source from cvs no longer segfaults

arm-elf-gcc  -Wl,-Map,mapfile -nostartfiles -nostdlib -Tarmelf.x -mthumb -mt
humb-interwork -o test.elf main.c
c:\devkitARM_r4\bin\..\lib\gcc-lib\arm-elf\3.3.3\..\..\..\..\arm-elf\bin\ld.
exe: internal error h:/gcc/binutils/src/ld/ldlang.c 1974
collect2: ld returned 1 exit status
make: *** [test.elf] Error 1

which is the following code from ldlang.c :-

  /* We've already created this one on the presence of DEFINED in the
     script, so it can't be NULL unless something is borked elsewhere in
     the code.  */
  if (defentry == NULL)
    FAIL ();

Is the attached a suitable testcase? The makefile has a couple of values
which need adjusted for the gcc install and the included linkscript is for
arm-elf so it's not really generic.


Dave

> -----Original Message-----
> From: binutils-owner@sources.redhat.com
> [mailto:binutils-owner@sources.redhat.com]On Behalf Of Ralf Corsepius
> Sent: 19 March 2004 12:30
> To: Binutils List
> Subject: binutils-2.15: sh-elf-ld segfault
>
>
> Hi,
>
> I am experiencing a segfault with binutils-2.15-branch and
> gcc-3.4-branch (20040317) for sh-rtems(elf):
> Any ideas about what goes wrong?

...

>
> Ralf
>
>

Attachment: testcase.tar.gz
Description: Binary data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]