• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..--

READMED22-Nov-2023718 1712

foo.cppD22-Nov-2023319 2818

run.shD22-Nov-20231 KiB4628

README

1This test is here to check that all constructors and destructors
2are 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
15The main idea is to check that there is no .ctors or .dtors section in the
16generated shared library.
17