Add doc for sentinel change in preinit_array/init_array/fini_array

Bug: 295944813
Bug: https://github.com/android/ndk/issues/1461
Test: none
Change-Id: I0bc90a312438b14bd3dc8b675e3083ac909f89df
diff --git a/android-changes-for-ndk-developers.md b/android-changes-for-ndk-developers.md
index c78528d..ab3b247 100644
--- a/android-changes-for-ndk-developers.md
+++ b/android-changes-for-ndk-developers.md
@@ -479,3 +479,20 @@
 You can read more about relative relocations
 and their long and complicated history at
 https://maskray.me/blog/2021-10-31-relative-relocations-and-relr.
+
+## No more sentinels in .preinit_array/.init_array/.fini_array sections of executables (in All API levels)
+
+In Android <= U and NDK <= 26, Android used sentinels in these sections of
+executables to locate the start and end of arrays. However, when building with
+LTO, the function pointers in the arrays can be reordered, making sentinels no
+longer work. This prevents constructors for global C++ variables from being
+called in static executables when using LTO.
+
+To fix this, in Android >= V and NDK >= 27, we removed sentinels and switched
+to using symbols inserted by LLD (like `__init_array_start`,
+`__init_array_end`) to locate the arrays. This also avoids keeping a section
+when there are no corresponding functions.
+
+For dynamic executables, we kept sentinel support in crtbegin_dynamic.o and
+libc.so. This ensures that executables built with newer crtbegin_dynamic.o
+(in NDK >= 27) work with older libc.so (in Android <= U), and vice versa.