public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* XCOFF 64 function address wrong?
@ 2005-03-09  8:14 David Lecomber
  2005-03-09 12:53 ` Nick Clifton
  0 siblings, 1 reply; 13+ messages in thread
From: David Lecomber @ 2005-03-09  8:14 UTC (permalink / raw)
  To: binutils

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 <david@allinea.com>

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2005-05-17 12:55 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-09  8:14 XCOFF 64 function address wrong? David Lecomber
2005-03-09 12:53 ` Nick Clifton
2005-03-09 14:54   ` David Lecomber
2005-03-09 15:39     ` Nick Clifton
2005-03-09 17:52       ` David Lecomber
2005-03-10 10:22         ` Nick Clifton
2005-03-10 21:56           ` David Lecomber
2005-03-11 10:37             ` Nick Clifton
2005-03-24  2:03               ` David Lecomber
2005-04-04 16:19                 ` Nick Clifton
2005-04-15 11:49                   ` Nick Clifton
2005-05-16 17:07                   ` David Lecomber
2005-05-17 13:04                     ` Nick Clifton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).