diff --git a/lld/test/ELF/non-abs-reloc.s b/lld/test/ELF/non-abs-reloc.s index 5b4ed27dd287..f58301b0a0a6 100644 --- a/lld/test/ELF/non-abs-reloc.s +++ b/lld/test/ELF/non-abs-reloc.s @@ -1,21 +1,31 @@ // REQUIRES: x86 -// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o -// RUN: ld.lld %t.o -o %t 2>&1 | FileCheck %s -// CHECK: (.nonalloc+0x1): has non-ABS relocation R_X86_64_PC32 against symbol '_start' -// CHECK: (.nonalloc+0x6): has non-ABS relocation R_X86_64_PC32 against symbol '_start' +// RUN: split-file %s %t +// RUN: llvm-mc -filetype=obj -triple=x86_64 %t/asm -o %t.o +// RUN: ld.lld -T %t/lds %t.o -o %t.exe 2>&1 | FileCheck %s +// CHECK: warning: {{.*}}.o:(.nonalloc1+0x2): has non-ABS relocation R_X86_64_PC32 against symbol '_start' +// CHECK-NEXT: warning: {{.*}}.o:(.nonalloc1+0x7): has non-ABS relocation R_X86_64_PC32 against symbol '_start' -// RUN: llvm-objdump -D %t | FileCheck --check-prefix=DISASM %s +// RUN: llvm-objdump -D --no-show-raw-insn %t.exe | FileCheck --check-prefix=DISASM %s // DISASM: Disassembly of section .nonalloc: // DISASM-EMPTY: // DISASM-NEXT: <.nonalloc>: -// DISASM-NEXT: 0: {{.*}} callq {{.*}} <_start> -// DISASM-NEXT: 5: {{.*}} callq {{.*}} <_start> +// DISASM-NEXT: 0: nop +// DISASM-NEXT: 1: callq 0x0 +// DISASM-NEXT: 6: callq 0x0 +//--- lds +SECTIONS { + .nonalloc 0 : { *(.nonalloc*) } +} +//--- asm .globl _start _start: nop -.section .nonalloc +.section .nonalloc0 + nop + +.section .nonalloc1 .byte 0xe8 .long _start - . - 4 .byte 0xe8 diff --git a/lld/test/ELF/x86-64-split-stack-prologue-adjust-success.s b/lld/test/ELF/x86-64-split-stack-prologue-adjust-success.s index 69636b7803c8..1fce4fdf6b57 100644 --- a/lld/test/ELF/x86-64-split-stack-prologue-adjust-success.s +++ b/lld/test/ELF/x86-64-split-stack-prologue-adjust-success.s @@ -45,12 +45,12 @@ prologue2_calls_\function_to_call\register: .size prologue2_calls_\function_to_call\register,. - prologue2_calls_\function_to_call\register .endm + .section .text,"ax",@progbits,unique,0 .local foo foo: - .section .text,"ax",@progbits .quad foo - .text + .section .text,"ax",@progbits,unique,1 # For split-stack code calling split-stack code, ensure prologue v1 still # calls plain __morestack, and that any raw bytes written to the prologue