[PATCH] elf: fix pldd on targets that map objects above 2^63 [BZ #34641]

Andreas Schwab schwab@suse.de
Thu Sep 17 12:08:59 GMT 2026


On Sep 17 2026, Andreas Schwab wrote:

> On Sep 17 2026, Andreas Schwab wrote:
>
>> On Sep 17 2026, Stian Halseth wrote:
>>
>>> strace shows glibc's lseek going through _llseek, and a direct
>>> syscall(SYS_lseek) returns the full value:
>>>
>>>   _llseek(3, -2251795516617928, [0], SEEK_SET) = 2100024
>>
>> That looks broken.  The offset should be returned in the memory pointed
>> to by the third arg, not the return value (which should only be non-zero
>> on error).
>
> That appears to be a sparc64 specific kernel bug, on powerpc64le it
> works correctly.

Actually, powerpc64le has the same bug.  If the resulting offset is
negative then the kernel does not write it to the third arg either.  The
return value is zero, though, but that is probably due to the different
syscall calling conventions on powerpc.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."


More information about the Libc-alpha mailing list