2013-04-12 04:06:46 +00:00
|
|
|
// RUN: llvm-mc -g -triple i686-pc-linux-gnu %s -filetype=obj -o - | llvm-readobj -r | FileCheck %s
|
2012-02-28 21:13:05 +00:00
|
|
|
|
|
|
|
|
2012-11-14 09:55:38 +00:00
|
|
|
// Test that on ELF:
|
|
|
|
// 1. the debug info has a relocation to debug_abbrev and one to to debug_line.
|
|
|
|
// 2. the debug_aranges has relocations to text and debug_line.
|
2012-02-28 21:13:05 +00:00
|
|
|
|
|
|
|
|
|
|
|
.text
|
|
|
|
.globl foo
|
|
|
|
.type foo, @function
|
|
|
|
.align 4
|
|
|
|
foo:
|
|
|
|
ret
|
|
|
|
.size foo, .-foo
|
|
|
|
|
2013-04-12 04:06:46 +00:00
|
|
|
// CHECK: Relocations [
|
2013-05-30 03:05:14 +00:00
|
|
|
// CHECK: Section ({{[^ ]+}}) .rel.debug_info {
|
2013-04-12 04:06:46 +00:00
|
|
|
// CHECK-NEXT: 0x6 R_386_32 .debug_abbrev 0x0
|
|
|
|
// CHECK-NEXT: 0xC R_386_32 .debug_line 0x0
|
|
|
|
// CHECK: }
|
2013-05-30 03:05:14 +00:00
|
|
|
// CHECK-NEXT: Section ({{[^ ]+}}) .rel.debug_aranges {
|
2013-04-12 04:06:46 +00:00
|
|
|
// CHECK-NEXT: 0x6 R_386_32 .debug_info 0x0
|
|
|
|
// CHECK-NEXT: 0x10 R_386_32 .text 0x0
|
|
|
|
// CHECK-NEXT: }
|
|
|
|
// CHECK-NEXT: ]
|