The following fails when I build binutils with: configure --build=x86_64-linux --disable-nls --disable-gdb --disable-gdbserver --disable-sim --disable-readline --disable-libdecnumber --enable-obsolete --target=mep-elf CFLAGS="-g -O2 -fsanitize=address,undefined -Wno-error" CXXLAGS="-g -O2 -fsanitize=address,undefined -Wno-error" LDFLAGS="-ldl" Target: mep-elf FAIL: assembling relocs-refs Executing on host: /dev/shm/8p3qrweg/ld/ld-new relocs-junk1.o relocs-syms.o relocs-junk2.o relocs-refs.o --defsym __stack=0x1ffff0 --defsym __sbss_end=0x1000 -e 1233 -EL -o relocs.x (timeout = 300) /home/mliska/Programming/binutils/bfd/elflink.c:8742:7: runtime error: shift exponent 6148914691236511722 is too large for 64-bit type 'long unsigned int'
The master branch has been updated by Alan Modra <amodra@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=4b69ce9b9121090ac42cf8fa20b949bbd9afff95 commit 4b69ce9b9121090ac42cf8fa20b949bbd9afff95 Author: Alan Modra <amodra@gmail.com> Date: Thu Aug 27 21:44:41 2020 +0930 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.
Fixed