0002-sh2.patch 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. diff -Nur elf2flt-6d80ab6c93409e796f85da404bde84b841231531.orig/elf2flt.c elf2flt-6d80ab6c93409e796f85da404bde84b841231531/elf2flt.c
  2. --- elf2flt-6d80ab6c93409e796f85da404bde84b841231531.orig/elf2flt.c 2017-10-03 10:36:02.718919968 +0200
  3. +++ elf2flt-6d80ab6c93409e796f85da404bde84b841231531/elf2flt.c 2017-10-03 10:37:42.402568044 +0200
  4. @@ -74,7 +74,7 @@
  5. #define FLAT_NIOS2_R_HIADJ_LO 2
  6. #define FLAT_NIOS2_R_CALL26 4
  7. #include <elf/nios2.h>
  8. -#elif defined(TARGET_sh)
  9. +#elif defined(TARGET_sh2) || defined(TARGET_sh2eb)
  10. #include <elf/sh.h>
  11. #elif defined(TARGET_sparc)
  12. #include <elf/sparc.h>
  13. @@ -108,8 +108,10 @@
  14. #define ARCH "sparc"
  15. #elif defined(TARGET_v850)
  16. #define ARCH "v850"
  17. -#elif defined(TARGET_sh)
  18. -#define ARCH "sh"
  19. +#elif defined(TARGET_sh2)
  20. +#define ARCH "sh2"
  21. +#elif defined(TARGET_sh2eb)
  22. +#define ARCH "sh2"
  23. #elif defined(TARGET_h8300)
  24. #define ARCH "h8300"
  25. #elif defined(TARGET_microblaze)
  26. @@ -1309,7 +1311,7 @@
  27. #endif /* TARGET_sparc */
  28. -#ifdef TARGET_sh
  29. +#if defined(TARGET_sh2) || defined(TARGET_sh2eb)
  30. case R_SH_DIR32:
  31. relocation_needed = 1;
  32. sym_vma = bfd_section_vma(abs_bfd, sym_section);
  33. @@ -1320,7 +1322,7 @@
  34. sym_addr += sym_vma + q->addend;
  35. sym_addr -= q->address;
  36. break;
  37. -#endif /* TARGET_sh */
  38. +#endif /* TARGET_sh2 / TARGET_sh2eb */
  39. #ifdef TARGET_e1
  40. #define htoe1l(x) htonl(x)