summaryrefslogtreecommitdiff
path: root/regress/libexec/ld.so/dlopen/libab/ab.C
blob: f9e3ef719aa79f324630089dab431ad277c13116 (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
36
/*
 * Public Domain 2003 Dale Rahn
 *
 * $OpenBSD: ab.C,v 1.4 2005/09/19 18:39:37 deraadt Exp $
 */

#include <iostream>
#include <stdlib.h>
#include <string.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");