From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Nicolas Pitre <nicolas.pitre@linaro.org>
Cc: Peter Maydell <peter.maydell@linaro.org>,
Daniel Thompson <daniel.thompson@linaro.org>,
Joel Fernandes <joelf@ti.com>,
linux-arm-msm@vger.kernel.org,
Stephen Boyd <sboyd@codeaurora.org>,
Peter Crosthwaite <peter.crosthwaite@xilinx.com>,
QEMU Developers <qemu-devel@nongnu.org>,
Jason Gunthorpe <jgunthorpe@obsidianresearch.com>,
Christopher Covington <cov@codeaurora.org>,
linux-arm-kernel@lists.infradead.org
Subject: Re: Change of TEXT_OFFSET for multi_v7_defconfig
Date: Tue, 22 Apr 2014 19:36:39 +0100 [thread overview]
Message-ID: <20140422183639.GY24070@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <alpine.LFD.2.11.1404221341130.980@knanqh.ubzr>
On Tue, Apr 22, 2014 at 01:55:16PM -0400, Nicolas Pitre wrote:
> We do not want people in general to have PLAT_PHYS_OFFSET defined and
> CONFIG_ARM_PATCH_PHYS_VIRT disabled. In fact a huge effort has been
> deployed to go the exact opposite way over the last few years.
>
> There are special cases where CONFIG_ARM_PATCH_PHYS_VIRT needs to be
> turned off for example. But those are specialized configurations and
> they should be the exception not the norm. And you should be knowing
> what you're doing in those cases.
>
> So I doubt it is worth complexifying the linker script for something
> that is meant to be the exception, _especially_ if this is for some
> debugging environment purposes. You may just adjust some setting in
> your environment or do a quick kernel modification locally instead.
> And if you don't know what to modify then you're probably lacking the
> necessary qualifications to perform that kind of kernel debugging in the
> first place.
>
> Making the patch available on a mailing list is fine. If it is useful
> to someone else then it'll be found. But I don't think this is useful
> upstream.
Also, let's not forget that it the ELF file can be modified after the
kernel build:
$ vmlinux=your-vmlinux-file
$ newlma=lma-for-your-platform
$ arm-linux-objcopy $(
arm-linux-objdump -h ${vmlinux} |
grep -B1 'LOAD' | \
sed -nr 's/^[ 0-9]*[0-9] ([^ ]*).*/--change-section-lma \1+${newlma}/p') \
${vmlinux} ${vmlinux}-${newlma}
(It would be nice if objcopy could be told "change any section with _this_
attribute".)
The nice thing about this is that you can keep ARM_PATCH_PHYS_VIRT enabled
and not have to change the code in any way - you just fix up the headers on
the ELF file.
--
FTTC broadband for 0.8mile line: now at 9.7Mbps down 460kbps up... slowly
improving, and getting towards what was expected from it.
next prev parent reply other threads:[~2014-04-22 18:36 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-15 10:44 Change of TEXT_OFFSET for multi_v7_defconfig Daniel Thompson
2014-04-15 17:53 ` Stephen Boyd
2014-04-16 16:18 ` Christopher Covington
2014-04-16 19:14 ` Nicolas Pitre
2014-04-16 21:08 ` Christopher Covington
2014-04-16 21:36 ` Peter Maydell
2014-04-16 22:34 ` Russell King - ARM Linux
2014-04-16 22:33 ` Russell King - ARM Linux
2014-04-16 23:21 ` Nicolas Pitre
2014-04-17 18:33 ` Christopher Covington
2014-04-17 19:48 ` Nicolas Pitre
2014-04-17 20:49 ` Christopher Covington
2014-04-17 20:54 ` Peter Maydell
2014-04-17 20:35 ` Jason Gunthorpe
2014-04-22 9:44 ` Daniel Thompson
2014-04-22 17:05 ` Jason Gunthorpe
2014-04-22 17:55 ` Nicolas Pitre
2014-04-22 18:36 ` Russell King - ARM Linux [this message]
2014-04-22 14:50 ` Michal Simek
2014-04-22 17:00 ` [Qemu-devel] " Jason Gunthorpe
2014-04-22 17:11 ` Russell King - ARM Linux
2014-04-22 17:53 ` Jason Gunthorpe
2014-04-22 18:12 ` Russell King - ARM Linux
2014-04-22 18:32 ` Arnd Bergmann
2014-04-22 18:38 ` Russell King - ARM Linux
2014-04-22 18:45 ` Arnd Bergmann
2014-04-17 17:11 ` Rob Herring
2014-04-17 20:06 ` Nicolas Pitre
2014-04-17 20:16 ` Russell King - ARM Linux
2014-04-17 21:18 ` Rob Herring
2014-04-17 21:35 ` Russell King - ARM Linux
2014-04-18 2:53 ` Rob Herring
2014-04-18 4:34 ` Nicolas Pitre
2014-04-22 10:26 ` Daniel Thompson
2014-04-22 10:40 ` Russell King - ARM Linux
2014-04-22 11:41 ` Daniel Thompson
2014-04-18 8:41 ` Russell King - ARM Linux
2014-04-22 9:53 ` Daniel Thompson
2014-04-22 10:07 ` Russell King - ARM Linux
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=20140422183639.GY24070@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=cov@codeaurora.org \
--cc=daniel.thompson@linaro.org \
--cc=jgunthorpe@obsidianresearch.com \
--cc=joelf@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=nicolas.pitre@linaro.org \
--cc=peter.crosthwaite@xilinx.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=sboyd@codeaurora.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;
as well as URLs for NNTP newsgroup(s).