public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
To: Florian Weimer <fweimer@redhat.com>, Lukasz Majewski <lukma@denx.de>
Cc: Joseph Myers <joseph@codesourcery.com>,
	GNU C Library <libc-alpha@sourceware.org>
Subject: Re: [PATCH] support: arm: Add libc_do_syscall function to libsupport routines
Date: Tue, 16 Mar 2021 09:46:35 -0300	[thread overview]
Message-ID: <b782d126-1ee9-2f98-7e60-ef16b1df8557@linaro.org> (raw)
In-Reply-To: <87k0q7smyt.fsf@oldenburg.str.redhat.com>



On 16/03/2021 02:10, Florian Weimer wrote:
> * Lukasz Majewski:
> 
>> Hi Florian,
>>
>>> * Lukasz Majewski:
>>>
>>>> It fixes the following error on ARM 32 bit port:
>>>>
>>>> y2038-glibc/support/support_path_support_time64.c:34: undefined
>>>> reference to `__libc_do_syscall'
>>>> collect2: error: ld returned 1 exit status  
>>>
>>> Should libsupport use syscall for direct system calls?
>>
>> I'm not sure what is the correct approach here.
>>
>> In my case - armv7, 32 bit - in support/support_path_support_time64.c
>> the utimensat_time64 syscall is called, which is wrapped to
>> INLINE_SYSCALL_CALL(), which calls __libc_do_syscall ASM ARM function.
>>
>> This function is only defined for i386 and 32 bit ARM (in e.g.
>> sysdeps/unix/sysv/linux/{arm|i386}/libc-do-syscall.S)
> 
> Yes, and using the syscall function would avoid this issue.
> 
> So the question is, why INLINE_SYSCALL_CALL?

The __libc_do_syscall is in fact only used thumb mode used as default,
and the direct syscall is used because there is no direct support
for using 64 bit types on ABI with default 32 bit time.  We might 
eventually remove the INLINE_SYSCALL_CALL once 64 bit time support is 
implemented (so we build the file with _TIME_SIZE=64).

The patch itself looks ok.

  parent reply	other threads:[~2021-03-16 12:46 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-15 15:47 Lukasz Majewski
2021-03-15 15:55 ` Florian Weimer
2021-03-15 22:14   ` Lukasz Majewski
2021-03-16  5:10     ` Florian Weimer
2021-03-16  9:06       ` Lukasz Majewski
2021-03-16 12:46       ` Adhemerval Zanella [this message]
2021-03-16 13:17         ` Adhemerval Zanella
2021-03-16 14:17         ` Lukasz Majewski
2021-03-16 14:25           ` Adhemerval Zanella
2021-03-16 14:28           ` Florian Weimer
2021-03-16 15:36             ` Lukasz Majewski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b782d126-1ee9-2f98-7e60-ef16b1df8557@linaro.org \
    --to=adhemerval.zanella@linaro.org \
    --cc=fweimer@redhat.com \
    --cc=joseph@codesourcery.com \
    --cc=libc-alpha@sourceware.org \
    --cc=lukma@denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).