[all-commits] [llvm/llvm-project] 833d4d: [profile] Make {__start_, __stop_}__llvm_prf_* symb...
Fangrui Song via All-commits
all-commits at lists.llvm.org
Wed Feb 17 23:33:40 PST 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 833d4d8e89e93636e904c3aa52a6c9c8d2ca098f
https://github.com/llvm/llvm-project/commit/833d4d8e89e93636e904c3aa52a6c9c8d2ca098f
Author: Fangrui Song <i at maskray.me>
Date: 2021-02-17 (Wed, 17 Feb 2021)
Changed paths:
M compiler-rt/lib/profile/InstrProfilingPlatformLinux.c
Log Message:
-----------
[profile] Make {__start_,__stop_}__llvm_prf_* symbols undefined weak
To make a kind of metadata section usage work, we want to drop the
`__start_/__stop_ references retain C identifier name sections` rule from LLD (see D96914).
If an application has no `__llvm_prf_data` input section surviving --gc-sections,
LLD will error for undefined hidden `{__start_,__stop_}__llvm_prf_*` from `libclang_rt.profile-*`.
Other `__llvm_prf_*` sections have similar issues.
Making the references weak can address the problem.
This probably enables the opportunity to drop zero size dummy sections in `InstrProfilingPlatformLinux.c`.
Reviewed By: davidxl
Differential Revision: https://reviews.llvm.org/D96936
More information about the All-commits
mailing list