Commit 93f3cab3 authored by Benoit Lize's avatar Benoit Lize Committed by Commit Bot

android: Add the start/end of ordered text markers to the orderfile.

A forthcoming CL will add the symbols to the binary, but will also
enforce their ordering, so the orderfile has to contain these symbols
first.
Adding the symbols early is not an issue, as linkers ignore unkown
entries.

Bug: 758566
Change-Id: I6580738f754067ce74acecd5deb796da246bf57d
Reviewed-on: https://chromium-review.googlesource.com/893142Reviewed-by: default avatarMatthew Cary <mattcary@chromium.org>
Reviewed-by: default avatarEgor Pasko <pasko@chromium.org>
Commit-Queue: Benoit L <lizeb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#532878}
parent 6e3c41dd
......@@ -385,10 +385,15 @@ def GeneratePatchedOrderfile(unpatched_orderfile, native_lib_filename,
# See the comment in //base/android/library_loader/anchor_functions.cc.
for prefix in _PREFIXES:
f.write(prefix + 'dummy_function_to_anchor_text\n')
for prefix in _PREFIXES:
f.write(prefix + 'dummy_function_start_of_ordered_text\n')
for section in expanded_sections:
f.write(section + '\n')
for prefix in _PREFIXES:
f.write(prefix + 'dummy_function_end_of_ordered_text\n')
# The following is needed otherwise Gold only applies a partial sort.
f.write('.text\n') # gets methods not in a section, such as assembly
f.write('.text.*\n') # gets everything else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment