Subject: Re: Revision K strongarms ...
To: Philip Blundell <pb@nexus.co.uk>
From: None <kim@pvv.ntnu.no>
List: port-arm32
Date: 05/07/1998 14:13:15
> If you mean `modify the linker so it _does_ page align everything', that would 
> cause tremendous code bloat.  For example, the GNU C library contains 1076 
> object files.  Assuming that, on average, you'd waste half a page per object 
> by aligning them, that would cost you a total of over 2MB.  In fact it's even 
> worse than that because a significant number of them are much smaller than a 
> single page - they only contain a few hundred bytes of code.  So again, it's 
> possible, but you have to weigh up whether it's actually worth the cost.  If 
> you _did_ do this, you would either have to maintain two versions of 
> everything, or foist this wastage of space onto everybody who uses NetBSD, the 
> majority of whom probably don't have CPUs with this problem.

Then don't page align the code. Just let the linker put a NOP at the
end of each page.

This of course puts NOPs in the middle of the code, but the linker should
be able to handle that, since it must contain references to branches
and indexes. I don't know how this apply to PIC code though.

Km0