cris32-revert.patch 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. diff -Nur binutils-2.35.orig/bfd/elf32-cris.c binutils-2.35/bfd/elf32-cris.c
  2. --- binutils-2.35.orig/bfd/elf32-cris.c 2020-07-24 11:12:19.000000000 +0200
  3. +++ binutils-2.35/bfd/elf32-cris.c 2020-09-07 10:56:01.075626508 +0200
  4. @@ -1021,7 +1021,6 @@
  5. bfd_reloc_status_type r;
  6. const char *symname = NULL;
  7. enum elf_cris_reloc_type r_type;
  8. - bfd_boolean resolved_to_zero;
  9. r_type = ELF32_R_TYPE (rel->r_info);
  10. @@ -1134,9 +1133,6 @@
  11. if (bfd_link_relocatable (info))
  12. continue;
  13. - resolved_to_zero = (h != NULL
  14. - && UNDEFWEAK_NO_DYNAMIC_RELOC (info, h));
  15. -
  16. switch (r_type)
  17. {
  18. case R_CRIS_16_GOTPLT:
  19. @@ -1439,7 +1435,6 @@
  20. case R_CRIS_16:
  21. case R_CRIS_32:
  22. if (bfd_link_pic (info)
  23. - && !resolved_to_zero
  24. && r_symndx != STN_UNDEF
  25. && (input_section->flags & SEC_ALLOC) != 0
  26. && ((r_type != R_CRIS_8_PCREL
  27. @@ -3357,8 +3352,7 @@
  28. render the symbol local. */
  29. /* No need to do anything if we're not creating a shared object. */
  30. - if (! bfd_link_pic (info)
  31. - || UNDEFWEAK_NO_DYNAMIC_RELOC (info, h))
  32. + if (! bfd_link_pic (info))
  33. break;
  34. /* We may need to create a reloc section in the dynobj and made room