This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Re: How can I declare a global variable related to syscall routines without any issue?
- From: Florian Weimer <fw at deneb dot enyo dot de>
- To: Bbbb Im <bjspam dot im at gmail dot com>
- Cc: libc-help at sourceware dot org
- Date: Mon, 30 Dec 2019 12:33:47 +0100
- Subject: Re: How can I declare a global variable related to syscall routines without any issue?
- References: <CAMfc50T3GKKX6WMqspi5xBUQaCW57aj9gnOy6X1e_QnbPbbXvg@mail.gmail.com>
* Bbbb Im:
> The problem is that which C file is the best place to declare the flag as a
> global variable that does not break anything and linked to all the sycall
> related C files?
Such definitions are typically put into sysdep.c, but x86_64 already
has sysdep.S, so you would have to write the definition in assembler,
or add a new C file that is linked in the same way as the existing
sysdep file.
Please also note that some system call wrappers are written in
assembler (and some of them are autogenerated), so if you change the C
macro, that won't affect them.