DENX . DULG . MyStandaloneProgramDoesNotWork |
hellow_world.c
demo program. This works well as soon as I only add code to the
existing hello_world() function, but as soon as I add some
functions of my own, things go all haywire: the code of the
hello_world() function does not get executed correctly, and my
new function gets called with unexpected arguments.
What's wrong?
nm
program:
$ ${CROSS_COMPILE}nm -n examples/hello_world 0000000000040004 T testfunc 0000000000040058 T hello_world 000000000004016c t dummy ...As you can see, the entry point (function hello_world()) is no longer at 0x40004 as it was before and as it's documented. Instead, it is now at 0x40058. So you have to start your standalone program at this address, and everything should work well.
----- Revision r1.3 - 26 Dec 2008 - 16:45 - WolfgangDenk
|