SHA256
1
0
forked from pool/qemu

- add linker patch for ppc hosts

OBS-URL: https://build.opensuse.org/package/show/Virtualization/qemu?expand=0&rev=33
This commit is contained in:
Alexander Graf 2011-12-12 22:43:35 +00:00 committed by Git OBS Bridge
parent e01aa576b9
commit e793b2863a
35 changed files with 111 additions and 32 deletions

View File

@ -1,7 +1,7 @@
From 4cc09e9530fb08123594be6c72dfc381df5dcddc Mon Sep 17 00:00:00 2001
From: Peter Maydell <peter.maydell@linaro.org>
Date: Wed, 5 Oct 2011 10:04:02 +0100
Subject: [PATCH 01/32] Handle CPU interrupts by inline checking of a flag
Subject: [PATCH 01/33] Handle CPU interrupts by inline checking of a flag
Fix the nasty TCG race conditions and crashes by implementing cpu_exit
as setting a flag which is checked at the start of each TB. This is

View File

@ -1,7 +1,7 @@
From 0588bc446fd48bdb1965a6773d008c05a4ba16c1 Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Sun, 20 Nov 2011 13:02:54 +0100
Subject: [PATCH 02/32] linux-user: fix QEMU_STRACE=1 segfault
Subject: [PATCH 02/33] linux-user: fix QEMU_STRACE=1 segfault
While debugging some issues with QEMU_STRACE I stumbled over segmentation
faults that were pretty reproducible. Turns out we tried to treat a

View File

@ -1,7 +1,7 @@
From 67c12998086c44ebef7f92a394154d6aba446178 Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Wed, 2 Nov 2011 09:23:22 +0000
Subject: [PATCH 03/32] linux-user: save auxv length
Subject: [PATCH 03/33] linux-user: save auxv length
We create our own AUXV segment on stack and save a pointer to it.
However we don't save the length of it, so any code that wants to

View File

@ -1,7 +1,7 @@
From 99590488e94b6b7f10ecf9a99398fd24a69a7039 Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Wed, 2 Nov 2011 09:23:23 +0000
Subject: [PATCH 04/32] linux-user: add open() hijack infrastructure
Subject: [PATCH 04/33] linux-user: add open() hijack infrastructure
There are a number of files in /proc that expose host information
to the guest program. This patch adds infrastructure to override

View File

@ -1,7 +1,7 @@
From 059e727a9a4be00de949769105e9e0ea876fc64b Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Wed, 2 Nov 2011 09:23:24 +0000
Subject: [PATCH 05/32] linux-user: fake /proc/self/maps
Subject: [PATCH 05/33] linux-user: fake /proc/self/maps
glibc's pthread_attr_getstack tries to find the stack range from
/proc/self/maps. Unfortunately, /proc is usually the host's /proc

View File

@ -1,7 +1,7 @@
From 7ee3fd47eed19e4dfa26a8d0176ed3550b8d0ccf Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Wed, 2 Nov 2011 09:23:25 +0000
Subject: [PATCH 06/32] linux-user: fake /proc/self/stat
Subject: [PATCH 06/33] linux-user: fake /proc/self/stat
The boehm gc finds the program's stack starting pointer by
checking /proc/self/stat. Unfortunately, so far it reads

View File

@ -1,7 +1,7 @@
From ddf0d4037b10c07d9e5b168f9f96e60a1601c75b Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Wed, 2 Nov 2011 09:23:26 +0000
Subject: [PATCH 07/32] linux-user: fake /proc/self/auxv
Subject: [PATCH 07/33] linux-user: fake /proc/self/auxv
Gtk tries to read /proc/self/auxv to find its auxv table instead of
taking it from its own program memory space.

View File

@ -1,7 +1,7 @@
From 4bc96d88f91417aa2bb029da2e8343456fe86631 Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Mon, 21 Nov 2011 23:50:36 +0100
Subject: [PATCH 08/32] XXX dont dump core on sigabort
Subject: [PATCH 08/33] XXX dont dump core on sigabort
---
linux-user/signal.c | 6 ++++++

View File

@ -1,7 +1,7 @@
From ee5137d38109fdcb55a58be447c2c27be2b16eb0 Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Tue, 22 Nov 2011 17:53:40 +0100
Subject: [PATCH 09/32] linux-user: fix wait* syscall status returns
Subject: [PATCH 09/33] linux-user: fix wait* syscall status returns
When calling wait4 or waitpid with a status pointer and WNOHANG, the
syscall can potentially not modify the status pointer input. Now if we

View File

