qemu-arm core dumped for no entry symbol programe
Public bug reported:
Hi qemu developers,
Environment:
* Fedora 24 x86_64
* qemu-arm version 2.6.92, Copyright (c) 2003-2008 Fabrice Bellard
* arm-linux-gnu-gcc 6.1.1 20160621 (Red Hat Cross 6.1.1-2) (GCC) target: arm-linux-gnueabi
* glibc-arm-linux-gnu-devel-2.23
very simple hello.c:
#include <stdio.h>
int main(int argc, char *argv[])
{
printf("Hello World\n");
return 0;
}arm-linux-gnu-gcc hello.c -I/usr/arm-linux-gnu/include -L/usr/arm-linux- gnu/lib -nostdlib -lc
/usr/bin/arm-linux-gnu-ld: Warning: Cannot find entry symbol _start; defaulting to 00000000000101fc
qemu-arm -L /usr/arm-linux-gnu ./a.out
Hello World
qemu: uncaught target signal 4 (Illegal instruction) - core dumped Illegal instruction
But provided entry symbol:
arm-linux-gnu-gcc hello.c -I/usr/arm-linux-gnu/include -L/usr/arm-linux- gnu/lib -nostdlib /usr/arm-linux-gnu/lib/crt1.o /usr/arm-linux- gnu/lib/crti.o /usr/arm-linux-gnu/lib/crtn.o -lc
qemu-arm -L /usr/arm-linux-gnu ./a.out is able to work happily!
Regards,
Leslie Zhai
** Affects: qemu
Importance: Undecided
Status: New
Signature · 55 lines
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1614348
Title:
qemu-arm core dumped for no entry symbol programe
Status in QEMU:
New
Bug description:
Hi qemu developers,
Environment:
* Fedora 24 x86_64
* qemu-arm version 2.6.92, Copyright (c) 2003-2008 Fabrice Bellard
* arm-linux-gnu-gcc 6.1.1 20160621 (Red Hat Cross 6.1.1-2) (GCC) target: arm-linux-gnueabi
* glibc-arm-linux-gnu-devel-2.23
very simple hello.c:
#include <stdio.h>
int main(int argc, char *argv[])
{
printf("Hello World\n");
return 0;
}
arm-linux-gnu-gcc hello.c -I/usr/arm-linux-gnu/include -L/usr/arm-
linux-gnu/lib -nostdlib -lc
/usr/bin/arm-linux-gnu-ld: Warning: Cannot find entry symbol _start;
defaulting to 00000000000101fc
qemu-arm -L /usr/arm-linux-gnu ./a.out
Hello World
qemu: uncaught target signal 4 (Illegal instruction) - core dumped
Illegal instruction
But provided entry symbol:
arm-linux-gnu-gcc hello.c -I/usr/arm-linux-gnu/include -L/usr/arm-
linux-gnu/lib -nostdlib /usr/arm-linux-gnu/lib/crt1.o /usr/arm-linux-
gnu/lib/crti.o /usr/arm-linux-gnu/lib/crtn.o -lc
qemu-arm -L /usr/arm-linux-gnu ./a.out is able to work happily!
Regards,
Leslie Zhai
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1614348/+subscriptionsfile a.out
a.out: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, BuildID[sha1]=6a86f764c1200a41253e1bc80d3155a295b87818, not stripped
Signature · 55 lines
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1614348
Title:
qemu-arm core dumped for no entry symbol programe
Status in QEMU:
New
Bug description:
Hi qemu developers,
Environment:
* Fedora 24 x86_64
* qemu-arm version 2.6.92, Copyright (c) 2003-2008 Fabrice Bellard
* arm-linux-gnu-gcc 6.1.1 20160621 (Red Hat Cross 6.1.1-2) (GCC) target: arm-linux-gnueabi
* glibc-arm-linux-gnu-devel-2.23
very simple hello.c:
#include <stdio.h>
int main(int argc, char *argv[])
{
printf("Hello World\n");
return 0;
}
arm-linux-gnu-gcc hello.c -I/usr/arm-linux-gnu/include -L/usr/arm-
linux-gnu/lib -nostdlib -lc
/usr/bin/arm-linux-gnu-ld: Warning: Cannot find entry symbol _start;
defaulting to 00000000000101fc
qemu-arm -L /usr/arm-linux-gnu ./a.out
Hello World
qemu: uncaught target signal 4 (Illegal instruction) - core dumped
Illegal instruction
But provided entry symbol:
arm-linux-gnu-gcc hello.c -I/usr/arm-linux-gnu/include -L/usr/arm-
linux-gnu/lib -nostdlib /usr/arm-linux-gnu/lib/crt1.o /usr/arm-linux-
gnu/lib/crti.o /usr/arm-linux-gnu/lib/crtn.o -lc
qemu-arm -L /usr/arm-linux-gnu ./a.out is able to work happily!
Regards,
Leslie Zhai
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1614348/+subscriptionsWhy do you think this is a bug in QEMU? This program crashes on exit if you run it on real arm hardware. This is unsurprising as you have told the compiler to build it with no C runtime. The program thus starts at the beginning of 'main', and when it hits the return at the end there is nowhere for it to return to and it crashes. If you link the program with the C runtime the way you are expected to, then the runtime gets control at the start of execution and provides a place for main() to return to. If you choose not to link against the C runtime then it is your responsibility to provide an alternate runtime (including defining an entry point) which implements the semantics that the main() function expects.
** Changed in: qemu
Status: New => Invalid
Signature · 55 lines
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1614348
Title:
qemu-arm core dumped for no entry symbol programe
Status in QEMU:
Invalid
Bug description:
Hi qemu developers,
Environment:
* Fedora 24 x86_64
* qemu-arm version 2.6.92, Copyright (c) 2003-2008 Fabrice Bellard
* arm-linux-gnu-gcc 6.1.1 20160621 (Red Hat Cross 6.1.1-2) (GCC) target: arm-linux-gnueabi
* glibc-arm-linux-gnu-devel-2.23
very simple hello.c:
#include <stdio.h>
int main(int argc, char *argv[])
{
printf("Hello World\n");
return 0;
}
arm-linux-gnu-gcc hello.c -I/usr/arm-linux-gnu/include -L/usr/arm-
linux-gnu/lib -nostdlib -lc
/usr/bin/arm-linux-gnu-ld: Warning: Cannot find entry symbol _start;
defaulting to 00000000000101fc
qemu-arm -L /usr/arm-linux-gnu ./a.out
Hello World
qemu: uncaught target signal 4 (Illegal instruction) - core dumped
Illegal instruction
But provided entry symbol:
arm-linux-gnu-gcc hello.c -I/usr/arm-linux-gnu/include -L/usr/arm-
linux-gnu/lib -nostdlib /usr/arm-linux-gnu/lib/crt1.o /usr/arm-linux-
gnu/lib/crti.o /usr/arm-linux-gnu/lib/crtn.o -lc
qemu-arm -L /usr/arm-linux-gnu ./a.out is able to work happily!
Regards,
Leslie Zhai
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1614348/+subscriptions