# Compiling and linking in one step must also check CFLAGS/CPPFLAGS.
gcc -Wl,-z,relro -o test test.c -ltest
gcc -shared -fPIC -Wl,-z,relro -o test.so test.c -ltest
# Compiling and linking in one step must also check CFLAGS/CPPFLAGS.
gcc -Wl,-z,relro -o test test.c -ltest
gcc -shared -fPIC -Wl,-z,relro -o test.so test.c -ltest