[PATCH] Clean up ARM compressed loader
From: Hector Martin <hidden>
Date: 2010-02-25 19:21:44
Nicolas Pitre wrote:
On Thu, 25 Feb 2010, Hector Martin wrote:quoted
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