Make resource linker much more general.

unit tests for resource linker ignored in the process. must redo.