~ubuntu-branches/ubuntu/utopic/binutils-arm64-cross/utopic

« back to all changes in this revision

Viewing changes to binutils-2.23.52.20130611/ld/testsuite/ld-selective/4.cc

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2013-06-20 17:38:09 UTC
  • Revision ID: package-import@ubuntu.com-20130620173809-app8lzgvymy5fg6c
Tags: 0.7
Build-depend on binutils-source (>= 2.23.52.20130620-1~).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
struct A
 
2
{
 
3
  virtual void foo();
 
4
  virtual void bar();
 
5
};
 
6
 
 
7
void A::foo() { }                       // lose
 
8
void A::bar() { }                       // keep
 
9
 
 
10
struct B : public A
 
11
{
 
12
  virtual void foo();
 
13
};
 
14
 
 
15
void B::foo() { }                       // lose
 
16
 
 
17
void _start() __asm__("_start");        // keep
 
18
void start() __asm__("start"); // some toolchains use this name.
 
19
 
 
20
A a;                                    // keep
 
21
B b;
 
22
A *getme() { return &a; }               // keep
 
23
 
 
24
void _start()
 
25
{
 
26
  getme()->bar();
 
27
}
 
28
 
 
29
void start ()
 
30
{
 
31
  _start ();
 
32
}
 
33
 
 
34
extern "C" void __main() { }