[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sparc64 -- cannot get 'Hello World' to run

From: Philippe Mathieu-Daudé
Subject: Re: sparc64 -- cannot get 'Hello World' to run
Date: Wed, 2 Aug 2023 23:02:12 +0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.13.0

Hi Frederick,

On 2/8/23 22:36, Frederick Virchanza Gotham wrote:
On Wed, Aug 2, 2023 at 11:04 AM Frederick Virchanza Gotham wrote:

I can't get sparc64 to work at all though. Even I make a simple 'Hello
World' program in C using only "puts", if I try to use qemu-user to
run it, it crashes.

You can try the following at the command line in Ubuntu 23.04:

$ echo -e "#include <stdio.h> \n int main(void) { puts(\"Hello
World\"); }" > test.cpp
$ sparc64-linux-gnu-g++ -o test test.cpp -static
$ qemu-sparc64-static ./test
Segmentation fault (core dumped)
$ qemu-sparc-static ./test
qemu-sparc-static: ./test: Invalid ELF image for this architecture
$ qemu-sparc32plus-static ./test
qemu-sparc32plus-static: ./test: Invalid ELF image for this architecture

Making static executables can be temperamental on a few different
platforms, and so I tried to make a dynamically linked executable by
providing ld-linux.so.2 as well as the libc files. Still it crashes.

Has anyone been able to get use 'qemu' on the binaries produces by the
cross-compiler 'sparc64-g++' ?

Can you create an issue on https://gitlab.com/qemu-project/qemu/-/issues
and attach the static binary you built, that way we can reproduce your



reply via email to

[Prev in Thread] Current Thread [Next in Thread]