summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/binutils/binutils/relocatable_sdk.patch
blob: 33f9e68b5fad899769056aa30339aa36757b62db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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) }"
OpenPOWER on IntegriCloud