aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/binutils/binutils
diff options
context:
space:
mode:
authorLaurentiu Palcu <laurentiu.palcu@intel.com>2012-07-31 11:49:34 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-08-02 15:22:45 +0100
commit9bf657bbdfe7c1a9dff1cc121eab496e3e407197 (patch)
tree6d889fac1ccd8ff42139fd7904b7b40c4a242a79 /meta/recipes-devtools/binutils/binutils
parent6be55d36333e0c81a4926332d036246d28d995c4 (diff)
downloadopenembedded-core-contrib-9bf657bbdfe7c1a9dff1cc121eab496e3e407197.tar.gz
binutils: relocatable SDK: change PT_INTERP section size
This patch is needed so that all SDK binaries have the PT_INTERP section size set to 4096 (max path size in Linux) in order to be able to parse the binaries later and change the interpreter to the path we want. Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/binutils/binutils')
-rw-r--r--meta/recipes-devtools/binutils/binutils/relocatable_sdk.patch22
1 files changed, 22 insertions, 0 deletions
diff --git a/meta/recipes-devtools/binutils/binutils/relocatable_sdk.patch b/meta/recipes-devtools/binutils/binutils/relocatable_sdk.patch
new file mode 100644
index 0000000000..33f9e68b5f
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils/relocatable_sdk.patch
@@ -0,0 +1,22 @@
+Upstream-Status: Inappropriate [SDK specific]
+
+This patch will modify the ELF linker scripts so that the crosssdk linker will
+generate binaries with a 4096 bytes PT_INTERP section. When the binaries will
+be relocated, at SDK install time, the interpreter path can be easily changed
+by the relocating script.
+
+Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
+
+Index: binutils-2.22/ld/scripttempl/elf.sc
+===================================================================
+--- binutils-2.22.orig/ld/scripttempl/elf.sc
++++ binutils-2.22/ld/scripttempl/elf.sc
+@@ -116,7 +116,7 @@ if test -n "${COMMONPAGESIZE}"; then
+ DATA_SEGMENT_RELRO_END=". = DATA_SEGMENT_RELRO_END (${SEPARATE_GOTPLT-0}, .);"
+ fi
+ if test -z "${INITIAL_READONLY_SECTIONS}${CREATE_SHLIB}"; then
+- INITIAL_READONLY_SECTIONS=".interp ${RELOCATING-0} : { *(.interp) }"
++ INITIAL_READONLY_SECTIONS=".interp ${RELOCATING-0} : { *(.interp); . = 0x1000; }"
+ fi
+ if test -z "$PLT"; then
+ IPLT=".iplt ${RELOCATING-0} : { *(.iplt) }"