PIE aio patch

Up to PIE commit 0dfdabde8d29446d8d5a58c8d68b27c0cd7802dc in the jb2 branch. More PIE commits are needed
to complete everything but this lays the base frameworks part down.