From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23618 invoked by alias); 17 Feb 2011 00:11:25 -0000 Received: (qmail 23602 invoked by uid 22791); 17 Feb 2011 00:11:22 -0000 X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from mail-iw0-f169.google.com (HELO mail-iw0-f169.google.com) (209.85.214.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 17 Feb 2011 00:11:17 +0000 Received: by iwc10 with SMTP id 10so1976858iwc.0 for ; Wed, 16 Feb 2011 16:11:15 -0800 (PST) MIME-Version: 1.0 Received: by 10.42.229.199 with SMTP id jj7mr1741298icb.510.1297901475741; Wed, 16 Feb 2011 16:11:15 -0800 (PST) Received: by 10.42.239.10 with HTTP; Wed, 16 Feb 2011 16:11:15 -0800 (PST) Date: Thu, 17 Feb 2011 00:11:00 -0000 Message-ID: Subject: bfd_get_section_size() returns zero? From: Reid Linnemann To: binutils@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2011-02/txt/msg00201.txt.bz2 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