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: BFD 2.16.1 "assertion failure" and "internal error"


Hi Dan,

I have generated a set of .o files that binutils can handle http://www.cs.cornell.edu/marques/bfdexample/alpha.tar.

objcopy a.o
BFD: BFD 2.16.1 assertion fail ../../binutils-2.16.1/bfd/coff-alpha.c:607

Thanks. This failure appears to be due to an overly conservative assertion. Please try the attached patch which fixes the problem for me. (The patch changes a magic value from 14 to 15. There is no comment explaining where this magic value came from, which is another reason why I hate seeing raw constants in source code).


Cheers
  Nick

Index: bfd/coff-alpha.c
===================================================================
RCS file: /cvs/src/src/bfd/coff-alpha.c,v
retrieving revision 1.31
diff -c -3 -p -r1.31 coff-alpha.c
*** bfd/coff-alpha.c	6 Jul 2005 10:35:41 -0000	1.31
--- bfd/coff-alpha.c	13 Jul 2005 15:52:20 -0000
*************** alpha_ecoff_swap_reloc_out (abfd, intern
*** 604,610 ****
      }
  
    BFD_ASSERT (intern->r_extern
! 	      || (intern->r_symndx >= 0 && intern->r_symndx <= 14));
  
    H_PUT_64 (abfd, intern->r_vaddr, ext->r_vaddr);
    H_PUT_32 (abfd, symndx, ext->r_symndx);
--- 604,610 ----
      }
  
    BFD_ASSERT (intern->r_extern
! 	      || (intern->r_symndx >= 0 && intern->r_symndx <= 15));
  
    H_PUT_64 (abfd, intern->r_vaddr, ext->r_vaddr);
    H_PUT_32 (abfd, symndx, ext->r_symndx);

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