develooper Front page | perl.perl5.porters | Postings from October 2015

Darwin perl runs without libc? "@dl_resolve_using =dl_findfile('-lc');"

bulk 88
October 27, 2015 21:23
Darwin perl runs without libc? "@dl_resolve_using =dl_findfile('-lc');"
Message ID:

    # This is a fix to support DLD's unfortunate desire to relink -lc
    @dl_resolve_using = dl_findfile('-lc') if $dlsrc eq "dl_dld.xs";

    if ($Config{'dlsrc'} =~ /^dl_dld/){
        package DynaLoader;
        push(@dl_resolve_using, dl_findfile('-lc'));

 "perl 5.000" day 1 of dynaloader and day 1 of predecessor of

This code is from 1994. I have a plan to remove 
the dependency that building Win32 XS DLLs, atleast in core (
 run to build XS code), requires that be built and 
loadable by miniperl, before a dynamic XS module can be "make" built 
(this will save atleast 5 seconds wall time on the parallel build). My 
plan is that in, if BSLOADLIBS is empty (which is always 
is on Win32, unless you take extreme (unrealistic) measures in your 
Makefile.PL), and there is no Foo_BS file to execute, don't load and return early from ExtUtils::Mkbootstrap::Mkbootstrap.

 "@dl_resolve_using = dl_findfile('-lc') if $dlsrc eq "dl_dld.xs";" line
 in (which should be compiled out in DynaLoader_pm.PL in 
the first place) needs to go to accomplish that. Does anyone know why 
that line can't be removed from 1994 , and why perl is executing without
 libc in the process? How were ops allocated and how did yy_parse run 
and how was read off a disk without stdio?

 will note XSLoader has no such line, and it never loads 
and somehow things magically work (IDK how) (unless every OSX/Darwin XS 
.so has a .bs that loads libc next to it, and XSLoader always goto-es to
 full which sounds unrealistic and somebody wouldve fixed 
that years ago). That is why I think the line is redundant.
 		 	 Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About