]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - bfd/elf32-arm.c
ARM: plt_size functions need to read instructions in right byte order
authorVictor Kamensky <victor.kamensky@linaro.org>
Thu, 23 Oct 2014 01:23:53 +0000 (11:53 +1030)
committerAlan Modra <amodra@gmail.com>
Thu, 23 Oct 2014 01:23:53 +0000 (11:53 +1030)
commit685e70ae51e312f7cbcfa8943fffceb540d46640
treeb8d9001930ed10eadc94f010cefd8947961993f5
parent65e84d12a068d72c94e96a569dac915386494e7a
ARM: plt_size functions need to read instructions in right byte order

elf32_arm_plt0_size and elf32_arm_plt_size read instructions
to determine what is size of PLT entry.  However it does not
read instruction correctly in case of ARM big endian V7 case.
In this case instructions are still kept in little endian
order (BE8).

* elf32-arm.c (read_code32): New function to read 32 bit
arm instruction.
(read_code16): New function to read 16 bit thumb instrution.
(elf32_arm_plt0_size, elf32_arm_plt_size): Use read_code32
and read_code16 to read instructions.
bfd/ChangeLog
bfd/elf32-arm.c