Not taking sides, but ```man atexit``` states:

```
Linux Notes
    Since glibc 2.2.3, atexit() (and  on_exit(3))  can  be  used  within  a
    shared  library  to establish functions that are called when the shared
    library is unloaded.
````