Skip to content

Commit 8f56d4d

Browse files
author
Roy Sundahl
committed
[sanitizers] Simplify Explainer about dyld and weak overrides on Darwin. (NFC)
Presenting more than one way to satisfy the single-weak-ref requirement leads to confusing messaging for the end user. Use the introduction of a single unused weak variable as the preferred solution. This differential modifies D146745. rdar://103453678 Reviewed By: yln, thetruestblue Differential Revision: https://reviews.llvm.org/D147526 (cherry picked from commit 5f17ba1)
1 parent 6bc3cb2 commit 8f56d4d

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

llvm/docs/ReleaseNotes.rst

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -186,16 +186,14 @@ Changes to Sanitizers
186186
only consider symbols in other mach-o modules which themselves contain at
187187
least one weak symbol. A consequence is that if your program or dylib contains
188188
an intended override of a weak symbol, then it must contain at least one weak
189-
symbol as well for the override to be effective. That weak symbol may be the
190-
intended override itself, an otherwise usused weak symbol added solely to meet
191-
the requirement, or an existing but unrelated weak symbol.
192-
193-
Examples:
194-
__attribute__((weak)) const char * __asan_default_options(void) {...}
189+
symbol as well for the override to take effect.
195190

191+
Example:
192+
// Add this to make sure your override takes effect
196193
__attribute__((weak,unused)) unsigned __enableOverrides;
197-
198-
__attribute__((weak)) bool unrelatedWeakFlag;
194+
195+
// Example override
196+
extern "C" const char *__asan_default_options() { ... }
199197
200198

201199
Other Changes

0 commit comments

Comments
 (0)