2018-06-27 00:58:19 +08:00
|
|
|
# REQUIRES: x86
|
2015-09-26 03:24:57 +08:00
|
|
|
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
|
2020-02-13 13:48:45 +08:00
|
|
|
# RUN: not ld.lld %t -o /dev/null
|
2015-11-18 14:11:01 +08:00
|
|
|
# RUN: ld.lld %t --noinhibit-exec -o %t2
|
2015-09-26 03:24:57 +08:00
|
|
|
# RUN: llvm-objdump -d %t2 | FileCheck %s
|
2017-08-02 15:51:08 +08:00
|
|
|
# RUN: llvm-readobj -r %t2 | FileCheck %s --check-prefix=RELOC
|
2015-09-26 03:24:57 +08:00
|
|
|
|
|
|
|
# CHECK: Disassembly of section .text:
|
2019-05-01 18:40:48 +08:00
|
|
|
# CHECK-EMPTY:
|
2015-09-26 03:24:57 +08:00
|
|
|
# CHECK-NEXT: _start
|
2019-09-16 15:05:34 +08:00
|
|
|
# CHECK-NEXT: 201120: {{.*}} callq -2101541
|
2017-08-02 15:51:08 +08:00
|
|
|
|
|
|
|
# RELOC: Relocations [
|
|
|
|
# RELOC-NEXT: ]
|
2015-09-26 03:24:57 +08:00
|
|
|
|
|
|
|
# next code will not link without noinhibit-exec flag
|
|
|
|
# because of undefined symbol _bar
|
2016-04-27 10:58:27 +08:00
|
|
|
.globl _start
|
2015-09-26 03:24:57 +08:00
|
|
|
_start:
|
|
|
|
call _bar
|