File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed
Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -1699,9 +1699,19 @@ bool BinaryFunction::scanExternalRefs() {
16991699
17001700 const uint64_t FunctionOffset =
17011701 TargetAddress - TargetFunction->getAddress ();
1702- BranchTargetSymbol =
1703- FunctionOffset ? TargetFunction->addEntryPointAtOffset (FunctionOffset)
1704- : TargetFunction->getSymbol ();
1702+ if (!TargetFunction->isInConstantIsland (TargetAddress)) {
1703+ BranchTargetSymbol =
1704+ FunctionOffset ? TargetFunction->addEntryPointAtOffset (FunctionOffset)
1705+ : TargetFunction->getSymbol ();
1706+ } else {
1707+ TargetFunction->setIgnored ();
1708+ Success = false ;
1709+ BC.outs () << " BOLT-WARNING: Ignoring entry point at address 0x"
1710+ << Twine::utohexstr (Address)
1711+ << " in constant island of function " << *TargetFunction
1712+ << ' \n ' ;
1713+ break ;
1714+ }
17051715 }
17061716
17071717 // Can't find more references. Not creating relocations since we are not
Original file line number Diff line number Diff line change 44# RUN: llvm-mc -filetype=obj -triple aarch64-unknown-unknown %s -o %t.o
55# RUN: %clang %cflags %t.o -pie -Wl,-q -o %t.exe
66# RUN: llvm-bolt %t.exe -o %t.bolt 2>&1 | FileCheck %s
7+ # RUN: llvm-bolt %t.exe -o %t.bolt -skip-funcs=caller 2>&1 | FileCheck %s
78
89# CHECK: BOLT-WARNING: Ignoring entry point at address 0x{{[0-9a-f]+}} in constant island of function func
910
You can’t perform that action at this time.
0 commit comments