[memprof] Remove an unused using directive (#117004)
[llvm-project.git] / lld / test / ELF / msp430.s
blob72bc9d28edc96d3a751793cb53d72ca57d914f98
1 ; REQUIRES: msp430
2 ; RUN: llvm-mc -filetype=obj -triple=msp430-elf -o %t1.o %s
3 ; RUN: echo -e '.global _start\n _start: nop' | llvm-mc -filetype=obj -triple=msp430-elf -o %t2.o -
4 ; RUN: ld.lld -o %t.exe --Tdata=0x2000 --Ttext=0x8000 --defsym=_byte=0x21 -z separate-code %t2.o %t1.o
5 ; RUN: llvm-objdump -s -d %t.exe | FileCheck %s
7 ;; Check handling of basic msp430 relocation types.
9 .data
10 ;; R_MSP430_8
11 .byte _byte
12 ;; R_MSP430_16
13 .word _start
14 ;; R_MSP430_32
15 .long _start
17 ; CHECK: Contents of section .data:
18 ; CHECK-NEXT: 2000 21008000 800000
20 .text
21 .global foo
22 foo:
23 ;; R_MSP430_10_PCREL
24 jmp _start
26 ; CHECK: Disassembly of section .text:
27 ; CHECK-EMPTY:
28 ; CHECK-NEXT: <_start>:
29 ; CHECK-NEXT: 8000: {{.*}} nop
30 ; CHECK: <foo>:
31 ; CHECK-NEXT: 8004: {{.*}} jmp $-4
33 ;; R_MSP430_16_BYTE
34 call #_start
36 ; CHECK: call #32768
38 ;; R_MSP430_16_PCREL_BYTE
39 mov #-1, _start
41 ; CHECK: 800a: {{.*}} mov #-1, -12
43 ; RUN: od -x %t.exe | FileCheck -check-prefix=TRAP %s
44 ; TRAP: 4343 4343 4343 4343 4343 4343 4343 4343