mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-18 14:53:32 +08:00
8dfb7cbf84
* testsuite/ld-elf/pr21964-1a.c (foo): Renamed to ... (foo1): This. * testsuite/ld-elf/pr21964-1b.c: Rewrite. * testsuite/ld-elf/pr21964-1c.c: New file. * testsuite/ld-elf/pr21964-2c.c: Likewise. * testsuite/ld-elf/pr21964-2a.c (foo): Renamed to ... (foo1): This. * testsuite/ld-elf/pr21964-2b.c: Rewrite. * testsuite/ld-elf/shared.exp: Update PR ld/21964 tests.
30 lines
463 B
C
30 lines
463 B
C
#include <stdio.h>
|
|
|
|
extern int foo1 (void);
|
|
extern int foo2 (void);
|
|
|
|
extern int __start___verbose[];
|
|
extern int __stop___verbose[];
|
|
static int my_var __attribute__((used, section("__verbose"))) = 6;
|
|
int
|
|
bar (void)
|
|
{
|
|
if (__start___verbose == __stop___verbose)
|
|
return -1;
|
|
|
|
if (__start___verbose[0] != 6)
|
|
return -2;
|
|
else
|
|
return 0;
|
|
}
|
|
|
|
int
|
|
main ()
|
|
{
|
|
if (bar () == 0
|
|
&& foo1 () == 0
|
|
&& foo2 () == 0)
|
|
printf ("PASS\n");
|
|
return 0;
|
|
}
|