• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# RUN: yaml2obj %s -o %t
2
3## Check we do not skip zeroes blocks if have relocations pointed to these places.
4# RUN: llvm-objdump -D --reloc %t
5
6# CHECK:      0000000000000000 .rodata:
7# CHECK-NEXT:        0:       00 00   addb    %al, (%rax)
8# CHECK-NEXT:                 0000000000000000:  R_X86_64_64  *ABS*
9# CHECK-NEXT:        2:       00 00   addb    %al, (%rax)
10# CHECK-NEXT:        4:       00 00   addb    %al, (%rax)
11# CHECK-NEXT:        6:       00 00   addb    %al, (%rax)
12# CHECK-NEXT:        8:       00 00   addb    %al, (%rax)
13# CHECK-NEXT:                 0000000000000008:  R_X86_64_64  *ABS*
14# CHECK-NEXT:        a:       00 00   addb    %al, (%rax)
15# CHECK-NEXT:        c:       00 00   addb    %al, (%rax)
16# CHECK-NEXT:        e:       00 00   addb    %al, (%rax)
17
18## Check that without -reloc all zeroes would be omitted.
19# RUN: llvm-objdump -D %t | FileCheck %s --check-prefix=SKIP
20
21# SKIP:      0000000000000000 <.rodata>:
22# SKIP-NEXT:   ...
23# SKIP-EMPTY:
24# SKIP-NEXT: Disassembly of section .rela.rodata:
25
26--- !ELF
27FileHeader:
28  Class:           ELFCLASS64
29  Data:            ELFDATA2LSB
30  Type:            ET_REL
31  Machine:         EM_X86_64
32Sections:
33  - Name:            .rodata
34    Type:            SHT_PROGBITS
35    Flags:           [ SHF_ALLOC ]
36    AddressAlign:    0x0000000000000001
37    Content:         '00000000000000000000000000000000'
38  - Name:            .rela.rodata
39    Type:            SHT_RELA
40    Flags:           [ SHF_INFO_LINK ]
41    Link:            .symtab
42    AddressAlign:    0x0000000000000008
43    EntSize:         0x0000000000000018
44    Info:            .rodata
45    Relocations:
46      - Offset:          0x0000000000000000
47        Symbol:          x
48        Type:            R_X86_64_64
49      - Offset:          0x0000000000000008
50        Symbol:          x
51        Type:            R_X86_64_64
52Symbols:
53  - Name: x
54    Binding:         STB_GLOBAL
55