From: Vineet Gupta <Vineet.Gupta1@synopsys.com>
To: Joseph Myers <joseph@codesourcery.com>
Cc: "linux-snps-arc@lists.infradead.org"
<linux-snps-arc@lists.infradead.org>,
"libc-alpha@sourceware.org" <libc-alpha@sourceware.org>
Subject: __syscall_error (was Re: [PATCH v4 13/15] ARC: Build Infrastructure)
Date: Wed, 1 Apr 2020 00:44:15 +0000 [thread overview]
Message-ID: <3b5edadd-b29d-f138-c440-ed6d38da6a67@synopsys.com> (raw)
In-Reply-To: <alpine.DEB.2.21.2003312246280.30236@digraph.polyomino.org.uk>
On 3/31/20 3:48 PM, Joseph Myers wrote:
> On Tue, 31 Mar 2020, Vineet Gupta via Libc-alpha wrote:
>
>> On 3/27/20 11:42 PM, Vineet Gupta via Libc-alpha wrote:
>>>>> +++ b/sysdeps/arc/Versions
>>>>> @@ -0,0 +1,6 @@
>>>>> +libc {
>>>>> + GLIBC_2.32 {
>>>>> + __syscall_error;
>>>>
>>>> Why does __syscall_error need a public symbol version? If it's used by a
>>>> library other than libc, that means it needs to be exported at some symbol
>>>> version - but it only needs a public version (as opposed to GLIBC_PRIVATE)
>>>> if it might be used by user programs linked with glibc (if it's used in
>>>> crt*.o, lib*_nonshared.a, or inline functions in installed headers, for
>>>> example - or in libgcc.a, libstdc++.a, etc. (GCC static libraries)).
>>>
>>> We'll historically I've preferred an out-of-line errno setter in the syscall
>>> wrappers and those are used in libpthread et all as well but not expected to be
>>> used by user programs. See my sysdeps.h
>>
>> Ok so this will not be called directly from user programs, but indeed
>> could end up in non shared libs and/or inline functions in headers, so I
>> suppose this is fine ?
>
> What inline function or object in lib*_nonshared.a / crt*.o / GCC static
> library has a reference to this symbol?
>
> If there's an inline function referring to this in an installed header, we
> can consider whether that inline function *should* be referring to it.
> Similarly if there's a reference in crt*.o / lib*_nonshared.a / GCC static
> libraries, we can consider if that reference *should* be there or if the
> function in question should actually be calling some function from libc.so
> that does the syscall there.
The assembler macros in syscall template for generating wrappers use
__syscall_error (sysdeps/unix/sysv/linux/arc/sysdep.h).
If public Version is removed, I get errors like below:
| arc-glibc-linux-gnu-gcc -shared -static-libgcc -Wl,-O1 -Wl,-z,defs -Wl,
| -dynamic-linker=/lib/ld-linux-arc.so.2 -Wl,--version-script=/SCRATCH/vgupta
| /gnu/build/glibcs/arc-linux-gnu/glibc/librt.map -Wl,-soname=librt.so.1
|
| ...
| a - mq_setattr.o
| a - librt-cancellation.o
| /SCRATCH/vgupta/gnu/install/compilers/arc-linux-gnu/lib/gcc/arc-glibc-linux-
| gnu/10.0.1/../../../../arc-glibc-linux-gnu/bin/ld: /SCRATCH/vgupta/gnu/build
| /glibcs/arc-linux-gnu/glibc/rt/librt_pic.a(mq_setattr.os): in function
| `mq_setattr':
| /SCRATCH/vgupta/gnu/src/glibc/rt/../sysdeps/unix/syscall-template.S:80:
| undefined reference to `__syscall_error'
And this change goes back to initial port (in 2016) where openssh/libcrypt.so was
failing to link somewhat similarly.
Looking as RISCV code, they opencode __syscall_error for !IS_IN (libc) which I was
hoping to avoid.
_______________________________________________
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc
next prev parent reply other threads:[~2020-04-01 0:45 UTC|newest]
Thread overview: 63+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-13 3:04 [PATCH v4 00/15] glibc port to ARC processors Vineet Gupta
2020-03-13 3:04 ` [PATCH v4 01/15] ARC: add definitions to elf/elf.h Vineet Gupta
2020-03-26 1:37 ` Joseph Myers
2020-03-26 1:52 ` Vineet Gupta
2020-03-13 3:04 ` [PATCH v4 02/15] ARC: ABI Implementation Vineet Gupta
2020-03-26 1:52 ` Joseph Myers
2020-03-26 2:39 ` Vineet Gupta
2020-03-26 18:48 ` Joseph Myers
2020-03-27 0:37 ` Vineet Gupta
2020-03-27 23:33 ` Vineet Gupta
2020-03-27 23:35 ` Joseph Myers
2020-03-27 23:47 ` Vineet Gupta
2020-03-31 21:08 ` Big Endian support as multi-ABI (was Re: [PATCH v4 02/15] ARC: ABI Implementation) Vineet Gupta
2020-03-31 21:27 ` Joseph Myers
2020-03-31 21:35 ` Vineet Gupta
2020-03-13 3:04 ` [PATCH v4 03/15] ARC: startup and dynamic linking code Vineet Gupta
2020-03-26 1:55 ` Joseph Myers
2020-03-26 2:45 ` Vineet Gupta
2020-03-13 3:04 ` [PATCH v4 04/15] ARC: Thread Local Storage support Vineet Gupta
2020-03-26 1:57 ` Joseph Myers
2020-03-26 2:47 ` Vineet Gupta
2020-03-13 3:04 ` [PATCH v4 05/15] ARC: Atomics and Locking primitives Vineet Gupta
2020-03-13 3:04 ` [PATCH v4 06/15] ARC: math soft float support Vineet Gupta
2020-03-26 1:59 ` Joseph Myers
2020-03-26 2:48 ` Vineet Gupta
2020-03-13 3:04 ` [PATCH v4 07/15] ARC: hardware floating point support Vineet Gupta
2020-03-26 2:06 ` Joseph Myers
2020-03-26 3:19 ` Vineet Gupta
2020-03-26 23:22 ` Joseph Myers
2020-03-27 1:50 ` Vineet Gupta
2020-03-27 18:37 ` Joseph Myers
2020-03-27 18:53 ` Vineet Gupta
2020-03-13 3:04 ` [PATCH v4 08/15] ARC: Linux Syscall Interface Vineet Gupta
2020-03-26 23:52 ` Joseph Myers
2020-03-27 4:34 ` Vineet Gupta
2020-03-27 18:38 ` Joseph Myers
2020-03-13 3:04 ` [PATCH v4 09/15] ARC: Linux ABI Vineet Gupta
2020-03-27 0:38 ` Joseph Myers
2020-03-27 4:45 ` Vineet Gupta
2020-03-13 3:04 ` [PATCH v4 10/15] ARC: Linux Startup and Dynamic Loading Vineet Gupta
2020-03-13 3:04 ` [PATCH v4 11/15] ARC: ABI lists Vineet Gupta
2020-03-27 0:40 ` Joseph Myers
2020-03-27 4:36 ` Vineet Gupta
2020-03-27 18:39 ` Joseph Myers
2020-03-27 19:09 ` Vineet Gupta
2020-03-13 3:04 ` [PATCH v4 12/15] ARC: Update syscall-names.list for ARC specific syscalls Vineet Gupta
2020-03-13 3:04 ` [PATCH v4 13/15] ARC: Build Infrastructure Vineet Gupta
2020-03-27 22:47 ` Joseph Myers
2020-03-28 6:42 ` Vineet Gupta
2020-03-31 22:02 ` Vineet Gupta
2020-03-31 22:48 ` Joseph Myers
2020-04-01 0:44 ` Vineet Gupta [this message]
2020-04-01 7:58 ` __syscall_error (was Re: [PATCH v4 13/15] ARC: Build Infrastructure) Andreas Schwab
2020-04-01 21:38 ` Vineet Gupta
2020-04-01 17:06 ` Joseph Myers
2020-04-02 0:00 ` Vineet Gupta
2020-04-02 8:50 ` Florian Weimer
2020-04-02 20:22 ` Vineet Gupta
2020-03-13 3:04 ` [PATCH v4 14/15] build-many-glibcs.py: Enable ARC builds Vineet Gupta
2020-03-13 3:04 ` [PATCH v4 15/15] Documentation for ARC port Vineet Gupta
2020-03-27 22:49 ` Joseph Myers
2020-03-27 23:56 ` Vineet Gupta
2020-03-28 0:01 ` Joseph Myers
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=3b5edadd-b29d-f138-c440-ed6d38da6a67@synopsys.com \
--to=vineet.gupta1@synopsys.com \
--cc=joseph@codesourcery.com \
--cc=libc-alpha@sourceware.org \
--cc=linux-snps-arc@lists.infradead.org \
/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 NNTP newsgroup(s).