mirror of
git://sourceware.org/git/libabigail.git
synced 2024-12-23 18:22:08 +00:00
fe6b9fb61b
* 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>
39 lines
409 B
C++
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;
|
|
}
|