summaryrefslogtreecommitdiff
path: root/embed.pl
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-01-24 14:14:20 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-01-24 14:14:20 +0000
commit682fc664ee45afb274c9c458c0386b897c881a4b (patch)
treede5721160552718d64eee2c78f31c0a0fc04c95e /embed.pl
parent6f4183fe04888927cb36b966262c959c5166404b (diff)
downloadperl-682fc664ee45afb274c9c458c0386b897c881a4b.tar.gz
force linkage of the function wrappers for globals in change#4878
p4raw-link: @4878 on //depot/perl: 6f4183fe04888927cb36b966262c959c5166404b p4raw-id: //depot/perl@4879
Diffstat (limited to 'embed.pl')
-rwxr-xr-xembed.pl41
1 files changed, 39 insertions, 2 deletions
diff --git a/embed.pl b/embed.pl
index c1ea2e6e2f..5305dad014 100755
--- a/embed.pl
+++ b/embed.pl
@@ -800,9 +800,46 @@ START_EXTERN_C
END_EXTERN_C
-#if !defined(PERL_CORE)
+#if defined(PERL_CORE)
-/* accessor functions for Perl variables (provides binary compatibility) */
+/* accessor functions for Perl variables (provide binary compatibility) */
+
+/* these need to be mentioned here, or most linkers won't put them in
+ the perl executable */
+
+#ifndef PERL_NO_FORCE_LINK
+
+START_EXTERN_C
+
+#ifndef DOINIT
+EXT void *PL_force_link_funcs[];
+#else
+EXT void *PL_force_link_funcs[] = {
+#undef PERLVAR
+#undef PERLVARA
+#undef PERLVARI
+#undef PERLVARIC
+#define PERLVAR(v,t) Perl_##v##_ptr,
+#define PERLVARA(v,n,t) PERLVAR(v,t)
+#define PERLVARI(v,t,i) PERLVAR(v,t)
+#define PERLVARIC(v,t,i) PERLVAR(v,t)
+
+#include "thrdvar.h"
+#include "intrpvar.h"
+#include "perlvars.h"
+
+#undef PERLVAR
+#undef PERLVARA
+#undef PERLVARI
+#undef PERLVARIC
+};
+#endif /* DOINIT */
+
+START_EXTERN_C
+
+#endif /* PERL_NO_FORCE_LINK */
+
+#else /* !PERL_CORE */
EOT