From: Lada Trimasova <Lada.Trimasova@synopsys.com>
To: linux-snps-arc@lists.infradead.org
Cc: linux-kernel@vger.kernel.org,
Lada Trimasova <Lada.Trimasova@synopsys.com>,
Vineet Gupta <Vineet.Gupta1@synopsys.com>,
Alexey Brodkin <Alexey.Brodkin@synopsys.com>
Subject: [PATCH] Arc: fix entry point calculation for locales other than english
Date: Tue, 3 Nov 2015 20:34:59 +0300 [thread overview]
Message-ID: <1446572099-2450-1-git-send-email-ltrimas@synopsys.com> (raw)
The problem was detected while making uImage.
To find the line with entry point address in the result
of the "readelf -h vmlinux" command "grep ENTRY POINT" is used.
But if the operating system locale is not english,
command readelf returns lines in local language.
Grep cannot find the line which contains "ENTRY POINT" in english.
Our decision uses readelf key which displays the symbol table.
Using grep _stext it finds the line with entry point in this table.
Signed-off-by: Lada Trimasova <ltrimas@synopsys.com>
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: Alexey Brodkin <abrodkin@synopsys.com>
---
arch/arc/boot/Makefile | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/arc/boot/Makefile b/arch/arc/boot/Makefile
index e597cb34..fa89a47 100644
--- a/arch/arc/boot/Makefile
+++ b/arch/arc/boot/Makefile
@@ -6,8 +6,7 @@ targets := vmlinux.bin vmlinux.bin.gz uImage
OBJCOPYFLAGS= -O binary -R .note -R .note.gnu.build-id -R .comment -S
-LINUX_START_TEXT = $$(readelf -h vmlinux | \
- grep "Entry point address" | grep -o 0x.*)
+LINUX_START_TEXT = $$(readelf -s vmlinux | grep _stext | awk '{print $$2}')
UIMAGE_LOADADDR = $(CONFIG_LINUX_LINK_BASE)
UIMAGE_ENTRYADDR = $(LINUX_START_TEXT)
--
1.9.1
next reply other threads:[~2015-11-03 17:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-03 17:34 Lada Trimasova [this message]
2015-11-04 11:56 ` Vineet Gupta
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=1446572099-2450-1-git-send-email-ltrimas@synopsys.com \
--to=lada.trimasova@synopsys.com \
--cc=Alexey.Brodkin@synopsys.com \
--cc=Vineet.Gupta1@synopsys.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-snps-arc@lists.infradead.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
Powered by JetHome