This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Bogus position independent code(PIC) emitted for ColdFire v4e
- From: Andreas Schwab <schwab at suse dot de>
- To: Peter Barada <pbarada at mail dot wm dot sps dot mot dot com>
- Cc: gcc at gcc dot gnu dot org, Peter dot Barada at motorola dot com, peter at baradas dot org
- Date: Fri, 06 Dec 2002 17:10:02 +0100
- Subject: Re: Bogus position independent code(PIC) emitted for ColdFire v4e
- References: <200212061555.gB6FtWK21936@hyper.wm.sps.mot.com>
Peter Barada <pbarada@mail.wm.sps.mot.com> writes:
|> I'm in the midst of bringin up a Linux kernel for a ColdFire v4e, and
|> I've just fallen into the rathole of dealing with PIC code.
|>
|> Near the beggining of the init process, 'call_gmon_start' is called,
|> and its code currently looks like:
|>
|> 800000f8 <call_gmon_start>:
|> 800000f8: 4e56 0000 linkw %fp,#0
|> 800000fc: 2f0d movel %a5,%sp@-
|> 800000fe: 2a7c 0005 c830 moveal #378928,%a5
|> 80000104: 4bfb d8fa lea %pc@(80000100 <call_gmon_start+0x8>,%a5:l),%a5
|> 80000108: 2075 0170 0000 moveal %a5@(00000018),%a0
|> 8000010e: 0018
|> 80000110: 4a88 tstl %a0
|>
|> Unfortunately ColdFire v4e can't handle the addressing mode of the
|> instruction at 0x80000108 since that requires a 32 bit offset.
Try -fpic instead of -fPIC. The former generates 16 bit GOT offsets which
should be supported by the coldfire. That distinction is made in
m68k.c:print_operand_address.
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."