Skip to content
This repository was archived by the owner on Jul 25, 2022. It is now read-only.
This repository was archived by the owner on Jul 25, 2022. It is now read-only.

Disallow unresolved symbols in the JIT DLL #94

@mgaudet

Description

@mgaudet
diff --git a/rbjitglue/ruby/build/toolcfg/gnu/common.mk b/rbjitglue/ruby/build/toolcfg/gnu/common.mk
index 067bb0b..ae803a3 100644
--- a/rbjitglue/ruby/build/toolcfg/gnu/common.mk
+++ b/rbjitglue/ruby/build/toolcfg/gnu/common.mk
@@ -314,8 +314,8 @@ AR_OPTS?=rcv
 # This will look a lot crazier on J9
 #
 SOLINK_CMD?=$(CXX_PATH)
-SOLINK_FLAGS+=-shared
-SOLINK_SLINK+=dl pthread
+SOLINK_FLAGS+=-shared -Wl,-z,defs
+SOLINK_SLINK+=dl pthread 
 SOLINK_FLAGS_PROD=
 
 ifeq ($(BUILD_CONFIG),debug)

To allow the above patch, will need to fix following missing symbols:

rbjitglue/objs/ruby_debug/rbjitglue/ruby/ilgen/RubyIlGenerator.o: In function `RubyIlGenerator::hash_to_map(TR::StackMemoryRegion&, unsigned long)':
/home/magaudet/open/ruby_bop_notify/rbjitglue/ruby/ilgen/RubyIlGenerator.cpp:2040: undefined reference to `rb_hash_foreach'
rbjitglue/objs/ruby_debug/rbjitglue/ruby/ilgen/RubyIlGenerator.o: In function `RubyIlGenerator::genOptCaseDispatch(unsigned long, long)':
/home/magaudet/open/ruby_bop_notify/rbjitglue/ruby/ilgen/RubyIlGenerator.cpp:2076: undefined reference to `rb_fix2int'
rbjitglue/objs/ruby_debug/rbjitglue/ruby/control/RubyJit.o: In function `jit_compile':
/home/magaudet/open/ruby_bop_notify/rbjitglue/ruby/control/RubyJit.cpp:395: undefined reference to `ruby_xmalloc'
rbjitglue/objs/ruby_debug/rbjitglue/ruby/control/RubyJit.o: In function `RubyMethodBlock::RubyMethodBlock(rb_iseq_struct*, char const*)':
/home/magaudet/open/ruby_bop_notify/rbjitglue/ruby/env/RubyMethod.hpp:39: undefined reference to `rb_iseq_original_iseq'
collect2: error: ld returned 1 exit status

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions