How's DynaLoader's c library loaded?
We know this module's function is D开发者_如何学运维ynamically load C libraries into Perl code
.
But how's its own c library loaded into Perl in the first place?
I judge it should have its own c library because I don't find the function dl_load_file
right inside DynaLoader.pm
,so it must be in some c library...
Dynaloader is statically linked to Perl (managed by Configure), so that it is always available. It wouldn't work very well if it had to be available itself to load itself.
The source for Dynloader is at /ext/Dynaloader/ in the Perl distribution, which contains a number of different implementations of dl_load_file for the various architectures on which Perl might run.
So yes, dl_load_file is in a library, but it ends up inside perl when perl gets built.
精彩评论