diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2017-02-05 19:38:00 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2017-02-05 19:38:00 +0000 |
| commit | a863509cdddf90a3ec3b23a5b2da6d65b68c4800 (patch) | |
| tree | 3b7aece88aa1d94d3de2b633050e43f3fa030f05 /test | |
| parent | 63b9abd1dbe002d940a818f51dd9d6e585e41c84 (diff) | |
Notes
Diffstat (limited to 'test')
| -rw-r--r-- | test/ELF/basic-mips.s | 36 | ||||
| -rw-r--r-- | test/ELF/eh-frame-hdr-abs-fde.s | 6 | ||||
| -rw-r--r-- | test/ELF/mips-64-disp.s | 17 | ||||
| -rw-r--r-- | test/ELF/mips-64-got.s | 17 | ||||
| -rw-r--r-- | test/ELF/mips-64-rels.s | 2 | ||||
| -rw-r--r-- | test/ELF/mips-got-and-copy.s | 20 | ||||
| -rw-r--r-- | test/ELF/mips-got-extsym.s | 4 | ||||
| -rw-r--r-- | test/ELF/mips-got-hilo.s | 8 | ||||
| -rw-r--r-- | test/ELF/mips-got-redundant.s | 8 | ||||
| -rw-r--r-- | test/ELF/mips-got-relocs.s | 16 | ||||
| -rw-r--r-- | test/ELF/mips-got-weak.s | 24 | ||||
| -rw-r--r-- | test/ELF/mips-got16.s | 22 | ||||
| -rw-r--r-- | test/ELF/mips-gp-ext.s | 8 | ||||
| -rw-r--r-- | test/ELF/mips-gp-lowest.s | 6 | ||||
| -rw-r--r-- | test/ELF/mips-gprel32-relocs-gp0.s | 2 | ||||
| -rw-r--r-- | test/ELF/mips-gprel32-relocs.s | 2 | ||||
| -rw-r--r-- | test/ELF/mips-hilo-gp-disp.s | 30 | ||||
| -rw-r--r-- | test/ELF/mips-n32-rels.s | 2 | ||||
| -rw-r--r-- | test/ELF/mips-options.s | 4 | ||||
| -rw-r--r-- | test/ELF/mips-tls-64.s | 60 | ||||
| -rw-r--r-- | test/ELF/mips-tls-hilo.s | 4 | ||||
| -rw-r--r-- | test/ELF/mips-tls-static.s | 4 | ||||
| -rw-r--r-- | test/ELF/mips-tls.s | 68 | ||||
| -rw-r--r-- | test/ELF/mips-xgot-order.s | 4 | ||||
| -rw-r--r-- | test/ELF/relocatable-common.s | 36 |
25 files changed, 216 insertions, 194 deletions
diff --git a/test/ELF/basic-mips.s b/test/ELF/basic-mips.s index 57181caf4eaf..b143697ce0f8 100644 --- a/test/ELF/basic-mips.s +++ b/test/ELF/basic-mips.s @@ -35,7 +35,7 @@ __start: # CHECK-NEXT: ] # CHECK-NEXT: HeaderSize: 52 # CHECK-NEXT: ProgramHeaderEntrySize: 32 -# CHECK-NEXT: ProgramHeaderCount: 6 +# CHECK-NEXT: ProgramHeaderCount: 5 # CHECK-NEXT: SectionHeaderEntrySize: 40 # CHECK-NEXT: SectionHeaderCount: 11 # CHECK-NEXT: StringTableSectionIndex: 9 @@ -62,8 +62,8 @@ __start: # CHECK-NEXT: Flags [ (0x2) # CHECK-NEXT: SHF_ALLOC (0x2) # CHECK-NEXT: ] -# CHECK-NEXT: Address: 0x100F8 -# CHECK-NEXT: Offset: 0xF8 +# CHECK-NEXT: Address: 0x100D8 +# CHECK-NEXT: Offset: 0xD8 # CHECK-NEXT: Size: 24 # CHECK-NEXT: Link: 0 # CHECK-NEXT: Info: 0 @@ -77,8 +77,8 @@ __start: # CHECK-NEXT: Flags [ (0x2) # CHECK-NEXT: SHF_ALLOC (0x2) # CHECK-NEXT: ] -# CHECK-NEXT: Address: 0x10110 -# CHECK-NEXT: Offset: 0x110 +# CHECK-NEXT: Address: 0x100F0 +# CHECK-NEXT: Offset: 0xF0 # CHECK-NEXT: Size: 24 # CHECK-NEXT: Link: 0 # CHECK-NEXT: Info: 0 @@ -131,7 +131,7 @@ __start: # CHECK-NEXT: Size: 8 # CHECK-NEXT: Link: 0 # CHECK-NEXT: Info: 0 -# CHECK-NEXT: AddressAlignment: 4 +# CHECK-NEXT: AddressAlignment: 16 # CHECK-NEXT: EntrySize: 0 # CHECK-NEXT: } # CHECK-NEXT: Section { @@ -142,7 +142,7 @@ __start: # CHECK-NEXT: SHF_ALLOC (0x2) # CHECK-NEXT: SHF_WRITE (0x1) # CHECK-NEXT: ] -# CHECK-NEXT: Address: 0x40000 +# CHECK-NEXT: Address: 0x30010 # CHECK-NEXT: Offset: 0x20008 # CHECK-NEXT: Size: 0 # CHECK-NEXT: Link: 0 @@ -246,8 +246,8 @@ __start: # CHECK-NEXT: Offset: 0x34 # CHECK-NEXT: VirtualAddress: 0x10034 # CHECK-NEXT: PhysicalAddress: 0x10034 -# CHECK-NEXT: FileSize: 192 -# CHECK-NEXT: MemSize: 192 +# CHECK-NEXT: FileSize: 160 +# CHECK-NEXT: MemSize: 160 # CHECK-NEXT: Flags [ (0x4) # CHECK-NEXT: PF_R (0x4) # CHECK-NEXT: ] @@ -258,8 +258,8 @@ __start: # CHECK-NEXT: Offset: 0x0 # CHECK-NEXT: VirtualAddress: 0x10000 # CHECK-NEXT: PhysicalAddress: 0x10000 -# CHECK-NEXT: FileSize: 296 -# CHECK-NEXT: MemSize: 296 +# CHECK-NEXT: FileSize: 264 +# CHECK-NEXT: MemSize: 264 # CHECK-NEXT: Flags [ (0x4) # CHECK-NEXT: PF_R (0x4) # CHECK-NEXT: ] @@ -284,7 +284,7 @@ __start: # CHECK-NEXT: VirtualAddress: 0x30000 # CHECK-NEXT: PhysicalAddress: 0x30000 # CHECK-NEXT: FileSize: 8 -# CHECK-NEXT: MemSize: 65536 +# CHECK-NEXT: MemSize: 16 # CHECK-NEXT: Flags [ # CHECK-NEXT: PF_R # CHECK-NEXT: PF_W @@ -292,18 +292,6 @@ __start: # CHECK-NEXT: Alignment: 65536 # CHECK-NEXT: } # CHECK-NEXT: ProgramHeader { -# CHECK-NEXT: Type: PT_GNU_RELRO (0x6474E552) -# CHECK-NEXT: Offset: 0x20000 -# CHECK-NEXT: VirtualAddress: 0x30000 -# CHECK-NEXT: PhysicalAddress: 0x30000 -# CHECK-NEXT: FileSize: 8 -# CHECK-NEXT: MemSize: 65536 -# CHECK-NEXT: Flags [ (0x4) -# CHECK-NEXT: PF_R (0x4) -# CHECK-NEXT: ] -# CHECK-NEXT: Alignment: 1 -# CHECK-NEXT: } -# CHECK-NEXT: ProgramHeader { # CHECK-NEXT: Type: PT_GNU_STACK # CHECK-NEXT: Offset: 0x0 # CHECK-NEXT: VirtualAddress: 0x0 diff --git a/test/ELF/eh-frame-hdr-abs-fde.s b/test/ELF/eh-frame-hdr-abs-fde.s index dd0836a0ab72..c3dc862ceb49 100644 --- a/test/ELF/eh-frame-hdr-abs-fde.s +++ b/test/ELF/eh-frame-hdr-abs-fde.s @@ -9,10 +9,10 @@ # REQUIRES: mips # CHECK: Contents of section .eh_frame_hdr: -# CHECK-NEXT: 10148 011b033b 00000010 00000001 0000feb8 -# ^-- 0x20000 - 0x10148 +# CHECK-NEXT: 10128 011b033b 00000010 00000001 0000fed8 +# ^-- 0x20000 - 0x10138 # .text - .eh_frame_hdr -# CHECK-NEXT: 10158 0000002c +# CHECK-NEXT: 10138 0000002c # CHECK: Contents of section .text: # CHECK-NEXT: 20000 00000000 diff --git a/test/ELF/mips-64-disp.s b/test/ELF/mips-64-disp.s index 04dd743d0b56..29b62dcd050a 100644 --- a/test/ELF/mips-64-disp.s +++ b/test/ELF/mips-64-disp.s @@ -18,23 +18,22 @@ # CHECK-NEXT: 20010: 24 42 80 38 addiu $2, $2, -32712 # CHECK: 0000000000020014 .text 00000000 foo -# CHECK: 0000000000047ff0 *ABS* 00000000 .hidden _gp # CHECK: 0000000000020000 .text 00000000 __start # CHECK: 0000000000000000 g F *UND* 00000000 foo1a # GOT: Relocations [ # GOT-NEXT: ] # GOT-NEXT: Primary GOT { -# GOT-NEXT: Canonical gp value: 0x47FF0 +# GOT-NEXT: Canonical gp value: # GOT-NEXT: Reserved entries [ # GOT-NEXT: Entry { -# GOT-NEXT: Address: 0x40000 +# GOT-NEXT: Address: # GOT-NEXT: Access: -32752 # GOT-NEXT: Initial: 0x0 # GOT-NEXT: Purpose: Lazy resolver # GOT-NEXT: } # GOT-NEXT: Entry { -# GOT-NEXT: Address: 0x40008 +# GOT-NEXT: Address: # GOT-NEXT: Access: -32744 # GOT-NEXT: Initial: 0x8000000000000000 # GOT-NEXT: Purpose: Module pointer (GNU extension) @@ -42,29 +41,29 @@ # GOT-NEXT: ] # GOT-NEXT: Local entries [ # GOT-NEXT: Entry { -# GOT-NEXT: Address: 0x40010 +# GOT-NEXT: Address: # GOT-NEXT: Access: -32736 # GOT-NEXT: Initial: 0x20014 # GOT-NEXT: } # GOT-NEXT: Entry { -# GOT-NEXT: Address: 0x40018 +# GOT-NEXT: Address: # GOT-NEXT: Access: -32728 # GOT-NEXT: Initial: 0x20004 # GOT-NEXT: } # GOT-NEXT: Entry { -# GOT-NEXT: Address: 0x40020 +# GOT-NEXT: Address: # GOT-NEXT: Access: -32720 # GOT-NEXT: Initial: 0x20008 # GOT-NEXT: } # GOT-NEXT: Entry { -# GOT-NEXT: Address: 0x40028 +# GOT-NEXT: Address: # GOT-NEXT: Access: -32712 # GOT-NEXT: Initial: 0x2000C # GOT-NEXT: } # GOT-NEXT: ] # GOT-NEXT: Global entries [ # GOT-NEXT: Entry { -# GOT-NEXT: Address: 0x40030 +# GOT-NEXT: Address: # GOT-NEXT: Access: -32704 # GOT-NEXT: Initial: 0x0 # GOT-NEXT: Value: 0x0 diff --git a/test/ELF/mips-64-got.s b/test/ELF/mips-64-got.s index 9bb45c57aa9f..f2b4d5b07ab5 100644 --- a/test/ELF/mips-64-got.s +++ b/test/ELF/mips-64-got.s @@ -19,23 +19,22 @@ # CHECK-NEXT: 20010: 24 42 80 38 addiu $2, $2, -32712 # CHECK: 0000000000020018 .text 00000000 foo -# CHECK: 0000000000047ff0 *ABS* 00000000 .hidden _gp # CHECK: 0000000000020000 .text 00000000 __start # CHECK: 0000000000020014 .text 00000000 bar # GOT: Relocations [ # GOT-NEXT: ] # GOT-NEXT: Primary GOT { -# GOT-NEXT: Canonical gp value: 0x47FF0 +# GOT-NEXT: Canonical gp value: # GOT-NEXT: Reserved entries [ # GOT-NEXT: Entry { -# GOT-NEXT: Address: 0x40000 +# GOT-NEXT: Address: # GOT-NEXT: Access: -32752 # GOT-NEXT: Initial: 0x0 # GOT-NEXT: Purpose: Lazy resolver # GOT-NEXT: } # GOT-NEXT: Entry { -# GOT-NEXT: Address: 0x40008 +# GOT-NEXT: Address: # GOT-NEXT: Access: -32744 # GOT-NEXT: Initial: 0x8000000000000000 # GOT-NEXT: Purpose: Module pointer (GNU extension) @@ -43,29 +42,29 @@ # GOT-NEXT: ] # GOT-NEXT: Local entries [ # GOT-NEXT: Entry { -# GOT-NEXT: Address: 0x40010 +# GOT-NEXT: Address: # GOT-NEXT: Access: -32736 # GOT-NEXT: Initial: 0x20000 # GOT-NEXT: } # GOT-NEXT: Entry { -# GOT-NEXT: Address: 0x40018 +# GOT-NEXT: Address: # GOT-NEXT: Access: -32728 # GOT-NEXT: Initial: 0x30000 # GOT-NEXT: } # GOT-NEXT: Entry { -# GOT-NEXT: Address: 0x40020 +# GOT-NEXT: Address: # GOT-NEXT: Access: -32720 # GOT-NEXT: Initial: 0x20014 # GOT-NEXT: } # GOT-NEXT: Entry { -# GOT-NEXT: Address: 0x40028 +# GOT-NEXT: Address: # GOT-NEXT: Access: -32712 # GOT-NEXT: Initial: 0x20018 # GOT-NEXT: } # GOT-NEXT: ] # GOT-NEXT: Global entries [ # GOT-NEXT: Entry { -# GOT-NEXT: Address: 0x40030 +# GOT-NEXT: Address: # GOT-NEXT: Access: -32704 # GOT-NEXT: Initial: 0x0 # GOT-NEXT: Value: 0x0 diff --git a/test/ELF/mips-64-rels.s b/test/ELF/mips-64-rels.s index b9a3ee738485..93d893aacbde 100644 --- a/test/ELF/mips-64-rels.s +++ b/test/ELF/mips-64-rels.s @@ -20,7 +20,7 @@ # ^-- %lo(0x17ff0) # CHECK: Contents of section .rodata: -# CHECK-NEXT: 10190 ffffffff fffe8014 +# CHECK-NEXT: 10158 ffffffff fffe8014 # ^-- 0x20004 - 0x37ff0 = 0xfffffffffffe8014 # CHECK: 0000000000020004 .text 00000000 loc diff --git a/test/ELF/mips-got-and-copy.s b/test/ELF/mips-got-and-copy.s index 70bb8d388d86..4e3ca5f2804a 100644 --- a/test/ELF/mips-got-and-copy.s +++ b/test/ELF/mips-got-and-copy.s @@ -14,29 +14,29 @@ # CHECK: Relocations [ # CHECK-NEXT: Section (7) .rel.dyn { -# CHECK-NEXT: 0x{{[0-9A-F]+}} R_MIPS_COPY data0 -# CHECK-NEXT: 0x{{[0-9A-F]+}} R_MIPS_COPY data1 +# CHECK-NEXT: 0x[[DATA0:[0-9A-F]+]] R_MIPS_COPY data0 +# CHECK-NEXT: 0x[[DATA1:[0-9A-F]+]] R_MIPS_COPY data1 # CHECK-NEXT: } # CHECK-NEXT: ] # CHECK-NEXT: Primary GOT { -# CHECK-NEXT: Canonical gp value: 0x47FF0 +# CHECK-NEXT: Canonical gp value: # CHECK-NEXT: Reserved entries [ # CHECK: ] # CHECK-NEXT: Local entries [ # CHECK-NEXT: Entry { -# CHECK-NEXT: Address: 0x40008 +# CHECK-NEXT: Address: # CHECK-NEXT: Access: -32744 -# CHECK-NEXT: Initial: 0x50000 +# CHECK-NEXT: Initial: 0x[[DATA0]] # CHECK-NEXT: } # CHECK-NEXT: ] # CHECK-NEXT: Global entries [ # CHECK-NEXT: Entry { -# CHECK-NEXT: Address: 0x4000C +# CHECK-NEXT: Address: # CHECK-NEXT: Access: -32740 -# CHECK-NEXT: Initial: 0x50004 -# CHECK-NEXT: Value: 0x50004 -# CHECK-NEXT: Type: Object (0x1) -# CHECK-NEXT: Section: .bss (0xD) +# CHECK-NEXT: Initial: 0x[[DATA1]] +# CHECK-NEXT: Value: 0x[[DATA1]] +# CHECK-NEXT: Type: Object +# CHECK-NEXT: Section: .bss # CHECK-NEXT: Name: data1@ # CHECK-NEXT: } # CHECK-NEXT: ] diff --git a/test/ELF/mips-got-extsym.s b/test/ELF/mips-got-extsym.s index f9d809c10097..3af4ba07b234 100644 --- a/test/ELF/mips-got-extsym.s +++ b/test/ELF/mips-got-extsym.s @@ -30,7 +30,7 @@ # CHECK: Local entries [ # CHECK-NEXT: Entry { -# CHECK-NEXT: Address: 0x40008 +# CHECK-NEXT: Address: # CHECK-NEXT: Access: -32744 # CHECK-NEXT: Initial: 0x20008 # ^-- bar @@ -38,7 +38,7 @@ # CHECK-NEXT: ] # CHECK-NEXT: Global entries [ # CHECK-NEXT: Entry { -# CHECK-NEXT: Address: 0x4000C +# CHECK-NEXT: Address: # CHECK-NEXT: Access: -32740 # CHECK-NEXT: Initial: 0x0 # CHECK-NEXT: Value: 0x0 diff --git a/test/ELF/mips-got-hilo.s b/test/ELF/mips-got-hilo.s index 26a198115168..fa7e752d9f91 100644 --- a/test/ELF/mips-got-hilo.s +++ b/test/ELF/mips-got-hilo.s @@ -20,22 +20,22 @@ # GOT-NEXT: ] # GOT: Primary GOT { -# GOT-NEXT: Canonical gp value: 0x37FF0 +# GOT-NEXT: Canonical gp value: # GOT: Local entries [ # GOT-NEXT: Entry { -# GOT-NEXT: Address: 0x30008 +# GOT-NEXT: Address: # GOT-NEXT: Access: -32744 # GOT-NEXT: Initial: 0x20000 # GOT-NEXT: } # GOT-NEXT: Entry { -# GOT-NEXT: Address: 0x3000C +# GOT-NEXT: Address: # GOT-NEXT: Access: -32740 # GOT-NEXT: Initial: 0x20004 # GOT-NEXT: } # GOT-NEXT: ] # GOT-NEXT: Global entries [ # GOT-NEXT: Entry { -# GOT-NEXT: Address: 0x30010 +# GOT-NEXT: Address: # GOT-NEXT: Access: -32736 # GOT-NEXT: Initial: 0x0 # GOT-NEXT: Value: 0x0 diff --git a/test/ELF/mips-got-redundant.s b/test/ELF/mips-got-redundant.s index e734aa5b4524..b4c6a2b31a0e 100644 --- a/test/ELF/mips-got-redundant.s +++ b/test/ELF/mips-got-redundant.s @@ -8,25 +8,25 @@ # CHECK: Local entries [ # CHECK-NEXT: Entry { -# CHECK-NEXT: Address: 0x40008 +# CHECK-NEXT: Address: # CHECK-NEXT: Access: -32744 # CHECK-NEXT: Initial: 0x20000 # ^-- loc1 # CHECK-NEXT: } # CHECK-NEXT: Entry { -# CHECK-NEXT: Address: 0x4000C +# CHECK-NEXT: Address: # CHECK-NEXT: Access: -32740 # CHECK-NEXT: Initial: 0x30000 # ^-- loc2, loc3, loc4 # CHECK-NEXT: } # CHECK-NEXT: Entry { -# CHECK-NEXT: Address: 0x40010 +# CHECK-NEXT: Address: # CHECK-NEXT: Access: -32736 # CHECK-NEXT: Initial: 0x40000 # ^-- redundant # CHECK-NEXT: } # CHECK-NEXT: Entry { -# CHECK-NEXT: Address: 0x40014 +# CHECK-NEXT: Address: # CHECK-NEXT: Access: -32732 # CHECK-NEXT: Initial: 0x30008 # ^-- glb1 diff --git a/test/ELF/mips-got-relocs.s b/test/ELF/mips-got-relocs.s index bb4efd039fdc..4471bc210e2d 100644 --- a/test/ELF/mips-got-relocs.s +++ b/test/ELF/mips-got-relocs.s @@ -45,21 +45,21 @@ v1: .word 0 # EXE_SYM: Sections: -# EXE_SYM: .got 0000000c 0000000000040000 DATA +# EXE_SYM: .got 0000000c 0000000000030010 DATA # EXE_SYM: SYMBOL TABLE: -# EXE_SYM: 00047ff0 *ABS* 00000000 .hidden _gp +# EXE_SYM: 00038000 *ABS* 00000000 .hidden _gp # ^-- .got + GP offset (0x7ff0) # EXE_SYM: 00030000 g .data 00000004 v1 # EXE_GOT_BE: Contents of section .got: -# EXE_GOT_BE: 40000 00000000 80000000 00030000 +# EXE_GOT_BE: 30010 00000000 80000000 00030000 # ^ ^ ^-- v1 (0x30000) # | +-- Module pointer (0x80000000) # +-- Lazy resolver (0x0) # EXE_GOT_EL: Contents of section .got: -# EXE_GOT_EL: 40000 00000000 00000080 00000300 +# EXE_GOT_EL: 30010 00000000 00000080 00000300 # ^ ^ ^-- v1 (0x30000) # | +-- Module pointer (0x80000000) # +-- Lazy resolver (0x0) @@ -69,20 +69,20 @@ v1: # EXE_DIS_EL: 20000: 18 80 02 3c lui $2, 32792 # DSO_SYM: Sections: -# DSO_SYM: .got 0000000c 0000000000030000 DATA +# DSO_SYM: .got 0000000c 0000000000020010 DATA # DSO_SYM: SYMBOL TABLE: -# DSO_SYM: 00037ff0 *ABS* 00000000 .hidden _gp +# DSO_SYM: 00028000 *ABS* 00000000 .hidden _gp # ^-- .got + GP offset (0x7ff0) # DSO_SYM: 00020000 g .data 00000004 v1 # DSO_GOT_BE: Contents of section .got: -# DSO_GOT_BE: 30000 00000000 80000000 00020000 +# DSO_GOT_BE: 20010 00000000 80000000 00020000 # ^ ^ ^-- v1 (0x20000) # | +-- Module pointer (0x80000000) # +-- Lazy resolver (0x0) # DSO_GOT_EL: Contents of section .got: -# DSO_GOT_EL: 30000 00000000 00000080 00000200 +# DSO_GOT_EL: 20010 00000000 00000080 00000200 # ^ ^ ^-- v1 (0x20000) # | +-- Module pointer (0x80000000) # +-- Lazy resolver (0x0) diff --git a/test/ELF/mips-got-weak.s b/test/ELF/mips-got-weak.s index f1faf7c3d2d7..e860bb482a2c 100644 --- a/test/ELF/mips-got-weak.s +++ b/test/ELF/mips-got-weak.s @@ -47,16 +47,16 @@ # NOSYM-NEXT: 0x70000013 MIPS_GOTSYM 0x1 # NOSYM: Primary GOT { -# NOSYM-NEXT: Canonical gp value: 0x37FF0 +# NOSYM-NEXT: Canonical gp value: # NOSYM-NEXT: Reserved entries [ # NOSYM-NEXT: Entry { -# NOSYM-NEXT: Address: 0x30000 +# NOSYM-NEXT: Address: # NOSYM-NEXT: Access: -32752 # NOSYM-NEXT: Initial: 0x0 # NOSYM-NEXT: Purpose: Lazy resolver # NOSYM-NEXT: } # NOSYM-NEXT: Entry { -# NOSYM-NEXT: Address: 0x30004 +# NOSYM-NEXT: Address: # NOSYM-NEXT: Access: -32748 # NOSYM-NEXT: Initial: 0x80000000 # NOSYM-NEXT: Purpose: Module pointer (GNU extension) @@ -66,7 +66,7 @@ # NOSYM-NEXT: ] # NOSYM-NEXT: Global entries [ # NOSYM-NEXT: Entry { -# NOSYM-NEXT: Address: 0x30008 +# NOSYM-NEXT: Address: # NOSYM-NEXT: Access: -32744 # NOSYM-NEXT: Initial: 0x20000 # NOSYM-NEXT: Value: 0x20000 @@ -75,7 +75,7 @@ # NOSYM-NEXT: Name: foo # NOSYM-NEXT: } # NOSYM-NEXT: Entry { -# NOSYM-NEXT: Address: 0x3000C +# NOSYM-NEXT: Address: # NOSYM-NEXT: Access: -32740 # NOSYM-NEXT: Initial: 0x0 # NOSYM-NEXT: Value: 0x0 @@ -84,7 +84,7 @@ # NOSYM-NEXT: Name: bar # NOSYM-NEXT: } # NOSYM-NEXT: Entry { -# NOSYM-NEXT: Address: 0x30010 +# NOSYM-NEXT: Address: # NOSYM-NEXT: Access: -32736 # NOSYM-NEXT: Initial: 0x20004 # NOSYM-NEXT: Value: 0x20004 @@ -115,16 +115,16 @@ # SYM-NEXT: 0x70000013 MIPS_GOTSYM 0x3 # SYM: Primary GOT { -# SYM-NEXT: Canonical gp value: 0x37FF0 +# SYM-NEXT: Canonical gp value: # SYM-NEXT: Reserved entries [ # SYM-NEXT: Entry { -# SYM-NEXT: Address: 0x30000 +# SYM-NEXT: Address: # SYM-NEXT: Access: -32752 # SYM-NEXT: Initial: 0x0 # SYM-NEXT: Purpose: Lazy resolver # SYM-NEXT: } # SYM-NEXT: Entry { -# SYM-NEXT: Address: 0x30004 +# SYM-NEXT: Address: # SYM-NEXT: Access: -32748 # SYM-NEXT: Initial: 0x80000000 # SYM-NEXT: Purpose: Module pointer (GNU extension) @@ -132,19 +132,19 @@ # SYM-NEXT: ] # SYM-NEXT: Local entries [ # SYM-NEXT: Entry { -# SYM-NEXT: Address: 0x30008 +# SYM-NEXT: Address: # SYM-NEXT: Access: -32744 # SYM-NEXT: Initial: 0x20000 # SYM-NEXT: } # SYM-NEXT: Entry { -# SYM-NEXT: Address: 0x3000C +# SYM-NEXT: Address: # SYM-NEXT: Access: -32740 # SYM-NEXT: Initial: 0x20004 # SYM-NEXT: } # SYM-NEXT: ] # SYM-NEXT: Global entries [ # SYM-NEXT: Entry { -# SYM-NEXT: Address: 0x30010 +# SYM-NEXT: Address: # SYM-NEXT: Access: -32736 # SYM-NEXT: Initial: 0x0 # SYM-NEXT: Value: 0x0 diff --git a/test/ELF/mips-got16.s b/test/ELF/mips-got16.s index b7e04ad93b3f..6ad7b2b0d46e 100644 --- a/test/ELF/mips-got16.s +++ b/test/ELF/mips-got16.s @@ -29,16 +29,16 @@ # GOT-NEXT: ] # GOT: Primary GOT { -# GOT-NEXT: Canonical gp value: 0x57FF0 +# GOT-NEXT: Canonical gp value: # GOT-NEXT: Reserved entries [ # GOT-NEXT: Entry { -# GOT-NEXT: Address: 0x50000 +# GOT-NEXT: Address: # GOT-NEXT: Access: -32752 # GOT-NEXT: Initial: 0x0 # GOT-NEXT: Purpose: Lazy resolver # GOT-NEXT: } # GOT-NEXT: Entry { -# GOT-NEXT: Address: 0x50004 +# GOT-NEXT: Address: # GOT-NEXT: Access: -32748 # GOT-NEXT: Initial: 0x80000000 # GOT-NEXT: Purpose: Module pointer (GNU extension) @@ -46,44 +46,44 @@ # GOT-NEXT: ] # GOT-NEXT: Local entries [ # GOT-NEXT: Entry { -# GOT-NEXT: Address: 0x50008 +# GOT-NEXT: Address: # GOT-NEXT: Access: -32744 # GOT-NEXT: Initial: 0x10000 # ^-- (0x1002c + 0x8000) & ~0xffff # GOT-NEXT: } # GOT-NEXT: Entry { -# GOT-NEXT: Address: 0x5000C +# GOT-NEXT: Address: # GOT-NEXT: Access: -32740 # GOT-NEXT: Initial: 0x20000 # ^-- redundant unused entry # GOT-NEXT: } # GOT-NEXT: Entry { -# GOT-NEXT: Address: 0x50010 +# GOT-NEXT: Address: # GOT-NEXT: Access: -32736 # GOT-NEXT: Initial: 0x20000 # ^-- redundant unused entry # GOT-NEXT: } # GOT-NEXT: Entry { -# GOT-NEXT: Address: 0x50014 +# GOT-NEXT: Address: # GOT-NEXT: Access: -32732 # GOT-NEXT: Initial: 0x30000 # ^-- (0x29000 + 0x8000) & ~0xffff # GOT-NEXT: } # GOT-NEXT: Entry { -# GOT-NEXT: Address: 0x50018 +# GOT-NEXT: Address: # GOT-NEXT: Access: -32728 # GOT-NEXT: Initial: 0x40000 # ^-- (0x29000 + 0x10004 + 0x8000) & ~0xffff # ^-- (0x29000 + 0x18004 + 0x8000) & ~0xffff # GOT-NEXT: } # GOT-NEXT: Entry { -# GOT-NEXT: Address: 0x5001C +# GOT-NEXT: Address: # GOT-NEXT: Access: -32724 # GOT-NEXT: Initial: 0x50000 # ^-- redundant unused entry # GOT-NEXT: } # GOT-NEXT: Entry { -# GOT-NEXT: Address: 0x50020 +# GOT-NEXT: Address: # GOT-NEXT: Access: -32720 # GOT-NEXT: Initial: 0x41008 # ^-- 'bar' address @@ -91,7 +91,7 @@ # GOT-NEXT: ] # GOT-NEXT: Global entries [ # GOT-NEXT: Entry { -# GOT-NEXT: Address: 0x50024 +# GOT-NEXT: Address: # GOT-NEXT: Access: -32716 # GOT-NEXT: Initial: 0x0 # GOT-NEXT: Value: 0x0 diff --git a/test/ELF/mips-gp-ext.s b/test/ELF/mips-gp-ext.s index 21879986d514..ff459380764c 100644 --- a/test/ELF/mips-gp-ext.s +++ b/test/ELF/mips-gp-ext.s @@ -20,10 +20,10 @@ # REQUIRES: mips # REL: Contents of section .text: -# REL-NEXT: 0000 3c080000 2108010c 8f82fff0 +# REL-NEXT: 0000 3c080000 2108010c 8f82fffc # ^-- %hi(_gp_disp) # ^-- %lo(_gp_disp) -# ^-- 8 - (0x10c - 0xf4) +# ^-- 8 - (0x10c - 0x100) # G - (GP - .got) # REL: Contents of section .reginfo: @@ -40,10 +40,10 @@ # REL: 0000010c *ABS* 00000000 .hidden _gp # ABS: Contents of section .text: -# ABS-NEXT: 0000 3c080000 21080200 8f82fefc +# ABS-NEXT: 0000 3c080000 21080200 8f82ff08 # ^-- %hi(_gp_disp) # ^-- %lo(_gp_disp) -# ^-- 8 - (0x200 - 0xf4) +# ^-- 8 - (0x200 - 0x100) # G - (GP - .got) # ABS: Contents of section .reginfo: diff --git a/test/ELF/mips-gp-lowest.s b/test/ELF/mips-gp-lowest.s index 86c44b0e94e6..32a3e85ee9ec 100644 --- a/test/ELF/mips-gp-lowest.s +++ b/test/ELF/mips-gp-lowest.s @@ -26,7 +26,7 @@ foo: # CHECK-NEXT: SHF_MIPS_GPREL # CHECK-NEXT: SHF_WRITE # CHECK-NEXT: ] -# CHECK-NEXT: Address: 0xDD +# CHECK-NEXT: Address: 0xE0 # CHECK: } # CHECK: Section { # CHECK: Name: .got @@ -40,5 +40,5 @@ foo: # CHECK: } # CHECK: Name: _gp (5) -# CHECK-NEXT: Value: 0x80CD -# ^-- 0xDD + 0x7ff0 +# CHECK-NEXT: Value: 0x80D0 +# ^-- 0xE0 + 0x7ff0 diff --git a/test/ELF/mips-gprel32-relocs-gp0.s b/test/ELF/mips-gprel32-relocs-gp0.s index e71f8856afee..4f1962bd683b 100644 --- a/test/ELF/mips-gprel32-relocs-gp0.s +++ b/test/ELF/mips-gprel32-relocs-gp0.s @@ -22,7 +22,7 @@ # DSO: GP: 0x27FF0 # DUMP: Contents of section .rodata: -# DUMP: 0114 ffff0004 ffff0008 +# DUMP: 00f4 ffff0004 ffff0008 # ^ 0x10004 + 0x7ff0 - 0x27ff0 # ^ 0x10008 + 0x7ff0 - 0x27ff0 diff --git a/test/ELF/mips-gprel32-relocs.s b/test/ELF/mips-gprel32-relocs.s index 993596deedb7..1c877b12b297 100644 --- a/test/ELF/mips-gprel32-relocs.s +++ b/test/ELF/mips-gprel32-relocs.s @@ -21,7 +21,7 @@ v1: .gpword bar # CHECK: Contents of section .rodata: -# CHECK: 0114 fffe8014 fffe8018 +# CHECK: 00f4 fffe8014 fffe8018 # ^ 0x10004 - 0x27ff0 # ^ 0x10008 - 0x27ff0 diff --git a/test/ELF/mips-hilo-gp-disp.s b/test/ELF/mips-hilo-gp-disp.s index 0edc29210914..62e03c7b6760 100644 --- a/test/ELF/mips-hilo-gp-disp.s +++ b/test/ELF/mips-hilo-gp-disp.s @@ -24,32 +24,32 @@ bar: # EXE-NEXT: __start: # EXE-NEXT: 20000: 3c 08 00 02 lui $8, 2 # ^-- %hi(0x47ff0-0x20000) -# EXE-NEXT: 20004: 21 08 7f f0 addi $8, $8, 32752 -# ^-- %lo(0x47ff0-0x20004+4) +# EXE-NEXT: 20004: 21 08 80 00 addi $8, $8, -32768 +# ^-- %lo(0x38000-0x20004+4) # EXE: bar: -# EXE-NEXT: 2000c: 3c 08 00 02 lui $8, 2 -# ^-- %hi(0x47ff0-0x2000c) -# EXE-NEXT: 20010: 21 08 7f e4 addi $8, $8, 32740 -# ^-- %lo(0x47ff0-0x20010+4) +# EXE-NEXT: 2000c: 3c 08 00 01 lui $8, 1 +# ^-- %hi(0x38000-0x2000c) +# EXE-NEXT: 20010: 21 08 7f f4 addi $8, $8, 32756 +# ^-- %lo(0x38000-0x20010+4) # EXE: SYMBOL TABLE: # EXE: 0002000c .text 00000000 bar -# EXE: 00047ff0 *ABS* 00000000 .hidden _gp +# EXE: 00038000 *ABS* 00000000 .hidden _gp # EXE: 00020000 .text 00000000 __start # SO: Disassembly of section .text: # SO-NEXT: __start: # SO-NEXT: 10000: 3c 08 00 02 lui $8, 2 -# ^-- %hi(0x37ff0-0x10000) -# SO-NEXT: 10004: 21 08 7f f0 addi $8, $8, 32752 -# ^-- %lo(0x37ff0-0x10004+4) +# ^-- %hi(0x28000-0x10000) +# SO-NEXT: 10004: 21 08 80 00 addi $8, $8, -32768 +# ^-- %lo(0x28000-0x10004+4) # SO: bar: -# SO-NEXT: 1000c: 3c 08 00 02 lui $8, 2 -# ^-- %hi(0x37ff0-0x1000c) -# SO-NEXT: 10010: 21 08 7f e4 addi $8, $8, 32740 -# ^-- %lo(0x37ff0-0x10010+4) +# SO-NEXT: 1000c: 3c 08 00 01 lui $8, 1 +# ^-- %hi(0x28000-0x1000c) +# SO-NEXT: 10010: 21 08 7f f4 addi $8, $8, 32756 +# ^-- %lo(0x28000-0x10010+4) # SO: SYMBOL TABLE: # SO: 0001000c .text 00000000 bar -# SO: 00037ff0 *ABS* 00000000 .hidden _gp +# SO: 00028000 *ABS* 00000000 .hidden _gp # SO: 00010000 .text 00000000 __start diff --git a/test/ELF/mips-n32-rels.s b/test/ELF/mips-n32-rels.s index 4cf72887785e..7706e2591a33 100644 --- a/test/ELF/mips-n32-rels.s +++ b/test/ELF/mips-n32-rels.s @@ -38,7 +38,7 @@ # ^-- %lo(0x17ff0) # CHECK: Contents of section .rodata: -# CHECK-NEXT: 100f4 00020004 +# CHECK-NEXT: 100d4 00020004 # ^-- loc # CHECK: 00020004 .text 00000000 loc diff --git a/test/ELF/mips-options.s b/test/ELF/mips-options.s index 34bf48898116..edafd09c8da4 100644 --- a/test/ELF/mips-options.s +++ b/test/ELF/mips-options.s @@ -17,11 +17,11 @@ __start: lui $gp, %hi(%neg(%gp_rel(g1))) # CHECK: Name: _gp -# CHECK-NEXT: Value: 0x100008258 +# CHECK-NEXT: Value: 0x[[GP:[0-9A-F]+]] # CHECK: MIPS Options { # CHECK-NEXT: ODK_REGINFO { -# CHECK-NEXT: GP: 0x100008258 +# CHECK-NEXT: GP: 0x[[GP]] # CHECK-NEXT: General Mask: 0x10000001 # CHECK-NEXT: Co-Proc Mask0: 0x0 # CHECK-NEXT: Co-Proc Mask1: 0x0 diff --git a/test/ELF/mips-tls-64.s b/test/ELF/mips-tls-64.s index 39459cf2efac..259dd1f56b02 100644 --- a/test/ELF/mips-tls-64.s +++ b/test/ELF/mips-tls-64.s @@ -23,11 +23,11 @@ # DIS-NEXT: 20010: 24 62 80 58 addiu $2, $3, -32680 # DIS: Contents of section .got: -# DIS-NEXT: 40008 00000000 00000000 80000000 00000000 -# DIS-NEXT: 40018 00000000 00000000 00000000 00000000 -# DIS-NEXT: 40028 00000000 00000000 00000000 00000001 -# DIS-NEXT: 40038 00000000 00000000 00000000 00000001 -# DIS-NEXT: 40048 ffffffff ffff8004 ffffffff ffff9004 +# DIS-NEXT: 30010 00000000 00000000 80000000 00000000 +# DIS-NEXT: 30020 00000000 00000000 00000000 00000000 +# DIS-NEXT: 30030 00000000 00000000 00000000 00000001 +# DIS-NEXT: 30040 00000000 00000000 00000000 00000001 +# DIS-NEXT: 30050 ffffffff ffff8004 ffffffff ffff9004 # DIS: 0000000000040000 l .tdata 00000000 .tdata # DIS: 0000000000040000 l .tdata 00000000 loc @@ -36,13 +36,13 @@ # CHECK: Relocations [ # CHECK-NEXT: Section (7) .rela.dyn { -# CHECK-NEXT: 0x40018 R_MIPS_TLS_DTPMOD64/R_MIPS_NONE/R_MIPS_NONE foo 0x0 -# CHECK-NEXT: 0x40020 R_MIPS_TLS_DTPREL64/R_MIPS_NONE/R_MIPS_NONE foo 0x0 -# CHECK-NEXT: 0x40028 R_MIPS_TLS_TPREL64/R_MIPS_NONE/R_MIPS_NONE foo 0x0 +# CHECK-NEXT: 0x30020 R_MIPS_TLS_DTPMOD64/R_MIPS_NONE/R_MIPS_NONE foo 0x0 +# CHECK-NEXT: 0x30028 R_MIPS_TLS_DTPREL64/R_MIPS_NONE/R_MIPS_NONE foo 0x0 +# CHECK-NEXT: 0x30030 R_MIPS_TLS_TPREL64/R_MIPS_NONE/R_MIPS_NONE foo 0x0 # CHECK-NEXT: } # CHECK-NEXT: ] # CHECK-NEXT: Primary GOT { -# CHECK-NEXT: Canonical gp value: 0x47FF8 +# CHECK-NEXT: Canonical gp value: 0x38000 # CHECK-NEXT: Reserved entries [ # CHECK: ] # CHECK-NEXT: Local entries [ @@ -60,25 +60,25 @@ # ^-- -32680 R_MIPS_TLS_GOTTPREL VA - 0x7000 bar # DIS-SO: Contents of section .got: -# DIS-SO-NEXT: 20008 00000000 00000000 80000000 00000000 -# DIS-SO-NEXT: 20018 00000000 00000000 00000000 00000000 -# DIS-SO-NEXT: 20028 00000000 00000000 00000000 00000000 -# DIS-SO-NEXT: 20038 00000000 00000000 00000000 00000000 -# DIS-SO-NEXT: 20048 00000000 00000000 00000000 00000000 +# DIS-SO-NEXT: 20000 00000000 00000000 80000000 00000000 +# DIS-SO-NEXT: 20010 00000000 00000000 00000000 00000000 +# DIS-SO-NEXT: 20020 00000000 00000000 00000000 00000000 +# DIS-SO-NEXT: 20030 00000000 00000000 00000000 00000000 +# DIS-SO-NEXT: 20040 00000000 00000000 00000000 00000000 # SO: Relocations [ # SO-NEXT: Section (7) .rela.dyn { -# SO-NEXT: 0x20030 R_MIPS_TLS_DTPMOD64/R_MIPS_NONE/R_MIPS_NONE - 0x0 -# SO-NEXT: 0x20040 R_MIPS_TLS_DTPMOD64/R_MIPS_NONE/R_MIPS_NONE bar 0x0 -# SO-NEXT: 0x20048 R_MIPS_TLS_DTPREL64/R_MIPS_NONE/R_MIPS_NONE bar 0x0 -# SO-NEXT: 0x20050 R_MIPS_TLS_TPREL64/R_MIPS_NONE/R_MIPS_NONE bar 0x0 -# SO-NEXT: 0x20018 R_MIPS_TLS_DTPMOD64/R_MIPS_NONE/R_MIPS_NONE foo 0x0 -# SO-NEXT: 0x20020 R_MIPS_TLS_DTPREL64/R_MIPS_NONE/R_MIPS_NONE foo 0x0 -# SO-NEXT: 0x20028 R_MIPS_TLS_TPREL64/R_MIPS_NONE/R_MIPS_NONE foo 0x0 +# SO-NEXT: 0x20028 R_MIPS_TLS_DTPMOD64/R_MIPS_NONE/R_MIPS_NONE - 0x0 +# SO-NEXT: 0x20038 R_MIPS_TLS_DTPMOD64/R_MIPS_NONE/R_MIPS_NONE bar 0x0 +# SO-NEXT: 0x20040 R_MIPS_TLS_DTPREL64/R_MIPS_NONE/R_MIPS_NONE bar 0x0 +# SO-NEXT: 0x20048 R_MIPS_TLS_TPREL64/R_MIPS_NONE/R_MIPS_NONE bar 0x0 +# SO-NEXT: 0x20010 R_MIPS_TLS_DTPMOD64/R_MIPS_NONE/R_MIPS_NONE foo 0x0 +# SO-NEXT: 0x20018 R_MIPS_TLS_DTPREL64/R_MIPS_NONE/R_MIPS_NONE foo 0x0 +# SO-NEXT: 0x20020 R_MIPS_TLS_TPREL64/R_MIPS_NONE/R_MIPS_NONE foo 0x0 # SO-NEXT: } # SO-NEXT: ] # SO-NEXT: Primary GOT { -# SO-NEXT: Canonical gp value: 0x27FF8 +# SO-NEXT: Canonical gp value: 0x27FF0 # SO-NEXT: Reserved entries [ # SO: ] # SO-NEXT: Local entries [ @@ -86,14 +86,14 @@ # SO-NEXT: Global entries [ # SO-NEXT: ] # SO-NEXT: Number of TLS and multi-GOT entries: 8 -# ^-- 0x20018 R_MIPS_TLS_GD R_MIPS_TLS_DTPMOD64 foo -# ^-- 0x20020 R_MIPS_TLS_DTPREL64 foo -# ^-- 0x20028 R_MIPS_TLS_GOTTPREL R_MIPS_TLS_TPREL64 foo -# ^-- 0x20030 R_MIPS_TLS_LDM R_MIPS_TLS_DTPMOD64 loc -# ^-- 0x20038 0 loc -# ^-- 0x20040 R_MIPS_TLS_GD R_MIPS_TLS_DTPMOD64 bar -# ^-- 0x20048 R_MIPS_TLS_DTPREL64 bar -# ^-- 0x20050 R_MIPS_TLS_GOTTPREL R_MIPS_TLS_TPREL64 bar +# ^-- -32736 R_MIPS_TLS_GD R_MIPS_TLS_DTPMOD64 foo +# ^-- -32728 R_MIPS_TLS_DTPREL64 foo +# ^-- -32720 R_MIPS_TLS_GOTTPREL R_MIPS_TLS_TPREL64 foo +# ^-- -32712 R_MIPS_TLS_LDM R_MIPS_TLS_DTPMOD64 loc +# ^-- -32704 0 loc +# ^-- -32696 R_MIPS_TLS_GD R_MIPS_TLS_DTPMOD64 bar +# ^-- -32688 R_MIPS_TLS_DTPREL64 bar +# ^-- -32680 R_MIPS_TLS_GOTTPREL R_MIPS_TLS_TPREL64 bar .text .global __start diff --git a/test/ELF/mips-tls-hilo.s b/test/ELF/mips-tls-hilo.s index 7628cb3a6ec6..fb026a40bbb1 100644 --- a/test/ELF/mips-tls-hilo.s +++ b/test/ELF/mips-tls-hilo.s @@ -21,8 +21,8 @@ # DIS-NEXT: 2000c: 24 62 90 00 addiu $2, $3, -28672 # %lo(loc0 - .tdata - 0x7000) --^ -# DIS: 00030000 l .tdata 00000000 .tdata -# DIS: 00030000 l .tdata 00000000 loc0 +# DIS: 00040000 l .tdata 00000000 .tdata +# DIS: 00040000 l .tdata 00000000 loc0 # CHECK: Relocations [ # CHECK-NEXT: ] diff --git a/test/ELF/mips-tls-static.s b/test/ELF/mips-tls-static.s index c8571a2658e2..84b56cb42240 100644 --- a/test/ELF/mips-tls-static.s +++ b/test/ELF/mips-tls-static.s @@ -10,8 +10,8 @@ # CHECK: Contents of section .data: # CHECK-NEXT: 30000 0002000c ffff8004 ffff9004 # CHECK: Contents of section .got: -# CHECK-NEXT: 40008 00000000 80000000 00000001 ffff8000 -# CHECK-NEXT: 40018 00000001 00000000 ffff9000 +# CHECK-NEXT: 30010 00000000 80000000 00000001 ffff8000 +# CHECK-NEXT: 30020 00000001 00000000 ffff9000 # # CHECK: SYMBOL TABLE: # CHECK: 0002000c .text 00000000 __tls_get_addr diff --git a/test/ELF/mips-tls.s b/test/ELF/mips-tls.s index 7bca4773c995..fd8bab8fa3a2 100644 --- a/test/ELF/mips-tls.s +++ b/test/ELF/mips-tls.s @@ -23,9 +23,9 @@ # DIS-NEXT: 20010: 24 62 80 34 addiu $2, $3, -32716 # DIS: Contents of section .got: -# DIS-NEXT: 40008 00000000 80000000 00000000 00000000 -# DIS-NEXT: 40018 00000000 00000001 00000000 00000001 -# DIS-NEXT: 40028 ffff8004 ffff9004 +# DIS-NEXT: 30010 00000000 80000000 00000000 00000000 +# DIS-NEXT: 30020 00000000 00000001 00000000 00000001 +# DIS-NEXT: 30030 ffff8004 ffff9004 # DIS: 00040000 l .tdata 00000000 .tdata # DIS: 00040000 l .tdata 00000000 loc @@ -34,13 +34,13 @@ # CHECK: Relocations [ # CHECK-NEXT: Section (7) .rel.dyn { -# CHECK-NEXT: 0x40010 R_MIPS_TLS_DTPMOD32 foo 0x0 -# CHECK-NEXT: 0x40014 R_MIPS_TLS_DTPREL32 foo 0x0 -# CHECK-NEXT: 0x40018 R_MIPS_TLS_TPREL32 foo 0x0 +# CHECK-NEXT: 0x30018 R_MIPS_TLS_DTPMOD32 foo 0x0 +# CHECK-NEXT: 0x3001C R_MIPS_TLS_DTPREL32 foo 0x0 +# CHECK-NEXT: 0x30020 R_MIPS_TLS_TPREL32 foo 0x0 # CHECK-NEXT: } # CHECK-NEXT: ] # CHECK-NEXT: Primary GOT { -# CHECK-NEXT: Canonical gp value: 0x47FF8 +# CHECK-NEXT: Canonical gp value: 0x38000 # CHECK-NEXT: Reserved entries [ # CHECK: ] # CHECK-NEXT: Local entries [ @@ -48,33 +48,33 @@ # CHECK-NEXT: Global entries [ # CHECK-NEXT: ] # CHECK-NEXT: Number of TLS and multi-GOT entries: 8 -# ^-- 0x30010 R_MIPS_TLS_GD R_MIPS_TLS_DTPMOD32 foo -# ^-- 0x30014 R_MIPS_TLS_DTPREL32 foo -# ^-- 0x30018 R_MIPS_TLS_GOTTPREL R_MIPS_TLS_TPREL32 foo -# ^-- 0x3001C R_MIPS_TLS_LDM 1 loc -# ^-- 0x30020 0 loc -# ^-- 0x30024 R_MIPS_TLS_GD 1 bar -# ^-- 0x30028 VA - 0x8000 bar -# ^-- 0x3002C R_MIPS_TLS_GOTTPREL VA - 0x7000 bar +# ^-- -32744 R_MIPS_TLS_GD R_MIPS_TLS_DTPMOD32 foo +# ^-- -32740 R_MIPS_TLS_DTPREL32 foo +# ^-- -32736 R_MIPS_TLS_GOTTPREL R_MIPS_TLS_TPREL32 foo +# ^-- -32732 R_MIPS_TLS_LDM 1 loc +# ^-- -32728 0 loc +# ^-- -32724 R_MIPS_TLS_GD 1 bar +# ^-- -32720 VA - 0x8000 bar +# ^-- -32716 R_MIPS_TLS_GOTTPREL VA - 0x7000 bar # DIS-SO: Contents of section .got: -# DIS-SO-NEXT: 20008 00000000 80000000 00000000 00000000 -# DIS-SO-NEXT: 20018 00000000 00000000 00000000 00000000 -# DIS-SO-NEXT: 20028 00000000 00000000 +# DIS-SO-NEXT: 20000 00000000 80000000 00000000 00000000 +# DIS-SO-NEXT: 20010 00000000 00000000 00000000 00000000 +# DIS-SO-NEXT: 20020 00000000 00000000 # SO: Relocations [ # SO-NEXT: Section (7) .rel.dyn { -# SO-NEXT: 0x2001C R_MIPS_TLS_DTPMOD32 - 0x0 -# SO-NEXT: 0x20024 R_MIPS_TLS_DTPMOD32 bar 0x0 -# SO-NEXT: 0x20028 R_MIPS_TLS_DTPREL32 bar 0x0 -# SO-NEXT: 0x2002C R_MIPS_TLS_TPREL32 bar 0x0 -# SO-NEXT: 0x20010 R_MIPS_TLS_DTPMOD32 foo 0x0 -# SO-NEXT: 0x20014 R_MIPS_TLS_DTPREL32 foo 0x0 -# SO-NEXT: 0x20018 R_MIPS_TLS_TPREL32 foo 0x0 +# SO-NEXT: 0x20014 R_MIPS_TLS_DTPMOD32 - 0x0 +# SO-NEXT: 0x2001C R_MIPS_TLS_DTPMOD32 bar 0x0 +# SO-NEXT: 0x20020 R_MIPS_TLS_DTPREL32 bar 0x0 +# SO-NEXT: 0x20024 R_MIPS_TLS_TPREL32 bar 0x0 +# SO-NEXT: 0x20008 R_MIPS_TLS_DTPMOD32 foo 0x0 +# SO-NEXT: 0x2000C R_MIPS_TLS_DTPREL32 foo 0x0 +# SO-NEXT: 0x20010 R_MIPS_TLS_TPREL32 foo 0x0 # SO-NEXT: } # SO-NEXT: ] # SO-NEXT: Primary GOT { -# SO-NEXT: Canonical gp value: 0x27FF8 +# SO-NEXT: Canonical gp value: 0x27FF0 # SO-NEXT: Reserved entries [ # SO: ] # SO-NEXT: Local entries [ @@ -82,14 +82,14 @@ # SO-NEXT: Global entries [ # SO-NEXT: ] # SO-NEXT: Number of TLS and multi-GOT entries: 8 -# ^-- 0x20010 R_MIPS_TLS_GD R_MIPS_TLS_DTPMOD32 foo -# ^-- 0x20014 R_MIPS_TLS_DTPREL32 foo -# ^-- 0x20018 R_MIPS_TLS_GOTTPREL R_MIPS_TLS_TPREL32 foo -# ^-- 0x2001C R_MIPS_TLS_LDM R_MIPS_TLS_DTPMOD32 loc -# ^-- 0x20020 0 loc -# ^-- 0x20024 R_MIPS_TLS_GD R_MIPS_TLS_DTPMOD32 bar -# ^-- 0x20028 R_MIPS_TLS_DTPREL32 bar -# ^-- 0x2002C R_MIPS_TLS_GOTTPREL R_MIPS_TLS_TPREL32 bar +# ^-- -32744 R_MIPS_TLS_GD R_MIPS_TLS_DTPMOD32 foo +# ^-- -32740 R_MIPS_TLS_DTPREL32 foo +# ^-- -32736 R_MIPS_TLS_GOTTPREL R_MIPS_TLS_TPREL32 foo +# ^-- -32732 R_MIPS_TLS_LDM R_MIPS_TLS_DTPMOD32 loc +# ^-- -32728 0 loc +# ^-- -32724 R_MIPS_TLS_GD R_MIPS_TLS_DTPMOD32 bar +# ^-- -32720 R_MIPS_TLS_DTPREL32 bar +# ^-- -32716 R_MIPS_TLS_GOTTPREL R_MIPS_TLS_TPREL32 bar .text .global __start diff --git a/test/ELF/mips-xgot-order.s b/test/ELF/mips-xgot-order.s index b235c0c6b09c..911731c713cd 100644 --- a/test/ELF/mips-xgot-order.s +++ b/test/ELF/mips-xgot-order.s @@ -20,10 +20,10 @@ # CHECK-NEXT: 20018: 20 42 00 00 addi $2, $2, 0 # CHECK: Contents of section .got: -# CHECK-NEXT: 40000 00000000 80000000 00030000 00040000 +# CHECK-NEXT: 30010 00000000 80000000 00030000 00040000 # ^ %hi(loc) # ^ redundant entry -# CHECK-NEXT: 40010 00020010 00020000 00030000 +# CHECK-NEXT: 30020 00020010 00020000 00030000 # ^ %got(bar) # ^ %got_hi/lo(start) # ^ %got_hi/lo(loc) diff --git a/test/ELF/relocatable-common.s b/test/ELF/relocatable-common.s new file mode 100644 index 000000000000..b1b6edba2a36 --- /dev/null +++ b/test/ELF/relocatable-common.s @@ -0,0 +1,36 @@ +# REQUIRES: x86 +# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t1.o +# RUN: ld.lld -r %t1.o -o %t +# RUN: llvm-readobj -symbols -r %t | FileCheck %s +# RUN: ld.lld -r --no-define-common %t1.o -o %t +# RUN: llvm-readobj -symbols -r %t | FileCheck %s +# RUN: ld.lld -r --define-common %t1.o -o %t +# RUN: llvm-readobj -symbols -r %t | FileCheck -check-prefix=DEFCOMM %s +# RUN: ld.lld -r -d %t1.o -o %t +# RUN: llvm-readobj -symbols -r %t | FileCheck -check-prefix=DEFCOMM %s +# RUN: ld.lld -r -dc %t1.o -o %t +# RUN: llvm-readobj -symbols -r %t | FileCheck -check-prefix=DEFCOMM %s +# RUN: ld.lld -r -dp %t1.o -o %t +# RUN: llvm-readobj -symbols -r %t | FileCheck -check-prefix=DEFCOMM %s + +# CHECK: Symbol { +# CHECK: Name: common (1) +# CHECK-NEXT: Value: 0x4 +# CHECK-NEXT: Size: 4 +# CHECK-NEXT: Binding: Global (0x1) +# CHECK-NEXT: Type: Object (0x1) +# CHECK-NEXT: Other: 0 +# CHECK-NEXT: Section: Common (0xFFF2) +# CHECK-NEXT: } + +# DEFCOMM: Symbol { +# DEFCOMM: Name: common (1) +# DEFCOMM-NEXT: Value: 0x0 +# DEFCOMM-NEXT: Size: 4 +# DEFCOMM-NEXT: Binding: Global (0x1) +# DEFCOMM-NEXT: Type: Object (0x1) +# DEFCOMM-NEXT: Other: 0 +# DEFCOMM-NEXT: Section: COMMON (0x2) +# DEFCOMM-NEXT: } + +.comm common,4,4 |
