summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/mcld/ADT/Flags.h2
-rw-r--r--include/mcld/ADT/HashTable.h4
-rw-r--r--include/mcld/ADT/StringHash.h12
-rw-r--r--include/mcld/ADT/TreeAllocator.h2
-rw-r--r--include/mcld/Config/Linkers.def.in4
-rw-r--r--include/mcld/Fragment/FragmentRef.h4
-rw-r--r--include/mcld/LD/LDSymbol.h4
-rw-r--r--include/mcld/LD/StaticResolver.h2
-rw-r--r--include/mcld/MC/Attribute.h6
-rw-r--r--include/mcld/Object/ObjectBuilder.h6
-rw-r--r--include/mcld/Script/FlexLexer.h11
-rw-r--r--include/mcld/Support/MemoryAreaFactory.h2
-rw-r--r--include/mcld/Support/ToolOutputFile.h2
-rw-r--r--include/mcld/Target/ELFDynamic.h2
-rw-r--r--include/mcld/Target/GOT.h2
-rw-r--r--include/mcld/Target/PLT.h10
16 files changed, 37 insertions, 38 deletions
diff --git a/include/mcld/ADT/Flags.h b/include/mcld/ADT/Flags.h
index c6a41e8..16515aa 100644
--- a/include/mcld/ADT/Flags.h
+++ b/include/mcld/ADT/Flags.h
@@ -65,7 +65,7 @@ public:
Flags& operator^= (Flags pOther) {
m_Data ^= pOther.m_Data;
return *this;
- }
+ }
Flags& operator^= (Enum pOther) {
m_Data ^= pOther;
diff --git a/include/mcld/ADT/HashTable.h b/include/mcld/ADT/HashTable.h
index 522ab48..c260f56 100644
--- a/include/mcld/ADT/HashTable.h
+++ b/include/mcld/ADT/HashTable.h
@@ -63,7 +63,7 @@ public:
// ----- constructor ----- //
explicit HashTable(size_type pSize=3);
~HashTable();
-
+
EntryFactoryTy& getEntryFactory()
{ return m_EntryFactory; }
@@ -88,7 +88,7 @@ public:
const_iterator find(const key_type& pKey) const;
size_type count(const key_type& pKey) const;
-
+
// ----- hash policy ----- //
float load_factor() const;
diff --git a/include/mcld/ADT/StringHash.h b/include/mcld/ADT/StringHash.h
index 048f35f..df3caeb 100644
--- a/include/mcld/ADT/StringHash.h
+++ b/include/mcld/ADT/StringHash.h
@@ -80,7 +80,7 @@ struct StringHash<JS> : public std::unary_function<const llvm::StringRef&, uint3
for(unsigned int i = 0; i < pKey.size(); ++i) {
hash_val ^= ((hash_val << 5) + pKey[i] + (hash_val >> 2));
- }
+ }
return hash_val;
}
};
@@ -125,7 +125,7 @@ struct StringHash<ELF> : public std::unary_function<const llvm::StringRef&, uint
for (unsigned int i = 0; i < pKey.size(); ++i) {
hash_val = (hash_val << 4) + pKey[i];
if((x = hash_val & 0xF0000000L) != 0)
- hash_val ^= (x >> 24);
+ hash_val ^= (x >> 24);
hash_val &= ~x;
}
return hash_val;
@@ -142,7 +142,7 @@ struct StringHash<BKDR> : public std::unary_function<const llvm::StringRef&, uin
{
const uint32_t seed = 131;
uint32_t hash_val = 0;
-
+
for(uint32_t i = 0; i < pKey.size(); ++i)
hash_val = (hash_val * seed) + pKey[i];
return hash_val;
@@ -250,13 +250,13 @@ struct StringHash<AP> : public std::unary_function<const llvm::StringRef&, uint3
uint32_t operator()(const llvm::StringRef& pKey) const
{
unsigned int hash_val = 0xAAAAAAAA;
-
- for(uint32_t i = 0; i < pKey.size(); ++i) {
+
+ for(uint32_t i = 0; i < pKey.size(); ++i) {
hash_val ^= ((i & 1) == 0)?
((hash_val << 7) ^ pKey[i] * (hash_val >> 3)):
(~((hash_val << 11) + (pKey[i] ^ (hash_val >> 5))));
}
-
+
return hash_val;
}
};
diff --git a/include/mcld/ADT/TreeAllocator.h b/include/mcld/ADT/TreeAllocator.h
index b2bb39b..41efae7 100644
--- a/include/mcld/ADT/TreeAllocator.h
+++ b/include/mcld/ADT/TreeAllocator.h
@@ -25,7 +25,7 @@ namespace mcld {
* NodeFactory provides delegation of memory. Sometimes, we have to merge two
* NodeFactories, and NodeFactory::delegate() can move the memory from one
* NodeFactories to another.
- *
+ *
* @see LinearAllocator
*/
template<typename DataType>
diff --git a/include/mcld/Config/Linkers.def.in b/include/mcld/Config/Linkers.def.in
index e8b870b..ec95925 100644
--- a/include/mcld/Config/Linkers.def.in
+++ b/include/mcld/Config/Linkers.def.in
@@ -7,8 +7,8 @@
//
//===----------------------------------------------------------------------===//
//
-// This file enumerates all of the linkers supported by this build of MCLinker.
-// Clients of this file should define the MCLD_LINKER macro to be a function-like
+// This file enumerates all of the linkers supported by this build of MCLinker.
+// Clients of this file should define the MCLD_LINKER macro to be a function-like
// macro with a single parameter (the name of the target whose exe/dso can be
// generated); including this file will then enumerate all of the targets with
// linkers.
diff --git a/include/mcld/Fragment/FragmentRef.h b/include/mcld/Fragment/FragmentRef.h
index 3bfd804..36f310e 100644
--- a/include/mcld/Fragment/FragmentRef.h
+++ b/include/mcld/Fragment/FragmentRef.h
@@ -60,7 +60,7 @@ public:
/// copy memory from the fragment to the pDesc.
/// @pDest - the destination address
/// @pNBytes - copies pNBytes from the fragment[offset()+pOffset]
- /// @pOffset - additional offset.
+ /// @pOffset - additional offset.
/// the start address offset from fragment[offset()]
void memcpy(void* pDest, size_t pNBytes, Offset pOffset = 0) const;
@@ -86,7 +86,7 @@ private:
FragmentRef();
FragmentRef(Fragment& pFrag, Offset pOffset = 0);
-
+
private:
Fragment* m_pFragment;
Offset m_Offset;
diff --git a/include/mcld/LD/LDSymbol.h b/include/mcld/LD/LDSymbol.h
index bebdd18..8d1813a 100644
--- a/include/mcld/LD/LDSymbol.h
+++ b/include/mcld/LD/LDSymbol.h
@@ -114,7 +114,7 @@ public:
ResolveInfo* resolveInfo()
{ return m_pResolveInfo; }
- const ResolveInfo* resolveInfo() const
+ const ResolveInfo* resolveInfo() const
{ return m_pResolveInfo; }
bool hasFragRef() const;
@@ -127,7 +127,7 @@ public:
void setValue(ValueType pValue)
{ m_Value = pValue; }
-
+
void setFragmentRef(FragmentRef* pFragmentRef);
void setResolveInfo(const ResolveInfo& pInfo);
diff --git a/include/mcld/LD/StaticResolver.h b/include/mcld/LD/StaticResolver.h
index 586e44d..c73629a 100644
--- a/include/mcld/LD/StaticResolver.h
+++ b/include/mcld/LD/StaticResolver.h
@@ -75,7 +75,7 @@ private:
w_D = ResolveInfo::weak_flag | ResolveInfo::regular_flag | ResolveInfo::define_flag,
d_D = ResolveInfo::global_flag | ResolveInfo::dynamic_flag | ResolveInfo::define_flag,
wd_D = ResolveInfo::weak_flag | ResolveInfo::dynamic_flag | ResolveInfo::define_flag,
- C = ResolveInfo::global_flag | ResolveInfo::regular_flag | ResolveInfo::common_flag,
+ C = ResolveInfo::global_flag | ResolveInfo::regular_flag | ResolveInfo::common_flag,
w_C = ResolveInfo::weak_flag | ResolveInfo::regular_flag | ResolveInfo::common_flag,
d_C = ResolveInfo::global_flag | ResolveInfo::dynamic_flag | ResolveInfo::common_flag,
wd_C = ResolveInfo::weak_flag | ResolveInfo::dynamic_flag | ResolveInfo::common_flag,
diff --git a/include/mcld/MC/Attribute.h b/include/mcld/MC/Attribute.h
index a7c7176..1c02505 100644
--- a/include/mcld/MC/Attribute.h
+++ b/include/mcld/MC/Attribute.h
@@ -159,7 +159,7 @@ public:
bool isStaticSystem() const
{ return m_Static; }
-
+
bool isLegal(const Attribute& pAttr) const;
};
@@ -224,8 +224,8 @@ private:
inline bool operator== (const Attribute& pLHS, const Attribute& pRHS)
{
return ((pLHS.isWholeArchive() == pRHS.isWholeArchive()) &&
- (pLHS.isAsNeeded() == pRHS.isAsNeeded()) &&
- (pLHS.isAddNeeded() == pRHS.isAddNeeded()) &&
+ (pLHS.isAsNeeded() == pRHS.isAsNeeded()) &&
+ (pLHS.isAddNeeded() == pRHS.isAddNeeded()) &&
(pLHS.isStatic() == pRHS.isStatic()));
}
diff --git a/include/mcld/Object/ObjectBuilder.h b/include/mcld/Object/ObjectBuilder.h
index ec80528..bc20421 100644
--- a/include/mcld/Object/ObjectBuilder.h
+++ b/include/mcld/Object/ObjectBuilder.h
@@ -62,7 +62,7 @@ public:
/// MergeSection - merge the pInput section to mcld::Module.
/// This function moves all fragments in pInputSection to the corresponding
- /// output section of mcld::Module.
+ /// output section of mcld::Module.
///
/// @see SectionMap
/// @param [in] pInputSection The merged input section.
@@ -76,6 +76,10 @@ public:
/// UpdateSectionAlign - update alignment for input section
static void UpdateSectionAlign(LDSection& pTo, const LDSection& pFrom);
+ /// UpdateSectionAlign - update alignment for the section
+ static void UpdateSectionAlign(LDSection& pSection,
+ uint32_t pAlignConstraint);
+
/// @}
/// @name Fragment Methods
/// @{
diff --git a/include/mcld/Script/FlexLexer.h b/include/mcld/Script/FlexLexer.h
index d7d8001..f09ab20 100644
--- a/include/mcld/Script/FlexLexer.h
+++ b/include/mcld/Script/FlexLexer.h
@@ -139,15 +139,8 @@ public:
virtual int yywrap();
protected:
-// BEGIN android-modified: work around flex differences on Darwin and Linux
-#if !defined(DARWIN_FLEX)
- virtual int LexerInput( char* buf, int max_size );
- virtual void LexerOutput( const char* buf, int size );
-#else
- virtual size_t LexerInput( char* buf, size_t max_size );
- virtual void LexerOutput( const char* buf, size_t size );
-#endif
-// END android-modified
+ virtual int LexerInput( char* buf, int max_size );
+ virtual void LexerOutput( const char* buf, int size );
virtual void LexerError( const char* msg );
void yyunput( int c, char* buf_ptr );
diff --git a/include/mcld/Support/MemoryAreaFactory.h b/include/mcld/Support/MemoryAreaFactory.h
index 302fbd1..c3c3a0d 100644
--- a/include/mcld/Support/MemoryAreaFactory.h
+++ b/include/mcld/Support/MemoryAreaFactory.h
@@ -24,7 +24,7 @@ namespace mcld
* \brief MemoryAreaFactory avoids creating duplicated MemoryAreas of the
* same file.
*
- * Users can give duplicated input files on the command line. In order to
+ * Users can give duplicated input files on the command line. In order to
* prevent opening the same file twice, and create redundant MemoryRegions,
* mcld::Input should not create MemoryArea directly. Instead, it should ask
* MemoryAreaFactory and get the unique MemoryArea.
diff --git a/include/mcld/Support/ToolOutputFile.h b/include/mcld/Support/ToolOutputFile.h
index f1186c3..873a290 100644
--- a/include/mcld/Support/ToolOutputFile.h
+++ b/include/mcld/Support/ToolOutputFile.h
@@ -65,7 +65,7 @@ private:
private:
sys::fs::Path m_Path;
- };
+ };
private:
FileHandle m_FileHandle;
diff --git a/include/mcld/Target/ELFDynamic.h b/include/mcld/Target/ELFDynamic.h
index c9b257f..4f70d34 100644
--- a/include/mcld/Target/ELFDynamic.h
+++ b/include/mcld/Target/ELFDynamic.h
@@ -185,6 +185,8 @@ protected:
size_t symbolSize() const;
+ const LinkerConfig& config() const { return m_Config; }
+
private:
EntryListType m_EntryList;
EntryListType m_NeedList;
diff --git a/include/mcld/Target/GOT.h b/include/mcld/Target/GOT.h
index eb73741..bc1c0f8 100644
--- a/include/mcld/Target/GOT.h
+++ b/include/mcld/Target/GOT.h
@@ -67,7 +67,7 @@ public:
// ----- observers -----//
uint64_t addr() const { return m_Section.addr(); }
- uint32_t size() const { return m_Section.size(); }
+ uint64_t size() const { return m_Section.size(); }
const_iterator begin() const { return m_SectionData->begin(); }
iterator begin() { return m_SectionData->begin(); }
diff --git a/include/mcld/Target/PLT.h b/include/mcld/Target/PLT.h
index 7305a74..ce14d98 100644
--- a/include/mcld/Target/PLT.h
+++ b/include/mcld/Target/PLT.h
@@ -86,14 +86,14 @@ public:
uint64_t addr() const { return m_Section.addr(); }
- const_iterator begin() const { return m_SectionData->begin(); }
- iterator begin() { return m_SectionData->begin(); }
- const_iterator end () const { return m_SectionData->end(); }
- iterator end () { return m_SectionData->end(); }
+ const_iterator begin() const { return m_pSectionData->begin(); }
+ iterator begin() { return m_pSectionData->begin(); }
+ const_iterator end () const { return m_pSectionData->end(); }
+ iterator end () { return m_pSectionData->end(); }
protected:
LDSection& m_Section;
- SectionData* m_SectionData;
+ SectionData* m_pSectionData;
};
} // namespace of mcld