mips.patch 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. diff -Nur uClibc-0.9.30.2.orig/libc/sysdeps/linux/mips/crt1.S uClibc-0.9.30.2/libc/sysdeps/linux/mips/crt1.S
  2. --- uClibc-0.9.30.2.orig/libc/sysdeps/linux/mips/crt1.S 2010-01-13 22:22:31.000000000 +0100
  3. +++ uClibc-0.9.30.2/libc/sysdeps/linux/mips/crt1.S 2010-01-24 20:33:06.297867491 +0100
  4. @@ -85,29 +85,10 @@
  5. __start:
  6. #ifdef __PIC__
  7. -#if _MIPS_SIM == _MIPS_SIM_ABI32
  8. - .frame sp, 24, sp
  9. - .set noreorder
  10. - move $0, $31 /* Save old ra. */
  11. - bal 10f /* Find addr of cpload. */
  12. - nop
  13. -10:
  14. - .cpload $31
  15. - move $31, $0
  16. - .set reorder
  17. - .cprestore 16
  18. -#else
  19. - move $0, $31; /* Save old ra. */
  20. - .set noreorder
  21. - bal 10f /* Find addr of .cpsetup. */
  22. - nop
  23. -10:
  24. - .set reorder
  25. - .cpsetup $31, $25, 10b
  26. - move $31, $0
  27. -#endif
  28. + SETUP_GPX($0)
  29. + SETUP_GPX64($25,$0)
  30. #else
  31. - la $28, _gp /* Setup GP correctly if we're non-PIC. */
  32. + PTR_LA $28, _gp /* Setup GP correctly if we're non-PIC. */
  33. move $31, $0
  34. #endif
  35. @@ -118,18 +99,18 @@
  36. /* Allocate space on the stack for seven arguments and
  37. * make sure the stack is aligned to double words (8 bytes) */
  38. + and $29, -2 * SZREG
  39. +
  40. #if _MIPS_SIM == _MIPS_SIM_ABI32
  41. - and $29, -2 * 4
  42. - subu $29, 32
  43. - la $7, _init /* init */
  44. - la $8, _fini
  45. - sw $8, 16($29) /* fini */
  46. - sw $2, 20($29) /* rtld_fini */
  47. - sw $29, 24($29) /* stack_end */
  48. -#else
  49. - and $29, -2 * PTRSIZE
  50. + PTR_SUBIU $29, 32
  51. +#endif
  52. PTR_LA $7, _init /* init */
  53. - PTR_LA $8, _fini /* fini */
  54. + PTR_LA $8, _fini
  55. +#if _MIPS_SIM == _MIPS_SIM_ABI32
  56. + PTR_S $8, 16($29) /* fini */
  57. + PTR_S $2, 20($29) /* rtld_fini */
  58. + PTR_S $29, 24($29) /* stack_end */
  59. +#else
  60. move $9, $2 /* rtld_fini */
  61. move $10, $29 /* stack_end */
  62. #endif
  63. -