[SOLVED] rpm build will remove .symtab/.strtab section?
rpm build will remove .symtab/.strtab section?
I’m trying to build a binary with .symtab and .strtab section to trace functions. I’m using “make && make install”, the binary is ok. But when I use “make rpm” and install rpm package, both of .symtab and .strtab section are gone which is weired. I track the rpm build log, and saw those:
libtool: install: /usr/bin/install -c mybinary /root/rpmbuild/BUILDROOT/mybinary.el7.centos.x86_64/usr/sbin/mybinary
and here, I executed it manually again, the .symtab section exists.
extracting debug info from /root/rpmbuild/BUILDROOT/mybinary.el7.centos.x86_64/usr/sbin/mybinary
After this step, the .symtab section is gone, I guess there’s something wrong here. But I don’t know why. Please help.
Solution
rpmbuild automatically strip debuging info and place it in -debug subpackage. If you want to preserve it for some reason follow https://imvoid.wordpress.com/2013/06/05/stripping-and-stopping-stripping-of-binaries-in-rpm-build/
Answered By — msuchy
Answer Checked By — Terry (FixIt Volunteer)
This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0
메타데이터
- post_id
- 4bbc2446dbac
- slug
- solved-rpm-build-will-remove-symtab-strtab-section-4bbc2446dbac
- url
- https://medium.com/@fixitblog/solved-rpm-build-will-remove-symtab-strtab-section-4bbc2446dbac
- canonical_url
- https://medium.com/@fixitblog/solved-rpm-build-will-remove-symtab-strtab-section-4bbc2446dbac
- author_url
- https://medium.com/@fixitblog
- status
- ok
- fetched_at
- 2026-09-02 17:16:38