diff options
| author | Fangrui Song <i@maskray.me> | 2021-03-01 13:43:23 -0800 |
|---|---|---|
| committer | Fangrui Song <i@maskray.me> | 2021-03-01 13:43:23 -0800 |
| commit | 04c3040f417683e7c31b3ee3381a3263106f48c5 (patch) | |
| tree | d55a29f805894517702e45b07b00ae6d9c4cd6a1 /lldb/test/API/functionalities/scripted_process/TestScriptedProcess.py | |
| parent | 5a9c34918bb1526b7e8c29aa5e4fb8d8e27e27b4 (diff) | |
[InstrProfiling] Place __llvm_prf_vnodes and __llvm_prf_names in llvm.used on ELF
`__llvm_prf_vnodes` and `__llvm_prf_names` are used by runtime but not
referenced via relocation in the translation unit.
With `-z start-stop-gc` (D96914 https://sourceware.org/bugzilla/show_bug.cgi?id=27451),
the linker no longer lets `__start_/__stop_` references retain them.
Place `__llvm_prf_vnodes` and `__llvm_prf_names` in `llvm.used` to make
them retained by the linker.
This patch changes most existing `UsedVars` cases to `CompilerUsedVars`
to reflect the ideal state - if the binary format properly supports
section based GC (dead stripping), `llvm.compiler.used` should be sufficient.
`__llvm_prf_vnodes` and `__llvm_prf_names` are switched to `UsedVars`
since we want them to be unconditionally retained by both compiler and linker.
Behaviors on other COFF/Mach-O are not affected.
Differential Revision: https://reviews.llvm.org/D97649
Diffstat (limited to 'lldb/test/API/functionalities/scripted_process/TestScriptedProcess.py')
0 files changed, 0 insertions, 0 deletions
