Hi.
Does anyone have experience using RTL/Packages as dynamically linked library?
In my case, several FPC applications should be installed on the host and it seems logical to me that
they will share the same RTL/Packages libraries.
I use crosscompiller 3.0.4 version for ARM_LINUX platform.
I tried to combine all RTL/Packages *.ppu modules using "ppumove" into several *.so libraries.
After solving some problems, I managed to build a small test application with the key "XD".
The result: the tiny size of the executable module, the application works.
But there is a problem: after the application is shut down, "EAccessViolation" occurs.
A little debugging showed that most likely the error occurs when releasing resource strings:
Program received signal SIGSEGV, Segmentation fault.
0xb6f7955c in fpc_ansistr_decr_ref () from /usr/lib/libfpcrtl.so
(gdb)
(gdb) bt
#0 0xb6f7955c in fpc_ansistr_decr_ref () from /usr/lib/libfpcrtl.so
#1 0xb6f8695c in fpc_ansistr_assign () from /usr/lib/libfpcrtl.so
#2 0xb6f6fc8c in OBJPAS_$$_FINALIZERESOURCETABLES () from /usr/lib/libfpcrtl.so
#3 0xb6f6fcd4 in OBJPAS_$$_finalize$ () from /usr/lib/libfpcrtl.so
#4 0xb6f920fc in SYSTEM_$$_FINALIZEUNITS () from /usr/lib/libfpcrtl.so
#5 0xb6f9249c in SYSTEM_$$_INTERNALEXIT () from /usr/lib/libfpcrtl.so
#6 0xb6f92514 in SYSTEM_$$_DO_EXIT () from /usr/lib/libfpcrtl.so
#7 0x0000c5c0 in _haltproc_eabi ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
Are there any ideas about my plan? How is this even possible?