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

[microblaze-uclinux] hang of user app on its startup (bad image file because of a tool chain bug?)



Hi,

Big problem here:
Often my user app doesn't start, better to say it hangs before reaching the
main() function.
I compile and link the program with mb-gcc 3.4.1 (Xilinx EDK 8.1 Build
EDK_I.15 290805) on SuSE-Linux and generate the image this way:
  mb-flthdr -z -o ...
  zflat ...
After that I put it in Linux' romfs/bin and start it out of the uclinux
startscript on Linux boot-up.

First I suspected the filesizes of my user app to be not aligned or such
things. Here's a list of program sizes (in bytes) I had, '!' means that it
hung:
296059 !
296053 !
296356
296205 !
296160
288998
294000
294003 !
297219
297236
298160
298389
300408 !
300601

The strange thing is, in case that it hangs I just have to comment out or in
any little C sourcecode and after recompiling it starts up normally.
Usually, I just comment out a little printf call. I'm sure I don't have a
stack overflow but it shouldn't matter anyway since it hangs before reaching
the main loop. Maybe it's interesting that I have some global struct
instances in the program but actually not huge ones.
And it doesn't matter whether I recompile without optimizer or with -O3.

After all it seems to me mb-flthdr or zflat has a bug which only hits me
sometimes.
Do you have any idea, or have you seen such problems, too?

Cheers
F@lk

P.S.: In case of such hangs, the Win32 and SuSE-Linux compiled version of
the same user app works without probs, though of course they differ in some
platform-specific code.
___________________________
microblaze-uclinux mailing list
microblaze-uclinux@xxxxxxxxxxxxxx
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/