llvm-capstone/compiler-rt
Fangrui Song 87c43f3aa9 [InstrProfiling] Delete linkage/visibility toggling for Windows
The linkage/visibility of `__profn_*` variables are derived
from the profiled functions.

    extern_weak => linkonce
    available_externally => linkonce_odr
    internal => private
    extern => private
    _ => unchanged

The linkage/visibility of `__profc_*`/`__profd_*` variables are derived from
`__profn_*` with linkage/visibility wrestling for Windows.

The changes can be folded to the following without changing semantics.

```
if (TT.isOSBinFormatCOFF() && !NeedComdat) {
  Linkage = GlobalValue::InternalLinkage;
  Visibility = GlobalValue::DefaultVisibility;
}
```

That said, I think we can just delete the code block.

An extern/internal function will now use private `__profc_*`/`__profd_*`
variables, instead of internal ones. This saves some symbol table entries.

A non-comdat {linkonce,weak}_odr function will now use hidden external
`__profc_*`/`__profd_*` variables instead of internal ones.  There is potential
object file size increase because such symbols need `/INCLUDE:` directives.
However such non-comdat functions are rare (note that non-comdat weak
definitions don't prevent duplicate definition error).

The behavior changes match ELF.

Reviewed By: rnk

Differential Revision: https://reviews.llvm.org/D103355
2021-06-02 16:49:54 -07:00
..
cmake Revert "[scudo] Build scudo_standalone on Android and Fuchsia." 2021-05-26 16:52:13 -07:00
docs
include [dfsan] Add function that prints origin stack trace to buffer 2021-05-24 11:09:03 -07:00
lib [NFC][msan] Fix assigned-unused warning 2021-06-02 00:09:02 -07:00
test [InstrProfiling] Delete linkage/visibility toggling for Windows 2021-06-02 16:49:54 -07:00
tools [GWP-ASan] Add inbuilt options parser. 2021-01-15 12:57:05 -08:00
unittests [sanitizer] Use COMPILER_RT_EMULATOR with gtests 2021-04-25 15:41:13 -07:00
utils [compiler-rt] [netbsd] Update generate_netbsd_syscalls.awk 2020-09-10 20:16:17 +02:00
www [Branch-Rename] Fix some links 2021-02-01 16:43:21 +05:30
.clang-tidy [NFC][compiler-rt] Refine .clang-tidy checks 2020-09-05 15:42:15 -07:00
.gitignore
CMakeLists.txt [sanitizer] Android ELF TLS is supported from Q (API 29) 2021-05-27 14:53:49 -07:00
CODE_OWNERS.TXT
CREDITS.TXT
LICENSE.TXT Fix typos throughout the license files that somehow I and my reviewers 2019-01-21 09:52:34 +00:00
README.txt

Compiler-RT
================================

This directory and its subdirectories contain source code for the compiler
support routines.

Compiler-RT is open source software. You may freely distribute it under the
terms of the license agreement found in LICENSE.txt.

================================