[lld] r236314 - [Mips] Check creation of GOT entries corresponded to R_MIPS_REL32 relocations

Simon Atanasyan simon at atanasyan.com
Fri May 1 06:41:45 PDT 2015


Author: atanasyan
Date: Fri May  1 08:41:45 2015
New Revision: 236314

URL: http://llvm.org/viewvc/llvm-project?rev=236314&view=rev
Log:
[Mips] Check creation of GOT entries corresponded to R_MIPS_REL32 relocations

No functional changes.

Modified:
    lld/trunk/test/elf/Mips/rel-dynamic-01.test
    lld/trunk/test/elf/Mips/rel-dynamic-04-micro.test
    lld/trunk/test/elf/Mips/rel-dynamic-04.test
    lld/trunk/test/elf/Mips/rel-dynamic-06-64.test
    lld/trunk/test/elf/Mips/rel-dynamic-06.test
    lld/trunk/test/elf/Mips/rel-dynamic-07-64.test
    lld/trunk/test/elf/Mips/rel-dynamic-07.test
    lld/trunk/test/elf/Mips/rel-dynamic-08-64.test
    lld/trunk/test/elf/Mips/rel-dynamic-08-micro.test
    lld/trunk/test/elf/Mips/rel-dynamic-08.test
    lld/trunk/test/elf/Mips/rel-dynamic-12.test

Modified: lld/trunk/test/elf/Mips/rel-dynamic-01.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/Mips/rel-dynamic-01.test?rev=236314&r1=236313&r2=236314&view=diff
==============================================================================
--- lld/trunk/test/elf/Mips/rel-dynamic-01.test (original)
+++ lld/trunk/test/elf/Mips/rel-dynamic-01.test Fri May  1 08:41:45 2015
@@ -15,6 +15,7 @@
 # RUN: lld -flavor gnu -target mipsel -e T0 -o %t.exe %t-o.o %t.so
 # RUN: llvm-objdump -disassemble %t.exe | FileCheck -check-prefix=PLT %s
 # RUN: llvm-readobj -dt -r %t.exe | FileCheck -check-prefix=PLT-SYM %s
+# RUN: llvm-readobj -mips-plt-got %t.exe | FileCheck -check-prefix=GOT %s
 
 # PLT: Disassembly of section .plt:
 # PLT-NEXT: .plt:
@@ -106,6 +107,29 @@
 # PLT-SYM-NEXT:   }
 # PLT-SYM-NEXT: ]
 
+# GOT:      Local entries [
+# GOT-NEXT: ]
+# GOT-NEXT: Global entries [
+# GOT-NEXT:   Entry {
+# GOT-NEXT:     Address: 0x401008
+# GOT-NEXT:     Access: -32744
+# GOT-NEXT:     Initial: 0x0
+# GOT-NEXT:     Value: 0x0
+# GOT-NEXT:     Type: Function (0x2)
+# GOT-NEXT:     Section: Undefined (0x0)
+# GOT-NEXT:     Name: T2@ (7)
+# GOT-NEXT:   }
+# GOT-NEXT:   Entry {
+# GOT-NEXT:     Address: 0x40100C
+# GOT-NEXT:     Access: -32740
+# GOT-NEXT:     Initial: 0x0
+# GOT-NEXT:     Value: 0x0
+# GOT-NEXT:     Type: Object (0x1)
+# GOT-NEXT:     Section: Undefined (0x0)
+# GOT-NEXT:     Name: D2@ (13)
+# GOT-NEXT:   }
+# GOT-NEXT: ]
+
 # so.o
 ---
 FileHeader:

Modified: lld/trunk/test/elf/Mips/rel-dynamic-04-micro.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/Mips/rel-dynamic-04-micro.test?rev=236314&r1=236313&r2=236314&view=diff
==============================================================================
--- lld/trunk/test/elf/Mips/rel-dynamic-04-micro.test (original)
+++ lld/trunk/test/elf/Mips/rel-dynamic-04-micro.test Fri May  1 08:41:45 2015
@@ -19,6 +19,7 @@
 # RUN: yaml2obj -format=elf -docnum 2 %s > %t-o.o
 # RUN: lld -flavor gnu -target mipsel -e T0 -o %t.exe %t-o.o %t.so
 # RUN: llvm-readobj -dt -r -s %t.exe | FileCheck -check-prefix=PLT %s
