Subject: [PATCH] ARM: Fix uncompress code compile for different definesof static(void)

From: [email-masked] (Tony Lindgren)
Date: Thu, 14 Jan 2010 11:38:15 -0800

* Russell King - ARM Linux <[email-masked]> [100114 01:14]:
> On Thu, Jan 14, 2010 at 09:29:52AM +0100, Uwe Kleine-K?nig wrote:
> > I think the cleanest solution would be to remove -Dstatic=.  I don't
> > know the exact reason for it being there.
> 
> Thereby breaking the ability to build a relocatable decompressor.
> 
> > Russell, maybe these toolchain problems are gone in the meantime?
> 
> I don't think it was toolchain problems.  Having the text and data
> segments independently relocatable is actually an abuse of the ELF
> format - it's not something it directly supports.
> 
> From what I remember, having 'static' in there results in either
> function calls or static data being indirected through the GOT table,
> which means it has to be relocated along side the data segment - which
> makes the offset between the text and data segments fixed.
> 
> I would not believe that the "problems" have gone because the toolchain
> is working how it's supposed to.
> 
> The -Dstatic= stays.

I've added the compile fix with the subject fixed into Russell's
patch system as 5882/1.

Regards,

Tony