Index: lld/trunk/ELF/Writer.cpp =================================================================== --- lld/trunk/ELF/Writer.cpp +++ lld/trunk/ELF/Writer.cpp @@ -2218,8 +2218,7 @@ // previous segment anyway. // // TODO Enable this technique on all targets. - bool enable = config->emachine != EM_HEXAGON && - config->emachine != EM_X86_64; + bool enable = config->emachine != EM_HEXAGON; if (!enable || (config->zSeparateCode && prev && Index: lld/trunk/test/ELF/Inputs/copy-rel-abs.s =================================================================== --- lld/trunk/test/ELF/Inputs/copy-rel-abs.s +++ lld/trunk/test/ELF/Inputs/copy-rel-abs.s @@ -10,4 +10,4 @@ .weak zed .type zed, @object - zed = 0x1000 + zed = 0x1288 Index: lld/trunk/test/ELF/Inputs/copy-rel-tls.s =================================================================== --- lld/trunk/test/ELF/Inputs/copy-rel-tls.s +++ lld/trunk/test/ELF/Inputs/copy-rel-tls.s @@ -6,7 +6,7 @@ .section .tbss,"awT",@nobits .global tfoo -.skip 0x2000 +.skip 0x3358 .type tfoo,@object .size tfoo, 4 tfoo: Index: lld/trunk/test/ELF/abs-hidden.s =================================================================== --- lld/trunk/test/ELF/abs-hidden.s +++ lld/trunk/test/ELF/abs-hidden.s @@ -8,11 +8,11 @@ # CHECK: There are no relocations in this file. # CHECK: section '.got': -# CHECK: 0x00001070 2a000000 00000000 +# CHECK: 0x000022b8 2a000000 00000000 -## .got - (.data+8) = 0xfffff068 +## .got - (.data+8) = 0xfffff0ef # CHECK: section '.data': -# CHECK: 0x00002000 2a000000 00000000 68f0ffff +# CHECK: 0x000032c0 2a000000 00000000 f0efffff .data .quad foo Index: lld/trunk/test/ELF/apply-dynamic-relocs.s =================================================================== --- lld/trunk/test/ELF/apply-dynamic-relocs.s +++ lld/trunk/test/ELF/apply-dynamic-relocs.s @@ -14,7 +14,7 @@ # CHECK: Name: .got # CHECK: Address: 0x[[GOT:.*]] # CHECK: SectionData ( -# APPLY-NEXT: 0000: 00200000 00000000 | +# APPLY-NEXT: 0000: 30220000 00000000 | # NOAPPLY-NEXT: 0000: 00000000 00000000 | # CHECK-NEXT: ) @@ -25,7 +25,7 @@ # CHECK-NEXT: ] # CHECK: Type: PT_DYNAMIC -# CHECK-NEXT: Offset: 0x[[ADDEND]] +# CHECK-NEXT: Offset: 0x230 # CHECK-NEXT: VirtualAddress: 0x[[ADDEND]] # CHECK-NEXT: PhysicalAddress: 0x[[ADDEND]] Index: lld/trunk/test/ELF/avoid-empty-program-headers.s =================================================================== --- lld/trunk/test/ELF/avoid-empty-program-headers.s +++ lld/trunk/test/ELF/avoid-empty-program-headers.s @@ -39,9 +39,9 @@ // CHECK-NEXT: } // CHECK-NEXT: ProgramHeader { // CHECK-NEXT: Type: PT_LOAD (0x1) -// CHECK-NEXT: Offset: 0x1000 -// CHECK-NEXT: VirtualAddress: 0x201000 -// CHECK-NEXT: PhysicalAddress: 0x201000 +// CHECK-NEXT: Offset: 0x158 +// CHECK-NEXT: VirtualAddress: 0x201158 +// CHECK-NEXT: PhysicalAddress: 0x201158 // CHECK-NEXT: FileSize: 1 // CHECK-NEXT: MemSize: 1 // CHECK-NEXT: Flags [ (0x5) @@ -52,9 +52,9 @@ // CHECK-NEXT: } // CHECK-NEXT: ProgramHeader { // CHECK-NEXT: Type: PT_TLS (0x7) -// CHECK-NEXT: Offset: 0x1001 -// CHECK-NEXT: VirtualAddress: 0x201001 -// CHECK-NEXT: PhysicalAddress: 0x201001 +// CHECK-NEXT: Offset: 0x159 +// CHECK-NEXT: VirtualAddress: 0x201159 +// CHECK-NEXT: PhysicalAddress: 0x201159 // CHECK-NEXT: FileSize: 0 // CHECK-NEXT: MemSize: 4 // CHECK-NEXT: Flags [ (0x4) Index: lld/trunk/test/ELF/basic.s =================================================================== --- lld/trunk/test/ELF/basic.s +++ lld/trunk/test/ELF/basic.s @@ -28,7 +28,7 @@ # CHECK-NEXT: Version: 1 # CHECK-NEXT: Entry: [[ENTRY:0x[0-9A-F]+]] # CHECK-NEXT: ProgramHeaderOffset: 0x40 -# CHECK-NEXT: SectionHeaderOffset: 0x1080 +# CHECK-NEXT: SectionHeaderOffset: 0x1A0 # CHECK-NEXT: Flags [ (0x0) # CHECK-NEXT: ] # CHECK-NEXT: HeaderSize: 64 @@ -61,8 +61,8 @@ # CHECK-NEXT: SHF_ALLOC (0x2) # CHECK-NEXT: SHF_EXECINSTR (0x4) # CHECK-NEXT: ] -# CHECK-NEXT: Address: 0x201000 -# CHECK-NEXT: Offset: 0x1000 +# CHECK-NEXT: Address: 0x201120 +# CHECK-NEXT: Offset: 0x120 # CHECK-NEXT: Size: 16 # CHECK-NEXT: Link: 0 # CHECK-NEXT: Info: 0 @@ -78,7 +78,7 @@ # CHECK-NEXT: SHF_STRINGS (0x20) # CHECK-NEXT: ] # CHECK-NEXT: Address: 0x0 -# CHECK-NEXT: Offset: 0x1010 +# CHECK-NEXT: Offset: 0x130 # CHECK-NEXT: Size: 8 # CHECK-NEXT: Link: 0 # CHECK-NEXT: Info: 0 @@ -92,7 +92,7 @@ # CHECK-NEXT: Flags [ (0x0) # CHECK-NEXT: ] # CHECK-NEXT: Address: 0x0 -# CHECK-NEXT: Offset: 0x1018 +# CHECK-NEXT: Offset: 0x138 # CHECK-NEXT: Size: 48 # CHECK-NEXT: Link: 5 # CHECK-NEXT: Info: 1 @@ -106,7 +106,7 @@ # CHECK-NEXT: Flags [ (0x0) # CHECK-NEXT: ] # CHECK-NEXT: Address: 0x0 -# CHECK-NEXT: Offset: 0x1048 +# CHECK-NEXT: Offset: 0x168 # CHECK-NEXT: Size: 42 # CHECK-NEXT: Link: 0 # CHECK-NEXT: Info: 0 @@ -120,7 +120,7 @@ # CHECK-NEXT: Flags [ (0x0) # CHECK-NEXT: ] # CHECK-NEXT: Address: 0x0 -# CHECK-NEXT: Offset: 0x1072 +# CHECK-NEXT: Offset: 0x192 # CHECK-NEXT: Size: 8 # CHECK-NEXT: Link: 0 # CHECK-NEXT: Info: 0 @@ -175,9 +175,9 @@ # CHECK-NEXT: } # CHECK-NEXT: ProgramHeader { # CHECK-NEXT: Type: PT_LOAD (0x1) -# CHECK-NEXT: Offset: 0x1000 -# CHECK-NEXT: VirtualAddress: 0x201000 -# CHECK-NEXT: PhysicalAddress: 0x201000 +# CHECK-NEXT: Offset: 0x120 +# CHECK-NEXT: VirtualAddress: 0x201120 +# CHECK-NEXT: PhysicalAddress: 0x201120 # CHECK-NEXT: FileSize: 16 # CHECK-NEXT: MemSize: 16 # CHECK-NEXT: Flags [ (0x5) Index: lld/trunk/test/ELF/build-id.s =================================================================== --- lld/trunk/test/ELF/build-id.s +++ lld/trunk/test/ELF/build-id.s @@ -65,15 +65,15 @@ # DEFAULT: Contents of section .note.test: # DEFAULT: Contents of section .note.gnu.build-id: # DEFAULT-NEXT: 04000000 08000000 03000000 474e5500 ............GNU. -# DEFAULT-NEXT: 605e19a6 30469e00 +# DEFAULT-NEXT: 7e8ddeff 3ed41fa3 # MD5: Contents of section .note.gnu.build-id: # MD5-NEXT: 04000000 10000000 03000000 474e5500 ............GNU. -# MD5-NEXT: adbf65c5 42b4a428 184fd7c9 099cdc29 +# MD5-NEXT: 7b00fd9e 054ceb4b 06f64d0e 482cb476 # SHA1: Contents of section .note.gnu.build-id: # SHA1-NEXT: 04000000 14000000 03000000 474e5500 ............GNU. -# SHA1-NEXT: fe148fd4 1add2878 6b298b61 5880148b +# SHA1-NEXT: 221a99da dd1d2bf3 05e48a91 dde8a0cb # UUID: Contents of section .note.gnu.build-id: # UUID-NEXT: 04000000 10000000 03000000 474e5500 ............GNU. Index: lld/trunk/test/ELF/cgprofile-bad-clusters.s =================================================================== --- lld/trunk/test/ELF/cgprofile-bad-clusters.s +++ lld/trunk/test/ELF/cgprofile-bad-clusters.s @@ -51,20 +51,20 @@ .fill 13, 1, 0 # CHECK: Name: B -# CHECK-NEXT: Value: 0x201011 +# CHECK-NEXT: Value: 0x201131 # CHECK: Name: C -# CHECK-NEXT: Value: 0x20100F +# CHECK-NEXT: Value: 0x20112F # CHECK: Name: D -# CHECK-NEXT: Value: 0x2013F9 +# CHECK-NEXT: Value: 0x201519 # CHECK: Name: E -# CHECK-NEXT: Value: 0x201010 +# CHECK-NEXT: Value: 0x201130 # CHECK: Name: F -# CHECK-NEXT: Value: 0x2017E1 +# CHECK-NEXT: Value: 0x201901 # CHECK: Name: G -# CHECK-NEXT: Value: 0x3017E0 +# CHECK-NEXT: Value: 0x301900 # CHECK: Name: H -# CHECK-NEXT: Value: 0x201000 +# CHECK-NEXT: Value: 0x201120 # CHECK: Name: I -# CHECK-NEXT: Value: 0x201001 +# CHECK-NEXT: Value: 0x201121 # CHECK: Name: A -# CHECK-NEXT: Value: 0x20100E +# CHECK-NEXT: Value: 0x20112E Index: lld/trunk/test/ELF/cgprofile-icf.s =================================================================== --- lld/trunk/test/ELF/cgprofile-icf.s +++ lld/trunk/test/ELF/cgprofile-icf.s @@ -35,19 +35,19 @@ retq # CHECK: Name: A -# CHECK-NEXT: Value: 0x201000 +# CHECK-NEXT: Value: 0x201120 # CHECK: Name: B -# CHECK-NEXT: Value: 0x201010 +# CHECK-NEXT: Value: 0x201130 # CHECK: Name: C -# CHECK-NEXT: Value: 0x201008 +# CHECK-NEXT: Value: 0x201128 # CHECK: Name: D -# CHECK-NEXT: Value: 0x201008 +# CHECK-NEXT: Value: 0x201128 # NOICF: Name: A -# NOICF-NEXT: Value: 0x201000 +# NOICF-NEXT: Value: 0x201120 # NOICF: Name: B -# NOICF-NEXT: Value: 0x201008 +# NOICF-NEXT: Value: 0x201128 # NOICF: Name: C -# NOICF-NEXT: Value: 0x201010 +# NOICF-NEXT: Value: 0x201130 # NOICF: Name: D -# NOICF-NEXT: Value: 0x201018 +# NOICF-NEXT: Value: 0x201138 Index: lld/trunk/test/ELF/cgprofile-obj.s =================================================================== --- lld/trunk/test/ELF/cgprofile-obj.s +++ lld/trunk/test/ELF/cgprofile-obj.s @@ -33,12 +33,12 @@ .cg_profile B, C, 30 .cg_profile C, D, 90 -# CHECK: 0000000000201003 t D -# CHECK: 0000000000201000 T A -# CHECK: 0000000000201001 T B -# CHECK: 0000000000201002 T C - -# NO-CG: 0000000000201000 t D -# NO-CG: 0000000000201003 T A -# NO-CG: 0000000000201002 T B -# NO-CG: 0000000000201001 T C +# CHECK: 0000000000201123 t D +# CHECK: 0000000000201120 T A +# CHECK: 0000000000201121 T B +# CHECK: 0000000000201122 T C + +# NO-CG: 0000000000201120 t D +# NO-CG: 0000000000201123 T A +# NO-CG: 0000000000201122 T B +# NO-CG: 0000000000201121 T C Index: lld/trunk/test/ELF/cgprofile-reproduce.s =================================================================== --- lld/trunk/test/ELF/cgprofile-reproduce.s +++ lld/trunk/test/ELF/cgprofile-reproduce.s @@ -10,13 +10,13 @@ # RUN: llvm-readobj --symbols %t2 | FileCheck %s # CHECK: Name: A -# CHECK-NEXT: Value: 0x201003 +# CHECK-NEXT: Value: 0x201123 # CHECK: Name: B -# CHECK-NEXT: Value: 0x201000 +# CHECK-NEXT: Value: 0x201120 # CHECK: Name: C -# CHECK-NEXT: Value: 0x201001 +# CHECK-NEXT: Value: 0x201121 # CHECK: Name: D -# CHECK-NEXT: Value: 0x201002 +# CHECK-NEXT: Value: 0x201122 .section .text.A,"ax",@progbits .globl A Index: lld/trunk/test/ELF/cgprofile-txt.s =================================================================== --- lld/trunk/test/ELF/cgprofile-txt.s +++ lld/trunk/test/ELF/cgprofile-txt.s @@ -135,51 +135,51 @@ retq # CHECK: Name: D -# CHECK-NEXT: Value: 0x201003 +# CHECK-NEXT: Value: 0x201123 # CHECK: Name: TooManyPreds -# CHECK-NEXT: Value: 0x201004 +# CHECK-NEXT: Value: 0x201124 # CHECK: Name: TooManyPreds10 -# CHECK-NEXT: Value: 0x201018 +# CHECK-NEXT: Value: 0x201138 # CHECK: Name: A -# CHECK-NEXT: Value: 0x201000 +# CHECK-NEXT: Value: 0x201120 # CHECK: Name: B -# CHECK-NEXT: Value: 0x201001 +# CHECK-NEXT: Value: 0x201121 # CHECK: Name: C -# CHECK-NEXT: Value: 0x201002 +# CHECK-NEXT: Value: 0x201122 # CHECK: Name: GB -# CHECK-NEXT: Value: 0x20101F +# CHECK-NEXT: Value: 0x20113F # CHECK: Name: PP -# CHECK-NEXT: Value: 0x20101C +# CHECK-NEXT: Value: 0x20113C # CHECK: Name: QC -# CHECK-NEXT: Value: 0x20101E +# CHECK-NEXT: Value: 0x20113E # CHECK: Name: TS -# CHECK-NEXT: Value: 0x20101D +# CHECK-NEXT: Value: 0x20113D # CHECK: Name: _init -# CHECK-NEXT: Value: 0x201020 +# CHECK-NEXT: Value: 0x201140 # CHECK: Name: _init2 -# CHECK-NEXT: Value: 0x201021 +# CHECK-NEXT: Value: 0x201141 # NOSORT: Name: D -# NOSORT-NEXT: Value: 0x201000 +# NOSORT-NEXT: Value: 0x201120 # NOSORT: Name: TooManyPreds -# NOSORT-NEXT: Value: 0x201004 +# NOSORT-NEXT: Value: 0x201124 # NOSORT: Name: TooManyPreds10 -# NOSORT-NEXT: Value: 0x201018 +# NOSORT-NEXT: Value: 0x201138 # NOSORT: Name: A -# NOSORT-NEXT: Value: 0x201003 +# NOSORT-NEXT: Value: 0x201123 # NOSORT: Name: B -# NOSORT-NEXT: Value: 0x201002 +# NOSORT-NEXT: Value: 0x201122 # NOSORT: Name: C -# NOSORT-NEXT: Value: 0x201001 +# NOSORT-NEXT: Value: 0x201121 # NOSORT: Name: GB -# NOSORT-NEXT: Value: 0x20101C +# NOSORT-NEXT: Value: 0x20113C # NOSORT: Name: PP -# NOSORT-NEXT: Value: 0x20101A +# NOSORT-NEXT: Value: 0x20113A # NOSORT: Name: QC -# NOSORT-NEXT: Value: 0x20101B +# NOSORT-NEXT: Value: 0x20113B # NOSORT: Name: TS -# NOSORT-NEXT: Value: 0x201019 +# NOSORT-NEXT: Value: 0x201139 # NOSORT: Name: _init -# NOSORT-NEXT: Value: 0x20101D +# NOSORT-NEXT: Value: 0x20113D # NOSORT: Name: _init2 -# NOSORT-NEXT: Value: 0x20101E +# NOSORT-NEXT: Value: 0x20113E Index: lld/trunk/test/ELF/cgprofile-txt2.s =================================================================== --- lld/trunk/test/ELF/cgprofile-txt2.s +++ lld/trunk/test/ELF/cgprofile-txt2.s @@ -9,13 +9,13 @@ # RUN: llvm-readobj --symbols %t2 | FileCheck %s # CHECK: Name: A -# CHECK-NEXT: Value: 0x201003 +# CHECK-NEXT: Value: 0x201123 # CHECK: Name: B -# CHECK-NEXT: Value: 0x201000 +# CHECK-NEXT: Value: 0x201120 # CHECK: Name: C -# CHECK-NEXT: Value: 0x201001 +# CHECK-NEXT: Value: 0x201121 # CHECK: Name: D -# CHECK-NEXT: Value: 0x201002 +# CHECK-NEXT: Value: 0x201122 .section .text.A,"ax",@progbits .globl A Index: lld/trunk/test/ELF/combreloc.s =================================================================== --- lld/trunk/test/ELF/combreloc.s +++ lld/trunk/test/ELF/combreloc.s @@ -14,12 +14,12 @@ # CHECK: Relocations [ # CHECK-NEXT: Section ({{.*}}) .rela.dyn { -# CHECK-NEXT: 0x3020 R_X86_64_RELATIVE - 0x3028 -# CHECK-NEXT: 0x20B0 R_X86_64_GLOB_DAT aaa 0x0 -# CHECK-NEXT: 0x3000 R_X86_64_64 aaa 0x0 -# CHECK-NEXT: 0x3018 R_X86_64_64 aaa 0x0 -# CHECK-NEXT: 0x3010 R_X86_64_64 bbb 0x0 -# CHECK-NEXT: 0x3008 R_X86_64_64 ccc 0x0 +# CHECK-NEXT: 0x3428 R_X86_64_RELATIVE - 0x3430 +# CHECK-NEXT: 0x2400 R_X86_64_GLOB_DAT aaa 0x0 +# CHECK-NEXT: 0x3408 R_X86_64_64 aaa 0x0 +# CHECK-NEXT: 0x3420 R_X86_64_64 aaa 0x0 +# CHECK-NEXT: 0x3418 R_X86_64_64 bbb 0x0 +# CHECK-NEXT: 0x3410 R_X86_64_64 ccc 0x0 # CHECK-NEXT: } # CHECK: DynamicSection [ # CHECK: RELACOUNT 1 @@ -29,12 +29,12 @@ # NOCOMB: Relocations [ # NOCOMB-NEXT: Section ({{.*}}) .rela.dyn { -# NOCOMB-NEXT: 0x3000 R_X86_64_64 aaa 0x0 -# NOCOMB-NEXT: 0x3008 R_X86_64_64 ccc 0x0 -# NOCOMB-NEXT: 0x3010 R_X86_64_64 bbb 0x0 -# NOCOMB-NEXT: 0x3018 R_X86_64_64 aaa 0x0 -# NOCOMB-NEXT: 0x3020 R_X86_64_RELATIVE - 0x3028 -# NOCOMB-NEXT: 0x20A0 R_X86_64_GLOB_DAT aaa 0x0 +# NOCOMB-NEXT: 0x33F8 R_X86_64_64 aaa 0x0 +# NOCOMB-NEXT: 0x3400 R_X86_64_64 ccc 0x0 +# NOCOMB-NEXT: 0x3408 R_X86_64_64 bbb 0x0 +# NOCOMB-NEXT: 0x3410 R_X86_64_64 aaa 0x0 +# NOCOMB-NEXT: 0x3418 R_X86_64_RELATIVE - 0x3420 +# NOCOMB-NEXT: 0x23F0 R_X86_64_GLOB_DAT aaa 0x0 # NOCOMB-NEXT: } # NOCOMB: DynamicSection [ # NOCOMB-NOT: RELACOUNT Index: lld/trunk/test/ELF/comdat.s =================================================================== --- lld/trunk/test/ELF/comdat.s +++ lld/trunk/test/ELF/comdat.s @@ -21,7 +21,7 @@ // CHECK: Disassembly of section .text2: // CHECK-EMPTY: // CHECK-NEXT: foo: -// CHECK-NEXT: 1000: {{.*}} nop +// CHECK-NEXT: 1234: {{.*}} nop // CHECK-NOT: nop .section bar, "ax" @@ -30,8 +30,8 @@ // CHECK: Disassembly of section bar: // CHECK-EMPTY: // CHECK-NEXT: bar: -// 0x1000 - 0x1001 - 5 = -6 -// CHECK-NEXT: 1001: {{.*}} callq -6 +// 0x1234 - 0x1235 - 5 = -6 +// CHECK-NEXT: 1235: {{.*}} callq -6 .section .text3,"axG",@progbits,zed,comdat,unique,0 @@ -71,7 +71,7 @@ // READ-NEXT: } // READ-NEXT: Symbol { // READ-NEXT: Name: _DYNAMIC -// READ-NEXT: Value: 0x2000 +// READ-NEXT: Value: 0x2240 // READ-NEXT: Size: 0 // READ-NEXT: Binding: Local // READ-NEXT: Type: None Index: lld/trunk/test/ELF/common-page.s =================================================================== --- lld/trunk/test/ELF/common-page.s +++ lld/trunk/test/ELF/common-page.s @@ -37,8 +37,8 @@ # CHECK-MAX-NEXT: SHF_ALLOC (0x2) # CHECK-MAX-NEXT: SHF_EXECINSTR (0x4) # CHECK-MAX-NEXT: ] -# CHECK-MAX-NEXT: Address: 0x210000 -# CHECK-MAX-NEXT: Offset: 0x10000 +# CHECK-MAX-NEXT: Address: 0x210120 +# CHECK-MAX-NEXT: Offset: 0x120 # CHECK-MAX-NEXT: Size: 1 # CHECK-MAX-NEXT: Link: 0 # CHECK-MAX-NEXT: Info: 0 @@ -54,7 +54,7 @@ # CHECK-MAX-NEXT: SHF_STRINGS (0x20) # CHECK-MAX-NEXT: ] # CHECK-MAX-NEXT: Address: 0x0 -# CHECK-MAX-NEXT: Offset: 0x10001 +# CHECK-MAX-NEXT: Offset: 0x121 # CHECK-MAX-NEXT: Size: 8 # CHECK-MAX-NEXT: Link: 0 # CHECK-MAX-NEXT: Info: 0 @@ -88,9 +88,9 @@ # CHECK-MAX-NEXT: } # CHECK-MAX-NEXT: ProgramHeader { # CHECK-MAX-NEXT: Type: PT_LOAD (0x1) -# CHECK-MAX-NEXT: Offset: 0x10000 -# CHECK-MAX-NEXT: VirtualAddress: 0x210000 -# CHECK-MAX-NEXT: PhysicalAddress: 0x210000 +# CHECK-MAX-NEXT: Offset: 0x120 +# CHECK-MAX-NEXT: VirtualAddress: 0x210120 +# CHECK-MAX-NEXT: PhysicalAddress: 0x210120 # CHECK-MAX-NEXT: FileSize: 1 # CHECK-MAX-NEXT: MemSize: 1 # CHECK-MAX-NEXT: Flags [ (0x5) @@ -147,8 +147,8 @@ # CHECK-COMMON-NEXT: SHF_ALLOC (0x2) # CHECK-COMMON-NEXT: SHF_EXECINSTR (0x4) # CHECK-COMMON-NEXT: ] -# CHECK-COMMON-NEXT: Address: 0x210000 -# CHECK-COMMON-NEXT: Offset: 0x10000 +# CHECK-COMMON-NEXT: Address: 0x210120 +# CHECK-COMMON-NEXT: Offset: 0x120 # CHECK-COMMON-NEXT: Size: 1 # CHECK-COMMON-NEXT: Link: 0 # CHECK-COMMON-NEXT: Info: 0 @@ -164,7 +164,7 @@ # CHECK-COMMON-NEXT: SHF_STRINGS (0x20) # CHECK-COMMON-NEXT: ] # CHECK-COMMON-NEXT: Address: 0x0 -# CHECK-COMMON-NEXT: Offset: 0x10001 +# CHECK-COMMON-NEXT: Offset: 0x121 # CHECK-COMMON-NEXT: Size: 8 # CHECK-COMMON-NEXT: Link: 0 # CHECK-COMMON-NEXT: Info: 0 @@ -198,9 +198,9 @@ # CHECK-COMMON-NEXT: } # CHECK-COMMON-NEXT: ProgramHeader { # CHECK-COMMON-NEXT: Type: PT_LOAD (0x1) -# CHECK-COMMON-NEXT: Offset: 0x10000 -# CHECK-COMMON-NEXT: VirtualAddress: 0x210000 -# CHECK-COMMON-NEXT: PhysicalAddress: 0x210000 +# CHECK-COMMON-NEXT: Offset: 0x120 +# CHECK-COMMON-NEXT: VirtualAddress: 0x210120 +# CHECK-COMMON-NEXT: PhysicalAddress: 0x210120 # CHECK-COMMON-NEXT: FileSize: 1 # CHECK-COMMON-NEXT: MemSize: 1 # CHECK-COMMON-NEXT: Flags [ (0x5) Index: lld/trunk/test/ELF/common.s =================================================================== --- lld/trunk/test/ELF/common.s +++ lld/trunk/test/ELF/common.s @@ -10,7 +10,7 @@ // CHECK-NEXT: SHF_ALLOC // CHECK-NEXT: SHF_WRITE // CHECK-NEXT: ] -// CHECK-NEXT: Address: 0x201000 +// CHECK-NEXT: Address: 0x202160 // CHECK-NEXT: Offset: // CHECK-NEXT: Size: 36 // CHECK-NEXT: Link: 0 @@ -18,7 +18,7 @@ // CHECK-NEXT: AddressAlignment: 16 // CHECK: Name: sym1 -// CHECK-NEXT: Value: 0x201000 +// CHECK-NEXT: Value: 0x202160 // CHECK-NEXT: Size: 8 // CHECK-NEXT: Binding: Global // CHECK-NEXT: Type: Object @@ -26,7 +26,7 @@ // CHECK-NEXT: Section: .bss // CHECK: Name: sym2 -// CHECK-NEXT: Value: 0x201008 +// CHECK-NEXT: Value: 0x202168 // CHECK-NEXT: Size: 8 // CHECK-NEXT: Binding: Global // CHECK-NEXT: Type: Object @@ -34,7 +34,7 @@ // CHECK-NEXT: Section: .bss // CHECK: Name: sym3 -// CHECK-NEXT: Value: 0x201010 +// CHECK-NEXT: Value: 0x202170 // CHECK-NEXT: Size: 2 // CHECK-NEXT: Binding: Global // CHECK-NEXT: Type: Object @@ -42,7 +42,7 @@ // CHECK-NEXT: Section: .bss // CHECK: Name: sym4 -// CHECK-NEXT: Value: 0x201020 +// CHECK-NEXT: Value: 0x202180 // CHECK-NEXT: Size: 4 // CHECK-NEXT: Binding: Global // CHECK-NEXT: Type: Object Index: lld/trunk/test/ELF/copy-rel-large.s =================================================================== --- lld/trunk/test/ELF/copy-rel-large.s +++ lld/trunk/test/ELF/copy-rel-large.s @@ -2,7 +2,7 @@ ## Test symbols larger than 2**32 can be copy relocated. -# RUN: echo '.globl foo; .type foo,@object; foo: .size foo, 0x100000001' | \ +# RUN: echo '.globl foo; .type foo,@object; foo: .byte 0; .size foo, 0x100000001' | \ # RUN: llvm-mc -filetype=obj -triple=x86_64 - -o %t1.o # RUN: ld.lld -shared %t1.o -o %t1.so # RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t.o Index: lld/trunk/test/ELF/copy-rel-tls.s =================================================================== --- lld/trunk/test/ELF/copy-rel-tls.s +++ lld/trunk/test/ELF/copy-rel-tls.s @@ -6,8 +6,8 @@ // RUN: llvm-nm %t1.so | FileCheck %s // RUN: llvm-nm %t | FileCheck --check-prefix=TLS %s // foo and tfoo have the same st_value but we should not copy tfoo. -// CHECK: 2000 B foo -// CHECK: 2000 B tfoo +// CHECK: 0000000000003358 B foo +// CHECK: 0000000000003358 B tfoo // TLS-NOT: tfoo .global _start Index: lld/trunk/test/ELF/defsym-reserved-syms.s =================================================================== --- lld/trunk/test/ELF/defsym-reserved-syms.s +++ lld/trunk/test/ELF/defsym-reserved-syms.s @@ -17,10 +17,10 @@ # RUN: llvm-readobj --symbols -S %t | FileCheck %s --check-prefix=EXPR # EXPR: Symbol { # EXPR: Name: foo2 -# EXPR-NEXT: Value: 0x201007 +# EXPR-NEXT: Value: 0x201127 # EXPR: Symbol { # EXPR: Name: etext -# EXPR-NEXT: Value: 0x201005 +# EXPR-NEXT: Value: 0x201125 .globl foo1 foo1 = 0x123 Index: lld/trunk/test/ELF/edata-etext.s =================================================================== --- lld/trunk/test/ELF/edata-etext.s +++ lld/trunk/test/ELF/edata-etext.s @@ -14,17 +14,17 @@ # CHECK: Sections: # CHECK-NEXT: Idx Name Size VMA Type # CHECK-NEXT: 0 00000000 0000000000000000 -# CHECK-NEXT: 1 .text 00000001 0000000000201000 TEXT -# CHECK-NEXT: 2 .data 00000002 0000000000202000 DATA -# CHECK-NEXT: 3 .bss 00000006 0000000000202004 BSS +# CHECK-NEXT: 1 .text 00000001 0000000000201158 TEXT +# CHECK-NEXT: 2 .data 00000002 0000000000202159 DATA +# CHECK-NEXT: 3 .bss 00000006 000000000020215c BSS # CHECK: SYMBOL TABLE: -# CHECK-NEXT: 0000000000202002 .data 00000000 _edata -# CHECK-NEXT: 000000000020200a .bss 00000000 _end -# CHECK-NEXT: 0000000000201001 .text 00000000 _etext -# CHECK-NEXT: 0000000000201000 .text 00000000 _start -# CHECK-NEXT: 0000000000202002 .data 00000000 edata -# CHECK-NEXT: 000000000020200a .bss 00000000 end -# CHECK-NEXT: 0000000000201001 .text 00000000 etext +# CHECK-NEXT: 000000000020215b .data 00000000 _edata +# CHECK-NEXT: 0000000000202162 .bss 00000000 _end +# CHECK-NEXT: 0000000000201159 .text 00000000 _etext +# CHECK-NEXT: 0000000000201158 .text 00000000 _start +# CHECK-NEXT: 000000000020215b .data 00000000 edata +# CHECK-NEXT: 0000000000202162 .bss 00000000 end +# CHECK-NEXT: 0000000000201159 .text 00000000 etext # RUN: ld.lld -r %t.o -o %t2 # RUN: llvm-objdump -t %t2 | FileCheck %s --check-prefix=RELOCATABLE Index: lld/trunk/test/ELF/edata-no-bss.s =================================================================== --- lld/trunk/test/ELF/edata-no-bss.s +++ lld/trunk/test/ELF/edata-no-bss.s @@ -6,9 +6,9 @@ # RUN: ld.lld %t.o -o %t --gc-sections # RUN: llvm-objdump -t -section-headers %t | FileCheck %s -# CHECK: .data 00000008 0000000000202000 DATA +# CHECK: .data 00000008 000000000020215c DATA -# CHECK: 0000000000202008 .data 00000000 _edata +# CHECK: 0000000000202164 .data 00000000 _edata .text .globl _start Index: lld/trunk/test/ELF/eh-align-cie.s =================================================================== --- lld/trunk/test/ELF/eh-align-cie.s +++ lld/trunk/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: 061B2A10 00001B0C 07089001 00000000 +// CHECK-NEXT: 0020: 14000000 24000000 14100000 00000000 // CHECK-NEXT: 0030: 00000000 00000000 // CHECK-NEXT: ) Index: lld/trunk/test/ELF/eh-frame-hdr-abs-fde.s =================================================================== --- lld/trunk/test/ELF/eh-frame-hdr-abs-fde.s +++ lld/trunk/test/ELF/eh-frame-hdr-abs-fde.s @@ -8,12 +8,12 @@ # RUN: llvm-objdump -s -dwarf=frames %t | FileCheck %s # CHECK: Contents of section .eh_frame_hdr: -# CHECK-NEXT: 200190 011b033b 14000000 01000000 700e0000 +# CHECK-NEXT: 200190 011b033b 14000000 01000000 54100000 # ^-- 0x201000 - 0x200190 # .text - .eh_frame_hdr # CHECK-NEXT: 2001a0 30000000 # CHECK: Contents of section .text: -# CHECK-NEXT: 201000 90 +# CHECK-NEXT: 2011e4 90 # CHECK: Augmentation: "zLR" # CHECK: Augmentation data: 00 1B Index: lld/trunk/test/ELF/eh-frame-hdr-augmentation.s =================================================================== --- lld/trunk/test/ELF/eh-frame-hdr-augmentation.s +++ lld/trunk/test/ELF/eh-frame-hdr-augmentation.s @@ -11,7 +11,7 @@ // CHECK-NEXT: Code alignment factor: 1 // CHECK-NEXT: Data alignment factor: -8 // CHECK-NEXT: Return address column: 16 -// CHECK-NEXT: Personality Address: 0000000000000dad +// CHECK-NEXT: Personality Address: 0000000000001029 // CHECK-NEXT: Augmentation data: // CHECK: DW_CFA_def_cfa: reg7 +8 @@ -19,8 +19,8 @@ // CHECK-NEXT: DW_CFA_nop: // CHECK-NEXT: DW_CFA_nop: -// CHECK: 00000020 00000014 00000024 FDE cie=00000024 pc=00000d98...00000d98 -// CHECK-NEXT: LSDA Address: 0000000000000d8f +// CHECK: 00000020 00000014 00000024 FDE cie=00000024 pc=00001014...00001014 +// CHECK-NEXT: LSDA Address: 000000000000100b // CHECK-NEXT: DW_CFA_nop: // CHECK-NEXT: DW_CFA_nop: // CHECK-NEXT: DW_CFA_nop: Index: lld/trunk/test/ELF/eh-frame-hdr-icf-fde.s =================================================================== --- lld/trunk/test/ELF/eh-frame-hdr-icf-fde.s +++ lld/trunk/test/ELF/eh-frame-hdr-icf-fde.s @@ -32,10 +32,10 @@ # CHECK-NEXT: AddressAlignment: # CHECK-NEXT: EntrySize: 0 # CHECK-NEXT: SectionData ( -# CHECK-NEXT: 0000: 011B033B 1C000000 02000000 A80E0000 +# CHECK-NEXT: 0000: 011B033B 1C000000 02000000 6C100000 ## ^ ^-- FDE(1) PC ## ^-- Number of FDEs -# CHECK-NEXT: 0010: 38000000 AA0E0000 50000000 +# CHECK-NEXT: 0010: 38000000 6E100000 50000000 ## ^-- FDE(2) PC # CHECK-NEXT: ) # CHECK-NEXT: } @@ -60,8 +60,8 @@ # CHECK-NEXT: SectionData ( # CHECK-NEXT: 0000: 14000000 00000000 017A5200 01781001 # CHECK-NEXT: 0010: 1B0C0708 90010000 14000000 1C000000 -# CHECK-NEXT: 0020: 680E0000 01000000 00000000 00000000 -# CHECK-NEXT: 0030: 14000000 34000000 520E0000 01000000 +# CHECK-NEXT: 0020: 2C100000 01000000 00000000 00000000 +# CHECK-NEXT: 0030: 14000000 34000000 16100000 01000000 # CHECK-NEXT: 0040: 00000000 00000000 00000000 # CHECK-NEXT: ) # CHECK-NEXT: } @@ -74,7 +74,7 @@ # CHECK-NEXT: SHF_ALLOC # CHECK-NEXT: SHF_EXECINSTR # CHECK-NEXT: ] -# CHECK-NEXT: Address: 0x201000 +# CHECK-NEXT: Address: 0x2011C4 .section .text.f1, "ax" .cfi_startproc Index: lld/trunk/test/ELF/eh-frame-hdr.s =================================================================== --- lld/trunk/test/ELF/eh-frame-hdr.s +++ lld/trunk/test/ELF/eh-frame-hdr.s @@ -41,17 +41,17 @@ // HDRDISASM: Disassembly of section foo: // HDRDISASM-EMPTY: // HDRDISASM-NEXT: foo: -// HDRDISASM-NEXT: 201000: 90 nop +// HDRDISASM-NEXT: 2011e4: 90 nop // HDRDISASM-EMPTY: // HDRDISASM-NEXT: Disassembly of section bar: // HDRDISASM-EMPTY: // HDRDISASM-NEXT: bar: -// HDRDISASM-NEXT: 201001: 90 nop +// HDRDISASM-NEXT: 2011e5: 90 nop // HDRDISASM-EMPTY: // HDRDISASM-NEXT: Disassembly of section dah: // HDRDISASM-EMPTY: // HDRDISASM-NEXT: dah: -// HDRDISASM-NEXT: 201002: 90 nop +// HDRDISASM-NEXT: 2011e6: 90 nop // HDR: Section { // HDR: Index: @@ -68,23 +68,23 @@ // HDR-NEXT: AddressAlignment: 4 // HDR-NEXT: EntrySize: 0 // HDR-NEXT: SectionData ( -// HDR-NEXT: 0000: 011B033B 24000000 03000000 A80E0000 -// HDR-NEXT: 0010: 40000000 A90E0000 58000000 AA0E0000 +// HDR-NEXT: 0000: 011B033B 24000000 03000000 8C100000 +// HDR-NEXT: 0010: 40000000 8D100000 58000000 8E100000 // HDR-NEXT: 0020: 70000000 // HDR-NEXT: ) // Header (always 4 bytes): 0x011B033B // 24000000 = .eh_frame(0x200180) - .eh_frame_hdr(0x200158) - 4 // 03000000 = 3 = the number of FDE pointers in the table. -// Entry(1): A80E0000 40000000 -// 480E0000 = 0x201000 - .eh_frame_hdr(0x200158) = 0xEA8 +// Entry(1): 8C100000 40000000 +// 480E0000 = 0x2011e4 - .eh_frame_hdr(0x200158) = 0x108C // 40000000 = address of FDE(1) - .eh_frame_hdr(0x200158) = // = .eh_frame(0x200180) + 24 - 0x200158 = 0x40 -// Entry(2): A90E0000 58000000 -// A90E0000 = 0x201001 - .eh_frame_hdr(0x200158) = 0xEA9 +// Entry(2): 8D100000 58000000 +// A90E0000 = 0x2011e5 - .eh_frame_hdr(0x200158) = 0x108D // 58000000 = address of FDE(2) - .eh_frame_hdr(0x200158) = // = .eh_frame(0x200180) + 24 + 24 - 0x200158 = 0x58 -// Entry(3): AA0E0000 70000000 -// AA0E0000 = 0x201002 - .eh_frame_hdr(0x200158) = 0xEAA +// Entry(3): 8E100000 70000000 +// AA0E0000 = 0x2011e6 - .eh_frame_hdr(0x200158) = 0x108E // 70000000 = address of FDE(3) - .eh_frame_hdr(0x200158) = // = .eh_frame(0x200180) + 24 + 24 + 24 - 0x200158 = 0x70 // HDR-NEXT: } @@ -105,10 +105,10 @@ // HDR-NEXT: SectionData ( // HDR-NEXT: 0000: 14000000 00000000 017A5200 01781001 // HDR-NEXT: 0010: 1B0C0708 90010000 14000000 1C000000 -// HDR-NEXT: 0020: 600E0000 01000000 00000000 00000000 -// HDR-NEXT: 0030: 14000000 34000000 490E0000 01000000 +// HDR-NEXT: 0020: 44100000 01000000 00000000 00000000 +// HDR-NEXT: 0030: 14000000 34000000 2D100000 01000000 // HDR-NEXT: 0040: 00000000 00000000 14000000 4C000000 -// HDR-NEXT: 0050: 320E0000 01000000 00000000 00000000 +// HDR-NEXT: 0050: 16100000 01000000 00000000 00000000 // HDR-NEXT: 0060: 00000000 // HDR-NEXT: ) // CIE: 14000000 00000000 017A5200 01781001 1B0C0708 90010000 Index: lld/trunk/test/ELF/eh-frame-merge.s =================================================================== --- lld/trunk/test/ELF/eh-frame-merge.s +++ lld/trunk/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: 44100000 01000000 00000000 00000000 | +// CHECK-NEXT: 0030: 14000000 34000000 2E100000 02000000 | // CHECK-NEXT: 0040: 00000000 00000000 14000000 4C000000 | -// CHECK-NEXT: 0050: B90D0000 01000000 00000000 00000000 | +// CHECK-NEXT: 0050: 15100000 01000000 00000000 00000000 | // CHECK-NEXT: 0060: 00000000 // CHECK-NEXT: ) @@ -48,7 +48,7 @@ // CHECK-NEXT: SHF_ALLOC // CHECK-NEXT: SHF_EXECINSTR // CHECK-NEXT: ] -// CHECK-NEXT: Address: 0x1000 +// CHECK-NEXT: Address: 0x125C // CHECK: Name: bar // CHECK-NEXT: Type: SHT_PROGBITS @@ -56,4 +56,4 @@ // CHECK-NEXT: SHF_ALLOC // CHECK-NEXT: SHF_EXECINSTR // CHECK-NEXT: ] -// CHECK-NEXT: Address: 0x1002 +// CHECK-NEXT: Address: 0x125E Index: lld/trunk/test/ELF/eh-frame-pcrel-overflow.s =================================================================== --- lld/trunk/test/ELF/eh-frame-pcrel-overflow.s +++ lld/trunk/test/ELF/eh-frame-pcrel-overflow.s @@ -4,7 +4,7 @@ # RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %p/Inputs/eh-frame-pcrel-overflow.s -o %t1.o # RUN: ld.lld --eh-frame-hdr -Ttext=0x90000000 %t.o -o /dev/null # RUN: not ld.lld --eh-frame-hdr %t.o %t1.o -o /dev/null 2>&1 | FileCheck %s -# CHECK: error: {{.*}}.o:(.eh_frame): PC offset is too large: 0x90000eac +# CHECK: error: {{.*}}.o:(.eh_frame): PC offset is too large: 0x90001054 .text .global _start Index: lld/trunk/test/ELF/eh-frame-value-format7.s =================================================================== --- lld/trunk/test/ELF/eh-frame-value-format7.s +++ lld/trunk/test/ELF/eh-frame-value-format7.s @@ -13,20 +13,20 @@ # CHECK-NEXT: Flags [ # CHECK-NEXT: SHF_ALLOC # CHECK-NEXT: ] -# CHECK-NEXT: Address: 0x2000 -# CHECK-NEXT: Offset: 0x2000 +# CHECK-NEXT: Address: 0x2004 +# CHECK-NEXT: Offset: 0x1004 # CHECK-NEXT: Size: 20 # CHECK-NEXT: Link: 0 # CHECK-NEXT: Info: 0 # CHECK-NEXT: AddressAlignment: 4 # CHECK-NEXT: EntrySize: 0 # CHECK-NEXT: SectionData ( -# CHECK-NEXT: 0000: 011B033B 10000000 01000000 34F2FFFF +# CHECK-NEXT: 0000: 011B033B 10000000 01000000 30F2FFFF # CHECK-NEXT: 0010: 24000000 # Header (always 4 bytes): 011B033B -# 10000000 = .eh_frame(0x2014) - .eh_frame_hdr(0x2000) - 4 +# 10000000 = .eh_frame(0x2018) - .eh_frame_hdr(0x2004) - 4 # 01000000 = 1 = the number of FDE pointers in the table. -# 34F2FFFF = foo(0x1000) - 0x234(addend) - .eh_frame_hdr(0x2000) +# 30F2FFFF = foo(0x1000) - 0x234(addend) - .eh_frame_hdr(0x2004) # CHECK: Section { # CHECK: Index: @@ -35,8 +35,8 @@ # CHECK-NEXT: Flags [ # CHECK-NEXT: SHF_ALLOC # CHECK-NEXT: ] -# CHECK-NEXT: Address: 0x2014 -# CHECK-NEXT: Offset: 0x2014 +# CHECK-NEXT: Address: 0x2018 +# CHECK-NEXT: Offset: 0x1018 # CHECK-NEXT: Size: # CHECK-NEXT: Link: # CHECK-NEXT: Info: Index: lld/trunk/test/ELF/eh-frame-value-format8.s =================================================================== --- lld/trunk/test/ELF/eh-frame-value-format8.s +++ lld/trunk/test/ELF/eh-frame-value-format8.s @@ -13,20 +13,20 @@ # CHECK-NEXT: Flags [ # CHECK-NEXT: SHF_ALLOC # CHECK-NEXT: ] -# CHECK-NEXT: Address: 0x2000 -# CHECK-NEXT: Offset: 0x2000 +# CHECK-NEXT: Address: 0x2004 +# CHECK-NEXT: Offset: 0x1004 # CHECK-NEXT: Size: 20 # CHECK-NEXT: Link: 0 # CHECK-NEXT: Info: 0 # CHECK-NEXT: AddressAlignment: 4 # CHECK-NEXT: EntrySize: 0 # CHECK-NEXT: SectionData ( -# CHECK-NEXT: 0000: 011B033B 10000000 01000000 34F2FFFF +# CHECK-NEXT: 0000: 011B033B 10000000 01000000 30F2FFFF # CHECK-NEXT: 0010: 24000000 # Header (always 4 bytes): 011B033B -# 10000000 = .eh_frame(0x2014) - .eh_frame_hdr(0x2000) - 4 +# 10000000 = .eh_frame(0x2018) - .eh_frame_hdr(0x2004) - 4 # 01000000 = 1 = the number of FDE pointers in the table. -# 34F2FFFF = foo(0x1000) - 0x234(addend) - .eh_frame_hdr(0x2000) +# 30F2FFFF = foo(0x1000) - 0x234(addend) - .eh_frame_hdr(0x2004) # CHECK: Section { # CHECK: Index: @@ -35,8 +35,8 @@ # CHECK-NEXT: Flags [ # CHECK-NEXT: SHF_ALLOC # CHECK-NEXT: ] -# CHECK-NEXT: Address: 0x2014 -# CHECK-NEXT: Offset: 0x2014 +# CHECK-NEXT: Address: 0x2018 +# CHECK-NEXT: Offset: 0x1018 # CHECK-NEXT: Size: # CHECK-NEXT: Link: # CHECK-NEXT: Info: Index: lld/trunk/test/ELF/ehframe-relocation.s =================================================================== --- lld/trunk/test/ELF/ehframe-relocation.s +++ lld/trunk/test/ELF/ehframe-relocation.s @@ -20,8 +20,8 @@ // DISASM: Disassembly of section .text: // DISASM-EMPTY: // DISASM-NEXT: _start: -// DISASM-NEXT: 201000: {{.*}} movq 2097440, %rax -// DISASM-NEXT: 201008: {{.*}} movq 2097445, %rax +// DISASM-NEXT: 201154: {{.*}} movq 2097440, %rax +// DISASM-NEXT: 20115c: {{.*}} movq 2097445, %rax .section .eh_frame,"ax",@unwind Index: lld/trunk/test/ELF/emit-relocs-icf1.s =================================================================== --- lld/trunk/test/ELF/emit-relocs-icf1.s +++ lld/trunk/test/ELF/emit-relocs-icf1.s @@ -5,9 +5,9 @@ # CHECK: Relocations [ # CHECK-NEXT: Section (3) .rela.text { -# CHECK-NEXT: 0x201000 R_X86_64_64 .text 0x11 -# CHECK-NEXT: 0x201008 R_X86_64_64 .text 0x11 -# CHECK-NEXT: 0x201011 R_X86_64_64 .rodata 0x0 +# CHECK-NEXT: 0x201128 R_X86_64_64 .text 0x11 +# CHECK-NEXT: 0x201130 R_X86_64_64 .text 0x11 +# CHECK-NEXT: 0x201139 R_X86_64_64 .rodata 0x0 # CHECK-NEXT: } # CHECK-NEXT: ] Index: lld/trunk/test/ELF/emit-relocs-mergeable.s =================================================================== --- lld/trunk/test/ELF/emit-relocs-mergeable.s +++ lld/trunk/test/ELF/emit-relocs-mergeable.s @@ -27,10 +27,10 @@ # CHECK: Relocations [ # CHECK-NEXT: Section {{.*}} .rela.foo { -# CHECK-NEXT: 0x201000 R_X86_64_64 .strings 0x0 -# CHECK-NEXT: 0x201008 R_X86_64_64 .strings 0x8 -# CHECK-NEXT: 0x201010 R_X86_64_64 .strings 0x8 -# CHECK-NEXT: 0x201018 R_X86_64_64 .strings 0x4 +# CHECK-NEXT: 0x201120 R_X86_64_64 .strings 0x0 +# CHECK-NEXT: 0x201128 R_X86_64_64 .strings 0x8 +# CHECK-NEXT: 0x201130 R_X86_64_64 .strings 0x8 +# CHECK-NEXT: 0x201138 R_X86_64_64 .strings 0x4 # CHECK-NEXT: } # CHECK-NEXT: ] Index: lld/trunk/test/ELF/emit-relocs.s =================================================================== --- lld/trunk/test/ELF/emit-relocs.s +++ lld/trunk/test/ELF/emit-relocs.s @@ -20,10 +20,10 @@ # CHECK-NEXT: ] # CHECK: Relocations [ # CHECK-NEXT: Section ({{.*}}) .rela.text { -# CHECK-NEXT: 0x201002 R_X86_64_32 .text 0x1 -# CHECK-NEXT: 0x201007 R_X86_64_PLT32 fn 0xFFFFFFFFFFFFFFFC -# CHECK-NEXT: 0x20100E R_X86_64_32 .text 0xD -# CHECK-NEXT: 0x201013 R_X86_64_PLT32 fn2 0xFFFFFFFFFFFFFFFC +# CHECK-NEXT: 0x201122 R_X86_64_32 .text 0x1 +# CHECK-NEXT: 0x201127 R_X86_64_PLT32 fn 0xFFFFFFFFFFFFFFFC +# CHECK-NEXT: 0x20112E R_X86_64_32 .text 0xD +# CHECK-NEXT: 0x201133 R_X86_64_PLT32 fn2 0xFFFFFFFFFFFFFFFC # CHECK-NEXT: } # CHECK-NEXT: ] # CHECK-NEXT: Symbols [ @@ -38,7 +38,7 @@ # CHECK-NEXT: } # CHECK-NEXT: Symbol { # CHECK-NEXT: Name: bar -# CHECK-NEXT: Value: 0x201001 +# CHECK-NEXT: Value: 0x201121 # CHECK-NEXT: Size: 0 # CHECK-NEXT: Binding: Local # CHECK-NEXT: Type: None @@ -47,7 +47,7 @@ # CHECK-NEXT: } # CHECK-NEXT: Symbol { # CHECK-NEXT: Name: foo -# CHECK-NEXT: Value: 0x20100D +# CHECK-NEXT: Value: 0x20112D # CHECK-NEXT: Size: 0 # CHECK-NEXT: Binding: Local # CHECK-NEXT: Type: None @@ -56,7 +56,7 @@ # CHECK-NEXT: } # CHECK-NEXT: Symbol { # CHECK-NEXT: Name: -# CHECK-NEXT: Value: 0x201000 +# CHECK-NEXT: Value: 0x201120 # CHECK-NEXT: Size: 0 # CHECK-NEXT: Binding: Local # CHECK-NEXT: Type: Section @@ -74,7 +74,7 @@ # CHECK-NEXT: } # CHECK-NEXT: Symbol { # CHECK-NEXT: Name: fn -# CHECK-NEXT: Value: 0x201000 +# CHECK-NEXT: Value: 0x201120 # CHECK-NEXT: Size: 0 # CHECK-NEXT: Binding: Global # CHECK-NEXT: Type: Function @@ -83,7 +83,7 @@ # CHECK-NEXT: } # CHECK-NEXT: Symbol { # CHECK-NEXT: Name: fn2 -# CHECK-NEXT: Value: 0x20100C +# CHECK-NEXT: Value: 0x20112C # CHECK-NEXT: Size: 0 # CHECK-NEXT: Binding: Global # CHECK-NEXT: Type: Function Index: lld/trunk/test/ELF/end-dso-defined.s =================================================================== --- lld/trunk/test/ELF/end-dso-defined.s +++ lld/trunk/test/ELF/end-dso-defined.s @@ -1,8 +1,8 @@ # REQUIRES: x86 # RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t1.o # RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %p/Inputs/resolution-end.s -o %t2.o -# RUN: ld.lld -shared -o %t2.so %t2.o -# RUN: ld.lld --hash-style=sysv %t1.o %t2.so -o %t +# RUN: ld.lld -shared -soname=so -o %t2.so %t2.o +# RUN: ld.lld %t1.o %t2.so -o %t # RUN: llvm-readobj --symbols -S --section-data %t | FileCheck %s # Test that we resolve _end to the this executable. @@ -21,16 +21,16 @@ # CHECK-NEXT: AddressAlignment: # CHECK-NEXT: EntrySize: # CHECK-NEXT: SectionData ( -# CHECK-NEXT: 0000: 80202000 00000000 80202000 00000000 +# CHECK-NEXT: 0000: 08232000 00000000 08232000 00000000 # CHECK-NEXT: ) # CHECK: Symbol { # CHECK: Name: _end -# CHECK-NEXT: Value: 0x202080 +# CHECK-NEXT: Value: 0x202308 # CHECK: Symbol { # CHECK: Name: end -# CHECK-NEXT: Value: 0x202080 +# CHECK-NEXT: Value: 0x202308 .global _start _start: Index: lld/trunk/test/ELF/end-update.s =================================================================== --- lld/trunk/test/ELF/end-update.s +++ lld/trunk/test/ELF/end-update.s @@ -12,13 +12,13 @@ // CHECK-NEXT: SHF_ALLOC // CHECK-NEXT: SHF_WRITE // CHECK-NEXT: ] -// CHECK-NEXT: Address: 0x202000 +// CHECK-NEXT: Address: 0x202159 // CHECK-NEXT: Offset: // CHECK-NEXT: Size: 6 // CHECK: ] // CHECK: Symbols [ // CHECK: Name: end -// CHECK-NEXT: Value: 0x202006 +// CHECK-NEXT: Value: 0x20215F // CHECK: ] .global _start,end Index: lld/trunk/test/ELF/end.s =================================================================== --- lld/trunk/test/ELF/end.s +++ lld/trunk/test/ELF/end.s @@ -14,13 +14,13 @@ // DEFAULT-NEXT: SHF_ALLOC // DEFAULT-NEXT: SHF_WRITE // DEFAULT-NEXT: ] -// DEFAULT-NEXT: Address: 0x202002 +// DEFAULT-NEXT: Address: 0x20215B // DEFAULT-NEXT: Offset: // DEFAULT-NEXT: Size: 6 // DEFAULT: ] // DEFAULT: Symbols [ // DEFAULT: Name: _end -// DEFAULT-NEXT: Value: 0x202008 +// DEFAULT-NEXT: Value: 0x202161 // DEFAULT: ] // RUN: ld.lld -r %t.o -o %t2 Index: lld/trunk/test/ELF/entry.s =================================================================== --- lld/trunk/test/ELF/entry.s +++ lld/trunk/test/ELF/entry.s @@ -4,14 +4,14 @@ # RUN: ld.lld -e foobar %t1 -o %t2 2>&1 | FileCheck -check-prefix=WARN1 %s # RUN: llvm-readobj --file-headers %t2 | FileCheck -check-prefix=TEXT %s -# WARN1: warning: cannot find entry symbol foobar; defaulting to 0x201000 -# TEXT: Entry: 0x201000 +# WARN1: warning: cannot find entry symbol foobar; defaulting to 0x201120 +# TEXT: Entry: 0x201120 # RUN: ld.lld %t1 -o %t2 2>&1 | FileCheck -check-prefix=WARN2 %s -# WARN2: warning: cannot find entry symbol _start; defaulting to 0x201000 +# WARN2: warning: cannot find entry symbol _start; defaulting to 0x201120 # RUN: ld.lld -shared -e foobar %t1 -o %t2 2>&1 | FileCheck -check-prefix=WARN3 %s -# WARN3: warning: cannot find entry symbol foobar; defaulting to 0x1000 +# WARN3: warning: cannot find entry symbol foobar; defaulting to 0x1238 # RUN: ld.lld -shared --fatal-warnings -e entry %t1 -o %t2 # RUN: ld.lld -shared --fatal-warnings %t1 -o %t2 @@ -29,11 +29,11 @@ # RUN: ld.lld %t1 -o %t2 -e entry # RUN: llvm-readobj --file-headers %t2 | FileCheck -check-prefix=SYM %s -# SYM: Entry: 0x201008 +# SYM: Entry: 0x201128 # RUN: ld.lld %t1 --fatal-warnings -shared -o %t2 -e entry # RUN: llvm-readobj --file-headers %t2 | FileCheck -check-prefix=DSO %s -# DSO: Entry: 0x1008 +# DSO: Entry: 0x1240 # RUN: ld.lld %t1 -o %t2 --entry=4096 # RUN: llvm-readobj --file-headers %t2 | FileCheck -check-prefix=DEC %s Index: lld/trunk/test/ELF/fill-trap.s =================================================================== --- lld/trunk/test/ELF/fill-trap.s +++ lld/trunk/test/ELF/fill-trap.s @@ -17,7 +17,8 @@ # CHECK: ProgramHeader { # CHECK: Type: PT_LOAD -# CHECK: Offset: 0x1000 +# PAD: Offset: 0x1000 +# NOPAD: Offset: 0x120 # CHECK-NEXT: VirtualAddress: # CHECK-NEXT: PhysicalAddress: # PAD-NEXT: FileSize: 4096 Index: lld/trunk/test/ELF/gdb-index-base-addr.s =================================================================== --- lld/trunk/test/ELF/gdb-index-base-addr.s +++ lld/trunk/test/ELF/gdb-index-base-addr.s @@ -5,8 +5,8 @@ # CHECK: .gdb_index contents: # CHECK: Address area offset = 0x28, has 2 entries: -# CHECK-NEXT: Low/High address = [0x201000, 0x201001) (Size: 0x1), CU id = 0 -# CHECK-NEXT: Low/High address = [0x201003, 0x201006) (Size: 0x3), CU id = 0 +# CHECK-NEXT: Low/High address = [0x201120, 0x201121) (Size: 0x1), CU id = 0 +# CHECK-NEXT: Low/High address = [0x201123, 0x201126) (Size: 0x3), CU id = 0 .text .globl foo Index: lld/trunk/test/ELF/gdb-index-dwarf5-low-high.s =================================================================== --- lld/trunk/test/ELF/gdb-index-dwarf5-low-high.s +++ lld/trunk/test/ELF/gdb-index-dwarf5-low-high.s @@ -4,7 +4,7 @@ # RUN: llvm-dwarfdump -gdb-index %t | FileCheck %s # CHECK: Address area offset = 0x28, has 1 entries: -# CHECK-NEXT: Low/High address = [0x201000, 0x201001) (Size: 0x1), CU id = 0 +# CHECK-NEXT: Low/High address = [0x201120, 0x201121) (Size: 0x1), CU id = 0 .text .globl main Index: lld/trunk/test/ELF/gdb-index-gc-sections.s =================================================================== --- lld/trunk/test/ELF/gdb-index-gc-sections.s +++ lld/trunk/test/ELF/gdb-index-gc-sections.s @@ -4,7 +4,7 @@ # RUN: llvm-dwarfdump -gdb-index %t2 | FileCheck %s # CHECK: Address area offset = 0x28, has 1 entries: -# CHECK-NEXT: Low/High address = [0x201000, 0x201001) (Size: 0x1), CU id = 0 +# CHECK-NEXT: Low/High address = [0x201154, 0x201155) (Size: 0x1), CU id = 0 # Generated with: (clang r302976) # echo "void _start() {} void dead() {}" | \ Index: lld/trunk/test/ELF/gdb-index-ranges-discarded.s =================================================================== --- lld/trunk/test/ELF/gdb-index-ranges-discarded.s +++ lld/trunk/test/ELF/gdb-index-ranges-discarded.s @@ -5,7 +5,7 @@ # CHECK: .gdb_index contents: # CHECK: Address area offset = 0x28, has 1 entries: -# CHECK-NEXT: Low/High address = [0x201000, 0x201001) (Size: 0x1), CU id = 0 +# CHECK-NEXT: Low/High address = [0x201120, 0x201121) (Size: 0x1), CU id = 0 ## .debug_ranges contains 2 entries. .Lfunc_end0 is defined in the discarded ## .text.foo. Test we resolve it to a non-zero value, otherwise the address area Index: lld/trunk/test/ELF/gdb-index-ranges.s =================================================================== --- lld/trunk/test/ELF/gdb-index-ranges.s +++ lld/trunk/test/ELF/gdb-index-ranges.s @@ -5,8 +5,8 @@ # CHECK: .gdb_index contents: # CHECK: Address area offset = 0x28, has 2 entries: -# CHECK-NEXT: Low/High address = [0x201000, 0x201001) (Size: 0x1), CU id = 0 -# CHECK-NEXT: Low/High address = [0x201001, 0x201003) (Size: 0x2), CU id = 0 +# CHECK-NEXT: Low/High address = [0x201120, 0x201121) (Size: 0x1), CU id = 0 +# CHECK-NEXT: Low/High address = [0x201121, 0x201123) (Size: 0x2), CU id = 0 .section .text.foo1,"ax",@progbits .Lfunc_begin0: Index: lld/trunk/test/ELF/gdb-index-rng-lists.s =================================================================== --- lld/trunk/test/ELF/gdb-index-rng-lists.s +++ lld/trunk/test/ELF/gdb-index-rng-lists.s @@ -14,8 +14,8 @@ # CHECK: .gdb_index contents: # CHECK: Address area offset = 0x28, has 2 entries: -# CHECK-NEXT: Low/High address = [0x201000, 0x201001) (Size: 0x1), CU id = 0 -# CHECK-NEXT: Low/High address = [0x201001, 0x201003) (Size: 0x2), CU id = 0 +# CHECK-NEXT: Low/High address = [0x201120, 0x201121) (Size: 0x1), CU id = 0 +# CHECK-NEXT: Low/High address = [0x201121, 0x201123) (Size: 0x2), CU id = 0 .text .section .text._Z3zedv,"ax",@progbits Index: lld/trunk/test/ELF/gdb-index.s =================================================================== --- lld/trunk/test/ELF/gdb-index.s +++ lld/trunk/test/ELF/gdb-index.s @@ -32,8 +32,8 @@ # DWARF-NEXT: 0: Offset = 0x0, Length = 0x34 # DWARF-NEXT: 1: Offset = 0x34, Length = 0x34 # DWARF: Address area offset = 0x38, has 2 entries: -# DWARF-NEXT: Low/High address = [0x201000, 0x201001) (Size: 0x1), CU id = 0 -# DWARF-NEXT: Low/High address = [0x201004, 0x201006) (Size: 0x2), CU id = 1 +# DWARF-NEXT: Low/High address = [0x201120, 0x201121) (Size: 0x1), CU id = 0 +# DWARF-NEXT: Low/High address = [0x201124, 0x201126) (Size: 0x2), CU id = 1 # DWARF: Symbol table offset = 0x60, size = 1024, filled slots: # DWARF-NEXT: 512: Name offset = 0x1c, CU vector offset = 0x0 # DWARF-NEXT: String name: aaaaaaaaaaaaaaaa, CU vector index: 0 Index: lld/trunk/test/ELF/global_offset_table_shared.s =================================================================== --- lld/trunk/test/ELF/global_offset_table_shared.s +++ lld/trunk/test/ELF/global_offset_table_shared.s @@ -5,7 +5,7 @@ .long _GLOBAL_OFFSET_TABLE_ - . // CHECK: Name: _GLOBAL_OFFSET_TABLE_ -// CHECK-NEXT: Value: 0x3000 +// CHECK-NEXT: Value: 0x3290 // CHECK-NEXT: Size: 0 // CHECK-NEXT: Binding: Local // CHECK-NEXT: Type: None Index: lld/trunk/test/ELF/gnu-ifunc-canon.s =================================================================== --- lld/trunk/test/ELF/gnu-ifunc-canon.s +++ lld/trunk/test/ELF/gnu-ifunc-canon.s @@ -59,18 +59,18 @@ // Make sure the static relocations look right, both with and without headers. // DUMP: Contents of section .plt: -// DUMP-NEXT: 201010 +// DUMP-NEXT: 2011f0 // DUMP: Contents of section .got: -// DUMP-NEXT: 202000 10102000 00000000 +// DUMP-NEXT: 202200 f0112000 00000000 // DUMP: Contents of section .data: -// DUMP-NEXT: 203000 10102000 00000000 11102000 00000000 +// DUMP-NEXT: 203208 f0112000 00000000 f1112000 00000000 // DUMP2: Contents of section .plt: -// DUMP2-NEXT: 201010 +// DUMP2-NEXT: 2011f0 // DUMP2: Contents of section .got: -// DUMP2-NEXT: 202000 40102000 00000000 +// DUMP2-NEXT: 202240 20122000 00000000 // DUMP2: Contents of section .data: -// DUMP2-NEXT: 203000 40102000 00000000 41102000 00000000 +// DUMP2-NEXT: 203248 20122000 00000000 21122000 00000000 lea ifunc@gotpcrel(%rip), %rbx Index: lld/trunk/test/ELF/gnu-ifunc-dyntags.s =================================================================== --- lld/trunk/test/ELF/gnu-ifunc-dyntags.s +++ lld/trunk/test/ELF/gnu-ifunc-dyntags.s @@ -9,7 +9,7 @@ # CHECK: Name Size VMA # CHECK: .rela.dyn 00000030 0000000000000248 -# CHECK: .got.plt 00000010 0000000000003000 +# CHECK: .got.plt 00000010 00000000000033a0 # TAGS: Relocations [ # TAGS-NEXT: Section {{.*}} .rela.dyn { @@ -23,7 +23,7 @@ # TAGS: 0x0000000000000008 RELASZ 48 (bytes) # TAGS: 0x0000000000000017 JMPREL 0x0 # TAGS: 0x0000000000000002 PLTRELSZ 0 (bytes) -# TAGS: 0x0000000000000003 PLTGOT 0x3000 +# TAGS: 0x0000000000000003 PLTGOT 0x33A0 # TAGS: 0x0000000000000014 PLTREL RELA .text Index: lld/trunk/test/ELF/gnu-ifunc-noplt.s =================================================================== --- lld/trunk/test/ELF/gnu-ifunc-noplt.s +++ lld/trunk/test/ELF/gnu-ifunc-noplt.s @@ -12,45 +12,45 @@ // Check that we emitted relocations for the ifunc calls // CHECK: Relocations [ // CHECK-NEXT: Section (4) .rela.dyn { -// CHECK-NEXT: 0x201008 R_X86_64_PLT32 bar 0xFFFFFFFFFFFFFFFC -// CHECK-NEXT: 0x201003 R_X86_64_PLT32 foo 0xFFFFFFFFFFFFFFFC +// CHECK-NEXT: 0x201328 R_X86_64_PLT32 bar 0xFFFFFFFFFFFFFFFC +// CHECK-NEXT: 0x201323 R_X86_64_PLT32 foo 0xFFFFFFFFFFFFFFFC // CHECK-NEXT: } // CHECK-NEXT: Section (5) .rela.plt { -// CHECK-NEXT: 0x203018 R_X86_64_JUMP_SLOT bar2 0x0 -// CHECK-NEXT: 0x203020 R_X86_64_JUMP_SLOT zed2 0x0 +// CHECK-NEXT: 0x203498 R_X86_64_JUMP_SLOT bar2 0x0 +// CHECK-NEXT: 0x2034A0 R_X86_64_JUMP_SLOT zed2 0x0 // CHECK-NEXT: } // Check that ifunc call sites still require relocation // DISASM: Disassembly of section .text: // DISASM-EMPTY: -// DISASM-NEXT: 0000000000201000 foo: -// DISASM-NEXT: 201000: retq +// DISASM-NEXT: 0000000000201320 foo: +// DISASM-NEXT: 201320: retq // DISASM-EMPTY: -// DISASM-NEXT: 0000000000201001 bar: -// DISASM-NEXT: 201001: retq +// DISASM-NEXT: 0000000000201321 bar: +// DISASM-NEXT: 201321: retq // DISASM-EMPTY: -// DISASM-NEXT: 0000000000201002 _start: -// DISASM-NEXT: 201002: callq 0 <_start+0x5> -// DISASM-NEXT: 201007: callq 0 <_start+0xa> -// DISASM-NEXT: 20100c: callq 31 -// DISASM-NEXT: 201011: callq 42 +// DISASM-NEXT: 0000000000201322 _start: +// DISASM-NEXT: 201322: callq 0 <_start+0x5> +// DISASM-NEXT: 201327: callq 0 <_start+0xa> +// DISASM-NEXT: 20132c: callq 31 +// DISASM-NEXT: 201331: callq 42 // DISASM-EMPTY: // DISASM-NEXT: Disassembly of section .plt: // DISASM-EMPTY: -// DISASM-NEXT: 0000000000201020 .plt: -// DISASM-NEXT: 201020: pushq 8162(%rip) -// DISASM-NEXT: 201026: jmpq *8164(%rip) -// DISASM-NEXT: 20102c: nopl (%rax) -// DISASM-EMPTY: -// DISASM-NEXT: 0000000000201030 bar2@plt: -// DISASM-NEXT: 201030: jmpq *8162(%rip) -// DISASM-NEXT: 201036: pushq $0 -// DISASM-NEXT: 20103b: jmp -32 <.plt> -// DISASM-EMPTY: -// DISASM-NEXT: 0000000000201040 zed2@plt: -// DISASM-NEXT: 201040: jmpq *8154(%rip) -// DISASM-NEXT: 201046: pushq $1 -// DISASM-NEXT: 20104b: jmp -48 <.plt> +// DISASM-NEXT: 0000000000201340 .plt: +// DISASM-NEXT: 201340: pushq 8514(%rip) +// DISASM-NEXT: 201346: jmpq *8516(%rip) +// DISASM-NEXT: 20134c: nopl (%rax) +// DISASM-EMPTY: +// DISASM-NEXT: 0000000000201350 bar2@plt: +// DISASM-NEXT: 201350: jmpq *8514(%rip) +// DISASM-NEXT: 201356: pushq $0 +// DISASM-NEXT: 20135b: jmp -32 <.plt> +// DISASM-EMPTY: +// DISASM-NEXT: 0000000000201360 zed2@plt: +// DISASM-NEXT: 201360: jmpq *8506(%rip) +// DISASM-NEXT: 201366: pushq $1 +// DISASM-NEXT: 20136b: jmp -48 <.plt> .text .type foo STT_GNU_IFUNC Index: lld/trunk/test/ELF/gnu-ifunc-plt.s =================================================================== --- lld/trunk/test/ELF/gnu-ifunc-plt.s +++ lld/trunk/test/ELF/gnu-ifunc-plt.s @@ -13,20 +13,20 @@ // Check that the IRELATIVE relocations are after the JUMP_SLOT in the plt // CHECK: Relocations [ // CHECK-NEXT: Section (4) .rela.dyn { -// CHECK-NEXT: 0x203028 R_X86_64_IRELATIVE - 0x201000 -// CHECK-NEXT: 0x203030 R_X86_64_IRELATIVE - 0x201001 +// CHECK-NEXT: 0x203458 R_X86_64_IRELATIVE - 0x2012D8 +// CHECK-NEXT: 0x203460 R_X86_64_IRELATIVE - 0x2012D9 // CHECK-NEXT: } // CHECK-NEXT: Section (5) .rela.plt { -// CHECK-NEXT: 0x203018 R_X86_64_JUMP_SLOT bar2 0x0 -// CHECK-NEXT: 0x203020 R_X86_64_JUMP_SLOT zed2 0x0 +// CHECK-NEXT: 0x203448 R_X86_64_JUMP_SLOT bar2 0x0 +// CHECK-NEXT: 0x203450 R_X86_64_JUMP_SLOT zed2 0x0 // CHECK-NEXT: } // Check that .got.plt entries point back to PLT header // GOTPLT: Contents of section .got.plt: -// GOTPLT-NEXT: 203000 00202000 00000000 00000000 00000000 -// GOTPLT-NEXT: 203010 00000000 00000000 36102000 00000000 -// GOTPLT-NEXT: 203020 46102000 00000000 56102000 00000000 -// GOTPLT-NEXT: 203030 66102000 00000000 +// GOTPLT-NEXT: 203430 40232000 00000000 00000000 00000000 +// GOTPLT-NEXT: 203440 00000000 00000000 06132000 00000000 +// GOTPLT-NEXT: 203450 16132000 00000000 26132000 00000000 +// GOTPLT-NEXT: 203460 36132000 00000000 // Check that the PLTRELSZ tag does not include the IRELATIVE relocations // CHECK: DynamicSection [ @@ -37,37 +37,37 @@ // DISASM: Disassembly of section .text: // DISASM-EMPTY: // DISASM-NEXT: foo: -// DISASM-NEXT: 201000: retq +// DISASM-NEXT: 2012d8: retq // DISASM: bar: -// DISASM-NEXT: 201001: retq +// DISASM-NEXT: 2012d9: retq // DISASM: _start: -// DISASM-NEXT: 201002: callq 73 -// DISASM-NEXT: 201007: callq 84 +// DISASM-NEXT: 2012da: callq 65 +// DISASM-NEXT: 2012df: callq 76 // DISASM-NEXT: callq {{.*}} // DISASM-NEXT: callq {{.*}} // DISASM-EMPTY: // DISASM-NEXT: Disassembly of section .plt: // DISASM-EMPTY: // DISASM-NEXT: .plt: -// DISASM-NEXT: 201020: pushq 8162(%rip) -// DISASM-NEXT: 201026: jmpq *8164(%rip) -// DISASM-NEXT: 20102c: nopl (%rax) +// DISASM-NEXT: 2012f0: pushq 8514(%rip) +// DISASM-NEXT: 2012f6: jmpq *8516(%rip) +// DISASM-NEXT: 2012fc: nopl (%rax) // DISASM-EMPTY: // DISASM-NEXT: bar2@plt: -// DISASM-NEXT: 201030: jmpq *8162(%rip) -// DISASM-NEXT: 201036: pushq $0 -// DISASM-NEXT: 20103b: jmp -32 <.plt> +// DISASM-NEXT: 201300: jmpq *8514(%rip) +// DISASM-NEXT: 201306: pushq $0 +// DISASM-NEXT: 20130b: jmp -32 <.plt> // DISASM-EMPTY: // DISASM-NEXT: zed2@plt: -// DISASM-NEXT: 201040: jmpq *8154(%rip) -// DISASM-NEXT: 201046: pushq $1 -// DISASM-NEXT: 20104b: jmp -48 <.plt> -// DISASM-NEXT: 201050: jmpq *8146(%rip) -// DISASM-NEXT: 201056: pushq $0 -// DISASM-NEXT: 20105b: jmp -32 -// DISASM-NEXT: 201060: jmpq *8138(%rip) -// DISASM-NEXT: 201066: pushq $1 -// DISASM-NEXT: 20106b: jmp -48 +// DISASM-NEXT: 201310: jmpq *8506(%rip) +// DISASM-NEXT: 201316: pushq $1 +// DISASM-NEXT: 20131b: jmp -48 <.plt> +// DISASM-NEXT: 201320: jmpq *8498(%rip) +// DISASM-NEXT: 201326: pushq $0 +// DISASM-NEXT: 20132b: jmp -32 +// DISASM-NEXT: 201330: jmpq *8490(%rip) +// DISASM-NEXT: 201336: pushq $1 +// DISASM-NEXT: 20133b: jmp -48 .text .type foo STT_GNU_IFUNC Index: lld/trunk/test/ELF/gnu-ifunc-shared.s =================================================================== --- lld/trunk/test/ELF/gnu-ifunc-shared.s +++ lld/trunk/test/ELF/gnu-ifunc-shared.s @@ -12,44 +12,44 @@ // DISASM: Disassembly of section .text: // DISASM-EMPTY: // DISASM-NEXT: fct: -// DISASM-NEXT: 1000: retq +// DISASM-NEXT: 1308: retq // DISASM: fct2: -// DISASM-NEXT: 1001: retq +// DISASM-NEXT: 1309: retq // DISASM: f1: -// DISASM-NEXT: 1002: callq 73 -// DISASM-NEXT: 1007: callq 36 -// DISASM-NEXT: 100c: callq 47 -// DISASM-NEXT: 1011: retq +// DISASM-NEXT: 130a: callq 65 +// DISASM-NEXT: 130f: callq 28 +// DISASM-NEXT: 1314: callq 39 +// DISASM-NEXT: 1319: retq // DISASM: f2: -// DISASM-NEXT: 1012: retq +// DISASM-NEXT: 131a: retq // DISASM-EMPTY: // DISASM-NEXT: Disassembly of section .plt: // DISASM-EMPTY: // DISASM-NEXT: .plt: -// DISASM-NEXT: 1020: pushq 8162(%rip) -// DISASM-NEXT: 1026: jmpq *8164(%rip) -// DISASM-NEXT: 102c: nopl (%rax) +// DISASM-NEXT: 1320: pushq 8482(%rip) +// DISASM-NEXT: 1326: jmpq *8484(%rip) +// DISASM-NEXT: 132c: nopl (%rax) // DISASM-EMPTY: // DISASM-NEXT: fct2@plt: -// DISASM-NEXT: 1030: jmpq *8162(%rip) -// DISASM-NEXT: 1036: pushq $0 -// DISASM-NEXT: 103b: jmp -32 <.plt> +// DISASM-NEXT: 1330: jmpq *8482(%rip) +// DISASM-NEXT: 1336: pushq $0 +// DISASM-NEXT: 133b: jmp -32 <.plt> // DISASM-EMPTY: // DISASM-NEXT: f2@plt: -// DISASM-NEXT: 1040: jmpq *8154(%rip) -// DISASM-NEXT: 1046: pushq $1 -// DISASM-NEXT: 104b: jmp -48 <.plt> -// DISASM-NEXT: 1050: jmpq *8146(%rip) -// DISASM-NEXT: 1056: pushq $0 -// DISASM-NEXT: 105b: jmp -32 +// DISASM-NEXT: 1340: jmpq *8474(%rip) +// DISASM-NEXT: 1346: pushq $1 +// DISASM-NEXT: 134b: jmp -48 <.plt> +// DISASM-NEXT: 1350: jmpq *8466(%rip) +// DISASM-NEXT: 1356: pushq $0 +// DISASM-NEXT: 135b: jmp -32 // CHECK: Relocations [ // CHECK-NEXT: Section (5) .rela.dyn { -// CHECK-NEXT: 0x3028 R_X86_64_IRELATIVE - 0x1000 +// CHECK-NEXT: 0x3468 R_X86_64_IRELATIVE - 0x1308 // CHECK-NEXT: } // CHECK-NEXT: Section (6) .rela.plt { -// CHECK-NEXT: 0x3018 R_X86_64_JUMP_SLOT fct2 0x0 -// CHECK-NEXT: 0x3020 R_X86_64_JUMP_SLOT f2 0x0 +// CHECK-NEXT: 0x3458 R_X86_64_JUMP_SLOT fct2 0x0 +// CHECK-NEXT: 0x3460 R_X86_64_JUMP_SLOT f2 0x0 // CHECK-NEXT: } // Hidden expect IRELATIVE Index: lld/trunk/test/ELF/gnu-ifunc.s =================================================================== --- lld/trunk/test/ELF/gnu-ifunc.s +++ lld/trunk/test/ELF/gnu-ifunc.s @@ -24,8 +24,8 @@ // CHECK-NEXT: Name: .got.plt // CHECK: Relocations [ // CHECK-NEXT: Section ({{.*}}) .rela.dyn { -// CHECK-NEXT: 0x202000 R_X86_64_IRELATIVE -// CHECK-NEXT: 0x202008 R_X86_64_IRELATIVE +// CHECK-NEXT: 0x2021D0 R_X86_64_IRELATIVE +// CHECK-NEXT: 0x2021D8 R_X86_64_IRELATIVE // CHECK-NEXT: } // CHECK-NEXT: ] // CHECK: Symbols [ @@ -62,7 +62,7 @@ // CHECK-NEXT: } // CHECK-NEXT: Symbol { // CHECK-NEXT: Name: _start -// CHECK-NEXT: Value: 0x201002 +// CHECK-NEXT: Value: 0x20118A // CHECK-NEXT: Size: 0 // CHECK-NEXT: Binding: Global // CHECK-NEXT: Type: None @@ -71,7 +71,7 @@ // CHECK-NEXT: } // CHECK-NEXT: Symbol { // CHECK-NEXT: Name: bar -// CHECK-NEXT: Value: 0x201001 +// CHECK-NEXT: Value: 0x201189 // CHECK-NEXT: Size: 0 // CHECK-NEXT: Binding: Global // CHECK-NEXT: Type: GNU_IFunc @@ -80,7 +80,7 @@ // CHECK-NEXT: } // CHECK-NEXT: Symbol { // CHECK-NEXT: Name: foo -// CHECK-NEXT: Value: 0x201000 +// CHECK-NEXT: Value: 0x201188 // CHECK-NEXT: Size: 0 // CHECK-NEXT: Binding: Global // CHECK-NEXT: Type: GNU_IFunc @@ -92,25 +92,25 @@ // DISASM: Disassembly of section .text: // DISASM-EMPTY: // DISASM-NEXT: foo: -// DISASM-NEXT: 201000: {{.*}} retq +// DISASM-NEXT: 201188: {{.*}} retq // DISASM: bar: -// DISASM-NEXT: 201001: {{.*}} retq +// DISASM-NEXT: 201189: {{.*}} retq // DISASM: _start: -// DISASM-NEXT: 201002: {{.*}} callq 25 -// DISASM-NEXT: 201007: {{.*}} callq 36 -// DISASM-NEXT: 20100c: {{.*}} movl $2097496, %edx -// DISASM-NEXT: 201011: {{.*}} movl $2097544, %edx -// DISASM-NEXT: 201016: {{.*}} movl $2097545, %edx +// DISASM-NEXT: 20118a: {{.*}} callq 33 +// DISASM-NEXT: 20118f: {{.*}} callq 44 +// DISASM-NEXT: 201194: {{.*}} movl $2097496, %edx +// DISASM-NEXT: 201199: {{.*}} movl $2097544, %edx +// DISASM-NEXT: 20119e: {{.*}} movl $2097545, %edx // DISASM-EMPTY: // DISASM-NEXT: Disassembly of section .plt: // DISASM-EMPTY: // DISASM-NEXT: .plt: -// DISASM-NEXT: 201020: {{.*}} jmpq *4058(%rip) -// DISASM-NEXT: 201026: {{.*}} pushq $0 -// DISASM-NEXT: 20102b: {{.*}} jmp -32 <_start+0xe> -// DISASM-NEXT: 201030: {{.*}} jmpq *4050(%rip) -// DISASM-NEXT: 201036: {{.*}} pushq $1 -// DISASM-NEXT: 20103b: {{.*}} jmp -48 <_start+0xe> +// DISASM-NEXT: 2011b0: {{.*}} jmpq *4122(%rip) +// DISASM-NEXT: 2011b6: {{.*}} pushq $0 +// DISASM-NEXT: 2011bb: {{.*}} jmp -32 <_start+0x16> +// DISASM-NEXT: 2011c0: {{.*}} jmpq *4114(%rip) +// DISASM-NEXT: 2011c6: {{.*}} pushq $1 +// DISASM-NEXT: 2011cb: {{.*}} jmp -48 <_start+0x16> .text .type foo STT_GNU_IFUNC Index: lld/trunk/test/ELF/got.s =================================================================== --- lld/trunk/test/ELF/got.s +++ lld/trunk/test/ELF/got.s @@ -1,7 +1,7 @@ // REQUIRES: x86 // RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o // RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %p/Inputs/shared.s -o %t2.o -// RUN: ld.lld -shared %t2.o -o %t2.so +// RUN: ld.lld -shared %t2.o -soname=t2.so -o %t2.so // RUN: ld.lld --hash-style=sysv %t.o %t2.so -o %t // RUN: llvm-readobj -S -r %t | FileCheck %s // RUN: llvm-objdump -d %t | FileCheck --check-prefix=DISASM %s @@ -12,7 +12,7 @@ // CHECK-NEXT: SHF_ALLOC // CHECK-NEXT: SHF_WRITE // CHECK-NEXT: ] -// CHECK-NEXT: Address: 0x2020B0 +// CHECK-NEXT: Address: 0x202338 // 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: 0x202338 R_X86_64_GLOB_DAT bar 0x0 +// CHECK-NEXT: 0x202340 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 +// 0x202338 - (0x201270 + 2) - 4 = 4290 +// 0x202338 - (0x201276 + 2) - 4 = 4284 +// 0x202340 - (0x20127c + 2) - 4 = 4286 // DISASM: _start: -// DISASM-NEXT: 201000: {{.*}} jmpq *4266(%rip) -// DISASM-NEXT: 201006: {{.*}} jmpq *4260(%rip) -// DISASM-NEXT: 20100c: {{.*}} jmpq *4262(%rip) +// DISASM-NEXT: 201270: {{.*}} jmpq *4290(%rip) +// DISASM-NEXT: 201276: {{.*}} jmpq *4284(%rip) +// DISASM-NEXT: 20127c: {{.*}} jmpq *4286(%rip) .global _start _start: Index: lld/trunk/test/ELF/image-base.s =================================================================== --- lld/trunk/test/ELF/image-base.s +++ lld/trunk/test/ELF/image-base.s @@ -44,9 +44,9 @@ # CHECK-NEXT: } # CHECK-NEXT: ProgramHeader { # CHECK-NEXT: Type: PT_LOAD (0x1) -# CHECK-NEXT: Offset: 0x1000 -# CHECK-NEXT: VirtualAddress: 0x1001000 -# CHECK-NEXT: PhysicalAddress: 0x1001000 +# CHECK-NEXT: Offset: 0x120 +# CHECK-NEXT: VirtualAddress: 0x1001120 +# CHECK-NEXT: PhysicalAddress: 0x1001120 # CHECK-NEXT: FileSize: 1 # CHECK-NEXT: MemSize: 1 # CHECK-NEXT: Flags [ (0x5) Index: lld/trunk/test/ELF/just-symbols.s =================================================================== --- lld/trunk/test/ELF/just-symbols.s +++ lld/trunk/test/ELF/just-symbols.s @@ -6,7 +6,7 @@ # RUN: ld.lld -just-symbols=%t1.exe -o %t2.exe # RUN: llvm-readelf -symbols %t2.exe | FileCheck %s -# CHECK: 0000000000011000 40 OBJECT GLOBAL DEFAULT ABS bar +# CHECK: 0000000000011001 40 OBJECT GLOBAL DEFAULT ABS bar # CHECK: 0000000000010000 0 NOTYPE GLOBAL DEFAULT ABS foo .globl foo, bar Index: lld/trunk/test/ELF/linkerscript/absolute.s =================================================================== --- lld/trunk/test/ELF/linkerscript/absolute.s +++ lld/trunk/test/ELF/linkerscript/absolute.s @@ -19,7 +19,7 @@ # CHECK-NEXT: } # CHECK-RHS: Name: foo -# CHECK-RHS-NEXT: Value: 0x201001 +# CHECK-RHS-NEXT: Value: 0x201121 # CHECK-RHS-NEXT: Size: # CHECK-RHS-NEXT: Binding: # CHECK-RHS-NEXT: Type: Index: lld/trunk/test/ELF/linkerscript/page-size.s =================================================================== --- lld/trunk/test/ELF/linkerscript/page-size.s +++ lld/trunk/test/ELF/linkerscript/page-size.s @@ -19,9 +19,9 @@ # CHECK-NEXT: } # CHECK-NEXT: ProgramHeader { # CHECK-NEXT: Type: PT_LOAD -# CHECK-NEXT: Offset: 0x4000 -# CHECK-NEXT: VirtualAddress: 0x204000 -# CHECK-NEXT: PhysicalAddress: 0x204000 +# CHECK-NEXT: Offset: 0x158 +# CHECK-NEXT: VirtualAddress: 0x204158 +# CHECK-NEXT: PhysicalAddress: 0x204158 # CHECK-NEXT: FileSize: 1 # CHECK-NEXT: MemSize: 1 # CHECK-NEXT: Flags [ @@ -32,9 +32,9 @@ # CHECK-NEXT: } # CHECK-NEXT: ProgramHeader { # CHECK-NEXT: Type: PT_LOAD -# CHECK-NEXT: Offset: 0x8000 -# CHECK-NEXT: VirtualAddress: 0x208000 -# CHECK-NEXT: PhysicalAddress: 0x208000 +# CHECK-NEXT: Offset: 0x159 +# CHECK-NEXT: VirtualAddress: 0x208159 +# CHECK-NEXT: PhysicalAddress: 0x208159 # CHECK-NEXT: FileSize: 8 # CHECK-NEXT: MemSize: 8 # CHECK-NEXT: Flags [ Index: lld/trunk/test/ELF/linkerscript/symbol-reserved.s =================================================================== --- lld/trunk/test/ELF/linkerscript/symbol-reserved.s +++ lld/trunk/test/ELF/linkerscript/symbol-reserved.s @@ -34,7 +34,7 @@ # RUN: ld.lld -o %t1 %t %t.script # RUN: llvm-objdump -t %t1 | FileCheck --check-prefix=RELATIVE %s # RELATIVE: 0000000000202005 .text 00000000 .hidden newsym -# RELATIVE: 0000000000201007 .text 00000000 _end +# RELATIVE: 0000000000201127 .text 00000000 _end # RUN: echo "PROVIDE_HIDDEN(newsym = ALIGN(_end, CONSTANT(MAXPAGESIZE)) + 5);" > %t.script # RUN: ld.lld -o %t1 --script %p/Inputs/symbol-reserved.script %t %t.script Index: lld/trunk/test/ELF/linkerscript/synthetic-symbols3.test =================================================================== --- lld/trunk/test/ELF/linkerscript/synthetic-symbols3.test +++ lld/trunk/test/ELF/linkerscript/synthetic-symbols3.test @@ -7,5 +7,5 @@ PROVIDE_HIDDEN(_begin_sec = _start); PROVIDE_HIDDEN(_end_sec = ADDR(.text) + SIZEOF(.text)); -# CHECK: 0000000000201000 .text 00000000 .hidden _begin_sec -# CHECK-NEXT: 0000000000201001 .text 00000000 .hidden _end_sec +# CHECK: 00000000002011ac .text 00000000 .hidden _begin_sec +# CHECK-NEXT: 00000000002011ad .text 00000000 .hidden _end_sec Index: lld/trunk/test/ELF/local-got-pie.s =================================================================== --- lld/trunk/test/ELF/local-got-pie.s +++ lld/trunk/test/ELF/local-got-pie.s @@ -13,13 +13,13 @@ foo: nop -// 0x20B0 - 1001 - 5 = 4266 +// 0x22C8 - 0x1210 - 5 = 4275 // DISASM: Disassembly of section .text: // DISASM-EMPTY: // DISASM-NEXT: _start: -// DISASM-NEXT: 1000: {{.*}} callq 4267 +// DISASM-NEXT: 1210: {{.*}} callq 4275 // DISASM: foo: -// DISASM-NEXT: 1005: {{.*}} nop +// DISASM-NEXT: 1215: {{.*}} nop // CHECK: Name: .got // CHECK-NEXT: Type: SHT_PROGBITS @@ -27,13 +27,13 @@ // CHECK-NEXT: SHF_ALLOC // CHECK-NEXT: SHF_WRITE // CHECK-NEXT: ] -// CHECK-NEXT: Address: 0x20B0 +// CHECK-NEXT: Address: 0x22C8 // CHECK-NEXT: Offset: // CHECK-NEXT: Size: 8 // CHECK: Relocations [ // CHECK-NEXT: Section ({{.*}}) .rela.dyn { -// CHECK-NEXT: 0x20B0 R_X86_64_RELATIVE - 0x1005 +// CHECK-NEXT: 0x22C8 R_X86_64_RELATIVE - 0x1215 // CHECK-NEXT: } // CHECK-NEXT: ] // CHECK: 0x000000006FFFFFF9 RELACOUNT 1 Index: lld/trunk/test/ELF/local-got-shared.s =================================================================== --- lld/trunk/test/ELF/local-got-shared.s +++ lld/trunk/test/ELF/local-got-shared.s @@ -12,12 +12,12 @@ foo: nop -// 0x20B0 - 0x1000 - 5 = 4267 +// 0x22E0 - 0x1228 - 5 = 4275 // DISASM: bar: -// DISASM-NEXT: 1000: callq 4267 +// DISASM-NEXT: 1228: callq 4275 // DISASM: foo: -// DISASM-NEXT: 1005: nop +// DISASM-NEXT: 122d: nop // CHECK: Name: .got // CHECK-NEXT: Type: SHT_PROGBITS @@ -25,13 +25,13 @@ // CHECK-NEXT: SHF_ALLOC // CHECK-NEXT: SHF_WRITE // CHECK-NEXT: ] -// CHECK-NEXT: Address: 0x20B0 +// CHECK-NEXT: Address: 0x22E0 // CHECK-NEXT: Offset: // CHECK-NEXT: Size: 8 // CHECK: Relocations [ // CHECK-NEXT: Section ({{.*}}) .rela.dyn { -// CHECK-NEXT: 0x20B0 R_X86_64_RELATIVE - 0x1005 +// CHECK-NEXT: 0x22E0 R_X86_64_RELATIVE - 0x122D // CHECK-NEXT: } // CHECK-NEXT: ] // CHECK: 0x000000006FFFFFF9 RELACOUNT 1 Index: lld/trunk/test/ELF/local-got.s =================================================================== --- lld/trunk/test/ELF/local-got.s +++ lld/trunk/test/ELF/local-got.s @@ -15,14 +15,14 @@ foo: nop -// 0x2020C0 - 0x201000 - 5 = 4283 -// 0x2020C8 - 0x201005 - 5 = 4286 +// 0x202320 - 0x201250 - 5 = 4299 +// 0x202328 - 0x201255 - 5 = 4302 // DISASM: _start: -// DISASM-NEXT: 201000: callq 4283 -// DISASM-NEXT: 201005: callq 4286 - -// DISASM: foo: -// DISASM-NEXT: 20100a: nop +// DISASM-NEXT: 201250: callq 4299 +// DISASM-NEXT: 201255: callq 4302 + +// DISASM: foo: +// DISASM-NEXT: 20125a: nop // CHECK: Name: .got // CHECK-NEXT: Type: SHT_PROGBITS @@ -30,7 +30,7 @@ // CHECK-NEXT: SHF_ALLOC // CHECK-NEXT: SHF_WRITE // CHECK-NEXT: ] -// CHECK-NEXT: Address: 0x2020C0 +// CHECK-NEXT: Address: 0x202320 // CHECK-NEXT: Offset: // CHECK-NEXT: Size: 16 // CHECK-NEXT: Link: 0 @@ -38,11 +38,11 @@ // CHECK-NEXT: AddressAlignment: 8 // CHECK-NEXT: EntrySize: 0 // CHECK-NEXT: SectionData ( -// CHECK-NEXT: 0000: 00000000 00000000 0A102000 00000000 +// CHECK-NEXT: 0000: 00000000 00000000 5A122000 00000000 // CHECK-NEXT: ) // CHECK: Relocations [ // CHECK-NEXT: Section ({{.*}}) .rela.dyn { -// CHECK-NEXT: 0x2020C0 R_X86_64_GLOB_DAT bar 0x0 +// CHECK-NEXT: 0x202320 R_X86_64_GLOB_DAT bar 0x0 // CHECK-NEXT: } // CHECK-NEXT: ] Index: lld/trunk/test/ELF/map-file.s =================================================================== --- lld/trunk/test/ELF/map-file.s +++ lld/trunk/test/ELF/map-file.s @@ -57,44 +57,43 @@ // CHECK-NEXT: 200368 200368 2c 1 {{.*}}{{/|\\}}map-file.s.tmp1.o:(.eh_frame+0x0) // CHECK-NEXT: 200398 200398 14 1 {{.*}}{{/|\\}}map-file.s.tmp1.o:(.eh_frame+0x2c) // CHECK-NEXT: 2003b0 2003b0 18 1 {{.*}}{{/|\\}}map-file.s.tmp2.o:(.eh_frame+0x18) -// CHECK-NEXT: 201000 201000 2d 4 .text -// CHECK-NEXT: 201000 201000 28 4 {{.*}}{{/|\\}}map-file.s.tmp1.o:(.text) -// CHECK-NEXT: 201000 201000 0 1 _start -// CHECK-NEXT: 20101f 20101f 0 1 f(int) -// CHECK-NEXT: 201028 201028 0 1 local -// CHECK-NEXT: 201028 201028 2 4 {{.*}}{{/|\\}}map-file.s.tmp2.o:(.text) -// CHECK-NEXT: 201028 201028 0 1 foo -// CHECK-NEXT: 201029 201029 0 1 bar -// CHECK-NEXT: 20102a 20102a 0 1 {{.*}}{{/|\\}}map-file.s.tmp2.o:(.text.zed) -// CHECK-NEXT: 20102a 20102a 0 1 zed -// CHECK-NEXT: 20102c 20102c 0 4 {{.*}}{{/|\\}}map-file.s.tmp3.o:(.text) -// CHECK-NEXT: 20102c 20102c 0 1 bah -// CHECK-NEXT: 20102c 20102c 1 4 {{.*}}{{/|\\}}map-file.s.tmp4.a(map-file.s.tmp4.o):(.text) -// CHECK-NEXT: 20102c 20102c 0 1 baz -// CHECK-NEXT: 201030 201030 30 16 .plt -// CHECK-NEXT: 201030 201030 30 16 :(.plt) -// CHECK-NEXT: 201040 201040 0 1 sharedFunc1 -// CHECK-NEXT: 201050 201050 0 1 sharedFunc2 -// CHECK-NEXT: 202000 202000 100 8 .dynamic -// CHECK-NEXT: 202000 202000 100 8 :(.dynamic) -// CHECK-NEXT: 203000 203000 28 8 .got.plt -// CHECK-NEXT: 203000 203000 28 8 :(.got.plt) -// CHECK-NEXT: 203030 203030 10 16 .bss -// CHECK-NEXT: 203030 203030 4 16 {{.*}}{{/|\\}}map-file.s.tmp1.o:(COMMON) -// CHECK-NEXT: 203030 203030 4 1 common -// CHECK-NEXT: 203034 203034 4 1 :(.bss) -// CHECK-NEXT: 203034 203034 4 1 sharedFoo -// CHECK-NEXT: 203038 203038 8 1 :(.bss) -// CHECK-NEXT: 203038 203038 8 1 sharedBar -// CHECK-NEXT: 0 0 8 1 .comment -// CHECK-NEXT: 0 0 8 1 :(.comment) -// CHECK-NEXT: 0 0 198 8 .symtab -// CHECK-NEXT: 0 0 198 8 :(.symtab) -// CHECK-NEXT: 0 0 84 1 .shstrtab -// CHECK-NEXT: 0 0 84 1 :(.shstrtab) -// CHECK-NEXT: 0 0 6d 1 .strtab -// CHECK-NEXT: 0 0 6d 1 :(.strtab) - +// CHECK-NEXT: 2013cc 2013cc 2d 4 .text +// CHECK-NEXT: 2013cc 2013cc 28 4 {{.*}}{{/|\\}}map-file.s.tmp1.o:(.text) +// CHECK-NEXT: 2013cc 2013cc 0 1 _start +// CHECK-NEXT: 2013eb 2013eb 0 1 f(int) +// CHECK-NEXT: 2013f4 2013f4 0 1 local +// CHECK-NEXT: 2013f4 2013f4 2 4 {{.*}}{{/|\\}}map-file.s.tmp2.o:(.text) +// CHECK-NEXT: 2013f4 2013f4 0 1 foo +// CHECK-NEXT: 2013f5 2013f5 0 1 bar +// CHECK-NEXT: 2013f6 2013f6 0 1 {{.*}}{{/|\\}}map-file.s.tmp2.o:(.text.zed) +// CHECK-NEXT: 2013f6 2013f6 0 1 zed +// CHECK-NEXT: 2013f8 2013f8 0 4 {{.*}}{{/|\\}}map-file.s.tmp3.o:(.text) +// CHECK-NEXT: 2013f8 2013f8 0 1 bah +// CHECK-NEXT: 2013f8 2013f8 1 4 {{.*}}{{/|\\}}map-file.s.tmp4.a(map-file.s.tmp4.o):(.text) +// CHECK-NEXT: 2013f8 2013f8 0 1 baz +// CHECK-NEXT: 201400 201400 30 16 .plt +// CHECK-NEXT: 201400 201400 30 16 :(.plt) +// CHECK-NEXT: 201410 201410 0 1 sharedFunc1 +// CHECK-NEXT: 201420 201420 0 1 sharedFunc2 +// CHECK-NEXT: 202430 202430 100 8 .dynamic +// CHECK-NEXT: 202430 202430 100 8 :(.dynamic) +// CHECK-NEXT: 203530 203530 28 8 .got.plt +// CHECk-NEXT: 203530 203530 28 8 :(.got.plt) +// CHECk-NEXT: 203560 203560 10 16 .bss +// CHECk-NEXT: 203560 203560 4 16 {{.*}}{{/|\\}}map-file.s.tmp1.o:(COMMON) +// CHECk-NEXT: 203560 203560 4 1 common +// CHECk-NEXT: 203564 203564 4 1 :(.bss) +// CHECk-NEXT: 203564 203564 4 1 sharedFoo +// CHECk-NEXT: 203568 203568 8 1 :(.bss) +// CHECk-NEXT: 203568 203568 8 1 sharedBar +// CHECk-NEXT: 0 0 48 1 .comment +// CHECk-NEXT: 0 0 48 1 :(.comment) +// CHECk-NEXT: 0 0 198 8 .symtab +// CHECk-NEXT: 0 0 198 8 :(.symtab) +// CHECk-NEXT: 0 0 84 1 .shstrtab +// CHECk-NEXT: 0 0 84 1 :(.shstrtab) +// CHECk-NEXT: 0 0 6d 1 .strtab +// CHECk-NEXT: 0 0 6d 1 :(.strtab) // RUN: not ld.lld %t1.o %t2.o %t3.o %t4.a -o %t -Map=/ 2>&1 \ // RUN: | FileCheck -check-prefix=FAIL %s Index: lld/trunk/test/ELF/no-inhibit-exec.s =================================================================== --- lld/trunk/test/ELF/no-inhibit-exec.s +++ lld/trunk/test/ELF/no-inhibit-exec.s @@ -8,7 +8,7 @@ # CHECK: Disassembly of section .text: # CHECK-EMPTY: # CHECK-NEXT: _start -# CHECK-NEXT: 201000: {{.*}} callq -2101253 +# CHECK-NEXT: 201120: {{.*}} callq -2101541 # RELOC: Relocations [ # RELOC-NEXT: ] Index: lld/trunk/test/ELF/partition-notes.s =================================================================== --- lld/trunk/test/ELF/partition-notes.s +++ lld/trunk/test/ELF/partition-notes.s @@ -22,7 +22,7 @@ // CHECK-NEXT: Displaying notes // CHECK-NEXT: Owner // CHECK-NEXT: GNU 0x00000014 NT_GNU_BUILD_ID (unique build ID bitstring) -// CHECK-NEXT: Build ID: 0f4d5297cbbe52e4bea558eeb792944670de22e1 +// CHECK-NEXT: Build ID: 08b93eab87177a2356d1b0d1148339463f98dac2 .section .llvm_sympart,"",@llvm_sympart .asciz "part1" Index: lld/trunk/test/ELF/partition-pack-dyn-relocs.s =================================================================== --- lld/trunk/test/ELF/partition-pack-dyn-relocs.s +++ lld/trunk/test/ELF/partition-pack-dyn-relocs.s @@ -15,17 +15,19 @@ // CHECK: Section Headers: // CHECK: .rela.dyn ANDROID_RELA {{0*}}[[ANDROID_RELA_ADDR:[^ ]*]] // CHECK: .relr.dyn RELR {{0*}}[[RELR_ADDR:[^ ]*]] -// CHECK: .data PROGBITS 000000000000[[DATA_SEGMENT:.]]000 +// PART0: .data PROGBITS 000000000000[[DATA_SEGMENT:.]]378 +// PART1: .data PROGBITS 000000000000[[DATA_SEGMENT:.]]340 // CHECK: Relocation section '.rela.dyn' // CHECK-NEXT: Offset -// PART0-NEXT: 000000000000[[DATA_SEGMENT]]008 {{.*}} R_X86_64_64 000000000000[[DATA_SEGMENT]]000 p0 + 0 -// PART1-NEXT: 000000000000[[DATA_SEGMENT]]008 {{.*}} R_X86_64_64 000000000000[[DATA_SEGMENT]]000 p1 + 0 +// PART0-NEXT: 000000000000[[DATA_SEGMENT]]380 {{.*}} R_X86_64_64 000000000000[[DATA_SEGMENT]]378 p0 + 0 +// PART1-NEXT: 000000000000[[DATA_SEGMENT]]348 {{.*}} R_X86_64_64 000000000000[[DATA_SEGMENT]]340 p1 + 0 // CHECK-EMPTY: // CHECK: Relocation section '.relr.dyn' // CHECK-NEXT: Offset -// CHECK-NEXT: 000000000000[[DATA_SEGMENT]]000 {{.*}} R_X86_64_RELATIVE +// PART0-NEXT: 000000000000[[DATA_SEGMENT]]378 {{.*}} R_X86_64_RELATIVE +// PART1-NEXT: 000000000000[[DATA_SEGMENT]]340 {{.*}} R_X86_64_RELATIVE // CHECK-EMPTY: // CHECK: Dynamic section Index: lld/trunk/test/ELF/partition-synthetic-sections.s =================================================================== --- lld/trunk/test/ELF/partition-synthetic-sections.s +++ lld/trunk/test/ELF/partition-synthetic-sections.s @@ -41,7 +41,8 @@ // PART0-NEXT: .plt PROGBITS // PART0-NEXT: .init_array INIT_ARRAY {{0*}}[[INIT_ARRAY_ADDR:[^ ]*]] // CHECK-NEXT: .dynamic DYNAMIC {{0*}}[[DYNAMIC_ADDR:[^ ]*]] -// CHECK-NEXT: .data PROGBITS 000000000000[[DATA_SEGMENT:.]]000 +// PART0-NEXT: .data PROGBITS 000000000000[[DATA_SEGMENT:.]]178 +// PART1-NEXT: .data PROGBITS 000000000000[[DATA_SEGMENT:.]]130 // PART0-NEXT: .got.plt PROGBITS {{0*}}[[GOT_PLT_ADDR:[^ ]*]] // PART0-NEXT: .part.end NOBITS {{0*}}[[PART_END_ADDR:[^ ]*]] // CHECK-NEXT: .comment PROGBITS @@ -52,18 +53,18 @@ // CHECK: Relocation section '.rela.dyn' // CHECK-NEXT: Offset -// PART0-NEXT: 000000000000[[DATA_SEGMENT]]000 {{.*}} R_X86_64_64 {{.*}} f1@v3 + 0 +// PART0-NEXT: 000000000000[[DATA_SEGMENT]]178 {{.*}} R_X86_64_64 {{.*}} f1@v3 + 0 // PART0-NEXT: {{0*}}[[INIT_ARRAY_ADDR]] {{.*}} R_X86_64_64 {{.*}} p0@@x1 + 0 -// PART1-NEXT: 000000000000[[DATA_SEGMENT]]018 {{.*}} R_X86_64_RELATIVE 3000 -// PART1-NEXT: 000000000000[[DATA_SEGMENT]]000 {{.*}} R_X86_64_64 {{.*}} f2@v2 + 0 -// PART1-NEXT: 000000000000[[DATA_SEGMENT]]008 {{.*}} R_X86_64_64 {{.*}} p0@@x1 + 0 -// PART1-NEXT: 000000000000[[DATA_SEGMENT]]010 {{.*}} R_X86_64_64 {{.*}} p0@@x1 + 0 +// PART1-NEXT: 000000000000[[DATA_SEGMENT]]148 {{.*}} R_X86_64_RELATIVE 3178 +// PART1-NEXT: 000000000000[[DATA_SEGMENT]]130 {{.*}} R_X86_64_64 {{.*}} f2@v2 + 0 +// PART1-NEXT: 000000000000[[DATA_SEGMENT]]138 {{.*}} R_X86_64_64 {{.*}} p0@@x1 + 0 +// PART1-NEXT: 000000000000[[DATA_SEGMENT]]140 {{.*}} R_X86_64_64 {{.*}} p0@@x1 + 0 // CHECK-EMPTY: // PART0: Relocation section '.rela.plt' // PART0-NEXT: Offset -// PART0-NEXT: 000000000000[[DATA_SEGMENT]]020 {{.*}} R_X86_64_JUMP_SLOT {{.*}} f1@v3 + 0 -// PART0-NEXT: 000000000000[[DATA_SEGMENT]]028 {{.*}} R_X86_64_JUMP_SLOT {{.*}} f2@v2 + 0 +// PART0-NEXT: 000000000000[[DATA_SEGMENT]]198 {{.*}} R_X86_64_JUMP_SLOT {{.*}} f1@v3 + 0 +// PART0-NEXT: 000000000000[[DATA_SEGMENT]]1a0 {{.*}} R_X86_64_JUMP_SLOT {{.*}} f2@v2 + 0 // PART0-EMPTY: // CHECK: Symbol table '.dynsym' @@ -85,7 +86,7 @@ // PART-INDEX: Contents of section .rodata: // 0x48c + 0xffffff26 = 0x3b2 // 0x490 + 0x3b70 = 0x4000 -// PART-INDEX-NEXT: 048c 26ffffff 703b0000 00400000 +// PART-INDEX-NEXT: 048c 26ffffff 703b0000 50410000 // CHECK: {{.*}}EH_FRAME Header // CHECK: Address: 0x[[EH_FRAME_HDR_ADDR]] @@ -137,12 +138,12 @@ // PART0-NEXT: LOAD 0x000000 0x0000000000000000 0x0000000000000000 {{.*}} R 0x1000 // PART0-NEXT: LOAD 0x001000 0x0000000000001000 0x0000000000001000 {{.*}} R E 0x1000 // PART0-NEXT: LOAD 0x002000 0x0000000000002000 0x0000000000002000 {{.*}} RW 0x1000 -// PART0-NEXT: LOAD 0x003000 0x0000000000003000 0x0000000000003000 {{.*}} RW 0x1000 -// PART0-NEXT: LOAD 0x004000 0x0000000000008000 0x0000000000008000 0x000000 0x001000 RW 0x1000 +// PART0-NEXT: LOAD 0x002178 0x0000000000003178 0x0000000000003178 {{.*}} RW 0x1000 +// PART0-NEXT: LOAD 0x003150 0x0000000000008150 0x0000000000008150 0x000000 0x001000 RW 0x1000 // PART1-NEXT: LOAD 0x000000 0x0000000000004000 0x0000000000004000 {{.*}} R 0x1000 // PART1-NEXT: LOAD 0x001000 0x0000000000005000 0x0000000000005000 {{.*}} R E 0x1000 // PART1-NEXT: LOAD 0x002000 0x0000000000006000 0x0000000000006000 {{.*}} RW 0x1000 -// PART1-NEXT: LOAD 0x003000 0x0000000000007000 0x0000000000007000 {{.*}} RW 0x1000 +// PART1-NEXT: LOAD 0x002130 0x0000000000007130 0x0000000000007130 {{.*}} RW 0x1000 // CHECK-NEXT: DYNAMIC {{.*}} 0x{{0*}}[[DYNAMIC_ADDR]] 0x{{0*}}[[DYNAMIC_ADDR]] {{.*}} RW 0x8 // PART0-NEXT: GNU_RELRO 0x002000 0x0000000000002000 0x0000000000002000 {{.*}} R 0x1 // PART1-NEXT: GNU_RELRO 0x002000 0x0000000000006000 0x0000000000006000 {{.*}} R 0x1 @@ -191,9 +192,9 @@ // FILL-NEXT: * // FILL-NEXT: 002000 -// FILL: 005010 cccc cccc cccc cccc cccc cccc cccc cccc +// FILL: 004010 cccc cccc cccc cccc cccc cccc cccc cccc // FILL-NEXT: * -// FILL-NEXT: 006000 +// FILL-NEXT: 005000 .section .llvm_sympart,"",@llvm_sympart .asciz "part1" Index: lld/trunk/test/ELF/pre_init_fini_array_missing.s =================================================================== --- lld/trunk/test/ELF/pre_init_fini_array_missing.s +++ lld/trunk/test/ELF/pre_init_fini_array_missing.s @@ -15,14 +15,14 @@ call __fini_array_end // With no .init_array section the symbols resolve to .text. -// 0x201000 - (0x201000 + 5) = -5 -// 0x201000 - (0x201005 + 5) = -10 +// 0x201120 - (0x201120 + 5) = -5 +// 0x201120 - (0x201125 + 5) = -10 // ... // CHECK: Disassembly of section .text: // CHECK-EMPTY: // CHECK-NEXT: _start: -// CHECK-NEXT: 201000: callq -5 +// CHECK-NEXT: 201120: callq -5 // CHECK-NEXT: callq -10 // CHECK-NEXT: callq -15 // CHECK-NEXT: callq -20 @@ -34,7 +34,7 @@ // PIE: Disassembly of section .text: // PIE-EMPTY: // PIE-NEXT: _start: -// PIE-NEXT: 1000: callq -5 +// PIE-NEXT: 1210: callq -5 // PIE-NEXT: callq -10 // PIE-NEXT: callq -15 // PIE-NEXT: callq -20 Index: lld/trunk/test/ELF/rel-offset.s =================================================================== --- lld/trunk/test/ELF/rel-offset.s +++ lld/trunk/test/ELF/rel-offset.s @@ -10,6 +10,6 @@ .quad foo // CHECK: Section ({{.*}}) .rela.dyn { -// CHECK-NEXT: 0x2000 R_X86_64_64 foo 0x0 -// CHECK-NEXT: 0x2008 R_X86_64_64 foo 0x0 +// CHECK-NEXT: 0x3340 R_X86_64_64 foo 0x0 +// CHECK-NEXT: 0x3348 R_X86_64_64 foo 0x0 // CHECK-NEXT: } Index: lld/trunk/test/ELF/relative-dynamic-reloc-pie.s =================================================================== --- lld/trunk/test/ELF/relative-dynamic-reloc-pie.s +++ lld/trunk/test/ELF/relative-dynamic-reloc-pie.s @@ -6,9 +6,9 @@ ## Test that we create R_X86_64_RELATIVE relocations with -pie. # CHECK: Relocations [ # CHECK-NEXT: Section ({{.*}}) .rela.dyn { -# CHECK-NEXT: 0x3000 R_X86_64_RELATIVE - 0x3000 -# CHECK-NEXT: 0x3008 R_X86_64_RELATIVE - 0x3008 -# CHECK-NEXT: 0x3010 R_X86_64_RELATIVE - 0x3009 +# CHECK-NEXT: 0x3358 R_X86_64_RELATIVE - 0x3358 +# CHECK-NEXT: 0x3360 R_X86_64_RELATIVE - 0x3360 +# CHECK-NEXT: 0x3368 R_X86_64_RELATIVE - 0x3361 # CHECK-NEXT: } # CHECK-NEXT: ] Index: lld/trunk/test/ELF/relocatable.s =================================================================== --- lld/trunk/test/ELF/relocatable.s +++ lld/trunk/test/ELF/relocatable.s @@ -92,9 +92,9 @@ # CHECKEXE-NEXT: Type: Executable # CHECKEXE-NEXT: Machine: EM_X86_64 # CHECKEXE-NEXT: Version: 1 -# CHECKEXE-NEXT: Entry: 0x201000 +# CHECKEXE-NEXT: Entry: 0x201160 # CHECKEXE-NEXT: ProgramHeaderOffset: 0x40 -# CHECKEXE-NEXT: SectionHeaderOffset: 0x21A0 +# CHECKEXE-NEXT: SectionHeaderOffset: 0x358 # CHECKEXE-NEXT: Flags [ # CHECKEXE-NEXT: ] # CHECKEXE-NEXT: HeaderSize: 64 Index: lld/trunk/test/ELF/relocation-common.s =================================================================== --- lld/trunk/test/ELF/relocation-common.s +++ lld/trunk/test/ELF/relocation-common.s @@ -10,5 +10,5 @@ .global sym1 .comm sym1,4,4 -# CHECK: 201000: {{.*}} movl $1, 4086(%rip) -# CHECK: 0000000000202000 g O .bss 00000004 sym1 +# CHECK: 201158: {{.*}} movl $1, 4098(%rip) +# CHECK: 0000000000202164 g O .bss 00000004 sym1 Index: lld/trunk/test/ELF/relocation-copy-align-common.s =================================================================== --- lld/trunk/test/ELF/relocation-copy-align-common.s +++ lld/trunk/test/ELF/relocation-copy-align-common.s @@ -18,8 +18,8 @@ # CHECK-NEXT: SHF_ALLOC # CHECK-NEXT: SHF_WRITE # CHECK-NEXT: ] -# CHECK-NEXT: Address: 0x203000 -# CHECK-NEXT: Offset: 0x3000 +# CHECK-NEXT: Address: 0x203360 +# CHECK-NEXT: Offset: 0x360 # CHECK-NEXT: Size: 64 # CHECK-NEXT: Link: 0 # CHECK-NEXT: Info: 0 @@ -29,7 +29,7 @@ # CHECK: Relocations [ # CHECK-NEXT: Section {{.*}} .rela.dyn { -# CHECK-NEXT: 0x203020 R_X86_64_COPY foo 0x0 +# CHECK-NEXT: 0x203380 R_X86_64_COPY foo 0x0 # CHECK-NEXT: } # CHECK-NEXT: ] Index: lld/trunk/test/ELF/relocation-copy-flags.s =================================================================== --- lld/trunk/test/ELF/relocation-copy-flags.s +++ lld/trunk/test/ELF/relocation-copy-flags.s @@ -21,7 +21,7 @@ // CHECK: Name: .text // CHECK: SectionData ( -// CHECK-NEXT: 0000: 10302000 +// CHECK-NEXT: 0000: 90332000 // CHECK-NEXT: ) // CHECK: Name: bar @@ -30,8 +30,8 @@ // CHECK-NEXT: SHF_ALLOC // CHECK-NEXT: SHF_WRITE // CHECK-NEXT: ] -// CHECK-NEXT: Address: 0x203000 -// CHECK-NEXT: Offset: 0x3000 +// CHECK-NEXT: Address: 0x203380 +// CHECK-NEXT: Offset: 0x380 // CHECK-NEXT: Size: 8 // CHECK-NEXT: Link: 0 // CHECK-NEXT: Info: 0 @@ -46,7 +46,7 @@ // CHECK-NEXT: Flags [ // CHECK-NEXT: ] // CHECK-NEXT: Address: 0x0 -// CHECK-NEXT: Offset: 0x3008 +// CHECK-NEXT: Offset: 0x388 // CHECK-NEXT: Size: 8 // CHECK-NEXT: Link: 0 // CHECK-NEXT: Info: 0 @@ -58,7 +58,7 @@ // CHECK: Relocations [ // CHECK-NEXT: Section (4) .rela.dyn { -// CHECK-NEXT: 0x203010 R_X86_64_COPY x 0x0 -// CHECK-NEXT: 0x203000 R_X86_64_64 z 0x0 +// CHECK-NEXT: 0x203390 R_X86_64_COPY x 0x0 +// CHECK-NEXT: 0x203380 R_X86_64_64 z 0x0 // CHECK-NEXT: } // CHECK-NEXT: ] Index: lld/trunk/test/ELF/relocation-copy-relro.s =================================================================== --- lld/trunk/test/ELF/relocation-copy-relro.s +++ lld/trunk/test/ELF/relocation-copy-relro.s @@ -14,19 +14,19 @@ // CHECK-NEXT: SHF_ALLOC (0x2) // CHECK-NEXT: SHF_WRITE (0x1) // CHECK-NEXT: ] -// CHECK-NEXT: Address: 0x2020C0 -// CHECK-NEXT: Offset: 0x20C0 +// CHECK-NEXT: Address: 0x202368 +// CHECK-NEXT: Offset: 0x368 // CHECK-NEXT: Size: 8 -// CHECK: 0x2020C0 R_X86_64_COPY a 0x0 -// CHECK: 0x2020C4 R_X86_64_COPY b 0x0 +// CHECK: 0x202368 R_X86_64_COPY a 0x0 +// CHECK: 0x20236C 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: Offset: 0x2A8 +// CHECK-NEXT: VirtualAddress: 0x2022A8 +// CHECK-NEXT: PhysicalAddress: 0x2022A8 // CHECK-NEXT: FileSize: 192 -// CHECK-NEXT: MemSize: 4096 +// CHECK-NEXT: MemSize: 3416 .text .global _start Index: lld/trunk/test/ELF/relocation-copy.s =================================================================== --- lld/trunk/test/ELF/relocation-copy.s +++ lld/trunk/test/ELF/relocation-copy.s @@ -1,10 +1,10 @@ // REQUIRES: x86 // RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o // RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %p/Inputs/relocation-copy.s -o %t2.o -// RUN: ld.lld -shared %t2.o -o %t.so +// RUN: ld.lld -shared %t2.o -soname=so -o %t.so // RUN: ld.lld %t.o %t.so -o %t3 // RUN: llvm-readobj -S -r --expand-relocs %t3 | FileCheck %s -// RUN: llvm-objdump -d %t3 | FileCheck -check-prefix=CODE %s +// RUN: llvm-objdump -d --no-show-raw-insn --print-imm-hex %t3 | FileCheck -check-prefix=CODE %s .text .global _start @@ -22,7 +22,7 @@ // CHECK-NEXT: SHF_ALLOC (0x2) // CHECK-NEXT: SHF_WRITE (0x1) // CHECK-NEXT: ] -// CHECK-NEXT: Address: 0x203000 +// CHECK-NEXT: Address: 0x203400 // CHECK-NEXT: Offset: // CHECK-NEXT: Size: 24 // CHECK-NEXT: Link: 0 @@ -53,16 +53,13 @@ // CHECK-NEXT: } // CHECK-NEXT: ] -// 2109440 = 0x203000 // 16 is alignment here -// 2109456 = 0x203000 + 16 -// 2109460 = 0x203000 + 16 + 4 // CODE: Disassembly of section .text: // CODE-EMPTY: // CODE-NEXT: _start: -// CODE-NEXT: 201000: {{.*}} movl $5, 2109440 -// CODE-NEXT: 20100b: {{.*}} movl $7, 2109456 -// CODE-NEXT: 201016: {{.*}} movl $9, 2109460 -// CODE-NEXT: 201021: {{.*}} movl $2109440, %edx -// CODE-NEXT: 201026: {{.*}} movl $2109456, %edx -// CODE-NEXT: 20102b: {{.*}} movl $2109460, %edx +// CODE-NEXT: movl $0x5, 0x203400 +// CODE-NEXT: movl $0x7, 0x203410 +// CODE-NEXT: movl $0x9, 0x203414 +// CODE-NEXT: movl $0x203400, %edx +// CODE-NEXT: movl $0x203410, %edx +// CODE-NEXT: movl $0x203414, %edx Index: lld/trunk/test/ELF/relocation-non-alloc.s =================================================================== --- lld/trunk/test/ELF/relocation-non-alloc.s +++ lld/trunk/test/ELF/relocation-non-alloc.s @@ -15,15 +15,15 @@ // APPLYDYNREL-NEXT: SHF_ALLOC // APPLYDYNREL-NEXT: SHF_WRITE // APPLYDYNREL-NEXT: ] -// APPLYDYNREL-NEXT: Address: 0x2000 -// APPLYDYNREL-NEXT: Offset: 0x2000 +// APPLYDYNREL-NEXT: Address: 0x3350 +// APPLYDYNREL-NEXT: Offset: 0x350 // APPLYDYNREL-NEXT: Size: 16 // APPLYDYNREL-NEXT: Link: 0 // APPLYDYNREL-NEXT: Info: 0 // APPLYDYNREL-NEXT: AddressAlignment: 1 // APPLYDYNREL-NEXT: EntrySize: 0 // APPLYDYNREL-NEXT: SectionData ( -// APPLYDYNREL-NEXT: 0000: 00200000 00000000 00000000 00000000 +// APPLYDYNREL-NEXT: 0000: 50330000 00000000 00000000 00000000 // APPLYDYNREL-NEXT: ) // NOAPPLYDYNREL: Name: .data @@ -32,8 +32,8 @@ // NOAPPLYDYNREL-NEXT: SHF_ALLOC // NOAPPLYDYNREL-NEXT: SHF_WRITE // NOAPPLYDYNREL-NEXT: ] -// NOAPPLYDYNREL-NEXT: Address: 0x2000 -// NOAPPLYDYNREL-NEXT: Offset: 0x2000 +// NOAPPLYDYNREL-NEXT: Address: 0x3350 +// NOAPPLYDYNREL-NEXT: Offset: 0x350 // NOAPPLYDYNREL-NEXT: Size: 16 // NOAPPLYDYNREL-NEXT: Link: 0 // NOAPPLYDYNREL-NEXT: Info: 0 @@ -55,14 +55,14 @@ // CHECK-NEXT: AddressAlignment: 1 // CHECK-NEXT: EntrySize: 0 // CHECK-NEXT: SectionData ( -// CHECK-NEXT: 0000: 00200000 00000000 00200000 00000000 -// CHECK-NEXT: 0010: 00200000 00000000 00200000 00000000 +// CHECK-NEXT: 0000: 50330000 00000000 50330000 00000000 +// CHECK-NEXT: 0010: 50330000 00000000 50330000 00000000 // CHECK-NEXT: ) // CHECK: Relocations [ // CHECK-NEXT: Section ({{.}}) .rela.dyn { -// CHECK-NEXT: 0x2000 R_X86_64_RELATIVE - 0x2000 -// CHECK-NEXT: 0x2008 R_X86_64_64 zed 0x0 +// CHECK-NEXT: 0x3350 R_X86_64_RELATIVE - 0x3350 +// CHECK-NEXT: 0x3358 R_X86_64_64 zed 0x0 // CHECK-NEXT: } // CHECK-NEXT: ] Index: lld/trunk/test/ELF/relocation-undefined-weak.s =================================================================== --- lld/trunk/test/ELF/relocation-undefined-weak.s +++ lld/trunk/test/ELF/relocation-undefined-weak.s @@ -14,4 +14,4 @@ .weak sym1 -# CHECK: 201000: movl $0x1, -0x20100a(%rip) +# CHECK: 201120: movl $0x1, -0x20112a(%rip) Index: lld/trunk/test/ELF/relocation.s =================================================================== --- lld/trunk/test/ELF/relocation.s +++ lld/trunk/test/ELF/relocation.s @@ -12,8 +12,8 @@ // SEC-NEXT: SHF_ALLOC // SEC-NEXT: SHF_EXECINSTR // SEC-NEXT: ] -// SEC-NEXT: Address: 0x201030 -// SEC-NEXT: Offset: 0x1030 +// SEC-NEXT: Address: 0x201340 +// SEC-NEXT: Offset: 0x340 // SEC-NEXT: Size: 48 // SEC: Name: .got @@ -22,7 +22,7 @@ // SEC-NEXT: SHF_ALLOC // SEC-NEXT: SHF_WRITE // SEC-NEXT: ] -// SEC-NEXT: Address: 0x2020F0 +// SEC-NEXT: Address: 0x202460 // SEC-NEXT: Offset: // SEC-NEXT: Size: 8 // SEC-NEXT: Link: 0 @@ -37,8 +37,8 @@ // SEC-NEXT: SHF_ALLOC // SEC-NEXT: SHF_WRITE // SEC-NEXT: ] -// SEC-NEXT: Address: 0x203000 -// SEC-NEXT: Offset: 0x3000 +// SEC-NEXT: Address: 0x203468 +// SEC-NEXT: Offset: 0x468 // SEC-NEXT: Size: 40 // SEC-NEXT: Link: 0 // SEC-NEXT: Info: 0 @@ -60,11 +60,11 @@ // CHECK: Disassembly of section .text: // CHECK-EMPTY: // CHECK-NEXT: _start: -// CHECK-NEXT: 201000: e8 04 00 00 00 callq 4 -// CHECK-NEXT: 201005: +// CHECK-NEXT: 201310: e8 04 00 00 00 callq 4 +// CHECK-NEXT: 201315: // CHECK: lulz: -// CHECK-NEXT: 201009: 90 nop +// CHECK-NEXT: 201319: 90 nop .section .text2,"ax",@progbits @@ -77,7 +77,7 @@ // CHECK: Disassembly of section .text2: // CHECK-EMPTY: // CHECK-NEXT: R_X86_64_32: -// CHECK-NEXT: 20100a: {{.*}} movl $2101258, %edx +// CHECK-NEXT: 20131a: {{.*}} movl $2102042, %edx .section .R_X86_64_32S,"ax",@progbits .global R_X86_64_32S @@ -87,7 +87,7 @@ // CHECK: Disassembly of section .R_X86_64_32S: // CHECK-EMPTY: // CHECK-NEXT: R_X86_64_32S: -// CHECK-NEXT: {{.*}}: {{.*}} movq 1052681, %rdx +// CHECK-NEXT: {{.*}}: {{.*}} movq 1053465, %rdx .section .R_X86_64_PC32,"ax",@progbits .global R_X86_64_PC32 @@ -95,22 +95,22 @@ call bar movl $bar, %eax //16 is a size of PLT[0] -// 0x201030 + 16 - (0x201017 + 5) = 20 +// 0x201340 + 16 - (0x201327 + 5) = 36 // CHECK: Disassembly of section .R_X86_64_PC32: // CHECK-EMPTY: // CHECK-NEXT: R_X86_64_PC32: -// CHECK-NEXT: 201017: {{.*}} callq 36 -// CHECK-NEXT: 20101c: {{.*}} movl $2101312, %eax +// CHECK-NEXT: 201327: {{.*}} callq 36 +// CHECK-NEXT: 20132c: {{.*}} movl $2102096, %eax .section .R_X86_64_32S_2,"ax",@progbits .global R_X86_64_32S_2 R_X86_64_32S_2: mov bar2, %eax -// plt is at 0x201030. The second plt entry is at 0x201050 == 69712 +// plt is at 0x201340. The second plt entry is at 0x201360 == 2102112 // CHECK: Disassembly of section .R_X86_64_32S_2: // CHECK-EMPTY: // CHECK-NEXT: R_X86_64_32S_2: -// CHECK-NEXT: 201021: {{.*}} movl 2101328, %eax +// CHECK-NEXT: 201331: {{.*}} movl 2102112, %eax .section .R_X86_64_64,"a",@progbits .global R_X86_64_64 @@ -125,9 +125,9 @@ R_X86_64_GOTPCREL: .long zed@gotpcrel -// 0x2020F0(.got) - 0x2002c8(.R_X86_64_GOTPCREL) = 0x1e28 +// 0x202460(.got) - 0x200300(.R_X86_64_GOTPCREL) = 0x2160 // CHECK: Contents of section .R_X86_64_GOTPCREL -// CHECK-NEXT: 200300 f01d0000 +// CHECK-NEXT: 200300 60210000 .section .R_X86_64_GOT32,"a",@progbits .global R_X86_64_GOT32 @@ -135,11 +135,11 @@ .long zed@got // CHECK: Contents of section .R_X86_64_GOT32: -// CHECK-NEXT: f0f0ffff +// CHECK-NEXT: f8efffff // CHECK: Contents of section .R_X86_64_GOT64: -// CHECK-NEXT: f0f0ffff ffffffff +// CHECK-NEXT: f8efffff ffffffff .section .R_X86_64_GOT64,"a",@progbits .global R_X86_64_GOT64 R_X86_64_GOT64: Index: lld/trunk/test/ELF/relro-bss.s =================================================================== --- lld/trunk/test/ELF/relro-bss.s +++ lld/trunk/test/ELF/relro-bss.s @@ -9,10 +9,10 @@ # Because .bss.rel.ro (nobits) doesn't take space, p_filesz < p_memsz. # Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align -# SEG: LOAD 0x001000 0x0000000000201000 0x0000000000201000 0x000001 0x000001 R E 0x1000 -# SEG-NEXT: LOAD 0x002000 0x0000000000202000 0x0000000000202000 0x000001 0x002001 RW 0x1000 -# SEG-NEXT: LOAD 0x003000 0x0000000000205000 0x0000000000205000 0x000001 0x000002 RW 0x1000 -# SEG-NEXT: GNU_RELRO 0x002000 0x0000000000202000 0x0000000000202000 0x000001 0x003000 R 0x1 +# SEG: LOAD 0x0001c8 0x00000000002011c8 0x00000000002011c8 0x000001 0x000001 R E 0x1000 +# SEG-NEXT: LOAD 0x0001c9 0x00000000002021c9 0x00000000002021c9 0x000001 0x002001 RW 0x1000 +# SEG-NEXT: LOAD 0x0001ca 0x00000000002051ca 0x00000000002051ca 0x000001 0x000002 RW 0x1000 +# SEG-NEXT: GNU_RELRO 0x0001c9 0x00000000002021c9 0x00000000002021c9 0x000001 0x002e37 R 0x1 # SEG-NEXT: GNU_STACK 0x000000 0x0000000000000000 0x0000000000000000 0x000000 0x000000 RW 0x0 # SEG: .text @@ -22,10 +22,10 @@ # And .data is placed in the next page (sh_offset = alignTo(0x2001, 4096) = 0x3000). # [Nr] Name Type Address Off Size -# CHECK: .data.rel.ro PROGBITS 0000000000202000 002000 000001 -# CHECK-NEXT: .bss.rel.ro NOBITS 0000000000202001 002001 002000 -# CHECK-NEXT: .data PROGBITS 0000000000205000 003000 000001 -# CHECK-NEXT: .bss NOBITS 0000000000205001 003001 000001 +# CHECK: .data.rel.ro PROGBITS 00000000002021c9 0001c9 000001 +# CHECK-NEXT: .bss.rel.ro NOBITS 00000000002021ca 0001ca 002000 +# CHECK-NEXT: .data PROGBITS 00000000002051ca 0001ca 000001 +# CHECK-NEXT: .bss NOBITS 00000000002051cb 0001cb 000001 .globl _start _start: Index: lld/trunk/test/ELF/relro-tls.s =================================================================== --- lld/trunk/test/ELF/relro-tls.s +++ lld/trunk/test/ELF/relro-tls.s @@ -9,9 +9,9 @@ ## Currently p_memsz of PT_GNU_RELRO is rounded up to protect the last page. # CHECK: Type: PT_GNU_RELRO -# CHECK: VirtualAddress: 0x201000 +# CHECK: VirtualAddress: 0x2021C8 # CHECK: FileSize: 4 -# CHECK-NEXT: MemSize: 4096 +# CHECK-NEXT: MemSize: 3640 # CHECK: Alignment: 1 .section .foo,"awT",@progbits Index: lld/trunk/test/ELF/segments.s =================================================================== --- lld/trunk/test/ELF/segments.s +++ lld/trunk/test/ELF/segments.s @@ -20,7 +20,7 @@ # ROSEGMENT-NEXT: } # ROSEGMENT-NEXT: ProgramHeader { # ROSEGMENT-NEXT: Type: PT_LOAD -# ROSEGMENT-NEXT: Offset: 0x1000 +# ROSEGMENT-NEXT: Offset: 0x15C # ROSEGMENT-NEXT: VirtualAddress: # ROSEGMENT-NEXT: PhysicalAddress: # ROSEGMENT-NEXT: FileSize: @@ -33,7 +33,7 @@ # ROSEGMENT-NEXT: } # ROSEGMENT-NEXT: ProgramHeader { # ROSEGMENT-NEXT: Type: PT_LOAD -# ROSEGMENT-NEXT: Offset: 0x2000 +# ROSEGMENT-NEXT: Offset: 0x15E # ROSEGMENT-NEXT: VirtualAddress: # ROSEGMENT-NEXT: PhysicalAddress: # ROSEGMENT-NEXT: FileSize: 1 @@ -63,7 +63,7 @@ # NOROSEGMENT-NEXT: } # NOROSEGMENT-NEXT: ProgramHeader { # NOROSEGMENT-NEXT: Type: PT_LOAD -# NOROSEGMENT-NEXT: Offset: 0x1000 +# NOROSEGMENT-NEXT: Offset: 0x126 # NOROSEGMENT-NEXT: VirtualAddress: # NOROSEGMENT-NEXT: PhysicalAddress: # NOROSEGMENT-NEXT: FileSize: Index: lld/trunk/test/ELF/startstop-shared2.s =================================================================== --- lld/trunk/test/ELF/startstop-shared2.s +++ lld/trunk/test/ELF/startstop-shared2.s @@ -8,10 +8,10 @@ // RUN: ld.lld -o %t %t2.o %t.so // RUN: llvm-objdump -s -h %t | FileCheck %s -// CHECK: foo 00000000 0000000000201008 +// CHECK: foo 00000000 0000000000201248 // CHECK: Contents of section .text: -// CHECK-NEXT: 201000 08102000 00000000 +// CHECK-NEXT: 201240 48122000 00000000 .quad __start_foo .section foo,"ax" Index: lld/trunk/test/ELF/startstop.s =================================================================== --- lld/trunk/test/ELF/startstop.s +++ lld/trunk/test/ELF/startstop.s @@ -5,19 +5,19 @@ // RUN: llvm-readobj --symbols -r %t.so | FileCheck -check-prefix=SYMBOL %s // DISASM: _start: -// DISASM: 1000: callq 10 <__start_foo> -// DISASM: 1005: callq 8 <__start_bar> -// DISASM: 100a: callq 3 <__start_bar> +// DISASM: 1330: callq 10 <__start_foo> +// DISASM: 1335: callq 8 <__start_bar> +// DISASM: 133a: callq 3 <__start_bar> // DISASM: Disassembly of section foo: // DISASM-EMPTY: // DISASM: __start_foo: -// DISASM: 100f: nop +// DISASM: 133f: nop // DISASM: nop // DISASM: nop // DISASM: Disassembly of section bar: // DISASM-EMPTY: // DISASM: __start_bar: -// DISASM: 1012: nop +// DISASM: 1342: nop // DISASM: nop // DISASM: nop @@ -32,33 +32,33 @@ // SYMBOL: Symbol { // SYMBOL: Name: __start_bar -// SYMBOL: Value: 0x1012 +// SYMBOL: Value: 0x1342 // SYMBOL: STV_HIDDEN // SYMBOL: Section: bar // SYMBOL: } // SYMBOL-NOT: Section: __stop_bar // SYMBOL: Symbol { // SYMBOL: Name: __start_foo -// SYMBOL: Value: 0x100F +// SYMBOL: Value: 0x133F // SYMBOL: STV_HIDDEN // SYMBOL: Section: foo // SYMBOL: } // SYMBOL: Symbol { // SYMBOL: Name: __stop_foo -// SYMBOL: Value: 0x1012 +// SYMBOL: Value: 0x1342 // SYMBOL: STV_HIDDEN // SYMBOL: Section: foo // SYMBOL: } // SYMBOL: Symbol { // SYMBOL: Name: __stop_zed1 -// SYMBOL: Value: 0x3010 +// SYMBOL: Value: 0x3408 // SYMBOL: STV_PROTECTED // SYMBOL: Section: zed1 // SYMBOL: } // SYMBOL: Symbol { // SYMBOL: Name: __stop_zed2 -// SYMBOL: Value: 0x3020 +// SYMBOL: Value: 0x3418 // SYMBOL: STV_PROTECTED // SYMBOL: Section: zed2 // SYMBOL: } Index: lld/trunk/test/ELF/symbol-ordering-file-cgprofile-conflicts.s =================================================================== --- lld/trunk/test/ELF/symbol-ordering-file-cgprofile-conflicts.s +++ lld/trunk/test/ELF/symbol-ordering-file-cgprofile-conflicts.s @@ -2,18 +2,18 @@ // RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o // RUN: ld.lld -e A %t.o --no-call-graph-profile-sort -o %t // RUN: llvm-nm --numeric-sort %t | FileCheck %s --check-prefix=NO_ORDERING -// NO_ORDERING: 0000000000201000 t D -// NO_ORDERING-NEXT: 0000000000201001 T C -// NO_ORDERING-NEXT: 0000000000201002 T B -// NO_ORDERING-NEXT: 0000000000201003 T A +// NO_ORDERING: 0000000000201120 t D +// NO_ORDERING-NEXT: 0000000000201121 T C +// NO_ORDERING-NEXT: 0000000000201122 T B +// NO_ORDERING-NEXT: 0000000000201123 T A // RUN: ld.lld -e A %t.o -o %t // RUN: llvm-nm --numeric-sort %t | FileCheck %s --check-prefix=CALL_GRAPH -// CALL_GRAPH: 0000000000201000 T A -// CALL_GRAPH-NEXT: 0000000000201000 t Aa -// CALL_GRAPH-NEXT: 0000000000201001 T B -// CALL_GRAPH-NEXT: 0000000000201002 T C -// CALL_GRAPH-NEXT: 0000000000201003 t D +// CALL_GRAPH: 0000000000201120 T A +// CALL_GRAPH-NEXT: 0000000000201120 t Aa +// CALL_GRAPH-NEXT: 0000000000201121 T B +// CALL_GRAPH-NEXT: 0000000000201122 T C +// CALL_GRAPH-NEXT: 0000000000201123 t D // RUN: rm -f %t.symbol_order // RUN: echo "C" >> %t.symbol_order @@ -23,10 +23,10 @@ // RUN: ld.lld -e A %t.o --symbol-ordering-file %t.symbol_order -o %t // RUN: llvm-nm --numeric-sort %t | FileCheck %s --check-prefix=SYMBOL_ORDER -// SYMBOL_ORDER: 0000000000201000 T C -// SYMBOL_ORDER-NEXT: 0000000000201001 T B -// SYMBOL_ORDER-NEXT: 0000000000201002 t D -// SYMBOL_ORDER-NEXT: 0000000000201003 T A +// SYMBOL_ORDER: 0000000000201120 T C +// SYMBOL_ORDER-NEXT: 0000000000201121 T B +// SYMBOL_ORDER-NEXT: 0000000000201122 t D +// SYMBOL_ORDER-NEXT: 0000000000201123 T A // RUN: rm -f %t.call_graph // RUN: echo "A B 5" > %t.call_graph Index: lld/trunk/test/ELF/symbol-ordering-file-icf.s =================================================================== --- lld/trunk/test/ELF/symbol-ordering-file-icf.s +++ lld/trunk/test/ELF/symbol-ordering-file-icf.s @@ -8,9 +8,9 @@ ## Check that after ICF merges 'foo' and 'zed' we still ## place them before 'bar', in according to ordering file. -# CHECK-DAG: 0000000000001000 T foo -# CHECK-DAG: 0000000000001000 T zed -# CHECK-DAG: 0000000000001004 T bar +# CHECK-DAG: 0000000000001288 T foo +# CHECK-DAG: 0000000000001288 T zed +# CHECK-DAG: 000000000000128c T bar .section .text.foo,"ax",@progbits .align 4 Index: lld/trunk/test/ELF/symbols.s =================================================================== --- lld/trunk/test/ELF/symbols.s +++ lld/trunk/test/ELF/symbols.s @@ -58,7 +58,7 @@ // CHECK-NEXT: SHF_ALLOC // CHECK-NEXT: SHF_EXECINSTR // CHECK-NEXT: ] -// CHECK-NEXT: Address: 0x201000 +// CHECK-NEXT: Address: 0x201160 // CHECK: Name: .bss // CHECK-NEXT: Type: SHT_NOBITS @@ -66,7 +66,7 @@ // CHECK-NEXT: SHF_ALLOC // CHECK-NEXT: SHF_WRITE // CHECK-NEXT: ] -// CHECK-NEXT: Address: 0x202000 +// CHECK-NEXT: Address: 0x202164 // CHECK-NEXT: Offset: // CHECK-NEXT: Size: 4 @@ -104,7 +104,7 @@ // CHECK-NEXT: } // CHECK-NEXT: Symbol { // CHECK-NEXT: Name: _start -// CHECK-NEXT: Value: 0x201000 +// CHECK-NEXT: Value: 0x201160 // CHECK-NEXT: Size: 0 // CHECK-NEXT: Binding: Global (0x1) // CHECK-NEXT: Type: Function @@ -131,7 +131,7 @@ // CHECK-NEXT: } // CHECK-NEXT: Symbol { // CHECK-NEXT: Name: common -// CHECK-NEXT: Value: 0x202000 +// CHECK-NEXT: Value: 0x202164 // CHECK-NEXT: Size: 4 // CHECK-NEXT: Binding: Global // CHECK-NEXT: Type: Object @@ -140,7 +140,7 @@ // CHECK-NEXT: } // CHECK-NEXT: Symbol { // CHECK-NEXT: Name: foo -// CHECK-NEXT: Value: 0x201000 +// CHECK-NEXT: Value: 0x201160 // CHECK-NEXT: Size: 0 // CHECK-NEXT: Binding: Weak (0x2) // CHECK-NEXT: Type: Object Index: lld/trunk/test/ELF/tls-offset.s =================================================================== --- lld/trunk/test/ELF/tls-offset.s +++ lld/trunk/test/ELF/tls-offset.s @@ -1,7 +1,7 @@ // REQUIRES: x86 // RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t // RUN: ld.lld %t -o %tout -// RUN: llvm-readobj -S %tout | FileCheck %s +// RUN: llvm-readobj -S %tout | FileCheck --check-prefixes=CHECK,CHECK1 %s // RUN: echo "SECTIONS { \ // RUN: . = 0x201000; \ // RUN: .text : { *(.text) } \ @@ -11,7 +11,7 @@ // RUN: .data.rel.ro : { *(.data.rel.ro) } \ // RUN: }" > %t.script // RUN: ld.lld -T %t.script %t -o %tout2 -// RUN: llvm-readobj -S %tout2 | FileCheck %s +// RUN: llvm-readobj -S %tout2 | FileCheck --check-prefixes=CHECK,CHECK2 %s .global _start _start: retq @@ -32,34 +32,40 @@ // gets out of sync what we get a runtime is different from what the section // table says. -// CHECK: Name: .tdata -// CHECK-NEXT: Type: SHT_PROGBITS -// CHECK-NEXT: Flags [ -// CHECK-NEXT: SHF_ALLOC -// CHECK-NEXT: SHF_TLS -// CHECK-NEXT: SHF_WRITE -// CHECK-NEXT: ] -// CHECK-NEXT: Address: 0x202000 -// CHECK-NEXT: Offset: 0x2000 -// CHECK-NEXT: Size: 4 - -// CHECK: Name: .tbss -// CHECK-NEXT: Type: SHT_NOBITS -// CHECK-NEXT: Flags [ -// CHECK-NEXT: SHF_ALLOC -// CHECK-NEXT: SHF_TLS -// CHECK-NEXT: SHF_WRITE -// CHECK-NEXT: ] -// CHECK-NEXT: Address: 0x202010 -// CHECK-NEXT: Offset: 0x2004 -// CHECK-NEXT: Size: 16 - -// CHECK: Name: .data.rel.ro -// CHECK-NEXT: Type: SHT_PROGBITS -// CHECK-NEXT: Flags [ -// CHECK-NEXT: SHF_ALLOC -// CHECK-NEXT: SHF_WRITE -// CHECK-NEXT: ] -// CHECK-NEXT: Address: 0x202004 -// CHECK-NEXT: Offset: 0x2004 -// CHECK-NEXT: Size: 4 +// CHECK: Name: .tdata +// CHECK-NEXT: Type: SHT_PROGBITS +// CHECK-NEXT: Flags [ +// CHECK-NEXT: SHF_ALLOC +// CHECK-NEXT: SHF_TLS +// CHECK-NEXT: SHF_WRITE +// CHECK-NEXT: ] +// CHECK1-NEXT: Address: 0x2021D0 +// CHECK1-NEXT: Offset: 0x1D0 +// CHECK2-NEXT: Address: 0x202000 +// CHECK2-NEXT: Offset: 0x2000 +// CHECK-NEXT: Size: 4 + +// CHECK: Name: .tbss +// CHECK-NEXT: Type: SHT_NOBITS +// CHECK-NEXT: Flags [ +// CHECK-NEXT: SHF_ALLOC +// CHECK-NEXT: SHF_TLS +// CHECK-NEXT: SHF_WRITE +// CHECK-NEXT: ] +// CHECK1-NEXT: Address: 0x2021E0 +// CHECK1-NEXT: Offset: 0x1D4 +// CHECK2-NEXT: Address: 0x202010 +// CHECK2-NEXT: Offset: 0x2004 +// CHECK-NEXT: Size: 16 + +// CHECK: Name: .data.rel.ro +// CHECK-NEXT: Type: SHT_PROGBITS +// CHECK-NEXT: Flags [ +// CHECK-NEXT: SHF_ALLOC +// CHECK-NEXT: SHF_WRITE +// CHECK-NEXT: ] +// CHECK1-NEXT: Address: 0x2021D4 +// CHECK1-NEXT: Offset: 0x1D4 +// CHECK2-NEXT: Address: 0x202004 +// CHECK2-NEXT: Offset: 0x2004 +// CHECK-NEXT: Size: 4 Index: lld/trunk/test/ELF/tls.s =================================================================== --- lld/trunk/test/ELF/tls.s +++ lld/trunk/test/ELF/tls.s @@ -90,9 +90,9 @@ // CHECK-NEXT: SHF_WRITE // CHECK-NEXT: ] -// 0x20200C = TBSS_ADDR + 4 +// 0x2021F4 = TBSS_ADDR + 4 -// CHECK-NEXT: Address: 0x20200C +// CHECK-NEXT: Address: 0x2021F4 // CHECK-NEXT: Offset: // CHECK-NEXT: Size: 4 // CHECK-NEXT: Link: Index: lld/trunk/test/ELF/ttext-tdata-tbss.s =================================================================== --- lld/trunk/test/ELF/ttext-tdata-tbss.s +++ lld/trunk/test/ELF/ttext-tdata-tbss.s @@ -5,10 +5,10 @@ # RUN: ld.lld %t.o -o %t1 # RUN: llvm-readelf -S -l %t1 | FileCheck %s # CHECK: .rodata PROGBITS 0000000000200158 000158 000008 -# CHECK-NEXT: .text PROGBITS 0000000000201000 001000 000001 -# CHECK-NEXT: .aw PROGBITS 0000000000202000 002000 000008 -# CHECK-NEXT: .data PROGBITS 0000000000202008 002008 000008 -# CHECK-NEXT: .bss NOBITS 0000000000202010 002010 000008 +# CHECK-NEXT: .text PROGBITS 0000000000201160 000160 000001 +# CHECK-NEXT: .aw PROGBITS 0000000000202161 000161 000008 +# CHECK-NEXT: .data PROGBITS 0000000000202169 000169 000008 +# CHECK-NEXT: .bss NOBITS 0000000000202171 000171 000008 # CHECK: Type # CHECK-NEXT: PHDR # CHECK-NEXT: LOAD 0x000000 0x0000000000200000 @@ -21,8 +21,8 @@ # USER1: .text PROGBITS 0000000000000000 001000 000001 # USER1-NEXT: .data PROGBITS 0000000000004000 002000 000008 # USER1-NEXT: .bss NOBITS 0000000000008000 002008 000008 -# USER1-NEXT: .rodata PROGBITS 0000000000009000 003000 000008 -# USER1-NEXT: .aw PROGBITS 000000000000a000 004000 000008 +# USER1-NEXT: .rodata PROGBITS 0000000000009008 002008 000008 +# USER1-NEXT: .aw PROGBITS 000000000000a010 002010 000008 # USER1: Type # USER1-NEXT: PHDR 0x000040 0x0000000000200040 # USER1-NEXT: LOAD 0x000000 0x0000000000200000 @@ -34,8 +34,8 @@ # USER2: .text PROGBITS 0000000000001000 001000 000001 # USER2-NEXT: .data PROGBITS 0000000000004000 002000 000008 # USER2-NEXT: .bss NOBITS 0000000000008000 002008 000008 -# USER2-NEXT: .rodata PROGBITS 0000000000009000 003000 000008 -# USER2-NEXT: .aw PROGBITS 000000000000a000 004000 000008 +# USER2-NEXT: .rodata PROGBITS 0000000000009008 002008 000008 +# USER2-NEXT: .aw PROGBITS 000000000000a010 002010 000008 # USER2: Type # USER2-NEXT: PHDR 0x000040 0x0000000000000040 # USER2-NEXT: LOAD 0x000000 0x0000000000000000 Index: lld/trunk/test/ELF/undef-with-plt-addr.s =================================================================== --- lld/trunk/test/ELF/undef-with-plt-addr.s +++ lld/trunk/test/ELF/undef-with-plt-addr.s @@ -22,13 +22,13 @@ // CHECK-NEXT: SHF_ALLOC // CHECK-NEXT: SHF_EXECINSTR // CHECK-NEXT: ] -// CHECK-NEXT: Address: 0x201010 +// CHECK-NEXT: Address: 0x2012E0 // CHECK: Section ({{.*}}) .rela.dyn { -// CHECK-NEXT: 0x203000 R_X86_64_64 foo 0x0 +// CHECK-NEXT: 0x203400 R_X86_64_64 foo 0x0 // CHECK-NEXT: } // CHECK-NEXT: Section ({{.*}}) .rela.plt { -// CHECK-NEXT: 0x203020 R_X86_64_JUMP_SLOT set_data 0x0 +// CHECK-NEXT: 0x203420 R_X86_64_JUMP_SLOT set_data 0x0 // CHECK-NEXT: } // CHECK: Name: foo @@ -40,7 +40,7 @@ // CHECK-NEXT: Section: Undefined // CHECK: Name: set_data -// CHECK-NEXT: Value: 0x201020 +// CHECK-NEXT: Value: 0x2012F0 // CHECK-NEXT: Size: 0 // CHECK-NEXT: Binding: Global // CHECK-NEXT: Type: Function Index: lld/trunk/test/ELF/verdef-defaultver.s =================================================================== --- lld/trunk/test/ELF/verdef-defaultver.s +++ lld/trunk/test/ELF/verdef-defaultver.s @@ -18,7 +18,7 @@ # DSO-NEXT: } # DSO-NEXT: Symbol { # DSO-NEXT: Name: a@@V1 -# DSO-NEXT: Value: 0x1000 +# DSO-NEXT: Value: 0x12E8 # DSO-NEXT: Size: 0 # DSO-NEXT: Binding: Global # DSO-NEXT: Type: Function @@ -27,7 +27,7 @@ # DSO-NEXT: } # DSO-NEXT: Symbol { # DSO-NEXT: Name: b@@V2 -# DSO-NEXT: Value: 0x1002 +# DSO-NEXT: Value: 0x12EA # DSO-NEXT: Size: 0 # DSO-NEXT: Binding: Global # DSO-NEXT: Type: Function @@ -36,7 +36,7 @@ # DSO-NEXT: } # DSO-NEXT: Symbol { # DSO-NEXT: Name: b@V1 -# DSO-NEXT: Value: 0x1001 +# DSO-NEXT: Value: 0x12E9 # DSO-NEXT: Size: 0 # DSO-NEXT: Binding: Global # DSO-NEXT: Type: Function @@ -45,7 +45,7 @@ # DSO-NEXT: } # DSO-NEXT: Symbol { # DSO-NEXT: Name: c@@V2 -# DSO-NEXT: Value: 0x1003 +# DSO-NEXT: Value: 0x12EB # DSO-NEXT: Size: 0 # DSO-NEXT: Binding: Global # DSO-NEXT: Type: Function @@ -122,7 +122,7 @@ # EXE-NEXT: } # EXE-NEXT: Symbol { # EXE-NEXT: Name: a@V1 -# EXE-NEXT: Value: 0x201020 +# EXE-NEXT: Value: 0x201340 # EXE-NEXT: Size: 0 # EXE-NEXT: Binding: Global # EXE-NEXT: Type: Function @@ -131,7 +131,7 @@ # EXE-NEXT: } # EXE-NEXT: Symbol { # EXE-NEXT: Name: b@V2 -# EXE-NEXT: Value: 0x201030 +# EXE-NEXT: Value: 0x201350 # EXE-NEXT: Size: 0 # EXE-NEXT: Binding: Global # EXE-NEXT: Type: Function @@ -140,7 +140,7 @@ # EXE-NEXT: } # EXE-NEXT: Symbol { # EXE-NEXT: Name: c@V2 -# EXE-NEXT: Value: 0x201040 +# EXE-NEXT: Value: 0x201360 # EXE-NEXT: Size: 0 # EXE-NEXT: Binding: Global # EXE-NEXT: Type: Function Index: lld/trunk/test/ELF/x86-64-got-plt-header.s =================================================================== --- lld/trunk/test/ELF/x86-64-got-plt-header.s +++ lld/trunk/test/ELF/x86-64-got-plt-header.s @@ -12,7 +12,7 @@ // CHECK-NEXT: SHF_ALLOC // CHECK-NEXT: SHF_WRITE // CHECK-NEXT: ] -// CHECK-NEXT: Address: 0x2000 +// CHECK-NEXT: Address: 0x22B0 // CHECK: Name: .got.plt // CHECK-NEXT: Type: SHT_PROGBITS @@ -20,12 +20,12 @@ // CHECK-NEXT: SHF_ALLOC // CHECK-NEXT: SHF_WRITE // CHECK-NEXT: ] -// CHECK-NEXT: Address: 0x3000 -// CHECK-NEXT: Offset: 0x3000 +// CHECK-NEXT: Address: 0x3360 +// CHECK-NEXT: Offset: 0x360 // CHECK-NEXT: Size: 32 // CHECK-NEXT: Link: 0 // CHECK-NEXT: Info: 0 // CHECK-NEXT: AddressAlignment: 8 // CHECK-NEXT: EntrySize: 0 // CHECK-NEXT: SectionData ( -// CHECK-NEXT: 0000: 00200000 00000000 00000000 00000000 +// CHECK-NEXT: 0000: B0220000 00000000 00000000 00000000 Index: lld/trunk/test/ELF/x86-64-gotpc-relax-nopic.s =================================================================== --- lld/trunk/test/ELF/x86-64-gotpc-relax-nopic.s +++ lld/trunk/test/ELF/x86-64-gotpc-relax-nopic.s @@ -10,21 +10,21 @@ # SYMRELOC: Symbols [ # SYMRELOC: Symbol { # SYMRELOC: Name: bar -# SYMRELOC-NEXT: Value: 0x202000 +# SYMRELOC-NEXT: Value: 0x202197 -## 2105344 = 0x202000 (bar) +## 2105751 = 0x202197 (bar) # DISASM: Disassembly of section .text: # DISASM-EMPTY: # DISASM-NEXT: _start: -# DISASM-NEXT: 201000: adcq $2105344, %rax -# DISASM-NEXT: addq $2105344, %rbx -# DISASM-NEXT: andq $2105344, %rcx -# DISASM-NEXT: cmpq $2105344, %rdx -# DISASM-NEXT: orq $2105344, %rdi -# DISASM-NEXT: sbbq $2105344, %rsi -# DISASM-NEXT: subq $2105344, %rbp -# DISASM-NEXT: xorq $2105344, %r8 -# DISASM-NEXT: testq $2105344, %r15 +# DISASM-NEXT: 201158: adcq $2105751, %rax +# DISASM-NEXT: addq $2105751, %rbx +# DISASM-NEXT: andq $2105751, %rcx +# DISASM-NEXT: cmpq $2105751, %rdx +# DISASM-NEXT: orq $2105751, %rdi +# DISASM-NEXT: sbbq $2105751, %rsi +# DISASM-NEXT: subq $2105751, %rbp +# DISASM-NEXT: xorq $2105751, %r8 +# DISASM-NEXT: testq $2105751, %r15 # RUN: ld.lld --hash-style=sysv -shared %t.o -o %t2 # RUN: llvm-readobj -S -r -d %t2 | FileCheck --check-prefix=SEC-PIC %s @@ -37,8 +37,8 @@ # SEC-PIC-NEXT: SHF_ALLOC # SEC-PIC-NEXT: SHF_WRITE # SEC-PIC-NEXT: ] -# SEC-PIC-NEXT: Address: 0x20A0 -# SEC-PIC-NEXT: Offset: 0x20A0 +# SEC-PIC-NEXT: Address: 0x2348 +# SEC-PIC-NEXT: Offset: 0x348 # SEC-PIC-NEXT: Size: 8 # SEC-PIC-NEXT: Link: # SEC-PIC-NEXT: Info: @@ -47,7 +47,7 @@ # SEC-PIC-NEXT: } # SEC-PIC: Relocations [ # SEC-PIC-NEXT: Section ({{.*}}) .rela.dyn { -# SEC-PIC-NEXT: 0x20A0 R_X86_64_RELATIVE - 0x3000 +# SEC-PIC-NEXT: 0x2348 R_X86_64_RELATIVE - 0x3350 # SEC-PIC-NEXT: } # SEC-PIC-NEXT: ] # SEC-PIC: 0x000000006FFFFFF9 RELACOUNT 1 @@ -58,15 +58,15 @@ # DISASM-PIC: Disassembly of section .text: # DISASM-PIC-EMPTY: # DISASM-PIC-NEXT: _start: -# DISASM-PIC-NEXT: 1000: adcq 4249(%rip), %rax -# DISASM-PIC-NEXT: addq 4242(%rip), %rbx -# DISASM-PIC-NEXT: andq 4235(%rip), %rcx -# DISASM-PIC-NEXT: cmpq 4228(%rip), %rdx -# DISASM-PIC-NEXT: orq 4221(%rip), %rdi -# DISASM-PIC-NEXT: sbbq 4214(%rip), %rsi -# DISASM-PIC-NEXT: subq 4207(%rip), %rbp -# DISASM-PIC-NEXT: xorq 4200(%rip), %r8 -# DISASM-PIC-NEXT: testq %r15, 4193(%rip) +# DISASM-PIC-NEXT: 1268: adcq 4313(%rip), %rax +# DISASM-PIC-NEXT: addq 4306(%rip), %rbx +# DISASM-PIC-NEXT: andq 4299(%rip), %rcx +# DISASM-PIC-NEXT: cmpq 4292(%rip), %rdx +# DISASM-PIC-NEXT: orq 4285(%rip), %rdi +# DISASM-PIC-NEXT: sbbq 4278(%rip), %rsi +# DISASM-PIC-NEXT: subq 4271(%rip), %rbp +# DISASM-PIC-NEXT: xorq 4264(%rip), %r8 +# DISASM-PIC-NEXT: testq %r15, 4257(%rip) .data .type bar, @object Index: lld/trunk/test/ELF/x86-64-gotpc-relax-und-dso.s =================================================================== --- lld/trunk/test/ELF/x86-64-gotpc-relax-und-dso.s +++ lld/trunk/test/ELF/x86-64-gotpc-relax-und-dso.s @@ -23,22 +23,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 4367(%rip), %rax +# DISASM-NEXT: movq 4360(%rip), %rax +# DISASM-NEXT: movq 4361(%rip), %rax +# DISASM-NEXT: movq 4354(%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 4341(%rip), %rax +# DISASM-NEXT: movq 4334(%rip), %rax +# DISASM-NEXT: movq 4311(%rip), %rax +# DISASM-NEXT: movq 4304(%rip), %rax +# DISASM-NEXT: movq 4305(%rip), %rax +# DISASM-NEXT: movq 4298(%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 4285(%rip), %rax +# DISASM-NEXT: movq 4278(%rip), %rax .text .globl foo Index: lld/trunk/test/ELF/x86-64-gotpc-relax.s =================================================================== --- lld/trunk/test/ELF/x86-64-gotpc-relax.s +++ lld/trunk/test/ELF/x86-64-gotpc-relax.s @@ -8,37 +8,37 @@ # RELOC: Relocations [ # RELOC: ] -# 0x201003 + 7 - 10 = 0x201000 -# 0x20100a + 7 - 17 = 0x201000 -# 0x201011 + 7 - 23 = 0x201001 -# 0x201018 + 7 - 30 = 0x201001 +# 0x201173 + 7 - 10 = 0x201170 +# 0x20117a + 7 - 17 = 0x201170 +# 0x201181 + 7 - 23 = 0x201171 +# 0x201188 + 7 - 30 = 0x201171 # DISASM: Disassembly of section .text: # DISASM-EMPTY: # DISASM-NEXT: foo: -# DISASM-NEXT: 201000: 90 nop +# DISASM-NEXT: 201170: 90 nop # DISASM: hid: -# DISASM-NEXT: 201001: 90 nop +# DISASM-NEXT: 201171: 90 nop # DISASM: ifunc: -# DISASM-NEXT: 201002: c3 retq +# DISASM-NEXT: 201172: c3 retq # DISASM: _start: # DISASM-NEXT: leaq -10(%rip), %rax # DISASM-NEXT: leaq -17(%rip), %rax # DISASM-NEXT: leaq -23(%rip), %rax # DISASM-NEXT: leaq -30(%rip), %rax -# DISASM-NEXT: movq 4058(%rip), %rax -# DISASM-NEXT: movq 4051(%rip), %rax +# DISASM-NEXT: movq 4234(%rip), %rax +# DISASM-NEXT: movq 4227(%rip), %rax # DISASM-NEXT: leaq -52(%rip), %rax # DISASM-NEXT: leaq -59(%rip), %rax # DISASM-NEXT: leaq -65(%rip), %rax # DISASM-NEXT: leaq -72(%rip), %rax -# DISASM-NEXT: movq 4016(%rip), %rax -# DISASM-NEXT: movq 4009(%rip), %rax +# DISASM-NEXT: movq 4192(%rip), %rax +# DISASM-NEXT: movq 4185(%rip), %rax # DISASM-NEXT: callq -93 # DISASM-NEXT: callq -99 # DISASM-NEXT: callq -104 # DISASM-NEXT: callq -110 -# DISASM-NEXT: callq *3979(%rip) -# DISASM-NEXT: callq *3973(%rip) +# DISASM-NEXT: callq *4155(%rip) +# DISASM-NEXT: callq *4149(%rip) # DISASM-NEXT: jmp -128 # DISASM-NEXT: nop # DISASM-NEXT: jmp -134 @@ -47,8 +47,8 @@ # DISASM-NEXT: nop # DISASM-NEXT: jmp -145 # DISASM-NEXT: nop -# DISASM-NEXT: jmpq *3943(%rip) -# DISASM-NEXT: jmpq *3937(%rip) +# DISASM-NEXT: jmpq *4119(%rip) +# DISASM-NEXT: jmpq *4113(%rip) .text .globl foo Index: lld/trunk/test/ELF/x86-64-plt-high-addr.s =================================================================== --- lld/trunk/test/ELF/x86-64-plt-high-addr.s +++ lld/trunk/test/ELF/x86-64-plt-high-addr.s @@ -8,16 +8,16 @@ // RUN: llvm-objdump -s -j .got.plt %t1.exe | FileCheck %s // CHECK: Contents of section .got.plt: -// CHECK-NEXT: cafe00003000 00200000 feca0000 00000000 00000000 -// CHECK-NEXT: cafe00003010 00000000 00000000 26100000 feca0000 +// CHECK-NEXT: cafe00003380 b0220000 feca0000 00000000 00000000 +// CHECK-NEXT: cafe00003390 00000000 00000000 a6120000 feca0000 // RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t2.o // RUN: ld.lld -o %t2.exe %t2.o %t.so -image-base=0xcafe00000000 -z retpolineplt // RUN: llvm-objdump -s -j .got.plt %t2.exe | FileCheck -check-prefix=RETPOLINE %s // RETPOLINE: Contents of section .got.plt: -// RETPOLINE-NEXT: cafe00003000 00200000 feca0000 00000000 00000000 -// RETPOLINE-NEXT: cafe00003010 00000000 00000000 51100000 feca0000 +// RETPOLINE-NEXT: cafe000033b0 e0220000 feca0000 00000000 00000000 +// RETPOLINE-NEXT: cafe000033c0 00000000 00000000 d1120000 feca0000 .global _start _start: Index: lld/trunk/test/ELF/x86-64-plt.s =================================================================== --- lld/trunk/test/ELF/x86-64-plt.s +++ lld/trunk/test/ELF/x86-64-plt.s @@ -15,7 +15,7 @@ // CHECK-NEXT: SHF_ALLOC // CHECK-NEXT: SHF_EXECINSTR // CHECK-NEXT: ] -// CHECK-NEXT: Address: 0x1020 +// CHECK-NEXT: Address: 0x1320 // CHECK-NEXT: Offset: // CHECK-NEXT: Size: 64 // CHECK-NEXT: Link: 0 @@ -24,9 +24,9 @@ // CHECK: Relocations [ // CHECK-NEXT: Section ({{.*}}) .rela.plt { -// CHECK-NEXT: 0x3018 R_X86_64_JUMP_SLOT bar 0x0 -// CHECK-NEXT: 0x3020 R_X86_64_JUMP_SLOT zed 0x0 -// CHECK-NEXT: 0x3028 R_X86_64_JUMP_SLOT _start 0x0 +// CHECK-NEXT: 0x3438 R_X86_64_JUMP_SLOT bar 0x0 +// CHECK-NEXT: 0x3440 R_X86_64_JUMP_SLOT zed 0x0 +// CHECK-NEXT: 0x3448 R_X86_64_JUMP_SLOT _start 0x0 // CHECK-NEXT: } // CHECK-NEXT: ] @@ -36,7 +36,7 @@ // CHECK2-NEXT: SHF_ALLOC // CHECK2-NEXT: SHF_EXECINSTR // CHECK2-NEXT: ] -// CHECK2-NEXT: Address: 0x201020 +// CHECK2-NEXT: Address: 0x2012E0 // CHECK2-NEXT: Offset: // CHECK2-NEXT: Size: 48 // CHECK2-NEXT: Link: 0 @@ -45,8 +45,8 @@ // CHECK2: Relocations [ // CHECK2-NEXT: Section ({{.*}}) .rela.plt { -// CHECK2-NEXT: 0x203018 R_X86_64_JUMP_SLOT bar 0x0 -// CHECK2-NEXT: 0x203020 R_X86_64_JUMP_SLOT zed 0x0 +// CHECK2-NEXT: 0x2033F8 R_X86_64_JUMP_SLOT bar 0x0 +// CHECK2-NEXT: 0x203400 R_X86_64_JUMP_SLOT zed 0x0 // CHECK2-NEXT: } // CHECK2-NEXT: ] @@ -63,22 +63,22 @@ // DISASM: Disassembly of section .plt: // DISASM-EMPTY: // DISASM-NEXT: .plt: -// DISASM-NEXT: 1020: pushq 8162(%rip) -// DISASM-NEXT: jmpq *8164(%rip) +// DISASM-NEXT: 1320: pushq 8450(%rip) +// DISASM-NEXT: jmpq *8452(%rip) // DISASM-NEXT: nopl (%rax) // DISASM-EMPTY: // DISASM-NEXT: bar@plt: -// DISASM-NEXT: 1030: jmpq *8162(%rip) +// DISASM-NEXT: 1330: jmpq *8450(%rip) // DISASM-NEXT: pushq $0 // DISASM-NEXT: jmp -32 <.plt> // DISASM-EMPTY: // DISASM-NEXT: zed@plt: -// DISASM-NEXT: 1040: jmpq *8154(%rip) +// DISASM-NEXT: 1340: jmpq *8442(%rip) // DISASM-NEXT: pushq $1 // DISASM-NEXT: jmp -48 <.plt> // DISASM-EMPTY: // DISASM-NEXT: _start@plt: -// DISASM-NEXT: 1050: jmpq *8146(%rip) +// DISASM-NEXT: 1350: jmpq *8434(%rip) // DISASM-NEXT: pushq $2 // DISASM-NEXT: jmp -64 <.plt> @@ -99,17 +99,17 @@ // DISASM2: Disassembly of section .plt: // DISASM2-EMPTY: // DISASM2-NEXT: .plt: -// DISASM2-NEXT: 201020: pushq 8162(%rip) -// DISASM2-NEXT: jmpq *8164(%rip) +// DISASM2-NEXT: 2012e0: pushq 8450(%rip) +// DISASM2-NEXT: jmpq *8452(%rip) // DISASM2-NEXT: nopl (%rax) // DISASM2-EMPTY: // DISASM2-NEXT: bar@plt: -// DISASM2-NEXT: 201030: jmpq *8162(%rip) +// DISASM2-NEXT: 2012f0: jmpq *8450(%rip) // DISASM2-NEXT: pushq $0 // DISASM2-NEXT: jmp -32 <.plt> // DISASM2-EMPTY: // DISASM2-NEXT: zed@plt: -// DISASM2-NEXT: 201040: jmpq *8154(%rip) +// DISASM2-NEXT: 201300: jmpq *8442(%rip) // DISASM2-NEXT: pushq $1 // DISASM2-NEXT: jmp -48 <.plt> // DISASM2-NOT: {{.}} Index: lld/trunk/test/ELF/x86-64-relax-got-abs.s =================================================================== --- lld/trunk/test/ELF/x86-64-relax-got-abs.s +++ lld/trunk/test/ELF/x86-64-relax-got-abs.s @@ -7,7 +7,7 @@ # RUN: ld.lld %t.o -o %t.so -shared # RUN: llvm-objdump -d %t.so | FileCheck %s -# CHECK: movq 4201(%rip), %rax +# CHECK: movq 4209(%rip), %rax movq bar@GOTPCREL(%rip), %rax .data Index: lld/trunk/test/ELF/x86-64-reloc-error2.s =================================================================== --- lld/trunk/test/ELF/x86-64-reloc-error2.s +++ lld/trunk/test/ELF/x86-64-reloc-error2.s @@ -4,7 +4,7 @@ ## Check we are able to find a function symbol that encloses ## a given location when reporting error messages. -# CHECK: {{.*}}.o:(function func: .text.func+0x3): relocation R_X86_64_32S out of range: -281474974609408 is not in [-2147483648, 2147483647] +# CHECK: {{.*}}.o:(function func: .text.func+0x3): relocation R_X86_64_32S out of range: -281474974609120 is not in [-2147483648, 2147483647] # This mergeable section will be garbage collected. We had a crash issue in that case. Test it. .section .rodata.str1,"aMS",@progbits,1 Index: lld/trunk/test/ELF/x86-64-reloc-gotoff64.s =================================================================== --- lld/trunk/test/ELF/x86-64-reloc-gotoff64.s +++ lld/trunk/test/ELF/x86-64-reloc-gotoff64.s @@ -4,8 +4,8 @@ // RUN: llvm-readelf -S %t.so | FileCheck %s -check-prefix=SECTION // RUN: llvm-objdump -d %t.so | FileCheck %s -// SECTION: .dynamic DYNAMIC 0000000000002000 -// SECTION: .got.plt PROGBITS 0000000000003000 003000 000018 +// SECTION: .dynamic DYNAMIC 0000000000002290 +// SECTION: .got.plt PROGBITS 0000000000003300 000300 000018 // The assembly is generated by // gcc -O2 -S -mcmodel=medium -fPIC a.c @@ -14,10 +14,10 @@ // extern long _DYNAMIC[] __attribute__((visibility("hidden"))); // long* dynamic() { return _DYNAMIC; } -// 0x3000 (.got.plt) - 0x1007 = 8185 -// 0x2000 (_DYNAMIC) - 0x3000 (.got.plt) = -4096 -// CHECK: 1000: {{.*}} leaq 8185(%rip), %rdx -// CHECK-NEXT: 1007: {{.*}} movabsq $-4096, %rax +// 0x3300 (.got.plt) - 0x127b = 8325 +// 0x2290 (_DYNAMIC) - 0x3300 (.got.plt) = -4208 +// CHECK: 1274: {{.*}} leaq 8325(%rip), %rdx +// CHECK-NEXT: 127b: {{.*}} movabsq $-4208, %rax .global dynamic dynamic: leaq _GLOBAL_OFFSET_TABLE_(%rip), %rdx Index: lld/trunk/test/ELF/x86-64-reloc-gotpc64.s =================================================================== --- lld/trunk/test/ELF/x86-64-reloc-gotpc64.s +++ lld/trunk/test/ELF/x86-64-reloc-gotpc64.s @@ -4,11 +4,11 @@ // RUN: llvm-readelf -S %t.so | FileCheck %s -check-prefix=SECTION // RUN: llvm-objdump -d %t.so | FileCheck %s -// SECTION: .got.plt PROGBITS 0000000000003000 003000 000018 +// SECTION: .got.plt PROGBITS 00000000000032f0 0002f0 000018 -// 0x3000 (.got.plt) - 0x1000 = 8192 +// 0x3300 (.got.plt) - 0x1274 = 8316 // CHECK: gotpc64: -// CHECK-NEXT: 1000: {{.*}} movabsq $8192, %r11 +// CHECK-NEXT: 1274: {{.*}} movabsq $8316, %r11 .global gotpc64 gotpc64: movabsq $_GLOBAL_OFFSET_TABLE_-., %r11 Index: lld/trunk/test/ELF/x86-64-reloc-range.s =================================================================== --- lld/trunk/test/ELF/x86-64-reloc-range.s +++ lld/trunk/test/ELF/x86-64-reloc-range.s @@ -12,5 +12,5 @@ .hidden foo .bss - .zero 0x7fffe007 + .zero 0x7fffdf87 foo: Index: lld/trunk/test/ELF/x86-64-reloc-size.s =================================================================== --- lld/trunk/test/ELF/x86-64-reloc-size.s +++ lld/trunk/test/ELF/x86-64-reloc-size.s @@ -14,10 +14,10 @@ # NORELOC-NEXT: ] # DATA: section '.data': -# DATA-NEXT: 0x00202000 00000000 00000000 00000000 00000000 -# DATA-NEXT: 0x00202010 00000000 00000000 00001900 00000000 -# DATA-NEXT: 0x00202020 00001b00 00000000 00001900 00000000 -# DATA-NEXT: 0x00202030 00001b00 00000000 0000 +# DATA-NEXT: 0x002031ac 00000000 00000000 00000000 00000000 +# DATA-NEXT: 0x002031bc 00000000 00000000 00001900 00000000 +# DATA-NEXT: 0x002031cc 00001b00 00000000 00001900 00000000 +# DATA-NEXT: 0x002031dc 00001b00 00000000 0000 # DISASM: _start: # DISASM-NEXT: movl 25, %eax @@ -27,10 +27,10 @@ # RELOC2: Relocations [ # RELOC2-NEXT: Section ({{.*}}) .rela.dyn { -# RELOC2-NEXT: 0x1003 R_X86_64_SIZE32 foo 0xFFFFFFFFFFFFFFFF -# RELOC2-NEXT: 0x100A R_X86_64_SIZE32 foo 0x1 -# RELOC2-NEXT: 0x301A R_X86_64_SIZE64 foo 0xFFFFFFFFFFFFFFFF -# RELOC2-NEXT: 0x3022 R_X86_64_SIZE64 foo 0x1 +# RELOC2-NEXT: 0x2333 R_X86_64_SIZE32 foo 0xFFFFFFFFFFFFFFFF +# RELOC2-NEXT: 0x233A R_X86_64_SIZE32 foo 0x1 +# RELOC2-NEXT: 0x440A R_X86_64_SIZE64 foo 0xFFFFFFFFFFFFFFFF +# RELOC2-NEXT: 0x4412 R_X86_64_SIZE64 foo 0x1 # RELOC2-NEXT: } # RELOC2-NEXT: ] Index: lld/trunk/test/ELF/x86-64-retpoline-znow-static-iplt.s =================================================================== --- lld/trunk/test/ELF/x86-64-retpoline-znow-static-iplt.s +++ lld/trunk/test/ELF/x86-64-retpoline-znow-static-iplt.s @@ -3,18 +3,18 @@ # RUN: ld.lld -z retpolineplt -z now %t.o -o %t # RUN: llvm-objdump -d -no-show-raw-insn %t | FileCheck %s -#0x201001+5 + 42 = 0x201030 (foo@plt) +#0x2011a9+5 + 34 = 0x2011d0 (foo@plt) # CHECK: _start: -# CHECK-NEXT: 201001: callq 42 +# CHECK-NEXT: 2011a9: callq 34 #Static IPLT header due to -z retpolineplt -# CHECK: 0000000000201010 .plt: -# CHECK-NEXT: 201010: callq 11 <.plt+0x10> -# CHECK-NEXT: 201015: pause -# CHECK-NEXT: 201017: lfence +# CHECK: 00000000002011b0 .plt: +# CHECK-NEXT: 2011b0: callq 11 <.plt+0x10> +# CHECK-NEXT: 2011b5: pause +# CHECK-NEXT: 2011b7: lfence #foo@plt -# CHECK: 201030: movq 4041(%rip), %r11 -# CHECK-NEXT: 201037: jmp -44 <.plt> +# CHECK: 2011d0: movq 4105(%rip), %r11 +# CHECK-NEXT: 2011d7: jmp -44 <.plt> .type foo STT_GNU_IFUNC .globl foo Index: lld/trunk/test/ELF/x86-64-retpoline-znow.s =================================================================== --- lld/trunk/test/ELF/x86-64-retpoline-znow.s +++ lld/trunk/test/ELF/x86-64-retpoline-znow.s @@ -9,7 +9,7 @@ // CHECK: Disassembly of section .plt: // CHECK-EMPTY: // CHECK-NEXT: .plt: -// CHECK-NEXT: 1010: callq 11 <.plt+0x10> +// CHECK-NEXT: 12d0: callq 11 <.plt+0x10> // CHECK-NEXT: pause // CHECK-NEXT: lfence // CHECK-NEXT: jmp -7 <.plt+0x5> @@ -17,7 +17,7 @@ // CHECK-NEXT: int3 // CHECK-NEXT: int3 // CHECK-NEXT: int3 -// CHECK-NEXT: 1020: movq %r11, (%rsp) +// CHECK-NEXT: 12e0: movq %r11, (%rsp) // CHECK-NEXT: retq // CHECK-NEXT: int3 // CHECK-NEXT: int3 @@ -30,13 +30,13 @@ // CHECK-NEXT: int3 // CHECK-NEXT: int3 // CHECK-NEXT: int3 -// CHECK-NEXT: 1030: movq 4289(%rip), %r11 +// CHECK-NEXT: 12f0: movq 4369(%rip), %r11 // CHECK-NEXT: jmp -44 <.plt> // CHECK-NEXT: int3 // CHECK-NEXT: int3 // CHECK-NEXT: int3 // CHECK-NEXT: int3 -// CHECK-NEXT: 1040: movq 4281(%rip), %r11 +// CHECK-NEXT: 1300: movq 4361(%rip), %r11 // CHECK-NEXT: jmp -60 <.plt> // CHECK-NEXT: int3 // CHECK-NEXT: int3 @@ -44,9 +44,9 @@ // CHECK-NEXT: int3 // CHECK: Contents of section .got.plt: -// CHECK-NEXT: 20e0 00200000 00000000 00000000 00000000 -// CHECK-NEXT: 20f0 00000000 00000000 00000000 00000000 -// CHECK-NEXT: 2100 00000000 00000000 +// CHECK-NEXT: 23f0 10230000 00000000 00000000 00000000 +// CHECK-NEXT: 2400 00000000 00000000 00000000 00000000 +// CHECK-NEXT: 2410 00000000 00000000 .global _start _start: Index: lld/trunk/test/ELF/x86-64-retpoline.s =================================================================== --- lld/trunk/test/ELF/x86-64-retpoline.s +++ lld/trunk/test/ELF/x86-64-retpoline.s @@ -9,8 +9,8 @@ // CHECK: Disassembly of section .plt: // CHECK-EMPTY: // CHECK-NEXT: .plt: -// CHECK-NEXT: 1010: pushq 8178(%rip) -// CHECK-NEXT: movq 8179(%rip), %r11 +// CHECK-NEXT: 1300: pushq 8498(%rip) +// CHECK-NEXT: movq 8499(%rip), %r11 // CHECK-NEXT: callq 14 <.plt+0x20> // CHECK-NEXT: pause // CHECK-NEXT: lfence @@ -22,7 +22,7 @@ // CHECK-NEXT: int3 // CHECK-NEXT: int3 // CHECK-NEXT: int3 -// CHECK-NEXT: 1030: movq %r11, (%rsp) +// CHECK-NEXT: 1320: movq %r11, (%rsp) // CHECK-NEXT: retq // CHECK-NEXT: int3 // CHECK-NEXT: int3 @@ -35,7 +35,7 @@ // CHECK-NEXT: int3 // CHECK-NEXT: int3 // CHECK-NEXT: int3 -// CHECK-NEXT: 1040: movq 8145(%rip), %r11 +// CHECK-NEXT: 1330: movq 8465(%rip), %r11 // CHECK-NEXT: callq -28 <.plt+0x20> // CHECK-NEXT: jmp -47 <.plt+0x12> // CHECK-NEXT: pushq $0 @@ -45,7 +45,7 @@ // CHECK-NEXT: int3 // CHECK-NEXT: int3 // CHECK-NEXT: int3 -// CHECK-NEXT: 1060: movq 8121(%rip), %r11 +// CHECK-NEXT: 1350: movq 8441(%rip), %r11 // CHECK-NEXT: callq -60 <.plt+0x20> // CHECK-NEXT: jmp -79 <.plt+0x12> // CHECK-NEXT: pushq $1 @@ -57,9 +57,9 @@ // CHECK-NEXT: int3 // CHECK: Contents of section .got.plt: -// CHECK-NEXT: 3000 00200000 00000000 00000000 00000000 -// CHECK-NEXT: 3010 00000000 00000000 51100000 00000000 -// CHECK-NEXT: 3020 71100000 00000000 +// CHECK-NEXT: 3430 70230000 00000000 00000000 00000000 +// CHECK-NEXT: 3440 00000000 00000000 41130000 00000000 +// CHECK-NEXT: 3450 61130000 00000000 .global _start _start: Index: lld/trunk/test/ELF/x86-64-tls-dynamic.s =================================================================== --- lld/trunk/test/ELF/x86-64-tls-dynamic.s +++ lld/trunk/test/ELF/x86-64-tls-dynamic.s @@ -48,29 +48,29 @@ // CHECK-NEXT: SHF_ALLOC // CHECK-NEXT: SHF_WRITE // CHECK-NEXT: ] -// CHECK-NEXT: Address: 0x20E0 +// CHECK-NEXT: Address: 0x24A0 // CHECK-NEXT: Offset: // CHECK-NEXT: Size: 40 // CHECK: Relocations [ // CHECK: Section ({{.+}}) .rela.dyn { -// CHECK-NEXT: 0x20E0 R_X86_64_DTPMOD64 - 0x0 -// CHECK-NEXT: 0x20F0 R_X86_64_DTPMOD64 c 0x0 -// CHECK-NEXT: 0x20F8 R_X86_64_DTPOFF64 c 0x0 -// CHECK-NEXT: 0x2100 R_X86_64_TPOFF64 c 0x0 +// CHECK-NEXT: 0x24A0 R_X86_64_DTPMOD64 - 0x0 +// CHECK-NEXT: 0x24B0 R_X86_64_DTPMOD64 c 0x0 +// CHECK-NEXT: 0x24B8 R_X86_64_DTPOFF64 c 0x0 +// CHECK-NEXT: 0x24C0 R_X86_64_TPOFF64 c 0x0 // CHECK-NEXT: } -// 4313 = (0x20E0 + -4) - (0x1000 + 3) // PC relative offset to got entry. -// 4301 = (0x20F0 + -4) - (0x100c + 3) // PC relative offset to got entry. -// 4283 = (0x20F8 + -4) - (0x102e + 3) // PC relative offset to got entry. -// 4279 = (0x2100 + -4) - (0x1042 + 3) // PC relative offset to got entry. +// 4457 = (0x24A0 + -4) - (0x1330 + 3) // PC relative offset to got entry. +// 4445 = (0x24B0 + -4) - (0x133c + 3) // PC relative offset to got entry. +// 4427 = (0x24B8 + -4) - (0x135e + 3) // PC relative offset to got entry. +// 4423 = (0x24C0 + -4) - (0x1372 + 3) // PC relative offset to got entry. // DIS: Disassembly of section .text: // DIS-EMPTY: // DIS-NEXT: .text: -// DIS-NEXT: 1000: {{.+}} leaq 4313(%rip), %rdi +// DIS-NEXT: 1330: {{.+}} leaq 4457(%rip), %rdi // DIS-NEXT: {{.+}} callq -// DIS-NEXT: 100c: {{.+}} leaq 4301(%rip), %rdi +// DIS-NEXT: 133c: {{.+}} leaq 4445(%rip), %rdi // DIS-NEXT: {{.+}} callq // DIS-NEXT: {{.+}} leaq (%rax), %rcx // DIS-NEXT: {{.+}} leaq 4(%rax), %rcx @@ -78,10 +78,10 @@ // DIS-NEXT: 00 00 // DIS-NEXT: 00 00 // DIS-NEXT: 00 00 -// DIS-NEXT: 102e: {{.+}} leaq 4283(%rip), %rdi +// DIS-NEXT: 135e: {{.+}} leaq 4427(%rip), %rdi // DIS-NEXT: {{.+}} callq // DIS-NEXT: {{.+}} leaq (%rax), %rcx -// DIS-NEXT: 1042: {{.+}} movq 4279(%rip), %rax +// DIS-NEXT: 1372: {{.+}} movq 4423(%rip), %rax // DIS-NEXT: {{.+}} movq %fs:(%rax), %rax // DIS-NEXT: {{.+}} movabsq $0, %rax // DIS-NEXT: {{.+}} movabsq $4, %rax Index: lld/trunk/test/ELF/x86-64-tls-gd-local.s =================================================================== --- lld/trunk/test/ELF/x86-64-tls-gd-local.s +++ lld/trunk/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: 0x20D0 -// CHECK-NEXT: Offset: 0x20D0 +// CHECK-NEXT: Address: 0x23F0 +// CHECK-NEXT: Offset: 0x3F0 // CHECK-NEXT: Size: 32 // CHECK-NEXT: Link: 0 // CHECK-NEXT: Info: 0 @@ -47,6 +47,6 @@ // CHECK-NEXT: ) // CHECK: Section ({{.*}}) .rela.dyn { -// CHECK-NEXT: 0x20D0 R_X86_64_DTPMOD64 - 0x0 -// CHECK-NEXT: 0x20E0 R_X86_64_DTPMOD64 - 0x0 +// CHECK-NEXT: 0x23F0 R_X86_64_DTPMOD64 - 0x0 +// CHECK-NEXT: 0x2400 R_X86_64_DTPMOD64 - 0x0 // CHECK-NEXT: } Index: lld/trunk/test/ELF/x86-64-tls-gdie.s =================================================================== --- lld/trunk/test/ELF/x86-64-tls-gdie.s +++ lld/trunk/test/ELF/x86-64-tls-gdie.s @@ -11,20 +11,20 @@ //RELOC: Relocations [ //RELOC-NEXT: Section (5) .rela.dyn { -//RELOC-NEXT: 0x2020C0 R_X86_64_TPOFF64 tlsshared0 0x0 -//RELOC-NEXT: 0x2020C8 R_X86_64_TPOFF64 tlsshared1 0x0 +//RELOC-NEXT: 0x2023A8 R_X86_64_TPOFF64 tlsshared0 0x0 +//RELOC-NEXT: 0x2023B0 R_X86_64_TPOFF64 tlsshared1 0x0 //RELOC-NEXT: } //RELOC-NEXT: ] -// 0x2020C0 - (201009+7) = 4272 -// 0x2020C8 - (201019+7) = 4264 +// 0x2023A8 - (2012d1+7) = 4304 +// 0x2023B0 - (2012e1+7) = 4296 // DISASM: Disassembly of section .text: // DISASM-EMPTY: // DISASM-NEXT: _start: // DISASM-NEXT: movq %fs:0, %rax -// DISASM-NEXT: 201009: addq 4272(%rip), %rax +// DISASM-NEXT: 2012d1: addq 4304(%rip), %rax // DISASM-NEXT: movq %fs:0, %rax -// DISASM-NEXT: 201019: addq 4264(%rip), %rax +// DISASM-NEXT: 2012e1: addq 4296(%rip), %rax .section .text .globl _start Index: lld/trunk/test/ELF/x86-64-tls-ie-local.s =================================================================== --- lld/trunk/test/ELF/x86-64-tls-ie-local.s +++ lld/trunk/test/ELF/x86-64-tls-ie-local.s @@ -5,18 +5,18 @@ # RUN: llvm-readobj -r %t.so | FileCheck --check-prefix=REL %s # RUN: llvm-objdump -d --no-show-raw-insn %t.so | FileCheck %s -# SEC: .got PROGBITS 00000000000020b0 0020b0 000010 00 WA 0 0 8 +# SEC: .got PROGBITS 0000000000002338 000338 000010 00 WA 0 0 8 ## Dynamic relocations for non-preemptable symbols in a shared object have section index 0. # REL: .rela.dyn { -# REL-NEXT: 0x20B0 R_X86_64_TPOFF64 - 0x0 -# REL-NEXT: 0x20B8 R_X86_64_TPOFF64 - 0x4 +# REL-NEXT: 0x2338 R_X86_64_TPOFF64 - 0x0 +# REL-NEXT: 0x2340 R_X86_64_TPOFF64 - 0x4 # REL-NEXT: } -## &.got[0] - 0x1007 = 0x20B0 - 0x1007 = 4265 -## &.got[1] - 0x100e = 0x20B8 - 0x100e = 4266 -# CHECK: 1000: addq 4265(%rip), %rax -# CHECK-NEXT: 1007: addq 4266(%rip), %rax +## &.got[0] - 0x127f = 0x2338 - 0x127f = 4281 +## &.got[1] - 0x1286 = 0x2340 - 0x1286 = 4282 +# CHECK: 1278: addq 4281(%rip), %rax +# CHECK-NEXT: 127f: addq 4282(%rip), %rax addq foo@GOTTPOFF(%rip), %rax addq bar@GOTTPOFF(%rip), %rax Index: lld/trunk/test/ELF/x86-64-tls-ie.s =================================================================== --- lld/trunk/test/ELF/x86-64-tls-ie.s +++ lld/trunk/test/ELF/x86-64-tls-ie.s @@ -1,13 +1,13 @@ // REQUIRES: x86 // RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t1.o // RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %p/Inputs/tls-got.s -o %t2.o -// RUN: ld.lld -shared %t2.o -o %t2.so -// RUN: ld.lld --hash-style=sysv -e main %t1.o %t2.so -o %t3 +// RUN: ld.lld -shared %t2.o -soname=so -o %t2.so +// RUN: ld.lld -e main %t1.o %t2.so -o %t3 // RUN: llvm-readobj -S -r %t3 | FileCheck %s // 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 [ @@ -15,7 +15,7 @@ // CHECK-NEXT: SHF_WRITE // CHECK-NEXT: ] // CHECK-NEXT: Address: [[ADDR:.*]] -// CHECK-NEXT: Offset: 0x20C0 +// CHECK-NEXT: Offset: 0x3C0 // CHECK-NEXT: Size: 16 // CHECK-NEXT: Link: 0 // CHECK-NEXT: Info: 0 @@ -24,25 +24,25 @@ // CHECK-NEXT: } // CHECK: Relocations [ -// CHECK-NEXT: Section (4) .rela.dyn { -// CHECK-NEXT: 0x2020C8 R_X86_64_TPOFF64 tls0 0x0 +// CHECK-NEXT: Section (5) .rela.dyn { +// CHECK-NEXT: 0x2023C8 R_X86_64_TPOFF64 tls0 0x0 // CHECK-NEXT: [[ADDR]] R_X86_64_TPOFF64 tls1 0x0 // CHECK-NEXT: } // CHECK-NEXT: ] -// 0x201000 + 4281 + 7 = 0x2020C0 -// 0x20100A + 4279 + 7 = 0x2020C8 -// 0x201014 + 4269 + 7 = 0x2020C8 +// 0x2012d0 + 4329 + 7 = 0x2023C0 +// 0x2012dA + 4327 + 7 = 0x2023C8 +// 0x2012e4 + 4317 + 7 = 0x2023C8 // DISASM: Disassembly of section .text: // DISASM-EMPTY: // DISASM-NEXT: main: -// 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 +// DISASM-NEXT: 2012d0: {{.*}} movq 4329(%rip), %rax +// DISASM-NEXT: 2012d7: {{.*}} movl %fs:(%rax), %eax +// DISASM-NEXT: 2012da: {{.*}} movq 4327(%rip), %rax +// DISASM-NEXT: 2012e1: {{.*}} movl %fs:(%rax), %eax +// DISASM-NEXT: 2012e4: {{.*}} movq 4317(%rip), %rax +// DISASM-NEXT: 2012eb: {{.*}} movl %fs:(%rax), %eax +// DISASM-NEXT: 2012ee: {{.*}} retq .section .tdata,"awT",@progbits Index: lld/trunk/test/ELF/x86-64-tls-opt-noplt.s =================================================================== --- lld/trunk/test/ELF/x86-64-tls-opt-noplt.s +++ lld/trunk/test/ELF/x86-64-tls-opt-noplt.s @@ -12,8 +12,8 @@ // RELOC: Relocations [ // RELOC-NEXT: Section {{.*}} .rela.dyn { -// RELOC-NEXT: 0x2020C0 R_X86_64_TPOFF64 tlsshared0 0x0 -// RELOC-NEXT: 0x2020C8 R_X86_64_TPOFF64 tlsshared1 0x0 +// RELOC-NEXT: 0x202420 R_X86_64_TPOFF64 tlsshared0 0x0 +// RELOC-NEXT: 0x202428 R_X86_64_TPOFF64 tlsshared1 0x0 // RELOC-NEXT: } // RELOC-NEXT: ] @@ -21,9 +21,9 @@ // Table 11.5: GD -> IE Code Transition (LP64) // DISASM-NEXT: movq %fs:0, %rax -// DISASM-NEXT: 201009: addq 4272(%rip), %rax +// DISASM-NEXT: 201309: addq 4368(%rip), %rax // DISASM-NEXT: movq %fs:0, %rax -// DISASM-NEXT: 201019: addq 4264(%rip), %rax +// DISASM-NEXT: 201319: addq 4360(%rip), %rax // Table 11.7: GD -> LE Code Transition (LP64) // DISASM-NEXT: movq %fs:0, %rax Index: lld/trunk/test/ELF/x86-64-tlsdesc-gd.s =================================================================== --- lld/trunk/test/ELF/x86-64-tlsdesc-gd.s +++ lld/trunk/test/ELF/x86-64-tlsdesc-gd.s @@ -16,18 +16,18 @@ # RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck --check-prefix=IE %s # GD-REL: .rela.dyn { -# GD-REL-NEXT: 0x20A0 R_X86_64_TLSDESC a 0x0 -# GD-REL-NEXT: 0x20B0 R_X86_64_TLSDESC b 0x0 +# GD-REL-NEXT: 0x2380 R_X86_64_TLSDESC a 0x0 +# GD-REL-NEXT: 0x2390 R_X86_64_TLSDESC b 0x0 # GD-REL-NEXT: } -# 0x20a0-0x1007 = 4249 -# GD: leaq 4249(%rip), %rax -# GD-NEXT: 1007: callq *(%rax) +# 0x2380-0x12cf = 4273 +# GD: leaq 4273(%rip), %rax +# GD-NEXT: 12cf: callq *(%rax) # GD-NEXT: movl %fs:(%rax), %eax -# 0x20b0-0x1013 = 4253 -# GD-NEXT: leaq 4253(%rip), %rax -# GD-NEXT: 1013: callq *(%rax) +# 0x2390-0x12db = 4277 +# GD-NEXT: leaq 4277(%rip), %rax +# GD-NEXT: 12db: callq *(%rax) # GD-NEXT: movl %fs:(%rax), %eax # NOREL: no relocations @@ -42,16 +42,16 @@ # LE-NEXT: movl %fs:(%rax), %eax # IE-REL: .rela.dyn { -# IE-REL-NEXT: 0x2020C0 R_X86_64_TPOFF64 b 0x0 +# IE-REL-NEXT: 0x202360 R_X86_64_TPOFF64 b 0x0 # IE-REL-NEXT: } ## a is relaxed to use LE. # IE: movq $-4, %rax # IE-NEXT: nop # IE-NEXT: movl %fs:(%rax), %eax -## 0x2020C0 - 0x201013 = 4269 -# IE-NEXT: movq 4269(%rip), %rax -# IE-NEXT: 201013: nop +## 0x202360 - 0x20129b = 4293 +# IE-NEXT: movq 4293(%rip), %rax +# IE-NEXT: 20129b: nop # IE-NEXT: movl %fs:(%rax), %eax leaq a@tlsdesc(%rip), %rax Index: lld/trunk/test/ELF/x86-64-tlsdesc-ld.s =================================================================== --- lld/trunk/test/ELF/x86-64-tlsdesc-ld.s +++ lld/trunk/test/ELF/x86-64-tlsdesc-ld.s @@ -11,13 +11,13 @@ ## Check _TLS_MODULE_BASE_ used by LD produces a dynamic relocation with a value of 0. # LD-REL: .rela.dyn { -# LD-REL-NEXT: 0x20A0 R_X86_64_TLSDESC - 0x0 +# LD-REL-NEXT: 0x2318 R_X86_64_TLSDESC - 0x0 # LD-REL-NEXT: } -## 0x20a0-0x1007 = 4249 +## 0x2318-0x1267 = 4273 ## dtpoff(a) = 8, dtpoff(b) = 12 -# LD: leaq 4249(%rip), %rax -# LD-NEXT: 1007: callq *(%rax) +# LD: leaq 4273(%rip), %rax +# LD-NEXT: 1267: callq *(%rax) # LD-NEXT: movl %fs:8(%rax), %edx # LD-NEXT: addl %fs:12(%rax), %edx Index: lld/trunk/test/ELF/ztext.s =================================================================== --- lld/trunk/test/ELF/ztext.s +++ lld/trunk/test/ELF/ztext.s @@ -18,9 +18,9 @@ # CHECK: Relocations [ # CHECK-NEXT: Section {{.*}} .rela.dyn { -# CHECK-NEXT: 0x1000 R_X86_64_RELATIVE - 0x1000 -# CHECK-NEXT: 0x1008 R_X86_64_64 bar 0x0 -# CHECK-NEXT: 0x1010 R_X86_64_PC64 zed 0x0 +# CHECK-NEXT: 0x12A0 R_X86_64_RELATIVE - 0x12A0 +# CHECK-NEXT: 0x12A8 R_X86_64_64 bar 0x0 +# CHECK-NEXT: 0x12B0 R_X86_64_PC64 zed 0x0 # CHECK-NEXT: } # CHECK-NEXT: ] @@ -30,8 +30,8 @@ # STATIC: Relocations [ # STATIC-NEXT: Section {{.*}} .rela.dyn { -# STATIC-NEXT: 0x201008 R_X86_64_64 bar 0x0 -# STATIC-NEXT: 0x201010 R_X86_64_PC64 zed 0x0 +# STATIC-NEXT: 0x201290 R_X86_64_64 bar 0x0 +# STATIC-NEXT: 0x201298 R_X86_64_PC64 zed 0x0 # STATIC-NEXT: } # STATIC-NEXT: ]