diff options
author | Milan P. Stanić <mps@arvanta.net> | 2020-05-28 19:23:44 +0200 |
---|---|---|
committer | Ariadne Conill <ariadne@dereferenced.org> | 2020-05-28 18:41:32 +0000 |
commit | 6c885cfb750137fd1bc76cbbe30cc3596fa1228f (patch) | |
tree | 8d8669fde8f6a863148f3d717cddac388ad3c285 | |
parent | 7e087b0ff4f895d26de320a8751674ea5a08737e (diff) | |
download | alpine_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.patch | 89 | ||||
-rw-r--r-- | community/qemu/APKBUILD | 9 |
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 @@ | |||
1 | From 6818f32f74981d9bccec8afbab37c42b50ab58be Mon Sep 17 00:00:00 2001 | ||
2 | From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi> | ||
3 | Date: Thu, 4 Jul 2013 15:50:36 +0300 | ||
4 | Subject: [RFC PATCH] elfload: load PIE executables to right address | ||
5 | MIME-Version: 1.0 | ||
6 | Content-Type: text/plain; charset=UTF-8 | ||
7 | Content-Transfer-Encoding: 8bit | ||
8 | |||
9 | PIE images are ET_DYN images. Check first for pinterp_name to make | ||
10 | sure the main executable always is loaded to correct place. | ||
11 | |||
12 | See below for current behaviour of PIE executables: | ||
13 | |||
14 | Reserved 0x7f000000 bytes of guest address space | ||
15 | host mmap_min_addr=0x1000 | ||
16 | guest_base 0x7f7cb41d5000 | ||
17 | start end size prot | ||
18 | 0037f400-003fe400 0007f000 r-x | ||
19 | 003fe400-003ff400 00001000 --- | ||
20 | 003ff400-003fe400 fffff000 rw- | ||
21 | 003fe400-003ff400 00001000 --- | ||
22 | 003ff400-003ffc00 00000800 rw- | ||
23 | 003ffc00-003fec00 fffff000 r-x | ||
24 | 003fec00-003ffc00 00001000 --- | ||
25 | 003ffc00-0007f000 ffc7f400 rw- | ||
26 | start_brk 0x00000000 | ||
27 | end_code 0x7eff7ac0 | ||
28 | start_code 0x7eff7000 | ||
29 | start_data 0x7efffac0 | ||
30 | end_data 0x7efffc18 | ||
31 | start_stack 0x7eff6dc8 | ||
32 | brk 0x7efffc34 | ||
33 | entry 0x7e799b30 | ||
34 | 00000000-00005000 ---p 00000000 00:00 0 | ||
35 | 00005000-00015000 rw-p 00000000 00:00 0 | ||
36 | 00015000-7e77d000 ---p 00000000 00:00 0 | ||
37 | 7e77d000-7e7ec000 r-xp 00000000 68:03 14326298 /lib/libc.so | ||
38 | 7e7ec000-7e7f3000 ---p 00000000 00:00 0 | ||
39 | 7e7f3000-7e7f4000 rw-p 0006e000 68:03 14326298 /lib/libc.so | ||
40 | 7e7f4000-7e7f6000 rw-p 00000000 00:00 0 | ||
41 | 7e7f6000-7e7f7000 ---p 00000000 00:00 0 | ||
42 | 7e7f7000-7eff7000 rw-p 00000000 00:00 0 | ||
43 | 7eff7000-7eff8000 r-xp 00000000 68:03 9731305 /usr/bin/brk | ||
44 | 7eff8000-7efff000 ---p 00000000 00:00 0 | ||
45 | 7e7f7000-7eff7000 rw-p 00000000 00:00 0 [stack] | ||
46 | |||
47 | Showing how the main binary got loaded to wrong place. | ||
48 | |||
49 | Signed-off-by: Timo Teräs <timo.teras@iki.fi> | ||
50 | --- | ||
51 | I assume pinterp_name is only ever set for the main executable. | ||
52 | Quick 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 | |||
57 | diff --git a/linux-user/elfload.c b/linux-user/elfload.c | ||
58 | index 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 | -- | ||
88 | 1.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> |
5 | pkgname=qemu | 5 | pkgname=qemu |
6 | pkgver=4.2.0 | 6 | pkgver=5.0.0 |
7 | pkgrel=2 | 7 | pkgrel=0 |
8 | pkgdesc="QEMU is a generic machine emulator and virtualizer" | 8 | pkgdesc="QEMU is a generic machine emulator and virtualizer" |
9 | url="https://qemu.org/" | 9 | url="https://qemu.org/" |
10 | arch="all" | 10 | arch="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" | |||
152 | subpackages="$subpackages $pkgname-img" # -img must be declared the last | 153 | subpackages="$subpackages $pkgname-img" # -img must be declared the last |
153 | 154 | ||
154 | source="https://wiki.qemu-project.org/download/qemu-$pkgver.tar.xz | 155 | source="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 | ||
392 | sha512sums="2a79973c2b07c53e8c57a808ea8add7b6b2cbca96488ed5d4b669ead8c9318907dec2b6109f180fc8ca8f04c0f73a56e82b3a527b5626b799d7e849f2474ec56 qemu-4.2.0.tar.xz | 392 | sha512sums="21ef0cbe107c468a40f0fa2635db2a40048c8790b629dfffca5cd62bb1b502ea8eb133bfc40df5ecf1489e2bffe87f6829aee041cb8a380ff04a8afa23b39fcf qemu-5.0.0.tar.xz |
393 | 405008589cad1c8b609eca004d520bf944366e8525f85a19fc6e283c95b84b6c2429822ba064675823ab69f1406a57377266a65021623d1cd581e7db000134fd 0001-elfload-load-PIE-executables-to-right-address.patch | ||
394 | 98db5e23397cfad4a7210f9f7e1c5fa5c48f065785439521c5b39325c429f2dc367c40925adff6aa8677b3192a1a98a30e93d5b9c879df523deb019c40edd9d9 0006-linux-user-signal.c-define-__SIGRTMIN-MAX-for-non-GN.patch | 393 | 98db5e23397cfad4a7210f9f7e1c5fa5c48f065785439521c5b39325c429f2dc367c40925adff6aa8677b3192a1a98a30e93d5b9c879df523deb019c40edd9d9 0006-linux-user-signal.c-define-__SIGRTMIN-MAX-for-non-GN.patch |
395 | 1ac043312864309e19f839a699ab2485bca51bbf3d5fdb39f1a87b87e3cbdd8cbda1a56e6b5c9ffccd65a8ac2f600da9ceb8713f4dbba26f245bc52bcd8a1c56 0001-linux-user-fix-build-with-musl-on-aarch64.patch | 394 | 1ac043312864309e19f839a699ab2485bca51bbf3d5fdb39f1a87b87e3cbdd8cbda1a56e6b5c9ffccd65a8ac2f600da9ceb8713f4dbba26f245bc52bcd8a1c56 0001-linux-user-fix-build-with-musl-on-aarch64.patch |
396 | 224f5b44da749921e8a821359478c5238d8b6e24a9c0b4c5738c34e82f3062ec4639d495b8b5883d304af4a0d567e38aa6623aac1aa3a7164a5757c036528ac0 musl-F_SHLCK-and-F_EXLCK.patch | 395 | 224f5b44da749921e8a821359478c5238d8b6e24a9c0b4c5738c34e82f3062ec4639d495b8b5883d304af4a0d567e38aa6623aac1aa3a7164a5757c036528ac0 musl-F_SHLCK-and-F_EXLCK.patch |