aboutsummaryrefslogtreecommitdiff
path: root/binutils/objcopy.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2020-08-25 14:05:10 +0930
committerAlan Modra <amodra@gmail.com>2020-08-25 23:07:10 +0930
commitd2327e47ef26dc88192e07b53cbad0b768cecf2e (patch)
tree05701277805400bae3aac9cf640630a277f0df25 /binutils/objcopy.c
parentb8ff233b54d66c5dce5a6d1409fe57e7ea359f43 (diff)
downloadbinutils-d2327e47ef26dc88192e07b53cbad0b768cecf2e.zip
binutils-d2327e47ef26dc88192e07b53cbad0b768cecf2e.tar.gz
binutils-d2327e47ef26dc88192e07b53cbad0b768cecf2e.tar.bz2
PR26422, ASAN: elf32_arm_final_link_relocate elf32-arm.c:10351
Always reading 32 bits in order to extract addends from instruction fields is wrong when the field size is smaller. It also leads to reading past the end of the section. This patch tidies that by reading the proper field size, which allows some later refetching of addends to disappear. PR 26422 * elf32-arm.c (elf32_arm_final_link_relocate): Use the appropriate bfd_get_x size function to read addends out of fields. Apply rightshift adjustment too. Don't apply the now unnecessary howto->size shift to branch REL addends. Don't refetch R_ARM_ABS8 and R_ARM_ABS16 addends. Don't refetch thumb branch addends. Correct R_ARM_THM_JUMP6 addend.
Diffstat (limited to 'binutils/objcopy.c')
0 files changed, 0 insertions, 0 deletions