From bd7c9df68b3a0d97e93d022cd55e94a86bd31dbe Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Tue, 11 Sep 2001 14:25:16 +0000 Subject: 2001-09-11 H.J. Lu * ld-elfweak/elfweak.exp (build_lib): Take a list of object files. (build_exec): Likewise. Add more tests and make some xfail. * ld-elfweak/dso.dsym: Support symbol versioning. * ld-elfweak/dsow.dsym: Likewise. * ld-elfweak/main1.c: New. * ld-elfweak/bar1a.c: Likewise. * ld-elfweak/bar1b.c: Likewise. * ld-elfweak/bar1c.c: Likewise. * ld-elfweak/foo1a.c: Likewise. * ld-elfweak/foo1b.c: Likewise. * ld-elfweak/dsodata.dsym: Likewise. * ld-elfweak/dsowdata.dsym: Likewise. * ld-elfweak/weakdata.dsym: Likewise. * ld-elfweak/strongcomm.sym: Likewise. * ld-elfweak/strongdata.sym: Likewise. * ld-elfweak/weakdata.dat: Likewise. * ld-elfweak/strongdata.dat: Likewise. --- ld/testsuite/ld-elfweak/main1.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 ld/testsuite/ld-elfweak/main1.c (limited to 'ld/testsuite/ld-elfweak/main1.c') diff --git a/ld/testsuite/ld-elfweak/main1.c b/ld/testsuite/ld-elfweak/main1.c new file mode 100644 index 0000000..8a897a2 --- /dev/null +++ b/ld/testsuite/ld-elfweak/main1.c @@ -0,0 +1,22 @@ +#include + +#pragma weak deallocate_foo +int deallocate_foo = 1; + +extern int * bar (); +extern int * foo (); +extern void abort (); + +int +main () +{ + if (&deallocate_foo != bar () || &deallocate_foo != foo ()) + abort (); + + if (deallocate_foo) + printf ("weak deallocate_foo\n"); + else + printf ("strong deallocate_foo\n"); + + return 0; +} -- cgit v1.1