summaryrefslogtreecommitdiff
path: root/regress/libexec/ld.so/dlopen/libab/ab.C
blob: c0183fd0fc7d1fd9794b9864edb0921d578716b2 (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
33
34
35
/*
 * Public Domain 2003 Dale Rahn
 *
 * $OpenBSD: ab.C,v 1.3 2005/09/18 19:58:50 drahn Exp $
 */

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

char strbuf[512];

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

extern "C" char *
lib_entry()
{
	strlcpy(strbuf, libname, sizeof strbuf);
	strlcat(strbuf, ":", sizeof strbuf);
	strlcat(strbuf, "ab", sizeof strbuf);
	return strbuf;
	std::cout << "called into ab " << libname << " libname " << "\n";
}

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

BB::~BB()
{
}
BB ab("local");