1// RUN: llvm-mc -filetype=obj -triple i386-pc-linux-gnu %s -o - | elf-dump --dump-section-data | 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: ('sh_name', 0x00000005) # '.text' 14// CHECK-NEXT: ('sh_type', 15// CHECK-NEXT: ('sh_flags', 16// CHECK-NEXT: ('sh_addr', 17// CHECK-NEXT: ('sh_offset', 18// CHECK-NEXT: ('sh_size', 19// CHECK-NEXT: ('sh_link', 20// CHECK-NEXT: ('sh_info', 21// CHECK-NEXT: ('sh_addralign', 22// CHECK-NEXT: ('sh_entsize', 23// CHECK-NEXT: ('_section_data', '81c30200 00008d9b 02000000 031d0200 0000') 24