#include "namespace.h" #include #include #include #include "internal.h" #include "compat.h" #define VERSION "4.0" //HIDDEN __attribute__((visibility("hidden"))) int one = 1; __typeof(thyme) thyme__TEST_1 __attribute__((alias("__thyme00"))); __asm(".symver thyme__TEST_1,thyme@@TEST_1"); //EXPORT __attribute__((visibility("default"))) thyme_t thyme(thyme_t *p) { thyme_t t = (thyme_t)0x0123456789abcdefULL; if (p) *p = t; return t; } //HIDDEN __attribute__((visibility("hidden"))) long i(long y, long d) { printf("%s %s:%d i_long(%lx, %ld)\n", VERSION, __FILE__, __LINE__, y, d); return y + d; } //DEFAULTSYMVER(f,f__TEST_4,TEST_4) __typeof(f) f__TEST_4; __asm(".symver f__TEST_4,f@@TEST_4"); __attribute__((visibility("default"))) long f__TEST_4(long x) { printf("%s %s:%d f_long(%lx)\n", VERSION, __FILE__, __LINE__, x); return i(x << 8, one); } //HIDDEN __attribute__((visibility("hidden"))) long h(long x) { printf("%s %s:%d h_long(%lx)\n", VERSION, __FILE__, __LINE__, x); return x >> 8; } //EXPORT __attribute__((visibility("default"))) int g(int x) { printf("%s %s:%d g(%x)\n", VERSION, __FILE__, __LINE__, x); return h(f(x)); }