@ -1,7 +1,7 @@
From 5cfce885dd1b3a229cd2ea7a94dfe2445ec29417 Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Thu, 24 Nov 2011 00:38:22 +0100
Subject: [PATCH 10/32] Revert "linux-user: fix wait* syscall status returns"
Subject: [PATCH 10/33] Revert "linux-user: fix wait* syscall status returns"
This reverts commit 93092792064d880eb91679004b4761639d754081.
---

View File

@ -1,7 +1,7 @@
From b71ee7a063f7cffdf8a2cf73fcbc1d461fbbb80e Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Thu, 24 Nov 2011 00:39:35 +0100
Subject: [PATCH 11/32] linux-user: fix wait* syscall status returns
Subject: [PATCH 11/33] linux-user: fix wait* syscall status returns
When calling wait4 or waitpid with a status pointer and WNOHANG, the
syscall can potentially not modify the status pointer input. Now if we

View File

@ -1,7 +1,7 @@
From 52a4e3af8ca37d895bcff2ede1073ebb2cb2dd29 Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Sat, 19 Nov 2011 22:57:55 +0100
Subject: [PATCH 12/32] linux-user: Fix 32-on-64 mmap for x86_64
Subject: [PATCH 12/33] linux-user: Fix 32-on-64 mmap for x86_64
When running a 32 bit guest on a 64 bit host, we can run into trouble while
calling the host's mmap() because it could potentially give us a 64 bit

View File

@ -1,7 +1,7 @@
From 7e9ebc1d459247bd91f39a7489f1627874731533 Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Mon, 28 Nov 2011 17:05:24 +0100
Subject: [PATCH 13/32] XXX linux-user: fake /proc/self/maps even more
Subject: [PATCH 13/33] XXX linux-user: fake /proc/self/maps even more
---
linux-user/syscall.c | 40 +++++++++++++++++++++++++++++++++++++++-

View File

@ -1,7 +1,7 @@
From e45be60a8f2e6148b40f358922a4f472fa0b2f8b Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Thu, 1 Dec 2011 19:00:01 +0100
Subject: [PATCH 14/32] XXX work around SA_RESTART race with boehm-gc (ARM only)
Subject: [PATCH 14/33] XXX work around SA_RESTART race with boehm-gc (ARM only)
---
linux-user/main.c | 25 ++++++++-----

View File

@ -1,7 +1,7 @@
From bf5ca70551e87671e84a81d103db32ed6918a109 Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Mon, 5 Dec 2011 23:37:52 +0100
Subject: [PATCH 15/32] XXX move qemu binary lower in address space so we have space for guest stuff
Subject: [PATCH 15/33] XXX move qemu binary lower in address space so we have space for guest stuff
---
x86_64.ld | 2 +-

View File

@ -1,7 +1,7 @@
From a8631179ca4a90670923fd9acce05b0e109eae01 Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Tue, 6 Dec 2011 00:39:50 +0100
Subject: [PATCH 16/32] linux-user: map lower in address space
Subject: [PATCH 16/33] linux-user: map lower in address space
While trying to compile Java I can into situations where there was simply
no virtual address space left for a 32-bit guest to take. For example when

View File

@ -1,7 +1,7 @@
From f2bd85fd0ebe444677f22e28ab12b966937207e2 Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Thu, 8 Dec 2011 23:19:32 +0100
Subject: [PATCH 17/32] XXX fake /proc/self/maps: also fclose real file
Subject: [PATCH 17/33] XXX fake /proc/self/maps: also fclose real file
---
linux-user/syscall.c | 1 +

View File

@ -1,7 +1,7 @@
From f8d469421d92e3abe854e565bdf4ee62b86846b6 Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Sat, 10 Dec 2011 00:03:56 +0100
Subject: [PATCH 18/32] XXX map qemu higher again so we have space for brk
Subject: [PATCH 18/33] XXX map qemu higher again so we have space for brk
---
linux-user/mmap.c | 2 +-

View File

@ -1,7 +1,7 @@
From 4d016e72b0d6b81115100217614aba990fcb505e Mon Sep 17 00:00:00 2001
From: Ulrich Hecht <uli@suse.de>
Date: Tue, 14 Apr 2009 16:18:44 +0200
Subject: [PATCH 19/32] qemu-0.9.0.cvs-binfmt
Subject: [PATCH 19/33] qemu-0.9.0.cvs-binfmt
Fixes binfmt_misc setup script:
- x86_64 is i386-compatible

View File

@ -1,7 +1,7 @@
From 923b1531de681940198e2c1d28c735da1efe29e2 Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Tue, 14 Apr 2009 16:20:50 +0200
Subject: [PATCH 20/32] qemu-cvs-alsa_bitfield
Subject: [PATCH 20/33] qemu-cvs-alsa_bitfield
Implements TYPE_INTBITFIELD partially. (required for ALSA support)

