This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
more on Re: sh-rtems and dwarf
- To: Nick Clifton <nickc at redhat dot com>
- Subject: more on Re: sh-rtems and dwarf
- From: Joel Sherrill <joel dot sherrill at OARcorp dot com>
- Date: Thu, 15 Feb 2001 14:07:18 -0600
- CC: binutils at sources dot redhat dot com
- Organization: OAR Corporation
- References: <200102141842.KAA11812@elmo.cygnus.com>
- Reply-To: joel dot sherrill at OARcorp dot com
Nick Clifton wrote:
>
> Hi Joel,
> Looking at tc-sh.c it appears that these have already been
> added. Certainly .file and .loc are supported in md_pseudo_table, so
> the probable answer is that gas/dwarf2dbg.c is being compiled without
> BFD_ASSEMBLER set. My suggestion, try adding bfd_gas=yes to
> configure.in (and then regenerate configure and reconfigure/rebuild
> gas).
The patch (I did it by hand on my side) appears to be
correct enough to get things to this point:
-DL_muldi3 -c ../../../cvs-objs/gcc/gcc/libgcc2.c -o libgcc/./_muldi3.o
/tmp/ccS7brxC.s: Assembler messages:
/tmp/ccS7brxC.s:495: Error: Cannot represent relocation type
BFD_RELOC_32
/tmp/ccS7brxC.s:499: Internal error!
Assertion failure in tc_gen_reloc at
../../../cvs-objs/binutils/src/gas/config/tc-sh.c line 3330.
so I added a "-S" and saved it as libgcc2.s. Attached is
libgcc2.s.gz which produces an sh internal error this way:
/usr2/test-gcc/install/sh-rtems/bin/as -o libgcc2.o libgcc2.s
libgcc2.s: Assembler messages:
libgcc2.s:495: Error: Cannot represent relocation type BFD_RELOC_32
libgcc2.s:499: Internal error!
Assertion failure in tc_gen_reloc at
../../../cvs-objs/binutils/src/gas/config/tc-sh.c line 3330.
Please report this bug.
I don't know whether this is a gas or code generation problem in gcc
but since gas complains first, it goes to this list. :)
> Cheers
> Nick
>
> Possible (but untested) patch:
>
> Index: gas/configure.in
> ===================================================================
> RCS file: /cvs/src//src/gas/configure.in,v
> retrieving revision 1.57
> diff -p -r1.57 configure.in
> *** configure.in 2001/02/10 22:25:10 1.57
> --- configure.in 2001/02/14 18:42:08
> *************** changequote([,])dnl
> *** 384,393 ****
>
> sh-*-linux*) fmt=elf em=linux ;;
> sh-*-elf*) fmt=elf ;;
> ! sh-*-coff*) fmt=coff ;;
> sh-*-pe*) fmt=coff em=pe bfd_gas=yes;;
> sh-*-rtemself*) fmt=elf ;;
> ! sh-*-rtems*) fmt=coff ;;
>
> ns32k-pc532-mach* | ns32k-pc532-ux*) fmt=aout em=pc532mach ;;
> ns32k-pc532-netbsd* | ns32k-pc532-lites*) fmt=aout em=nbsd532 ;;
> --- 384,393 ----
>
> sh-*-linux*) fmt=elf em=linux ;;
> sh-*-elf*) fmt=elf ;;
> ! sh-*-coff*) fmt=coff bfd_gas=yes;;
> sh-*-pe*) fmt=coff em=pe bfd_gas=yes;;
> sh-*-rtemself*) fmt=elf ;;
> ! sh-*-rtems*) fmt=coff bfd_gas=yes;;
>
> ns32k-pc532-mach* | ns32k-pc532-ux*) fmt=aout em=pc532mach ;;
> ns32k-pc532-netbsd* | ns32k-pc532-lites*) fmt=aout em=nbsd532 ;;
--
Joel Sherrill, Ph.D. Director of Research & Development
joel@OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985
libgcc2.s.gz