I would like to build a C++ application which can be launched on all Linux systems having libc >= 2.31. On my build system (Ubuntu), I have libc 2.34. Here is my (empty) application:
int main() {
return 0;
}
I built it with g++ -o app app.cpp and according to the following result, I understand that my application requires libc >= 2.34 to run. Is my understanding correct ?
$ nm -D app
w __cxa_finalize@GLIBC_2.2.5
w __gmon_start__
w _ITM_deregisterTMCloneTable
w _ITM_registerTMCloneTable
U __libc_start_main@GLIBC_2.34
How build my application for libc <= 2.31 ? I tried to add "__asm__ (".symver __libc_start_main, __libc_start_main@GLIBC_2.2.5");" (based on my understanding of this post) before my main method but it does not change anything.