android: Use a linker script to find the start and end of .text.

We need to know where the start and end of .text are in order to
prefetch all of .text. Previously this was done using a pair of anchor
functions and a combination of an orderfile entry and a custom section
that happened to be laid out after .text to place the functions at
either end of .text. This broke when lld was changed to place the
ordered sections into the middle of .text instead of the beginning.

With this change we use a linker script to find the start and end of
.text instead, which should work regardless of where the linker decides
to put the ordered sections or the relative order of output sections.

Bug: 833299, 833631
Change-Id: Iad5b0ec9e870377af65cdef8ef5695192fc6b8a0
Reviewed-on: https://chromium-review.googlesource.com/1023290
Commit-Queue: Egor Pasko <pasko@chromium.org>
Reviewed-by: agrieve <agrieve@chromium.org>
Reviewed-by: Benoit L <lizeb@chromium.org>
Reviewed-by: Egor Pasko <pasko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#552681}

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