aboutsummaryrefslogtreecommitdiff
path: root/test/MC/ELF/global-offset.s
blob: 8cc5dbb8d82241f70f05c75b785fdc781db07c4a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// RUN: llvm-mc -filetype=obj -triple i386-pc-linux-gnu %s -o - | elf-dump  --dump-section-data | FileCheck  %s

// We test that _GLOBAL_OFFSET_TABLE_ will account for the two bytes at the
// start of the addl/leal.

        addl    $_GLOBAL_OFFSET_TABLE_, %ebx
        leal    _GLOBAL_OFFSET_TABLE_(%ebx), %ebx

// CHECK:      ('sh_name', 0x00000005) # '.text'
// CHECK-NEXT: ('sh_type',
// CHECK-NEXT: ('sh_flags',
// CHECK-NEXT: ('sh_addr',
// CHECK-NEXT: ('sh_offset',
// CHECK-NEXT: ('sh_size',
// CHECK-NEXT: ('sh_link',
// CHECK-NEXT: ('sh_info',
// CHECK-NEXT: ('sh_addralign',
// CHECK-NEXT: ('sh_entsize',
// CHECK-NEXT: ('_section_data', '81c30200 00008d9b 02000000')