More changes to try and fix disabling arm pie

Change-Id: I4038312021d8c73115531368edc473d00e9a4083
Revert "Revert some changes trying to fix disable arm pie flag"

This reverts commit 3b2025f2e3623a00468d3f9a1df134878108079c.

Change-Id: I47693d6fd91bd375691ea99857609d71848dbc8c