Re: loadModule() problem!!!
On Aug 27, 7:32 am, Bobby <newcarcr...@gmail.com> wrote:[color=blue]
> Hi, everyone:
>
> I case a big problem about loadModule() function. Wnen I use
> loadModule() function to load a module, the terminal show me the error
> message "undefined symbols".
> I don't know why! Because on my partner's computer, this problem is
> disappear, the his code is same to me.
> I run my code on the simulator.
>
> Is anyone have some solutions or had been cased the same problem.
> Please give me some ideas. I have been solved this problem for more
> than one week.[/color]
Do you included the INCLUDE_LOADER and INCLUDE_UNLOADER components?
--sadashiv
Re: loadModule() problem!!!
Sadashiv wrote:
[color=blue]
>On Aug 27, 7:32 am, Bobby <newcarcr...@gmail.com> wrote:[color=green]
>> Hi, everyone:
>>
>> I case a big problem about loadModule() function. Wnen I use
>> loadModule() function to load a module, the terminal show me the error
>> message "undefined symbols".
>> I don't know why! Because on my partner's computer, this problem is
>> disappear, the his code is same to me.
>> I run my code on the simulator.
>>
>> Is anyone have some solutions or had been cased the same problem.
>> Please give me some ideas. I have been solved this problem for more
>> than one week.[/color]
>
>Do you included the INCLUDE_LOADER and INCLUDE_UNLOADER components?[/color]
I suspect that INCLUDE_LOADER must be included because loadModule() would
otherwise not be available. Sandashiv has the right idea, though.
When an application module is loaded, in addition to actually loading the
data into memory, a final link is performed. This amounts largely of
fixing the addresses of the application module's calls to OS components.
This is required becuase, at the time the application module was compiled
and linked, the locations of the OS components could not be known. This
also means that it could not be known whether the OS components would
actually exist and, when missing, all that can be done is to report the
undefined symbols.
To fix the problem, one needs to figure out the OS components that will
provide the undefined sysmbols (This can usually be done based on the
missing synbols' names.), then reconfigure, rebuild, and load the modified
OS.
The reason Bobby's application loads without error on his partner's computer
is all but certainly becuase the OS his partner loads already includes
the required components. One way to fix Bobby's problem, then, would be
for hime ot obtain and use the project file his partner uses to build his OS.
--
========================================================================
Michael Kesti | "And like, one and one don't make
| two, one and one make one."
mrkesti at hotmail dot com | - The Who, Bargain
Re: loadModule() problem!!!
On Aug 27, 12:22 pm, Sadashiv <sadashiv.madiwa...@gmail.com> wrote:[color=blue]
> On Aug 27, 7:32 am, Bobby <newcarcr...@gmail.com> wrote:
>[color=green]
> > Hi, everyone:[/color]
>[color=green]
> > I case a big problem about loadModule() function. Wnen I use
> > loadModule() function to load a module, the terminal show me the error
> > message "undefined symbols".
> > I don't know why! Because on my partner's computer, this problem is
> > disappear, the his code is same to me.
> > I run my code on the simulator.[/color]
>[color=green]
> > Is anyone have some solutions or had been cased the same problem.
> > Please give me some ideas. I have been solved this problem for more
> > than one week.[/color]
>
> Do you included the INCLUDE_LOADER and INCLUDE_UNLOADER components?
>
> --sadashiv[/color]
Yes, I add the "TARGET LOADER" and "TARGET UNLOADER" in the
simulator's Vxworks image. But the problem still happened. And I found
a solution is that loading the main function itself. I think this is a
stupid solution. Haha.
But after my partner loading module, he cased another oddness
problems. I described the problem below.
Here we define a variable in the main function. And after we loading
the module, we change the value of this variable in the function which
defined in the loading-module. From printing information, we found
that although the value of variable changed in the loading-module's
function, but after that, we found the variable's value doesn't change
in the main function. Why? After some deeper checking of our program,
we found that the variable's pointer in the main function is different
from in the loading-module. Why?
Does any one giva us some detail explanation for this situation?
Thanks a lot Michael and sadashiv.