Actually printf("%p\n", &system);printf("%p\n", &system); doesn't print the libc addresses it actually prints system@pltthe system@plt address, which is not randomized by ASLR
But it does randomize the libc address which ultimately protects the ret2libc attack !!