This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Assembler instructions not being created correctly for mutiplication in GCC
MichaelMontcalm wrote:
>
>
> Andrew Haley wrote:
>> All this weirdness with linker scripts is usually only done when
>> targeting some kind of embedded system. If you're linking a program
>> for a Linux system, I suggest you simply do
>>
>> gcc -o xy.elf xy.o
>>
>> It might be that the Cmpware.lnk script contains the paths to gcc
>> libraries, and these paths are wrong. But of course, that support
>> needs to come from Cmpware, Inc.
> We're attempting to target a sparc-elf processor to run some simulation
> tests before using the code on a Leon3 processor. If I attempt to use the
> command above I get the error telling me I have no ctr0.o file.
Right, so now we are making progress.
> As for the Cmpware.lnk file, it appears to just reformat the code and
> provide DWARF debugging information. Once we move away from using the CMP-DK
> tool I probably won't need the lnk file. I'll try your suggestion about
> getting support from CMPWare Inc. In the interim, I will probably try your
> suggestion of llinking to libgcc.
Okay, I'm now looking at _Building the Gnu GCC Compiler_ in
http://www.cmpware.com/Docs/BuildingGcc.pdf and I can see what
they're trying to do. Makes sense.
You need to do something like
ld -g -e 0x0000 -T Cmpware.lnk -o xy.elf xy.o -Linstall/lib/gcc/x86_64-unknown-linux-gnu/4.4.0/ -lgcc
(with the obvious substitution for your architecture)
Andrew.