[Patch][Gold] BE8 for ARM

Umesh Kalappa umesh.kalappa0@gmail.com
Mon Sep 25 10:58:00 GMT 2017


Thank you Cary for the comments and updated the patch .

~Umesh

On Thu, Sep 21, 2017 at 4:00 AM, Cary Coutant <ccoutant@gmail.com> wrote:
>>> Arm/thumb stubs support was missed in the be8 mode with the previous
>>> patch, hence adding the same with the unit cases.
>>>
>>> No Regress on gold test-suites.
>
> +      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);
>
> These lines are not indented correctly.
>
> +      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));
>
> Same here.
>
> +        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);
> +        }
>           }
>           break;
>         case Insn_template::ARM_TYPE:
> +      if (enable_be8)
> +        elfcpp::Swap<32, false>::writeval(pov, insns[i].data());
> +      else
> +        elfcpp::Swap<32, big_endian>::writeval(pov, insns[i].data());
> +      break;
>
> And here.
>
> I think this comment from Stub::do_fixed_endian_write() can be removed:
>
>   // FIXME:  We do not handle BE8 encoding yet.
>
> diff --git a/gold/testsuite/arm_farcall_arm_arm_be8.sh
> b/gold/testsuite/arm_farcall_arm_arm_be8.sh
> new file mode 100644
> index 0000000..e21a16d
> --- /dev/null
> +++ b/gold/testsuite/arm_farcall_arm_arm_be8.sh
>
> The new shell script files should be executable. Please make sure
> they're marked that way in your git repo.
>
> -cary
-------------- next part --------------
A non-text attachment was scrubbed...
Name: be8_stubs_support.patch
Type: application/octet-stream
Size: 12456 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20170925/29225b45/attachment.obj>


More information about the Binutils mailing list