gcc -Wl,-z,relro -o test test-a.o test-b.o test-c.o -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
gcc -Wl,-z,relro -o test test-a.o test-b.o test-c.o -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