vers9.c 553 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*
  2. * Testcase to verify that reference to foo@BAR and a definition of foo@@BAR
  3. * are not treated as a multiple def.
  4. */
  5. #include "vers.h"
  6. const char * bar1 = "asdf";
  7. const char * bar2 = "asdf";
  8. extern int old_foo1();
  9. int
  10. bar()
  11. {
  12. return 3;
  13. }
  14. int
  15. original_foo()
  16. {
  17. return 1+bar();
  18. }
  19. int
  20. old_foo()
  21. {
  22. return 10+bar();
  23. }
  24. int
  25. new_foo()
  26. {
  27. return 1000+bar();
  28. }
  29. int
  30. main()
  31. {
  32. old_foo1();
  33. return 0;
  34. }
  35. FUNC_SYMVER(original_foo, foo@);
  36. FUNC_SYMVER(old_foo, foo@VERS_1.1);
  37. FUNC_SYMVER(old_foo1, foo@VERS_1.2);
  38. FUNC_SYMVER(new_foo, foo@@VERS_1.2);