+# RUN: llvm-readobj -mips-plt-got %t.exe | FileCheck -check-prefix=GOT %s
 
 # PLT:      Section {
 # PLT:        Index: 5
@@ -116,6 +117,20 @@
 # PLT-NEXT:   }
 # PLT-NEXT: ]
 
+# GOT:      Local entries [
+# GOT-NEXT: ]
+# GOT-NEXT: Global entries [
+# GOT-NEXT:   Entry {
+# GOT-NEXT:     Address: 0x402008
+# GOT-NEXT:     Access: -32744
+# GOT-NEXT:     Initial: 0x0
+# GOT-NEXT:     Value: 0x0
+# GOT-NEXT:     Type: Function (0x2)
+# GOT-NEXT:     Section: Undefined (0x0)
+# GOT-NEXT:     Name: T1@ (1)
+# GOT-NEXT:   }
+# GOT-NEXT: ]
+
 # so.o
 ---
 FileHeader:

Modified: lld/trunk/test/elf/Mips/rel-dynamic-04.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/Mips/rel-dynamic-04.test?rev=236314&r1=236313&r2=236314&view=diff
==============================================================================
--- lld/trunk/test/elf/Mips/rel-dynamic-04.test (original)
+++ lld/trunk/test/elf/Mips/rel-dynamic-04.test Fri May  1 08:41:45 2015
@@ -17,6 +17,7 @@
 # RUN: yaml2obj -format=elf -docnum 2 %s > %t-o.o
 # RUN: lld -flavor gnu -target mipsel -e T0 -o %t.exe %t-o.o %t.so
 # RUN: llvm-readobj -dt -r -s %t.exe | FileCheck -check-prefix=PLT %s
+# RUN: llvm-readobj -mips-plt-got %t.exe | FileCheck -check-prefix=GOT %s
 
 # PLT:      Section {
 # PLT:        Index: 5
@@ -114,6 +115,20 @@
 # PLT-NEXT:   }
 # PLT-NEXT: ]
 
+# GOT:      Local entries [
+# GOT-NEXT: ]
+# GOT-NEXT: Global entries [
+# GOT-NEXT:   Entry {
+# GOT-NEXT:     Address: 0x402008
+# GOT-NEXT:     Access: -32744
+# GOT-NEXT:     Initial: 0x0
+# GOT-NEXT:     Value: 0x0
+# GOT-NEXT:     Type: Function (0x2)
+# GOT-NEXT:     Section: Undefined (0x0)
+# GOT-NEXT:     Name: T1@ (1)
+# GOT-NEXT:   }
+# GOT-NEXT: ]
+
 # so.o
 ---
 FileHeader:

Modified: lld/trunk/test/elf/Mips/rel-dynamic-06-64.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/Mips/rel-dynamic-06-64.test?rev=236314&r1=236313&r2=236314&view=diff
==============================================================================
--- lld/trunk/test/elf/Mips/rel-dynamic-06-64.test (original)
+++ lld/trunk/test/elf/Mips/rel-dynamic-06-64.test Fri May  1 08:41:45 2015
@@ -9,6 +9,7 @@
 # RUN: yaml2obj -format=elf %s > %t.o
 # RUN: lld -flavor gnu -target mips64el -shared -o %t.so %t.o
 # RUN: llvm-readobj -dt -r -s %t.so | FileCheck -check-prefix=CHECK %s
+# RUN: llvm-readobj -mips-plt-got %t.so | FileCheck -check-prefix=GOT %s
 
 # CHECK:     Sections [
 # CHECK:       Section {
@@ -50,6 +51,20 @@
 # CHECK-NEXT:   }
 # CHECK-NEXT: ]
 
