Linking Partial Redundant Code

Technical questions regarding the XTC tools and programming with XMOS.
User avatar
rweickelt
Member++
Posts: 16
Joined: Tue Sep 02, 2014 8:38 pm

Linking Partial Redundant Code

Post by rweickelt »

Is it possible to bind multiple single-threaded executables/objects in a way together, that
  • each of them would run in its own thread
  • symbols that have identical names, but different code (likely because of different compiler flags, #ifdefs etc.) would not cause multiple-definition errors, but result in duplicate code or data
  • there is the possibility to declare some of the symbols to be resolved during a final link/map step
Perhaps I could link a single relocatable object for each partial application, leaving out startup and library code, remove all defined symbols from the symbol table assuming that still-unresolved symbols are uncritical and link the resulting objects together in a final step.

Has anybody done such a thing?

Thanks
Richard