libabigail/tests/data/test-read-dwarf/test6.cc
Sinny Kumari fe6b9fb61b Consider symbols with STB_GNU_UNIQUE binding as public
* src/abg-ir.cc (is_public): Change in function to consider
	symbols with STB_GNU_UNIQUE binding as public
	* tests/data/test-read-dwarf/test6.cc: Test file to generate
	STB_GNU_UNIQUE binding symbols
	* tests/data/test-read-dwarf/test6.so: Test shared library having
	STB_GNU_UNIQUE binding symbols
	* tests/data/test-read-dwarf/test6.so.abi: XML file containing
	dwarf information from test6.so
	* tests/test-read-dwarf.cc (in_out_specs): Add the new test above
	* tests/Makefile.am: Add tests/data/test-read-dwarf/test6.cc,
	tests/data/test-read-dwarf/test6.so and
	tests/data/test-read-dwarf/test6.so.abi to the distribution

Signed-off-by: Sinny Kumari <skumari@redhat.com>
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2014-07-08 14:18:36 +02:00

39 lines
409 B
C++

// Test for crating symbols having binding STB_GNU_UNIQUE
// build with g++ -fPIC -g -Wall -shared -o test6.so test6.cc
struct A
{
int i;
};
struct B
{
int foo()
{
static A a;
return a.i;
}
};
int
bar()
{
B b;
return b.foo();
}
template<typename T>
struct C
{
static T bar;
};
template<typename T> T C<T>::bar = T();
int
bleh()
{
C<int> c;
return c.bar;
}