// This test examines whether BOLT can correctly process when // dynamic relocation points to other entry points of the // function. # RUN: %clang %cflags -fPIC -pie %s -o %t.exe -nostdlib -Wl,-q # RUN: llvm-bolt %t.exe -o %t.bolt > %t.out.txt # RUN: llvm-readelf -r %t.bolt >> %t.out.txt # RUN: llvm-objdump --disassemble-symbols=chain,Label %t.bolt >> %t.out.txt # RUN: FileCheck %s --input-file=%t.out.txt ## Check if the new address in `chain` is correctly updated by BOLT # CHECK: Relocation section '.rela.dyn' at offset 0x{{.*}} contains 1 entries: # CHECK: {{.*}} R_X86_64_RELATIVE [[#%x,ADDR:]] # CHECK: