this worked for me too
However if you're using dladdr from linux and want to get any results you have to make sure the symbols end up in the dynamic symbols table. You can force it to export all symbols with the -E Linker flag...
So run: swift build -Xlinker -E -c debug