Warn when an output section name is longer than 8 characters
authorReid Kleckner <rnk@google.com>
Tue, 29 Oct 2019 22:57:40 +0000 (15:57 -0700)
committerReid Kleckner <rnk@google.com>
Fri, 1 Nov 2019 19:59:13 +0000 (12:59 -0700)
commitdeaf121b657323fde17dd862a13b05e8b7ee6954
tree6261a8ad3ae36d35e841d92f6a53964fcf8efb9a
parenta264e85dd9f99391bedc7f069926bdd8d2f44388
Warn when an output section name is longer than 8 characters

Recent versions of Microsoft's dumpbin tool cannot handle such PE files.
LLVM tools and GNU tools can, and use this to encode long section names
like ".debug_info", which is commonly used for DWARF. Don't do this in
mingw mode or when -debug:dwarf is passed, since the user probably wants
long section names for DWARF sections.

PR43754

Reviewers: ruiu, mstorsjo

Differential Revision: https://reviews.llvm.org/D69594
lld/COFF/Config.h
lld/COFF/Driver.cpp
lld/COFF/Writer.cpp
lld/test/COFF/long-section-name.test