summaryrefslogtreecommitdiff
path: root/regress/libexec/ld.so/dlopen/libab/ab.C
blob: 8995bf26ff86cedfb1ed08c2afb017e270dde239 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/*
 * Public Domain 2003 Dale Rahn
 *
 * $OpenBSD: ab.C,v 1.2 2005/09/13 21:03:46 drahn Exp $
 */

#include <iostream>
#include <stdlib.h>
#include "ab.h"

extern int a;

extern "C" {
char *libname = "libab";
};

extern "C" void
lib_entry()
{
	std::cout << "called into ab " << libname << " libname " << "\n";
}

BB::BB(char *str)
{
	_name = str;
}

BB::~BB()
{
	std::cout << "dtors BB " << _name << "\n";
}
BB ab("local");