This is an archive of the discontinued LLVM Phabricator instance.

Strip stabs symbols in Mach-O when stripping debug info
AcceptedPublic

Authored by glandium on May 31 2023, 9:28 PM.

Diff Detail

Event Timeline

glandium created this revision.May 31 2023, 9:28 PM
glandium requested review of this revision.May 31 2023, 9:28 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 31 2023, 9:28 PM

My understanding is that STAB is another debug format that is generally superseded by DWARF. It's still a debug format and it's consistent to have --strip-debug removing it.

serge-sans-paille accepted this revision.Jun 2 2023, 3:09 AM
This revision is now accepted and ready to land.Jun 2 2023, 3:09 AM
MaskRay accepted this revision.Jun 2 2023, 8:35 AM
MaskRay added inline comments.
llvm/test/tools/llvm-objcopy/MachO/strip-stabs.test
1

Show that --strip-debug strips stabs symbols and debug sections.?

Does strip-debug.test work better?

glandium added inline comments.Jun 2 2023, 1:08 PM
llvm/test/tools/llvm-objcopy/MachO/strip-stabs.test
1

strip-debug.text exists and tests with a data file that does *not* contain stabs symbols.