I found interesting moment: the atexit()
function works differently for bionic
and glibc
. Here is an example:
#include <cstdlib>
#include <cstdio>
extern "C" {
void one(){
printf("one\n");
}
void two() {
printf("two\n");
atexit(one);
}
}
int main() {
atexit(two);
}
Results for bionic
:
two
Results for glibc
:
two
one
Why do the results differ?