
Jeff Mann wrote:
Technically, you write: "function_no is defined by the enum type of _exports.h, so it must be included in the stand alone program."
I will reject this patch. As the name "_exports.h" suggests, it is intended to contain implementation internals that are not supposed to be used by application code.
Let me clearify (then I can update the doucmentation if we come up with a better description). As you know, the list of functions in _exports.h is used to create the enumerated type: XF_get_version 0, XF_getc 1, XF_tstc 2, ... Etc. So as long as the user has included exports.h or has uses some other means to identify the function's jump table inxex number in his/her stand along program, he can know if that function is available in u-boot.
This is useful when, for exmaple, a company builds boards both with and without NAND support. A stand along program will be able to know that that board was loaded with a u-boot that did not incude NAND support.
[snip]
-JM
What would be Really Cool[tm] would be to enhance the elf loading capability to resolve unresolved link addresses for the standalone application entry points. Then the standalone program could be loaded by u-boot with the interfaces fixed up by the elf loader. This would eliminate all the problems of jump tables and keeping them synchronized.
http://www.gnu.org/software/binutils/manual/html_chapter/binutils_14.html http://www.linuxjournal.com/article/1059 http://www.linuxjournal.com/article/1060
Possible problems that come to mind... * Code bloat * The coupling between GPL u-boot and potentially proprietary standalone programs arguably is tighter. In practical terms, I don't see this as an issue, but it really isn't my call. I would contend this is similar to linux loadable device drivers and the current standalone programs have license to call back into u-boot - the same functions, simply a different interface mechanism. * My ignorance may be making a molehill out of a mountain of work * So many interesting things to do, so little time :-(
Best regards, gvb