Changeset 2967 for trunk/kLdr/testcase/tst-3-ext.c
- Timestamp:
- Feb 13, 2007, 11:28:46 PM (18 years ago)
- File:
-
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/kLdr/testcase/tst-3-ext.c
r2965 r2967 2 2 /** @file 3 3 * 4 * kLdr - Dynamic Loader testcase no. 3, Driver.4 * kLdr - Dynamic Loader testcase no. 3, 2nd object module. 5 5 * 6 6 * Copyright (c) 2006 knut st. osmundsen <bird-kbuild-src@anduin.net> … … 28 28 #include "tst.h" 29 29 30 31 int g_i1 = 1; 32 int g_i2 = 2; 33 int *g_pi1 = &g_i1; 34 35 int Tst3Sub(int); 36 int (*g_pfnTst3Sub)(int) = &Tst3Sub; 37 38 char g_achBss[256]; 39 40 41 MY_EXPORT(int) Tst3(int iFortyTwo) 42 { 43 int rc; 44 45 if (iFortyTwo != 42) 46 return 0; 47 if (g_i1 != 1) 48 return 1; 49 if (g_i2 != 2) 50 return 2; 51 if (g_pi1 != &g_i1) 52 return 3; 53 if (g_pfnTst3Sub != &Tst3Sub) 54 return 4; 55 rc = Tst3Sub(iFortyTwo); 56 if (rc != g_pfnTst3Sub(iFortyTwo)) 57 return 5; 58 for (rc = 0; rc < sizeof(g_achBss); rc++) 59 if (g_achBss[rc]) 60 return 6; 61 if (g_achBss[0] || g_achBss[1] || g_achBss[255]) 62 return 7; 63 64 return 42; 65 } 66 30 extern int g_i1; 67 31 68 32 int Tst3Sub(int iFortyTwo) 69 33 { 70 return iFortyTwo * 11 ;34 return iFortyTwo * 11 * g_i1; 71 35 } 72 36
Note:
See TracChangeset
for help on using the changeset viewer.