1 # Show that the value field is omitted if a symbol has no name or value, but is
2 # printed if one is present. Test for both static and dynamic relocation
5 # RUN: yaml2obj %s -o %t
6 # RUN: llvm-readelf --relocations --dyn-relocations %t | FileCheck %s
8 # CHECK: Relocation section '.rela.text' at offset {{.*}} contains 2 entries:
9 # CHECK-NEXT: Offset Info Type Symbol's Value Symbol's Name + Addend
10 # CHECK-NEXT: 0000000000000000 0000000000000000 R_X86_64_NONE 1
11 # CHECK-NEXT: 0000000000000000 0000000100000000 R_X86_64_NONE 0000000000000000 sym + 1
13 # CHECK: Relocation section '.rela.dyn' at offset {{.*}} contains 2 entries:
14 # CHECK-NEXT: Offset Info Type Symbol's Value Symbol's Name + Addend
15 # CHECK-NEXT: 0000000000000000 0000000000000000 R_X86_64_NONE 1
16 # CHECK-NEXT: 0000000000000000 0000000100000000 R_X86_64_NONE 0000000000000000 sym + 1
18 # CHECK: 'RELA' relocation section at offset {{.*}} contains 48 bytes:
19 # CHECK-NEXT: Offset Info Type Symbol's Value Symbol's Name + Addend
20 # CHECK-NEXT: 0000000000000000 0000000000000000 R_X86_64_NONE 1
21 # CHECK-NEXT: 0000000000000000 0000000100000000 R_X86_64_NONE 0000000000000000 sym + 1
23 # TODO: Add test for symbol with no name but with a value once yaml2obj allows
24 # referencing symbols with no name from relocations.