[lld] r288137 - [ELF][MIPS] Make stable an order of GOT page address entries

Simon Atanasyan via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 29 05:26:04 PST 2016


Author: atanasyan
Date: Tue Nov 29 07:26:04 2016
New Revision: 288137

URL: http://llvm.org/viewvc/llvm-project?rev=288137&view=rev
Log:
[ELF][MIPS] Make stable an order of GOT page address entries

Modified:
    lld/trunk/ELF/SyntheticSections.h
    lld/trunk/test/ELF/mips-got16.s

Modified: lld/trunk/ELF/SyntheticSections.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/SyntheticSections.h?rev=288137&r1=288136&r2=288137&view=diff
==============================================================================
--- lld/trunk/ELF/SyntheticSections.h (original)
+++ lld/trunk/ELF/SyntheticSections.h Tue Nov 29 07:26:04 2016
@@ -12,7 +12,7 @@
 
 #include "GdbIndex.h"
 #include "InputSection.h"
-#include "llvm/ADT/SmallPtrSet.h"
+#include "llvm/ADT/MapVector.h"
 
 namespace lld {
 namespace elf {
@@ -170,7 +170,7 @@ private:
   uint32_t PageEntriesNum = 0;
   // Map output sections referenced by MIPS GOT relocations
   // to the first index of "Page" entries allocated for this section.
-  llvm::SmallDenseMap<const OutputSectionBase *, size_t> PageIndexMap;
+  llvm::SmallMapVector<const OutputSectionBase *, size_t, 16> PageIndexMap;
 
   typedef std::pair<const SymbolBody *, uintX_t> GotEntry;
   typedef std::vector<GotEntry> GotEntries;

Modified: lld/trunk/test/ELF/mips-got16.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/mips-got16.s?rev=288137&r1=288136&r2=288137&view=diff
==============================================================================
--- lld/trunk/test/ELF/mips-got16.s (original)
+++ lld/trunk/test/ELF/mips-got16.s Tue Nov 29 07:26:04 2016
@@ -2,16 +2,11 @@
 
 # RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux %s -o %t.o
 # RUN: ld.lld %t.o -shared -o %t.so
-# RUN: llvm-objdump -s %t.so | FileCheck -check-prefix=RAW %s
+# RUN: llvm-objdump -d -t %t.so | FileCheck %s
 # RUN: llvm-readobj -r -mips-plt-got %t.so | FileCheck -check-prefix=GOT %s
 
 # REQUIRES: mips
 
-# RAW:      Contents of section .got:
-# RAW-NEXT:  20000 00000000 80000000 00010000 00020000
-# RAW-NEXT:  20010 00030000 00040000 00050000 00060000
-# RAW-NEXT:  20020 00051008 00000000
-
 # CHECK:      Disassembly of section .text:
 # CHECK-NEXT: __start:
 # CHECK-NEXT:    10000:       8f 88 80 18     lw      $8, -32744($gp)




More information about the llvm-commits mailing list