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