[lld] r259847 - Do not round uintX_t to uint32_t.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 4 15:39:33 PST 2016


Author: ruiu
Date: Thu Feb  4 17:39:33 2016
New Revision: 259847

URL: http://llvm.org/viewvc/llvm-project?rev=259847&view=rev
Log:
Do not round uintX_t to uint32_t.

On 64-bit computers, this value can be larger than UINT32_MAX.

Modified:
    lld/trunk/ELF/OutputSections.h

Modified: lld/trunk/ELF/OutputSections.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/OutputSections.h?rev=259847&r1=259846&r2=259847&view=diff
==============================================================================
--- lld/trunk/ELF/OutputSections.h (original)
+++ lld/trunk/ELF/OutputSections.h Thu Feb  4 17:39:33 2016
@@ -130,7 +130,7 @@ public:
   // the number of reserved entries. This method is MIPS-specific.
   unsigned getMipsLocalEntriesNum() const;
 
-  uint32_t getLocalTlsIndexVA() { return Base::getVA() + LocalTlsIndexOff; }
+  uintX_t getLocalTlsIndexVA() { return Base::getVA() + LocalTlsIndexOff; }
 
 private:
   std::vector<const SymbolBody *> Entries;




More information about the llvm-commits mailing list