In the following, Delphi XE 10.4.2 with the latest patches (as of 9th June 2021) and RHEL 8 with all updates have been used.
Delphi 10.4.2 doesn't seem to be able to link against .o files so I create a shared lib with the following from the .o files
cc -o libd3.so -m64 /usr/lib/pick/gid.o /usr/lib/pick/gmpcb.o /usr/lib/pick/ld.import.lx64.o /usr/lib/pick/flashvers.o /usr/lib/pick/px.mqs.sv.o /usr/lib/pick/SQLfunc.o /usr/lib/pick/odbcfunc.o \
/usr/lib/pick/show_net_dummy.o \
-lcgm -lm -lc -lcurl -L/usr/lib/pick -L./ -Wl,--start-group -lcgm -lgm -lgmu -lCP -lCPm -lsqla -lsqln -Wl,--end-group -lTllsApi -lxdmscapi -ld3pyembed -lpam /usr/lib/pick/dummyssl.o -lpthread -ldl
This completes without error creating libd3.so
I then use the delphi "Edit SDK" page to "Update File Cache" on my local machine, and use Shift-F9 to rebuild all.
I get this error
[DCC Error] E2597 C:\Program Files (x86)\Embarcadero\Studio\21.0\bin\ld-linux.exe: error: C:\\Users\\andrew\\Documents\\Embarcadero\\Studio\\SDKs\\rhel8.4.sdk\\usr\\lib64/libd3.so: unsupported ELF file type 2
and a number of these
C:\\Users\\andrew\\Documents\\Embarcadero\\Studio\\SDKs\\rhel8.4.sdk/usr/lib64/libc_nonshared.a(atexit.oS)(.gnu.build.attributes+0x18): warning: relocation refers to discarded section
Ignore the fact that some files are coming from /usr/lib/pick instead of usr/lib64/pick, this is an anomaly of installing the files and they are indeed 64bit files.
I have tried a number of linker options but cant seem to get them to work. If I dont load the .so file, and comment out the method being called, then the program compile and runs (doesnt work as it is no longer calling the required routine).