Re: Assembler instructions not being created correctly for mutiplication in GCC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



MichaelMontcalm wrote:

> 
> #include <stdio.h>
> int main()
> {
> int i;
> int a=2;
> int b=2;
> for (i=0;i<10;i++)
> {
> a=a*b;
> }
> return 0;
> }
> 
> However, in the *.o file, the line where a multiplication assembler
> instruction should be is the line:
> 
> 40 00 00 00 call 28<main+0x28>

Use --reloc when disassembling.

> When I attempt to follow the same method to create the *.elf file, I receive
> the error "undefined reference to '.umul'"
> 
> I'm wondering if anyone has ever heard of this error, and if you know what
> I'm missing or where I messed up so that I can get this resolved.

.umul should be defined in libgcc.  I'm guessing that gcc
hasn't been intsalled correctly after you built it.

However, it might be something else.  Tell us exactly what you typed when
compiling this program.

Andrew.

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux