1 //===----------- dlclose-test-so.cc -----------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file is a part of AddressSanitizer, an address sanity checker.
12 // Regression test for
13 // http://code.google.com/p/address-sanitizer/issues/detail?id=19
14 //===----------------------------------------------------------------------===//
18 static int static_var
;
22 int *get_address_of_static_var() {
26 __attribute__((constructor
))
28 printf("%s: I am being dlopened\n", __FILE__
);
30 __attribute__((destructor
))
32 printf("%s: I am being dlclosed\n", __FILE__
);