|
@@ -0,0 +1,29 @@
|
|
|
+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
|
|
|
+--- binutils-nds32-binutils-2.30-branch-open.orig/bfd/elf32-nds32.c 2018-05-10 22:01:57.000000000 +0200
|
|
|
++++ binutils-nds32-binutils-2.30-branch-open/bfd/elf32-nds32.c 2018-05-12 09:01:10.000000000 +0200
|
|
|
+@@ -5286,7 +5286,7 @@
|
|
|
+ }
|
|
|
+
|
|
|
+ static unsigned int
|
|
|
+-fls (register unsigned int x)
|
|
|
++fls_internal (register unsigned int x)
|
|
|
+ {
|
|
|
+ return ffs (x & (-x));
|
|
|
+ }
|
|
|
+@@ -6189,14 +6189,14 @@
|
|
|
+
|
|
|
+ if (1 < ones32 (tls_type))
|
|
|
+ {
|
|
|
+- eff_tls_type = 1 << (fls (tls_type) - 1);
|
|
|
++ eff_tls_type = 1 << (fls_internal (tls_type) - 1);
|
|
|
+ /* TLS model shall be handled in nds32_elf_unify_tls_model () */
|
|
|
+
|
|
|
+ /* TLS model X -> LE is not implement yet!
|
|
|
+ * workaround here! */
|
|
|
+ if (eff_tls_type == GOT_TLS_LE)
|
|
|
+ {
|
|
|
+- eff_tls_type = 1 << (fls (tls_type ^ eff_tls_type) - 1);
|
|
|
++ eff_tls_type = 1 << (fls_internal (tls_type ^ eff_tls_type) - 1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|