[all-commits] [llvm/llvm-project] 2e0782: [BOLT] Skip PLT search for zero-value weak referen...
sinan via All-commits
all-commits at lists.llvm.org
Sat Aug 10 03:07:13 PDT 2024
Branch: refs/heads/release/19.x
Home: https://github.com/llvm/llvm-project
Commit: 2e0782c4db0a1bde3edebac64830291517e16c80
https://github.com/llvm/llvm-project/commit/2e0782c4db0a1bde3edebac64830291517e16c80
Author: sinan <sinan.lin at linux.alibaba.com>
Date: 2024-08-10 (Sat, 10 Aug 2024)
Changed paths:
M bolt/lib/Rewrite/RewriteInstance.cpp
A bolt/test/AArch64/update-weak-reference-symbol.s
Log Message:
-----------
[BOLT] Skip PLT search for zero-value weak reference symbols (#69136)
Take a common weak reference pattern for example
```
__attribute__((weak)) void undef_weak_fun();
if (&undef_weak_fun)
undef_weak_fun();
```
In this case, an undefined weak symbol `undef_weak_fun` has an address
of zero, and Bolt incorrectly changes the relocation for the
corresponding symbol to symbol at PLT, leading to incorrect runtime
behavior.
(cherry picked from commit 6c8933e1a095028d648a5a26aecee0f569304dd0)
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list