[all-commits] [llvm/llvm-project] 6c8933: [BOLT] Skip PLT search for zero-value weak referen...
sinan via All-commits
all-commits at lists.llvm.org
Wed Aug 7 03:03:05 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 6c8933e1a095028d648a5a26aecee0f569304dd0
https://github.com/llvm/llvm-project/commit/6c8933e1a095028d648a5a26aecee0f569304dd0
Author: sinan <sinan.lin at linux.alibaba.com>
Date: 2024-08-07 (Wed, 07 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.
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