[llvm-commits] [llvm] r79029 - in /llvm/trunk: include/llvm/MC/MCSectionELF.h lib/CodeGen/ELFWriter.cpp lib/MC/MCSectionELF.cpp
Bruno Cardoso Lopes
bruno.cardoso at gmail.com
Fri Aug 14 12:45:39 PDT 2009
Author: bruno
Date: Fri Aug 14 14:45:38 2009
New Revision: 79029
URL: http://llvm.org/viewvc/llvm-project?rev=79029&view=rev
Log:
*try* to use a better name to describe how common symbols are marked on the elf object file.
Modified:
llvm/trunk/include/llvm/MC/MCSectionELF.h
llvm/trunk/lib/CodeGen/ELFWriter.cpp
llvm/trunk/lib/MC/MCSectionELF.cpp
Modified: llvm/trunk/include/llvm/MC/MCSectionELF.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCSectionELF.h?rev=79029&r1=79028&r2=79029&view=diff
==============================================================================
--- llvm/trunk/include/llvm/MC/MCSectionELF.h (original)
+++ llvm/trunk/include/llvm/MC/MCSectionELF.h Fri Aug 14 14:45:38 2009
@@ -52,8 +52,10 @@
/// ShouldPrintSectionType - Only prints the section type if supported
bool ShouldPrintSectionType(unsigned Ty) const;
- /// IsCommon - True if this section contains only common symbols
- bool IsCommon() const;
+ /// HasCommonSymbols - True if this section holds common symbols, this is
+ /// indicated on the ELF object file by a symbol with SHN_COMMON section
+ /// header index.
+ bool HasCommonSymbols() const;
/// These are the section type and flags fields. An ELF section can have
/// only one Type, but can have more than one of the flags specified.
Modified: llvm/trunk/lib/CodeGen/ELFWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/ELFWriter.cpp?rev=79029&r1=79028&r2=79029&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/ELFWriter.cpp (original)
+++ llvm/trunk/lib/CodeGen/ELFWriter.cpp Fri Aug 14 14:45:38 2009
@@ -356,7 +356,7 @@
unsigned Size = TD->getTypeAllocSize(GVar->getInitializer()->getType());
GblSym->Size = Size;
- if (S->IsCommon()) { // Symbol must go to a common section
+ if (S->HasCommonSymbols()) { // Symbol must go to a common section
GblSym->SectionIdx = ELFSection::SHN_COMMON;
// A new linkonce section is created for each global in the
Modified: llvm/trunk/lib/MC/MCSectionELF.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCSectionELF.cpp?rev=79029&r1=79028&r2=79029&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCSectionELF.cpp (original)
+++ llvm/trunk/lib/MC/MCSectionELF.cpp Fri Aug 14 14:45:38 2009
@@ -122,8 +122,10 @@
OS << '\n';
}
-// IsCommon - True if this section contains only common symbols
-bool MCSectionELF::IsCommon() const {
+// HasCommonSymbols - True if this section holds common symbols, this is
+// indicated on the ELF object file by a symbol with SHN_COMMON section
+// header index.
+bool MCSectionELF::HasCommonSymbols() const {
if (strncmp(SectionName.c_str(), ".gnu.linkonce.", 14) == 0)
return true;
More information about the llvm-commits
mailing list