mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-23 01:03:28 +08:00
5ad8914f65
* ld-selective/4.cc: Likewise. * ld-selective/5.cc: Likewise.
35 lines
456 B
C++
35 lines
456 B
C++
struct A
|
|
{
|
|
virtual void foo();
|
|
virtual void bar();
|
|
};
|
|
|
|
void A::foo() { } // lose
|
|
void A::bar() { } // keep
|
|
|
|
struct B : public A
|
|
{
|
|
virtual void foo();
|
|
};
|
|
|
|
void B::foo() { } // lose
|
|
|
|
void _start() __asm__("_start"); // keep
|
|
void start() __asm__("start"); // some toolchains use this name.
|
|
|
|
A a; // keep
|
|
B b;
|
|
A *getme() { return &a; } // keep
|
|
|
|
void _start()
|
|
{
|
|
getme()->bar();
|
|
}
|
|
|
|
void start ()
|
|
{
|
|
_start ();
|
|
}
|
|
|
|
extern "C" void __main() { }
|