diff -Nurd cffi-1.15.0.orig/testing/cffi1/test_verify1.py cffi-1.15.0/testing/cffi1/test_verify1.py --- cffi-1.15.0.orig/testing/cffi1/test_verify1.py 2021-10-12 19:59:28.000000000 -0400 +++ cffi-1.15.0/testing/cffi1/test_verify1.py 2022-02-04 11:39:08.000000000 -0500 @@ -2101,7 +2101,7 @@ ffi1 = FFI() ffi1.cdef("extern int foo_verify_dlopen_flags_1;") sys.setdlopenflags(ffi1.RTLD_GLOBAL | ffi1.RTLD_NOW) - lib1 = ffi1.verify("int foo_verify_dlopen_flags_1;") + lib1 = ffi1.verify("int foo_verify_dlopen_flags_1;", extra_link_args=["-Wl,-flat_namespace"]) finally: sys.setdlopenflags(old) @@ -2110,7 +2110,7 @@ lib2 = ffi2.verify(""" extern int foo_verify_dlopen_flags_1; static int *getptr(void) { return &foo_verify_dlopen_flags_1; } - """) + """, extra_link_args=["-Wl,-flat_namespace", "-Wl,-undefined,suppress"]) p = lib2.getptr() assert ffi1.addressof(lib1, 'foo_verify_dlopen_flags_1') == p