summaryrefslogtreecommitdiff
path: root/Porting
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2022-08-05 10:25:44 +0200
committerYves Orton <demerphq@gmail.com>2023-02-11 07:17:42 +0100
commit889794d34c832b4fb85e18b8e0a4048d6353b45e (patch)
tree5a430455e30194d755e72e46e6ea4cc07da73cf3 /Porting
parent902ed9e49caf02c58e1eaf615e7907f5b43bb5fc (diff)
downloadperl-889794d34c832b4fb85e18b8e0a4048d6353b45e.tar.gz
bisect-runner.pl must patch dl_dyld.xs to eliminate the PREINIT section
*Really* early xsubpp doesn't understand this, and it turns out to be trivial to eliminate it.
Diffstat (limited to 'Porting')
-rwxr-xr-xPorting/bisect-runner.pl20
1 files changed, 18 insertions, 2 deletions
diff --git a/Porting/bisect-runner.pl b/Porting/bisect-runner.pl
index 6cf6c321a4..4357b77740 100755
--- a/Porting/bisect-runner.pl
+++ b/Porting/bisect-runner.pl
@@ -4451,15 +4451,31 @@ diff -u a/ext/DynaLoader/dl_dyld.xs~ a/ext/DynaLoader/dl_dyld.xs
#define DL_LOADONCEONLY
#include "dlutils.c" /* SaveError() etc */
-@@ -185,7 +191,7 @@
+@@ -104,7 +145,7 @@
+ dl_last_error = savepv(error);
+ }
+
+-static char *dlopen(char *path, int mode /* mode is ignored */)
++static char *dlopen(char *path)
+ {
+ int dyld_result;
+ NSObjectFileImage ofile;
+@@ -161,13 +202,11 @@
+ dl_load_file(filename, flags=0)
+ char * filename
+ int flags
+- PREINIT:
+- int mode = 1;
CODE:
DLDEBUG(1,PerlIO_printf(Perl_debug_log, "dl_load_file(%s,%x):\n", filename,flags));
if (flags & 0x01)
- Perl_warn(aTHX_ "Can't make loaded symbols global on this platform while loading %s",filename);
+- RETVAL = dlopen(filename, mode) ;
+ Perl_warn_nocontext("Can't make loaded symbols global on this platform while loading %s",filename);
- RETVAL = dlopen(filename, mode) ;
++ RETVAL = dlopen(filename);
DLDEBUG(2,PerlIO_printf(Perl_debug_log, " libref=%x\n", RETVAL));
ST(0) = sv_newmortal() ;
+ if (RETVAL == NULL)
EOPATCH
if ($major < 4 && !extract_from_file('util.c', qr/^form/m)) {
apply_patch(<<'EOPATCH');