+# GOT:      Local entries [
+# GOT-NEXT: ]
+# GOT-NEXT: Global entries [
+# GOT-NEXT:   Entry {
+# GOT-NEXT:     Address: 0x1010
+# GOT-NEXT:     Access: -32736
+# GOT-NEXT:     Initial: 0x170
+# GOT-NEXT:     Value: 0x170
+# GOT-NEXT:     Type: Function (0x2)
+# GOT-NEXT:     Section: .text (0x5)
+# GOT-NEXT:     Name: T0@ (1)
+# GOT-NEXT:   }
+# GOT-NEXT: ]
+
 FileHeader:
   Class:   ELFCLASS64
   Data:    ELFDATA2LSB

Modified: lld/trunk/test/elf/Mips/rel-dynamic-06.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/Mips/rel-dynamic-06.test?rev=236314&r1=236313&r2=236314&view=diff
==============================================================================
--- lld/trunk/test/elf/Mips/rel-dynamic-06.test (original)
+++ lld/trunk/test/elf/Mips/rel-dynamic-06.test Fri May  1 08:41:45 2015
@@ -9,6 +9,7 @@
 # RUN: yaml2obj -format=elf %s > %t-obj
 # RUN: lld -flavor gnu -target mipsel -shared -o %t1-so %t-obj
 # RUN: llvm-readobj -dt -r -s %t1-so | FileCheck -check-prefix=PLT1 %s
+# RUN: llvm-readobj -mips-plt-got %t1-so | FileCheck -check-prefix=GOT %s
 
 # PLT1-SYM:     Sections [
 # PLT1-SYM:       Section {
@@ -50,6 +51,20 @@
 # PLT1-NEXT:   }
 # PLT1-NEXT: ]
 
+# GOT:      Local entries [
+# GOT-NEXT: ]
+# GOT-NEXT: Global entries [
+# GOT-NEXT:   Entry {
+# GOT-NEXT:     Address: 0x1008
+# GOT-NEXT:     Access: -32744
+# GOT-NEXT:     Initial: 0x100
+# GOT-NEXT:     Value: 0x100
+# GOT-NEXT:     Type: Function (0x2)
+# GOT-NEXT:     Section: .text (0x5)
+# GOT-NEXT:     Name: T0@ (1)
+# GOT-NEXT:   }
+# GOT-NEXT: ]
+
 !ELF
 FileHeader: !FileHeader
   Class: ELFCLASS32

Modified: lld/trunk/test/elf/Mips/rel-dynamic-07-64.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/Mips/rel-dynamic-07-64.test?rev=236314&r1=236313&r2=236314&view=diff
==============================================================================
--- lld/trunk/test/elf/Mips/rel-dynamic-07-64.test (original)
+++ lld/trunk/test/elf/Mips/rel-dynamic-07-64.test Fri May  1 08:41:45 2015
@@ -10,6 +10,7 @@
 # RUN: lld -flavor gnu -target mips64el -shared --noinhibit-exec \
 # RUN:     -o %t2.so %t-o.o %t1.so
 # RUN: llvm-readobj -dt -r -sections %t2.so | FileCheck %s
+# RUN: llvm-readobj -mips-plt-got %t2.so | FileCheck -check-prefix=GOT %s
 
 # CHECK:   Sections [
 # CHECK:     Section {
@@ -122,6 +123,92 @@
 # CHECK-NEXT:   }
 # CHECK-NEXT: ]
 
