aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMilan P. Stanić <mps@arvanta.net>2020-05-28 19:23:44 +0200
committerAriadne Conill <ariadne@dereferenced.org>2020-05-28 18:41:32 +0000
commit6c885cfb750137fd1bc76cbbe30cc3596fa1228f (patch)
tree8d8669fde8f6a863148f3d717cddac388ad3c285
parent7e087b0ff4f895d26de320a8751674ea5a08737e (diff)
downloadalpine_aports-6c885cfb750137fd1bc76cbbe30cc3596fa1228f.tar.bz2
alpine_aports-6c885cfb750137fd1bc76cbbe30cc3596fa1228f.tar.xz
alpine_aports-6c885cfb750137fd1bc76cbbe30cc3596fa1228f.zip
community/qemu: upgrade to 5.0.0
remove 0001-elfload-load-PIE-executables-to-right-address.patch, it doesn't apply and looks like it is not needed with this version add system-rx
-rw-r--r--community/qemu/0001-elfload-load-PIE-executables-to-right-address.patch89
-rw-r--r--community/qemu/APKBUILD9
2 files changed, 4 insertions, 94 deletions
diff --git a/community/qemu/0001-elfload-load-PIE-executables-to-right-address.patch b/community/qemu/0001-elfload-load-PIE-executables-to-right-address.patch
deleted file mode 100644
index 1cf0c2bd1b..0000000000
--- a/community/qemu/0001-elfload-load-PIE-executables-to-right-address.patch
+++ /dev/null
@@ -1,89 +0,0 @@
1From 6818f32f74981d9bccec8afbab37c42b50ab58be Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
3Date: Thu, 4 Jul 2013 15:50:36 +0300
4Subject: [RFC PATCH] elfload: load PIE executables to right address
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9PIE images are ET_DYN images. Check first for pinterp_name to make
10sure the main executable always is loaded to correct place.
11
12See below for current behaviour of PIE executables:
13
14Reserved 0x7f000000 bytes of guest address space
15host mmap_min_addr=0x1000
16guest_base 0x7f7cb41d5000
17start end size prot
180037f400-003fe400 0007f000 r-x
19003fe400-003ff400 00001000 ---
20003ff400-003fe400 fffff000 rw-
21003fe400-003ff400 00001000 ---
22003ff400-003ffc00 00000800 rw-
23003ffc00-003fec00 fffff000 r-x
24003fec00-003ffc00 00001000 ---
25003ffc00-0007f000 ffc7f400 rw-
26start_brk 0x00000000
27end_code 0x7eff7ac0
28start_code 0x7eff7000
29start_data 0x7efffac0
30end_data 0x7efffc18
31start_stack 0x7eff6dc8
32brk 0x7efffc34
33entry 0x7e799b30
3400000000-00005000 ---p 00000000 00:00 0
3500005000-00015000 rw-p 00000000 00:00 0
3600015000-7e77d000 ---p 00000000 00:00 0
377e77d000-7e7ec000 r-xp 00000000 68:03 14326298 /lib/libc.so
387e7ec000-7e7f3000 ---p 00000000 00:00 0
397e7f3000-7e7f4000 rw-p 0006e000 68:03 14326298 /lib/libc.so
407e7f4000-7e7f6000 rw-p 00000000 00:00 0
417e7f6000-7e7f7000 ---p 00000000 00:00 0
427e7f7000-7eff7000 rw-p 00000000 00:00 0
437eff7000-7eff8000 r-xp 00000000 68:03 9731305 /usr/bin/brk
447eff8000-7efff000 ---p 00000000 00:00 0
457e7f7000-7eff7000 rw-p 00000000 00:00 0 [stack]
46
47Showing how the main binary got loaded to wrong place.
48
49Signed-off-by: Timo Teräs <timo.teras@iki.fi>
50---
51I assume pinterp_name is only ever set for the main executable.
52Quick grep would indicate that this is indeed the case.
53
54 linux-user/elfload.c | 12 ++++++------
55 1 file changed, 6 insertions(+), 6 deletions(-)
56
57diff --git a/linux-user/elfload.c b/linux-user/elfload.c
58index ddef23e..d6e00cd 100644
59--- a/linux-user/elfload.c
60+++ b/linux-user/elfload.c
61@@ -1660,7 +1660,12 @@ static void load_elf_image(const char *image_name, int image_fd,
62 }
63
64 load_addr = loaddr;
65- if (ehdr->e_type == ET_DYN) {
66+ if (pinterp_name != NULL) {
67+ /* This is the main executable. Make sure that the low
68+ address does not conflict with MMAP_MIN_ADDR or the
69+ QEMU application itself. */
70+ probe_guest_base(image_name, loaddr, hiaddr);
71+ } else if (ehdr->e_type == ET_DYN) {
72 /* The image indicates that it can be loaded anywhere. Find a
73 location that can hold the memory space required. If the
74 image is pre-linked, LOADDR will be non-zero. Since we do
75@@ -1672,11 +1677,6 @@ static void load_elf_image(const char *image_name, int image_fd,
76 if (load_addr == -1) {
77 goto exit_perror;
78 }
79- } else if (pinterp_name != NULL) {
80- /* This is the main executable. Make sure that the low
81- address does not conflict with MMAP_MIN_ADDR or the
82- QEMU application itself. */
83- probe_guest_base(image_name, loaddr, hiaddr);
84 }
85 load_bias = load_addr - loaddr;
86
87--
881.8.3.2
89
diff --git a/community/qemu/APKBUILD b/community/qemu/APKBUILD
index f21270c88e..3bd20d0fc3 100644
--- a/community/qemu/APKBUILD
+++ b/community/qemu/APKBUILD
@@ -3,8 +3,8 @@
3# Contributor: Jakub Jirutka <jakub@jirutka.cz> 3# Contributor: Jakub Jirutka <jakub@jirutka.cz>
4# Maintainer: Natanael Copa <ncopa@alpinelinux.org> 4# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
5pkgname=qemu 5pkgname=qemu
6pkgver=4.2.0 6pkgver=5.0.0
7pkgrel=2 7pkgrel=0
8pkgdesc="QEMU is a generic machine emulator and virtualizer" 8pkgdesc="QEMU is a generic machine emulator and virtualizer"
9url="https://qemu.org/" 9url="https://qemu.org/"
10arch="all" 10arch="all"
@@ -111,6 +111,7 @@ _subsystems="
111 system-ppc64 111 system-ppc64
112 system-riscv32 112 system-riscv32
113 system-riscv64 113 system-riscv64
114 system-rx
114 system-s390x 115 system-s390x
115 system-sh4 116 system-sh4
116 system-sh4eb 117 system-sh4eb
@@ -152,7 +153,6 @@ subpackages="$subpackages qemu-modules:_all_modules"
152subpackages="$subpackages $pkgname-img" # -img must be declared the last 153subpackages="$subpackages $pkgname-img" # -img must be declared the last
153 154
154source="https://wiki.qemu-project.org/download/qemu-$pkgver.tar.xz 155source="https://wiki.qemu-project.org/download/qemu-$pkgver.tar.xz
155 0001-elfload-load-PIE-executables-to-right-address.patch
156 0006-linux-user-signal.c-define-__SIGRTMIN-MAX-for-non-GN.patch 156 0006-linux-user-signal.c-define-__SIGRTMIN-MAX-for-non-GN.patch
157 0001-linux-user-fix-build-with-musl-on-aarch64.patch 157 0001-linux-user-fix-build-with-musl-on-aarch64.patch
158 musl-F_SHLCK-and-F_EXLCK.patch 158 musl-F_SHLCK-and-F_EXLCK.patch
@@ -389,8 +389,7 @@ _all_modules() {
389 mkdir -p "$subpkgdir" 389 mkdir -p "$subpkgdir"
390} 390}
391 391
392sha512sums="2a79973c2b07c53e8c57a808ea8add7b6b2cbca96488ed5d4b669ead8c9318907dec2b6109f180fc8ca8f04c0f73a56e82b3a527b5626b799d7e849f2474ec56 qemu-4.2.0.tar.xz 392sha512sums="21ef0cbe107c468a40f0fa2635db2a40048c8790b629dfffca5cd62bb1b502ea8eb133bfc40df5ecf1489e2bffe87f6829aee041cb8a380ff04a8afa23b39fcf qemu-5.0.0.tar.xz
393405008589cad1c8b609eca004d520bf944366e8525f85a19fc6e283c95b84b6c2429822ba064675823ab69f1406a57377266a65021623d1cd581e7db000134fd 0001-elfload-load-PIE-executables-to-right-address.patch
39498db5e23397cfad4a7210f9f7e1c5fa5c48f065785439521c5b39325c429f2dc367c40925adff6aa8677b3192a1a98a30e93d5b9c879df523deb019c40edd9d9 0006-linux-user-signal.c-define-__SIGRTMIN-MAX-for-non-GN.patch 39398db5e23397cfad4a7210f9f7e1c5fa5c48f065785439521c5b39325c429f2dc367c40925adff6aa8677b3192a1a98a30e93d5b9c879df523deb019c40edd9d9 0006-linux-user-signal.c-define-__SIGRTMIN-MAX-for-non-GN.patch
3951ac043312864309e19f839a699ab2485bca51bbf3d5fdb39f1a87b87e3cbdd8cbda1a56e6b5c9ffccd65a8ac2f600da9ceb8713f4dbba26f245bc52bcd8a1c56 0001-linux-user-fix-build-with-musl-on-aarch64.patch 3941ac043312864309e19f839a699ab2485bca51bbf3d5fdb39f1a87b87e3cbdd8cbda1a56e6b5c9ffccd65a8ac2f600da9ceb8713f4dbba26f245bc52bcd8a1c56 0001-linux-user-fix-build-with-musl-on-aarch64.patch
396224f5b44da749921e8a821359478c5238d8b6e24a9c0b4c5738c34e82f3062ec4639d495b8b5883d304af4a0d567e38aa6623aac1aa3a7164a5757c036528ac0 musl-F_SHLCK-and-F_EXLCK.patch 395224f5b44da749921e8a821359478c5238d8b6e24a9c0b4c5738c34e82f3062ec4639d495b8b5883d304af4a0d567e38aa6623aac1aa3a7164a5757c036528ac0 musl-F_SHLCK-and-F_EXLCK.patch