All of lore.kernel.org
 help / color / mirror / Atom feed
From: hector@marcansoft.com (Hector Martin)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] Clean up ARM compressed loader
Date: Thu, 25 Feb 2010 11:05:00 +0100	[thread overview]
Message-ID: <4B864B4C.9020805@marcansoft.com> (raw)
In-Reply-To: <20100225093859.GA19870@n2100.arm.linux.org.uk>

Russell King - ARM Linux wrote:
> I wonder if we can get around this problem a slightly different way -
> instead of building the decompressor into misc.c, build it as a separate
> PIC object without the -Dstatic= stuff, and verify that it contains no
> read-write data.

You're still going to have issues if it uses read-only data and accesses
it via an offset from the GOT, though.

> Then we can tailor our misc.c not to use static data (which is the real
> problem - not the functions being static), and the -Dstatic= hack will
> go away.

If you can programmatically ensure that the decompressors do not use
anything but GOT entries to access data, that's certainly a better
solution than what we have now (I don't mean actually "fixing" them as
in -Dstatic=, just something that makes the build fail if this is not
the case so someone else can go and make the required changes). Maybe
building the object and then grepping the relocations for offenders, or
something like that.

However, considering my second patch can be adapted to avoid the two
extra copies, I still think that's a cleaner solution. All I have to do
is move things around in the linker script so the piggy is at the end of
the zImage, avoid copying that the first time around (and instead pass
the old pointer to ROM to the decompressor), and introduce the real
decompressed uncompressed kernel size to the mix so I can relocate the
decompressor to ZRELADDR+kernel_size (and fix the relocation check code
so it uses the real size, not some 4x guess), which would avoid the
second copy.

-- 
Hector Martin (hector at marcansoft.com)
Public Key: http://www.marcansoft.com/marcan.asc

  reply	other threads:[~2010-02-25 10:05 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-24  2:23 [PATCH] Clean up ARM compressed loader Hector Martin
2010-02-24  8:51 ` Uwe Kleine-König
2010-02-24  9:28   ` Hector Martin
2010-02-24 22:34 ` Russell King - ARM Linux
2010-02-24 23:34   ` Nicolas Pitre
2010-02-24 23:42     ` Russell King - ARM Linux
2010-02-24 23:57       ` Hector Martin
2010-02-25  0:01         ` Russell King - ARM Linux
2010-02-25  0:30           ` Hector Martin
2010-02-25  4:28             ` Nicolas Pitre
2010-02-25  4:33               ` Nicolas Pitre
2010-02-25  9:38               ` Russell King - ARM Linux
2010-02-25 10:05                 ` Hector Martin [this message]
2010-02-25 18:35                   ` Nicolas Pitre
2010-02-25 19:21                     ` Hector Martin
2010-02-25 19:40                       ` Nicolas Pitre
2010-02-25 19:56                         ` Hector Martin
2010-02-25 20:29                           ` Nicolas Pitre
2010-02-25 21:05                             ` Russell King - ARM Linux
2010-02-25 21:25                               ` Nicolas Pitre
2010-02-25 20:30                         ` Russell King - ARM Linux
2010-02-25 12:24                 ` Russell King - ARM Linux
2010-02-25 19:24                   ` Nicolas Pitre
2010-02-25 19:34                     ` Russell King - ARM Linux
2010-02-25 23:48                     ` Russell King - ARM Linux
2010-02-25 23:55                       ` Russell King - ARM Linux
2010-02-25  9:51               ` Hector Martin
2010-02-25 18:30                 ` Nicolas Pitre
2010-02-25  8:23             ` Russell King - ARM Linux
2010-02-25  4:06         ` Nicolas Pitre
  -- strict thread matches above, loose matches on Subject: below --
2010-02-23 13:57 hector at marcansoft.com
2010-02-23 14:07 ` Russell King - ARM Linux
2010-02-24  8:42 ` Uwe Kleine-König
2010-02-24  9:27   ` Hector Martin
2010-02-24 11:03     ` Russell King - ARM Linux
2010-02-24 15:20       ` Hector Martin
2010-02-24 15:30         ` Uwe Kleine-König
2010-02-24 22:09           ` Hector Martin
2010-02-24 22:30             ` Russell King - ARM Linux
2010-02-25  0:01               ` Hector Martin
2010-02-24 16:29         ` 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=4B864B4C.9020805@marcansoft.com \
    --to=hector@marcansoft.com \
    --cc=linux-arm-kernel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.