diff options
author | Jan Beulich <jbeulich@suse.com> | 2021-04-26 10:39:11 +0200 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2021-04-26 10:39:11 +0200 |
commit | d965814fb65358df2f02c9f6af41cb1edd289277 (patch) | |
tree | ebe5dc581f4346670e74c9e3269b18dcda6519ac /gas | |
parent | fe134c656991cda74ab7bad80947930f666f8907 (diff) | |
download | binutils-d965814fb65358df2f02c9f6af41cb1edd289277.zip binutils-d965814fb65358df2f02c9f6af41cb1edd289277.tar.gz binutils-d965814fb65358df2f02c9f6af41cb1edd289277.tar.bz2 |
x86: limit 32-bit @size overflow checks to 64-bit objects
For 32-bit objects the behavior should not be dependent upon the build
being a BFD64 one.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 5 | ||||
-rw-r--r-- | gas/config/tc-i386.c | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 1e056f7..93b3fa6 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,5 +1,10 @@ 2021-04-26 Jan Beulich <jbeulich@suse.com> + * config/tc-i386.c (tc_gen_reloc): Limit BFD_RELOC_SIZE32 + overflow check to 64-bit objects. + +2021-04-26 Jan Beulich <jbeulich@suse.com> + * config/tc-i386.c (want_disp32): Also check for SIZE32. (optimize_encoding): Handle LEA. * testsuite/gas/i386/lea.s, testsuite/gas/i386/lea.d, diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index 116b9db..147c820 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -14212,6 +14212,7 @@ tc_gen_reloc (asection *section ATTRIBUTE_UNUSED, fixS *fixp) the symbol plus addend. */ valueT value = S_GET_SIZE (fixp->fx_addsy) + fixp->fx_offset; if (fixp->fx_r_type == BFD_RELOC_SIZE32 + && object_64bit && !fits_in_unsigned_long (value)) as_bad_where (fixp->fx_file, fixp->fx_line, _("symbol size computation overflow")); |