qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [Bug 1076445] Re: qemu-i386 fails on system(3) with a cross


From: Peter Maydell
Subject: [Qemu-devel] [Bug 1076445] Re: qemu-i386 fails on system(3) with a cross-toolchain from Buildroot
Date: Mon, 20 Jun 2016 16:18:18 -0000

Fixed in 2013 some time.


** Changed in: qemu
       Status: New => Fix Released

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1076445

Title:
  qemu-i386 fails on system(3) with a cross-toolchain from Buildroot

Status in QEMU:
  Fix Released

Bug description:
  qemu-i386 fails with small C program containing a system().
  The C program is cross-compiled with a toolchain created by buildroot 
(http://buildroot.net/), gcc version 4.6.3, uClibc version 0.9.33.2 .
  qemu version 1.2.0 (built with 
http://git.buildroot.net/buildroot/tree/package/qemu/qemu.mk)
  host machine : Ubuntu 12.04 LTS on x86_64.

      $ cat sys.c
      #include <stdio.h>
      #include <stdlib.h>

      int main()
     {
        int ret = system("echo hello");
        printf("%d\n", ret);
      }

      $ ../../host/usr/bin/i686-buildroot-linux-uclibc-gcc -o sys sys.c
      $ file sys
      sys: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), 
dynamically linked (uses shared libs), not stripped
      $ ../../host/usr/bin/qemu-i386 ./sys
      -1

  same problem with x86_64 :
      $ ../../host/usr/bin/x86_64-buildroot-linux-uclibc-gcc -o sys sys.c
      $ file sys
      sys: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically 
linked (uses shared libs), not stripped
      $ ../../host/usr/bin/qemu-x86_64 sys
      -1

  works fine with arm :
      $ ../../host/usr/bin/arm-buildroot-linux-uclibcgnueabi-gcc -o sys sys.c
      $ file sys
      sys: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked 
(uses shared libs), not stripped
      $ ../../host/usr/bin/qemu-arm ./sys
      hello
      0

  works fine with mips :
      $ ../../host/usr/bin/mips-buildroot-linux-uclibc-gcc -o sys sys.c
      $ file sys
      sys: ELF 32-bit MSB executable, MIPS, MIPS32 rel2 version 1 (SYSV), 
dynamically linked (uses shared libs), with unknown capability 0x41000000 = 
0xf676e75, with unknown capability 0x10000 = 0x70403, not stripped
      $ ../../host/usr/bin/qemu-mips sys
      hello
      0

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1076445/+subscriptions



reply via email to

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