Index: ELF/Driver.cpp =================================================================== --- ELF/Driver.cpp +++ ELF/Driver.cpp @@ -257,9 +257,13 @@ // This function checks for such errors. static void checkOptions(opt::InputArgList &Args) { // The MIPS ABI as of 2016 does not support the GNU-style symbol lookup - // table which is a relatively new feature. - if (Config->EMachine == EM_MIPS && Config->GnuHash) - error("the .gnu.hash section is not compatible with the MIPS target."); + // table which is a relatively new feature. Other targets defaults to + // both GNU and classic ELF hash styled sections. + if (Config->EMachine == EM_MIPS && Config->GnuHash) { + if (Args.hasArg(OPT_hash_style)) + error("the .gnu.hash section is not compatible with the MIPS target."); + Config->GnuHash = false; + } if (Config->Pie && Config->Shared) error("-shared and -pie may not be used together"); @@ -554,7 +558,7 @@ } static std::pair getHashStyle(opt::InputArgList &Args) { - StringRef S = Args.getLastArgValue(OPT_hash_style, "sysv"); + StringRef S = Args.getLastArgValue(OPT_hash_style, "both"); if (S == "sysv") return {true, false}; if (S == "gnu") Index: test/ELF/aarch64-gnu-ifunc-plt.s =================================================================== --- test/ELF/aarch64-gnu-ifunc-plt.s +++ test/ELF/aarch64-gnu-ifunc-plt.s @@ -9,7 +9,7 @@ // Check that the IRELATIVE relocations are after the JUMP_SLOT in the plt // CHECK: Relocations [ -// CHECK-NEXT: Section (4) .rela.plt { +// CHECK-NEXT: Section ({{.*}}) .rela.plt { // CHECK: 0x30018 R_AARCH64_JUMP_SLOT bar2 0x0 // CHECK-NEXT: 0x30020 R_AARCH64_JUMP_SLOT zed2 0x0 // CHECK-NEXT: 0x30028 R_AARCH64_IRELATIVE - 0x20000 Index: test/ELF/aarch64-got-relocations.s =================================================================== --- test/ELF/aarch64-got-relocations.s +++ test/ELF/aarch64-got-relocations.s @@ -6,7 +6,7 @@ # If we're addressing a global relatively through the GOT, we still need to # emit a relocation for the entry in the GOT itself. # CHECK: Relocations [ -# CHECK: Section (4) .rela.dyn { +# CHECK: Section ({{.*}}) .rela.dyn { # CHECK: 0x{{[0-9A-F]+}} R_AARCH64_RELATIVE - 0x{{[0-9A-F]+}} # CHECK: } # CHECK: ] Index: test/ELF/aarch64-tls-gdie.s =================================================================== --- test/ELF/aarch64-tls-gdie.s +++ test/ELF/aarch64-tls-gdie.s @@ -21,14 +21,14 @@ // SEC-NEXT: SHF_ALLOC // SEC-NEXT: SHF_WRITE // SEC-NEXT: ] -// SEC-NEXT: Address: 0x300B0 +// SEC-NEXT: Address: 0x300C0 -// page(0x300B0) - page(0x20004) = 65536 -// 0x0B0 = 176 +// page(0x300C0) - page(0x20004) = 65536 +// 0x0C0 = 192 // CHECK: _start: // CHECK-NEXT: 20000: {{.*}} nop // CHECK-NEXT: 20004: {{.*}} adrp x0, #65536 -// CHECK-NEXT: 20008: {{.*}} ldr x0, [x0, #176] +// CHECK-NEXT: 20008: {{.*}} ldr x0, [x0, #192] // CHECK-NEXT: 2000c: {{.*}} nop // CHECK-NEXT: 20010: {{.*}} nop Index: test/ELF/aarch64-tls-ie.s =================================================================== --- test/ELF/aarch64-tls-ie.s +++ test/ELF/aarch64-tls-ie.s @@ -15,8 +15,8 @@ #RELOC-NEXT: SHF_ALLOC #RELOC-NEXT: SHF_WRITE #RELOC-NEXT: ] -#RELOC-NEXT: Address: 0x300B0 -#RELOC-NEXT: Offset: 0x200B0 +#RELOC-NEXT: Address: 0x300C0 +#RELOC-NEXT: Offset: 0x200C0 #RELOC-NEXT: Size: 16 #RELOC-NEXT: Link: 0 #RELOC-NEXT: Info: 0 @@ -25,21 +25,21 @@ #RELOC-NEXT: } #RELOC: Relocations [ #RELOC-NEXT: Section ({{.*}}) .rela.dyn { -#RELOC-NEXT: 0x300B8 R_AARCH64_TLS_TPREL64 bar 0x0 -#RELOC-NEXT: 0x300B0 R_AARCH64_TLS_TPREL64 foo 0x0 +#RELOC-NEXT: 0x300C8 R_AARCH64_TLS_TPREL64 bar 0x0 +#RELOC-NEXT: 0x300C0 R_AARCH64_TLS_TPREL64 foo 0x0 #RELOC-NEXT: } #RELOC-NEXT:] -# Page(0x300B0) - Page(0x20000) = 0x10000 = 65536 -# 0x300B0 & 0xff8 = 0xB0 = 176 -# Page(0x300B8) - Page(0x20000) = 0x10000 = 65536 -# 0x300B8 & 0xff8 = 0xB8 = 184 +# Page(0x300C0) - Page(0x20000) = 0x10000 = 65536 +# 0x300C0 & 0xff8 = 192 +# Page(0x300C8) - Page(0x20000) = 0x10000 = 65536 +# 0x300C8 & 0xff8 = 200 #CHECK: Disassembly of section .text: #CHECK: _start: #CHECK: 20000: 80 00 00 90 adrp x0, #65536 -#CHECK: 20004: 00 58 40 f9 ldr x0, [x0, #176] +#CHECK: 20004: 00 60 40 f9 ldr x0, [x0, #192] #CHECK: 20008: 80 00 00 90 adrp x0, #65536 -#CHECK: 2000c: 00 5c 40 f9 ldr x0, [x0, #184] +#CHECK: 2000c: 00 64 40 f9 ldr x0, [x0, #200] .globl _start _start: Index: test/ELF/aarch64-tls-static.s =================================================================== --- test/ELF/aarch64-tls-static.s +++ test/ELF/aarch64-tls-static.s @@ -23,15 +23,15 @@ // SEC-NEXT: SHF_ALLOC // SEC-NEXT: SHF_WRITE // SEC-NEXT: ] -// SEC-NEXT: Address: 0x20098 -// SEC-NEXT: Offset: 0x20098 +// SEC-NEXT: Address: 0x200A8 +// SEC-NEXT: Offset: 0x200A8 // SEC-NEXT: Size: 16 -// page(0x20098) - page(0x10000) = 65536 -// 0x98 = 152 +// page(0x200A8) - page(0x10000) = 65536 +// 0xA8 = 168 // CHECK: foo: // CHECK-NEXT: 10000: {{.*}} adrp x0, #65536 -// CHECK-NEXT: 10004: {{.*}} ldr x1, [x0, #152] -// CHECK-NEXT: 10008: {{.*}} add x0, x0, #152 +// CHECK-NEXT: 10004: {{.*}} ldr x1, [x0, #168] +// CHECK-NEXT: 10008: {{.*}} add x0, x0, #168 // CHECK-NEXT: 1000c: {{.*}} blr x1 Index: test/ELF/aarch64-tlsdesc.s =================================================================== --- test/ELF/aarch64-tlsdesc.s +++ test/ELF/aarch64-tlsdesc.s @@ -16,8 +16,8 @@ // the symbol VMA in tls block. // CHECK: 10000: {{.*}} adrp x0, #65536 -// CHECK-NEXT: 10004: {{.*}} ldr x1, [x0, #144] -// CHECK-NEXT: 10008: {{.*}} add x0, x0, #144 +// CHECK-NEXT: 10004: {{.*}} ldr x1, [x0, #160] +// CHECK-NEXT: 10008: {{.*}} add x0, x0, #160 // CHECK-NEXT: 1000c: {{.*}} blr x1 adrp x0, :tlsdesc:local1 @@ -27,8 +27,8 @@ blr x1 // CHECK: 10010: {{.*}} adrp x0, #65536 -// CHECK-NEXT: 10014: {{.*}} ldr x1, [x0, #160] -// CHECK-NEXT: 10018: {{.*}} add x0, x0, #160 +// CHECK-NEXT: 10014: {{.*}} ldr x1, [x0, #176] +// CHECK-NEXT: 10018: {{.*}} add x0, x0, #176 // CHECK-NEXT: 1001c: {{.*}} blr x1 adrp x0, :tlsdesc:local2 @@ -38,8 +38,8 @@ blr x1 // CHECK: 10020: {{.*}} adrp x0, #65536 -// CHECK-NEXT: 10024: {{.*}} ldr x1, [x0, #176] -// CHECK-NEXT: 10028: {{.*}} add x0, x0, #176 +// CHECK-NEXT: 10024: {{.*}} ldr x1, [x0, #192] +// CHECK-NEXT: 10028: {{.*}} add x0, x0, #192 // CHECK-NEXT: 1002c: {{.*}} blr x1 .section .tbss,"awT",@nobits @@ -56,17 +56,17 @@ .size local2, 8 -// 0x1000 + 4096 + 160 = 0x20A0 -// 0x1000 + 4096 + 176 = 0x20B0 -// 0x1000 + 4096 + 144 = 0x2090 +// 0x1000 + 4096 + 176 = 0x20A0 +// 0x1000 + 4096 + 192 = 0x20B0 +// 0x1000 + 4096 + 160 = 0x2090 // R_AARCH64_TLSDESC - 0x0 -> start of tls block // R_AARCH64_TLSDESC - 0x8 -> align (sizeof (local1), 8) // REL: Relocations [ -// REL-NEXT: Section (4) .rela.dyn { -// REL-NEXT: 0x200A0 R_AARCH64_TLSDESC - 0x0 -// REL-NEXT: 0x200B0 R_AARCH64_TLSDESC - 0x8 -// REL-NEXT: 0x20090 R_AARCH64_TLSDESC a 0x0 +// REL-NEXT: Section ({{.*}}) .rela.dyn { +// REL-NEXT: 0x200B0 R_AARCH64_TLSDESC - 0x0 +// REL-NEXT: 0x200C0 R_AARCH64_TLSDESC - 0x8 +// REL-NEXT: 0x200A0 R_AARCH64_TLSDESC a 0x0 // REL-NEXT: } // REL-NEXT: ] Index: test/ELF/abs-hidden.s =================================================================== --- test/ELF/abs-hidden.s +++ test/ELF/abs-hidden.s @@ -21,8 +21,8 @@ // CHECK-NEXT: AddressAlignment: 4 // CHECK-NEXT: EntrySize: 0 // CHECK-NEXT: SectionData ( -// CHECK-NEXT: 0000: 42000000 00000000 58100000 -// 0x2060 - (0x1000 + 8) = 1058 +// CHECK-NEXT: 0000: 42000000 00000000 68100000 +// 0x2070 - (0x1000 + 8) = 1068 // CHECK-NEXT: ) // CHECK: Name: .got @@ -31,7 +31,7 @@ // CHECK-NEXT: SHF_ALLOC // CHECK-NEXT: SHF_WRITE // CHECK-NEXT: ] -// CHECK-NEXT: Address: 0x2060 +// CHECK-NEXT: Address: 0x2070 // CHECK-NEXT: Offset: // CHECK-NEXT: Size: 8 // CHECK-NEXT: Link: 0 Index: test/ELF/amdgpu-relocs.s =================================================================== --- test/ELF/amdgpu-relocs.s +++ test/ELF/amdgpu-relocs.s @@ -69,9 +69,6 @@ # linker. # CHECK: Relocations [ # CHECK: .rela.dyn { -# CHECK-NEXT: R_AMDGPU_ABS64 common_var0 0x0 -# CHECK-NEXT: R_AMDGPU_ABS64 common_var1 0x0 -# CHECK-NEXT: R_AMDGPU_ABS64 common_var2 0x0 # CHECK-NEXT: R_AMDGPU_ABS64 extern_var0 0x0 # CHECK-NEXT: R_AMDGPU_ABS64 extern_var1 0x0 # CHECK-NEXT: R_AMDGPU_ABS64 extern_var2 0x0 @@ -85,6 +82,9 @@ # CHECK-NEXT: R_AMDGPU_ABS64 weakref_alias_var0 0x0 # CHECK-NEXT: R_AMDGPU_ABS64 weakref_alias_var1 0x0 # CHECK-NEXT: R_AMDGPU_ABS64 weakref_alias_var2 0x0 +# CHECK-NEXT: R_AMDGPU_ABS64 common_var1 0x0 +# CHECK-NEXT: R_AMDGPU_ABS64 common_var2 0x0 +# CHECK-NEXT: R_AMDGPU_ABS64 common_var0 0x0 # CHECK-NEXT: } # CHECK-NEXT: ] Index: test/ELF/arm-copy.s =================================================================== --- test/ELF/arm-copy.s +++ test/ELF/arm-copy.s @@ -33,7 +33,7 @@ // CHECK-NEXT: AddressAlignment: 16 // CHECK: Relocations [ -// CHECK-NEXT: Section (5) .rel.dyn { +// CHECK-NEXT: Section ({{.*}}) .rel.dyn { // CHECK-NEXT: Relocation { // CHECK-NEXT: Offset: 0x13000 // CHECK-NEXT: Type: R_ARM_COPY Index: test/ELF/arm-exidx-shared.s =================================================================== --- test/ELF/arm-exidx-shared.s +++ test/ELF/arm-exidx-shared.s @@ -37,7 +37,7 @@ bx lr // CHECK: Relocations [ -// CHECK-NEXT: Section (6) .rel.plt { +// CHECK-NEXT: Section ({{.*}}) .rel.plt { // CHECK-NEXT: 0x200C R_ARM_JUMP_SLOT __gxx_personality_v0 // CHECK-EXTAB: Contents of section .ARM.extab: Index: test/ELF/arm-gnu-ifunc-plt.s =================================================================== --- test/ELF/arm-gnu-ifunc-plt.s +++ test/ELF/arm-gnu-ifunc-plt.s @@ -9,13 +9,13 @@ // Check that the IRELATIVE relocations are last in the .got // CHECK: Relocations [ -// CHECK-NEXT: Section (4) .rel.dyn { -// CHECK-NEXT: 0x13078 R_ARM_GLOB_DAT bar2 0x0 -// CHECK-NEXT: 0x1307C R_ARM_GLOB_DAT zed2 0x0 -// CHECK-NEXT: 0x13080 R_ARM_IRELATIVE - 0x0 -// CHECK-NEXT: 0x13084 R_ARM_IRELATIVE - 0x0 +// CHECK-NEXT: Section ({{.*}}) .rel.dyn { +// CHECK-NEXT: 0x13080 R_ARM_GLOB_DAT bar2 0x0 +// CHECK-NEXT: 0x13084 R_ARM_GLOB_DAT zed2 0x0 +// CHECK-NEXT: 0x13088 R_ARM_IRELATIVE - 0x0 +// CHECK-NEXT: 0x1308C R_ARM_IRELATIVE - 0x0 // CHECK-NEXT: } -// CHECK-NEXT: Section (5) .rel.plt { +// CHECK-NEXT: Section ({{.*}}) .rel.plt { // CHECK-NEXT: 0x1200C R_ARM_JUMP_SLOT bar2 0x0 // CHECK-NEXT: 0x12010 R_ARM_JUMP_SLOT zed2 0x0 // CHECK-NEXT: } @@ -26,7 +26,7 @@ // GOTPLT-NEXT: 12000 00000000 00000000 00000000 20100100 // GOTPLT-NEXT: 12010 20100100 // GOTPLT: Contents of section .got: -// GOTPLT-NEXT: 13078 00000000 00000000 00100100 04100100 +// GOTPLT-NEXT: 13080 00000000 00000000 00100100 04100100 // DISASM: Disassembly of section .text: // DISASM-NEXT: foo: @@ -69,13 +69,13 @@ // DISASM-NEXT: 11064: 0f c0 8c e0 add r12, r12, pc // DISASM-NEXT: 11068: 00 f0 9c e5 ldr pc, [r12] // DISASM: $d: -// DISASM-NEXT: 1106c: 14 20 00 00 .word 0x00002014 +// DISASM-NEXT: 1106c: 1c 20 00 00 .word 0x0000201c // DISASM: $a: // DISASM-NEXT: 11070: 04 c0 9f e5 ldr r12, [pc, #4] // DISASM-NEXT: 11074: 0f c0 8c e0 add r12, r12, pc // DISASM-NEXT: 11078: 00 f0 9c e5 ldr pc, [r12] // DISASM: $d: -// DISASM-NEXT: 1107c: 08 20 00 00 .word 0x00002008 +// DISASM-NEXT: 1107c: 10 20 00 00 .word 0x00002010 .syntax unified .text Index: test/ELF/arm-got-relative.s =================================================================== --- test/ELF/arm-got-relative.s +++ test/ELF/arm-got-relative.s @@ -28,10 +28,10 @@ bx lr // CHECK: Dynamic Relocations { -// CHECK-NEXT: 0x2048 R_ARM_GLOB_DAT function 0x0 +// CHECK-NEXT: 0x2050 R_ARM_GLOB_DAT function 0x0 // CHECK: Name: _GLOBAL_OFFSET_TABLE_ -// CHECK-NEXT: Value: 0x2048 +// CHECK-NEXT: Value: 0x2050 // CHECK-NEXT: Size: // CHECK-NEXT: Binding: Local // CHECK-NEXT: Type: None @@ -47,7 +47,7 @@ // CODE-NEXT: 1008: 03 00 8f e0 add r0, pc, r3 // CODE-NEXT: 100c: 1e ff 2f e1 bx lr // CODE:$d.1: -// (_GLOBAL_OFFSET_TABLE_ = 0x2048) - (0x1008 + 8) 0x1038 -// CODE-NEXT: 1010: 38 10 00 00 +// (_GLOBAL_OFFSET_TABLE_ = 0x2050) - (0x1008 + 8) 0x1040 +// CODE-NEXT: 1010: 40 10 00 00 // (Got(function) - GotBase = 0x0 // CODE-NEXT: 1014: 00 00 00 00 Index: test/ELF/arm-pie-relative.s =================================================================== --- test/ELF/arm-pie-relative.s +++ test/ELF/arm-pie-relative.s @@ -18,8 +18,8 @@ .word 0 // CHECK: Relocations [ -// CHECK-NEXT: Section (4) .rel.dyn { -// CHECK-NEXT: 0x3058 R_ARM_RELATIVE +// CHECK-NEXT: Section ({{.*}}) .rel.dyn { +// CHECK-NEXT: 0x3060 R_ARM_RELATIVE // GOT: Contents of section .got: -// GOT-NEXT: 3058 00200000 +// GOT-NEXT: 3060 00200000 Index: test/ELF/arm-plt-reloc.s =================================================================== --- test/ELF/arm-plt-reloc.s +++ test/ELF/arm-plt-reloc.s @@ -92,7 +92,7 @@ // DSOREL-NEXT: AddressAlignment: 4 // DSOREL-NEXT: EntrySize: // DSOREL: Relocations [ -// DSOREL-NEXT: Section (4) .rel.plt { +// DSOREL-NEXT: Section ({{.*}}) .rel.plt { // DSOREL-NEXT: 0x200C R_ARM_JUMP_SLOT func1 0x0 // DSOREL-NEXT: 0x2010 R_ARM_JUMP_SLOT func2 0x0 // DSOREL-NEXT: 0x2014 R_ARM_JUMP_SLOT func3 0x0 Index: test/ELF/arm-thumb-plt-reloc.s =================================================================== --- test/ELF/arm-thumb-plt-reloc.s +++ test/ELF/arm-thumb-plt-reloc.s @@ -102,7 +102,7 @@ // DSOREL-NEXT: AddressAlignment: 4 // DSOREL-NEXT: EntrySize: // DSOREL: Relocations [ -// DSOREL-NEXT: Section (4) .rel.plt { +// DSOREL-NEXT: Section ({{.*}}) .rel.plt { // DSOREL-NEXT: 0x200C R_ARM_JUMP_SLOT func1 0x0 // DSOREL-NEXT: 0x2010 R_ARM_JUMP_SLOT func2 0x0 // DSOREL-NEXT: 0x2014 R_ARM_JUMP_SLOT func3 0x0 Index: test/ELF/arm-tls-gd-nonpreemptible.s =================================================================== --- test/ELF/arm-tls-gd-nonpreemptible.s +++ test/ELF/arm-tls-gd-nonpreemptible.s @@ -68,5 +68,5 @@ // CHECK-NEXT: 12018 01000000 08000000 01000000 0c000000 // CHECK-SHARED: Contents of section .got: -// CHECK-SHARED-NEXT: 2050 00000000 00000000 00000000 04000000 -// CHECK-SHARED-NEXT: 2060 00000000 00000000 00000000 00000000 +// CHECK-SHARED-NEXT: 2058 00000000 00000000 00000000 04000000 +// CHECK-SHARED-NEXT: 2068 00000000 00000000 00000000 00000000 Index: test/ELF/arm-tls-gd32.s =================================================================== --- test/ELF/arm-tls-gd32.s +++ test/ELF/arm-tls-gd32.s @@ -80,15 +80,15 @@ // SEC-NEXT: SHF_ALLOC // SEC-NEXT: SHF_WRITE // SEC-NEXT: ] -// SEC-NEXT: Address: 0x204C +// SEC-NEXT: Address: 0x2054 // SEC: Size: 24 // SEC: Dynamic Relocations { -// SEC-NEXT: 0x205C R_ARM_TLS_DTPMOD32 - -// SEC-NEXT: 0x204C R_ARM_TLS_DTPMOD32 x -// SEC-NEXT: 0x2050 R_ARM_TLS_DTPOFF32 x -// SEC-NEXT: 0x2054 R_ARM_TLS_DTPMOD32 y -// SEC-NEXT: 0x2058 R_ARM_TLS_DTPOFF32 y +// SEC-NEXT: 0x2064 R_ARM_TLS_DTPMOD32 - +// SEC-NEXT: 0x2054 R_ARM_TLS_DTPMOD32 x +// SEC-NEXT: 0x2058 R_ARM_TLS_DTPOFF32 x +// SEC-NEXT: 0x205C R_ARM_TLS_DTPMOD32 y +// SEC-NEXT: 0x2060 R_ARM_TLS_DTPOFF32 y // CHECK: Disassembly @@ -97,10 +97,9 @@ // CHECK-NEXT: 1004: 00 f0 20 e3 nop // CHECK-NEXT: 1008: 00 f0 20 e3 nop -// (0x204c - 0x100c) + (0x100c - 0x1000 - 8) = 0x1044 -// CHECK: 100c: 44 10 00 00 -// (0x2054 - 0x1010) + (0x1010 - 0x1004 - 8) = 0x1048 -// CHECK-NEXT: 1010: 48 10 00 00 -// (0x205c - 0x1014) + (0x1014 - 0x1008 - 8) = 0x104c -// CHECK-NEXT: 1014: 4c 10 00 00 - +// (0x2054 - 0x100c) + (0x100c - 0x1000 - 8) = 0x104c +// CHECK: 100c: 4c 10 00 00 +// (0x205c - 0x1010) + (0x1010 - 0x1004 - 8) = 0x1050 +// CHECK-NEXT: 1010: 50 10 00 00 +// (0x2064 - 0x1014) + (0x1014 - 0x1008 - 8) = 0x1054 +// CHECK-NEXT: 1014: 54 10 00 00 Index: test/ELF/arm-tls-ie32.s =================================================================== --- test/ELF/arm-tls-ie32.s +++ test/ELF/arm-tls-ie32.s @@ -73,14 +73,14 @@ // SEC-NEXT: SHF_ALLOC // SEC-NEXT: SHF_WRITE // SEC-NEXT: ] -// SEC-NEXT: Address: 0x204C +// SEC-NEXT: Address: 0x2054 // SEC: Size: 12 // SEC: Dynamic Relocations { -// SEC: 0x2054 R_ARM_TLS_TPOFF32 -// SEC: 0x204C R_ARM_TLS_TPOFF32 x -// SEC: 0x2050 R_ARM_TLS_TPOFF32 y +// SEC: 0x205C R_ARM_TLS_TPOFF32 +// SEC: 0x2054 R_ARM_TLS_TPOFF32 x +// SEC: 0x2058 R_ARM_TLS_TPOFF32 y // CHECK: Disassembly of section .text: // CHECK-NEXT: func: @@ -88,9 +88,9 @@ // CHECK-NEXT: 1004: 00 f0 20 e3 nop // CHECK-NEXT: 1008: 00 f0 20 e3 nop -// (0x204c - 0x100c) + (0x100c - 0x1000 - 8) = 0x1044 -// CHECK: 100c: 44 10 00 00 -// (0x2050 - 0x1010) + (0x1010 - 0x1004 - 8) = 0x1044 -// CHECK-NEXT: 1010: 44 10 00 00 -// (0x2054 - 0x1014) + (0x1014 - 0x1008 - 8) = 0x1044 -// CHECK-NEXT: 1014: 44 10 00 00 +// (0x2054 - 0x100c) + (0x100c - 0x1000 - 8) = 0x104c +// CHECK: 100c: 4c 10 00 00 +// (0x2058 - 0x1010) + (0x1010 - 0x1004 - 8) = 0x104c +// CHECK-NEXT: 1010: 4c 10 00 00 +// (0x205C - 0x1014) + (0x1014 - 0x1008 - 8) = 0x104c +// CHECK-NEXT: 1014: 4c 10 00 00 Index: test/ELF/arm-tls-ldm32.s =================================================================== --- test/ELF/arm-tls-ldm32.s +++ test/ELF/arm-tls-ldm32.s @@ -53,14 +53,14 @@ // SEC: Size: 4 // SEC: Dynamic Relocations { -// SEC-NEXT: 0x204C R_ARM_TLS_DTPMOD32 - 0x0 +// SEC-NEXT: 0x2054 R_ARM_TLS_DTPMOD32 - 0x0 // CHECK: Disassembly of section .text: // CHECK-NEXT: _start: // CHECK-NEXT: 1000: 00 f0 20 e3 nop -// (0x204c - 0x1004) + (0x1004 - 0x1000 - 8) = 0x1044 -// CHECK: 1004: 44 10 00 00 +// (0x2054 - 0x1004) + (0x1004 - 0x1000 - 8) = 0x104c +// CHECK: 1004: 4c 10 00 00 // CHECK-NEXT: 1008: 00 00 00 00 // CHECK-NEXT: 100c: 04 00 00 00 Index: test/ELF/arm-tls-norelax-gd-ie.s =================================================================== --- test/ELF/arm-tls-norelax-gd-ie.s +++ test/ELF/arm-tls-norelax-gd-ie.s @@ -25,6 +25,6 @@ .Lt0: .word y(TLSGD) + (. - .L0 - 8) // CHECK: Dynamic Relocations { -// CHECK-NEXT: 0x13078 R_ARM_TLS_DTPMOD32 y -// CHECK-NEXT: 0x1307C R_ARM_TLS_DTPOFF32 y +// CHECK-NEXT: 0x13080 R_ARM_TLS_DTPMOD32 y +// CHECK-NEXT: 0x13084 R_ARM_TLS_DTPOFF32 y // CHECK-NEXT: 0x1200C R_ARM_JUMP_SLOT __tls_get_addr Index: test/ELF/arm-tls-norelax-gd-le.s =================================================================== --- test/ELF/arm-tls-norelax-gd-le.s +++ test/ELF/arm-tls-norelax-gd-le.s @@ -33,5 +33,5 @@ // CHECK: Contents of section .got: // Module index is always 1 for executable -// CHECK-NEXT: 13060 01000000 00000000 +// CHECK-NEXT: 13068 01000000 00000000 Index: test/ELF/arm-tls-norelax-ie-le.s =================================================================== --- test/ELF/arm-tls-norelax-ie-le.s +++ test/ELF/arm-tls-norelax-ie-le.s @@ -38,4 +38,4 @@ // CHECK: Contents of section .got: // x1 at offset 8 from TP, x2 at offset c from TP. Offsets include TCB size of 8 -// CHECK-NEXT: 13064 08000000 0c000000 +// CHECK-NEXT: 1306c 08000000 0c000000 Index: test/ELF/arm-tls-norelax-ld-le.s =================================================================== --- test/ELF/arm-tls-norelax-ld-le.s +++ test/ELF/arm-tls-norelax-ld-le.s @@ -32,4 +32,4 @@ .word 10 // CHECK: Contents of section .got: -// CHECK-NEXT: 13064 01000000 00000000 +// CHECK-NEXT: 1306c 01000000 00000000 Index: test/ELF/basic-ppc.s =================================================================== --- test/ELF/basic-ppc.s +++ test/ELF/basic-ppc.s @@ -28,15 +28,15 @@ // CHECK-NEXT: Version: 1 // CHECK-NEXT: Entry: 0x1000 // CHECK-NEXT: ProgramHeaderOffset: 0x34 -// CHECK-NEXT: SectionHeaderOffset: 0x20AC +// CHECK-NEXT: SectionHeaderOffset: 0x20C0 // CHECK-NEXT: Flags [ (0x0) // CHECK-NEXT: ] // CHECK-NEXT: HeaderSize: 52 // CHECK-NEXT: ProgramHeaderEntrySize: 32 // CHECK-NEXT: ProgramHeaderCount: 7 // CHECK-NEXT: SectionHeaderEntrySize: 40 -// CHECK-NEXT: SectionHeaderCount: 10 -// CHECK-NEXT: StringTableSectionIndex: 8 +// CHECK-NEXT: SectionHeaderCount: 11 +// CHECK-NEXT: StringTableSectionIndex: 9 // CHECK-NEXT: } // CHECK-NEXT: Sections [ // CHECK-NEXT: Section { @@ -65,7 +65,7 @@ // CHECK-NEXT: Address: 0x114 // CHECK-NEXT: Offset: 0x114 // CHECK-NEXT: Size: 16 -// CHECK-NEXT: Link: 3 +// CHECK-NEXT: Link: 4 // CHECK-NEXT: Info: 1 // CHECK-NEXT: AddressAlignment: 4 // CHECK-NEXT: EntrySize: 16 @@ -75,13 +75,32 @@ // CHECK-NEXT: } // CHECK-NEXT: Section { // CHECK-NEXT: Index: 2 -// CHECK-NEXT: Name: .hash -// CHECK-NEXT: Type: SHT_HASH (0x5) +// CHECK-NEXT: Name: .gnu.hash (9) +// CHECK-NEXT: Type: SHT_GNU_HASH (0x6FFFFFF6) // CHECK-NEXT: Flags [ (0x2) // CHECK-NEXT: SHF_ALLOC (0x2) // CHECK-NEXT: ] // CHECK-NEXT: Address: 0x124 // CHECK-NEXT: Offset: 0x124 +// CHECK-NEXT: Size: 20 +// CHECK-NEXT: Link: 1 +// CHECK-NEXT: Info: 0 +// CHECK-NEXT: AddressAlignment: 4 +// CHECK-NEXT: EntrySize: 0 +// CHECK-NEXT: SectionData ( +// CHECK-NEXT: 0000: 00000000 00000001 00000001 00000005 |................| +// CHECK-NEXT: 0010: 00000000 |....| +// CHECK-NEXT: ) +// CHECK-NEXT: } +// CHECK-NEXT: Section { +// CHECK-NEXT: Index: 3 +// CHECK-NEXT: Name: .hash (19) +// CHECK-NEXT: Type: SHT_HASH (0x5) +// CHECK-NEXT: Flags [ (0x2) +// CHECK-NEXT: SHF_ALLOC (0x2) +// CHECK-NEXT: ] +// CHECK-NEXT: Address: 0x138 +// CHECK-NEXT: Offset: 0x138 // CHECK-NEXT: Size: 16 // CHECK-NEXT: Link: 1 // CHECK-NEXT: Info: 0 @@ -92,14 +111,14 @@ // CHECK-NEXT: ) // CHECK-NEXT: } // CHECK-NEXT: Section { -// CHECK-NEXT: Index: 3 -// CHECK-NEXT: Name: .dynstr +// CHECK-NEXT: Index: 4 +// CHECK-NEXT: Name: .dynstr (25) // CHECK-NEXT: Type: SHT_STRTAB (0x3) // CHECK-NEXT: Flags [ (0x2) // CHECK-NEXT: SHF_ALLOC (0x2) // CHECK-NEXT: ] -// CHECK-NEXT: Address: 0x134 -// CHECK-NEXT: Offset: 0x134 +// CHECK-NEXT: Address: 0x148 +// CHECK-NEXT: Offset: 0x148 // CHECK-NEXT: Size: 1 // CHECK-NEXT: Link: 0 // CHECK-NEXT: Info: 0 @@ -110,8 +129,8 @@ // CHECK-NEXT: ) // CHECK-NEXT: } // CHECK-NEXT: Section { -// CHECK-NEXT: Index: 4 -// CHECK-NEXT: Name: .text +// CHECK-NEXT: Index: 5 +// CHECK-NEXT: Name: .text (33) // CHECK-NEXT: Type: SHT_PROGBITS (0x1) // CHECK-NEXT: Flags [ (0x6) // CHECK-NEXT: SHF_ALLOC (0x2) @@ -129,8 +148,8 @@ // CHECK-NEXT: ) // CHECK-NEXT: } // CHECK-NEXT: Section { -// CHECK-NEXT: Index: 5 -// CHECK-NEXT: Name: .dynamic +// CHECK-NEXT: Index: 6 +// CHECK-NEXT: Name: .dynamic (39) // CHECK-NEXT: Type: SHT_DYNAMIC (0x6) // CHECK-NEXT: Flags [ (0x3) // CHECK-NEXT: SHF_ALLOC (0x2) @@ -138,84 +157,86 @@ // CHECK-NEXT: ] // CHECK-NEXT: Address: 0x2000 // CHECK-NEXT: Offset: 0x2000 -// CHECK-NEXT: Size: 48 -// CHECK-NEXT: Link: 3 +// CHECK-NEXT: Size: 56 +// CHECK-NEXT: Link: 4 // CHECK-NEXT: Info: 0 // CHECK-NEXT: AddressAlignment: 4 // CHECK-NEXT: EntrySize: 8 // CHECK-NEXT: SectionData ( // CHECK-NEXT: 0000: 00000006 00000114 0000000B 00000010 |................| -// CHECK-NEXT: 0010: 00000005 00000134 0000000A 00000001 |.......4........| -// CHECK-NEXT: 0020: 00000004 00000124 00000000 00000000 |.......$........| +// CHECK-NEXT: 0010: 00000005 00000148 0000000A 00000001 |.......H........| +// CHECK-NEXT: 0020: 6FFFFEF5 00000124 00000004 00000138 |o......$.......8| +// CHECK-NEXT: 0030: 00000000 00000000 |........| // CHECK-NEXT: ) // CHECK-NEXT: } // CHECK-NEXT: Section { -// CHECK-NEXT: Index: 6 -// CHECK-NEXT: Name: .comment +// CHECK-NEXT: Index: 7 +// CHECK-NEXT: Name: .comment (48) // CHECK-NEXT: Type: SHT_PROGBITS (0x1) // CHECK-NEXT: Flags [ (0x30) // CHECK-NEXT: SHF_MERGE (0x10) // CHECK-NEXT: SHF_STRINGS (0x20) // CHECK-NEXT: ] // CHECK-NEXT: Address: 0x0 -// CHECK-NEXT: Offset: 0x2030 +// CHECK-NEXT: Offset: 0x2038 // CHECK-NEXT: Size: 8 // CHECK-NEXT: Link: 0 // CHECK-NEXT: Info: 0 // CHECK-NEXT: AddressAlignment: 1 // CHECK-NEXT: EntrySize: 0 // CHECK-NEXT: SectionData ( -// CHECK-NEXT: 0000: 4C4C4420 312E3000 |LLD 1.0.| +// CHECK-NEXT: 0000: 4C4C4420 312E3000 |LLD 1.0.| // CHECK-NEXT: ) // CHECK-NEXT: } // CHECK-NEXT: Section { -// CHECK-NEXT: Index: 7 -// CHECK-NEXT: Name: .symtab +// CHECK-NEXT: Index: 8 +// CHECK-NEXT: Name: .symtab (57) // CHECK-NEXT: Type: SHT_SYMTAB (0x2) // CHECK-NEXT: Flags [ (0x0) // CHECK-NEXT: ] // CHECK-NEXT: Address: 0x0 -// CHECK-NEXT: Offset: 0x2038 +// CHECK-NEXT: Offset: 0x2040 // CHECK-NEXT: Size: 32 -// CHECK-NEXT: Link: 9 +// CHECK-NEXT: Link: 10 // CHECK-NEXT: Info: 2 // CHECK-NEXT: AddressAlignment: 4 // CHECK-NEXT: EntrySize: 16 // CHECK-NEXT: SectionData ( // CHECK-NEXT: 0000: 00000000 00000000 00000000 00000000 |................| -// CHECK-NEXT: 0010: 00000001 00002000 00000000 00020005 |...... .........| +// CHECK-NEXT: 0010: 00000001 00002000 00000000 00020006 |...... .........| // CHECK-NEXT: ) // CHECK-NEXT: } // CHECK-NEXT: Section { -// CHECK-NEXT: Index: 8 -// CHECK-NEXT: Name: .shstrtab +// CHECK-NEXT: Index: 9 +// CHECK-NEXT: Name: .shstrtab (65) // CHECK-NEXT: Type: SHT_STRTAB (0x3) // CHECK-NEXT: Flags [ (0x0) // CHECK-NEXT: ] // CHECK-NEXT: Address: 0x0 -// CHECK-NEXT: Offset: 0x2058 -// CHECK-NEXT: Size: 73 +// CHECK-NEXT: Offset: 0x2060 +// CHECK-NEXT: Size: 83 // CHECK-NEXT: Link: 0 // CHECK-NEXT: Info: 0 // CHECK-NEXT: AddressAlignment: 1 // CHECK-NEXT: EntrySize: 0 // CHECK-NEXT: SectionData ( -// CHECK-NEXT: 0000: 002E6479 6E73796D 002E6861 7368002E |..dynsym..hash..| -// CHECK-NEXT: 0010: 64796E73 7472002E 74657874 002E6479 |dynstr..text..dy| -// CHECK-NEXT: 0020: 6E616D69 63002E63 6F6D6D65 6E74002E |namic..comment..| -// CHECK-NEXT: 0030: 73796D74 6162002E 73687374 72746162 |symtab..shstrtab| -// CHECK-NEXT: 0040: 002E7374 72746162 00 |..strtab.| +// CHECK-NEXT: 0000: 002E6479 6E73796D 002E676E 752E6861 |..dynsym..gnu.ha| +// CHECK-NEXT: 0010: 7368002E 68617368 002E6479 6E737472 |sh..hash..dynstr| +// CHECK-NEXT: 0020: 002E7465 7874002E 64796E61 6D696300 |..text..dynamic.| +// CHECK-NEXT: 0030: 2E636F6D 6D656E74 002E7379 6D746162 |.comment..symtab| +// CHECK-NEXT: 0040: 002E7368 73747274 6162002E 73747274 |..shstrtab..strt| +// CHECK-NEXT: 0050: 616200 |ab.| // CHECK-NEXT: ) // CHECK-NEXT: } // CHECK-NEXT: Section { -// CHECK-NEXT: Index: 9 -// CHECK-NEXT: Name: .strtab +// CHECK-NEXT: Index: 10 +// CHECK-NEXT: Name: .strtab (75) // CHECK-NEXT: Type: SHT_STRTAB (0x3) // CHECK-NEXT: Flags [ (0x0) // CHECK-NEXT: ] // CHECK-NEXT: Address: 0x0 -// CHECK-NEXT: Offset: 0x20A1 -// CHECK-NEXT: Size: 1 +// CHECK-NEXT: Offset: 0x20B3 +// CHECK-NEXT: Size: 10 // CHECK-NEXT: Link: 0 // CHECK-NEXT: Info: 0 // CHECK-NEXT: AddressAlignment: 1 @@ -224,7 +245,7 @@ // CHECK-NEXT: 0000: 005F4459 4E414D49 4300 |._DYNAMIC.| // CHECK-NEXT: ) // CHECK-NEXT: } -// CHECK-NEXT: ] +// CHECK-NEXT: ] // CHECK-NEXT: ProgramHeaders [ // CHECK-NEXT: ProgramHeader { // CHECK-NEXT: Type: PT_PHDR (0x6) @@ -243,8 +264,8 @@ // CHECK-NEXT: Offset: 0x0 // CHECK-NEXT: VirtualAddress: 0x0 // CHECK-NEXT: PhysicalAddress: 0x0 -// CHECK-NEXT: FileSize: 309 -// CHECK-NEXT: MemSize: 309 +// CHECK-NEXT: FileSize: 329 +// CHECK-NEXT: MemSize: 329 // CHECK-NEXT: Flags [ (0x4) // CHECK-NEXT: PF_R (0x4) // CHECK-NEXT: ] @@ -268,8 +289,8 @@ // CHECK-NEXT: Offset: 0x2000 // CHECK-NEXT: VirtualAddress: 0x2000 // CHECK-NEXT: PhysicalAddress: 0x2000 -// CHECK-NEXT: FileSize: 48 -// CHECK-NEXT: MemSize: 48 +// CHECK-NEXT: FileSize: 56 +// CHECK-NEXT: MemSize: 56 // CHECK-NEXT: Flags [ (0x6) // CHECK-NEXT: PF_R (0x4) // CHECK-NEXT: PF_W (0x2) @@ -281,8 +302,8 @@ // CHECK-NEXT: Offset: 0x2000 // CHECK-NEXT: VirtualAddress: 0x2000 // CHECK-NEXT: PhysicalAddress: 0x2000 -// CHECK-NEXT: FileSize: 48 -// CHECK-NEXT: MemSize: 48 +// CHECK-NEXT: FileSize: 56 +// CHECK-NEXT: MemSize: 56 // CHECK-NEXT: Flags [ (0x6) // CHECK-NEXT: PF_R (0x4) // CHECK-NEXT: PF_W (0x2) @@ -294,7 +315,7 @@ // CHECK-NEXT: Offset: 0x2000 // CHECK-NEXT: VirtualAddress: 0x2000 // CHECK-NEXT: PhysicalAddress: 0x2000 -// CHECK-NEXT: FileSize: 48 +// CHECK-NEXT: FileSize: 56 // CHECK-NEXT: MemSize: 4096 // CHECK-NEXT: Flags [ (0x4) // CHECK-NEXT: PF_R (0x4) Index: test/ELF/copy-rel-pie.s =================================================================== --- test/ELF/copy-rel-pie.s +++ test/ELF/copy-rel-pie.s @@ -27,10 +27,10 @@ // CHECK-NEXT: Address: 0x4000 // CHECK: Relocations [ -// CHECK-NEXT: Section (4) .rela.dyn { +// CHECK-NEXT: Section ({{.*}}) .rela.dyn { // CHECK-NEXT: 0x4000 R_X86_64_COPY foo 0x0 // CHECK-NEXT: } -// CHECK-NEXT: Section (5) .rela.plt { +// CHECK-NEXT: Section ({{.*}}) .rela.plt { // CHECK-NEXT: 0x2018 R_X86_64_JUMP_SLOT bar 0x0 // CHECK-NEXT: } // CHECK-NEXT: ] Index: test/ELF/dynamic-got.s =================================================================== --- test/ELF/dynamic-got.s +++ test/ELF/dynamic-got.s @@ -22,7 +22,7 @@ // CHECK: Relocations [ // CHECK-NEXT: Section ({{.*}}) .rel.dyn { -// CHECK-NEXT: 0x2050 R_386_RELATIVE - 0x0 +// CHECK-NEXT: 0x2058 R_386_RELATIVE - 0x0 // CHECK-NEXT: } // CHECK-NEXT: ] Index: test/ELF/dynamic-list-preempt.s =================================================================== --- test/ELF/dynamic-list-preempt.s +++ test/ELF/dynamic-list-preempt.s @@ -25,7 +25,7 @@ # DYNSYMS-NEXT: Section: Undefined # DYNSYMS-NEXT: } # DYNSYMS-NEXT: Symbol { -# DYNSYMS-NEXT: Name: bar@ +# DYNSYMS-NEXT: Name: ext@ # DYNSYMS-NEXT: Value: # DYNSYMS-NEXT: Size: # DYNSYMS-NEXT: Binding: Global @@ -34,7 +34,7 @@ # DYNSYMS-NEXT: Section: # DYNSYMS-NEXT: } # DYNSYMS-NEXT: Symbol { -# DYNSYMS-NEXT: Name: ext@ +# DYNSYMS-NEXT: Name: bar@ # DYNSYMS-NEXT: Value: # DYNSYMS-NEXT: Size: # DYNSYMS-NEXT: Binding: Global Index: test/ELF/dynamic-list.s =================================================================== --- test/ELF/dynamic-list.s +++ test/ELF/dynamic-list.s @@ -38,7 +38,7 @@ # CHECK-NEXT: Binding: Global (0x1) # CHECK-NEXT: Type: None (0x0) # CHECK-NEXT: Other: 0 -# CHECK-NEXT: Section: .text (0x4) +# CHECK-NEXT: Section: .text # CHECK-NEXT: } # CHECK-NEXT: ] @@ -69,25 +69,25 @@ # CHECK2-NEXT: Binding: Global (0x1) # CHECK2-NEXT: Type: None (0x0) # CHECK2-NEXT: Other: 0 -# CHECK2-NEXT: Section: .text (0x4) +# CHECK2-NEXT: Section: .text # CHECK2-NEXT: } # CHECK2-NEXT: Symbol { -# CHECK2-NEXT: Name: foo2@ -# CHECK2-NEXT: Value: 0x201001 +# CHECK2-NEXT: Name: foo31@ +# CHECK2-NEXT: Value: 0x201002 # CHECK2-NEXT: Size: 0 # CHECK2-NEXT: Binding: Global (0x1) # CHECK2-NEXT: Type: None (0x0) # CHECK2-NEXT: Other: 0 -# CHECK2-NEXT: Section: .text (0x4) +# CHECK2-NEXT: Section: .text # CHECK2-NEXT: } # CHECK2-NEXT: Symbol { -# CHECK2-NEXT: Name: foo31@ -# CHECK2-NEXT: Value: 0x201002 +# CHECK2-NEXT: Name: foo2@ +# CHECK2-NEXT: Value: 0x201001 # CHECK2-NEXT: Size: 0 # CHECK2-NEXT: Binding: Global (0x1) # CHECK2-NEXT: Type: None (0x0) # CHECK2-NEXT: Other: 0 -# CHECK2-NEXT: Section: .text (0x4) +# CHECK2-NEXT: Section: .text # CHECK2-NEXT: } # CHECK2-NEXT: ] @@ -113,40 +113,40 @@ # CHECK3-NEXT: Section: Undefined # CHECK3-NEXT: } # CHECK3-NEXT: Symbol { -# CHECK3-NEXT: Name: _start@ -# CHECK3-NEXT: Value: 0x201003 +# CHECK3-NEXT: Name: foo1@ +# CHECK3-NEXT: Value: 0x201000 # CHECK3-NEXT: Size: 0 # CHECK3-NEXT: Binding: Global (0x1) # CHECK3-NEXT: Type: None (0x0) # CHECK3-NEXT: Other: 0 -# CHECK3-NEXT: Section: .text (0x4) +# CHECK3-NEXT: Section: .text # CHECK3-NEXT: } # CHECK3-NEXT: Symbol { -# CHECK3-NEXT: Name: foo1@ -# CHECK3-NEXT: Value: 0x201000 +# CHECK3-NEXT: Name: foo31@ +# CHECK3-NEXT: Value: 0x201002 # CHECK3-NEXT: Size: 0 # CHECK3-NEXT: Binding: Global (0x1) # CHECK3-NEXT: Type: None (0x0) # CHECK3-NEXT: Other: 0 -# CHECK3-NEXT: Section: .text (0x4) +# CHECK3-NEXT: Section: .text # CHECK3-NEXT: } # CHECK3-NEXT: Symbol { -# CHECK3-NEXT: Name: foo2@ -# CHECK3-NEXT: Value: 0x201001 +# CHECK3-NEXT: Name: _start@ +# CHECK3-NEXT: Value: 0x201003 # CHECK3-NEXT: Size: 0 # CHECK3-NEXT: Binding: Global (0x1) # CHECK3-NEXT: Type: None (0x0) # CHECK3-NEXT: Other: 0 -# CHECK3-NEXT: Section: .text (0x4) +# CHECK3-NEXT: Section: .text # CHECK3-NEXT: } # CHECK3-NEXT: Symbol { -# CHECK3-NEXT: Name: foo31@ -# CHECK3-NEXT: Value: 0x201002 +# CHECK3-NEXT: Name: foo2@ +# CHECK3-NEXT: Value: 0x201001 # CHECK3-NEXT: Size: 0 # CHECK3-NEXT: Binding: Global (0x1) # CHECK3-NEXT: Type: None (0x0) # CHECK3-NEXT: Other: 0 -# CHECK3-NEXT: Section: .text (0x4) +# CHECK3-NEXT: Section: .text # CHECK3-NEXT: } # CHECK3-NEXT: ] Index: test/ELF/dynamic-reloc.s =================================================================== --- test/ELF/dynamic-reloc.s +++ test/ELF/dynamic-reloc.s @@ -53,6 +53,7 @@ // CHECK-NEXT: 0x000000000000000B SYMENT 24 (bytes) // CHECK-NEXT: 0x0000000000000005 STRTAB // CHECK-NEXT: 0x000000000000000A STRSZ +// CHECK-NEXT: 0x000000006FFFFEF5 GNU_HASH 0x200210 // CHECK-NEXT: 0x0000000000000004 HASH // CHECK-NEXT: 0x0000000000000000 NULL 0x0 // CHECK-NEXT: ] Index: test/ELF/eh-align-cie.s =================================================================== --- test/ELF/eh-align-cie.s +++ test/ELF/eh-align-cie.s @@ -51,7 +51,7 @@ // CHECK-NEXT: EntrySize: // CHECK-NEXT: SectionData ( // CHECK-NEXT: 0000: 1C000000 00000000 017A5052 00017810 -// CHECK-NEXT: 0010: 061BF60D 00001B0C 07089001 00000000 -// CHECK-NEXT: 0020: 14000000 24000000 E00D0000 00000000 +// CHECK-NEXT: 0010: 061BDE0D 00001B0C 07089001 00000000 +// CHECK-NEXT: 0020: 14000000 24000000 C80D0000 00000000 // CHECK-NEXT: 0030: 00000000 00000000 // CHECK-NEXT: ) Index: test/ELF/eh-frame-hdr-augmentation.s =================================================================== --- test/ELF/eh-frame-hdr-augmentation.s +++ test/ELF/eh-frame-hdr-augmentation.s @@ -18,7 +18,7 @@ // CHECK-NEXT: DW_CFA_nop: // CHECK-NEXT: DW_CFA_nop: -// CHECK: 00000020 00000014 00000024 FDE cie=00000024 pc=00000d98...00000d98 +// CHECK: 00000020 00000014 00000024 FDE cie=00000024 pc=00000d80...00000d80 // CHECK-NEXT: DW_CFA_nop: // CHECK-NEXT: DW_CFA_nop: // CHECK-NEXT: DW_CFA_nop: Index: test/ELF/eh-frame-merge.s =================================================================== --- test/ELF/eh-frame-merge.s +++ test/ELF/eh-frame-merge.s @@ -35,10 +35,10 @@ // CHECK-NEXT: SectionData ( // CHECK-NEXT: 0000: 14000000 00000000 017A5200 01781001 | // CHECK-NEXT: 0010: 1B0C0708 90010000 14000000 1C000000 | -// CHECK-NEXT: 0020: E80D0000 01000000 00000000 00000000 | -// CHECK-NEXT: 0030: 14000000 34000000 D20D0000 02000000 | +// CHECK-NEXT: 0020: D00D0000 01000000 00000000 00000000 | +// CHECK-NEXT: 0030: 14000000 34000000 BA0D0000 02000000 | // CHECK-NEXT: 0040: 00000000 00000000 14000000 4C000000 | -// CHECK-NEXT: 0050: B90D0000 01000000 00000000 00000000 | +// CHECK-NEXT: 0050: A10D0000 01000000 00000000 00000000 | // CHECK-NEXT: ) // CHECK: Name: foo Index: test/ELF/eh-frame-padding-no-rosegment.s =================================================================== --- test/ELF/eh-frame-padding-no-rosegment.s +++ test/ELF/eh-frame-padding-no-rosegment.s @@ -58,7 +58,7 @@ // CHECK-NEXT: EntrySize: // CHECK-NEXT: SectionData ( // CHECK-NEXT: 0000: 1C000000 00000000 017A5052 00017810 -// CHECK-NEXT: 0010: 061BBEFF FFFF1B0C 07089001 00000000 -// CHECK-NEXT: 0020: 14000000 24000000 A8FFFFFF 00000000 +// CHECK-NEXT: 0010: 061BA6FF FFFF1B0C 07089001 00000000 +// CHECK-NEXT: 0020: 14000000 24000000 90FFFFFF 00000000 // CHECK-NEXT: 0030: 00000000 00000000 // CHECK-NEXT: ) Index: test/ELF/emit-relocs-shared.s =================================================================== --- test/ELF/emit-relocs-shared.s +++ test/ELF/emit-relocs-shared.s @@ -7,10 +7,10 @@ .quad foo # CHECK: Relocations [ -# CHECK-NEXT: Section (4) .rela.dyn { +# CHECK-NEXT: Section ({{.*}}) .rela.dyn { # CHECK-NEXT: 0x1000 R_X86_64_64 foo 0x0 # CHECK-NEXT: } -# CHECK-NEXT: Section (8) .rela.data { +# CHECK-NEXT: Section ({{.*}}) .rela.data { # CHECK-NEXT: 0x1000 R_X86_64_64 foo 0x0 # CHECK-NEXT: } # CHECK-NEXT: ] Index: test/ELF/global-offset-table-position-aarch64.s =================================================================== --- test/ELF/global-offset-table-position-aarch64.s +++ test/ELF/global-offset-table-position-aarch64.s @@ -20,7 +20,7 @@ .long _GLOBAL_OFFSET_TABLE_ - . // CHECK: Name: _GLOBAL_OFFSET_TABLE_ (11) -// CHECK-NEXT: Value: 0x30090 +// CHECK-NEXT: Value: 0x300A0 // CHECK-NEXT: Size: 0 // CHECK-NEXT: Binding: Local (0x0) // CHECK-NEXT: Type: None (0x0) Index: test/ELF/global-offset-table-position-arm.s =================================================================== --- test/ELF/global-offset-table-position-arm.s +++ test/ELF/global-offset-table-position-arm.s @@ -25,7 +25,7 @@ .data // CHECK: Name: _GLOBAL_OFFSET_TABLE_ -// CHECK-NEXT: Value: 0x3068 +// CHECK-NEXT: Value: 0x3070 // CHECK-NEXT: Size: 0 // CHECK-NEXT: Binding: Local // CHECK-NEXT: Type: None Index: test/ELF/global-offset-table-position-i386.s =================================================================== --- test/ELF/global-offset-table-position-i386.s +++ test/ELF/global-offset-table-position-i386.s @@ -21,11 +21,11 @@ calll f@PLT // CHECK: Name: _GLOBAL_OFFSET_TABLE_ (1) -// CHECK-NEXT: Value: 0x306C +// CHECK-NEXT: Value: 0x3074 // CHECK-NEXT: Size: 0 // CHECK-NEXT: Binding: Local (0x0) // CHECK-NEXT: Type: None (0x0) // CHECK-NEXT: Other [ (0x2) // CHECK-NEXT: STV_HIDDEN (0x2) // CHECK-NEXT: ] -// CHECK-NEXT: Section: .got (0xA) +// CHECK-NEXT: Section: .got (0xB) Index: test/ELF/global-offset-table-position.s =================================================================== --- test/ELF/global-offset-table-position.s +++ test/ELF/global-offset-table-position.s @@ -21,7 +21,7 @@ .long _GLOBAL_OFFSET_TABLE_ - . // CHECK: Name: _GLOBAL_OFFSET_TABLE_ -// CHECK-NEXT: Value: 0x30D8 +// CHECK-NEXT: Value: 0x30E8 // CHECK-NEXT: Size: 0 // CHECK-NEXT: Binding: Local // CHECK-NEXT: Type: None (0x0) Index: test/ELF/global_offset_table_shared.s =================================================================== --- test/ELF/global_offset_table_shared.s +++ test/ELF/global_offset_table_shared.s @@ -4,7 +4,7 @@ .long _GLOBAL_OFFSET_TABLE_ - . // CHECK: Name: _GLOBAL_OFFSET_TABLE_ -// CHECK-NEXT: Value: 0x2060 +// CHECK-NEXT: Value: 0x2070 // CHECK-NEXT: Size: 0 // CHECK-NEXT: Binding: Local // CHECK-NEXT: Type: None Index: test/ELF/gnu-ifunc-gotpcrel.s =================================================================== --- test/ELF/gnu-ifunc-gotpcrel.s +++ test/ELF/gnu-ifunc-gotpcrel.s @@ -6,7 +6,7 @@ # RUN: llvm-readobj -dyn-relocations %t | FileCheck %s # CHECK: Dynamic Relocations { -# CHECK-NEXT: 0x2020B0 R_X86_64_GLOB_DAT foo 0x0 +# CHECK-NEXT: 0x2020C0 R_X86_64_GLOB_DAT foo 0x0 # CHECK-NEXT: } .globl _start Index: test/ELF/gnu-ifunc-plt-i386.s =================================================================== --- test/ELF/gnu-ifunc-plt-i386.s +++ test/ELF/gnu-ifunc-plt-i386.s @@ -9,7 +9,7 @@ // Check that the IRELATIVE relocations are after the JUMP_SLOT in the plt // CHECK: Relocations [ -// CHECK-NEXT: Section (4) .rel.plt { +// CHECK-NEXT: Section ({{.*}}) .rel.plt { // CHECK-NEXT: 0x1200C R_386_JUMP_SLOT bar2 // CHECK-NEXT: 0x12010 R_386_JUMP_SLOT zed2 // CHECK-NEXT: 0x12014 R_386_IRELATIVE Index: test/ELF/gnu-ifunc-plt.s =================================================================== --- test/ELF/gnu-ifunc-plt.s +++ test/ELF/gnu-ifunc-plt.s @@ -9,7 +9,7 @@ // Check that the IRELATIVE relocations are after the JUMP_SLOT in the plt // CHECK: Relocations [ -// CHECK-NEXT: Section (4) .rela.plt { +// CHECK-NEXT: Section ({{.*}}) .rela.plt { // CHECK-NEXT: 0x202018 R_X86_64_JUMP_SLOT bar2 0x0 // CHECK-NEXT: 0x202020 R_X86_64_JUMP_SLOT zed2 0x0 // CHECK-NEXT: 0x202028 R_X86_64_IRELATIVE - 0x201000 Index: test/ELF/gnu-ifunc-shared.s =================================================================== --- test/ELF/gnu-ifunc-shared.s +++ test/ELF/gnu-ifunc-shared.s @@ -34,7 +34,7 @@ // DISASM-NEXT: 105b: e9 e0 ff ff ff jmp -32 <.plt+0x20> // CHECK: Relocations [ -// CHECK-NEXT: Section (4) .rela.plt { +// CHECK-NEXT: Section ({{.*}}) .rela.plt { // CHECK-NEXT: 0x2018 R_X86_64_JUMP_SLOT fct2 0x0 // CHECK-NEXT: 0x2020 R_X86_64_JUMP_SLOT f2 0x0 // CHECK-NEXT: 0x2028 R_X86_64_IRELATIVE - 0x1000 Index: test/ELF/got-aarch64.s =================================================================== --- test/ELF/got-aarch64.s +++ test/ELF/got-aarch64.s @@ -10,7 +10,7 @@ // CHECK-NEXT: SHF_ALLOC // CHECK-NEXT: SHF_WRITE // CHECK-NEXT: ] -// CHECK-NEXT: Address: 0x30090 +// CHECK-NEXT: Address: 0x300A0 // CHECK-NEXT: Offset: // CHECK-NEXT: Size: 8 // CHECK-NEXT: Link: 0 @@ -19,16 +19,16 @@ // CHECK: Relocations [ // CHECK-NEXT: Section ({{.*}}) .rela.dyn { -// CHECK-NEXT: 0x30090 R_AARCH64_GLOB_DAT dat 0x0 +// CHECK-NEXT: 0x300A0 R_AARCH64_GLOB_DAT dat 0x0 // CHECK-NEXT: } // CHECK-NEXT: ] // Page(0x20098) - Page(0x10000) = 0x10000 = 65536 -// 0x20098 & 0xff8 = 0x98 = 152 +// 0x300A0 & 0xff8 = 0xA0 = 160 // DISASM: main: -// DISASM-NEXT: 10000: 00 01 00 90 adrp x0, #131072 -// DISASM-NEXT: 10004: 00 48 40 f9 ldr x0, [x0, #144] +// DISASM-NEXT: 10000: 00 01 00 90 adrp x0, #131072 +// DISASM-NEXT: 10004: 00 50 40 f9 ldr x0, [x0, #160] .global main,foo,dat .text Index: test/ELF/got.s =================================================================== --- test/ELF/got.s +++ test/ELF/got.s @@ -12,7 +12,7 @@ // CHECK-NEXT: SHF_ALLOC // CHECK-NEXT: SHF_WRITE // CHECK-NEXT: ] -// CHECK-NEXT: Address: 0x2020B0 +// CHECK-NEXT: Address: 0x2020C0 // CHECK-NEXT: Offset: // CHECK-NEXT: Size: 16 // CHECK-NEXT: Link: 0 @@ -21,22 +21,22 @@ // CHECK: Relocations [ // CHECK-NEXT: Section ({{.*}}) .rela.dyn { -// CHECK-NEXT: 0x2020B0 R_X86_64_GLOB_DAT bar 0x0 -// CHECK-NEXT: 0x2020B8 R_X86_64_GLOB_DAT zed 0x0 +// CHECK-NEXT: 0x2020C0 R_X86_64_GLOB_DAT bar 0x0 +// CHECK-NEXT: 0x2020C8 R_X86_64_GLOB_DAT zed 0x0 // CHECK-NEXT: } // CHECK-NEXT: ] // Unfortunately FileCheck can't do math, so we have to check for explicit // values: -// 0x2020B0 - (0x201000 + 2) - 4 = 4266 -// 0x2020B0 - (0x201006 + 2) - 4 = 4260 -// 0x2020A8 - (0x20100c + 2) - 4 = 4262 +// 0x2020C8 - (0x201000 + 2) - 4 = 4282 +// 0x2020C8 - (0x201006 + 2) - 4 = 4276 +// 0x2020C0 - (0x20100c + 2) - 4 = 4278 // DISASM: _start: -// DISASM-NEXT: 201000: {{.*}} jmpq *4266(%rip) -// DISASM-NEXT: 201006: {{.*}} jmpq *4260(%rip) -// DISASM-NEXT: 20100c: {{.*}} jmpq *4262(%rip) +// DISASM-NEXT: 201000: {{.*}} jmpq *4282(%rip) +// DISASM-NEXT: 201006: {{.*}} jmpq *4276(%rip) +// DISASM-NEXT: 20100c: {{.*}} jmpq *4278(%rip) .global _start _start: Index: test/ELF/gotpc-relax-nopic.s =================================================================== --- test/ELF/gotpc-relax-nopic.s +++ test/ELF/gotpc-relax-nopic.s @@ -36,8 +36,8 @@ # SEC-PIC-NEXT: SHF_ALLOC # SEC-PIC-NEXT: SHF_WRITE # SEC-PIC-NEXT: ] -# SEC-PIC-NEXT: Address: 0x30A0 -# SEC-PIC-NEXT: Offset: 0x30A0 +# SEC-PIC-NEXT: Address: 0x30B0 +# SEC-PIC-NEXT: Offset: 0x30B0 # SEC-PIC-NEXT: Size: 8 # SEC-PIC-NEXT: Link: # SEC-PIC-NEXT: Info: @@ -46,25 +46,25 @@ # SEC-PIC-NEXT: } # SEC-PIC: Relocations [ # SEC-PIC-NEXT: Section ({{.*}}) .rela.dyn { -# SEC-PIC-NEXT: 0x30A0 R_X86_64_RELATIVE - 0x2000 +# SEC-PIC-NEXT: 0x30B0 R_X86_64_RELATIVE - 0x2000 # SEC-PIC-NEXT: } # SEC-PIC-NEXT: ] # SEC-PIC: 0x000000006FFFFFF9 RELACOUNT 1 ## Check that there was no relaxation performed. All values refer to got entry. -## Ex: 0x1000 + 4249 + 7 = 0x20A0 -## 0x102a + 4207 + 7 = 0x20A0 +## Ex: 0x1000 + 8361 + 7 = 0x30B0 +## 0x102a + 8319 + 7 = 0x30B0 # DISASM-PIC: Disassembly of section .text: # DISASM-PIC-NEXT: _start: -# DISASM-PIC-NEXT: 1000: {{.*}} adcq 8345(%rip), %rax -# DISASM-PIC-NEXT: 1007: {{.*}} addq 8338(%rip), %rbx -# DISASM-PIC-NEXT: 100e: {{.*}} andq 8331(%rip), %rcx -# DISASM-PIC-NEXT: 1015: {{.*}} cmpq 8324(%rip), %rdx -# DISASM-PIC-NEXT: 101c: {{.*}} orq 8317(%rip), %rdi -# DISASM-PIC-NEXT: 1023: {{.*}} sbbq 8310(%rip), %rsi -# DISASM-PIC-NEXT: 102a: {{.*}} subq 8303(%rip), %rbp -# DISASM-PIC-NEXT: 1031: {{.*}} xorq 8296(%rip), %r8 -# DISASM-PIC-NEXT: 1038: {{.*}} testq 8289(%rip), %r15 +# DISASM-PIC-NEXT: 1000: {{.*}} adcq 8361(%rip), %rax +# DISASM-PIC-NEXT: 1007: {{.*}} addq 8354(%rip), %rbx +# DISASM-PIC-NEXT: 100e: {{.*}} andq 8347(%rip), %rcx +# DISASM-PIC-NEXT: 1015: {{.*}} cmpq 8340(%rip), %rdx +# DISASM-PIC-NEXT: 101c: {{.*}} orq 8333(%rip), %rdi +# DISASM-PIC-NEXT: 1023: {{.*}} sbbq 8326(%rip), %rsi +# DISASM-PIC-NEXT: 102a: {{.*}} subq 8319(%rip), %rbp +# DISASM-PIC-NEXT: 1031: {{.*}} xorq 8312(%rip), %r8 +# DISASM-PIC-NEXT: 1038: {{.*}} testq 8305(%rip), %r15 .data .type bar, @object Index: test/ELF/gotpc-relax-und-dso.s =================================================================== --- test/ELF/gotpc-relax-und-dso.s +++ test/ELF/gotpc-relax-und-dso.s @@ -8,9 +8,9 @@ # RELOC: Relocations [ # RELOC-NEXT: Section ({{.*}}) .rela.dyn { -# RELOC-NEXT: R_X86_64_GLOB_DAT dsofoo 0x0 -# RELOC-NEXT: R_X86_64_GLOB_DAT foo 0x0 # RELOC-NEXT: R_X86_64_GLOB_DAT und 0x0 +# RELOC-NEXT: R_X86_64_GLOB_DAT foo 0x0 +# RELOC-NEXT: R_X86_64_GLOB_DAT dsofoo 0x0 # RELOC-NEXT: } # RELOC-NEXT: ] @@ -22,22 +22,22 @@ # DISASM: hid: # DISASM-NEXT: nop # DISASM: _start: -# DISASM-NEXT: movq 4247(%rip), %rax -# DISASM-NEXT: movq 4240(%rip), %rax -# DISASM-NEXT: movq 4241(%rip), %rax -# DISASM-NEXT: movq 4234(%rip), %rax +# DISASM-NEXT: movq 4263(%rip), %rax +# DISASM-NEXT: movq 4256(%rip), %rax +# DISASM-NEXT: movq 4257(%rip), %rax +# DISASM-NEXT: movq 4250(%rip), %rax # DISASM-NEXT: leaq -36(%rip), %rax # DISASM-NEXT: leaq -43(%rip), %rax -# DISASM-NEXT: movq 4221(%rip), %rax -# DISASM-NEXT: movq 4214(%rip), %rax -# DISASM-NEXT: movq 4191(%rip), %rax -# DISASM-NEXT: movq 4184(%rip), %rax -# DISASM-NEXT: movq 4185(%rip), %rax -# DISASM-NEXT: movq 4178(%rip), %rax +# DISASM-NEXT: movq 4237(%rip), %rax +# DISASM-NEXT: movq 4230(%rip), %rax +# DISASM-NEXT: movq 4207(%rip), %rax +# DISASM-NEXT: movq 4200(%rip), %rax +# DISASM-NEXT: movq 4201(%rip), %rax +# DISASM-NEXT: movq 4194(%rip), %rax # DISASM-NEXT: leaq -92(%rip), %rax # DISASM-NEXT: leaq -99(%rip), %rax -# DISASM-NEXT: movq 4165(%rip), %rax -# DISASM-NEXT: movq 4158(%rip), %rax +# DISASM-NEXT: movq 4181(%rip), %rax +# DISASM-NEXT: movq 4174(%rip), %rax .text .globl foo Index: test/ELF/gotpcrelx.s =================================================================== --- test/ELF/gotpcrelx.s +++ test/ELF/gotpcrelx.s @@ -20,11 +20,11 @@ // CHECK-NEXT: SHF_ALLOC // CHECK-NEXT: SHF_WRITE // CHECK-NEXT: ] -// CHECK-NEXT: Address: 0x2090 +// CHECK-NEXT: Address: 0x20A0 // CHECK: Relocations [ // CHECK-NEXT: Section ({{.*}}) .rela.dyn { -// CHECK-NEXT: 0x2098 R_X86_64_GLOB_DAT bar 0x0 -// CHECK-NEXT: 0x2090 R_X86_64_GLOB_DAT foo 0x0 +// CHECK-NEXT: 0x20A8 R_X86_64_GLOB_DAT bar 0x0 +// CHECK-NEXT: 0x20A0 R_X86_64_GLOB_DAT foo 0x0 // CHECK-NEXT: } // CHECK-NEXT: ] Index: test/ELF/i386-got-and-copy.s =================================================================== --- test/ELF/i386-got-and-copy.s +++ test/ELF/i386-got-and-copy.s @@ -13,7 +13,7 @@ # RUN: llvm-readobj -r %t.exe | FileCheck %s # CHECK: Relocations [ -# CHECK-NEXT: Section (4) .rel.dyn { +# CHECK-NEXT: Section ({{.*}}) .rel.dyn { # CHECK-NEXT: 0x{{[0-9A-F]+}} R_386_COPY foo # CHECK-NEXT: } # CHECK-NEXT: ] Index: test/ELF/i386-gotoff-shared.s =================================================================== --- test/ELF/i386-gotoff-shared.s +++ test/ELF/i386-gotoff-shared.s @@ -14,10 +14,10 @@ // CHECK-NEXT: SHF_ALLOC // CHECK-NEXT: SHF_WRITE // CHECK-NEXT: ] -// CHECK-NEXT: Address: 0x2050 -// CHECK-NEXT: Offset: 0x2050 +// CHECK-NEXT: Address: 0x2058 +// CHECK-NEXT: Offset: 0x2058 // CHECK-NEXT: Size: 4 -// 0x1000 - (0x2050 + 4) = -4180 +// 0x1000 - (0x2058 + 4) = -4188 -// DISASM: 1000: {{.*}} movl -4180(%ebx), %eax +// DISASM: 1000: {{.*}} movl -4188(%ebx), %eax Index: test/ELF/i386-gotpc-dynamic.s =================================================================== --- test/ELF/i386-gotpc-dynamic.s +++ test/ELF/i386-gotpc-dynamic.s @@ -5,14 +5,14 @@ # RUN: llvm-objdump -d %t.so | FileCheck --check-prefix=DISASM %s # CHECK: Section { -# CHECK: Index: 7 -# CHECK-NEXT: Name: .got +# CHECK: Index: +# CHECK: Name: .got # CHECK-NEXT: Type: SHT_PROGBITS # CHECK-NEXT: Flags [ # CHECK-NEXT: SHF_ALLOC # CHECK-NEXT: SHF_WRITE # CHECK-NEXT: ] -# CHECK-NEXT: Address: 0x2030 +# CHECK-NEXT: Address: 0x2038 # CHECK-NEXT: Offset: # CHECK-NEXT: Size: # CHECK-NEXT: Link: @@ -21,8 +21,8 @@ # CHECK-NEXT: EntrySize: # CHECK-NEXT: } -## 0x1000 + 4144 = 0x2030 -# DISASM: 1000: {{.*}} movl $4144, %eax +## 0x1000 + 4152 = 0x2038 +# DISASM: 1000: {{.*}} movl $4152, %eax .section .foo,"ax",@progbits foo: Index: test/ELF/i386-gotpc.s =================================================================== --- test/ELF/i386-gotpc.s +++ test/ELF/i386-gotpc.s @@ -12,9 +12,9 @@ // CHECK-NEXT: SHF_ALLOC // CHECK-NEXT: SHF_WRITE // CHECK-NEXT: ] -// CHECK-NEXT: Address: 0x2030 +// CHECK-NEXT: Address: 0x2038 // DISASM: Disassembly of section .text: // DISASM-NEXT: .text: -// DISASM-NEXT: 1000: {{.*}} movl $4144, %eax -// 0x2030 - 0x1000 = 4144 +// DISASM-NEXT: 1000: {{.*}} movl $4152, %eax +// 0x2038 - 0x1000 = 4152 Index: test/ELF/i386-tls-ie-shared.s =================================================================== --- test/ELF/i386-tls-ie-shared.s +++ test/ELF/i386-tls-ie-shared.s @@ -13,8 +13,8 @@ // GOTRELSHARED-NEXT: SHF_ALLOC // GOTRELSHARED-NEXT: SHF_WRITE // GOTRELSHARED-NEXT: ] -// GOTRELSHARED-NEXT: Address: 0x2058 -// GOTRELSHARED-NEXT: Offset: 0x2058 +// GOTRELSHARED-NEXT: Address: 0x2060 +// GOTRELSHARED-NEXT: Offset: 0x2060 // GOTRELSHARED-NEXT: Size: 16 // GOTRELSHARED-NEXT: Link: 0 // GOTRELSHARED-NEXT: Info: 0 @@ -31,36 +31,36 @@ // GOTRELSHARED-NEXT: 0x102D R_386_RELATIVE - 0x0 // GOTRELSHARED-NEXT: 0x1036 R_386_RELATIVE - 0x0 // GOTRELSHARED-NEXT: 0x103F R_386_RELATIVE - 0x0 -// GOTRELSHARED-NEXT: 0x2058 R_386_TLS_TPOFF tlslocal0 0x0 -// GOTRELSHARED-NEXT: 0x205C R_386_TLS_TPOFF tlslocal1 0x0 -// GOTRELSHARED-NEXT: 0x2060 R_386_TLS_TPOFF tlsshared0 0x0 -// GOTRELSHARED-NEXT: 0x2064 R_386_TLS_TPOFF tlsshared1 0x0 +// GOTRELSHARED-NEXT: 0x206C R_386_TLS_TPOFF tlsshared1 0x0 +// GOTRELSHARED-NEXT: 0x2060 R_386_TLS_TPOFF tlslocal0 0x0 +// GOTRELSHARED-NEXT: 0x2064 R_386_TLS_TPOFF tlslocal1 0x0 +// GOTRELSHARED-NEXT: 0x2068 R_386_TLS_TPOFF tlsshared0 0x0 // GOTRELSHARED-NEXT: } // GOTRELSHARED-NEXT: ] // GOTRELSHARED: 0x6FFFFFFA RELCOUNT 8 // DISASMSHARED: Disassembly of section test: // DISASMSHARED-NEXT: _start: -// (.got)[0] = 0x2058 = 8280 -// (.got)[1] = 0x205C = 8284 -// (.got)[2] = 0x2060 = 8288 -// (.got)[3] = 0x2064 = 8292 -// DISASMSHARED-NEXT: 1000: 8b 0d 58 20 00 00 movl 8280, %ecx -// DISASMSHARED-NEXT: 1006: 65 8b 01 movl %gs:(%ecx), %eax -// DISASMSHARED-NEXT: 1009: a1 58 20 00 00 movl 8280, %eax -// DISASMSHARED-NEXT: 100e: 65 8b 00 movl %gs:(%eax), %eax -// DISASMSHARED-NEXT: 1011: 03 0d 58 20 00 00 addl 8280, %ecx -// DISASMSHARED-NEXT: 1017: 65 8b 01 movl %gs:(%ecx), %eax -// DISASMSHARED-NEXT: 101a: 8b 0d 5c 20 00 00 movl 8284, %ecx -// DISASMSHARED-NEXT: 1020: 65 8b 01 movl %gs:(%ecx), %eax -// DISASMSHARED-NEXT: 1023: a1 5c 20 00 00 movl 8284, %eax -// DISASMSHARED-NEXT: 1028: 65 8b 00 movl %gs:(%eax), %eax -// DISASMSHARED-NEXT: 102b: 03 0d 5c 20 00 00 addl 8284, %ecx -// DISASMSHARED-NEXT: 1031: 65 8b 01 movl %gs:(%ecx), %eax -// DISASMSHARED-NEXT: 1034: 8b 0d 60 20 00 00 movl 8288, %ecx -// DISASMSHARED-NEXT: 103a: 65 8b 01 movl %gs:(%ecx), %eax -// DISASMSHARED-NEXT: 103d: 03 0d 64 20 00 00 addl 8292, %ecx -// DISASMSHARED-NEXT: 1043: 65 8b 01 movl %gs:(%ecx), %eax +// (.got)[0] = 0x2060 = 8288 +// (.got)[1] = 0x2064 = 8292 +// (.got)[2] = 0x2068 = 8296 +// (.got)[3] = 0x206C = 8300 +// DISASMSHARED-NEXT: 1000: {{.*}} movl 8288, %ecx +// DISASMSHARED-NEXT: 1006: {{.*}} movl %gs:(%ecx), %eax +// DISASMSHARED-NEXT: 1009: {{.*}} movl 8288, %eax +// DISASMSHARED-NEXT: 100e: {{.*}} movl %gs:(%eax), %eax +// DISASMSHARED-NEXT: 1011: {{.*}} addl 8288, %ecx +// DISASMSHARED-NEXT: 1017: {{.*}} movl %gs:(%ecx), %eax +// DISASMSHARED-NEXT: 101a: {{.*}} movl 8292, %ecx +// DISASMSHARED-NEXT: 1020: {{.*}} movl %gs:(%ecx), %eax +// DISASMSHARED-NEXT: 1023: {{.*}} movl 8292, %eax +// DISASMSHARED-NEXT: 1028: {{.*}} movl %gs:(%eax), %eax +// DISASMSHARED-NEXT: 102b: {{.*}} addl 8292, %ecx +// DISASMSHARED-NEXT: 1031: {{.*}} movl %gs:(%ecx), %eax +// DISASMSHARED-NEXT: 1034: {{.*}} movl 8296, %ecx +// DISASMSHARED-NEXT: 103a: {{.*}} movl %gs:(%ecx), %eax +// DISASMSHARED-NEXT: 103d: {{.*}} addl 8300, %ecx +// DISASMSHARED-NEXT: 1043: {{.*}} movl %gs:(%ecx), %eax .type tlslocal0,@object .section .tbss,"awT",@nobits Index: test/ELF/icf-symbol-type.s =================================================================== --- test/ELF/icf-symbol-type.s +++ test/ELF/icf-symbol-type.s @@ -6,8 +6,8 @@ # We used to mark bar as absolute. -# CHECK: [[ADDR:[0-9a-z]*]] 0 NOTYPE GLOBAL DEFAULT 4 foo -# CHECK: [[ADDR]] 0 NOTYPE GLOBAL DEFAULT 4 bar +# CHECK: [[ADDR:[0-9a-z]*]] 0 NOTYPE GLOBAL DEFAULT 5 foo +# CHECK: [[ADDR]] 0 NOTYPE GLOBAL DEFAULT 5 bar .section .text.f,"ax",@progbits .globl foo Index: test/ELF/linkerscript/data-segment-relro.s =================================================================== --- test/ELF/linkerscript/data-segment-relro.s +++ test/ELF/linkerscript/data-segment-relro.s @@ -32,8 +32,8 @@ # CHECK-NEXT: SHF_ALLOC # CHECK-NEXT: SHF_WRITE # CHECK-NEXT: ] -# CHECK-NEXT: Address: 0x10F0 -# CHECK-NEXT: Offset: 0x10F0 +# CHECK-NEXT: Address: 0x1100 +# CHECK-NEXT: Offset: 0x1100 # CHECK-NEXT: Size: # CHECK-NEXT: Link: # CHECK-NEXT: Info: Index: test/ELF/linkerscript/emit-reloc.s =================================================================== --- test/ELF/linkerscript/emit-reloc.s +++ test/ELF/linkerscript/emit-reloc.s @@ -9,9 +9,9 @@ # CHECK: Relocations [ # CHECK-NEXT: Section ({{.*}}) .rela.dyn { -# CHECK-NEXT: 0x66 R_X86_64_64 .foo 0x0 +# CHECK-NEXT: 0x7E R_X86_64_64 .foo 0x0 # CHECK-NEXT: } # CHECK-NEXT: Section ({{.*}}) .rela.data { -# CHECK-NEXT: 0x66 R_X86_64_64 .foo 0x0 +# CHECK-NEXT: 0x7E R_X86_64_64 .foo 0x0 # CHECK-NEXT: } # CHECK-NEXT: ] Index: test/ELF/linkerscript/extend-pt-load.s =================================================================== --- test/ELF/linkerscript/extend-pt-load.s +++ test/ELF/linkerscript/extend-pt-load.s @@ -8,9 +8,10 @@ # RUN: echo "SECTIONS { \ # RUN: . = SIZEOF_HEADERS; \ -# RUN: .dynsym : { } \ -# RUN: .hash : { } \ -# RUN: .dynstr : { } \ +# RUN: .dynsym : { } \ +# RUN: .hash : { } \ +# RUN: .gnu.hash : { } \ +# RUN: .dynstr : { } \ # RUN: .text : { *(.text) } \ # RUN: . = ALIGN(0x1000); \ # RUN: .data.rel.ro : { *(.data.rel.ro) } \ @@ -18,11 +19,11 @@ # RUN: ld.lld -o %t1 --script %t.script %t.o -shared # RUN: llvm-readobj --elf-output-style=GNU -l -s %t1 | FileCheck --check-prefix=CHECK1 %s -# CHECK1: .text PROGBITS 00000000000001bc 0001bc 000001 00 AX +# CHECK1: .text PROGBITS 00000000000001d4 0001d4 000001 00 AX # CHECK1-NEXT: .data.rel.ro PROGBITS 0000000000001000 001000 000001 00 WA -# CHECK1: LOAD 0x000000 0x0000000000000000 0x0000000000000000 0x0001bd 0x0001bd R E -# CHECK1-NEXT: LOAD 0x001000 0x0000000000001000 0x0000000000001000 0x000068 0x000068 RW +# CHECK1: LOAD 0x000000 0x0000000000000000 0x0000000000000000 0x0001d5 0x0001d5 R E +# CHECK1-NEXT: LOAD 0x001000 0x0000000000001000 0x0000000000001000 0x000078 0x000078 RW # Then add the section bar. Note how bar is given AX flags, which causes the PT_LOAD to now # cover the padding bits created by ALIGN. @@ -31,6 +32,7 @@ # RUN: . = SIZEOF_HEADERS; \ # RUN: .dynsym : { } \ # RUN: .hash : { } \ +# RUN: .gnu.hash : { } \ # RUN: .dynstr : { } \ # RUN: .text : { *(.text) } \ # RUN: . = ALIGN(0x1000); \ @@ -40,12 +42,12 @@ # RUN: ld.lld -o %t2 --script %t.script %t.o -shared # RUN: llvm-readobj --elf-output-style=GNU -l -s %t2 | FileCheck --check-prefix=CHECK2 %s -# CHECK2: .text PROGBITS 00000000000001bc 0001bc 000001 00 AX +# CHECK2: .text PROGBITS 00000000000001d4 0001d4 000001 00 AX # CHECK2-NEXT: bar PROGBITS 0000000000001000 001000 000000 00 AX # CHECK2-NEXT: .data.rel.ro PROGBITS 0000000000001000 001000 000001 00 WA # CHECK2: LOAD 0x000000 0x0000000000000000 0x0000000000000000 0x001000 0x001000 R E -# CHECK2-NEXT: LOAD 0x001000 0x0000000000001000 0x0000000000001000 0x000068 0x000068 RW +# CHECK2-NEXT: LOAD 0x001000 0x0000000000001000 0x0000000000001000 0x000078 0x000078 RW # If the current behavior becomes a problem we should consider just moving the commands out # of the section. That is, handle the above like the following test. @@ -54,6 +56,7 @@ # RUN: . = SIZEOF_HEADERS; \ # RUN: .dynsym : { } \ # RUN: .hash : { } \ +# RUN: .gnu.hash : { } \ # RUN: .dynstr : { } \ # RUN: .text : { *(.text) } \ # RUN: . = ALIGN(0x1000); \ Index: test/ELF/linkerscript/header-addr.s =================================================================== --- test/ELF/linkerscript/header-addr.s +++ test/ELF/linkerscript/header-addr.s @@ -14,8 +14,8 @@ # CHECK-NEXT: Offset: 0x40 # CHECK-NEXT: VirtualAddress: 0x2040 # CHECK-NEXT: PhysicalAddress: 0x2040 -# CHECK-NEXT: FileSize: 200 -# CHECK-NEXT: MemSize: 200 +# CHECK-NEXT: FileSize: 240 +# CHECK-NEXT: MemSize: 240 # CHECK-NEXT: Flags [ # CHECK-NEXT: PF_R (0x4) # CHECK-NEXT: PF_W (0x2) @@ -35,8 +35,8 @@ # MAXPAGE-NEXT: Offset: 0x40 # MAXPAGE-NEXT: VirtualAddress: 0x2040 # MAXPAGE-NEXT: PhysicalAddress: 0x2040 -# MAXPAGE-NEXT: FileSize: 200 -# MAXPAGE-NEXT: MemSize: 200 +# MAXPAGE-NEXT: FileSize: 240 +# MAXPAGE-NEXT: MemSize: 240 # MAXPAGE-NEXT: Flags [ # MAXPAGE-NEXT: PF_R # MAXPAGE-NEXT: PF_W Index: test/ELF/linkerscript/implicit-program-header.s =================================================================== --- test/ELF/linkerscript/implicit-program-header.s +++ test/ELF/linkerscript/implicit-program-header.s @@ -5,7 +5,7 @@ # RUN: llvm-readobj -elf-output-style=GNU -l %t1 | FileCheck %s # CHECK: Segment Sections... -# CHECK-NEXT: 00 .text .dynsym .hash .dynstr .dynamic +# CHECK-NEXT: 00 .text .dynsym .gnu.hash .hash .dynstr .dynamic # CHECK-NEXT: 01 .foo .quad 0 Index: test/ELF/linkerscript/no-space.s =================================================================== --- test/ELF/linkerscript/no-space.s +++ test/ELF/linkerscript/no-space.s @@ -18,7 +18,7 @@ # CHECK: Section to Segment mapping: # CHECK-NEXT: Segment Sections... -# CHECK-NEXT: 00 foo .text .dynsym .hash .dynstr +# CHECK-NEXT: 00 foo .text .dynsym .gnu.hash .hash .dynstr .section foo, "a" .quad 0 Index: test/ELF/linkerscript/non-alloc.s =================================================================== --- test/ELF/linkerscript/non-alloc.s +++ test/ELF/linkerscript/non-alloc.s @@ -15,7 +15,7 @@ # CHECK: Section to Segment mapping: # CHECK-NEXT: Segment Sections... -# CHECK-NEXT: 00 .text .dynsym .hash .dynstr +# CHECK-NEXT: 00 .text .dynsym .gnu.hash .hash .dynstr # CHECK-NEXT: 01 .dynamic nop Index: test/ELF/linkerscript/orphan-report.s =================================================================== --- test/ELF/linkerscript/orphan-report.s +++ test/ELF/linkerscript/orphan-report.s @@ -11,6 +11,7 @@ # CHECK-NEXT: :(.dynsym) is being placed in '.dynsym' # CHECK-NEXT: :(.gnu.version) is being placed in '.gnu.version' # CHECK-NEXT: :(.gnu.version_r) is being placed in '.gnu.version_r' +# CHECK-NEXT: :(.gnu.hash) is being placed in '.gnu.hash' # CHECK-NEXT: :(.hash) is being placed in '.hash' # CHECK-NEXT: :(.dynamic) is being placed in '.dynamic' # CHECK-NEXT: :(.dynstr) is being placed in '.dynstr' Index: test/ELF/linkerscript/out-of-order.s =================================================================== --- test/ELF/linkerscript/out-of-order.s +++ test/ELF/linkerscript/out-of-order.s @@ -8,11 +8,12 @@ # CHECK-NEXT: Idx Name Size Address Type # CHECK-NEXT: 0 00000000 0000000000000000 # CHECK-NEXT: 1 .data 00000008 0000000000004000 DATA -# CHECK-NEXT: 2 .dynamic 00000060 0000000000004008 +# CHECK-NEXT: 2 .dynamic 00000070 0000000000004008 # CHECK-NEXT: 3 .text 00000008 0000000000002000 TEXT DATA # CHECK-NEXT: 4 .dynsym 00000018 0000000000002008 -# CHECK-NEXT: 5 .hash 00000010 0000000000002020 -# CHECK-NEXT: 6 .dynstr 00000001 0000000000002030 +# CHECK-NEXT: 5 .gnu.hash 00000018 0000000000002020 +# CHECK-NEXT: 6 .hash 00000010 0000000000002038 +# CHECK-NEXT: 7 .dynstr 00000001 0000000000002048 .quad 0 .data Index: test/ELF/linkerscript/repsection-symbol.s =================================================================== --- test/ELF/linkerscript/repsection-symbol.s +++ test/ELF/linkerscript/repsection-symbol.s @@ -10,13 +10,13 @@ # RUN: llvm-readobj -t %t1 | FileCheck %s # CHECK: Name: foo1 -# CHECK-NEXT: Value: 0x228 +# CHECK-NEXT: Value: 0x258 # CHECK: Name: foo2 -# CHECK-NEXT: Value: 0x230 +# CHECK-NEXT: Value: 0x260 # CHECK: Name: foo3 -# CHECK-NEXT: Value: 0x234 +# CHECK-NEXT: Value: 0x264 .section .foo.1,"a" .long 1 Index: test/ELF/linkerscript/sections-sort.s =================================================================== --- test/ELF/linkerscript/sections-sort.s +++ test/ELF/linkerscript/sections-sort.s @@ -18,10 +18,11 @@ # CHECK-NEXT: 1 .text # CHECK-NEXT: 2 foo # CHECK-NEXT: 3 .dynsym -# CHECK-NEXT: 4 .hash -# CHECK-NEXT: 5 .dynstr -# CHECK-NEXT: 6 .dynamic -# CHECK-NEXT: 7 .comment -# CHECK-NEXT: 8 .symtab -# CHECK-NEXT: 9 .shstrtab -# CHECK-NEXT: 10 .strtab +# CHECK-NEXT: 4 .gnu.hash +# CHECK-NEXT: 5 .hash +# CHECK-NEXT: 6 .dynstr +# CHECK-NEXT: 7 .dynamic +# CHECK-NEXT: 8 .comment +# CHECK-NEXT: 9 .symtab +# CHECK-NEXT: 10 .shstrtab +# CHECK-NEXT: 11 .strtab Index: test/ELF/linkerscript/segment-start.s =================================================================== --- test/ELF/linkerscript/segment-start.s +++ test/ELF/linkerscript/segment-start.s @@ -3,15 +3,15 @@ // RUN: ld.lld %t.o %S/Inputs/segment-start.script -shared -o %t.so // RUN: llvm-readobj --dyn-symbols %t.so | FileCheck %s -// CHECK: Name: foobar1 -// CHECK-NEXT: Value: 0x8001 - // CHECK: Name: foobar2 // CHECK-NEXT: Value: 0x8002 // CHECK: Name: foobar3 // CHECK-NEXT: Value: 0x8003 +// CHECK: Name: foobar1 +// CHECK-NEXT: Value: 0x8001 + // CHECK: Name: foobar4 // CHECK-NEXT: Value: 0x8004 Index: test/ELF/linkerscript/sort-non-script.s =================================================================== --- test/ELF/linkerscript/sort-non-script.s +++ test/ELF/linkerscript/sort-non-script.s @@ -5,12 +5,13 @@ # RUN: ld.lld -o %t1 --script %t.script %t -shared # RUN: llvm-readobj -elf-output-style=GNU -s %t1 | FileCheck %s -# CHECK: .text {{.*}} AX -# CHECK-NEXT: .dynsym {{.*}} A -# CHECK-NEXT: .hash {{.*}} A -# CHECK-NEXT: .dynstr {{.*}} A -# CHECK-NEXT: foo {{.*}} WA -# CHECK-NEXT: .dynamic {{.*}} WA +# CHECK: .text {{.*}} AX +# CHECK-NEXT: .dynsym {{.*}} A +# CHECK-NEXT: .gnu.hash {{.*}} A +# CHECK-NEXT: .hash {{.*}} A +# CHECK-NEXT: .dynstr {{.*}} A +# CHECK-NEXT: foo {{.*}} WA +# CHECK-NEXT: .dynamic {{.*}} WA .section foo, "aw" .byte 0 Index: test/ELF/local-got-pie.s =================================================================== --- test/ELF/local-got-pie.s +++ test/ELF/local-got-pie.s @@ -12,10 +12,10 @@ foo: nop -// 0x20B0 - 1001 - 5 = 4266 +// 0x20C0 - 1001 - 5 = 4283 // DISASM: Disassembly of section .text: // DISASM-NEXT: _start: -// DISASM-NEXT: 1000: {{.*}} callq 4267 +// DISASM-NEXT: 1000: {{.*}} callq 4283 // DISASM: foo: // DISASM-NEXT: 1005: {{.*}} nop @@ -25,13 +25,13 @@ // CHECK-NEXT: SHF_ALLOC // CHECK-NEXT: SHF_WRITE // CHECK-NEXT: ] -// CHECK-NEXT: Address: 0x20B0 +// CHECK-NEXT: Address: 0x20C0 // CHECK-NEXT: Offset: // CHECK-NEXT: Size: 8 // CHECK: Relocations [ // CHECK-NEXT: Section ({{.*}}) .rela.dyn { -// CHECK-NEXT: 0x20B0 R_X86_64_RELATIVE - 0x1005 +// CHECK-NEXT: 0x20C0 R_X86_64_RELATIVE - 0x1005 // CHECK-NEXT: } // CHECK-NEXT: ] // CHECK: 0x000000006FFFFFF9 RELACOUNT 1 Index: test/ELF/local-got-shared.s =================================================================== --- test/ELF/local-got-shared.s +++ test/ELF/local-got-shared.s @@ -11,9 +11,9 @@ foo: nop -// 0x20A0 - 0x1000 - 5 = 4251 +// 0x20B0 - 0x1000 - 5 = 4267 // DISASM: bar: -// DISASM-NEXT: 1000: {{.*}} callq 4251 +// DISASM-NEXT: 1000: {{.*}} callq 4267 // DISASM: foo: // DISASM-NEXT: 1005: {{.*}} nop @@ -24,13 +24,13 @@ // CHECK-NEXT: SHF_ALLOC // CHECK-NEXT: SHF_WRITE // CHECK-NEXT: ] -// CHECK-NEXT: Address: 0x20A0 +// CHECK-NEXT: Address: 0x20B0 // CHECK-NEXT: Offset: // CHECK-NEXT: Size: 8 // CHECK: Relocations [ // CHECK-NEXT: Section ({{.*}}) .rela.dyn { -// CHECK-NEXT: 0x20A0 R_X86_64_RELATIVE - 0x1005 +// CHECK-NEXT: 0x20B0 R_X86_64_RELATIVE - 0x1005 // CHECK-NEXT: } // CHECK-NEXT: ] // CHECK: 0x000000006FFFFFF9 RELACOUNT 1 Index: test/ELF/local-got.s =================================================================== --- test/ELF/local-got.s +++ test/ELF/local-got.s @@ -14,11 +14,11 @@ foo: nop -// 0x2020B0 - 0x201000 - 5 = 4251 -// 0x2020B8 - 0x201005 - 5 = 4254 +// 0x2020C0 - 0x201000 - 5 = 4283 +// 0x2020C8 - 0x201005 - 5 = 4286 // DISASM: _start: -// DISASM-NEXT: 201000: {{.*}} callq 4267 -// DISASM-NEXT: 201005: {{.*}} callq 4270 +// DISASM-NEXT: 201000: {{.*}} callq 4283 +// DISASM-NEXT: 201005: {{.*}} callq 4286 // DISASM: foo: // DISASM-NEXT: 20100a: {{.*}} nop @@ -29,7 +29,7 @@ // CHECK-NEXT: SHF_ALLOC // CHECK-NEXT: SHF_WRITE // CHECK-NEXT: ] -// CHECK-NEXT: Address: 0x2020B0 +// CHECK-NEXT: Address: 0x2020C0 // CHECK-NEXT: Offset: // CHECK-NEXT: Size: 16 // CHECK-NEXT: Link: 0 @@ -43,6 +43,6 @@ // CHECK: Relocations [ // CHECK-NEXT: Section ({{.*}}) .rela.dyn { -// CHECK-NEXT: 0x2020B0 R_X86_64_GLOB_DAT bar 0x0 +// CHECK-NEXT: 0x2020C0 R_X86_64_GLOB_DAT bar 0x0 // CHECK-NEXT: } // CHECK-NEXT: ] Index: test/ELF/noplt-pie.s =================================================================== --- test/ELF/noplt-pie.s +++ test/ELF/noplt-pie.s @@ -10,8 +10,8 @@ # CHECK: Relocations [ # CHECK-NEXT: Section ({{.*}}) .rela.dyn { -# CHECK-NEXT: 0x2020B0 R_X86_64_GLOB_DAT bar 0x0 -# CHECK-NEXT: 0x2020B8 R_X86_64_GLOB_DAT zed 0x0 +# CHECK-NEXT: 0x2020C0 R_X86_64_GLOB_DAT bar 0x0 +# CHECK-NEXT: 0x2020C8 R_X86_64_GLOB_DAT zed 0x0 # CHECK-NEXT: } # CHECK-NEXT: ] Index: test/ELF/pie-weak.s =================================================================== --- test/ELF/pie-weak.s +++ test/ELF/pie-weak.s @@ -15,6 +15,6 @@ .globl _start _start: # DISASM: _start: -# DISASM-NEXT: 1000: 48 8b 05 99 10 00 00 movq 4249(%rip), %rax -# ^ .got - (.text + 7) +# DISASM-NEXT: 1000: {{.*}} movq 4265(%rip), %rax +# ^ .got - (.text + 7) mov foo@gotpcrel(%rip), %rax Index: test/ELF/pr34660.s =================================================================== --- test/ELF/pr34660.s +++ test/ELF/pr34660.s @@ -17,7 +17,7 @@ # DISASM-NEXT: 10000: 28 00 08 58 ldr x8, #65540 # SYM: Symbol table '.symtab' -# SYM: 0000000000020004 0 NOTYPE LOCAL DEFAULT 5 patatino +# SYM: 0000000000020004 0 NOTYPE LOCAL DEFAULT 6 patatino ldr x8, patatino .data Index: test/ELF/relocation-copy-alias.s =================================================================== --- test/ELF/relocation-copy-alias.s +++ test/ELF/relocation-copy-alias.s @@ -26,16 +26,24 @@ // CHECK-NEXT: } // CHECK-NEXT: } +// CHECK: Name: b3 +// CHECK-NEXT: Value: [[B:.*]] +// CHECK-NEXT: Size: 1 +// CHECK-NEXT: Binding: Weak +// CHECK-NEXT: Type: Object (0x1) +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: .bss + // CHECK: Name: a1 // CHECK-NEXT: Value: [[A:.*]] // CHECK-NEXT: Size: 1 // CHECK-NEXT: Binding: Global (0x1) // CHECK-NEXT: Type: Object (0x1) // CHECK-NEXT: Other: 0 -// CHECK-NEXT: Section: .bss (0x7) +// CHECK-NEXT: Section: .bss // CHECK: Name: b1 -// CHECK-NEXT: Value: [[B:.*]] +// CHECK-NEXT: Value: [[B]] // CHECK-NEXT: Size: 1 // CHECK-NEXT: Binding: Global // CHECK-NEXT: Type: Object (0x1) @@ -57,11 +65,3 @@ // CHECK-NEXT: Type: Object (0x1) // CHECK-NEXT: Other: 0 // CHECK-NEXT: Section: .bss - -// CHECK: Name: b3 -// CHECK-NEXT: Value: [[B]] -// CHECK-NEXT: Size: 1 -// CHECK-NEXT: Binding: Weak -// CHECK-NEXT: Type: Object (0x1) -// CHECK-NEXT: Other: 0 -// CHECK-NEXT: Section: .bss Index: test/ELF/relocation-copy-align-common.s =================================================================== --- test/ELF/relocation-copy-align-common.s +++ test/ELF/relocation-copy-align-common.s @@ -15,7 +15,7 @@ # CHECK-NEXT: SHF_WRITE # CHECK-NEXT: ] # CHECK-NEXT: Address: 0x203000 -# CHECK-NEXT: Offset: 0x20B0 +# CHECK-NEXT: Offset: 0x20C0 # CHECK-NEXT: Size: 16 # CHECK-NEXT: Link: 0 # CHECK-NEXT: Info: 0 Index: test/ELF/relocation-copy-flags.s =================================================================== --- test/ELF/relocation-copy-flags.s +++ test/ELF/relocation-copy-flags.s @@ -55,7 +55,7 @@ // CHECK-NEXT: Flags [ // CHECK-NEXT: ] // CHECK-NEXT: Address: 0x0 -// CHECK-NEXT: Offset: 0x30B0 +// CHECK-NEXT: Offset: 0x30C0 // CHECK-NEXT: Size: 8 // CHECK-NEXT: Link: 0 // CHECK-NEXT: Info: 0 @@ -66,7 +66,7 @@ // CHECK-NEXT: ) // CHECK: Relocations [ -// CHECK-NEXT: Section (4) .rela.dyn { +// CHECK-NEXT: Section {{.*}} .rela.dyn { // CHECK-NEXT: 0x204000 R_X86_64_COPY x 0x0 // CHECK-NEXT: 0x202000 R_X86_64_64 z 0x0 // CHECK-NEXT: } Index: test/ELF/relocation-copy-relro.s =================================================================== --- test/ELF/relocation-copy-relro.s +++ test/ELF/relocation-copy-relro.s @@ -5,24 +5,24 @@ // RUN: ld.lld %t.o %t.so -o %t3 // RUN: llvm-readobj -program-headers -s -r %t3 | FileCheck %s -// CHECK: Name: .bss.rel.ro (48) +// CHECK: Name: .bss.rel.ro // CHECK-NEXT: Type: SHT_NOBITS (0x8) // CHECK-NEXT: Flags [ (0x3) // CHECK-NEXT: SHF_ALLOC (0x2) // CHECK-NEXT: SHF_WRITE (0x1) // CHECK-NEXT: ] -// CHECK-NEXT: Address: 0x2020B0 -// CHECK-NEXT: Offset: 0x20B0 +// CHECK-NEXT: Address: 0x2020C0 +// CHECK-NEXT: Offset: 0x20C0 // CHECK-NEXT: Size: 8 -// CHECK: 0x2020B0 R_X86_64_COPY a 0x0 -// CHECK: 0x2020B4 R_X86_64_COPY b 0x0 +// CHECK: 0x2020C0 R_X86_64_COPY a 0x0 +// CHECK: 0x2020C4 R_X86_64_COPY b 0x0 // CHECK: Type: PT_GNU_RELRO (0x6474E552) // CHECK-NEXT: Offset: 0x2000 // CHECK-NEXT: VirtualAddress: 0x202000 // CHECK-NEXT: PhysicalAddress: 0x202000 -// CHECK-NEXT: FileSize: 176 +// CHECK-NEXT: FileSize: 192 // CHECK-NEXT: MemSize: 4096 .text Index: test/ELF/relocation-i686.s =================================================================== --- test/ELF/relocation-i686.s +++ test/ELF/relocation-i686.s @@ -55,7 +55,7 @@ // ADDR-NEXT: SHF_ALLOC // ADDR-NEXT: SHF_WRITE // ADDR-NEXT: ] -// ADDR-NEXT: Address: 0x13078 +// ADDR-NEXT: Address: 0x13080 // ADDR-NEXT: Offset: // ADDR-NEXT: Size: 8 @@ -63,11 +63,11 @@ R_386_GOTPC: movl $_GLOBAL_OFFSET_TABLE_, %eax -// 0x12078 + 8 - 0x11014 = 4204 +// 0x13080 + 8 - 0x11014 = $8308 // CHECK: Disassembly of section .R_386_GOTPC: // CHECK-NEXT: R_386_GOTPC: -// CHECK-NEXT: 11014: {{.*}} movl $8300, %eax +// CHECK-NEXT: 11014: {{.*}} movl $8308, %eax .section .dynamic_reloc, "ax",@progbits call bar @@ -84,8 +84,8 @@ movl bar+8@GOT, %eax movl zed+4@GOT, %eax -// 4294967288 = 0xFFFFFFF8 = got[0](0x12070) - .got(0x12070) - sizeof(.got)(8) -// 4294967292 = 0xFFFFFFFC = got[1](0x12074) - .got(0x12070) - sizeof(.got)(8) +// 4294967288 = 0xFFFFFFF8 = got[0](0x13080) - .got(0x13080) - sizeof(.got)(8) +// 4294967292 = 0xFFFFFFFC = got[1](0x13084) - .got(0x13080) - sizeof(.got)(8) // 0xFFFFFFF8 + 8 = 0 // 0xFFFFFFFC + 4 = 0 // CHECK: Disassembly of section .R_386_GOT32: Index: test/ELF/relocation.s =================================================================== --- test/ELF/relocation.s +++ test/ELF/relocation.s @@ -37,7 +37,7 @@ // SEC-NEXT: SHF_ALLOC // SEC-NEXT: SHF_WRITE // SEC-NEXT: ] -// SEC-NEXT: Address: 0x2030F0 +// SEC-NEXT: Address: 0x203100 // SEC-NEXT: Offset: // SEC-NEXT: Size: 8 // SEC-NEXT: Link: 0 @@ -120,10 +120,10 @@ R_X86_64_GOTPCREL: .long zed@gotpcrel -// 0x2020F8 - 0x2001D8 = 7952 -// 7952 = 0x101f0000 in little endian +// 0x203100 - 0x2001D0 = 0x2f30 +// 0x2f30 = 0x101f0000 in little endian // CHECK: Contents of section .R_X86_64_GOTPCREL -// CHECK-NEXT: 2001d0 202f0000 +// CHECK-NEXT: 2001d0 302f0000 .section .R_X86_64_GOT32,"a",@progbits .global R_X86_64_GOT32 Index: test/ELF/relro-omagic.s =================================================================== --- test/ELF/relro-omagic.s +++ test/ELF/relro-omagic.s @@ -9,17 +9,18 @@ # NORELRO-NEXT: Idx Name Size Address Type # NORELRO-NEXT: 0 00000000 0000000000000000 # NORELRO-NEXT: 1 .dynsym 00000048 0000000000200120 -# NORELRO-NEXT: 2 .hash 00000020 0000000000200168 -# NORELRO-NEXT: 3 .dynstr 00000021 0000000000200188 -# NORELRO-NEXT: 4 .rela.dyn 00000018 00000000002001b0 -# NORELRO-NEXT: 5 .rela.plt 00000018 00000000002001c8 -# NORELRO-NEXT: 6 .text 0000000a 00000000002001e0 TEXT DATA -# NORELRO-NEXT: 7 .plt 00000020 00000000002001f0 TEXT DATA -# NORELRO-NEXT: 8 .data 00000008 0000000000200210 DATA -# NORELRO-NEXT: 9 .foo 00000004 0000000000200218 DATA -# NORELRO-NEXT: 10 .dynamic 000000f0 0000000000200220 -# NORELRO-NEXT: 11 .got 00000008 0000000000200310 DATA -# NORELRO-NEXT: 12 .got.plt 00000020 0000000000200318 DATA +# NORELRO-NEXT: 2 .gnu.hash 00000024 0000000000200168 +# NORELRO-NEXT: 3 .hash 00000020 000000000020018c +# NORELRO-NEXT: 4 .dynstr 00000021 00000000002001ac +# NORELRO-NEXT: 5 .rela.dyn 00000018 00000000002001d0 +# NORELRO-NEXT: 6 .rela.plt 00000018 00000000002001e8 +# NORELRO-NEXT: 7 .text 0000000a 0000000000200200 TEXT DATA +# NORELRO-NEXT: 8 .plt 00000020 0000000000200210 TEXT DATA +# NORELRO-NEXT: 9 .data 00000008 0000000000200230 DATA +# NORELRO-NEXT: 10 .foo 00000004 0000000000200238 DATA +# NORELRO-NEXT: 11 .dynamic 00000100 0000000000200240 +# NORELRO-NEXT: 12 .got 00000008 0000000000200340 DATA +# NORELRO-NEXT: 13 .got.plt 00000020 0000000000200348 DATA # NOPHDRS: ProgramHeaders [ # NOPHDRS-NOT: PT_GNU_RELRO Index: test/ELF/resolution-end.s =================================================================== --- test/ELF/resolution-end.s +++ test/ELF/resolution-end.s @@ -21,16 +21,16 @@ # CHECK-NEXT: AddressAlignment: # CHECK-NEXT: EntrySize: # CHECK-NEXT: SectionData ( -# CHECK-NEXT: 0000: 80202000 00000000 80202000 00000000 +# CHECK-NEXT: 0000: 90202000 00000000 90202000 00000000 # CHECK-NEXT: ) # CHECK: Symbol { # CHECK: Name: _end -# CHECK-NEXT: Value: 0x202080 +# CHECK-NEXT: Value: 0x202090 # CHECK: Symbol { # CHECK: Name: end -# CHECK-NEXT: Value: 0x202080 +# CHECK-NEXT: Value: 0x202090 .global _start _start: Index: test/ELF/retain-symbols-file.s =================================================================== --- test/ELF/retain-symbols-file.s +++ test/ELF/retain-symbols-file.s @@ -20,16 +20,16 @@ # CHECK-NEXT: Section: # CHECK-NEXT: } # CHECK-NEXT: Symbol { -# CHECK-NEXT: Name: bar +# CHECK-NEXT: Name: und # CHECK-NEXT: Value: # CHECK-NEXT: Size: # CHECK-NEXT: Binding: Global # CHECK-NEXT: Type: # CHECK-NEXT: Other: -# CHECK-NEXT: Section: .text +# CHECK-NEXT: Section: Undefined # CHECK-NEXT: } # CHECK-NEXT: Symbol { -# CHECK-NEXT: Name: foo +# CHECK-NEXT: Name: bar # CHECK-NEXT: Value: # CHECK-NEXT: Size: # CHECK-NEXT: Binding: Global @@ -38,13 +38,13 @@ # CHECK-NEXT: Section: .text # CHECK-NEXT: } # CHECK-NEXT: Symbol { -# CHECK-NEXT: Name: und +# CHECK-NEXT: Name: foo # CHECK-NEXT: Value: # CHECK-NEXT: Size: # CHECK-NEXT: Binding: Global # CHECK-NEXT: Type: # CHECK-NEXT: Other: -# CHECK-NEXT: Section: Undefined +# CHECK-NEXT: Section: .text # CHECK-NEXT: } # CHECK-NEXT: ] Index: test/ELF/shared.s =================================================================== --- test/ELF/shared.s +++ test/ELF/shared.s @@ -14,7 +14,7 @@ // SO-NEXT: Flags [ // SO-NEXT: ] // SO-NEXT: Address: -// SO-NEXT: Offset: 0x1038 +// SO-NEXT: Offset: 0x1040 // SO-NEXT: Size: // SO-NEXT: Link: // SO-NEXT: Info: @@ -61,6 +61,21 @@ // CHECK-NEXT: } // CHECK-NEXT: Section { // CHECK-NEXT: Index: 3 +// CHECK-NEXT: Name: .gnu.hash +// CHECK-NEXT: Type: SHT_GNU_HASH +// CHECK-NEXT: Flags [ +// CHECK-NEXT: SHF_ALLOC +// CHECK-NEXT: ] +// CHECK-NEXT: Address: [[GNUHASHADDR:.*]] +// CHECK-NEXT: Offset: +// CHECK-NEXT: Size: +// CHECK-NEXT: Link: 2 +// CHECK-NEXT: Info: 0 +// CHECK-NEXT: AddressAlignment: 4 +// CHECK-NEXT: EntrySize: 0 +// CHECK: } +// CHECK-NEXT: Section { +// CHECK-NEXT: Index: 4 // CHECK-NEXT: Name: .hash // CHECK-NEXT: Type: SHT_HASH // CHECK-NEXT: Flags [ @@ -193,22 +208,22 @@ // CHECK-NEXT: Section: Undefined // CHECK-NEXT: } // CHECK-NEXT: Symbol { -// CHECK-NEXT: Name: _start@ -// CHECK-NEXT: Value: 0x11000 +// CHECK-NEXT: Name: bar@ +// CHECK-NEXT: Value: 0x0 // CHECK-NEXT: Size: 0 // CHECK-NEXT: Binding: Global -// CHECK-NEXT: Type: Non +// CHECK-NEXT: Type: Function // CHECK-NEXT: Other: 0 -// CHECK-NEXT: Section: .text +// CHECK-NEXT: Section: Undefined // CHECK-NEXT: } // CHECK-NEXT: Symbol { -// CHECK-NEXT: Name: bar@ -// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: Name: _start@ +// CHECK-NEXT: Value: 0x11000 // CHECK-NEXT: Size: 0 // CHECK-NEXT: Binding: Global -// CHECK-NEXT: Type: Function +// CHECK-NEXT: Type: Non // CHECK-NEXT: Other: 0 -// CHECK-NEXT: Section: Undefined +// CHECK-NEXT: Section: .text // CHECK-NEXT: } // CHECK-NEXT: Symbol { // CHECK-NEXT: Name: zed@ @@ -263,6 +278,7 @@ // CHECK-NEXT: 0x0000000B SYMENT [[SYMENT]] (bytes) // CHECK-NEXT: 0x00000005 STRTAB [[DYNSTRADDR]] // CHECK-NEXT: 0x0000000A STRSZ +// CHECK-NEXT: 0x6FFFFEF5 GNU_HASH [[GNUHASHADDR]] // CHECK-NEXT: 0x00000004 HASH [[HASHADDR]] // CHECK-NEXT: 0x00000000 NULL 0x0 // CHECK-NEXT: ] @@ -295,8 +311,8 @@ // CHECK: HashTable { // CHECK-NEXT: Num Buckets: 4 // CHECK-NEXT: Num Chains: 4 -// CHECK-NEXT: Buckets: [3, 0, 2, 0] -// CHECK-NEXT: Chains: [0, 0, 0, 1] +// CHECK-NEXT: Buckets: [3, 0, 1, 0] +// CHECK-NEXT: Chains: [0, 0, 0, 2] // CHECK-NEXT: } .global _start Index: test/ELF/sort-norosegment.s =================================================================== --- test/ELF/sort-norosegment.s +++ test/ELF/sort-norosegment.s @@ -4,12 +4,13 @@ # RUN: ld.lld -no-rosegment -o %t1 %t -shared # RUN: llvm-readobj -elf-output-style=GNU -s %t1 | FileCheck %s -# CHECK: .text {{.*}} AX -# CHECK-NEXT: .dynsym {{.*}} A -# CHECK-NEXT: .hash {{.*}} A -# CHECK-NEXT: .dynstr {{.*}} A -# CHECK-NEXT: foo {{.*}} WA -# CHECK-NEXT: .dynamic {{.*}} WA +# CHECK: .text {{.*}} AX +# CHECK-NEXT: .dynsym {{.*}} A +# CHECK-NEXT: .gnu.hash {{.*}} A +# CHECK-NEXT: .hash {{.*}} A +# CHECK-NEXT: .dynstr {{.*}} A +# CHECK-NEXT: foo {{.*}} WA +# CHECK-NEXT: .dynamic {{.*}} WA .section foo, "aw" .byte 0 Index: test/ELF/startstop.s =================================================================== --- test/ELF/startstop.s +++ test/ELF/startstop.s @@ -22,10 +22,10 @@ // SYMBOL: Relocations [ // SYMBOL-NEXT: Section ({{.*}}) .rela.dyn { -// SYMBOL-NEXT: 0x2010 R_X86_64_64 __stop_zed1 0x0 -// SYMBOL-NEXT: 0x2018 R_X86_64_64 __stop_zed1 0x1 // SYMBOL-NEXT: 0x2000 R_X86_64_64 __stop_zed2 0x0 // SYMBOL-NEXT: 0x2008 R_X86_64_64 __stop_zed2 0x1 +// SYMBOL-NEXT: 0x2010 R_X86_64_64 __stop_zed1 0x0 +// SYMBOL-NEXT: 0x2018 R_X86_64_64 __stop_zed1 0x1 // SYMBOL-NEXT: } // SYMBOL-NEXT: ] Index: test/ELF/synthetic-got.s =================================================================== --- test/ELF/synthetic-got.s +++ test/ELF/synthetic-got.s @@ -7,13 +7,13 @@ # RUN: | FileCheck %s --check-prefix=GOTDATA # GOT: Sections: -# GOT: 8 .got.plt 00000020 00000000000000e0 DATA -# GOT: 10 .got 00000008 00000000000001d0 DATA +# GOT: .got.plt 00000020 00000000000000f0 DATA +# GOT: .got 00000008 00000000000001f0 DATA # GOTDATA: Contents of section .got.plt: -# GOTDATA-NEXT: 00e0 00010000 00000000 00000000 00000000 -# GOTDATA-NEXT: 00f0 00000000 00000000 d6000000 00000000 +# GOTDATA-NEXT: 00f0 10010000 00000000 00000000 00000000 +# GOTDATA-NEXT: 0100 00000000 00000000 e6000000 00000000 # GOTDATA-NEXT: Contents of section .got: -# GOTDATA-NEXT: 01d0 00000000 00000000 +# GOTDATA-NEXT: 01f0 00000000 00000000 # RUN: echo "SECTIONS { .mygot : { *(.got) *(.got.plt) } }" > %t1.script # RUN: ld.lld -shared %t.o -o %t1.out --script %t1.script @@ -21,12 +21,12 @@ # RUN: llvm-objdump -s -section=.mygot %t1.out | FileCheck %s --check-prefix=MYGOTDATA # MYGOT: Sections: -# MYGOT: 8 .mygot 00000028 00000000000000e0 DATA +# MYGOT: .mygot 00000028 00000000000000f0 DATA # MYGOT-NOT: .got # MYGOT-NOT: .got.plt -# MYGOTDATA: 00e0 00000000 00000000 08010000 00000000 -# MYGOTDATA-NEXT: 00f0 00000000 00000000 00000000 00000000 -# MYGOTDATA-NEXT: 0100 d6000000 00000000 +# MYGOTDATA: 00f0 00000000 00000000 18010000 00000000 +# MYGOTDATA-NEXT: 0100 00000000 00000000 00000000 00000000 +# MYGOTDATA-NEXT: 0110 e6000000 00000000 mov bar@gotpcrel(%rip), %rax call foo@plt Index: test/ELF/tls-dynamic-i686.s =================================================================== --- test/ELF/tls-dynamic-i686.s +++ test/ELF/tls-dynamic-i686.s @@ -56,8 +56,8 @@ // CHECK-NEXT: SHF_ALLOC // CHECK-NEXT: SHF_WRITE // CHECK-NEXT: ] -// CHECK-NEXT: Address: 0x3068 -// CHECK-NEXT: Offset: 0x3068 +// CHECK-NEXT: Address: 0x3070 +// CHECK-NEXT: Offset: 0x3070 // CHECK-NEXT: Size: 32 // CHECK-NEXT: Link: 0 // CHECK-NEXT: Info: 0 @@ -66,13 +66,13 @@ // CHECK: Relocations [ // CHECK: Section ({{.+}}) .rel.dyn { -// CHECK-NEXT: 0x3078 R_386_TLS_DTPMOD32 - 0x0 -// CHECK-NEXT: 0x3068 R_386_TLS_DTPMOD32 tls0 0x0 -// CHECK-NEXT: 0x306C R_386_TLS_DTPOFF32 tls0 0x0 -// CHECK-NEXT: 0x3080 R_386_TLS_TPOFF tls0 0x0 -// CHECK-NEXT: 0x3070 R_386_TLS_DTPMOD32 tls1 0x0 -// CHECK-NEXT: 0x3074 R_386_TLS_DTPOFF32 tls1 0x0 -// CHECK-NEXT: 0x3084 R_386_TLS_TPOFF tls1 0x0 +// CHECK-NEXT: 0x3080 R_386_TLS_DTPMOD32 - 0x0 +// CHECK-NEXT: 0x3078 R_386_TLS_DTPMOD32 tls1 0x0 +// CHECK-NEXT: 0x307C R_386_TLS_DTPOFF32 tls1 0x0 +// CHECK-NEXT: 0x308C R_386_TLS_TPOFF tls1 0x0 +// CHECK-NEXT: 0x3070 R_386_TLS_DTPMOD32 tls0 0x0 +// CHECK-NEXT: 0x3074 R_386_TLS_DTPOFF32 tls0 0x0 +// CHECK-NEXT: 0x3088 R_386_TLS_TPOFF tls0 0x0 // CHECK-NEXT: } // DIS: Disassembly of section .text: Index: test/ELF/tls-dynamic.s =================================================================== --- test/ELF/tls-dynamic.s +++ test/ELF/tls-dynamic.s @@ -48,28 +48,28 @@ // CHECK-NEXT: SHF_ALLOC // CHECK-NEXT: SHF_WRITE // CHECK-NEXT: ] -// CHECK-NEXT: Address: 0x30D0 +// CHECK-NEXT: Address: 0x30E0 // CHECK-NEXT: Offset: // CHECK-NEXT: Size: 40 // CHECK: Relocations [ // CHECK: Section ({{.+}}) .rela.dyn { -// CHECK-NEXT: 0x30D0 R_X86_64_DTPMOD64 - 0x0 -// CHECK-NEXT: 0x30E0 R_X86_64_DTPMOD64 c 0x0 -// CHECK-NEXT: 0x30E8 R_X86_64_DTPOFF64 c 0x0 -// CHECK-NEXT: 0x30F0 R_X86_64_TPOFF64 c 0x0 +// CHECK-NEXT: 0x30E0 R_X86_64_DTPMOD64 - 0x0 +// CHECK-NEXT: 0x30F0 R_X86_64_DTPMOD64 c 0x0 +// CHECK-NEXT: 0x30F8 R_X86_64_DTPOFF64 c 0x0 +// CHECK-NEXT: 0x3100 R_X86_64_TPOFF64 c 0x0 // CHECK-NEXT: } -// 4297 = (0x20D0 + -4) - (0x1000 + 3) // PC relative offset to got entry. -// 4285 = (0x20D0 + -4) - (0x100c + 3) // PC relative offset to got entry. -// 4267 = (0x20E0 + -4) - (0x102e + 3) // PC relative offset to got entry. -// 4263 = (0x20F0 + -4) - (0x1042 + 3) // PC relative offset to got entry. +// 8409 = (0x30E0 + -4) - (0x1000 + 3) // PC relative offset to got entry. +// 8397 = (0x30E0 + -4) - (0x100c + 3) // PC relative offset to got entry. +// 8379 = (0x30F0 + -4) - (0x102e + 3) // PC relative offset to got entry. +// 8375 = (0x3100 + -4) - (0x1042 + 3) // PC relative offset to got entry. // DIS: Disassembly of section .text: // DIS-NEXT: .text: -// DIS-NEXT: 1000: {{.+}} leaq 8393(%rip), %rdi +// DIS-NEXT: 1000: {{.+}} leaq 8409(%rip), %rdi // DIS-NEXT: 1007: {{.+}} callq -// DIS-NEXT: 100c: {{.+}} leaq 8381(%rip), %rdi +// DIS-NEXT: 100c: {{.+}} leaq 8397(%rip), %rdi // DIS-NEXT: 1013: {{.+}} callq // DIS-NEXT: 1018: {{.+}} leaq (%rax), %rcx // DIS-NEXT: 101f: {{.+}} leaq 4(%rax), %rcx @@ -77,10 +77,10 @@ // DIS-NEXT: 1028: 00 00 // DIS-NEXT: 102a: 00 00 // DIS-NEXT: 102c: 00 00 -// DIS-NEXT: 102e: {{.+}} leaq 8363(%rip), %rdi +// DIS-NEXT: 102e: {{.+}} leaq 8379(%rip), %rdi // DIS-NEXT: 1035: {{.+}} callq // DIS-NEXT: 103b: {{.+}} leaq (%rax), %rcx -// DIS-NEXT: 1042: {{.+}} movq 8359(%rip), %rax +// DIS-NEXT: 1042: {{.+}} movq 8375(%rip), %rax // DIS-NEXT: 1049: {{.+}} movq %fs:(%rax), %rax // DIS-NEXT: 104d: {{.+}} movabsq $0, %rax // DIS-NEXT: 1057: {{.+}} movabsq $4, %rax Index: test/ELF/tls-got.s =================================================================== --- test/ELF/tls-got.s +++ test/ELF/tls-got.s @@ -6,7 +6,7 @@ // RUN: llvm-objdump -d %t3 | FileCheck --check-prefix=DISASM %s // CHECK: Section { -// CHECK: Index: 8 +// CHECK: Index: 9 // CHECK-NEXT: Name: .got // CHECK-NEXT: Type: SHT_PROGBITS // CHECK-NEXT: Flags [ @@ -14,7 +14,7 @@ // CHECK-NEXT: SHF_WRITE // CHECK-NEXT: ] // CHECK-NEXT: Address: [[ADDR:.*]] -// CHECK-NEXT: Offset: 0x20B0 +// CHECK-NEXT: Offset: 0x20C0 // CHECK-NEXT: Size: 16 // CHECK-NEXT: Link: 0 // CHECK-NEXT: Info: 0 @@ -23,24 +23,24 @@ // CHECK-NEXT: } // CHECK: Relocations [ -// CHECK-NEXT: Section (4) .rela.dyn { -// CHECK-NEXT: 0x2020B8 R_X86_64_TPOFF64 tls0 0x0 +// CHECK-NEXT: Section {{.*}} .rela.dyn { +// CHECK-NEXT: 0x2020C8 R_X86_64_TPOFF64 tls0 0x0 // CHECK-NEXT: [[ADDR]] R_X86_64_TPOFF64 tls1 0x0 // CHECK-NEXT: } // CHECK-NEXT: ] -//0x201000 + 4249 + 7 = 0x2020B0 -//0x20100A + 4247 + 7 = 0x2020B8 -//0x201014 + 4237 + 7 = 0x2020B8 +//0x201000 + 4281 + 7 = 0x2020C0 +//0x20100A + 4279 + 7 = 0x2020C8 +//0x201014 + 4269 + 7 = 0x2020C8 //DISASM: Disassembly of section .text: //DISASM-NEXT: main: -//DISASM-NEXT: 201000: 48 8b 05 a9 10 00 00 movq 4265(%rip), %rax -//DISASM-NEXT: 201007: 64 8b 00 movl %fs:(%rax), %eax -//DISASM-NEXT: 20100a: 48 8b 05 a7 10 00 00 movq 4263(%rip), %rax -//DISASM-NEXT: 201011: 64 8b 00 movl %fs:(%rax), %eax -//DISASM-NEXT: 201014: 48 8b 05 9d 10 00 00 movq 4253(%rip), %rax -//DISASM-NEXT: 20101b: 64 8b 00 movl %fs:(%rax), %eax -//DISASM-NEXT: 20101e: c3 retq +//DISASM-NEXT: 201000: {{.*}} movq 4281(%rip), %rax +//DISASM-NEXT: 201007: {{.*}} movl %fs:(%rax), %eax +//DISASM-NEXT: 20100a: {{.*}} movq 4279(%rip), %rax +//DISASM-NEXT: 201011: {{.*}} movl %fs:(%rax), %eax +//DISASM-NEXT: 201014: {{.*}} movq 4269(%rip), %rax +//DISASM-NEXT: 20101b: {{.*}} movl %fs:(%rax), %eax +//DISASM-NEXT: 20101e: {{.*}} retq .section .tdata,"awT",@progbits Index: test/ELF/tls-i686.s =================================================================== --- test/ELF/tls-i686.s +++ test/ELF/tls-i686.s @@ -60,7 +60,7 @@ // DISSHARED-NEXT: 1030: 8d 81 7b 00 00 00 leal 123(%ecx), %eax // RELOCSHARED: Relocations [ -// RELOCSHARED-NEXT: Section (4) .rel.dyn { +// RELOCSHARED-NEXT: Section ({{.*}}) .rel.dyn { // RELOCSHARED-NEXT: 0x1001 R_386_TLS_TPOFF32 var 0x0 // RELOCSHARED-NEXT: 0x1025 R_386_TLS_TPOFF var 0x0 // RELOCSHARED-NEXT: 0x100F R_386_TLS_TPOFF32 var1 0x0 Index: test/ELF/tls-initial-exec-local.s =================================================================== --- test/ELF/tls-initial-exec-local.s +++ test/ELF/tls-initial-exec-local.s @@ -10,21 +10,21 @@ // CHECK-NEXT: SHF_ALLOC (0x2) // CHECK-NEXT: SHF_WRITE (0x1) // CHECK-NEXT: ] -// CHECK-NEXT: Address: 0x2090 +// CHECK-NEXT: Address: 0x20A0 // CHECK: Relocations [ // CHECK-NEXT: Section ({{.*}}) .rela.dyn { -// CHECK-NEXT: 0x2090 R_X86_64_TPOFF64 - 0x0 -// CHECK-NEXT: 0x2098 R_X86_64_TPOFF64 - 0x4 +// CHECK-NEXT: 0x20A0 R_X86_64_TPOFF64 - 0x0 +// CHECK-NEXT: 0x20A8 R_X86_64_TPOFF64 - 0x4 // CHECK-NEXT: } // CHECK-NEXT: ] -// 0x1007 + 4233 = 0x2090 -// 0x100e + 4234 = 0x2098 +// 0x1007 + 4249 = 0x2090 +// 0x100e + 4250 = 0x2098 // DISASM: Disassembly of section .text: // DISASM-NEXT: .text: -// DISASM-NEXT: 1000: {{.*}} addq 4233(%rip), %rax -// DISASM-NEXT: 1007: {{.*}} addq 4234(%rip), %rax +// DISASM-NEXT: 1000: {{.*}} addq 4249(%rip), %rax +// DISASM-NEXT: 1007: {{.*}} addq 4250(%rip), %rax addq foo@GOTTPOFF(%rip), %rax addq bar@GOTTPOFF(%rip), %rax Index: test/ELF/tls-opt-gdie.s =================================================================== --- test/ELF/tls-opt-gdie.s +++ test/ELF/tls-opt-gdie.s @@ -13,8 +13,8 @@ //RELOC-NEXT: SHF_ALLOC //RELOC-NEXT: SHF_WRITE //RELOC-NEXT: ] -//RELOC-NEXT: Address: 0x2020B0 -//RELOC-NEXT: Offset: 0x20B0 +//RELOC-NEXT: Address: 0x2020C0 +//RELOC-NEXT: Offset: 0x20C0 //RELOC-NEXT: Size: 16 //RELOC-NEXT: Link: 0 //RELOC-NEXT: Info: 0 @@ -22,20 +22,20 @@ //RELOC-NEXT: EntrySize: 0 //RELOC-NEXT: } //RELOC: Relocations [ -//RELOC-NEXT: Section (4) .rela.dyn { -//RELOC-NEXT: 0x2020B0 R_X86_64_TPOFF64 tlsshared0 0x0 -//RELOC-NEXT: 0x2020B8 R_X86_64_TPOFF64 tlsshared1 0x0 +//RELOC-NEXT: Section {{.*}} .rela.dyn { +//RELOC-NEXT: 0x2020C8 R_X86_64_TPOFF64 tlsshared1 0x0 +//RELOC-NEXT: 0x2020C0 R_X86_64_TPOFF64 tlsshared0 0x0 //RELOC-NEXT: } //RELOC-NEXT: ] -//0x201009 + (4256 + 7) = 0x2020B0 -//0x201019 + (4248 + 7) = 0x2020B8 +//0x201009 + (4272 + 7) = 0x2020C0 +//0x201019 + (4264 + 7) = 0x2020C8 // DISASM: Disassembly of section .text: // DISASM-NEXT: _start: // DISASM-NEXT: 201000: {{.*}} movq %fs:0, %rax -// DISASM-NEXT: 201009: {{.*}} addq 4256(%rip), %rax +// DISASM-NEXT: 201009: {{.*}} addq 4272(%rip), %rax // DISASM-NEXT: 201010: {{.*}} movq %fs:0, %rax -// DISASM-NEXT: 201019: {{.*}} addq 4248(%rip), %rax +// DISASM-NEXT: 201019: {{.*}} addq 4264(%rip), %rax .section .text .globl _start Index: test/ELF/tls-opt-gdiele-i686.s =================================================================== --- test/ELF/tls-opt-gdiele-i686.s +++ test/ELF/tls-opt-gdiele-i686.s @@ -7,8 +7,8 @@ // NORELOC: Relocations [ // NORELOC-NEXT: Section ({{.*}}) .rel.dyn { -// NORELOC-NEXT: 0x12058 R_386_TLS_TPOFF tlsshared0 0x0 -// NORELOC-NEXT: 0x1205C R_386_TLS_TPOFF tlsshared1 0x0 +// NORELOC-NEXT: 0x12060 R_386_TLS_TPOFF tlsshared0 0x0 +// NORELOC-NEXT: 0x12064 R_386_TLS_TPOFF tlsshared1 0x0 // NORELOC-NEXT: } // NORELOC-NEXT: ] Index: test/ELF/tls-opt-iele-i686-nopic.s =================================================================== --- test/ELF/tls-opt-iele-i686-nopic.s +++ test/ELF/tls-opt-iele-i686-nopic.s @@ -13,8 +13,8 @@ // GOTREL-NEXT: SHF_ALLOC // GOTREL-NEXT: SHF_WRITE // GOTREL-NEXT: ] -// GOTREL-NEXT: Address: 0x12058 -// GOTREL-NEXT: Offset: 0x2058 +// GOTREL-NEXT: Address: 0x12060 +// GOTREL-NEXT: Offset: 0x2060 // GOTREL-NEXT: Size: 8 // GOTREL-NEXT: Link: 0 // GOTREL-NEXT: Info: 0 @@ -23,8 +23,8 @@ // GOTREL-NEXT: } // GOTREL: Relocations [ // GOTREL-NEXT: Section ({{.*}}) .rel.dyn { -// GOTREL-NEXT: 0x12058 R_386_TLS_TPOFF tlsshared0 0x0 -// GOTREL-NEXT: 0x1205C R_386_TLS_TPOFF tlsshared1 0x0 +// GOTREL-NEXT: 0x12060 R_386_TLS_TPOFF tlsshared0 0x0 +// GOTREL-NEXT: 0x12064 R_386_TLS_TPOFF tlsshared1 0x0 // GOTREL-NEXT: } // GOTREL-NEXT: ] @@ -32,24 +32,24 @@ // DISASM-NEXT: _start: // 4294967288 = 0xFFFFFFF8 // 4294967292 = 0xFFFFFFFC -// 73808 = (.got)[0] = 0x12058 -// 73812 = (.got)[1] = 0x1205C -// DISASM-NEXT: 11000: c7 c1 f8 ff ff ff movl $4294967288, %ecx -// DISASM-NEXT: 11006: 65 8b 01 movl %gs:(%ecx), %eax -// DISASM-NEXT: 11009: b8 f8 ff ff ff movl $4294967288, %eax -// DISASM-NEXT: 1100e: 65 8b 00 movl %gs:(%eax), %eax -// DISASM-NEXT: 11011: 81 c1 f8 ff ff ff addl $4294967288, %ecx -// DISASM-NEXT: 11017: 65 8b 01 movl %gs:(%ecx), %eax -// DISASM-NEXT: 1101a: c7 c1 fc ff ff ff movl $4294967292, %ecx -// DISASM-NEXT: 11020: 65 8b 01 movl %gs:(%ecx), %eax -// DISASM-NEXT: 11023: b8 fc ff ff ff movl $4294967292, %eax -// DISASM-NEXT: 11028: 65 8b 00 movl %gs:(%eax), %eax -// DISASM-NEXT: 1102b: 81 c1 fc ff ff ff addl $4294967292, %ecx -// DISASM-NEXT: 11031: 65 8b 01 movl %gs:(%ecx), %eax -// DISASM-NEXT: 11034: 8b 0d 58 20 01 00 movl 73816, %ecx -// DISASM-NEXT: 1103a: 65 8b 01 movl %gs:(%ecx), %eax -// DISASM-NEXT: 1103d: 03 0d 5c 20 01 00 addl 73820, %ecx -// DISASM-NEXT: 11043: 65 8b 01 movl %gs:(%ecx), %eax +// 73824 = (.got)[0] = 0x12060 +// 73828 = (.got)[1] = 0x12064 +// DISASM-NEXT: 11000: {{.*}} movl $4294967288, %ecx +// DISASM-NEXT: 11006: {{.*}} movl %gs:(%ecx), %eax +// DISASM-NEXT: 11009: {{.*}} movl $4294967288, %eax +// DISASM-NEXT: 1100e: {{.*}} movl %gs:(%eax), %eax +// DISASM-NEXT: 11011: {{.*}} addl $4294967288, %ecx +// DISASM-NEXT: 11017: {{.*}} movl %gs:(%ecx), %eax +// DISASM-NEXT: 1101a: {{.*}} movl $4294967292, %ecx +// DISASM-NEXT: 11020: {{.*}} movl %gs:(%ecx), %eax +// DISASM-NEXT: 11023: {{.*}} movl $4294967292, %eax +// DISASM-NEXT: 11028: {{.*}} movl %gs:(%eax), %eax +// DISASM-NEXT: 1102b: {{.*}} addl $4294967292, %ecx +// DISASM-NEXT: 11031: {{.*}} movl %gs:(%ecx), %eax +// DISASM-NEXT: 11034: {{.*}} movl 73824, %ecx +// DISASM-NEXT: 1103a: {{.*}} movl %gs:(%ecx), %eax +// DISASM-NEXT: 1103d: {{.*}} addl 73828, %ecx +// DISASM-NEXT: 11043: {{.*}} movl %gs:(%ecx), %eax .type tlslocal0,@object .section .tbss,"awT",@nobits Index: test/ELF/tls-two-relocs.s =================================================================== --- test/ELF/tls-two-relocs.s +++ test/ELF/tls-two-relocs.s @@ -20,11 +20,11 @@ // Check that we handle two gd relocations to the same symbol. // CHECK: Relocations [ -// CHECK-NEXT: Section (4) .rela.dyn { +// CHECK-NEXT: Section ({{.*}}) .rela.dyn { // CHECK-NEXT: R_X86_64_DTPMOD64 g_tls_s 0x0 // CHECK-NEXT: R_X86_64_DTPOFF64 g_tls_s 0x0 // CHECK-NEXT: } -// CHECK-NEXT: Section (5) .rela.plt { +// CHECK-NEXT: Section ({{.*}}) .rela.plt { // CHECK-NEXT: R_X86_64_JUMP_SLOT __tls_get_addr 0x0 // CHECK-NEXT: } // CHECK-NEXT: ] Index: test/ELF/verdef-defaultver.s =================================================================== --- test/ELF/verdef-defaultver.s +++ test/ELF/verdef-defaultver.s @@ -17,8 +17,8 @@ # DSO-NEXT: Section: Undefined # DSO-NEXT: } # DSO-NEXT: Symbol { -# DSO-NEXT: Name: a@@V1 -# DSO-NEXT: Value: 0x1000 +# DSO-NEXT: Name: c@@V2 +# DSO-NEXT: Value: 0x1003 # DSO-NEXT: Size: 0 # DSO-NEXT: Binding: Global # DSO-NEXT: Type: Function @@ -26,8 +26,8 @@ # DSO-NEXT: Section: .text # DSO-NEXT: } # DSO-NEXT: Symbol { -# DSO-NEXT: Name: b@@V2 -# DSO-NEXT: Value: 0x1002 +# DSO-NEXT: Name: a@@V1 +# DSO-NEXT: Value: 0x1000 # DSO-NEXT: Size: 0 # DSO-NEXT: Binding: Global # DSO-NEXT: Type: Function @@ -35,8 +35,8 @@ # DSO-NEXT: Section: .text # DSO-NEXT: } # DSO-NEXT: Symbol { -# DSO-NEXT: Name: b@V1 -# DSO-NEXT: Value: 0x1001 +# DSO-NEXT: Name: b@@V2 +# DSO-NEXT: Value: 0x1002 # DSO-NEXT: Size: 0 # DSO-NEXT: Binding: Global # DSO-NEXT: Type: Function @@ -44,8 +44,8 @@ # DSO-NEXT: Section: .text # DSO-NEXT: } # DSO-NEXT: Symbol { -# DSO-NEXT: Name: c@@V2 -# DSO-NEXT: Value: 0x1003 +# DSO-NEXT: Name: b@V1 +# DSO-NEXT: Value: 0x1001 # DSO-NEXT: Size: 0 # DSO-NEXT: Binding: Global # DSO-NEXT: Type: Function @@ -64,6 +64,10 @@ # DSO-NEXT: Name: @ # DSO-NEXT: } # DSO-NEXT: Symbol { +# DSO-NEXT: Version: 3 +# DSO-NEXT: Name: c@@V2 +# DSO-NEXT: } +# DSO-NEXT: Symbol { # DSO-NEXT: Version: 2 # DSO-NEXT: Name: a@@V1 # DSO-NEXT: } @@ -75,10 +79,6 @@ # DSO-NEXT: Version: 2 # DSO-NEXT: Name: b@V1 # DSO-NEXT: } -# DSO-NEXT: Symbol { -# DSO-NEXT: Version: 3 -# DSO-NEXT: Name: c@@V2 -# DSO-NEXT: } # DSO-NEXT: ] # DSO-NEXT: } # DSO-NEXT: SHT_GNU_verdef { @@ -121,8 +121,8 @@ # EXE-NEXT: Section: Undefined # EXE-NEXT: } # EXE-NEXT: Symbol { -# EXE-NEXT: Name: a@V1 -# EXE-NEXT: Value: 0x201020 +# EXE-NEXT: Name: c@V2 +# EXE-NEXT: Value: 0x201040 # EXE-NEXT: Size: 0 # EXE-NEXT: Binding: Global # EXE-NEXT: Type: Function @@ -130,8 +130,8 @@ # EXE-NEXT: Section: Undefined # EXE-NEXT: } # EXE-NEXT: Symbol { -# EXE-NEXT: Name: b@V2 -# EXE-NEXT: Value: 0x201030 +# EXE-NEXT: Name: a@V1 +# EXE-NEXT: Value: 0x201020 # EXE-NEXT: Size: 0 # EXE-NEXT: Binding: Global # EXE-NEXT: Type: Function @@ -139,8 +139,8 @@ # EXE-NEXT: Section: Undefined # EXE-NEXT: } # EXE-NEXT: Symbol { -# EXE-NEXT: Name: c@V2 -# EXE-NEXT: Value: 0x201040 +# EXE-NEXT: Name: b@V2 +# EXE-NEXT: Value: 0x201030 # EXE-NEXT: Size: 0 # EXE-NEXT: Binding: Global # EXE-NEXT: Type: Function @@ -159,6 +159,10 @@ # EXE-NEXT: Name: @ # EXE-NEXT: } # EXE-NEXT: Symbol { +# EXE-NEXT: Version: 3 +# EXE-NEXT: Name: c@V2 +# EXE-NEXT: } +# EXE-NEXT: Symbol { # EXE-NEXT: Version: 2 # EXE-NEXT: Name: a@V1 # EXE-NEXT: } @@ -166,10 +170,6 @@ # EXE-NEXT: Version: 3 # EXE-NEXT: Name: b@V2 # EXE-NEXT: } -# EXE-NEXT: Symbol { -# EXE-NEXT: Version: 3 -# EXE-NEXT: Name: c@V2 -# EXE-NEXT: } # EXE-NEXT: ] # EXE-NEXT: } # EXE-NEXT: SHT_GNU_verdef { Index: test/ELF/verdef.s =================================================================== --- test/ELF/verdef.s +++ test/ELF/verdef.s @@ -17,6 +17,10 @@ # DSO-NEXT: Name: @ # DSO-NEXT: } # DSO-NEXT: Symbol { +# DSO-NEXT: Version: 4 +# DSO-NEXT: Name: c@@LIBSAMPLE_3.0 +# DSO-NEXT: } +# DSO-NEXT: Symbol { # DSO-NEXT: Version: 2 # DSO-NEXT: Name: a@@LIBSAMPLE_1.0 # DSO-NEXT: } @@ -24,10 +28,6 @@ # DSO-NEXT: Version: 3 # DSO-NEXT: Name: b@@LIBSAMPLE_2.0 # DSO-NEXT: } -# DSO-NEXT: Symbol { -# DSO-NEXT: Version: 4 -# DSO-NEXT: Name: c@@LIBSAMPLE_3.0 -# DSO-NEXT: } # DSO-NEXT: ] # DSO-NEXT: } # DSO-NEXT: SHT_GNU_verdef { @@ -79,6 +79,10 @@ # MAIN-NEXT: Name: @ # MAIN-NEXT: } # MAIN-NEXT: Symbol { +# MAIN-NEXT: Version: 4 +# MAIN-NEXT: Name: c@LIBSAMPLE_3.0 +# MAIN-NEXT: } +# MAIN-NEXT: Symbol { # MAIN-NEXT: Version: 2 # MAIN-NEXT: Name: a@LIBSAMPLE_1.0 # MAIN-NEXT: } @@ -86,10 +90,6 @@ # MAIN-NEXT: Version: 3 # MAIN-NEXT: Name: b@LIBSAMPLE_2.0 # MAIN-NEXT: } -# MAIN-NEXT: Symbol { -# MAIN-NEXT: Version: 4 -# MAIN-NEXT: Name: c@LIBSAMPLE_3.0 -# MAIN-NEXT: } # MAIN-NEXT: ] # MAIN-NEXT: } # MAIN-NEXT: SHT_GNU_verdef { Index: test/ELF/verneed.s =================================================================== --- test/ELF/verneed.s +++ test/ELF/verneed.s @@ -13,7 +13,7 @@ # CHECK-NEXT: Address: 0x2001C8 # CHECK-NEXT: Offset: 0x1C8 # CHECK-NEXT: Size: 96 -# CHECK-NEXT: Link: 5 +# CHECK-NEXT: Link: 6 # CHECK-NEXT: Info: 1 # CHECK-NEXT: AddressAlignment: 8 # CHECK-NEXT: EntrySize: 24 @@ -41,19 +41,19 @@ # CHECK-NEXT: Address: 0x200230 # CHECK-NEXT: Offset: 0x230 # CHECK-NEXT: Size: 80 -# CHECK-NEXT: Link: 5 +# CHECK-NEXT: Link: 6 # CHECK-NEXT: Info: 2 # CHECK-NEXT: AddressAlignment: 4 # CHECK-NEXT: EntrySize: 0 # CHECK: Section { -# CHECK: Index: 5 +# CHECK: Index: 6 # CHECK-NEXT: Name: .dynstr # CHECK-NEXT: Type: SHT_STRTAB # CHECK-NEXT: Flags [ (0x2) # CHECK-NEXT: SHF_ALLOC (0x2) # CHECK-NEXT: ] -# CHECK-NEXT: Address: 0x2002A8 -# CHECK-NEXT: Offset: 0x2A8 +# CHECK-NEXT: Address: 0x2002D8 +# CHECK-NEXT: Offset: 0x2D8 # CHECK-NEXT: Size: 47 # CHECK-NEXT: Link: 0 # CHECK-NEXT: Info: 0 @@ -86,7 +86,7 @@ # CHECK-NEXT: Section: Undefined (0x0) # CHECK-NEXT: } # CHECK-NEXT: Symbol { -# CHECK-NEXT: Name: f2@v2 +# CHECK-NEXT: Name: g1@v1 # CHECK-NEXT: Value: 0x0 # CHECK-NEXT: Size: 0 # CHECK-NEXT: Binding: Global (0x1) @@ -95,7 +95,7 @@ # CHECK-NEXT: Section: Undefined (0x0) # CHECK-NEXT: } # CHECK-NEXT: Symbol { -# CHECK-NEXT: Name: g1@v1 +# CHECK-NEXT: Name: f2@v2 # CHECK-NEXT: Value: 0x0 # CHECK-NEXT: Size: 0 # CHECK-NEXT: Binding: Global (0x1) @@ -124,13 +124,13 @@ # CHECK-NEXT: Name: f1@v3 # CHECK-NEXT: } # CHECK-NEXT: Symbol { -# CHECK-NEXT: Version: 3 -# CHECK-NEXT: Name: f2@v2 -# CHECK-NEXT: } -# CHECK-NEXT: Symbol { # CHECK-NEXT: Version: 4 # CHECK-NEXT: Name: g1@v1 # CHECK-NEXT: } +# CHECK-NEXT: Symbol { +# CHECK-NEXT: Version: 3 +# CHECK-NEXT: Name: f2@v2 +# CHECK-NEXT: } # CHECK-NEXT: ] # CHECK-NEXT: } # CHECK-NEXT: SHT_GNU_verdef { Index: test/ELF/version-script-extern.s =================================================================== --- test/ELF/version-script-extern.s +++ test/ELF/version-script-extern.s @@ -45,7 +45,7 @@ # DSO-NEXT: Binding: Global (0x1) # DSO-NEXT: Type: Function (0x2) # DSO-NEXT: Other: 0 -# DSO-NEXT: Section: .text (0x6) +# DSO-NEXT: Section: .text # DSO-NEXT: } # DSO-NEXT: Symbol { # DSO-NEXT: Name: _ZN3abcC1Ev@@LIBSAMPLE_1.0 @@ -54,7 +54,7 @@ # DSO-NEXT: Binding: Global (0x1) # DSO-NEXT: Type: Function (0x2) # DSO-NEXT: Other: 0 -# DSO-NEXT: Section: .text (0x6) +# DSO-NEXT: Section: .text # DSO-NEXT: } # DSO-NEXT: Symbol { # DSO-NEXT: Name: _ZN3abcC2Ev@@LIBSAMPLE_1.0 @@ -63,7 +63,7 @@ # DSO-NEXT: Binding: Global (0x1) # DSO-NEXT: Type: Function (0x2) # DSO-NEXT: Other: 0 -# DSO-NEXT: Section: .text (0x6) +# DSO-NEXT: Section: .text # DSO-NEXT: } # DSO-NEXT: ] # DSO-NEXT: Version symbols { Index: test/ELF/version-script.s =================================================================== --- test/ELF/version-script.s +++ test/ELF/version-script.s @@ -161,25 +161,25 @@ # ALL-NEXT: Section: Undefined # ALL-NEXT: } # ALL-NEXT: Symbol { -# ALL-NEXT: Name: _start@ +# ALL-NEXT: Name: bar@ # ALL-NEXT: Value: # ALL-NEXT: Size: 0 # ALL-NEXT: Binding: Global -# ALL-NEXT: Type: None +# ALL-NEXT: Type: Function # ALL-NEXT: Other: 0 -# ALL-NEXT: Section: .text +# ALL-NEXT: Section: Undefined # ALL-NEXT: } # ALL-NEXT: Symbol { -# ALL-NEXT: Name: bar@ +# ALL-NEXT: Name: foo1@ # ALL-NEXT: Value: # ALL-NEXT: Size: 0 # ALL-NEXT: Binding: Global -# ALL-NEXT: Type: Function +# ALL-NEXT: Type: None # ALL-NEXT: Other: 0 -# ALL-NEXT: Section: Undefined +# ALL-NEXT: Section: .text # ALL-NEXT: } # ALL-NEXT: Symbol { -# ALL-NEXT: Name: foo1@ +# ALL-NEXT: Name: _start@ # ALL-NEXT: Value: # ALL-NEXT: Size: 0 # ALL-NEXT: Binding: Global Index: test/ELF/x86-64-relax-got-abs.s =================================================================== --- test/ELF/x86-64-relax-got-abs.s +++ test/ELF/x86-64-relax-got-abs.s @@ -7,7 +7,7 @@ // We used to fail trying to relax this into a pc relocation to an absolute // value. -// CHECK: movq 4185(%rip), %rax +// CHECK: movq 4201(%rip), %rax movq bar@GOTPCREL(%rip), %rax .data Index: test/ELF/x86-64-tls-gd-local.s =================================================================== --- test/ELF/x86-64-tls-gd-local.s +++ test/ELF/x86-64-tls-gd-local.s @@ -34,8 +34,8 @@ // CHECK-NEXT: SHF_ALLOC (0x2) // CHECK-NEXT: SHF_WRITE (0x1) // CHECK-NEXT: ] -// CHECK-NEXT: Address: 0x30D0 -// CHECK-NEXT: Offset: 0x30D0 +// CHECK-NEXT: Address: 0x30E0 +// CHECK-NEXT: Offset: 0x30E0 // CHECK-NEXT: Size: 32 // CHECK-NEXT: Link: 0 // CHECK-NEXT: Info: 0 @@ -47,6 +47,6 @@ // CHECK-NEXT: ) // CHECK: Section ({{.*}}) .rela.dyn { -// CHECK-NEXT: 0x30D0 R_X86_64_DTPMOD64 - 0x0 // CHECK-NEXT: 0x30E0 R_X86_64_DTPMOD64 - 0x0 +// CHECK-NEXT: 0x30F0 R_X86_64_DTPMOD64 - 0x0 // CHECK-NEXT: }