[prev in list] [next in list] [prev in thread] [next in thread] 

List:       glibc-alpha
Subject:    Re: [PATCH] LoongArch: Add syscall.c for getting correct return value
From:       XingLi <lixing () loongson ! cn>
Date:       2022-11-25 2:37:22
Message-ID: 724989a8-57c4-48b8-da1e-5516d894316e () loongson ! cn
[Download RAW message or body]



在 2022/11/23 下午9:36, Adhemerval Zanella Netto 写道:
> 
> 
> On 23/11/22 00:40, Xi Ruoyao wrote:
>> On Wed, 2022-11-23 at 09:57 +0800, Xing Li wrote:
>>> The __SYS_mmap syscall should return 47bits value. If we use
>>> the common syscall interface which defined in
>>> sysdeps/unix/sysv/linux/syscall.c, the syscall return value
>>> is 32bits with sign extend, which lead to mmap failure.
>>
>> Could we just change
>>
>> int r = INTERNAL_SYSCALL_NCS_CALL (number, a0, a1, a2, a3, a4, a5);
>>
>> in sysdeps/unix/sysv/linux/syscall.c to "long r = ..." instead?
>>
> 
> Yes, afaik INTERNAL_SYSCALL_NCS on all architecture returns long int.
> 
Yes, the __SYSCALL_DEFINEx all returns long in linux kernel.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic