[\s\\]*\s+ # possible line continuation
([A-Za-z0-9_/.-]+/)? # path to file
[A-Za-z0-9_-]+ # binary name (no dots!)
- (\.so([0-9.])*|\.la)? # library (including version)
+ (\.so[0-9.]*[a-z]?|\.la)? # library (including version)
(\s|\\|\$) # end of file name
}x
or $line =~ /^libtool: link: /
gcc -shared -fPIC -DPIC libtest.o -lpthread -O2 -Wl,--as-needed -o libtest.so
gcc -shared -fPIC test.o -Wl,-z -Wl,relro -o .libs/libtest.so.1.0.0
+
+gcc -shared -o libtest.so.0d ./test-a.o test/./test-b.o -Wl,-z,now -lpthread -ldl
gcc -shared -fPIC -DPIC libtest.o -lpthread -O2 -Wl,relro -Wl,now -Wl,--as-needed -o libtest.so
gcc -shared -fPIC test.o -Wl,-z -Wl,relro -Wl,now -o .libs/libtest.so.1.0.0
+
+gcc -shared -fPIE -pie -o libtest.so.0d ./test-a.o test/./test-b.o -Wl,-z,relro -Wl,-z,now -lpthread -ldl
LDFLAGS missing (-Wl,-z,now): gcc -shared -fPIC -DPIC libtest.o -lpthread -O2 -Wl,relro -Wl,--as-needed -o libtest.so
LDFLAGS missing (-Wl,-z,relro -Wl,-z,now): gcc -shared -fPIC -DPIC libtest.o -lpthread -O2 -Wl,--as-needed -o libtest.so
LDFLAGS missing (-Wl,-z,now): gcc -shared -fPIC test.o -Wl,-z -Wl,relro -o .libs/libtest.so.1.0.0
+LDFLAGS missing (-Wl,-z,relro -fPIE -pie): gcc -shared -o libtest.so.0d ./test-a.o test/./test-b.o -Wl,-z,now -lpthread -ldl
";