-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
请提供qemu linux userspace程序 #18
Comments
已更新。 |
用起来不正常,以下是用交叉编译工具链编译 helloworld,用 qemu 跑的过程 下载工具链和qemu wget https://github.com/loongson/build-tools/releases/download/2022.05.29/loongarch64-clfs-5.0-cross-tools-gcc-glibc.tar.xz
tar -xf loongarch64-clfs-5.0-cross-tools-gcc-glibc.tar.xz
wget https://github.com/loongson/build-tools/releases/download/2022.05.29/qemu-loongarch64
chmod +x qemu-loongarch64 编译cpp helloworld echo -e "#include <iostream>\nint main() { std::cerr << \"hello loongarch64\" << std::endl; return 0; }" > hello.cpp
./cross-tools/bin/loongarch64-unknown-linux-gnu-g++ hello.cpp -march=loongarch64 -o hello 配置ld prefix,qemu执行 export LD_LIBRARY_PATH=./cross-tools/target/usr/lib64:$LD_LIBRARY_PATH
export QEMU_STRACE=1
./qemu-loongarch64 -L ./cross-tools/target/usr ./hello 报错
开启 export QEMU_STRACE=1 后看到输出
|
我怎么感觉工具链可能要重新做一下,附件是本地静态编译出来的,用这个qemu能跑。 |
旧版本工具链,用新的qemu跑,也会报错 cannot stat shared object: Error 38,这标明 qemu 有问题? |
动态链接的话,C库可能需要使用最新的内核头文件重新编译一下,编译之前需要打个补丁? loongson/glibc#29 |
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
上个版本有发布的qemu,怎么这次删掉了?
需要这个qemu在x86服务器上跑ci
The text was updated successfully, but these errors were encountered: