0008-mips-pie-tls.diff 809 B

123456789101112131415161718192021
  1. diff -ur binutils-2.25.1.orig/bfd/elfxx-mips.c binutils-2.25.1/bfd/elfxx-mips.c
  2. --- binutils-2.25.1.orig/bfd/elfxx-mips.c 2018-01-31 11:26:12.000000000 -0500
  3. +++ binutils-2.25.1/bfd/elfxx-mips.c 2018-01-31 12:16:00.179841734 -0500
  4. @@ -3228,7 +3228,7 @@
  5. && (!info->shared || !SYMBOL_REFERENCES_LOCAL (info, h)))
  6. indx = h->dynindx;
  7. - if ((info->shared || indx != 0)
  8. + if ((!info->executable || indx != 0)
  9. && (h == NULL
  10. || ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
  11. || h->root.type != bfd_link_hash_undefweak))
  12. @@ -3338,7 +3338,7 @@
  13. if (entry->tls_initialized)
  14. return;
  15. - if ((info->shared || indx != 0)
  16. + if ((!info->executable || indx != 0)
  17. && (h == NULL
  18. || ELF_ST_VISIBILITY (h->root.other) == STV_DEFAULT
  19. || h->root.type != bfd_link_hash_undefweak))