llvm-project/bolt/test/X86/symtab-secondary-entries.test

18 lines
760 B
Plaintext

# Check that secondary entry points are updated correctly in the ELF symtab
RUN: %clang %p/Inputs/user-order.S -Wl,-q -o %t.exe -nostdlib
RUN: llvm-bolt %t.exe -o %t -reorder-functions=user \
RUN: -function-order=%p/Inputs/order.txt
RUN: llvm-readelf -Ws %t | cut -d':' -f2- | sort -u | FileCheck %s
CHECK: [[#]] FUNC GLOBAL DEFAULT [[#NDX:]] _start
CHECK: [[#]] FUNC GLOBAL DEFAULT [[#NDX]] main
CHECK: [[#]] FUNC LOCAL DEFAULT [[#NDX]] _a
CHECK: [[#]] FUNC GLOBAL DEFAULT [[#NDX]] _b
CHECK: [[#]] FUNC GLOBAL DEFAULT [[#NDX]] _f
# The following are all secondary entries of _f
CHECK: 0 FUNC GLOBAL DEFAULT [[#NDX]] _c
CHECK: 0 FUNC GLOBAL DEFAULT [[#NDX]] _d
CHECK: 0 FUNC GLOBAL DEFAULT [[#NDX]] _e