aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 @@
+Upstream-Status: Inappropriate [SDK specific]
+
+In order to be able to change the dynamic loader path when relocating
+binaries, the interp section has to be made big enough to accomodate
+the new path (4096 is the maximum path length in Linux).
+
+Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
+
+Index: qemu-1.2.0/i386.ld
+===================================================================
+--- qemu-1.2.0.orig/i386.ld
++++ qemu-1.2.0/i386.ld
+@@ -8,7 +8,7 @@ SECTIONS
+ {
+ /* Read-only sections, merged into text segment: */
+ . = 0x60000000 + SIZEOF_HEADERS;
+- .interp : { *(.interp) }
++ .interp : { *(.interp); . = 0x1000; }
+ .hash : { *(.hash) }
+ .dynsym : { *(.dynsym) }
+ .dynstr : { *(.dynstr) }
+Index: qemu-1.2.0/x86_64.ld
+===================================================================
+--- qemu-1.2.0.orig/x86_64.ld
++++ qemu-1.2.0/x86_64.ld
+@@ -6,7 +6,7 @@ SECTIONS
+ {
+ /* Read-only sections, merged into text segment: */
+ . = 0x60000000 + SIZEOF_HEADERS;
+- .interp : { *(.interp) }
++ .interp : { *(.interp); . = 0x1000; }
+ .hash : { *(.hash) }
+ .dynsym : { *(.dynsym) }
+ .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 = "\
SRC_URI[md5sum] = "78eb1e984f4532aa9f2bdd3c127b5b61"
SRC_URI[sha256sum] = "c8b84420d9f4869397f84cad2dabd9a475b7723d619a924a873740353e9df936"
+PR = "r1"
+
+SRC_URI_append_virtclass-nativesdk = "\
+ file://relocatable_sdk.patch \
+ "
+
do_configure_prepend_virtclass-nativesdk() {
if [ "${@base_contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}" = "" ] ; then
# Undo the -lX11 added by linker-flags.patch