This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
bfd_get_section_size() returns zero?
- From: Reid Linnemann <linnemannr at gmail dot com>
- To: binutils at sourceware dot org
- Date: Wed, 16 Feb 2011 18:11:15 -0600
- Subject: bfd_get_section_size() returns zero?
I'm fairly new to BFD, so please bear with me. I'm making a quick and
dirty dwarf parser and using BFD to fetch the relevant .debug*
sections. After I fetch a section with bfd_get_section_by_name(), if I
attempt to get the section size with bfd_get_section_size(), thus far
on an amd64 system I have been getting the appropriate size, but on an
i386 system the same code is returning 0! All size members in the
asection struct are zero, and line_filepos appears to be an invalid
address. I don't understand. I can get the section contents with
bfd_malloc_and_get_section(), but no size information. This happens
with all sections AFAICT. Both systems are based on RHEL 5 and are
using the same binutils (2.17.50.0.6-12.el5). Can anyone assist?
Thanks,
Reid