+# GOT:      Local entries [
+# GOT-NEXT: ]
+# GOT-NEXT: Global entries [
+# GOT-NEXT:   Entry {
+# GOT-NEXT:     Address: 0x1010
+# GOT-NEXT:     Access: -32736
+# GOT-NEXT:     Initial: 0x324
+# GOT-NEXT:     Value: 0x324
+# GOT-NEXT:     Type: Function (0x2)
+# GOT-NEXT:     Section: .text (0x5)
+# GOT-NEXT:     Name: T0@ (1)
+# GOT-NEXT:   }
+# GOT-NEXT:   Entry {
+# GOT-NEXT:     Address: 0x1018
+# GOT-NEXT:     Access: -32728
+# GOT-NEXT:     Initial: 0x0
+# GOT-NEXT:     Value: 0x0
+# GOT-NEXT:     Type: None (0x0)
+# GOT-NEXT:     Section: Undefined (0x0)
+# GOT-NEXT:     Name: T4@ (7)
+# GOT-NEXT:   }
+# GOT-NEXT:   Entry {
+# GOT-NEXT:     Address: 0x1020
+# GOT-NEXT:     Access: -32720
+# GOT-NEXT:     Initial: 0x0
+# GOT-NEXT:     Value: 0x0
+# GOT-NEXT:     Type: Object (0x1)
+# GOT-NEXT:     Section: Undefined (0x0)
+# GOT-NEXT:     Name: D2@ (25)
+# GOT-NEXT:   }
+# GOT-NEXT:   Entry {
+# GOT-NEXT:     Address: 0x1028
+# GOT-NEXT:     Access: -32712
+# GOT-NEXT:     Initial: 0x0
+# GOT-NEXT:     Value: 0x0
+# GOT-NEXT:     Type: Function (0x2)
+# GOT-NEXT:     Section: Undefined (0x0)
+# GOT-NEXT:     Name: T1@ (16)
+# GOT-NEXT:   }
+# GOT-NEXT:   Entry {
+# GOT-NEXT:     Address: 0x1030
+# GOT-NEXT:     Access: -32704
+# GOT-NEXT:     Initial: 0x0
+# GOT-NEXT:     Value: 0x0
+# GOT-NEXT:     Type: Function (0x2)
+# GOT-NEXT:     Section: Undefined (0x0)
+# GOT-NEXT:     Name: T2@ (19)
+# GOT-NEXT:   }
+# GOT-NEXT:   Entry {
+# GOT-NEXT:     Address: 0x1038
+# GOT-NEXT:     Access: -32696
+# GOT-NEXT:     Initial: 0x2004
+# GOT-NEXT:     Value: 0x2004
+# GOT-NEXT:     Type: Object (0x1)
+# GOT-NEXT:     Section: .data (0x8)
+# GOT-NEXT:     Name: D0@ (4)
+# GOT-NEXT:   }
+# GOT-NEXT:   Entry {
+# GOT-NEXT:     Address: 0x1040
+# GOT-NEXT:     Access: -32688
+# GOT-NEXT:     Initial: 0x0
+# GOT-NEXT:     Value: 0x0
+# GOT-NEXT:     Type: Object (0x1)
+# GOT-NEXT:     Section: Undefined (0x0)
+# GOT-NEXT:     Name: D1@ (22)
+# GOT-NEXT:   }
+# GOT-NEXT:   Entry {
+# GOT-NEXT:     Address: 0x1048
+# GOT-NEXT:     Access: -32680
+# GOT-NEXT:     Initial: 0x0
+# GOT-NEXT:     Value: 0x0
+# GOT-NEXT:     Type: None (0x0)
+# GOT-NEXT:     Section: Undefined (0x0)
+# GOT-NEXT:     Name: D4@ (10)
+# GOT-NEXT:   }
+# GOT-NEXT:   Entry {
+# GOT-NEXT:     Address: 0x1050
+# GOT-NEXT:     Access: -32672
+# GOT-NEXT:     Initial: 0x0
+# GOT-NEXT:     Value: 0x0
+# GOT-NEXT:     Type: None (0x0)
+# GOT-NEXT:     Section: Undefined (0x0)
+# GOT-NEXT:     Name: U1@ (13)
+# GOT-NEXT:   }
+# GOT-NEXT: ]
+
 # so.o
 ---
 FileHeader:

Modified: lld/trunk/test/elf/Mips/rel-dynamic-07.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/Mips/rel-dynamic-07.test?rev=236314&r1=236313&r2=236314&view=diff
==============================================================================
--- lld/trunk/test/elf/Mips/rel-dynamic-07.test (original)
+++ lld/trunk/test/elf/Mips/rel-dynamic-07.test Fri May  1 08:41:45 2015
@@ -11,6 +11,7 @@
 # RUN: lld -flavor gnu -target mipsel -shared --noinhibit-exec \
 # RUN:     -o %t2.so %t-o.o %t1.so
 # RUN: llvm-readobj -dt -r -sections %t2.so | FileCheck %s
