OpenSDE Packages Database (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
1.5 KiB

  1. # --- T2-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # T2 SDE: package/.../dietlibc/sparc64-longjmp.patch
  5. # Copyright (C) 2006 The T2 SDE Project
  6. #
  7. # More information can be found in the files COPYING and README.
  8. #
  9. # This patch file is dual-licensed. It is available under the license the
  10. # patched project is licensed under, as long as it is an OpenSource license
  11. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  12. # of the GNU General Public License as published by the Free Software
  13. # Foundation; either version 2 of the License, or (at your option) any later
  14. # version.
  15. # --- T2-COPYRIGHT-NOTE-END ---
  16. This fixes the sparc64 longjmp to inject the return value at the correct
  17. memory location (and not SIGBUS). MC_G1 is just the index in the register
  18. array, and before that array there are 4 more words placed, thus the offset
  19. 4 and multiple with the word-size ...
  20. - Rene Rebe <rene@exactcode.de>
  21. --- dietlibc-0.29/sparc64/longjmp.S 2002-09-16 11:17:02.000000000 +0000
  22. +++ dietlibc-0.29-fixed/sparc64/longjmp.S 2006-06-21 15:00:15.000000000 +0000
  23. @@ -11,7 +11,7 @@
  24. .type __libc_longjmp,function
  25. __libc_longjmp:
  26. movrz %o1, 1, %o1 /* never return 0 in setjmp */
  27. - stx %o1, [ %o0+MC_G1 ] /* save return value in context */
  28. + stx %o1, [%o0 + (4+MC_G1) * 8] /* save return value in context */
  29. ld [ %o0+FLAG_SAVEMASK ], %o1 /* has setjmp saved the signalmask ? */
  30. ta 0x6f /* setcontext / restore context */
  31. .size __libc_longjmp,.-__libc_longjmp