diff options
author | Jan Beulich <jbeulich@suse.com> | 2021-05-03 13:25:12 +0200 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2021-05-03 13:25:12 +0200 |
commit | 4c398cc06d333fcb04772c04ea18db68587e8a1f (patch) | |
tree | e8f0dcc93460fdf17621e9d37ed13ec6beb9bff2 /bfd/ChangeLog | |
parent | d389a1a7692d247b6153fc6a98ebc43d7070fc2e (diff) | |
download | binutils-4c398cc06d333fcb04772c04ea18db68587e8a1f.zip binutils-4c398cc06d333fcb04772c04ea18db68587e8a1f.tar.gz binutils-4c398cc06d333fcb04772c04ea18db68587e8a1f.tar.bz2 |
x86: don't request useless overflow checking
Relocations with a bitsize matching the architecture's address width
can't usefully use an overflow checking approach other than "dont" or
"signed": All others involve perhaps complex calculations in
_bfd_relocate_contents() (or, not as severe, in bfd_check_overflow())
without ever finding anything to complain about - because of the address
width masking applied. Avoid this unnecessary overhead and switch all
such reloc types to "dont".
Note that "signed" checking with rela relocations (i.e. x86-64 here) is
only going to be useful if the addend actually got passed to
_bfd_relocate_contents() (and maybe others) instead of bogusly adding in
prior section contents (which apparently is assumed to be zero, and
hence again no overflow would ever be detected). See
https://sourceware.org/pipermail/binutils/2021-April/116164.html.
Diffstat (limited to 'bfd/ChangeLog')
-rw-r--r-- | bfd/ChangeLog | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index cdcf5d7..2659710 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,10 @@ +2021-05-03 Jan Beulich <jbeulich@suse.com> + + * elf32-i386.c (elf_howto_table): Switch all 32-bit relocs to + complain_overflow_dont. + * elf64-x86-64.c (x86_64_elf_howto_table): Switch all 64-bit + relocs to complain_overflow_dont. + 2021-05-03 Alan Modra <amodra@gmail.com> * elf32-ppc.c (allocate_dynrelocs): Keep dyn_relocs for undefweak |