crt.S 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /* Runtime ABI for the ARM Cortex-M0
  2. * crt.S: C runtime environment
  3. *
  4. * Copyright (c) 2012 Jörg Mische <bobbl@gmx.de>
  5. *
  6. * Permission to use, copy, modify, and/or distribute this software for any
  7. * purpose with or without fee is hereby granted, provided that the above
  8. * copyright notice and this permission notice appear in all copies.
  9. *
  10. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  11. * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  12. * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  13. * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  14. * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  15. * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
  16. * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  17. */
  18. .syntax unified
  19. .text
  20. .thumb
  21. @.cpu cortex-m0
  22. @ void exit(int status)
  23. @
  24. @ Exit from program: breakpoint 0
  25. @
  26. .thumb_func
  27. .global exit
  28. exit:
  29. bkpt #0
  30. @ void abort(void)
  31. @
  32. @ Abnormal program termination: breakpoint 1
  33. @
  34. .thumb_func
  35. .global abort
  36. abort:
  37. bkpt #1
  38. @ int __aeabi_idiv0(int r)
  39. @
  40. @ Handler for 32 bit division by zero
  41. @
  42. .thumb_func
  43. .global __aeabi_idiv0
  44. __aeabi_idiv0:
  45. @ long long __aeabi_ldiv0(long long r)
  46. @
  47. @ Handler for 64 bit division by zero
  48. @
  49. .thumb_func
  50. .global __aeabi_ldiv0
  51. __aeabi_ldiv0:
  52. bx lr