This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Bad profiling code from gcc-3.2 for m68k-linux
- From: Andreas Schwab <schwab at suse dot de>
- To: Peter Barada <pbarada at mail dot wm dot sps dot mot dot com>
- Cc: binutils at sources dot redhat dot com, Peter dot Barada at motorola dot com
- Date: Tue, 27 Aug 2002 16:08:08 +0200
- Subject: Re: Bad profiling code from gcc-3.2 for m68k-linux
- References: <200208262209.g7QM9sv22779@hyper.wm.sps.mot.com>
Peter Barada <pbarada@mail.wm.sps.mot.com> writes:
|> I'm trying to build a m68k-linux gcc compiler for coldfire, and its
|> producing the follwoing code sequence for profiling:
|>
|> tanMp:
|> link.w %a6,#-332
|> move.l %d2,-(%sp)
|> .data
|> .align 2
|> .LP1:
|> .long 0
|> .text
|> lea (.LP1,%pc),%a1
|> jbsr _mcount
|>
|> The lea doesn't look right. I'm assuming its trying to put the
|> address of .LP1 into %a1 before calling _mcount. If so, that syntax
|> looks like its placing the *sum* of .LP1 and %pc into %a1.
That's correct. The assembler makes .LP1 a pc-relative reference.
|> Should this be:
|>
|> lea (.LP1@PLTPC,%pc),%a1
|>
|> and what does @PLTPC (as well as @GOTPC, @GOT) mean?
That's for ELF style PIC.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."