This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
One more libbfd question...
- To: binutils at sourceware dot cygnus dot com
- Subject: One more libbfd question...
- From: Chris Lattner <sabre at skylab dot org>
- Date: Sat, 27 May 2000 03:05:37 -0700 (PDT)
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