[PATCH v3 03/18] VMS/BFD: Fix a sign extension issue with archive symbol lookup

Jan Beulich jbeulich@suse.com
Thu Dec 4 15:46:58 GMT 2025


On 20.11.2025 11:56, Maciej W. Rozycki wrote:
> From: Maciej W. Rozycki <macro@redhat.com>
> 
> Symbol binary search code for VMS archive files uses plain `char' data 
> type to cast a difference between characters to data of the `int' type.  
> Consequently the difference is consider unsigned in the range between 0 
> and 255 on hosts where plain `char' data type is unsigned, resulting in
> symbol lookup failures, such as with the test expansion included with 
> this change causing regressions as follows:
> 
> FAIL: Regular archive link
> FAIL: Thin archive link
> FAIL: Regular archive plus regular link
> FAIL: Regular archive plus thin link
> FAIL: Thin archive plus regular link
> FAIL: Thin archive plus thin link
> 
> owing to link failures such as:
> 
> .../ld/ld-new: tmpdir/abc.o:($DATA$+0x0): undefined reference to `aa'
> .../ld/ld-new: tmpdir/ab.a(b.obj):($DATA$+0x10): undefined reference to `aa'
> .../ld/ld-new: tmpdir/abc.o:($DATA$+0x0): undefined reference to `aa'
> .../ld/ld-new: tmpdir/ab.a(b.obj):($DATA$+0x10): undefined reference to `aa'
> 
> with the `alpha-dec-vms' target on the `powerpc64le-linux-gnu' host.
> 
> Use explicit `signed char' data type for the cast then, removing the 
> failures.

Okay.

Jan


More information about the Binutils mailing list