Re: [U-Boot-Users] booting elf image?

[Please keep the list on cc:]
In message 8bf247760608010750n4da0cde9u376a2b521ed05187@mail.gmail.com you wrote:
That is the reason i have built executable which is statically linked.
isnt this enough?.
No, of course not.
As I wrote in my first reply, you need at least a basic understanding of the operating system, of the system services provided by an OS, of the libraries that are based on these services, and of the run-time environments for C programs.
In your code you use the printf() function - guess what it does? It will boil down to using some system calls - like write(). This is a service provided by your OS. Also it relies on concepts like standard I/O streams (namely, stdout), which in turn relies on the standard file descriptors 0, 1, and 2 being set up by your OS. The whole concept of a "process" and it's environment (virtual address space, open file descriptors, etc.) is highly OS dependent.
Do you think another OS (say, Windoze) would provide exactly teh same (binary compatible!) system call interface? Or process environment?
And do you really think a simple boot loader like U-Boot would provide such services?
Well, let me tell you: it ain't so.
Your a.out program will only run in a Linux environment (or in one which is compatible - for example, it is possible to run Linux binaries under FreeBSD).
Best regards,
Wolfgang Denk

yes sir, got your point.
stupid of me!
Thanks.
regards, sriram
participants (2)
-
Ram
-
Wolfgang Denk