Re: m68k: Simple loop compiles into boundless recursion with -O2

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

 



Many thanks, Alexander,

> Please invoke objdump with -dr instead to see the relocations.

Indeed:

  1a:	4eb9 0000 0000 	jsr 0 <memset2>
			1c: R_68K_32	memset

> The relocation associated with this instruction should point to memset.
> Most likely the compiler is optimizing your memset2 function to call
> the standard function 'memset'.
> 
> When implementing memset itself you need to pass -ffreestanding to GCC,
> which will disable this optimization.

Yes, I had -nostdlib but -ffreestanding is apparently needed as well. Thanks
again.

Fredrik



[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