old-cross-binutils/ld/testsuite/ld-selective/2.c
Catherine Moore 4b329e3518 * ld-selective: New directory with new files to test
selective linking.

       * lib/ld-lib.exp (ld_nm):  Strip leading underscore from $name.
1998-10-23 21:32:56 +00:00

19 lines
288 B
C

/* Normally we should loose foo and keep _start and _init.
With -u foo, we should keep that as well. */
void _start() __asm__("_start");
void _start()
{
}
void __attribute__((section(".init")))
_init()
{
}
int foo() __asm__("foo");
int foo()
{
static int x = 1;
return x++;
}