1

I'm using JNA to load a lib.so file. All is running fine but the log is telling me the follow advise:

OpenJDK 64-Bit Server VM warning: You have loaded library /tmp/jna4835572371707024371.tmp which might have disabled stack guard. The VM will try to fix the stack guard now. It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'

The lib was compiled by myself using gfortran and all it functions are working well.

Is there something I must do? What is execstack ?

I'm using Java and Spring Boot to use the lib file.

Magno C
  • 1,922
  • 4
  • 28
  • 53
  • @DanielWiddis Yes. But I realy want know why. I have a religion to avoid to do things just because someone tells me that will work without know what are wrong. The answer you pointed just tell me "simply do this and all will be fine". – Magno C Jul 03 '20 at 03:53
  • Your question didn't ask why. Your question asked "Is there something I must do?" You also asked, "What is execstack?" which a [man page](https://linux.die.net/man/8/execstack) easily answers, amplified by comments about 32-bit vs. 64-bit ELF headers on the linked duplicate. – Daniel Widdis Jul 03 '20 at 12:35
  • I must agree. Thanks for reply and explanation. – Magno C Jul 04 '20 at 18:14
  • 1
    This is because of a flag in .so file that JNA has loaded, or rather with what flags .so file was compiled with. This .so file resides inside JNA's jar, so there isn't much that you can do with this. But if you want to get rid of the message, you can try and use latest build of JNA from here: https://mvnrepository.com/artifact/net.java.dev.jna/jna-platform. All the packages hierarchy is still the same even though Groupid and ArtificatId has been changed. – Binayak Feb 22 '21 at 02:49

0 Answers0