Testcase https://bugzilla.redhat.com/attachment.cgi?id=440004
in https://bugzilla.redhat.com/show_bug.cgi?id=623687 used to cause linker crash: /export/home/hjl/bugs/binutils/merge-3/bz623687/ld: i386 architecture of input file `libtiff.a(tif_close.o)' is incompatible with i386:x86-64 output /export/home/hjl/bugs/binutils/merge-3/bz623687/ld: i386 architecture of input file `libtiff.a(tif_dir.o)' is incompatible with i386:x86-64 output /export/home/hjl/bugs/binutils/merge-3/bz623687/ld: i386 architecture of input file `libtiff.a(tif_dirinfo.o)' is incompatible with i386:x86-64 output /export/home/hjl/bugs/binutils/merge-3/bz623687/ld: i386 architecture of input file `libtiff.a(tif_dirread.o)' is incompatible with i386:x86-64 output /export/home/hjl/bugs/binutils/merge-3/bz623687/ld: i386 architecture of input file `libtiff.a(tif_error.o)' is incompatible with i386:x86-64 output /export/home/hjl/bugs/binutils/merge-3/bz623687/ld: i386 architecture of input file `libtiff.a(tif_flush.o)' is incompatible with i386:x86-64 output /export/home/hjl/bugs/binutils/merge-3/bz623687/ld: i386 architecture of input file `libtiff.a(tif_getimage.o)' is incompatible with i386:x86-64 output /export/home/hjl/bugs/binutils/merge-3/bz623687/ld: i386 architecture of input file `libtiff.a(tif_open.o)' is incompatible with i386:x86-64 output /export/home/hjl/bugs/binutils/merge-3/bz623687/ld: i386 architecture of input file `libtiff.a(tif_read.o)' is incompatible with i386:x86-64 output /export/home/hjl/bugs/binutils/merge-3/bz623687/ld: i386 architecture of input file `libtiff.a(tif_strip.o)' is incompatible with i386:x86-64 output /export/home/hjl/bugs/binutils/merge-3/bz623687/ld: i386 architecture of input file `libtiff.a(tif_swab.o)' is incompatible with i386:x86-64 output /export/home/hjl/bugs/binutils/merge-3/bz623687/ld: i386 architecture of input file `libtiff.a(tif_tile.o)' is incompatible with i386:x86-64 output /export/home/hjl/bugs/binutils/merge-3/bz623687/ld: i386 architecture of input file `libtiff.a(tif_unix.o)' is incompatible with i386:x86-64 output /export/home/hjl/bugs/binutils/merge-3/bz623687/ld: i386 architecture of input file `libtiff.a(tif_warning.o)' is incompatible with i386:x86-64 output /export/home/hjl/bugs/binutils/merge-3/bz623687/ld: i386 architecture of input file `libtiff.a(tif_write.o)' is incompatible with i386:x86-64 output /export/home/hjl/bugs/binutils/merge-3/bz623687/ld: i386 architecture of input file `libtiff.a(tif_aux.o)' is incompatible with i386:x86-64 output /export/home/hjl/bugs/binutils/merge-3/bz623687/ld: i386 architecture of input file `libtiff.a(tif_color.o)' is incompatible with i386:x86-64 output /export/home/hjl/bugs/binutils/merge-3/bz623687/ld: i386 architecture of input file `libtiff.a(tif_compress.o)' is incompatible with i386:x86-64 output /export/home/hjl/bugs/binutils/merge-3/bz623687/ld: i386 architecture of input file `libtiff.a(tif_dirwrite.o)' is incompatible with i386:x86-64 output /export/home/hjl/bugs/binutils/merge-3/bz623687/ld: i386 architecture of input file `libtiff.a(tif_codec.o)' is incompatible with i386:x86-64 output /export/home/hjl/bugs/binutils/merge-3/bz623687/ld: i386 architecture of input file `libtiff.a(tif_dumpmode.o)' is incompatible with i386:x86-64 output /export/home/hjl/bugs/binutils/merge-3/bz623687/ld: i386 architecture of input file `libtiff.a(tif_fax3.o)' is incompatible with i386:x86-64 output /export/home/hjl/bugs/binutils/merge-3/bz623687/ld: i386 architecture of input file `libtiff.a(tif_fax3sm.o)' is incompatible with i386:x86-64 output /export/home/hjl/bugs/binutils/merge-3/bz623687/ld: i386 architecture of input file `libtiff.a(tif_luv.o)' is incompatible with i386:x86-64 output /export/home/hjl/bugs/binutils/merge-3/bz623687/ld: i386 architecture of input file `libtiff.a(tif_lzw.o)' is incompatible with i386:x86-64 output /export/home/hjl/bugs/binutils/merge-3/bz623687/ld: i386 architecture of input file `libtiff.a(tif_next.o)' is incompatible with i386:x86-64 output /export/home/hjl/bugs/binutils/merge-3/bz623687/ld: i386 architecture of input file `libtiff.a(tif_packbits.o)' is incompatible with i386:x86-64 output /export/home/hjl/bugs/binutils/merge-3/bz623687/ld: i386 architecture of input file `libtiff.a(tif_pixarlog.o)' is incompatible with i386:x86-64 output /export/home/hjl/bugs/binutils/merge-3/bz623687/ld: i386 architecture of input file `libtiff.a(tif_predict.o)' is incompatible with i386:x86-64 output /export/home/hjl/bugs/binutils/merge-3/bz623687/ld: i386 architecture of input file `libtiff.a(tif_thunder.o)' is incompatible with i386:x86-64 output /export/home/hjl/bugs/binutils/merge-3/bz623687/ld: i386 architecture of input file `libtiff.a(tif_zip.o)' is incompatible with i386:x86-64 output libtiff.a(tif_pixarlog.o): In function `.L108': (.text.PixarLogVSetField+0x108): undefined reference to `deflateParams' libtiff.a(tif_pixarlog.o): In function `PixarLogCleanup': (.text.PixarLogCleanup+0xfe): undefined reference to `inflateEnd' libtiff.a(tif_pixarlog.o): In function `PixarLogCleanup': (.text.PixarLogCleanup+0x10b): undefined reference to `deflateEnd' libtiff.a(tif_pixarlog.o): In function `PixarLogPostEncode': (.text.PixarLogPostEncode+0x3f): undefined reference to `deflate' libtiff.a(tif_pixarlog.o): In function `.L160': (.text.PixarLogEncode+0x62c): undefined reference to `deflate' libtiff.a(tif_pixarlog.o): In function `PixarLogPreEncode': (.text.PixarLogPreEncode+0x38): undefined reference to `deflateReset' libtiff.a(tif_pixarlog.o): In function `.L485': (.text.PixarLogDecode+0x101): undefined reference to `inflate' libtiff.a(tif_pixarlog.o): In function `.L485': (.text.PixarLogDecode+0x159): undefined reference to `inflateSync' libtiff.a(tif_pixarlog.o): In function `PixarLogPreDecode': (.text.PixarLogPreDecode+0x38): undefined reference to `inflateReset' libtiff.a(tif_pixarlog.o): In function `PixarLogSetupDecode': (.text.PixarLogSetupDecode+0xf0): undefined reference to `inflateInit_' libtiff.a(tif_pixarlog.o): In function `PixarLogSetupEncode': (.text.PixarLogSetupEncode+0xee): undefined reference to `deflateInit_' libtiff.a(tif_zip.o): In function `ZIPCleanup': (.text.ZIPCleanup+0x87): undefined reference to `inflateEnd' libtiff.a(tif_zip.o): In function `ZIPCleanup': (.text.ZIPCleanup+0x9b): undefined reference to `deflateEnd' libtiff.a(tif_zip.o): In function `ZIPPostEncode': (.text.ZIPPostEncode+0x3f): undefined reference to `deflate' libtiff.a(tif_zip.o): In function `ZIPEncode': (.text.ZIPEncode+0x59): undefined reference to `deflate' libtiff.a(tif_zip.o): In function `ZIPPreEncode': (.text.ZIPPreEncode+0x4f): undefined reference to `deflateReset' libtiff.a(tif_zip.o): In function `ZIPSetupEncode': (.text.ZIPSetupEncode+0x51): undefined reference to `deflateInit_' libtiff.a(tif_zip.o): In function `ZIPSetupEncode': (.text.ZIPSetupEncode+0x74): undefined reference to `inflateEnd' libtiff.a(tif_zip.o): In function `ZIPDecode': (.text.ZIPDecode+0x5b): undefined reference to `inflate' libtiff.a(tif_zip.o): In function `ZIPDecode': (.text.ZIPDecode+0xa9): undefined reference to `inflateSync' libtiff.a(tif_zip.o): In function `ZIPPreDecode': (.text.ZIPPreDecode+0x4f): undefined reference to `inflateReset' libtiff.a(tif_zip.o): In function `ZIPSetupDecode': (.text.ZIPSetupDecode+0x4a): undefined reference to `inflateInit_' libtiff.a(tif_zip.o): In function `ZIPSetupDecode': (.text.ZIPSetupDecode+0x6c): undefined reference to `deflateEnd' libtiff.a(tif_zip.o): In function `ZIPVSetField': (.text.ZIPVSetField+0x75): undefined reference to `deflateParams' /export/home/hjl/bugs/binutils/merge-3/bz623687/ld: BFD version 2.20.51.0.2-22.0.f13 20091009 assertion fail elf64-x86-64.c:3914 /export/home/hjl/bugs/binutils/merge-3/bz623687/ld: BFD version 2.20.51.0.2-22.0.f13 20091009 assertion fail elf64-x86-64.c:3914 /export/home/hjl/bugs/binutils/merge-3/bz623687/ld: BFD version 2.20.51.0.2-22.0.f13 20091009 assertion fail elf64-x86-64.c:3914 /export/home/hjl/bugs/binutils/merge-3/bz623687/ld: BFD version 2.20.51.0.2-22.0.f13 20091009 assertion fail elf64-x86-64.c:3914 /export/home/hjl/bugs/binutils/merge-3/bz623687/ld: BFD version 2.20.51.0.2-22.0.f13 20091009 assertion fail elf64-x86-64.c:3914 /export/home/hjl/bugs/binutils/merge-3/bz623687/ld: BFD version 2.20.51.0.2-22.0.f13 20091009 assertion fail elf64-x86-64.c:3914 /export/home/hjl/bugs/binutils/merge-3/bz623687/ld: BFD version 2.20.51.0.2-22.0.f13 20091009 assertion fail elf64-x86-64.c:3914 /export/home/hjl/bugs/binutils/merge-3/bz623687/ld: BFD version 2.20.51.0.2-22.0.f13 20091009 assertion fail elf64-x86-64.c:3914 /export/home/hjl/bugs/binutils/merge-3/bz623687/ld: BFD version 2.20.51.0.2-22.0.f13 20091009 assertion fail elf64-x86-64.c:3914 /export/home/hjl/bugs/binutils/merge-3/bz623687/ld: BFD version 2.20.51.0.2-22.0.f13 20091009 assertion fail elf64-x86-64.c:3914 /export/home/hjl/bugs/binutils/merge-3/bz623687/ld: BFD version 2.20.51.0.2-22.0.f13 20091009 assertion fail elf64-x86-64.c:3914 /export/home/hjl/bugs/binutils/merge-3/bz623687/ld: BFD version 2.20.51.0.2-22.0.f13 20091009 assertion fail elf64-x86-64.c:3914 /export/home/hjl/bugs/binutils/merge-3/bz623687/ld: BFD version 2.20.51.0.2-22.0.f13 20091009 assertion fail elf64-x86-64.c:3914 Program received signal SIGSEGV, Segmentation fault. 0x0000003e132834d2 in __mempcpy_sse2 () from /lib64/libc.so.6 (gdb) bt #0 0x0000003e132834d2 in __mempcpy_sse2 () from /lib64/libc.so.6 #1 0x0000003e13273e7e in _IO_default_xsputn_internal () from /lib64/libc.so.6 #2 0x0000003e13270fc2 in _IO_new_file_xsputn () from /lib64/libc.so.6 #3 0x0000003e132673bd in fwrite () from /lib64/libc.so.6 #4 0x00000000004367cf in cache_bwrite (abfd=0x7aa6b0, where=0x0, nbytes=336) at cache.c:352 #5 0x0000000000435bd3 in bfd_bwrite (ptr=0x0, size=336, abfd=0x7aa6b0) at bfdio.c:252 #6 0x00000000004756ab in _bfd_elf_set_section_contents (abfd=0x7aa6b0, section=0x10368c8, location=0x0, offset=0, count=336) at elf.c:7402 #7 0x0000000000441775 in bfd_set_section_contents (abfd=0x7aa6b0, section=0x10368c8, location=0x0, offset=0, count=336) at section.c:1445 #8 0x0000000000492080 in bfd_elf_final_link (abfd=0x7aa6b0, info=0x796580) at elflink.c:11179 #9 0x000000000041cf53 in ldwrite () at ldwrite.c:568 #10 0x000000000041a3bf in main (argc=30, argv=0x7fffffffdc28) at ./ldmain.c:490 (gdb) After this checkin, http://sourceware.org/ml/binutils-cvs/2010-02/msg00018.html we now got libtiff.a: could not read symbols: File in wrong format I am not sure if it is the desired behavior. -- Summary: Differnt linker behavior with incompatible input files Product: binutils Version: 2.21 (HEAD) Status: NEW Severity: normal Priority: P2 Component: ld AssignedTo: unassigned at sources dot redhat dot com ReportedBy: hjl dot tools at gmail dot com CC: bug-binutils at gnu dot org,nickc at redhat dot com http://sourceware.org/bugzilla/show_bug.cgi?id=11933 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-binutils