linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] MIPS: Fix computation on entry point
@ 2018-08-28 15:52 Philippe Reynes
  2018-08-29 17:57 ` Paul Burton
  0 siblings, 1 reply; 2+ messages in thread
From: Philippe Reynes @ 2018-08-28 15:52 UTC (permalink / raw)
  To: ralf, paul.burton, jhogan; +Cc: linux-mips, linux-kernel, Philippe Reynes

Since commit 27c524d17430 ("MIPS: Use the entry point from the ELF
file header"), the kernel entry point is computed with a grep on
"start address" on the output of objdump. It works fine when the
default language is english but it may fail on other language (for
example in French, the grep should be done on "adresse de départ").
To fix this computation on most machine, I propose to force the
language to english with "LC_ALL=C".

Fixes: 27c524d17430 ("MIPS: Use the entry point from the ELF file header")

Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
---
 arch/mips/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/mips/Makefile b/arch/mips/Makefile
index d74b374..835aa8f 100644
--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile
@@ -258,7 +258,7 @@ load-y					= $(CONFIG_PHYSICAL_START)
 endif
 
 # Sign-extend the entry point to 64 bits if retrieved as a 32-bit number.
-entry-y		= $(shell $(OBJDUMP) -f vmlinux 2>/dev/null \
+entry-y		= $(shell LC_ALL=C $(OBJDUMP) -f vmlinux 2>/dev/null \
 			| sed -n '/^start address / { \
 				s/^.* //; \
 				s/0x\([0-7].......\)$$/0x00000000\1/; \
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] MIPS: Fix computation on entry point
  2018-08-28 15:52 [PATCH] MIPS: Fix computation on entry point Philippe Reynes
@ 2018-08-29 17:57 ` Paul Burton
  0 siblings, 0 replies; 2+ messages in thread
From: Paul Burton @ 2018-08-29 17:57 UTC (permalink / raw)
  To: Philippe Reynes; +Cc: ralf, jhogan, linux-mips, linux-kernel

Hi Philippe,

On Tue, Aug 28, 2018 at 05:52:50PM +0200, Philippe Reynes wrote:
> Since commit 27c524d17430 ("MIPS: Use the entry point from the ELF
> file header"), the kernel entry point is computed with a grep on
> "start address" on the output of objdump. It works fine when the
> default language is english but it may fail on other language (for
> example in French, the grep should be done on "adresse de départ").

D'oh!

> To fix this computation on most machine, I propose to force the
> language to english with "LC_ALL=C".

I wonder if it's time to bite the bullet & just write a little custom
program to do what we need, rather than trying to wrangle standard tools
that *almost* do what we need but not quite... Patch incoming.

Thanks,
    Paul

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-08-29 17:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-28 15:52 [PATCH] MIPS: Fix computation on entry point Philippe Reynes
2018-08-29 17:57 ` Paul Burton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).