This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Possible bug in ar (binutils-2.11.x, binutils-2.10.x)
- To: binutils at sources dot redhat dot com
- Subject: Possible bug in ar (binutils-2.11.x, binutils-2.10.x)
- From: Radu Cornea <radu at ics dot uci dot edu>
- Date: Thu, 28 Jun 2001 15:36:23 -0700 (PDT)
- MMDF-Warning: Parse error in original version of preceding line at gremlin-relay.ics.uci.edu
Hi,
I am trying to compile a cross gcc for powerpc-ibm-aix4.3.2 on a
sparc-sun-solaris2.7 host, using the following packages:
binutils-2.11.2
gcc-3.0
newlib-1.9.0
After compiling binutils, I get a segmentation fault from ar when
compiling gcc.
A simplified the command line that gives the segmentation fault looks like
this:
./ar rc libgcc.a _muldi3.o _divdi3.o
I uploaded the binaries (ar and the object files) on the web:
http://www.ics.uci.edu/~radu/ar_bug
This is the stack trace I got from gdb after ar crashed:
(gdb) r rc ./libgcc.a ./_muldi3.o ./_divdi3.o
Starting program: /extra/radu0/temp/ppc-ar-bug/ar rc ./libgcc.a ./_muldi3.o ./_divdi3.o
Program received signal SIGSEGV, Segmentation fault.
0x2b824 in _bfd_xcoff_write_archive_contents (abfd=0x5f540)
at /home/radu/local/src/ppc-one-30/src/bfd/coff-rs6000.c:2335
2335 if (! xcoff_big_format_p (abfd))
(gdb) bt
#0 0x2b824 in _bfd_xcoff_write_archive_contents (abfd=0x5f540)
at /home/radu/local/src/ppc-one-30/src/bfd/coff-rs6000.c:2335
#1 0x1f3a0 in bfd_close (abfd=0x5f540)
at /home/radu/local/src/ppc-one-30/src/bfd/opncls.c:413
#2 0x17dbc in open_inarch (archive_filename=0xffbef2ff "./libgcc.a",
file=0x5f540 "ÿ¾òÿ")
at /home/radu/local/src/ppc-one-30/src/binutils/ar.c:773
#3 0x17820 in main (argc=5, argv=0xffbef160)
at /home/radu/local/src/ppc-one-30/src/binutils/ar.c:663
I tried generating ar from different binutils packages (2.11.x,
2.10.x) and they all give the same error. Only binutils 2.9.1 seem to
work correctly and with it I managed to finish compiling gcc (but not
newlib).
-- Radu