View File

@ -1,7 +1,7 @@
From b732ecf6a05f837368ab6c2413b206e0e2715e73 Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Tue, 14 Apr 2009 16:23:27 +0200
Subject: [PATCH 21/32] qemu-cvs-alsa_ioctl
Subject: [PATCH 21/33] qemu-cvs-alsa_ioctl
Implements ALSA ioctls on PPC hosts.

View File

@ -1,7 +1,7 @@
From 3ea2fa480d730990c427d4a2924168f2b6f42dba Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Tue, 14 Apr 2009 16:24:15 +0200
Subject: [PATCH 22/32] qemu-cvs-alsa_mmap
Subject: [PATCH 22/33] qemu-cvs-alsa_mmap
Hack to prevent ALSA from using mmap() interface to simplify emulation.

View File

@ -1,7 +1,7 @@
From 2c1ea2bd2c59d70ca63c1d42230588b4bdeed6fd Mon Sep 17 00:00:00 2001
From: Ulrich Hecht <uli@suse.de>
Date: Tue, 14 Apr 2009 16:25:41 +0200
Subject: [PATCH 23/32] qemu-cvs-gettimeofday
Subject: [PATCH 23/33] qemu-cvs-gettimeofday
No clue what this is for.
---

View File

@ -1,7 +1,7 @@
From 6d6663f77131b1546e55b5b6548d63f7496d6988 Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Tue, 14 Apr 2009 16:26:33 +0200
Subject: [PATCH 24/32] qemu-cvs-ioctl_debug
Subject: [PATCH 24/33] qemu-cvs-ioctl_debug
Extends unsupported ioctl debug output.

View File

@ -1,7 +1,7 @@
From 07d1e1618bb9632bad8d4b6928067711781df1d9 Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Tue, 14 Apr 2009 16:27:36 +0200
Subject: [PATCH 25/32] qemu-cvs-ioctl_nodirection
Subject: [PATCH 25/33] qemu-cvs-ioctl_nodirection
the direction given in the ioctl should be correct so we can assume the
communication is uni-directional. The alsa developers did not like this

View File

@ -1,7 +1,7 @@
From a4eebec448c7cd69fcc589912779fc7df6fca4ea Mon Sep 17 00:00:00 2001
From: Ulrich Hecht <uli@suse.de>
Date: Tue, 14 Apr 2009 16:37:42 +0200
Subject: [PATCH 26/32] qemu-img-vmdk-scsi
Subject: [PATCH 26/33] qemu-img-vmdk-scsi
Support creation of SCSI VMDK images in qemu-img.

View File

@ -1,7 +1,7 @@
From 9b3ae5bebe9635991156b6e87f61ca204b204345 Mon Sep 17 00:00:00 2001
From: Ulrich Hecht <uli@suse.de>
Date: Tue, 14 Apr 2009 16:38:20 +0200
Subject: [PATCH 27/32] qemu-nonvoid_return
Subject: [PATCH 27/33] qemu-nonvoid_return
Squelches GCC warnings about undefined return values.

View File

@ -1,7 +1,7 @@
From 18b54324078105bd5d23241026bdbc92f1fe22b6 Mon Sep 17 00:00:00 2001
From: Ulrich Hecht <uli@suse.de>
Date: Wed, 25 Aug 2010 14:23:43 +0200
Subject: [PATCH 28/32] fix mipsn32*-linux-user builds
Subject: [PATCH 28/33] fix mipsn32*-linux-user builds
Signed-off-by: Ulrich Hecht <uli@suse.de>
---

View File

@ -1,7 +1,7 @@
From b3f9ab3168e50f1dec4835c0df01869ecf848267 Mon Sep 17 00:00:00 2001
From: Benjamin <mlspirat42@gmail.com>
Date: Sat, 8 Oct 2011 07:31:33 +0000
Subject: [PATCH 29/32] Integrating Dynamips and GNS3 UDP tunnels (Patches)
Subject: [PATCH 29/33] Integrating Dynamips and GNS3 UDP tunnels (Patches)
On 10/07/11 10:35, Jan Kiszka wrote:
>

View File

@ -1,7 +1,7 @@
From 42ca714385588477429c8ac77c810b310854494b Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Fri, 30 Sep 2011 19:40:36 +0200
Subject: [PATCH 30/32] linux-user: add binfmt wrapper for argv[0] handling
Subject: [PATCH 30/33] linux-user: add binfmt wrapper for argv[0] handling
When using qemu's linux-user binaries through binfmt, argv[0] gets lost
along the execution because qemu only gets passed in the full file name

