1
0

fls-internal.patch 997 B

1234567891011121314151617181920212223242526272829
  1. diff -Nur binutils-nds32-binutils-2.30-branch-open.orig/bfd/elf32-nds32.c binutils-nds32-binutils-2.30-branch-open/bfd/elf32-nds32.c
  2. --- binutils-nds32-binutils-2.30-branch-open.orig/bfd/elf32-nds32.c 2018-05-10 22:01:57.000000000 +0200
  3. +++ binutils-nds32-binutils-2.30-branch-open/bfd/elf32-nds32.c 2018-05-12 09:01:10.000000000 +0200
  4. @@ -5286,7 +5286,7 @@
  5. }
  6. static unsigned int
  7. -fls (register unsigned int x)
  8. +fls_internal (register unsigned int x)
  9. {
  10. return ffs (x & (-x));
  11. }
  12. @@ -6189,14 +6189,14 @@
  13. if (1 < ones32 (tls_type))
  14. {
  15. - eff_tls_type = 1 << (fls (tls_type) - 1);
  16. + eff_tls_type = 1 << (fls_internal (tls_type) - 1);
  17. /* TLS model shall be handled in nds32_elf_unify_tls_model () */
  18. /* TLS model X -> LE is not implement yet!
  19. * workaround here! */
  20. if (eff_tls_type == GOT_TLS_LE)
  21. {
  22. - eff_tls_type = 1 << (fls (tls_type ^ eff_tls_type) - 1);
  23. + eff_tls_type = 1 << (fls_internal (tls_type ^ eff_tls_type) - 1);
  24. }
  25. }