Jon Chesterfield | e0ca2ff | 2017-07-18 18:40:50 | [diff] [blame] | 1 | // REQUIRES: x86 |
Rafael Espindola | 07c8741 | 2017-06-10 01:56:58 | [diff] [blame] | 2 | // RUN: llvm-mc %s -o %t.o -triple i386-pc-linux-code16 -filetype=obj |
| 3 | |
| 4 | // RUN: echo ".global foo; foo = 0x1" > %t1.s |
| 5 | // RUN: llvm-mc %t1.s -o %t1.o -triple i386-pc-linux -filetype=obj |
| 6 | |
| 7 | // RUN: ld.lld -Ttext 0x7000 %t.o %t1.o -o %t |
| 8 | // RUN: llvm-objdump -d -triple=i386-pc-linux-code16 %t | FileCheck %s |
| 9 | |
| 10 | // CHECK: Disassembly of section .text: |
Fangrui Song | 5387c2c | 2019-05-01 10:40:48 | [diff] [blame] | 11 | // CHECK-EMPTY: |
Fangrui Song | 71e2ca6 | 2020-03-05 22:18:38 | [diff] [blame^] | 12 | // CHECK-NEXT: <_start>: |
Rafael Espindola | 07c8741 | 2017-06-10 01:56:58 | [diff] [blame] | 13 | // CHECK-NEXT: 7000: e9 fe 1f jmp 8190 |
| 14 | // 0x1 + 0x9000 - 0x7003 == 8190 |
| 15 | .global _start |
| 16 | _start: |
| 17 | jmp foo + 0x9000 |