brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.0 KiB · 732af38 Raw
45 lines · plain
1; REQUIRES: msp4302; RUN: llvm-mc -filetype=obj -triple=msp430-elf -o %t1.o %s3; RUN: printf '.global _start\n _start: nop' | llvm-mc -filetype=obj -triple=msp430-elf -o %t2.o -4; RUN: ld.lld -o %t.exe --image-base=0x1000 --Tdata=0x2000 --Ttext=0x8000 --defsym=_byte=0x21 -z separate-code %t2.o %t1.o5; RUN: llvm-objdump -s -d %t.exe | FileCheck %s6 7;; Check handling of basic msp430 relocation types.8 9  .data10;; R_MSP430_811  .byte _byte12;; R_MSP430_1613  .word _start14;; R_MSP430_3215  .long _start16 17; CHECK:      Contents of section .data:18; CHECK-NEXT: 2000 21008000 80000019 20  .text21  .global foo22foo:23;; R_MSP430_10_PCREL24  jmp _start25 26; CHECK:      Disassembly of section .text:27; CHECK-EMPTY:28; CHECK-NEXT: <_start>:29; CHECK-NEXT: 8000: {{.*}} nop30; CHECK:      <foo>:31; CHECK-NEXT: 8004: {{.*}} jmp $-432 33;; R_MSP430_16_BYTE34  call #_start35 36; CHECK:      call #3276837 38;; R_MSP430_16_PCREL_BYTE39  mov #-1, _start40 41; CHECK:      800a: {{.*}} mov #-1, -1242 43; RUN: od -x %t.exe | FileCheck -check-prefix=TRAP %s44; TRAP: 4343 4343 4343 4343 4343 4343 4343 434345