summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/qemu
diff options
context:
space:
mode:
authorLaurentiu Palcu <laurentiu.palcu@intel.com>2012-09-11 16:55:31 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-09-12 15:13:40 +0100
commitc8e3e0149a23ee7f1477a73821d09e68883d988a (patch)
treee2246a82d611af81c7c4bdff1142f648f18fa3eb /meta/recipes-devtools/qemu
parentde69c6c94ef91182422b35374ea0d18d249fccf0 (diff)
downloadpoky-c8e3e0149a23ee7f1477a73821d09e68883d988a.tar.gz
nativesdk-qemu: fix SDK relocation issue
User mode emulation binaries are linked using a local linker script. The nativesdk ones were not used and the resulting binaries did not have the interp section resized. Hence, those binaries could not be relocated. [YOCTO #3083] (From OE-Core rev: da014e900adfe96f01290c5a8f5fb08e295ca204) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/qemu')
-rw-r--r--meta/recipes-devtools/qemu/qemu-1.2.0/relocatable_sdk.patch34
-rw-r--r--meta/recipes-devtools/qemu/qemu_1.2.0.bb6
2 files changed, 40 insertions, 0 deletions
diff --git a/meta/recipes-devtools/qemu/qemu-1.2.0/relocatable_sdk.patch b/meta/recipes-devtools/qemu/qemu-1.2.0/relocatable_sdk.patch
new file mode 100644
index 0000000000..0a01a8a048
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-1.2.0/relocatable_sdk.patch
@@ -0,0 +1,34 @@
1Upstream-Status: Inappropriate [SDK specific]
2
3In order to be able to change the dynamic loader path when relocating
4binaries, the interp section has to be made big enough to accomodate
5the new path (4096 is the maximum path length in Linux).
6
7Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
8
9Index: qemu-1.2.0/i386.ld
10===================================================================
11--- qemu-1.2.0.orig/i386.ld
12+++ qemu-1.2.0/i386.ld
13@@ -8,7 +8,7 @@ SECTIONS
14 {
15 /* Read-only sections, merged into text segment: */
16 . = 0x60000000 + SIZEOF_HEADERS;
17- .interp : { *(.interp) }
18+ .interp : { *(.interp); . = 0x1000; }
19 .hash : { *(.hash) }
20 .dynsym : { *(.dynsym) }
21 .dynstr : { *(.dynstr) }
22Index: qemu-1.2.0/x86_64.ld
23===================================================================
24--- qemu-1.2.0.orig/x86_64.ld
25+++ qemu-1.2.0/x86_64.ld
26@@ -6,7 +6,7 @@ SECTIONS
27 {
28 /* Read-only sections, merged into text segment: */
29 . = 0x60000000 + SIZEOF_HEADERS;
30- .interp : { *(.interp) }
31+ .interp : { *(.interp); . = 0x1000; }
32 .hash : { *(.hash) }
33 .dynsym : { *(.dynsym) }
34 .dynstr : { *(.dynstr) }
diff --git a/meta/recipes-devtools/qemu/qemu_1.2.0.bb b/meta/recipes-devtools/qemu/qemu_1.2.0.bb
index 55ac532535..7091f6d97f 100644
--- a/meta/recipes-devtools/qemu/qemu_1.2.0.bb
+++ b/meta/recipes-devtools/qemu/qemu_1.2.0.bb
@@ -17,6 +17,12 @@ SRC_URI = "\
17SRC_URI[md5sum] = "78eb1e984f4532aa9f2bdd3c127b5b61" 17SRC_URI[md5sum] = "78eb1e984f4532aa9f2bdd3c127b5b61"
18SRC_URI[sha256sum] = "c8b84420d9f4869397f84cad2dabd9a475b7723d619a924a873740353e9df936" 18SRC_URI[sha256sum] = "c8b84420d9f4869397f84cad2dabd9a475b7723d619a924a873740353e9df936"
19 19
20PR = "r1"
21
22SRC_URI_append_virtclass-nativesdk = "\
23 file://relocatable_sdk.patch \
24 "
25
20do_configure_prepend_virtclass-nativesdk() { 26do_configure_prepend_virtclass-nativesdk() {
21 if [ "${@base_contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}" = "" ] ; then 27 if [ "${@base_contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}" = "" ] ; then
22 # Undo the -lX11 added by linker-flags.patch 28 # Undo the -lX11 added by linker-flags.patch