Bionic: Mark PMD aligned text segments huge page eligible

To take advantage of file-backed huge pages for the text segments of key
shared libraries (go/android-hugepages), the dynamic linker must load
candidate ELF files at an appropriately aligned address and mark
executable segments with MADV_HUGEPAGE.

This patches uses segments' p_align values to determine when a file is
PMD aligned (2MB alignment), and performs load operations accordingly.

Bug: 158135888
Test: Verified PMD aligned libraries are backed with huge pages on
supporting kernel versions.

Change-Id: Ia2367fd5652f663d50103e18f7695c59dc31c7b9
diff --git a/linker/linker.h b/linker/linker.h
index e1775fb..74bdcc7 100644
--- a/linker/linker.h
+++ b/linker/linker.h
@@ -110,6 +110,8 @@
 void set_application_target_sdk_version(int target);
 int get_application_target_sdk_version();
 
+bool get_transparent_hugepages_supported();
+
 enum {
   /* A regular namespace is the namespace with a custom search path that does
    * not impose any restrictions on the location of native libraries.