This is an archive of the discontinued LLVM Phabricator instance.

[dsymutil] Don't emit .debug_pubnames and .debug_pubtypes unless asked for explicitly
ClosedPublic

Authored by JDevlieghere on Apr 5 2021, 4:48 PM.

Details

Summary

Consider the .debug_pubnames and .debug_pubtypes their own kind of accelerator table and stop emitting them together with the Apple accelerator tables. The only reason we were still emitting both was for (byte-for-byte) compatibility with dsymutil-classic.

  • This patch adds a new accelerator table kind "Pub" which can be specified with --accelerator=Pub.
  • This patch removes the ability to emit both pubnames/types and apple style accelerator tables. I don't think anyone is relying on that but it's worth pointing out.
  • This patch removes the --minimize option and makes this behavior the default. Specifying the flag will result in a warning but won't abort the program.

Diff Detail

Event Timeline

JDevlieghere created this revision.Apr 5 2021, 4:48 PM
JDevlieghere requested review of this revision.Apr 5 2021, 4:48 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 5 2021, 4:48 PM
JDevlieghere edited the summary of this revision. (Show Details)Apr 5 2021, 4:51 PM
JDevlieghere added inline comments.
llvm/include/llvm/DWARFLinker/DWARFLinker.h
29

IIRC the gcc option is called -gpubnames which generates both pubnames and pubtypes. I'm open to calling it Pubnames too for consistency.

friss accepted this revision.Apr 6 2021, 4:05 PM

LGTM.

One little comment: should one of the tests where you removed the pubnames testing actually be replaced a CHECK-NOT: .debug_pubnames contents: ?

This revision is now accepted and ready to land.Apr 6 2021, 4:05 PM
clayborg accepted this revision.Apr 6 2021, 5:37 PM

Nice! Do you have anymore patches that we can do to improve dsymutil now that we don't require byte-for-byte compatibility with dsymutil-classic?

Nice! Do you have anymore patches that we can do to improve dsymutil now that we don't require byte-for-byte compatibility with dsymutil-classic?

Yep, stay tuned ;-)

llvm/test/tools/dsymutil/X86/basic-lto-linking-x86.test