// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t
// RUN: lld -flavor gnu2 %t -o %t2
// RUN: llvm-objdump -t -d %t2 | FileCheck %s
// REQUIRES: x86


.section       .text,"ax",@progbits,unique,1
.global _start
_start:
  call lulz

.section       .text,"ax",@progbits,unique,2
.zero 4
.global lulz
lulz:

.global bar
.text
bar:
  movl $bar, %edx // R_X86_64_32

// R_X86_64_32
// CHECK: bar:
// CHECK:  11000: ba 00 10 01 00 movl $69632, %edx

// CHECK: e8 04 00 00 00  callq   4

// Also check that symbols match.
// CHECK: 0000000000011000         .text           00000000 bar

// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t
// RUN: lld -flavor gnu2 %t -o %t2
// RUN: llvm-objdump -d %t2 | FileCheck %s
// REQUIRES: x86


.section       .text,"ax",@progbits,unique,1
.global _start
_start:
  call lulz

.section       .text,"ax",@progbits,unique,2
.zero 4
.global lulz
lulz:
  nop

// CHECK: Disassembly of section .text:
// CHECK-NEXT: _start:
// CHECK-NEXT:   11000:  e8 04 00 00 00   callq 4
// CHECK-NEXT:   11005:

// CHECK:      lulz:
// CHECK-NEXT:   11009:  90  nop


.global bar
.section       .text2,"ax",@progbits
bar:
  movl $bar, %edx // R_X86_64_32

// FIXME: this would be far more self evident if llvm-objdump printed
// constants in hex.
// CHECK: Disassembly of section .text2:
// CHECK-NEXT: bar:
// CHECK-NEXT:  12000: {{.*}} movl $73728, %edx

Make this test a bit more robust in preparation to adding more cases.
Make this test a bit more robust in preparation to adding more cases.

The first test (call) is now the only test to use .text, which makes it
resistant to more tests being added.

llvm-objdump -d already prints the addresses of symbols. We can use that in the
tests.

git-svn-id: f6089bf0e6284f307027cef4f64114ee9ebb0424@247685 91177308-0d34-0410-b5e6-96231b3b80d8
