1 # RUN: yaml2obj --docnum=1 %s -o %t1
2 # RUN: llvm-objcopy %t1 %t2
3 # RUN: llvm-readobj --relocations %t2 | FileCheck %s
14 Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
16 AddressAlign: 0x0000000000000010
17 Content: "0000000000000000"
23 Type: R_X86_64_RELATIVE
25 # CHECK: Relocations [
26 # CHECK-NEXT: Section (2) .rel.text {
27 # CHECK-NEXT: 0x1000 R_X86_64_RELATIVE -
31 ## Check we produce a valid output when stripping unneeded symbols from an object that
32 ## has a symbol table and a relocation with a symbol index of 0.
34 # RUN: yaml2obj --docnum=2 %s -o %t3
35 # RUN: llvm-objcopy --strip-unneeded %t3 %t4
36 # RUN: llvm-readobj --relocations --sections --symbols %t4 | FileCheck %s --check-prefix=STRIP
38 # STRIP: Relocations [
39 # STRIP-NEXT: Section {{.*}} .rel.text {
40 # STRIP-NEXT: 0x1000 R_X86_64_NONE -
43 # STRIP-NEXT: Symbols [
44 # STRIP-NEXT: Symbol {
45 # STRIP-NEXT: Name: (0)
46 # STRIP-NEXT: Value: 0x0
48 # STRIP-NEXT: Binding: Local (0x0)
49 # STRIP-NEXT: Type: None (0x0)
50 # STRIP-NEXT: Other: 0
51 # STRIP-NEXT: Section: Undefined (0x0)