#if !defined(CRTBEGIN_STATIC) /* This function will be called during normal program termination *torunthedestructorsthatarelistedinthe.fini_arraysection *oftheexecutable,ifany. * *'fini_array'pointstoalistoffunctionaddresses.
*/ staticvoid call_fini_array() {
fini_func_t** array = __fini_array_start;
size_t count = __fini_array_end - __fini_array_start; // Call fini functions in reverse order. while (count-- > 0) {
fini_func_t* function = array[count];
(*function)();
}
}
// libc.so needs fini_array with sentinels. So create a fake fini_array with sentinels. // It contains a function to call functions in real fini_array. static fini_func_t* fini_array_with_sentinels[] = {
(fini_func_t*)-1,
&call_fini_array,
(fini_func_t*)0,
}; #endif// !defined(CRTBEGIN_STATIC)
// On arm32 and arm64, when targeting Q and up, overalign the TLS segment to // (8 * sizeof(void*)), which reserves enough space between the thread pointer // and the executable's TLS segment for Bionic's TLS slots. It has the side // effect of placing a 0-sized TLS segment into Android executables that don't // use TLS, but this should be harmless. // // To ensure that the .tdata input section isn't deleted (e.g. by // --gc-sections), the .text input section (which contains _start) has a // relocation to the .tdata input section. #if __ANDROID_API__ >= 29 #ifdefined(__arm__) asm(" .section .tdata,\"awT\",%progbits\n" " .p2align 5\n" " .text\n" " .reloc 0, R_ARM_NONE, .tdata\n"); #elifdefined(__aarch64__) asm(" .section .tdata,\"awT\",@progbits\n" " .p2align 6\n" " .text\n" " .reloc 0, R_AARCH64_NONE, .tdata\n"); #endif #endif
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.