One more libbfd question...

Chris Lattner sabre@skylab.org
Sat May 27 03:05:00 GMT 2000


Okay, I'm running into a segfault in libbfd... just after  bfd_openr, and
check for succes, I'm calling bfd_get_symtab_upper_bound, and it dies.  It
segfaults in _bfd_elf_get_symtab_upper_bound, elf.c:3982

According to bfd.h, I'm using #define BFD_VERSION  "2.9.1.0.23".  I'm on
an x86 elf box (linux)...  is this a known problem?  It seems bizare,
since nm works flawlessly on the object, as well as other system
utils... which I would assume use libbfd?  Anyways, here's the code I'm
using:

  NewMod->BFD = bfd_openr(Filename, 0);
  if (NewMod->BFD == 0) {
    bfd_free(NewMod);
    return 0;
  }

  printf("Upper Bound=%d\n",
               bfd_get_symtab_upper_bound(NewMod->BFD));


-Chris



More information about the Binutils mailing list