loadModule() problem!!! - VxWorks

This is a discussion on loadModule() problem!!! - VxWorks ; 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 ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: loadModule() problem!!!

  1. loadModule() problem!!!

    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.


  2. Re: loadModule() problem!!!

    On Aug 27, 7:32 am, Bobby wrote:
    > 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.


    Do you included the INCLUDE_LOADER and INCLUDE_UNLOADER components?

    --sadashiv


  3. Re: loadModule() problem!!!

    Sadashiv wrote:

    >On Aug 27, 7:32 am, Bobby wrote:
    >> 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.

    >
    >Do you included the INCLUDE_LOADER and INCLUDE_UNLOADER components?


    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

  4. Re: loadModule() problem!!!

    On Aug 27, 12:22 pm, Sadashiv wrote:
    > On Aug 27, 7:32 am, Bobby wrote:
    >
    > > 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.

    >
    > Do you included the INCLUDE_LOADER and INCLUDE_UNLOADER components?
    >
    > --sadashiv



    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.


+ Reply to Thread