cc2538: Clean up link stage

Several fixes and significant size optimizations.