On 6/1/23 23:00, Paul Grosu wrote:
Hi Orion,

There are two ways to remove the debugging symbols:

1) strip --strip-debug your_library.so

2) objcopy --strip-debug your_library.so

Below is an example of both approaches:

1) Method using strip:

paul$ objdump --syms libfoo.so | grep debug
0000000000000000 l    d  .debug_aranges 0000000000000000  .debug_aranges 0000000000000000 l    d  .debug_info    0000000000000000  .debug_info 0000000000000000 l    d  .debug_abbrev  0000000000000000  .debug_abbrev 0000000000000000 l    d  .debug_line    0000000000000000  .debug_line 0000000000000000 l    d  .debug_str     0000000000000000  .debug_str
paul$ strip --strip-debug libfoo.so
paul$ objdump --syms libfoo.so | grep debug
paul$

2) Method using objdump:

paul$ objdump --syms libfoo.so | grep debug
0000000000000000 l    d  .debug_aranges 0000000000000000  .debug_aranges 0000000000000000 l    d  .debug_info    0000000000000000  .debug_info 0000000000000000 l    d  .debug_abbrev  0000000000000000  .debug_abbrev 0000000000000000 l    d  .debug_line    0000000000000000  .debug_line 0000000000000000 l    d  .debug_str     0000000000000000  .debug_str
paul$ objcopy --strip-debug libfoo.so
paul$ objdump --syms libfoo.so | grep debug
paul$

Are there other symbols you are looking to strip?

Hope it helps,
Paul

So I'm afraid my subject isn't the best - I'm really wondering why the library isn't being stripped automatically and debug info collected by RPM as I would expect.

But your answer pointed me towards using objdump --syms to verify that the debug info has been removed, not the output of "file". Thanks!


On Fri, Jun 2, 2023 at 12:11 AM Orion Poplawski <or...@nwra.com <mailto:or...@nwra.com>> wrote:

    I'm trying to resolve this packaging issue with Lmod:

    https://artifacts.dev.testing-farm.io/4d7bee41-8d21-42fb-8c57-e5ffbf58119f/ 
<https://artifacts.dev.testing-farm.io/4d7bee41-8d21-42fb-8c57-e5ffbf58119f/>

    debuginfo
    BAD /usr/share/lmod/8.7.25/lib/tcl2lua.so in Lmod-8.7.25-2.fc38 on i686
    contains debugging symbols

    I've dealt with a couple of issues here:

    https://src.fedoraproject.org/rpms/Lmod/pull-request/2
    <https://src.fedoraproject.org/rpms/Lmod/pull-request/2>

    but despite all of my attempts the library does not appear to get
    stripped.

    In fact:

    ]$ strip -g
    
/home/orion/BUILDROOT/Lmod-8.7.25-3.fc39.x86_64/usr/lib64/lmod/tcl2lua.so.1.0.1

    $ file
    
/home/orion/BUILDROOT/Lmod-8.7.25-3.fc39.x86_64/usr/lib64/lmod/tcl2lua.so.1.0.1
    
/home/orion/BUILDROOT/Lmod-8.7.25-3.fc39.x86_64/usr/lib64/lmod/tcl2lua.so.1.0.1:
    ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically
    linked, BuildID[sha1]=aa1ea44979190d0cf530d350f8151ffafeab0f36, not
    stripped

    ?


-- Orion Poplawski
    he/him/his  - surely the least important thing about me
    IT Systems Manager                         720-772-5637
    NWRA, Boulder/CoRA Office             FAX: 303-415-9702
    3380 Mitchell Lane or...@nwra.com <mailto:or...@nwra.com>
    Boulder, CO 80301 https://www.nwra.com/ <https://www.nwra.com/>
    _______________________________________________
    devel mailing list -- devel@lists.fedoraproject.org
    <mailto:devel@lists.fedoraproject.org>
    To unsubscribe send an email to devel-le...@lists.fedoraproject.org
    <mailto:devel-le...@lists.fedoraproject.org>
    Fedora Code of Conduct:
    https://docs.fedoraproject.org/en-US/project/code-of-conduct/
    <https://docs.fedoraproject.org/en-US/project/code-of-conduct/>
    List Guidelines:
    https://fedoraproject.org/wiki/Mailing_list_guidelines
    <https://fedoraproject.org/wiki/Mailing_list_guidelines>
    List Archives:
    https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org 
<https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org>
    Do not reply to spam, report it:
    https://pagure.io/fedora-infrastructure/new_issue
    <https://pagure.io/fedora-infrastructure/new_issue>


_______________________________________________
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue

--
Orion Poplawski
he/him/his  - surely the least important thing about me
IT Systems Manager                         720-772-5637
NWRA, Boulder/CoRA Office             FAX: 303-415-9702
3380 Mitchell Lane                       or...@nwra.com
Boulder, CO 80301                 https://www.nwra.com/

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

_______________________________________________
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue

Reply via email to