2013-04-12 06:06:46 +02:00
|
|
|
// RUN: llvm-mc -filetype=obj -triple i386-pc-linux-gnu %s -o - | llvm-readobj -s -sd | FileCheck %s
|
2010-10-20 18:46:08 +02:00
|
|
|
|
|
|
|
// We test that _GLOBAL_OFFSET_TABLE_ will account for the two bytes at the
|
2011-07-20 21:36:11 +02:00
|
|
|
// start of the addl/leal.
|
2010-10-20 18:46:08 +02:00
|
|
|
|
|
|
|
addl $_GLOBAL_OFFSET_TABLE_, %ebx
|
2011-07-20 21:36:11 +02:00
|
|
|
leal _GLOBAL_OFFSET_TABLE_(%ebx), %ebx
|
2010-10-20 18:46:08 +02:00
|
|
|
|
2011-12-10 03:28:43 +01:00
|
|
|
// But not in this case
|
|
|
|
foo:
|
|
|
|
addl _GLOBAL_OFFSET_TABLE_-foo,%ebx
|
|
|
|
|
2013-04-12 06:06:46 +02:00
|
|
|
// CHECK: Section {
|
|
|
|
// CHECK: Name: .text
|
|
|
|
// CHECK-NEXT: Type:
|
|
|
|
// CHECK-NEXT: Flags [
|
|
|
|
// CHECK: ]
|
|
|
|
// CHECK-NEXT: Address:
|
|
|
|
// CHECK-NEXT: Offset:
|
|
|
|
// CHECK-NEXT: Size:
|
|
|
|
// CHECK-NEXT: Link:
|
|
|
|
// CHECK-NEXT: Info:
|
|
|
|
// CHECK-NEXT: AddressAlignment:
|
|
|
|
// CHECK-NEXT: EntrySize:
|
|
|
|
// CHECK-NEXT: SectionData (
|
|
|
|
// CHECK-NEXT: 0000: 81C30200 00008D9B 02000000 031D0200
|
|
|
|
// CHECK-NEXT: 0010: 0000
|
|
|
|
// CHECK-NEXT: )
|
|
|
|
// CHECK-NEXT: }
|