This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [Patch][Gold] BE8 for ARM
- From: Cary Coutant <ccoutant at gmail dot com>
- To: Umesh Kalappa <umesh dot kalappa0 at gmail dot com>
- Cc: "Bharathi Seshadri (bseshadr)" <bseshadr at cisco dot com>, "Richard Earnshaw (lists)" <Richard dot Earnshaw at arm dot com>, "binutils at sourceware dot org" <binutils at sourceware dot org>
- Date: Thu, 19 Oct 2017 21:00:05 -0700
- Subject: Re: [Patch][Gold] BE8 for ARM
- Authentication-results: sourceware.org; auth=none
- References: <CAGfacvTYf79ZKajiO=ks_V19EsNn5QAxfUPqKBubjcFvpHT5Ow@mail.gmail.com> <CAJimCsEYJ5QB_E+PSaR+YqgnApaHFfZ4_+u80V5cpiv5XwXj5g@mail.gmail.com> <CAGfacvQbT569zag4AWpFk5XuFgd=r8qU1u8gn2yVuixthqtwMQ@mail.gmail.com> <CAGfacvRJyKuEb0C43GPx6H_+0gNcdNyNmqLGZ7YUpYqEe8EWvg@mail.gmail.com>
+ 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