1 This test is here to check that all constructors and destructors 2 are placed in the .init_array and .fini_array sections. More precisely: 3 4 - The address of functions with __attribute__((constructor)) are placed in 5 the .init_array section. 6 7 - The address of functions with __attribute__((destructor)) are placed in 8 the .fini_array section 9 10 - The address of static C++ constructors are placed in the .init_array 11 section. There is no corresponding entry in the .fini_array for the 12 corresponding destructors. Instead, the constructor must call __cxa_atexit 13 to register the destructors manually. 14 15 The main idea is to check that there is no .ctors or .dtors section in the 16 generated shared library. 17