----- Original Message ----- 
From: "Mark Dootson" <mark.doot...@znix.com>
To: "Sisyphus" <sisyph...@optusnet.com.au>
Cc: "perl-win32-users" <perl-win32-users@listserv.ActiveState.com>
Sent: Wednesday, April 21, 2010 12:12 PM
Subject: Re: Using mingw64 with x64 ActiveState builds.


> Hi,
>
> I don't know why missing the '-s' flag from the linker causes failures.
> I do know that when the '-s' flag is specified, there's no symbol table
> in the dll PE image and no need for associated relocation addresses.
>
> The gcc debugging symbols are for most practical purposes useless with
> ActivePerl I would think. So having '-s' as a standard option isn't a
> bad thing in itself. It would be nice to understand exactly what is
> happening though and therefore rule out the possibility of any other
> problems.
>
> For info, I have tried the 32bit version of mingw-w64 and the debugging
> symbols cause no difficulty there. I've checked the PE/COFF headers for
> both 32bit and 64bit DLL's - and the 32 bit version definitely includes
> debugging symbols if you don't specify -s - and still works. The 64bit
> DLL must be a valid PE+ (64bit) image, or it would not load at all I
> would not think.
>
> Anyhow, I combined the flags in your Config.pm file together with
> details from the Config_heavy.pl produced when Perl itself is compiled
> with mingw gcc and put it in my Config_w64.pm. I've attached that again
> for the list's sake as the original was missing a couple of probably
> important options (already in yours and the AS versions).
>
> Interestingly, the Config_heavy.pl produced when Perl itself is compiled
> with mingw gcc includes the '-s' flag in the ldflags, and also in
> optimize - 'optimize' = '-s -O2'. (I'm assuming it has the same meaning
> here).
>
> For info, the problem may be a symbol name mangling issue. I noticed in
> the 64 bit PE that some symbol names had been mangled ( e.g _function
> becomes _funct...@12 ) but far fewer than in the 32bit PE. My brief
> Googling suggests that the 64 bit symbols should not be mangled /
> decorated in this way at all - but I don't really know.

Thanks very much for all of that. I, too, an quite puzzled as to why the 
'-s' should be making such a difference and I'll try to do some 
investigating of my own when I get a chance. (Please share any future 
enlightenments that you might have regarding this with me :-)

For mine - I'll now go back to my original approach (yes, even the 
PERL_ARCHIVE hack that produces linking to the perl dll). Of course, I'll 
also be including '-s' flag as already discussed - and I've added '-s' to 
optimize, too - just in case.

I'll see how that goes over time, and revert to linking to libperl512.a if 
the need arises.

Cheers,
Rob 

_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to