old-cross-binutils/ld/testsuite/ld-selective/4.cc
Catherine Moore 4b329e3518 * ld-selective: New directory with new files to test
selective linking.

       * lib/ld-lib.exp (ld_nm):  Strip leading underscore from $name.
1998-10-23 21:32:56 +00:00

28 lines
361 B
C++

struct A
{
virtual void foo();
virtual void bar();
};
void A::foo() { } // loose
void A::bar() { } // keep
struct B : public A
{
virtual void foo();
};
void B::foo() { } // loose
void _start() __asm__("_start"); // keep
A a; // keep
B b;
A *getme() { return &a; } // keep
void _start()
{
getme()->bar();
}
extern "C" void __main() { }