• Issue with dynamiclibrary loading

    From Valery Azbel@21:1/5 to All on Wed Oct 5 06:45:36 2016
    Hello Experts,

    I am porting some application from Linux to VxWorks(6.9).

    At runtime, the application successfully loads a shared library (dlopen etc.) ans starts to execute it. Later the code from the shared library calls for some function which is defined and compiled into the executable and it fails with the following error:

    Undefined PLT symbol "_Z10GET_UI_VARP14ENGINE_CONTEXTm" (reloc type = 21, symnum = 85)

    Below is the readelf dump of the library and the executable

    shlib:

    Line 2971: 00073d9c 00005515 R_PPC_JMP_SLOT 00000000 _Z10GET_UI_VARP14ENGIN + 0
    Line 3390: 85: 00000000 0 NOTYPE GLOBAL DEFAULT UND _Z10GET_UI_VARP14ENGINE_C
    Line 4798: 290: 00000000 0 NOTYPE GLOBAL DEFAULT UND _Z10GET_UI_VARP14ENGINE_C

    executable:
    Line 259947: 104: 0009a548 240 FUNC GLOBAL DEFAULT 10 _Z10GET_UI_VARP14ENGINE_C
    Line 267690: 3843: 0009a548 240 FUNC GLOBAL DEFAULT 10 _Z10GET_UI_VARP14ENGINE_C

    If GET_UI_VAR function is "added" AS IS to the code compiled to shlib all works as expected.

    Then shlib readelf dump looks like:
    Line 2971: 00073d9c 00005515 R_PPC_JMP_SLOT 00025c94 _Z10GET_UI_VARP14ENGIN + 0
    Line 3390: 85: 00025c94 240 FUNC GLOBAL DEFAULT 8 _Z10GET_UI_VARP14ENGINE_C
    Line 4798: 290: 00025c94 240 FUNC GLOBAL DEFAULT 8 _Z10GET_UI_VARP14ENGINE_C

    Are you aware of any VxWorks limitations that might have any impact on the dynamic loading?!

    Thanks
    Valery

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)