(root)/
binutils-2.41/
ld/
testsuite/
ld-x86-64/
protected-func-1b.c
       1  #include <stdio.h>
       2  
       3  #include "protected-func-1.h"
       4  
       5  int
       6  protected_func_1b (void)
       7  {
       8    return 3;
       9  }
      10  
      11  int
      12  main (void)
      13  {
      14    int res = 0;
      15  
      16    /* Check if we get the same address for the protected function symbol.  */
      17    if (protected_func_1a != protected_func_1a_p ())
      18      {
      19        puts ("'protected_func_1a' in main and shared library doesn't have same address");
      20        res = 1;
      21      }
      22  
      23    /* Check if we get the different addresses for the protected function
      24       symbol.  */
      25    if (protected_func_1b == protected_func_1b_p ())
      26      {
      27        puts ("'protected_func_1b' in main and shared library has same address");
      28        res = 1;
      29      }
      30  
      31    if (!res)
      32      puts ("PASS");
      33  
      34    return res;
      35  }