Files
test/source/creator/symbols_unix.map
Jacques Lucke 86341ae826 Fix: ASAN build does not link
When building an ASAN build, I get this link error currently:
```
ld.lld: error: version script assignment of 'global' to symbol '__progname' failed: symbol not defined
ld.lld: error: version script assignment of 'global' to symbol 'environ' failed: symbol not defined
```

The solution (as proposed by Brecht) is to change the symbol names into patterns with a wildcard.
That way the linker does not fail when the symbols are not found.

Pull Request: https://projects.blender.org/blender/blender/pulls/137153
2025-04-08 17:13:59 +02:00

45 lines
830 B
Plaintext

/* Hide all symbols except a few required ones.
*
* Otherwise LLVM symbols conflict with Mesa llvm pipe, boost symbols conflict
* with Luxrender, etc. */
{
global:
/* Essential symbols for the program to start and exit. */
_fini;
_init;
/* Needed for Python modules to work. */
Py*;
_Py*;
/* Needed for sanitizers. Based on:
* llvm/compiler-rt/lib/sanitizer_common/scripts/gen_dynamic_list.py. */
__asan*;
__lsan*;
__tsan*;
__ubsan*;
__sanitizer*;
__Znw*;
__Zna*;
__Zdl*;
__Zda*;
aligned_alloc;
calloc*;
free;
mallinfo;
malloc*;
mallopt;
memalign;
memcpy;
posix_memalign;
pthread_*;
pvalloc;
realloc*;
realpath;
sched_*;
valloc;
/* Needed on FreeBSD. Uses wildcard to avoid linker error when symbols are not found. */
__progname*;
environ*;
local:
*;
};