(root)/
binutils-2.41/
ld/
testsuite/
ld-elf/
pr21964-1c.c
       1  #include <stdio.h>
       2  
       3  extern int foo1 (void);
       4  extern int foo2 (void);
       5  
       6  extern int __start___verbose[];
       7  extern int __stop___verbose[];
       8  static int my_var __attribute__((used, section("__verbose"))) = 6;
       9  int
      10  bar (void)
      11  {
      12    if (& __start___verbose[0] == & __stop___verbose[0])
      13      return -1;
      14  
      15    if (__start___verbose[0] != 6)
      16      return -2;
      17    else
      18      return 0;
      19  }
      20  
      21  int
      22  main ()
      23  {
      24    if (bar () == 0
      25        && foo1 () == 0
      26        && foo2 () == 0)
      27      printf ("PASS\n");
      28    return 0;
      29  }