This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
RFA: Fix selective[456] linker tests for sh-elf (and others?)
- From: Joern Rennecke <joern dot rennecke at superh dot com>
- To: binutils at sources dot redhat dot com
- Date: Tue, 29 Apr 2003 18:53:44 +0100
- Subject: RFA: Fix selective[456] linker tests for sh-elf (and others?)
- Organization: SuperH UK Ltd.
sh-elf uses "start" as the start symbol - without
an underscore prepended.
--
--------------------------
SuperH (UK) Ltd.
2410 Aztec West / Almondsbury / BRISTOL / BS32 4QX
T:+44 1454 465658
2003-04-29 J"orn Rennecke <joern dot rennecke at superh dot com>
* ld-selective/3.cc (start): New function.
* ld-selective/4.cc: Likewise.
* ld-selective/5.cc: Likewise.
Index: ld-selective/3.cc
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-selective/3.cc,v
retrieving revision 1.2
diff -p -r1.2 3.cc
*** ld-selective/3.cc 12 Apr 2000 12:55:06 -0000 1.2
--- ld-selective/3.cc 29 Apr 2003 17:13:56 -0000
*************** struct B : public A
*** 14,20 ****
void B::foo() { } // keep
! void _start() __asm__("_start"); // keep
A a; // keep
B b;
--- 14,21 ----
void B::foo() { } // keep
! void _start() __asm__("_start"); // keep
! void start() __asm__("start"); // some toolchains use this name.
A a; // keep
B b;
*************** void _start()
*** 30,35 ****
--- 31,41 ----
b.foo();
#endif
#endif
+ }
+
+ void start ()
+ {
+ _start ();
}
// In addition, keep A's virtual table.
Index: ld-selective/4.cc
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-selective/4.cc,v
retrieving revision 1.2
diff -p -r1.2 4.cc
*** ld-selective/4.cc 28 Sep 2000 22:57:26 -0000 1.2
--- ld-selective/4.cc 29 Apr 2003 17:13:56 -0000
*************** struct B : public A
*** 15,20 ****
--- 15,21 ----
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
*** 23,28 ****
--- 24,34 ----
void _start()
{
getme()->bar();
+ }
+
+ void start ()
+ {
+ _start ();
}
extern "C" void __main() { }
Index: ld-selective/5.cc
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-selective/5.cc,v
retrieving revision 1.3
diff -p -r1.3 5.cc
*** ld-selective/5.cc 28 Sep 2000 22:57:26 -0000 1.3
--- ld-selective/5.cc 29 Apr 2003 17:13:56 -0000
*************** struct B : public A
*** 15,20 ****
--- 15,21 ----
void B::foo() { } // lose
void _start() __asm__("_start"); // keep
+ void start() __asm__("start"); // some toolchains use this name.
A a; // keep
B b;
*************** B *dropme2() { return &b; } // lose
*** 27,32 ****
--- 28,38 ----
void _start()
{
getme()->bar();
+ }
+
+ void start ()
+ {
+ _start ();
}
extern "C" void __main() { }