如何运行在Linux上动态链接的ELF 64位LSB可执行文件UCB RISC-V,版本1(GNU/Linux) [英] how to run ELF 64-bit LSB executable, UCB RISC-V, version 1 (GNU/Linux), dynamically linked on Linux

查看:193
本文介绍了如何运行在Linux上动态链接的ELF 64位LSB可执行文件UCB RISC-V,版本1(GNU/Linux)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用目标Architecture RISC-V对用C ++编写的代码进行性能分析.该代码已使用RISC-V GNU工具链交叉编译.我的可执行文件是unit_tests"ELF 64位LSB可执行文件,UCB RISC-V,版本1(GNU/Linux),动态链接,对于GNU/Linux 4.15,是/lib/ld-linux-riscv64-lp64d.so.1..0,带有debug_info(未剥离)此信息是使用file命令检索的.

I am trying to do profiling of the code written in C++ with the target Architecture RISC-V. The code has been cross-compiled using RISC-V GNU Toolchain. My executable is unit_tests "ELF 64-bit LSB executable, UCB RISC-V, version 1 (GNU/Linux), dynamically linked,nterpreter /lib/ld-linux-riscv64-lp64d.so.1, for GNU/Linux 4.15.0, with debug_info, not stripped" this information is retrieved using the file command.

我想做的是使用gprof对它进行性能分析.但是要执行gprof,需要生成gmon.out,要生成gmon.out,应首先运行可执行文件.我无法在某些不同的体系结构中运行其他体系结构的二进制elf.我需要对此的建议,是在哪个模拟器或模拟器上可以运行的?

What I am trying to do is the profiling of this using gprof. But to do the gprof gmon.out needs to be generated, to generate gmon.out the executable should be run first. I cannot run the binary elf of other architecture in some different architecture. I need a suggestion for this on which emulator or simulator does this for me or I can run on?

我尝试使用以下链接安装qemu:

I have tried installing qemu using the follwing link:

,但无法成功安装.也曾尝试过使用秒杀,但是却收到了"bad synccall"错误消息.错误.任何潜在客户如何解决此问题.

but not able to successfully install it. Also have tried with spike but got "bad synccall" error. Any leads how can I resolve this issue.

推荐答案

我在用户模式下使用qemu解决了此问题.请按照以下链接中的说明进行操作:手动qemu用户

I solved this issue using qemu in user mode. Following the instructions in the below link: Manual-qemu-user

我可以在其中运行为目标RISC-V生成的二进制小精灵,可以在x86 Linux计算机上运行.

Where I could run the binary elf generated for target RISC-V, which I could run on x86 Linux machine.

这篇关于如何运行在Linux上动态链接的ELF 64位LSB可执行文件UCB RISC-V,版本1(GNU/Linux)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