+# RUN: llvm-readobj -mips-plt-got %t2.so | FileCheck -check-prefix=GOT %s
 
 # CHECK:   Sections [
 # CHECK:     Section {
@@ -123,6 +124,92 @@
 # CHECK-NEXT:   }
 # CHECK-NEXT: ]
 
+# GOT:      Local entries [
+# GOT-NEXT: ]
+# GOT-NEXT: Global entries [
+# GOT-NEXT:   Entry {
+# GOT-NEXT:     Address: 0x1008
+# GOT-NEXT:     Access: -32744
+# GOT-NEXT:     Initial: 0x214
+# GOT-NEXT:     Value: 0x214
+# GOT-NEXT:     Type: Function (0x2)
+# GOT-NEXT:     Section: .text (0x5)
+# GOT-NEXT:     Name: T0@ (1)
+# GOT-NEXT:   }
+# GOT-NEXT:   Entry {
+# GOT-NEXT:     Address: 0x100C
+# GOT-NEXT:     Access: -32740
+# GOT-NEXT:     Initial: 0x0
+# GOT-NEXT:     Value: 0x0
+# GOT-NEXT:     Type: None (0x0)
+# GOT-NEXT:     Section: Undefined (0x0)
+# GOT-NEXT:     Name: T4@ (7)
+# GOT-NEXT:   }
+# GOT-NEXT:   Entry {
+# GOT-NEXT:     Address: 0x1010
+# GOT-NEXT:     Access: -32736
+# GOT-NEXT:     Initial: 0x0
+# GOT-NEXT:     Value: 0x0
+# GOT-NEXT:     Type: Object (0x1)
+# GOT-NEXT:     Section: Undefined (0x0)
+# GOT-NEXT:     Name: D2@ (25)
+# GOT-NEXT:   }
+# GOT-NEXT:   Entry {
+# GOT-NEXT:     Address: 0x1014
+# GOT-NEXT:     Access: -32732
+# GOT-NEXT:     Initial: 0x0
+# GOT-NEXT:     Value: 0x0
+# GOT-NEXT:     Type: Function (0x2)
+# GOT-NEXT:     Section: Undefined (0x0)
+# GOT-NEXT:     Name: T1@ (16)
+# GOT-NEXT:   }
+# GOT-NEXT:   Entry {
+# GOT-NEXT:     Address: 0x1018
+# GOT-NEXT:     Access: -32728
+# GOT-NEXT:     Initial: 0x0
+# GOT-NEXT:     Value: 0x0
+# GOT-NEXT:     Type: Function (0x2)
+# GOT-NEXT:     Section: Undefined (0x0)
+# GOT-NEXT:     Name: T2@ (19)
+# GOT-NEXT:   }
+# GOT-NEXT:   Entry {
+# GOT-NEXT:     Address: 0x101C
+# GOT-NEXT:     Access: -32724
+# GOT-NEXT:     Initial: 0x2004
+# GOT-NEXT:     Value: 0x2004
+# GOT-NEXT:     Type: Object (0x1)
+# GOT-NEXT:     Section: .data (0x8)
+# GOT-NEXT:     Name: D0@ (4)
+# GOT-NEXT:   }
+# GOT-NEXT:   Entry {
+# GOT-NEXT:     Address: 0x1020
+# GOT-NEXT:     Access: -32720
+# GOT-NEXT:     Initial: 0x0
+# GOT-NEXT:     Value: 0x0
+# GOT-NEXT:     Type: Object (0x1)
+# GOT-NEXT:     Section: Undefined (0x0)
+# GOT-NEXT:     Name: D1@ (22)
+# GOT-NEXT:   }
+# GOT-NEXT:   Entry {
+# GOT-NEXT:     Address: 0x1024
+# GOT-NEXT:     Access: -32716
+# GOT-NEXT:     Initial: 0x0
+# GOT-NEXT:     Value: 0x0
+# GOT-NEXT:     Type: None (0x0)
+# GOT-NEXT:     Section: Undefined (0x0)
+# GOT-NEXT:     Name: D4@ (10)
+# GOT-NEXT:   }
+# GOT-NEXT:   Entry {
+# GOT-NEXT:     Address: 0x1028
+# GOT-NEXT:     Access: -32712
+# GOT-NEXT:     Initial: 0x0
+# GOT-NEXT:     Value: 0x0
+# GOT-NEXT:     Type: None (0x0)
+# GOT-NEXT:     Section: Undefined (0x0)
+# GOT-NEXT:     Name: U1@ (13)
+# GOT-NEXT:   }
+# GOT-NEXT: ]
+
 # so.o
 ---
 FileHeader:

