musl-cross.patch 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. diff -Nur binutils-2.22.orig/bfd/elf32-ppc.c binutils-2.22/bfd/elf32-ppc.c
  2. --- binutils-2.22.orig/bfd/elf32-ppc.c 2011-11-21 10:29:21.000000000 +0100
  3. +++ binutils-2.22/bfd/elf32-ppc.c 2013-09-14 12:51:24.000000000 +0200
  4. @@ -2987,10 +2987,6 @@
  5. edir->elf.needs_plt |= eind->elf.needs_plt;
  6. edir->elf.pointer_equality_needed |= eind->elf.pointer_equality_needed;
  7. - /* If we were called to copy over info for a weak sym, that's all. */
  8. - if (eind->elf.root.type != bfd_link_hash_indirect)
  9. - return;
  10. -
  11. if (eind->dyn_relocs != NULL)
  12. {
  13. if (edir->dyn_relocs != NULL)
  14. @@ -3022,6 +3018,16 @@
  15. eind->dyn_relocs = NULL;
  16. }
  17. + /* If we were called to copy over info for a weak sym, that's all.
  18. + You might think dyn_relocs need not be copied over; After all,
  19. + both syms will be dynamic or both non-dynamic so we're just
  20. + moving reloc accounting around. However, ELIMINATE_COPY_RELOCS
  21. + code in ppc_elf_adjust_dynamic_symbol needs to check for
  22. + dyn_relocs in read-only sections, and it does so on what is the
  23. + DIR sym here. */
  24. + if (eind->elf.root.type != bfd_link_hash_indirect)
  25. + return;
  26. +
  27. /* Copy over the GOT refcount entries that we may have already seen to
  28. the symbol which just became indirect. */
  29. edir->elf.got.refcount += eind->elf.got.refcount;
  30. diff -Nur binutils-2.22.orig/bfd/elf64-ppc.c binutils-2.22/bfd/elf64-ppc.c
  31. --- binutils-2.22.orig/bfd/elf64-ppc.c 2011-11-21 10:29:24.000000000 +0100
  32. +++ binutils-2.22/bfd/elf64-ppc.c 2013-09-14 12:51:24.000000000 +0200
  33. @@ -4435,10 +4435,6 @@
  34. edir->elf.ref_regular_nonweak |= eind->elf.ref_regular_nonweak;
  35. edir->elf.needs_plt |= eind->elf.needs_plt;
  36. - /* If we were called to copy over info for a weak sym, that's all. */
  37. - if (eind->elf.root.type != bfd_link_hash_indirect)
  38. - return;
  39. -
  40. /* Copy over any dynamic relocs we may have on the indirect sym. */
  41. if (eind->dyn_relocs != NULL)
  42. {
  43. @@ -4471,6 +4467,16 @@
  44. eind->dyn_relocs = NULL;
  45. }
  46. + /* If we were called to copy over info for a weak sym, that's all.
  47. + You might think dyn_relocs need not be copied over; After all,
  48. + both syms will be dynamic or both non-dynamic so we're just
  49. + moving reloc accounting around. However, ELIMINATE_COPY_RELOCS
  50. + code in ppc64_elf_adjust_dynamic_symbol needs to check for
  51. + dyn_relocs in read-only sections, and it does so on what is the
  52. + DIR sym here. */
  53. + if (eind->elf.root.type != bfd_link_hash_indirect)
  54. + return;
  55. +
  56. /* Copy over got entries that we may have already seen to the
  57. symbol which just became indirect. */
  58. if (eind->elf.got.glist != NULL)
  59. diff -Nur binutils-2.22.orig/config.sub binutils-2.22/config.sub
  60. --- binutils-2.22.orig/config.sub 2011-06-06 12:36:06.000000000 +0200
  61. +++ binutils-2.22/config.sub 2013-09-14 12:51:24.000000000 +0200
  62. @@ -125,6 +125,7 @@
  63. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
  64. case $maybe_os in
  65. nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
  66. + linux-musl* | \
  67. linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
  68. knetbsd*-gnu* | netbsd*-gnu* | \
  69. kopensolaris*-gnu* | \
  70. @@ -1335,6 +1336,7 @@
  71. | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
  72. | -mingw32* | -linux-gnu* | -linux-android* \
  73. | -linux-newlib* | -linux-uclibc* \
  74. + | -linux-musl* \
  75. | -uxpv* | -beos* | -mpeix* | -udk* \
  76. | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
  77. | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \