From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17857 invoked by alias); 9 Mar 2005 08:14:20 -0000 Mailing-List: contact binutils-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sources.redhat.com Received: (qmail 15062 invoked from network); 9 Mar 2005 08:12:50 -0000 Received: from unknown (HELO webmail.streamline-computing.com) (82.133.39.164) by sourceware.org with SMTP; 9 Mar 2005 08:12:50 -0000 Received: from [80.6.111.103] (helo=cpc2-oxfd5-5-0-cust103.oxfd.cable.ntl.com) by webmail.streamline-computing.com with asmtp (Exim 3.35 #1 (Debian)) id 1D8wJQ-0001rM-00 for ; Wed, 09 Mar 2005 08:13:00 +0000 Subject: XCOFF 64 function address wrong? From: David Lecomber To: binutils@sources.redhat.com Content-Type: text/plain Date: Wed, 09 Mar 2005 08:14:00 -0000 Message-Id: <1110356435.7150.2.camel@cpc2-oxfd5-5-0-cust103.oxfd.cable.ntl.com> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-SW-Source: 2005-03/txt/msg00258.txt.bz2 Reposting this because it didn't make it into the mailing list archive, so I guess it didn't make it elsewhere (although it did go through to GDB and its archive) I have a 64-bit AIX 5.2 XLC 7 compiled hello world binary. I've built up gdb and binutils with --enable-64-bit-bfd - from latest CVS. In GDB, it miscalculates the main(), as 0x428 (instead of 0x10000428). I think the trouble could be within the binutils bfd package, used by GDB. So, in using a fresh binutils's "objdump -t": [snip] AUX val 104 prmhsh 0 snhsh 0 typ 1 algn 3 clss 0 stb 0 snstb 0 [ 89](sec 1)(fl 0x00)(ty 20)(scl 2) (nx 2) 0x00000428 .main AUX tagndx 0 ttlsiz 0x68 lnnos 2806 next 100 AUX indx 87 prmhsh 0 snhsh 0 typ 2 algn 0 clss 0 stb 0 snstb 0 .main : 1 : 0x43c 2 : 0x44c [snip] Note the 0x0000428 .main, and the line number info following it, all have the wrong address.. Assuming that this is what ought to be being displayed. Curiously, if I then ask objdump to "objdump -S" it gets things right: [snip] 0000000100000428 <.main>: 100000428: 7c 08 02 a6 mflr r0 10000042c: fb e1 ff f8 std r31,-8(r1) 100000430: f8 01 00 10 std r0,16(r1) 100000434: f8 21 ff 81 stdu r1,-128(r1) 100000438: eb e2 00 80 ld r31,128(r2) [snip] For comparison, with a GCC compiled executable, those numbers are the real addresses of the functions, and GDB gets breakpoints correct. I'm willing to put some time in to getting this sorted out, but at present don't know what I'm looking for -- so any help greatly appreciated. Regards David -- David Lecomber