Modified: lld/trunk/test/elf/Mips/rel-dynamic-08-64.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/Mips/rel-dynamic-08-64.test?rev=236314&r1=236313&r2=236314&view=diff
==============================================================================
--- lld/trunk/test/elf/Mips/rel-dynamic-08-64.test (original)
+++ lld/trunk/test/elf/Mips/rel-dynamic-08-64.test Fri May  1 08:41:45 2015
@@ -11,6 +11,7 @@
 # RUN: lld -flavor gnu -target mips64el -e T0 --noinhibit-exec \
 # RUN:     -o %t.exe %t-o.o %t.so
 # RUN: llvm-readobj -dt -r -sections %t.exe | FileCheck %s
+# RUN: llvm-readobj -mips-plt-got %t.exe | FileCheck -check-prefix=GOT %s
 
 # CHECK:   Sections [
 # CHECK:     Section {
@@ -73,6 +74,47 @@
 # CHECK-NEXT:   }
 # CHECK-NEXT: ]
 
+# GOT:      Local entries [
+# GOT-NEXT: ]
+# GOT-NEXT: Global entries [
+# GOT-NEXT:   Entry {
+# GOT-NEXT:     Address: 0x120001010
+# GOT-NEXT:     Access: -32736
+# GOT-NEXT:     Initial: 0x0
+# GOT-NEXT:     Value: 0x0
+# GOT-NEXT:     Type: Object (0x1)
+# GOT-NEXT:     Section: Undefined (0x0)
+# GOT-NEXT:     Name: D2@ (10)
+# GOT-NEXT:   }
+# GOT-NEXT:   Entry {
+# GOT-NEXT:     Address: 0x120001018
+# GOT-NEXT:     Access: -32728
+# GOT-NEXT:     Initial: 0x0
+# GOT-NEXT:     Value: 0x0
+# GOT-NEXT:     Type: Function (0x2)
+# GOT-NEXT:     Section: Undefined (0x0)
+# GOT-NEXT:     Name: T1@ (1)
+# GOT-NEXT:   }
+# GOT-NEXT:   Entry {
+# GOT-NEXT:     Address: 0x120001020
+# GOT-NEXT:     Access: -32720
+# GOT-NEXT:     Initial: 0x0
+# GOT-NEXT:     Value: 0x0
+# GOT-NEXT:     Type: Function (0x2)
+# GOT-NEXT:     Section: Undefined (0x0)
+# GOT-NEXT:     Name: T2@ (4)
+# GOT-NEXT:   }
+# GOT-NEXT:   Entry {
+# GOT-NEXT:     Address: 0x120001028
+# GOT-NEXT:     Access: -32712
+# GOT-NEXT:     Initial: 0x0
+# GOT-NEXT:     Value: 0x0
+# GOT-NEXT:     Type: Object (0x1)
+# GOT-NEXT:     Section: Undefined (0x0)
+# GOT-NEXT:     Name: D1@ (7)
+# GOT-NEXT:   }
+# GOT-NEXT: ]
+
 # so.o
 ---
 FileHeader:

