Subject: Re: Debugging information for DLL's
From: DJ Delorie <[email-masked]>

08 Jan 1999 17:08:23 -0500
Message-ID: <[email-masked]>
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 4.5 [en] (X11; I; Linux 2.1.126 i586)
X-Accept-Language: en

[email-masked] wrote:
> 
> Here is a somewhat silly question.

Not at all.

> If I build a set of DLL's and
> associated ".a" files with debugging information turned on, where does that
> information end up?

Both.  The debugging information for the code in the .a is in the .a,
and the debugging information for the code in the .dll is in the .dll.

> If it is in the
> DLL, can I run strip on a DLL to trim the size of the DLL?

Yes.  "strip cygwin1.dll" works just fine, for example, and we do it
for snapshots every day.  There is almost no difference in the
format of EXEs and DLLs, so anything that works for an EXE (like
strip) will work for a DLL as well.

You can do a partial strip on the .a to remove the symbolic debug
information while leaving in the symbols needed for linking
by using "strip -g foo.a".

> Or does it all
> end up in the executable that is linked to the DLL which can then be
> stripped?

The executable may also be stripped, as it also has debugging information
in it.