diff --git a/lld/ELF/SyntheticSections.cpp b/lld/ELF/SyntheticSections.cpp --- a/lld/ELF/SyntheticSections.cpp +++ b/lld/ELF/SyntheticSections.cpp @@ -3451,8 +3451,8 @@ } ThunkSection::ThunkSection(OutputSection *os, uint64_t off) - : SyntheticSection(SHF_ALLOC | SHF_EXECINSTR, SHT_PROGBITS, - config->wordsize, ".text.thunk") { + : SyntheticSection(SHF_ALLOC | SHF_EXECINSTR, SHT_PROGBITS, 4, + ".text.thunk") { this->parent = os; this->outSecOff = off; } diff --git a/lld/test/ELF/aarch64-call26-thunk.s b/lld/test/ELF/aarch64-call26-thunk.s --- a/lld/test/ELF/aarch64-call26-thunk.s +++ b/lld/test/ELF/aarch64-call26-thunk.s @@ -12,11 +12,11 @@ // CHECK: Disassembly of section .text: // CHECK-EMPTY: // CHECK-NEXT: _start: -// CHECK-NEXT: 210120: bl #8 +// CHECK-NEXT: 210120: bl #4 // CHECK: __AArch64AbsLongThunk_big: -// CHECK-NEXT: 210128: ldr x16, #8 -// CHECK-NEXT: 21012c: br x16 +// CHECK-NEXT: 210124: ldr x16, #8 +// CHECK-NEXT: 210128: br x16 // CHECK: $d: -// CHECK-NEXT: 210130: 00 00 00 00 .word 0x00000000 -// CHECK-NEXT: 210134: 10 00 00 00 .word 0x00000010 +// CHECK-NEXT: 21012c: 00 00 00 00 .word 0x00000000 +// CHECK-NEXT: 210130: 10 00 00 00 .word 0x00000010 diff --git a/lld/test/ELF/aarch64-jump26-thunk.s b/lld/test/ELF/aarch64-jump26-thunk.s --- a/lld/test/ELF/aarch64-jump26-thunk.s +++ b/lld/test/ELF/aarch64-jump26-thunk.s @@ -12,10 +12,10 @@ // CHECK: Disassembly of section .text: // CHECK-EMPTY: // CHECK-NEXT: _start: -// CHECK-NEXT: 210120: b #8 +// CHECK-NEXT: 210120: b #4 // CHECK: __AArch64AbsLongThunk_big: -// CHECK-NEXT: 210128: ldr x16, #8 -// CHECK-NEXT: 21012c: br x16 +// CHECK-NEXT: 210124: ldr x16, #8 +// CHECK-NEXT: 210128: br x16 // CHECK: $d: -// CHECK-NEXT: 210130: 00 00 00 00 .word 0x00000000 -// CHECK-NEXT: 210134: 10 00 00 00 .word 0x00000010 +// CHECK-NEXT: 21012c: 00 00 00 00 .word 0x00000000 +// CHECK-NEXT: 210130: 10 00 00 00 .word 0x00000010 diff --git a/lld/test/ELF/ppc64-long-branch.s b/lld/test/ELF/ppc64-long-branch.s --- a/lld/test/ELF/ppc64-long-branch.s +++ b/lld/test/ELF/ppc64-long-branch.s @@ -64,9 +64,9 @@ # CHECK-NEXT: 2002000: addis 2, 12, 1 # CHECK-NEXT: addi 2, 2, -32728 # CHECK-NEXT: bl .-33554432 -# CHECK-NEXT: bl .+12 +# CHECK-NEXT: bl .+8 # CHECK: __long_branch_: -# CHECK-NEXT: 2002018: addis 12, 2, 0 +# CHECK-NEXT: 2002014: addis 12, 2, 0 # CHECK-NEXT: ld 12, -32744(12) # CHECK-NEXT: mtctr 12 # CHECK-NEXT: bctr