From: Khem Raj <raj.khem@gmail.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH] binutils-crossdk: Fix interp size expansion
Date: Mon, 1 Oct 2012 22:36:55 -0700 [thread overview]
Message-ID: <1349156215-16686-1-git-send-email-raj.khem@gmail.com> (raw)
Currently for sdk binutils we expand the size of .interp
section to 0x1000 assuming that its at the beginning of
the linker map but there may be program header before that
so actually we want to add 0x1000 - sizeof(.interp) section
to current location and not assign is absolutely to 0x1000
This fixes errors like
built in linker script:11 cannot move location counter backwards (from
0000000000401054 to 0000000000401000)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
.../binutils/binutils-crosssdk_2.22.bb | 2 +-
.../binutils/binutils/relocatable_sdk.patch | 10 +++++-----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/meta/recipes-devtools/binutils/binutils-crosssdk_2.22.bb b/meta/recipes-devtools/binutils/binutils-crosssdk_2.22.bb
index c936549..d3c25b6 100644
--- a/meta/recipes-devtools/binutils/binutils-crosssdk_2.22.bb
+++ b/meta/recipes-devtools/binutils/binutils-crosssdk_2.22.bb
@@ -2,7 +2,7 @@ require binutils-cross_${PV}.bb
inherit crosssdk
-PR = "r1"
+PR = "r2"
PROVIDES = "virtual/${TARGET_PREFIX}binutils-crosssdk"
diff --git a/meta/recipes-devtools/binutils/binutils/relocatable_sdk.patch b/meta/recipes-devtools/binutils/binutils/relocatable_sdk.patch
index 33f9e68..4a2494a 100644
--- a/meta/recipes-devtools/binutils/binutils/relocatable_sdk.patch
+++ b/meta/recipes-devtools/binutils/binutils/relocatable_sdk.patch
@@ -7,16 +7,16 @@ by the relocating script.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
-Index: binutils-2.22/ld/scripttempl/elf.sc
+Index: git/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
+--- git.orig/ld/scripttempl/elf.sc 2012-10-01 21:42:18.729294685 -0700
++++ git/ld/scripttempl/elf.sc 2012-10-01 22:26:35.149173335 -0700
+@@ -125,7 +125,7 @@
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; }"
++ INITIAL_READONLY_SECTIONS=".interp ${RELOCATING-0} : { *(.interp); . = (. & 0x1000) + 0x1000; }"
fi
if test -z "$PLT"; then
IPLT=".iplt ${RELOCATING-0} : { *(.iplt) }"
--
1.7.9.5
next reply other threads:[~2012-10-02 5:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-02 5:36 Khem Raj [this message]
2012-10-02 7:33 ` [PATCH] binutils-crossdk: Fix interp size expansion Khem Raj
2012-10-02 9:05 ` Laurentiu Palcu
2012-11-16 18:57 ` Ruslan Babayev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1349156215-16686-1-git-send-email-raj.khem@gmail.com \
--to=raj.khem@gmail.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox