1// RUN: llvm-mc -filetype=obj -triple i386-pc-linux-gnu %s -o - | llvm-readobj -S --sd - | FileCheck %s 2 3// We test that _GLOBAL_OFFSET_TABLE_ will account for the two bytes at the 4// start of the addl/leal. 5 6 addl $_GLOBAL_OFFSET_TABLE_, %ebx 7 leal _GLOBAL_OFFSET_TABLE_(%ebx), %ebx 8 9// But not in this case 10foo: 11 addl _GLOBAL_OFFSET_TABLE_-foo,%ebx 12 13// CHECK: Section { 14// CHECK: Name: .text 15// CHECK-NEXT: Type: 16// CHECK-NEXT: Flags [ 17// CHECK: ] 18// CHECK-NEXT: Address: 19// CHECK-NEXT: Offset: 20// CHECK-NEXT: Size: 21// CHECK-NEXT: Link: 22// CHECK-NEXT: Info: 23// CHECK-NEXT: AddressAlignment: 24// CHECK-NEXT: EntrySize: 25// CHECK-NEXT: SectionData ( 26// CHECK-NEXT: 0000: 81C30200 00008D9B 02000000 031D0200 27// CHECK-NEXT: 0010: 0000 28// CHECK-NEXT: ) 29// CHECK-NEXT: } 30