old-cross-binutils/ld/testsuite/ld-selective/4.cc

35 lines
456 B
C++
Raw Normal View History

1999-05-03 07:29:11 +00:00
struct A
{
virtual void foo();
virtual void bar();
};
void A::foo() { } // lose
1999-05-03 07:29:11 +00:00
void A::bar() { } // keep
struct B : public A
{
virtual void foo();
};
void B::foo() { } // lose
1999-05-03 07:29:11 +00:00
void _start() __asm__("_start"); // keep
void start() __asm__("start"); // some toolchains use this name.
1999-05-03 07:29:11 +00:00
A a; // keep
B b;
A *getme() { return &a; } // keep
void _start()
{
getme()->bar();
}
void start ()
{
_start ();
}
1999-05-03 07:29:11 +00:00
extern "C" void __main() { }