regexp_diff match failure regexp "^ 0x00000020 00010203 04050607 04050607 04050607 ................$" line " 0x00000020 00010203 04050607 ffffffff ffffffff ................" FAIL: ld-scripts/fill2 The reason for the failure is that FILL ($0001020304050607) in fil2.t has the value read by strtoul (via scan_bfd_vma in ldlex.l), and strtoul returns -1 on overflow.
*** Bug 31195 has been marked as a duplicate of this bug. ***
The master branch has been updated by Alan Modra <amodra@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=c217aed574216e6af34188ac8a9bf019539e415d commit c217aed574216e6af34188ac8a9bf019539e415d Author: Alan Modra <amodra@gmail.com> Date: Sun Dec 31 14:09:10 2023 +1030 PR31120, ld-scripts/fill2 fails when bfd_vma is 32 bits The ld lexer converts strings to integers without overflow checking, so I don't think there is any problem in truncating an integer that exceeds the size of a bfd_vma rather than using (bfd_vma) -1. PR 31120 * ldlex.l: Don't use bfd_scan_vma for integer conversion, use strtoull.
Fixed