[PATCH] Clean up ARM compressed loader

Hector Martin hector at marcansoft.com
Thu Feb 25 14:21:44 EST 2010


Nicolas Pitre wrote:
> 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.

You still have the issue of the .bss section. Though I must admit this
would be rare, a decompressor using the .bss section would still cause
silent breakage. And I'm still not convinced that compiler behavior is
defined such that this cannot break in the future.

> 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.

The overhead of copying the decompressor is negligible. We're talking
somewhere along the lines of 0.1% of the time spent inside the
decompressor, worst case.

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




More information about the linux-arm-kernel mailing list