Home | History | Annotate | Download | only in ARM
      1 // RUN: llvm-mc -triple=armv7-linux-gnueabi \
      2 // RUN:    -mcpu=cortex-a8 -mattr=-neon -mattr=+vfp2  \
      3 // RUN:    -filetype=obj %s -o - | \
      4 // RUN:   llvm-readobj -r | FileCheck -check-prefix=OBJ %s
      5 
      6 // Ensure no regression on ARM/gcc compatibility for
      7 // emitting explicit symbol relocs for nonexternal symbols
      8 // versus section symbol relocs (with offset) -
      9 //
     10 // Default llvm behavior is to emit as section symbol relocs nearly
     11 // everything that is not an undefined external. Unfortunately, this
     12 // diverges from what codesourcery ARM/gcc does!
     13 //
     14 // Tests that reloc to .L.str* show up as explicit symbols
     15 
     16 	movw	r1, :lower16:.L.str
     17 	movt	r1, :upper16:.L.str
     18 
     19 	.section	.rodata,"a",%progbits
     20 .L.str:
     21 	.asciz	"@null\n"
     22 
     23 // OBJ:      Relocations [
     24 // OBJ:        Section {{.*}} .rel.text {
     25 // OBJ-NEXT:     0x{{[0-9,A-F]+}} R_ARM_MOVW_ABS_NC .L.str
     26 // OBJ:        }
     27 // OBJ:      ]
     28