BlackBox1.c 541 B

123456789101112131415161718192021222324
  1. #include <stdio.h>
  2. // extern void SetKernelBaseStack (int);
  3. extern void Init (void);
  4. int main (int argc, char *argv[])
  5. {
  6. // int res;
  7. // printf("START\n");
  8. /* 2012.09.02: This is from oberoncore.ru
  9. 2012.09.05: not required in case of static linking of shared library (-lBB) */
  10. // asm ("movl %%esp, %[res]" : [res] "=m" (res) );
  11. // SetKernelBaseStack(res - 8);
  12. // printf("SetKernelBaseStack(0x%02x): done\n", res - 8);
  13. // <return adr> <caller ebp> -> base stack = locals of main proc
  14. Init();
  15. // printf("END\n");
  16. return 0;
  17. }