Modified: lld/trunk/test/elf/Mips/rel-dynamic-08-micro.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/Mips/rel-dynamic-08-micro.test?rev=236314&r1=236313&r2=236314&view=diff
==============================================================================
--- lld/trunk/test/elf/Mips/rel-dynamic-08-micro.test (original)
+++ lld/trunk/test/elf/Mips/rel-dynamic-08-micro.test Fri May  1 08:41:45 2015
@@ -11,6 +11,7 @@
 # RUN: lld -flavor gnu -target mipsel -e T0 --noinhibit-exec \
 # RUN:     -o %t.exe %t-o.o %t.so
 # RUN: llvm-readobj -dt -r -sections %t.exe | FileCheck %s
+# RUN: llvm-readobj -mips-plt-got %t.exe | FileCheck -check-prefix=GOT %s
 
 # CHECK:   Sections [
 # CHECK:     Section {
@@ -73,6 +74,47 @@
 # CHECK-NEXT:   }
 # CHECK-NEXT: ]
 
+# GOT:      Local entries [
+# GOT-NEXT: ]
+# GOT-NEXT: Global entries [
+# GOT-NEXT:   Entry {
+# GOT-NEXT:     Address: 0x401008
+# GOT-NEXT:     Access: -32744
+# GOT-NEXT:     Initial: 0x0
+# GOT-NEXT:     Value: 0x0
+# GOT-NEXT:     Type: Object (0x1)
+# GOT-NEXT:     Section: Undefined (0x0)
+# GOT-NEXT:     Name: D2@ (10)
+# GOT-NEXT:   }
+# GOT-NEXT:   Entry {
+# GOT-NEXT:     Address: 0x40100C
+# GOT-NEXT:     Access: -32740
+# GOT-NEXT:     Initial: 0x0
+# GOT-NEXT:     Value: 0x0
+# GOT-NEXT:     Type: Function (0x2)
+# GOT-NEXT:     Section: Undefined (0x0)
+# GOT-NEXT:     Name: T1@ (1)
+# GOT-NEXT:   }
+# GOT-NEXT:   Entry {
+# GOT-NEXT:     Address: 0x401010
+# GOT-NEXT:     Access: -32736
+# GOT-NEXT:     Initial: 0x0
+# GOT-NEXT:     Value: 0x0
+# GOT-NEXT:     Type: Function (0x2)
+# GOT-NEXT:     Section: Undefined (0x0)
+# GOT-NEXT:     Name: T2@ (4)
+# GOT-NEXT:   }
+# GOT-NEXT:   Entry {
+# GOT-NEXT:     Address: 0x401014
+# GOT-NEXT:     Access: -32732
+# GOT-NEXT:     Initial: 0x0
+# GOT-NEXT:     Value: 0x0
+# GOT-NEXT:     Type: Object (0x1)
+# GOT-NEXT:     Section: Undefined (0x0)
+# GOT-NEXT:     Name: D1@ (7)
+# GOT-NEXT:   }
+# GOT-NEXT: ]
+
 # so.o
 ---
 FileHeader:

Modified: lld/trunk/test/elf/Mips/rel-dynamic-08.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/Mips/rel-dynamic-08.test?rev=236314&r1=236313&r2=236314&view=diff
==============================================================================
--- lld/trunk/test/elf/Mips/rel-dynamic-08.test (original)
+++ lld/trunk/test/elf/Mips/rel-dynamic-08.test Fri May  1 08:41:45 2015
@@ -11,6 +11,7 @@
 # RUN: lld -flavor gnu -target mipsel -e T0 --noinhibit-exec \
 # RUN:     -o %t.exe %t-o.o %t.so
 # RUN: llvm-readobj -dt -r -sections %t.exe | FileCheck %s
+# RUN: llvm-readobj -mips-plt-got %t.exe | FileCheck -check-prefix=GOT %s
 
 # CHECK:   Sections [
 # CHECK:     Section {
@@ -73,6 +74,47 @@
 # CHECK-NEXT:   }
 # CHECK-NEXT: ]
 
