mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-21 04:42:53 +08:00
fb7331ae2b
Demonstrates a reason to use IR symbols when deciding an --as-needed library should be loaded. * testsuite/ld-plugin/lto-18a.c, * testsuite/ld-plugin/lto-18b.c, * testsuite/ld-plugin/lto-18c.c, * testsuite/ld-plugin/lto-18d.c, * testsuite/ld-plugin/lto-18.out: New test. * testsuite/ld-plugin/lto.exp: Run it.
23 lines
319 B
C
23 lines
319 B
C
#include <stdio.h>
|
|
|
|
extern int select ();
|
|
extern int f1 (int);
|
|
extern int f2 (int);
|
|
|
|
int main (void)
|
|
{
|
|
switch (select ())
|
|
{
|
|
case 1:
|
|
printf ("%d\n", f1 (3));
|
|
break;
|
|
case 2:
|
|
printf ("%d\n", f2 (4));
|
|
break;
|
|
default:
|
|
printf ("%d\n", f2 (0));
|
|
break;
|
|
}
|
|
return 0;
|
|
}
|