[PATCH] support: arm: Add libc_do_syscall function to libsupport routines
Lukasz Majewski
lukma@denx.de
Tue Mar 16 14:17:50 GMT 2021
Hi Adhemerval,
> 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.
Thanks for review. I will apply it if Florian don't mind.
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <https://sourceware.org/pipermail/libc-alpha/attachments/20210316/c26196ef/attachment.sig>
More information about the Libc-alpha
mailing list