Re: Should we stop stripping static libraries?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/14/2016 06:10 AM, Siddhesh Poyarekar wrote:
On Friday 11 November 2016 12:46 AM, Florian Weimer wrote:
We currently call /usr/lib/rpm/brp-strip-static-archive from
%__os_install_post.  This removes debugging symbols from static (.a)
libraries.

Is this really a good idea?  Due to this, glibc copies libc.a to
glibc-debuginfo, so that you can get a link with debugging symbols by
specifying “-static -L/usr/lib/debug/usr/lib64“ (potentially with
unintended side effects).  I would like to get this to work by default.

If developers does not want debugging symbols and static libraries have
them, they can link with -s, or strip the linked object.

What happens if a program built without -g is linked to the libc.a with
debug symbols?  If it does the right thing by not including debug
symbols then I think your suggestion is the right way forward.

By default, ld seems to include all available debugging information.

Do you suggest that gcc should invoke ld with -S, unless gcc was invoked with some -g flags or -s?

Otherwise we need to fix the linker to not include debug symbols first.

Is this really necessary?  It's not the way ld currently works.

I think specifying -s if you want a binary without debugging information is an acceptable workaround.

Florian
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux