Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Link j9jit library without execstack flag on Linux #21135

Merged
merged 1 commit into from
Feb 18, 2025

Conversation

fridrich
Copy link
Contributor

Fixes #20956

@jdmpapin
Copy link
Contributor

Jenkins test sanity.functional xlinux,plinux,zlinux,alinux64 jdk17

@pshipton
Copy link
Member

@keithc-ca do you think we need to include the same for other modules, such a the VM?

@@ -395,7 +395,7 @@ set_source_files_properties(

if(OMR_OS_LINUX)
set_property(TARGET j9jit APPEND_STRING PROPERTY
LINK_FLAGS " -Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/build/scripts/j9jit.linux.exp")
LINK_FLAGS " -Wl,-z,noexecstack -Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/build/scripts/j9jit.linux.exp")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If a single assembler were used on each platform, this should not be necessary (see #20956 (comment)).

This seems a reasonable, perhaps short-term, solution.

@keithc-ca
Copy link
Contributor

@keithc-ca do you think we need to include the same for other modules, such a the VM?

I think only the JIT uses more than one assembler and so only that shared library needs this change.

@keithc-ca
Copy link
Contributor

Using readelf -e, verified that no shared library in the jdk17 build for x86-64_linux has the executable stack flag.

@jdmpapin jdmpapin merged commit 9a686c4 into eclipse-openj9:master Feb 18, 2025
11 checks passed
@jdmpapin
Copy link
Contributor

Thanks, Fridrich! 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Is the execstack flag required on any of the shared libraries?
4 participants