]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - bfd/ChangeLog
x86: don't request useless overflow checking
authorJan Beulich <jbeulich@suse.com>
Mon, 3 May 2021 11:25:12 +0000 (13:25 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 3 May 2021 11:25:12 +0000 (13:25 +0200)
commit4c398cc06d333fcb04772c04ea18db68587e8a1f
treee8f0dcc93460fdf17621e9d37ed13ec6beb9bff2
parentd389a1a7692d247b6153fc6a98ebc43d7070fc2e
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.
bfd/ChangeLog
bfd/elf32-i386.c
bfd/elf64-x86-64.c