Search code examples
linkersymbolslddebug-symbolsvxworks

Partially Linked Vxworks Image Project (VIP)


The product I work on is structured as several DKM projects referenced by my VIP project.

though, there is one "Unknown" function implementation, one that will be loaded later on in the init phase.

In order to load it:
1. I declare a function pointer (funcPtr).
2. after I call LoadModule() aka. ld()
3. call symFind() to get the address of the newly loaded symbol 4. assign the funcPtr the address.

I have problems with this solution as I must not have the symbol-table in my release build.
Its treated as sensitive organizational data, but without it I couldn't use symFind()

Any of the following question can mitigate or resolve my problem, so i'd appreciate any answer :)

  • When calling loadModule(myModule.o), is there a function in myModule that is called right after it is loaded?

  • Can I compile a VIP project with a missing extern symbol, like in linux. that will be relocated later on when i use ld() for my module?

  • Can I limit the Symbol-Table to dispense the sym-tbl except for the few symbols I need, How?


Solution

  • Answering my Questions:

    • When calling loadModule(myModule.o), is there a function in myModule that is called right after it is loaded?
      Answer: Didn't use it.

    • Can I compile a VIP project with a missing extern symbol, like in linux. that will be relocated later on when i use ld() for my module?
      Answer: No, a VIP is fully-linked and cannot have undefined symbols.
      You can have Pointer to Functions, and assign their addresses when they become available.

    • Can I limit the Symbol-Table to dispense the sym-tbl except for the few symbols I need, How?
      Answer: Yes, I used stripppc -K <symbol_to_keep> ... command in the make-file to achieve that.