extern int shared_data;
extern int shared_func ();
extern int * shared_data_p ();
extern void shared_data_change (int);
extern void * shared_func_p ();

int main()
{
  int ret = 0;
  if (&shared_data != shared_data_p ())
    {
      printf ("Data address: %p != Data address from DSO: %p\n",
	      &shared_data, shared_data_p ());
      ret = 1;
    }
  if (shared_func != shared_func_p ())
    {
      printf ("Function address: %p !=  Function address from DSO: %p\n",
	      shared_func, shared_func_p ());
      ret = 1;
    }
  if (shared_data != *shared_data_p ())
    {
      printf ("Data: %i != Data from DSO: %i \n",
	      shared_data, *shared_data_p ());
      ret = 1;
    }
  shared_data_change (10);
  if (shared_data != *shared_data_p ())
    {
      printf ("Data: %i != Data from DSO: %i \n",
	      shared_data, *shared_data_p ());
      ret = 1;
    }

  return ret;
}
