From c5eb5bfc2e2cb659db1ce3c12f77ad8f8834d3d8 Mon Sep 17 00:00:00 2001 From: jBarz Date: Fri, 8 Sep 2017 05:19:29 -0400 Subject: [PATCH] build: enable runtime linking Enable runtime linking of shared objects. This will allow loading of symbols using the RTLD_GLOBAL flag. PR-URL: https://github.com/nodejs/node/pull/15286 Fixes: https://github.com/nodejs/node/issues/15243 Reviewed-By: Gibson Fahnestock Reviewed-By: Gireesh Punathil Reviewed-By: Michael Dawson Reviewed-By: James M Snell --- node.gyp | 2 +- test/addons/dlopen-ping-pong/binding.gyp | 5 ++--- test/addons/dlopen-ping-pong/test.js | 3 --- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/node.gyp b/node.gyp index 39106ce346becf..911e3218aa50ac 100644 --- a/node.gyp +++ b/node.gyp @@ -784,7 +784,7 @@ 'common.gypi', ], - 'ldflags': ['-Wl,-bE:<(PRODUCT_DIR)/node.exp'], + 'ldflags': ['-Wl,-bE:<(PRODUCT_DIR)/node.exp', '-Wl,-brtl'], }, { 'target_name': 'node_exp', diff --git a/test/addons/dlopen-ping-pong/binding.gyp b/test/addons/dlopen-ping-pong/binding.gyp index 8016ae1db7e9ca..48af696b326507 100644 --- a/test/addons/dlopen-ping-pong/binding.gyp +++ b/test/addons/dlopen-ping-pong/binding.gyp @@ -10,10 +10,9 @@ 'xcode_settings': { 'OTHER_LDFLAGS': [ '-Wl,-undefined', '-Wl,dynamic_lookup' ] }}], - # Pass erok flag to the linker, to prevent unresolved symbols - # from failing. Still, the test won't pass, so we'll skip it on AIX. + # Enable the shared object to be linked by runtime linker ['OS=="aix"', { - 'ldflags': [ '-Wl,-berok' ] + 'ldflags': [ '-Wl,-G' ] }]], }, { diff --git a/test/addons/dlopen-ping-pong/test.js b/test/addons/dlopen-ping-pong/test.js index 40aeb441fae61b..9f07715cf15680 100644 --- a/test/addons/dlopen-ping-pong/test.js +++ b/test/addons/dlopen-ping-pong/test.js @@ -4,9 +4,6 @@ const common = require('../../common'); if (common.isWindows) common.skip('dlopen global symbol loading is not supported on this os.'); -if (common.isAIX) - common.skip('this test does not pass on AIX.'); - const assert = require('assert'); const path = require('path'); const os = require('os');