On Tue, 2016-11-15 at 10:57 +0530, Siddhesh Poyarekar wrote:
> On Monday 14 November 2016 02:18 PM, Florian Weimer wrote:
> > Is this really necessary?  It's not the way ld currently works.
> 
> It is necessary because the idea of unexpectedly finding debuginfo in
> their binaries when one did not ask for it is counter-intuitive.

I think this speaks more to a misunderstanding of the tools than
unintuitive behaviour. -g is a compile phase option, and it asks for
debugging info to be emitted for the object being compiled. It has no
effect on the link phase. In your initial email you wrote:

> What happens if a program built without -g is linked to the libc.a
> with debug symbols?

One does not build _programs_ with/out -g. One builds objects, and
links objects into programs.

If your static binary is being built in an rpm then you will still end
up with a stripped binary and separate debuginfo; it's just that now it
will include debuginfo for the static library you linked against as
well.

- ajax
_______________________________________________
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org

Reply via email to