This is the mail archive of the binutils@sourceware.cygnus.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]

One more libbfd question...



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


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