[fpc-pascal] Executable stack in shared library

Jonas Maebe jonas.maebe at elis.ugent.be
Fri May 21 19:53:04 CEST 2010


On 21 May 2010, at 18:50, Matthias Klumpp wrote:

> I package a Freepascal project for Debian which uses a shared library. If I
> run the quality analysis on those packages, I get a warning, that the
> shared library has an executable stack.

Which version of FPC are you using? We have been adding the "do not create an executable stack" section to ELF files since FPC 2.2.4 already. 

> Why does it have one, if it is
> not necessary?

The default of the GNU binutils is "create an executable stack". The object files have to contain a special section for it to be disabled.

> How can I disable this in FPC?

Update your FPC version. There's also a linker parameter that you can use, but that's not the recommended approach.


Jonas


More information about the fpc-pascal mailing list