This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: PowerPC linking error messages


>-----Original Message-----
>From: David Dyck [mailto:dcd@tc.fluke.com]
>Sent: 05 February 2002 16:54

>On Tue, 5 Feb 2002 at 16:44 -0000, David Korn 
><dkorn@pixelpower.com> wrote:
>
>> >-----Original Message-----
>> >From: eddy@fericom.net [mailto:eddy@fericom.net]
>> >Sent: 04 February 2002 19:29
>>
>>
>>   Hi again Eddy!
>>
>>
>> >- I use the -S option with GCC to learn about the confusing 
>guts of RISC
>> >  assembler. Is there an option to GCC to add the C lines 
>that produced the
>> >  assembler as comments? I only found -fverbose-asm but 
>that didn't do.
>>
>>   Yes, the compiler doesn't seem to have any way to do this. 
> The best
>> option is to build your code using -g and -O0, then use objdump like:
>>
>>     powerpc-eabi-objdump -SD <.o file name>
>>
>> to get a listing back.
>
>I'm basically a lurker using the old mc68k cross tools, but
>I add the following flags to the gcc compile options to generate a
>mixed source and assembly listing - does this help?
>
>   -Wa,-adhln,-L -g -c
>

  It certainly does!  Most excellent!  Thank you.  I've seen people point
out that assembler flag before, but it hasn't worked in the vxworks-ppc
toolchain (based on gcc 2.7.2 and binutils 2.6) for such a long time that I
assumed it was a fault in ppc-eabi variants in general, and haven't tried
to use it in a long time.

  Eddy, that set of options is by far the better way of getting a listing!
I'd recommend using -O0 as well to make the code easier to follow (less
loop rearrangement and function inlining, for example) if the code doesn't
need to be used in a production setting.

  Thank you very much David!


        DaveK
-- 
Burn your ID card!  http://www.optional-identity.org.uk/
Help support the campaign, copy this into your .sig!


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]