> -----Original Message-----
> From: TOCK [mailto:[email protected]]
> Sent: Thursday, April 03, 2014 12:59 PM
> To: [email protected]
> Subject: Re: [Mingw-w64-public] Determining whether mingw dll is a debug
> build based on PE structure?
> 
> I think you can use objdump to determine it.
> For example on my PC:
> 
> C:\Users\TOCK>objdump -f foo.dll
> 
> foo.dll:     file format pei-x86-64
> architecture: i386:x86-64, flags 0x0000013b:
> HAS_RELOC, EXEC_P, HAS_DEBUG, HAS_SYMS, HAS_LOCALS, D_PAGED start
> address 0x000000006ae81400
> 

Objdump was a great hint, thanks! I checked the source code of the pfd library 
it uses, and it seems it just checks for the IMAGE_FILE_DEBUG_STRIPPED flag in 
the PE header:

  if ((internal_f->f_flags & IMAGE_FILE_DEBUG_STRIPPED) == 0)
    abfd->flags |= HAS_DEBUG;


I've yet to experiment a bit with it , but right now it looks like I could use 
that check, too ...

Regards

Kai
------------------------------------------------------------------------------
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to