Fix spi_ copy and Fix linking order