2016-11-23 18:07:46 +08:00
|
|
|
// REQUIRES: x86
|
|
|
|
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
|
2018-02-16 09:10:51 +08:00
|
|
|
// 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: llvm-objdump -D %t | FileCheck --check-prefix=DISASM %s
|
|
|
|
// DISASM: Disassembly of section .nonalloc:
|
2019-05-01 18:40:48 +08:00
|
|
|
// DISASM-EMPTY:
|
2018-02-16 09:10:51 +08:00
|
|
|
// DISASM-NEXT: .nonalloc:
|
|
|
|
// DISASM-NEXT: 0: {{.*}} callq {{.*}} <_start>
|
|
|
|
// DISASM-NEXT: 5: {{.*}} callq {{.*}} <_start>
|
2016-11-23 18:07:46 +08:00
|
|
|
|
|
|
|
.globl _start
|
|
|
|
_start:
|
|
|
|
nop
|
|
|
|
|
2018-02-16 09:10:51 +08:00
|
|
|
.section .nonalloc
|
2018-02-17 04:05:58 +08:00
|
|
|
.byte 0xe8
|
|
|
|
.long _start - . - 4
|
|
|
|
.byte 0xe8
|
|
|
|
.long _start - . - 4
|