2013-04-12 04:06:46 +00:00
|
|
|
// RUN: llvm-mc -filetype=obj -triple i386-pc-linux-gnu %s -o - | llvm-readobj -s -sd | FileCheck %s
|
2010-10-20 16:46:08 +00:00
|
|
|
|
|
|
|
// We test that _GLOBAL_OFFSET_TABLE_ will account for the two bytes at the
|
2011-07-20 19:36:11 +00:00
|
|
|
// start of the addl/leal.
|
2010-10-20 16:46:08 +00:00
|
|
|
|
|
|
|
addl $_GLOBAL_OFFSET_TABLE_, %ebx
|
2011-07-20 19:36:11 +00:00
|
|
|
leal _GLOBAL_OFFSET_TABLE_(%ebx), %ebx
|
2010-10-20 16:46:08 +00:00
|
|
|
|
2011-12-10 02:28:43 +00:00
|
|
|
// But not in this case
|
|
|
|
foo:
|
|
|
|
addl _GLOBAL_OFFSET_TABLE_-foo,%ebx
|
|
|
|
|
2013-04-12 04:06:46 +00: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: }
|