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: Iee5325e048daee78e8dcaa47c87454b908c89b4e
libc: Replaced O(n^2) strstr with O(n)

Took it from glibc.

Change-Id: Ide8866a8db81c3df99ebae65a0c35fe1a34679ce