This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v3 0/6] mips: system call table generation support
- From: Florian Weimer <fweimer at redhat dot com>
- To: "Maciej W. Rozycki" <macro at linux-mips dot org>
- Cc: Joseph Myers <joseph at codesourcery dot com>, Paul Burton <paul dot burton at mips dot com>, Firoz Khan <firoz dot khan at linaro dot org>, "open list\:RALINK MIPS ARCHITECTURE" <linux-mips at linux-mips dot org>, Ralf Baechle <ralf at linux-mips dot org>, James Hogan <jhogan at kernel dot org>, Greg Kroah-Hartman <gregkh at linuxfoundation dot org>, Philippe Ombredanne <pombredanne at nexb dot com>, Thomas Gleixner <tglx at linutronix dot de>, Kate Stewart <kstewart at linuxfoundation dot org>, y2038 Mailman List <y2038 at lists dot linaro dot org>, Arnd Bergmann <arnd at arndb dot de>, Linux Kernel Mailing List <linux-kernel at vger dot kernel dot org>, Linux-Arch <linux-arch at vger dot kernel dot org>, Deepa Dinamani <deepa dot kernel at gmail dot com>, Marcin Juszkiewicz <marcin dot juszkiewicz at linaro dot org>, libc-alpha at sourceware dot org
- Date: Thu, 06 Dec 2018 19:10:57 +0100
- Subject: Re: [PATCH v3 0/6] mips: system call table generation support
- References: <1543481016-18500-1-git-send-email-firoz.khan@linaro.org> <CALxhOnjSEp++W5T3Sf0eX+8hPt08ER22M817M-Vhd24_96a_EQ@mail.gmail.com> <20181205063436.kzxgnvgexcgq572k@pburton-laptop> <alpine.LFD.2.21.1812061209220.7193@eddie.linux-mips.org> <alpine.DEB.2.21.1812061618110.12167@digraph.polyomino.org.uk> <alpine.LFD.2.21.1812061659210.4294@eddie.linux-mips.org> <alpine.DEB.2.21.1812061719180.12167@digraph.polyomino.org.uk> <alpine.LFD.2.21.1812061729340.4294@eddie.linux-mips.org>
* Maciej W. Rozycki:
> On Thu, 6 Dec 2018, Joseph Myers wrote:
>
>> > So how are `SYS_<name>' macros generated that land in <bits/syscall.h>?
>>
>> By gen-syscall-h.awk, which generates #ifdef conditionals for each
>> possible __NR_* name (as listed in syscall-names.list in glibc).
>
> I seem to remember having to take extra care with how the three MIPS ABIs
> wire the syscalls to get it right in glibc, but I take it then this has
> been now addressed reliably enough for the glibc not to care how exactly
> <asm/unistd.h> has been arranged.
This is a fairly recent change (commit
2dba5ce7b8115d6a2789bf279892263621088e74, "<bits/syscall.h>: Use an
arch-independent system call list on Linux", first release with it is
glibc 2.27). This patch is quite backportable; we have put it into our
2.17-derived glibc, and the upstream work was originally driven by
downstream ordering requirements of kernel header and glibc builds.
Glad to see it's useful elsewhere.
The test retains the old <asm/unistd.h>-based macro extraction for
testing purposes, but it needs that only for the actual target
architecture and only the *names*, so it's easy to implement. Before
that, the generation would have to carefully take into account multiple
sub-targets (i386/x86-64/x32 is one of the more complicated scenarios).
Presumably, you saw problem with that part.
Even if you introduce breakage here, it will only affect older glibc
builds. It's not something that application developers would see.
Thanks,
Florian