2 # RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t.o
3 # RUN: ld.lld %t.o -o %t --export-dynamic
4 # RUN: llvm-readelf -r --dyn-syms --hex-dump=.data %t | \
5 # RUN: FileCheck %s --check-prefixes=NORELOC,COMMON
7 # NORELOC: There are no relocations in this file.
9 # RUN: llvm-mc -filetype=obj -triple=x86_64 %p/Inputs/dummy-shared.s -o %t1.o
10 # RUN: ld.lld %t1.o -shared -o %t1.so
11 # RUN: ld.lld %t.o -o %t %t1.so -pie
12 # RUN: llvm-readelf -r --dyn-syms --hex-dump=.data %t | \
13 # RUN: FileCheck %s --check-prefixes=RELOC,COMMON
15 # RELOC: Relocation section '.rela.dyn' at offset {{.*}} contains 1 entries:
16 # RELOC-NEXT: Offset Info Type Symbol's Value Symbol's Name + Addend
17 # RELOC-NEXT: {{.*}} 0000000100000001 R_X86_64_64 0000000000000000 foo + 0
19 # NORELOC-NOT: Symbol table '.dynsym'
20 # RELOC: Symbol table '.dynsym' contains 2 entries:
21 # RELOC-NEXT: Num: Value Size Type Bind Vis Ndx Name
22 # RELOC-NEXT: 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND
23 # RELOC-NEXT: 1: 0000000000000000 0 NOTYPE WEAK DEFAULT UND foo
24 # COMMON: Hex dump of section '.data':
25 # COMMON-NEXT: {{.*}} 00000000 00000000