ar crashes building libgcc.a

Joern Rennecke joern.rennecke@superh.com
Thu Apr 22 14:29:00 GMT 2004


My i686-pc-linux-gnu X sh-elf gcc builds failed last night because ar
crashed while building libgcc.a .
I have reduced the link line to get a smaller test case that still fails.
The ar from the night before works fine; there were no changes to the
binutils sources.
These are the changes to bfd since the working ar was built:

> 2004-04-21  Chris Demetriou  <cgd@broadcom.com>
> 
> 	* coff-mips.c (bfd_mips_ecoff_create_embedded_relocs): Remove.
> 	* elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Remove.
> 	* bfd-in.h (bfd_mips_ecoff_create_embedded_relocs)
> 	(bfd_mips_elf32_create_embedded_relocs): Remove prototypes
> 	* bfd-in2.h: Regenerate.
> 
> 2004-04-21  Bob Wilson  <bob.wilson@acm.org>
> 
> 	* elf32-xtensa.c (is_same_value): Add final_static_link argument and
> 	require relocations against a weak symbol to reference the same
> 	symbol hash entry if not a final, static link.
> 	(get_cached_value, add_value_map): Add final_static_link argument.
> 	(remove_literals): Pass final_static_link argument as needed.
> 
> 2004-04-21  Andrew Cagney  <cagney@redhat.com>
> 
> 	* opncls.c (_bfd_new_bfd_contained_in): Copy "iovec".
> 	(struct opncls, opncls_btell, opncls_bseek, opncls_bread)
> 	(opncls_bwrite, opncls_bclose, opncls_bflush)
> 	(opncls_bstat, opncls_iovec, bfd_openr_iovec): Implement a
> 	bfd iovec that uses function callbacks.
> 	(bfd_close): Use the iovec's bclose.
> 	* cache.c (cache_btell, cache_bseek, cache_bread, cache_bwrite)
> 	(cache_bclose, cache_bflush, cache_bstat)
> 	(cache_iovec): New functions and global variable, implement a
> 	cache "iovec", where applicable set bfd_error.
> 	(bfd_cache_init, bfd_cache_close): Set/test the bfd's iovec.
> 	* bfdio.c (struct bfd_iovec): Define.
> 	(real_read): Delete function.
> 	(bfd_bread, bfd_bread, bfd_bwrite, bfd_tell, bfd_flush, bfd_stat)
> 	(bfd_seek, bfd_get_mtime, bfd_get_size): Use the bfd's "iovec",
> 	assume that bread and bwrite set bfd_error.
> 	* bfd.c (struct bfd): Add "iovec", update comments.
> 	* bfd-in2.h, libbfd.h: Re-generate.
> 
> 2004-04-21  Andrew Cagney  <cagney@redhat.com>
> 
> 	* libaout.h (enum machine_type): Add M_POWERPC_NETBSD.
> 
> 2004-04-21  Eric Botcazou  <ebotcazou@act-europe.fr>
> 
> 	* elflink.c (elf_gc_mark_dynamic_ref_symbol): New function.
> 	(bfd_elf_gc_sections): Fail if a shared object is being created.
> 	Do not fail if dynamic sections have been created.  Instead call
> 	elf_gc_mark_dynamic_ref_symbol to mark sections that contain
> 	dynamically referenced symbols.  Do not mark the whole graph
> 	rooted at .eh_frame, only the section proper.
> 

This is how the failure looks under gdb:

Script started on Thu Apr 22 14:53:57 2004
bash-2.05$ gdb /swbuild/nightly/3.4-2004-04-21/sh-elf/binutils/ar
GNU gdb Red Hat Linux 7.x (5.0rh-15) (MI_OUT)
Copyright 2001 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux"...
.gdbinit:5: Error in sourced command file:
../../srcw/gcc/gdbinit.in:100: Error in sourced command file:
Function "fancy_abort" not defined.
(gdb) run rc ./libgcc.a arbug/*.o
Starting program: /swbuild/nightly/3.4-2004-04-21/sh-elf/binutils/ar rc ./libgcc.a arbug/*.o

Program received signal SIGSEGV, Segmentation fault.
_IO_new_fclose (fp=0x0) at iofclose.c:52
52	iofclose.c: No such file or directory.
	in iofclose.c
(gdb) bt
#0  _IO_new_fclose (fp=0x0) at iofclose.c:52
#1  0x08051ff3 in bfd_cache_delete (abfd=0x80c85e0)
    at ../../srcw/bfd/cache.c:275
#2  0x08053860 in bfd_close (abfd=0x80c85e0) at ../../srcw/bfd/opncls.c:599
#3  0x0804bce1 in write_archive (iarch=0x80c85e0)
    at ../../srcw/binutils/ar.c:1105
#4  0x0804c1ea in replace_members (arch=0x80c85e0, files_to_move=0xbfffdf50, 
    quick=0) at ../../srcw/binutils/ar.c:1338
#5  0x0804b665 in main (argc=12, argv=0xbfffdf44)
    at ../../srcw/binutils/ar.c:694
#6  0x4004f507 in __libc_start_main (main=0x804af08 <main>, argc=12, 
    ubp_av=0xbfffdf44, init=0x80490a8 <_init>, fini=0x80a2e20 <_fini>, 
    rtld_fini=0x4000dc14 <_dl_fini>, stack_end=0xbfffdf3c)
    at ../sysdeps/generic/libc-start.c:129
(gdb) frame 1
#1  0x08051ff3 in bfd_cache_delete (abfd=0x80c85e0)
    at ../../srcw/bfd/cache.c:275
275	  if (fclose ((FILE *) abfd->iostream) == 0)
(gdb) p abfd->iostream
$1 = (void *) 0x0
(gdb) quit
The program is running.  Exit anyway? (y or n) y
bash-2.05$ exit
exit
Script done on Thu Apr 22 14:54:59 2004

The failure looks the same with bfd from the current head (15:03 GMT).

These are the object files I have been linking in the above gdb session:

begin 644 arbug.tgz
M'XL(`-O-AT```^U;36P;UQ$>4DHL6JYC)YO`5HR4EN6$DB5J_TBKAB!L%55P
M#$5=2R[K.*Y)2J0MNA1EB)3JH']&$!0HXB)!T5/1!CX5/11-"O200X#T%J#(
M(2AZ*(H>TJ(H>BB"].<8H)WASI*[;[D@C8HKMWG?>G9WY@UG9]];S;Q]LRYN
MK^W<F(:^0E5-]6PF@T<UD\FJ=%0UTVP>&:"ADG;6S&8-;-=T-:-!,M-?MQSL
MU!O%[602MLNU6GG]J^6;H7KE[7H4#D6+8G/\\\7Z1N5Z8[N1WNK#-50<W*PS
MWIW&WS`,LS7^1E9'?5/7LI!4^^!+`)_R\?_V%Y868_%86Q"#B>:^C5\V>;-Y
MGH(#,+@P!L/FA863GFU\X3@,EY9],I2B[(N"S+?!,!$D(%U_:;-17,,C/H3-
MXX9[UBC?;D"Z5&P4(;U6O\\A>)+OY6'FZ2Y6/.UQ/IYDO0'FOR/8<?OC&:2A
M'O2.>G1<O<D.>C&/#\2^C^P=]O<`TB#2$:2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