JDK-8198287 : Cleanup ElfFile usage in whitebox.cpp
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 11
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2018-02-16
  • Updated: 2019-06-20
  • Resolved: 2018-02-21
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11
11 b03Fixed
Related Reports
Relates :  
Description
Prior to JDK-8193373 whitebox.cpp had some elfFile usage that was only enabled on Linux:

#ifdef LINUX
#include "utilities/elfFile.hpp"

// Checks that the library libfile has the noexecstack bit set.
WB_ENTRY(jboolean, WB_CheckLibSpecifiesNoexecstack(JNIEnv* env, jobject o, jstring libfile))
  jboolean ret = false;
#ifdef LINUX
...
ret = (jboolean) ElfFile::specifies_noexecstack(lf);
...
#endif
  return ret;
WB_END

But then JDK-8193373 added an unconditional

#include "utilities/elfFile.hpp"

which means there are two include statements for Linux.