How can I declare a global variable related to syscall routines without any issue?

Florian Weimer fw@deneb.enyo.de
Mon Dec 30 11:34:00 GMT 2019


* 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.



More information about the Libc-help mailing list