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.

52 lines
1.8 KiB

  1. # --- T2-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # T2 SDE: package/.../dietlibc/ppc-static-ctor-dtor.patch
  5. # Copyright (C) 2004 - 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. We build dietlibc with WANT_DYNAMIC so we get ctor/dtor handling, even
  17. for static programs, as normally needed.
  18. The patch zeros register 6 passed for dl_init to _dyn_start since otherwise
  19. we end up in an inf. loop calling the _dyn_start (where r6 points to) again
  20. and again ... This is NOT intended for upstream merge - just a quick hack
  21. to get it working.
  22. For ppc64 it is not an inf. loop but segfault on exit due invalid pointed
  23. in the atexit array.
  24. - Rene Rebe <rene@exactcode.de>
  25. diff -u dietlibc-0.28/ppc/start.S dietlibc-0.28-fixed/ppc/start.S
  26. --- dietlibc-0.28/ppc/start.S 2004-09-11 14:37:57.000000000 +0200
  27. +++ dietlibc-0.28-fixed/ppc/start.S 2005-05-03 23:47:09.000000000 +0200
  28. @@ -27,7 +29,7 @@
  29. stw 5,environ@l(14)
  30. #ifdef WANT_DYNAMIC
  31. - mr 6,7
  32. + xor 6,6,6
  33. bl _dyn_start
  34. #else
  35. #ifdef WANT_STACKGAP
  36. --- dietlibc-0.29/ppc64/start.S 2005-05-13 18:39:32.000000000 +0000
  37. +++ dietlibc-0.29-fixed/ppc64/start.S 2005-12-26 20:40:18.000000000 +0000
  38. @@ -60,7 +60,7 @@
  39. #ifdef WANT_DYNAMIC
  40. /* #warning dynamic */
  41. - mr 6,7
  42. + xor 6,6,6
  43. bl ._dyn_start
  44. #else
  45. /* #warning static */