This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch][Gold] BE8 for ARM


+  unsigned int enable_be8 = parameters->options().be8();

Should be const bool.

       case Insn_template::THUMB16_TYPE:
-         elfcpp::Swap<16, big_endian>::writeval(pov, insns[i].data() & 0xffff);
+      if (enable_be8)
            elfcpp::Swap<16, false>::writeval(pov, insns[i].data() & 0xffff);
+      else
+        elfcpp::Swap<16, big_endian>::writeval(pov, insns[i].data() & 0xffff);
          break;

+      if (enable_be8)
+           elfcpp::Swap<16, false>::writeval(
+               pov,this->thumb16_special(i));
+      else
+        elfcpp::Swap<16, big_endian>::writeval(
+            pov,this->thumb16_special(i));
+        if (enable_be8)
+          {
+               elfcpp::Swap<16, false>::writeval(pov, hi);
+               elfcpp::Swap<16, false>::writeval(pov + 2, lo);
+          }
+        else
+          {
+            elfcpp::Swap<16, big_endian>::writeval(pov, hi);
+            elfcpp::Swap<16, big_endian>::writeval(pov + 2, lo);
+          }

+      if (enable_be8)
+        elfcpp::Swap<32, false>::writeval(pov, insns[i].data());
+      else
+        elfcpp::Swap<32, big_endian>::writeval(pov, insns[i].data());
+      break;

These are still not indented correctly. Check the tab stop settings in
your editor -- it looks like you may have your editor set to tabs
every 4 columns.

-  for (unsigned int i = 1; i < shnum; ++i)
+  for (static unsigned int i = 1; i < shnum; ++i)

What are you trying to do here? I'm pretty sure you don't mean to use
a static here.

I've fixed these and applied the patch for you.

Thanks!

-cary


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]