fix multiple definitions errors

the fix is handicapped by XC32, as usual

a few minor changes.

compiler: isolate all data and functions into individual sections.
linker: remove unused sections.
this should delete any dead code after linking