Chrome uses this script: https://source.chromium.org/chromium/chromium/src/+/main:base/android/library_loader/anchor_functions.lds
# Define symbols that point to the start and end of the .text section.
PROVIDE_HIDDEN(linker_script_start_of_text = ADDR(.text));
# The `malloc_hook` section comes from function attributes set in
# third_party/abseil-cpp. See http://crbug.com/352317042.
PROVIDE_HIDDEN(linker_script_end_of_text =
ADDR(.text) + SIZEOF(.text) + SIZEOF(malloc_hook));
I think linker_script_end_of_text is different from _etext due to the extra section, and that linker_script_start_of_text is different than __executable_start.
Note: readelf -S libchrome.so shows:
[17] .text PROGBITS 0000000000f84000 f84000 9a6a41c 00 AXo 0 0 16384
[18] malloc_hook PROGBITS 000000000a9ee41c a9ee41c 0008a4 00 AX 0 0 4
Chrome uses this script: https://source.chromium.org/chromium/chromium/src/+/main:base/android/library_loader/anchor_functions.lds
I think
linker_script_end_of_textis different from_etextdue to the extra section, and thatlinker_script_start_of_textis different than__executable_start.Note:
readelf -S libchrome.soshows: