1 # Check that secondary entry points are updated correctly in the ELF symtab
3 RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown \
4 RUN: %p/Inputs/user-order.S -o %t.o
5 RUN: ld.lld %t.o --emit-relocs --nostdlib -o %t.exe
6 RUN: llvm-bolt %t.exe -o %t --reorder-functions=user \
7 RUN: --function-order=%p/Inputs/order.txt
9 RUN: llvm-readelf -Ws %t | cut -d':' -f2- | sort -u | FileCheck %s
11 CHECK: [[#]] FUNC GLOBAL DEFAULT [[#NDX:]] _start
12 CHECK: [[#]] FUNC GLOBAL DEFAULT [[#NDX]] main
13 CHECK: [[#]] FUNC LOCAL DEFAULT [[#NDX]] _a
14 CHECK: [[#]] FUNC GLOBAL DEFAULT [[#NDX]] _b
15 CHECK: [[#]] FUNC GLOBAL DEFAULT [[#NDX]] _f
16 # The following are all secondary entries of _f
17 CHECK: 0 FUNC GLOBAL DEFAULT [[#NDX]] _c
18 CHECK: 0 FUNC GLOBAL DEFAULT [[#NDX]] _d
19 CHECK: 0 FUNC GLOBAL DEFAULT [[#NDX]] _e