Reland "android: Optionally madvise(MADV_RANDOM) on .text."

This reverts commit 8e157d49242372de81d6804ffcb2e4be722efaa4.

Changes: Made ARM-only, as it doesn't compile on Android x86, and hasn't been
tested outside ARM.

Original change's description:
> android: Optionally madvise(MADV_RANDOM) on .text.
>
> This CL adds:
>
> - "anchor" functions at the beginning and end of .text: these are
>   already used in lightweight_cygprofile.cc, and require the orderfile
>   to be properly constructed, which is the case since
>   https://chromium-review.googlesource.com/753882. These functions are
>   trickier for regular builds, as they use --icf=all.
> - madvise(MADV_RANDOM): disable kernel readahead on a given range. This makes
>   the reporting logic for code residency clearer, as it actually shows which
>   pages are requested. This has to be called as early as possible and from all
>   processes, and may be enabled in all builds at a later date. This is
>   controlled by a new command-line flag, madvise-random-executable-code.
>
> Bug: 758566
> Change-Id: I8c7a5ca759b355b9e632d6ad027f8d9cd8fb84e8
> Reviewed-on: https://chromium-review.googlesource.com/776895
> Commit-Queue: Benoit L <lizeb@chromium.org>
> Reviewed-by: Camille Lamy <clamy@chromium.org>
> Reviewed-by: Lei Zhang <thestig@chromium.org>
> Reviewed-by: Egor Pasko <pasko@chromium.org>
> Reviewed-by: agrieve <agrieve@chromium.org>
> Reviewed-by: Matthew Cary <mattcary@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#518639}

TBR=pasko@chromium.org,thestig@chromium.org,mgersh@chromium.org,clamy@chromium.org,agrieve@chromium.org,lizeb@chromium.org,mattcary@chromium.org

Change-Id: I8e51971c2abeb1672ce8769ff55d4c3d69f1201a
Bug: 758566
Reviewed-on: https://chromium-review.googlesource.com/786031
Reviewed-by: Egor Pasko <pasko@chromium.org>
Reviewed-by: Benoit L <lizeb@chromium.org>
Commit-Queue: Benoit L <lizeb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#518945}

CrOS-Libchrome-Original-Commit: 3c35531820609841001af012580f85c0b6f1be73
8 files changed
tree: 8e7092b81402b0f4e6291f1a56b2022ac9e8f387
  1. base/
  2. build/
  3. components/
  4. dbus/
  5. device/
  6. ipc/
  7. mojo/
  8. testing/
  9. third_party/
  10. ui/