or1k-elf-loader: make it compatible with C++

Signed-off-by: Franck Jullien <franck.jullien@gmail.com>
Make changes to match orpsoc Verilator new features

Signed-off-by: Franck Jullien <franck.jullien@gmail.com>