Subject: Re: Revision K strongarms ...
To: None <port-arm32@NetBSD.ORG>
From: None <Frederic.Elisei@imag.fr>
List: port-arm32
Date: 05/07/1998 15:03:18
<modify the linker so it _does_ page align everything>
This approach can't work as they are lot of small objects to load and link.
But not every object will need changing his alignement. Nor does it need
that the alignement correspond to a page ?
Can't we assume that every object has less than 1024 possibly defective LDM?
then the linker could find a small translation (+4 or +8 or +128 ...) so
that NONE of the dangerous LDM^ in code (or data matching the right pattern)
will be faulty. Wasted RAM will be a lot smaller, won't it ?
To achieve this, linker should try incrementing the load adress until
every op-code of the object at addresses load_adress+page_size*n-4 will not
be a failing one.
What if an object include dangerous LDM^ at every offset in a page ?
This can be detected at compile time, and means the object is big. So we
could assume this one WILL be page aligned and enforce NOP for either every
LDM at end of page (or another offset that minimises the number of extra NOP)
So only some LDM^ will be enlarged with a NOP.
So, a generic solution seems possible, but requests :
- modification of both the linker and the compiler, or just the linker is
no object is big enough to have dangerous LDM^ at every possible offset
in a page.
- a scan of the code segments before every link, or an 'alignement
compatibility bit-table' appended to any linkable thing.
Is this correct ? feasible ?
--
||| Frederic.Elisei@imag.fr ||| |||
+---+ http://www-vis.imag.fr/ +---+ +---+
=|SA |= =|ARM|= =|ARM|=
=|110|= ArmOric (ARM "Tri-powered") =|610|= =| 2 |=
+---+ http://sidonie.imag.fr/AcornDemos +---+ +---+
||| Latest changes on April the 2nd ||| |||