diff options
author | Alan Modra <amodra@gmail.com> | 2020-09-02 10:05:52 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2020-09-02 16:30:42 +0930 |
commit | 839f41a323fe2ba58e64431bd567a214f776aa7c (patch) | |
tree | 7ac18b03d5b76d2298d15972de23f5ae16d598d4 /binutils | |
parent | 26009aa7639bb4103291bb79743dc4e51175f80a (diff) | |
download | gdb-839f41a323fe2ba58e64431bd567a214f776aa7c.zip gdb-839f41a323fe2ba58e64431bd567a214f776aa7c.tar.gz gdb-839f41a323fe2ba58e64431bd567a214f776aa7c.tar.bz2 |
ubsan: objdump.c:3009 negation of -2147483648
* objdump.c (disassemble_bytes): Use an unsigned type for "addend".
Diffstat (limited to 'binutils')
-rw-r--r-- | binutils/ChangeLog | 4 | ||||
-rw-r--r-- | binutils/objdump.c | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 9872504..96701b3 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,7 @@ +2020-09-02 Alan Modra <amodra@gmail.com> + + * objdump.c (disassemble_bytes): Use an unsigned type for "addend". + 2020-08-30 Alan Modra <amodra@gmail.com> * readelf.c (print_gnu_build_attribute_name): Use unsigned long diff --git a/binutils/objdump.c b/binutils/objdump.c index c7ad51e..91da480 100644 --- a/binutils/objdump.c +++ b/binutils/objdump.c @@ -3002,8 +3002,8 @@ disassemble_bytes (struct disassemble_info * inf, if (q->addend) { - bfd_signed_vma addend = q->addend; - if (addend < 0) + bfd_vma addend = q->addend; + if ((bfd_signed_vma) addend < 0) { printf ("-0x"); addend = -addend; |