View File

@ -1,7 +1,7 @@
From a9d80d519385d7c659173a7b12461a2099738c02 Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Sun, 11 Dec 2011 01:19:24 +0100
Subject: [PATCH 31/32] linux-user: Ignore timer_create syscall
Subject: [PATCH 31/33] linux-user: Ignore timer_create syscall
We don't implement the timer_create syscall, but shouting out loud
about it breaks some %check tests in OBS, so better ignore it silently.

View File

@ -1,7 +1,7 @@
From 0006edd6319648e5a5eac86b6c7c82d67c4b5cb1 Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Sun, 11 Dec 2011 01:21:51 +0100
Subject: [PATCH 32/32] linux-user: be silent about capget failures
Subject: [PATCH 32/33] linux-user: be silent about capget failures
Complaining about capget doesn't buy us anything, but makes %check
fail in certain builds. So better not complain about its missing

View File

@ -0,0 +1,72 @@
From 1dd66fa6bb6c616b91626a51d2dff02692e83fe5 Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Mon, 12 Dec 2011 23:16:43 +0100
Subject: [PATCH 33/33] PPC: Fix linker scripts on ppc hosts
When compiling qemu statically with multilib on PPC, we hit the
same issue that commit 845f2c2812d9ed24b36c02a3d06ee83aeafe8b49
is fixing. Do the same here.
Signed-off-by: Alexander Graf <agraf@suse.de>
---
ppc.ld | 16 ++++++++++++++--
ppc64.ld | 16 ++++++++++++++--
2 files changed, 28 insertions(+), 4 deletions(-)
diff --git a/ppc.ld b/ppc.ld
index 69aa3f2..2a0dcad 100644
--- a/ppc.ld
+++ b/ppc.ld
@@ -49,8 +49,20 @@ SECTIONS
.rela.sbss2 : { *(.rela.sbss2 .rela.sbss2.* .rela.gnu.linkonce.sb2.*) }
.rel.bss : { *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) }
.rela.bss : { *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) }
- .rel.plt : { *(.rel.plt) }
- .rela.plt : { *(.rela.plt) }
+ .rel.plt :
+ {
+ *(.rel.plt)
+ PROVIDE (__rel_iplt_start = .);
+ *(.rel.iplt)
+ PROVIDE (__rel_iplt_end = .);
+ }
+ .rela.plt :
+ {
+ *(.rela.plt)
+ PROVIDE (__rela_iplt_start = .);
+ *(.rela.iplt)
+ PROVIDE (__rela_iplt_end = .);
+ }
.init :
{
KEEP (*(.init))
diff --git a/ppc64.ld b/ppc64.ld
index 0a7c0dd..e2dafa0 100644
--- a/ppc64.ld
+++ b/ppc64.ld
@@ -54,8 +54,20 @@ SECTIONS
*(.rela.sbss2 .rela.sbss2.* .rela.gnu.linkonce.sb2.*)
*(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*)
}
- .rel.plt : { *(.rel.plt) }
- .rela.plt : { *(.rela.plt) }
+ .rel.plt :
+ {
+ *(.rel.plt)
+ PROVIDE (__rel_iplt_start = .);
+ *(.rel.iplt)
+ PROVIDE (__rel_iplt_end = .);
+ }
+ .rela.plt :
+ {
+ *(.rela.plt)
+ PROVIDE (__rela_iplt_start = .);
+ *(.rela.iplt)
+ PROVIDE (__rela_iplt_end = .);
+ }
.rela.tocbss : { *(.rela.tocbss) }
.init :
{
--
1.6.0.2

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Mon Dec 12 22:05:24 CET 2011 - agraf@suse.com
- add linker patch for ppc hosts
-------------------------------------------------------------------
Mon Dec 12 20:55:12 UTC 2011 - agraf@suse.com

View File

@ -58,6 +58,7 @@ Patch29: 0029-Integrating-Dynamips-and-GNS3-UDP-tunnels-Patches.patch
Patch30: 0030-linux-user-add-binfmt-wrapper-for-argv-0-handling.patch
Patch31: 0031-linux-user-Ignore-timer_create-syscall.patch
Patch32: 0032-linux-user-be-silent-about-capget-failures.patch
Patch33: 0033-PPC-Fix-linker-scripts-on-ppc-hosts.patch
# this is to make lint happy
Source300: rpmlintrc
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@ -149,6 +150,7 @@ run cross architectures builds
%patch30 -p1
%patch31 -p1
%patch32 -p1
%patch33 -p1
%build
# build QEMU