bfd/
[binutils.git] / ld / testsuite / ld-selective / 5.cc
blob2c974d99f992678a9f0d6407af32b6827f9cf4c0
1 struct A
3 virtual void foo();
4 virtual void bar();
5 };
7 void A::foo() { } // lose
8 void A::bar() { } // keep
10 struct B : public A
12 virtual void foo();
15 void B::foo() { } // lose
17 void _start() __asm__("_start"); // keep
18 void start() __asm__("start"); // some toolchains use this name.
20 A a; // keep
21 B b;
22 A *getme() { return &a; } // keep
24 extern B* dropme2();
25 void dropme1() { dropme2()->foo(); } // lose
26 B *dropme2() { return &b; } // lose
28 void _start()
30 getme()->bar();
33 void start ()
35 _start ();
38 extern "C" void __main() { }