reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced
    1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
// RUN: %clangxx_asan %s -o %t -Wl,--gc-sections -fuse-ld=lld -ffunction-sections -fdata-sections -mllvm -asan-globals=0
// RUN: %clangxx_asan %s -o %t -Wl,--gc-sections -fuse-ld=lld -ffunction-sections -fdata-sections -mllvm -asan-globals=1

// https://code.google.com/p/address-sanitizer/issues/detail?id=260
// REQUIRES: lld

int undefined();

// On i386 clang adds --export-dynamic when linking with ASan, which adds all
// non-hidden globals to GC roots.
__attribute__((visibility("hidden"))) int (*unused)() = undefined;

int main() {
        return 0;
}