C-DynaLib
view release on metacpan or search on metacpan
script/pl2exe.pl view on Meta::CPAN
0, # size of heap commit
0, # another obsolete field
16 # the number or RVA/size pairs to follow
);
$headers .= pack ('L32', # 16 (RVA,size) pairs locating certain
# important image structures; the ones
# we don't have are left zero
0,0,
0x1100, 195, # import directory
0,0,0,0,0,0,
0x10f8, 8, # relocation table (empty, but needed)
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
);
print OUT $headers;
# We need to describe our one section.
my $section_header = pack ('a8L8',
'.perl', # section name
464, # raw data size
0x1000, # section begin RVA
512, # rounded-up data size
script/pl2exe.pl view on Meta::CPAN
print OUT pack ("H*", "f3ab895c2404c74424284400000089e083c02889");
print OUT pack ("H*", "44242083c04489442424a140114000ffd021c075");
print OUT pack ("H*", "046a64eb258b4424446aff50a14c114000ffd021");
print OUT pack ("H*", "c074046a65eb0f8b4424446a665450a150114000");
print OUT pack ("H*", "ffd0a144114000ffd0");
print OUT "\015\012\015\012";
print OUT "-------here's the data, at file offset 760: -------";
print OUT "\015\012\015\012";
# Print out a dummy relocation table.
# The code is not relocatable--it must be loaded at 0x400000.
# But to allow programs to load it with LoadLibrary() and access
# its resources, the file must contain this table.
print OUT pack ('LL', 0x1000,8);
# The import table. Contains RVAs, names, and a dollop of nulls.
# (we import 5 functions from KERNEL32.DLL)
print OUT pack ('L5', 0x1128, 0,0, 0x1158, 0x1140);
print OUT pack ('L5', 0,0,0,0,0);
print OUT pack ('L6', 0x1166, 0x1178, 0x1186, 0x1198, 0x11ae, 0);
# Not sure if we really need to do this twice, but why argue:
( run in 0.621 second using v1.01-cache-2.11-cpan-71847e10f99 )