Export OFFSET vars for `final` methods. Without the export, symbol resolution fails during dynamic linking.
Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/5bcadfd0 Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/5bcadfd0 Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/5bcadfd0 Branch: refs/heads/master Commit: 5bcadfd0094adc7521dd3ab4dcc6c69017902870 Parents: 8889581 Author: Marvin Humphrey <[email protected]> Authored: Fri May 8 19:05:31 2015 -0700 Committer: Marvin Humphrey <[email protected]> Committed: Mon May 11 17:22:33 2015 -0700 ---------------------------------------------------------------------- compiler/src/CFCBindMethod.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/5bcadfd0/compiler/src/CFCBindMethod.c ---------------------------------------------------------------------- diff --git a/compiler/src/CFCBindMethod.c b/compiler/src/CFCBindMethod.c index cede011..3f7bccd 100644 --- a/compiler/src/CFCBindMethod.c +++ b/compiler/src/CFCBindMethod.c @@ -48,6 +48,7 @@ CFCBindMeth_method_def(CFCMethod *method, CFCClass *klass) { * this method may not be overridden. */ static char* S_final_method_def(CFCMethod *method, CFCClass *klass) { + const char *PREFIX = CFCClass_get_PREFIX(klass); const char *self_type = CFCType_to_c(CFCMethod_self_type(method)); const char *arg_names = CFCParamList_name_list(CFCMethod_get_param_list(method)); @@ -57,12 +58,12 @@ S_final_method_def(CFCMethod *method, CFCClass *klass) { char *full_offset_sym = CFCMethod_full_offset_sym(method, klass); const char pattern[] = - "extern size_t %s;\n" + "extern %sVISIBLE size_t %s;\n" "#define %s(%s) \\\n" " %s((%s)%s)\n"; char *method_def - = CFCUtil_sprintf(pattern, full_offset_sym, full_meth_sym, arg_names, - full_func_sym, self_type, arg_names); + = CFCUtil_sprintf(pattern, PREFIX, full_offset_sym, full_meth_sym, + arg_names, full_func_sym, self_type, arg_names); FREEMEM(full_offset_sym); FREEMEM(full_meth_sym);