+# GOT:      Local entries [
+# GOT-NEXT: ]
+# GOT-NEXT: Global entries [
+# GOT-NEXT:   Entry {
+# GOT-NEXT:     Address: 0x401008
+# GOT-NEXT:     Access: -32744
+# GOT-NEXT:     Initial: 0x0
+# GOT-NEXT:     Value: 0x0
+# GOT-NEXT:     Type: Object (0x1)
+# GOT-NEXT:     Section: Undefined (0x0)
+# GOT-NEXT:     Name: D2@ (10)
+# GOT-NEXT:   }
+# GOT-NEXT:   Entry {
+# GOT-NEXT:     Address: 0x40100C
+# GOT-NEXT:     Access: -32740
+# GOT-NEXT:     Initial: 0x0
+# GOT-NEXT:     Value: 0x0
+# GOT-NEXT:     Type: Function (0x2)
+# GOT-NEXT:     Section: Undefined (0x0)
+# GOT-NEXT:     Name: T1@ (1)
+# GOT-NEXT:   }
+# GOT-NEXT:   Entry {
+# GOT-NEXT:     Address: 0x401010
+# GOT-NEXT:     Access: -32736
+# GOT-NEXT:     Initial: 0x0
+# GOT-NEXT:     Value: 0x0
+# GOT-NEXT:     Type: Function (0x2)
+# GOT-NEXT:     Section: Undefined (0x0)
+# GOT-NEXT:     Name: T2@ (4)
+# GOT-NEXT:   }
+# GOT-NEXT:   Entry {
+# GOT-NEXT:     Address: 0x401014
+# GOT-NEXT:     Access: -32732
+# GOT-NEXT:     Initial: 0x0
+# GOT-NEXT:     Value: 0x0
+# GOT-NEXT:     Type: Object (0x1)
+# GOT-NEXT:     Section: Undefined (0x0)
+# GOT-NEXT:     Name: D1@ (7)
+# GOT-NEXT:   }
+# GOT-NEXT: ]
+
 # so.o
 ---
 FileHeader:

Modified: lld/trunk/test/elf/Mips/rel-dynamic-12.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/Mips/rel-dynamic-12.test?rev=236314&r1=236313&r2=236314&view=diff
==============================================================================
--- lld/trunk/test/elf/Mips/rel-dynamic-12.test (original)
+++ lld/trunk/test/elf/Mips/rel-dynamic-12.test Fri May  1 08:41:45 2015
@@ -12,6 +12,7 @@
 # RUN: yaml2obj -format=elf -docnum 2 %s > %t-o.o
 # RUN: lld -flavor gnu -target mipsel -e T0 -o %t.exe %t-o.o %t.so
 # RUN: llvm-readobj -dt -r %t.exe | FileCheck -check-prefix=PLT-SYM %s
+# RUN: llvm-readobj -mips-plt-got %t.exe | FileCheck -check-prefix=GOT %s
 
 # PLT-SYM:      Relocations [
 # PLT-SYM-NEXT:   Section (5) .rel.dyn {
@@ -82,6 +83,29 @@
 # PLT-SYM-NEXT:   }
 # PLT-SYM-NEXT: ]
 
+# GOT:      Local entries [
+# GOT-NEXT: ]
+# GOT-NEXT: Global entries [
+# GOT-NEXT:   Entry {
+# GOT-NEXT:     Address: 0x401008
+# GOT-NEXT:     Access: -32744
+# GOT-NEXT:     Initial: 0x0
+# GOT-NEXT:     Value: 0x0
+# GOT-NEXT:     Type: Function (0x2)
+# GOT-NEXT:     Section: Undefined (0x0)
+# GOT-NEXT:     Name: T2@ (7)
+# GOT-NEXT:   }
+# GOT-NEXT:   Entry {
+# GOT-NEXT:     Address: 0x40100C
+# GOT-NEXT:     Access: -32740
+# GOT-NEXT:     Initial: 0x0
+# GOT-NEXT:     Value: 0x0
+# GOT-NEXT:     Type: Object (0x1)
+# GOT-NEXT:     Section: Undefined (0x0)
+# GOT-NEXT:     Name: D2@ (13)
+# GOT-NEXT:   }
+# GOT-NEXT: ]
+
 # so.o
 ---
 FileHeader:





More information about the llvm-commits mailing list