$ fpc rnloadLibrary_static.pas
Free Pascal Compiler version 3.0.0+dfsg-11+deb9u1 [2017/06/10] for x86_64
Copyright (c) 1993-2015 by Florian Klaempfl and others
Target OS: Linux for x86-64
Compiling rnloadLibrary_static.pas
Linking rnloadLibrary_static
/usr/bin/ld.bfd: warning: link.res contains output sections; did you forget -T?
rnloadLibrary_static.o: In function `main':
rnloadLibrary_static.pas:(.text.n_main+0x28): undefined reference to `hellofn'
./libpyfnhello.so: undefined reference to `PyUnicode_FromFormat'
./libpyfnhello.so: undefined reference to `PyExc_SystemError'
./libpyfnhello.so: undefined reference to `PyDict_SetItemString'
./libpyfnhello.so: undefined reference to `PyDict_Size'
./libpyfnhello.so: undefined reference to `PyObject_ClearWeakRefs'
./libpyfnhello.so: undefined reference to `PyFrame_New'
./libpyfnhello.so: undefined reference to `PyObject_GetAttrString'
./libpyfnhello.so: undefined reference to `PyImport_AddModule'
./libpyfnhello.so: undefined reference to `PyBytes_FromStringAndSize'
./libpyfnhello.so: undefined reference to `PyObject_SetAttrString'
./libpyfnhello.so: undefined reference to `PyErr_WarnEx'
./libpyfnhello.so: undefined reference to `PyObject_GC_Del'
./libpyfnhello.so: undefined reference to `PyCode_New'
./libpyfnhello.so: undefined reference to `PyImport_GetModuleDict'
./libpyfnhello.so: undefined reference to `PyObject_GC_Track'
./libpyfnhello.so: undefined reference to `PyErr_SetString'
./libpyfnhello.so: undefined reference to `PyMethod_New'
./libpyfnhello.so: undefined reference to `_PyObject_GC_New'
./libpyfnhello.so: undefined reference to `PyExc_TypeError'
./libpyfnhello.so: undefined reference to `PyTuple_GetItem'
./libpyfnhello.so: undefined reference to `PyMem_Realloc'
./libpyfnhello.so: undefined reference to `PyErr_ExceptionMatches'
./libpyfnhello.so: undefined reference to `PyOS_snprintf'
./libpyfnhello.so: undefined reference to `PyTraceBack_Here'
./libpyfnhello.so: undefined reference to `PyObject_Free'
./libpyfnhello.so: undefined reference to `PyInstanceMethod_New'
./libpyfnhello.so: undefined reference to `PyType_Ready'
./libpyfnhello.so: undefined reference to `PyErr_Clear'
./libpyfnhello.so: undefined reference to `PyTuple_New'
./libpyfnhello.so: undefined reference to `PyThreadState_Get'
./libpyfnhello.so: undefined reference to `PyErr_Occurred'
./libpyfnhello.so: undefined reference to `PyModule_Create2'
./libpyfnhello.so: undefined reference to `PyTuple_GetSlice'
./libpyfnhello.so: undefined reference to `PyDict_GetItemString'
./libpyfnhello.so: undefined reference to `_Py_NoneStruct'
./libpyfnhello.so: undefined reference to `PyDict_New'
./libpyfnhello.so: undefined reference to `PyUnicode_FromString'
./libpyfnhello.so: undefined reference to `PyUnicode_InternFromString'
./libpyfnhello.so: undefined reference to `PyExc_ImportError'
./libpyfnhello.so: undefined reference to `PyDict_SetItem'
./libpyfnhello.so: undefined reference to `PyExc_AttributeError'
./libpyfnhello.so: undefined reference to `PyUnicode_Decode'
./libpyfnhello.so: undefined reference to `PyErr_Format'
./libpyfnhello.so: undefined reference to `PyUnicode_FromStringAndSize'
./libpyfnhello.so: undefined reference to `PyModule_GetDict'
./libpyfnhello.so: undefined reference to `PyMem_Malloc'
./libpyfnhello.so: undefined reference to `Py_GetVersion'
./libpyfnhello.so: undefined reference to `PyObject_GC_UnTrack'
rnloadLibrary_static.pas(11,1) Error: Error while linking
rnloadLibrary_static.pas(11,1) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
Error: /usr/bin/ppcx64 returned an error exitcode