diff options
author | Richard Mitton <richard@codersnotes.com> | 2013-09-23 17:56:20 +0000 |
---|---|---|
committer | Richard Mitton <richard@codersnotes.com> | 2013-09-23 17:56:20 +0000 |
commit | eb46def978a60fd705cca3037feff5573122b404 (patch) | |
tree | 73466a34e49ec135896bbd648f52920e5e436847 /lib/MC/MCAsmStreamer.cpp | |
parent | 9528b0e466ace36268abe9d011fffc67d831088c (diff) | |
download | external_llvm-eb46def978a60fd705cca3037feff5573122b404.zip external_llvm-eb46def978a60fd705cca3037feff5573122b404.tar.gz external_llvm-eb46def978a60fd705cca3037feff5573122b404.tar.bz2 |
Fixed debug_aranges handling for common symbols.
The size of common symbols is now tracked correctly, so they can be listed in the arange section without needing knowledge of other following symbols.
.comm (and .lcomm) do not indicate to the system assembler any particular section to use, so we have to treat them as having no section.
Test case update to account for this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191210 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/MCAsmStreamer.cpp')
-rw-r--r-- | lib/MC/MCAsmStreamer.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/MC/MCAsmStreamer.cpp b/lib/MC/MCAsmStreamer.cpp index e57025e..80b0ace 100644 --- a/lib/MC/MCAsmStreamer.cpp +++ b/lib/MC/MCAsmStreamer.cpp @@ -533,8 +533,8 @@ void MCAsmStreamer::EmitELFSize(MCSymbol *Symbol, const MCExpr *Value) { void MCAsmStreamer::EmitCommonSymbol(MCSymbol *Symbol, uint64_t Size, unsigned ByteAlignment) { - const MCSection *Section = getContext().getObjectFileInfo()->getBSSSection(); - AssignSection(Symbol, Section); + // Common symbols do not belong to any actual section. + AssignSection(Symbol, NULL); OS << "\t.comm\t" << *Symbol << ',' << Size; if (ByteAlignment != 0) { @@ -552,8 +552,8 @@ void MCAsmStreamer::EmitCommonSymbol(MCSymbol *Symbol, uint64_t Size, /// @param Size - The size of the common symbol. void MCAsmStreamer::EmitLocalCommonSymbol(MCSymbol *Symbol, uint64_t Size, unsigned ByteAlign) { - const MCSection *Section = getContext().getObjectFileInfo()->getBSSSection(); - AssignSection(Symbol, Section); + // Common symbols do not belong to any actual section. + AssignSection(Symbol, NULL); OS << "\t.lcomm\t" << *Symbol << ',' << Size; if (ByteAlign > 1) { |