Board index » kylix » Attention Kylix-Users - Kylix-built applications crash on Kernel 2.6.8.1
Simon Kissel
![]() kylix Developer |
Attention Kylix-Users - Kylix-built applications crash on Kernel 2.6.8.12004-09-23 07:31:40 PM kylix2 As reported in this newsgroup, applications built with Kylix crash when executed on Linux installations running Kernel 2.6.8.1. This is currently the case with Red Hat Fedora Core 2, but probably soon other Linux distributions also will be affected. Kernel 2.6.8 introduced an improved exec-shield, which prevents execution of code in memory pages not marked for execution. This works on all x86 machines, not only the new AMD64 CPUs that have the NX bit. Sadly the Kylix compiler doesn't mark a section of the ELF file as executable, which has code that is executed at runtime. This will cause a segmentation fault. As a first step, I've now written a tool which will fix Kylix applications to have the missing execution flag in the ELF section headers. This tool should work for all Kylix build applications and shared objects. It's a command line tool available for both Windows and Linux (so you can also do the patching on a Windows machine), Source is included. See this page for more detailed information: crosskylix.untergrund.net/patchelf.html Next step will be to try to create an RTL patch that marks the loaded section as executable in memory. This way you won't have manually fix your ELF files after each build anymore. Simon Kissel |