From: Simon Atanasyan Date: Tue, 29 Nov 2016 13:26:04 +0000 (+0000) Subject: [ELF][MIPS] Make stable an order of GOT page address entries X-Git-Tag: llvmorg-4.0.0-rc1~3477 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=160bf723f597ddb5e86ad3f76e65a957c1d06e66;p=platform%2Fupstream%2Fllvm.git [ELF][MIPS] Make stable an order of GOT page address entries llvm-svn: 288137 --- diff --git a/lld/ELF/SyntheticSections.h b/lld/ELF/SyntheticSections.h index 9434c8d..7677678 100644 --- a/lld/ELF/SyntheticSections.h +++ b/lld/ELF/SyntheticSections.h @@ -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 PageIndexMap; + llvm::SmallMapVector PageIndexMap; typedef std::pair GotEntry; typedef std::vector GotEntries; diff --git a/lld/test/ELF/mips-got16.s b/lld/test/ELF/mips-got16.s index 69b9f95..c4c14e4 100644 --- a/lld/test/ELF/mips-got16.s +++ b/lld/test/ELF/mips-got16.s @@ -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)