How does the DynaLoader c library load?

We know that this module function is Dynamically load C libraries into Perl code .

But how is its own c library loaded in Perl in the first place?

I believe that it should have its own c library, because I did not find the dl_load_file function directly inside DynaLoader.pm , so it should be in some c library ...

+4
source share
1 answer

Dynaloader is statically linked to Perl (managed by Configure), so it is always available. This will not work very well if it should be available for the download itself.

The source for Dynloader is located in / ext / Dynaloader / in the Perl distribution , which contains many different implementations of the dl_load_ file for the various architectures that Perl can run on.

So dl_load_file is in the library, but it gets inside perl when perl is created.

+7
source

All Articles