PR26469 UBSAN: elflink.c:8742 shift exponent 6148914691236511722
authorAlan Modra <amodra@gmail.com>
Thu, 27 Aug 2020 12:14:41 +0000 (21:44 +0930)
committerAlan Modra <amodra@gmail.com>
Thu, 27 Aug 2020 12:35:00 +0000 (22:05 +0930)
commit4b69ce9b9121090ac42cf8fa20b949bbd9afff95
tree196408e74cea24562bea850fc2ff4a8c6850e383
parent6fbd4a8e8baa7fe5adcaa1c11c885f741fccd250
PR26469 UBSAN: elflink.c:8742 shift exponent 6148914691236511722

PR 26469
* elflink.c: Include limits.h.
(CHAR_BIT): Provide fallback define.
(set_symbol_value): Correct complex reloc comment.
(undefined_reference): Set bfd_error.
(BINARY_OP_HEAD, BINARY_OP_TAIL): Split out from..
(BINARY_OP): ..this.
(eval_symbol): Limit shifts.  Force unsigned for left shift.
Catch divide by zero.
* configure.ac (AC_CHECK_HEADERS): Combine, sort and add limits.h.
* configure: Regenerate.
* config.in: Regenerate.
bfd/ChangeLog
bfd/config.in
bfd/configure
bfd/configure.ac
bfd/elflink.c