This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: How do you strip a dll ?

dll's with a .reloc section can't be stripped, 
if they are built using the default B19 linker.

removing the .stab and .stabstr sections creates a hole in the image
that the run time linker can't deal with.

strip the .o files first, then build the .dll
or link the .dll with -s (easier :)

There are no symbols in import libraries that
can/need to be stripped except libcygwin.a AFAIK

to reduce the size of libcygwin.a while still leaving it
usable as an import library use the command

strip --strip-debug libcygwin.a

do this just before your siesta, as it will take a while. 1.12M to .65M

On Fri, 27 Mar 1998 01:34:45 GMT, you wrote:

>>   Steve Biskis (
>>   Mon, 23 Mar 1998 16:34:39 -0800
>>> Quick couple o' questions for you gnu-win32 dll experts:
>>> I never have any problems running stripped .exe's.
>>> However, when I strip my .dll and then run an app that
>>> accesses it, I get a pop-up that says:
>>> "The application or DLL  is not a valid Windows NT image.
>>> Please check this against your installation diskette."
>>> Are there some special flags that need to be provided to strip dlls ?
>Stripping a cgywin .a library makes it invalid.  You have to link the 
>library into an executable and then strip the executable.  I am guessing
>the same thing happens when you strip a .dll file.
>In other words, don't strip dll's, especially in public in broad daylight.
>For help on using this list (especially unsubscribing), send a message to
>"" with one line of text: "help".

Linux a platform built by, and for users, standing on
the firm legs of reliability, and speed.

Microsoft Windows, a platform without a leg to stand on.

delete REMOVETHIS from the above to reply
For help on using this list (especially unsubscribing), send a message to
"" with one line of text: "help".

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]