From 67bc6700138d98341bc891737dd2f4f32fab195c Mon Sep 17 00:00:00 2001 From: Rushin Date: Thu, 29 May 2025 14:19:26 +0800 Subject: [PATCH 1/3] Fix: Disable executable stack in shared library build --- .github/workflows/build-and-release.yml | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-and-release.yml b/.github/workflows/build-and-release.yml index e83fb4f..2a8a06a 100644 --- a/.github/workflows/build-and-release.yml +++ b/.github/workflows/build-and-release.yml @@ -20,7 +20,7 @@ jobs: # Linux - x86_64 - os: ubuntu-latest arch: x86_64 - cmake_args: '-DCMAKE_BUILD_TYPE=Release -DARCH=native -DBUILD_SHARED_LIBS=ON -DCMAKE_C_FLAGS="-fPIC"' + cmake_args: '-DCMAKE_BUILD_TYPE=Release -DARCH=native -DBUILD_SHARED_LIBS=ON -DCMAKE_C_FLAGS="-fPIC" -DCMAKE_SHARED_LINKER_FLAGS="-z noexecstack"' artifact_name: 'librandomx_linux_x86_64.so' output_lib: 'librandomx_linux_x86_64.so' # macOS - x86_64 diff --git a/README.md b/README.md index 3136220..29eea4d 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,7 @@ Compile and copy the appropriate shared library for your platform: ```bash cd randomx mkdir build && cd build -cmake .. -DCMAKE_BUILD_TYPE=Release -DARCH=native -DBUILD_SHARED_LIBS=ON -DCMAKE_C_FLAGS="-fPIC" +cmake .. -DCMAKE_BUILD_TYPE=Release -DARCH=native -DBUILD_SHARED_LIBS=ON -DCMAKE_C_FLAGS="-fPIC" -DCMAKE_SHARED_LINKER_FLAGS="-z noexecstack" make -j4 cp -i librandomx.so ../../src/main/resources/native/librandomx_linux_x86_64.so ``` From 3133a6742762b37f0363af2fce328f675da7425d Mon Sep 17 00:00:00 2001 From: Rushin Date: Thu, 29 May 2025 14:36:54 +0800 Subject: [PATCH 2/3] Fix: Disable executable stack in shared library build --- .../native/librandomx_linux_x86_64.so | Bin 348344 -> 348344 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/src/main/resources/native/librandomx_linux_x86_64.so b/src/main/resources/native/librandomx_linux_x86_64.so index b183a68117426e1af280f22bbc759db8e6e52102..808d433fbc089d03d440a2d2377b5c3c69b395ee 100644 GIT binary patch delta 70 zcmdn7P;|#a(G6!98QG?9oX4m=SwNa)@*hSYkrgh>SmqS4Z;9*wcPesP;;qZ`(>a=B WnA&5Q7=ai>GXpWp_82DC7(W2oVHt%0 delta 70 zcmdn7P;|#a(G6!98QG_AoX4m=SwNa)@*hSY5i3qlvrSJ=7-!n={K5T>S(US2%%eGm WsXc~?5r{!FGZ3?Ek6~hs@dE&kco!`I From 8cf1a784e7a2566f85dbd9d145f3f2b58458fc73 Mon Sep 17 00:00:00 2001 From: LucasMLK <6683500+LucasMLK@users.noreply.github.com> Date: Thu, 29 May 2025 14:53:25 +0800 Subject: [PATCH 3/3] update to 0.2.5 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 87f4ab3..64952c1 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ io.xdag xdagj-native-randomx - 0.2.4 + 0.2.5 xdagj-native-randomx A Java RandomX Library For XDAGJ