linker: restore prelink support

Prelink support is required to load old vendor binary blobs
on many devices properly

This commit partially reverts 4688279db5dcc4004941e7f133c4a1c3617d842c

Change-Id: Ibc835095579c0bbd18aff61f37bd420de353e94d
Revert "sha1: Use bswap* to optimize byte order"

This reverts commit 259b660f6a51be7f627e7c2a6376af0b21b55fbb.
This was triggering the new ssp checks and killing processes
Merge remote-tracking branch 'aokp/jb-mr1' into jb-mr1