Thread (30 messages) 30 messages, 4 authors, 2010-02-25
STALE5972d

[PATCH] Clean up ARM compressed loader

From: nico@fluxnic.net (Nicolas Pitre)
Date: 2010-02-25 18:35:32

On Thu, 25 Feb 2010, Hector Martin wrote:
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.
Russell made a patch which simply ends up discarding .data section.
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.
You are still copying the actual decompressor code which is less optimal 
than what we already have.  The current solution, as I explained 
already, involves _zero_ copying.


Nicolas
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help