linker: restore prelink support

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

This commit partially reverts 4688279db5dcc4004941e7f133c4a1c3617d842c

bionic: linker: fix prelink support

load_bias_ needs to be calculated from the min_vaddr, not the
prelink address

Fixes

couldn't map "libraryname.so" segment 1: Invalid argument

Change-Id: Iee5325e048daee78e8dcaa47c87454b908c89b4e
diff --git a/linker/Android.mk b/linker/Android.mk
index 309f11c..ffd8435 100644
--- a/linker/Android.mk
+++ b/linker/Android.mk
@@ -47,8 +47,12 @@
 LOCAL_CONLYFLAGS += \
     -std=gnu99 \
 
+ifneq ($(TARGET_NEEDS_PRELINK_SUPPORT),true)
 LOCAL_CPPFLAGS += \
-    -Wold-style-cast \
+    -Wold-style-cast
+else
+  LOCAL_CFLAGS += -DENABLE_PRELINK_SUPPORT
+endif
 
 ifeq ($(TARGET_IS_64_BIT),true)
 LOCAL_CPPFLAGS += -DTARGET_IS_64_BIT