Add writing memory to linker