preload.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /*
  2. * Copyright (C) 2015 John Crispin <blogic@openwrt.org>
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU Lesser General Public License version 2.1
  6. * as published by the Free Software Foundation
  7. *
  8. * This program is distributed in the hope that it will be useful,
  9. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. * GNU General Public License for more details.
  12. */
  13. #include <link.h>
  14. #ifndef __unbounded
  15. #define __unbounded
  16. #endif
  17. #ifndef attribute_unused
  18. #define attribute_unused __attribute__ ((unused))
  19. #endif
  20. typedef int (*main_t)(int, char **, char **);
  21. typedef int (*start_main_t)(main_t main, int, char *__unbounded *__unbounded,
  22. ElfW(auxv_t) *,
  23. __typeof (main),
  24. void (*fini) (void),
  25. void (*rtld_fini) (void),
  26. void *__unbounded stack_end);
  27. int __libc_start_main(main_t main,
  28. int argc,
  29. char **argv,
  30. ElfW(auxv_t) *auxvec,
  31. __typeof (main) init,
  32. void (*fini) (void),
  33. void (*rtld_fini) (void),
  34. void *stack_end);
  35. typedef void (*uClibc_main)(main_t main,
  36. int argc,
  37. char **argv,
  38. void (*app_init)(void),
  39. void (*app_fini)(void),
  40. void (*rtld_fini)(void),
  41. void *stack_end attribute_unused);
  42. void __uClibc_main(main_t main,
  43. int argc,
  44. char **argv,
  45. void (*app_init)(void),
  46. void (*app_fini)(void),
  47. void (*rtld_fini)(void),
  48. void *stack_end attribute_unused);